#include <IHTMLPageItemFacade.h>
|
| enum | { kDefaultIID = IID_IHTMLPAGEITEMFACADE } |
| |
A high level API for dealing with images. Please use the IHTMLPageItemFacade directly via the UtilsBoss if possible, see Utils.h: i.e. Utils<IHTMLPageItemFacade>()->GetHTMLContent( ... ) ;
- Author
- David Stephens
| virtual ErrorCode Facade::IHTMLPageItemFacade::CreateHTMLPageItem | ( | IDataBase * | db, | | | const WideString & | html, | | | bool32 | bAddParentFrame, | | | UIDRef & | newPageItemOrParentFrame | | ) | | const |
| pure virtual |
Given some embedded HTML content, create an embedded HTML page item. Note that the poster image is generated asynchronously so the page item that is returned likely will not contain a poster and will not be the correct size.
- Parameters
| db | IN The database |
| html | IN The HTML content. |
| bAddParentFrame | IN If true, add a parent container. If false, create only the html page item. |
| newPageItemOrParentFrame | OUT The UIDRef of the new html page item or its parent frame if bAddParentFrame is true. |
- Returns
- ErrorCode
Get the HTML content associated with an embedded HTML page item.
- Parameters
| GetHTMLContent | IN a pointer to any of the page item's interfaces. |
- Returns
- the HTML content as a WideString.
| virtual void Facade::IHTMLPageItemFacade::GetRelativeURIToHTMLFile | ( | const UIDRef & | pageItem, | | | WideString & | relativePosixPath | | ) | | const |
| pure virtual |
Placed HTML comes into InDesign as a packaged file where the actual HTML file is embedded somewhere within the package. On HTML export, we need to build a relative path to the HTML file to use as the 'src' of an 'iframe'. This field helps us to do that.
- Parameters
| pageItem | [IN] The UIDRef of the page item |
| relativePosixPath | [OUT] a Posix subpath within the placed package to the actual HTML file, relative to the uncompressed package folder. |
| virtual bool32 Facade::IHTMLPageItemFacade::GetResizable | ( | const UIDRef & | pageItem | ) | const |
| pure virtual |
Get whether or not this HTML is resizable. That is, does it know how to adapt when its container's size changes in the HTML runtime, or is it a fixed size and needs to be scaled in order to adapt?
- Parameters
| pageItem | [IN] The UIDRef of the page item |
- Returns
- true if resizable, false if it needs to be scaled
| virtual bool32 Facade::IHTMLPageItemFacade::IsHTMLContent | ( | const WideString & | text | ) | const |
| pure virtual |
Is the given string HTML content?
- Parameters
| text | IN a pointer to a string of text which may be HTML |
- Returns
- true if the text is HTML
| virtual ErrorCode Facade::IHTMLPageItemFacade::SetHTMLContent | ( | const UIDRef & | pageItem, | | | const WideString & | html | | ) | | const |
| pure virtual |
Set new HTML content
- Parameters
| pageItem | [IN] The UIDRef of the page item |
| html | [IN] new HTML content |
- Returns
- ErrorCode
| virtual ErrorCode Facade::IHTMLPageItemFacade::SetRelativeURIToHTMLFile | ( | const UIDRef & | pageItem, | | | const WideString * | relativePosixPath | | ) | | |
| pure virtual |
Placed HTML comes into InDesign as a packaged file where the actual HTML file is embedded somewhere within the package. On HTML export, we need to build a relative POSIX path to the HTML file to use as the 'src' of an 'iframe'. This field helps us to do that.
- Parameters
| pageItem | [IN] The UIDRef of the page item |
| relativePosixPath | [IN] subpath within the placed package to the actual HTML file, relative to the uncompressed package folder. |
- Returns
- an ErrorCode (kSuccess if successful).
| virtual ErrorCode Facade::IHTMLPageItemFacade::SetResizable | ( | const UIDRef & | pageItem, | | | bool32 | isResizable | | ) | | |
| pure virtual |
Set whether or not this HTML is resizable. That is, does it know how to adapt when its container's size changes in the HTML runtime, or is it a fixed size and needs to be scaled in order to adapt?
- Parameters
| pageItem | [IN] The UIDRef of the page item |
| resizable | [IN] true if resizable, false if it needs to be scaled |
- Returns
- ErrorCode
| virtual ErrorCode Facade::IHTMLPageItemFacade::UpdatePoster | ( | const UIDRef & | pageItem, | | | bool32 | bAutoResizeParentFrame | | ) | | const |
| pure virtual |
Force the poster to be regenerated from the current HTML
- Parameters
| pageItem | IN The UIDRef of the HTML page item to update. |
| bAutoResizeParentFrame | IN If true, then the parent container will be resized to fit the HTML page item after the poster generation is complete. |
- Returns
- ErrorCode