IPluginRender Struct Reference

Universal Document Shell Plugin Renderer interface. Through IPluginRender, caller can:

More...

#include <plugin_render.h>

Inheritance diagram for IPluginRender:
Inheritance graph
[legend]
Collaboration diagram for IPluginRender:
Collaboration graph
[legend]

Data Fields

PluginStatus(* render )(IPluginUnknown *thiz, const UDSString *start_of_page_anchor, const int page_offset, IPluginUnknown *settings, const RenderArea *area, const unsigned int render_id)
 Render content. The plugin would check whether the content has been rendered when caller call this function. The plugin can abort other job if necessary. Once the content has been successfully rendered, the plugin would notify the caller through the listeners.
IPluginUnknown *(* create_render_settings )(IPluginUnknown *thiz)
 Create rendering settings.
PluginStatus(* set_memory_limit )(IPluginUnknown *thiz, const unsigned int bytes)
 Set memory limit for plugin renderer.
PluginStatus(* get_original_size )(IPluginUnknown *thiz, const UDSString *start_of_page_anchor, unsigned int *width, unsigned int *height)
 Get the original size in pixel of the page (zoom = 100%).
PluginStatus(* get_page_content_area )(IPluginUnknown *thiz, const UDSString *start_of_page_anchor, RenderArea *area)
 Get the content area of a page.
PluginStatus(* get_original_rotation )(IPluginUnknown *thiz, const UDSString *start_of_page_anchor, PluginRotationDegree *rotation)
 Get the original orientation of the page.

Detailed Description

Universal Document Shell Plugin Renderer interface. Through IPluginRender, caller can:

Definition at line 59 of file plugin_render.h.


Field Documentation

Create rendering settings.

Parameters:
thiz IPluginUnknown pointer of the current view object.
Returns:
Returns IPluginUnknown pointer of the created render settings object, returns NULL if it fails.

Referenced by text::PluginViewImpl::PluginViewImpl(), pdf::PluginViewImpl::PluginViewImpl(), and images::PluginViewImpl::PluginViewImpl().

Get the original orientation of the page.

Parameters:
thiz IPluginUnknown pointer of the current view object.
start_of_page_anchor Start anchor of the page.
rotation How the page was rotated before it was stored in the file, e.g. Clockwise_Degrees_90 means the page was rotated 90 degrees before it was stored in the file, so for properly displaying it the page must be rotated (360 - 90) degrees clockwise
Returns:
This function returns PLUGIN_OK if plugin can retrieve the original rotation. Otherwise, it returns the PLUGIN_FAIL.

Referenced by pdf::PluginViewImpl::PluginViewImpl(), and images::PluginViewImpl::PluginViewImpl().

PluginStatus(* IPluginRender::get_original_size)(IPluginUnknown *thiz, const UDSString *start_of_page_anchor, unsigned int *width, unsigned int *height)

Get the original size in pixel of the page (zoom = 100%).

Parameters:
thiz IPluginUnknown pointer of the current view object.
start_of_page_anchor Anchor of the requested page.
width The returned width.
height The returned height.
Returns:
TODO. Add return code here

Referenced by text::PluginViewImpl::PluginViewImpl(), pdf::PluginViewImpl::PluginViewImpl(), and images::PluginViewImpl::PluginViewImpl().

Get the content area of a page.

Parameters:
thiz IPluginUnknown pointer of the current view object.
start_of_page_anchor Start anchor of the page.
area The content area of a page
Returns:
Returns PLUGIN_OK if this function succeeds, otherwise returns PLUGIN_FAIL.

Referenced by text::PluginViewImpl::PluginViewImpl(), pdf::PluginViewImpl::PluginViewImpl(), and images::PluginViewImpl::PluginViewImpl().

PluginStatus(* IPluginRender::render)(IPluginUnknown *thiz, const UDSString *start_of_page_anchor, const int page_offset, IPluginUnknown *settings, const RenderArea *area, const unsigned int render_id)

Render content. The plugin would check whether the content has been rendered when caller call this function. The plugin can abort other job if necessary. Once the content has been successfully rendered, the plugin would notify the caller through the listeners.

Parameters:
thiz IPluginUnknown pointer of the current view object.
anchor The content location where rendering starts.
offset Number of pages to navigate away from the specified anchor
before rendering can start.
settings The rendering settings associated with this render
behavior. 
area For fixed-page oriented document, this variable
specifies which part of page need to be rendered.
refId A ID used to refer the rendering result, including
rendered image, paragraph text and something else. It is
generated by caller
Returns:
PLUGIN_OK : render request accepted
PLUGIN_OUT_OF_MEMORY : insufficient memory
PLUGIN_NOT_SUPPORTED : invalid request for this plugin,
e.g. plugin cannot handle page_offset != 0
PLUGIN_FAIL : other problem

Referenced by text::PluginViewImpl::PluginViewImpl(), pdf::PluginViewImpl::PluginViewImpl(), and images::PluginViewImpl::PluginViewImpl().

PluginStatus(* IPluginRender::set_memory_limit)(IPluginUnknown *thiz, const unsigned int bytes)

Set memory limit for plugin renderer.

Parameters:
thiz IPluginUnknown pointer of the current view object.
bytes The memory budget in bytes.
Returns:
TODO. Add return code here.

Referenced by text::PluginViewImpl::PluginViewImpl(), pdf::PluginViewImpl::PluginViewImpl(), and images::PluginViewImpl::PluginViewImpl().


The documentation for this struct was generated from the following file:
Generated by  doxygen 1.6.2-20100208