IPluginDocNavigator Struct Reference

Universal Document Shell Plugin Document Object Navigator interafce. Through IPluginDocNavigator, caller is able to navigate among different objects inside a document. Particularly, callers can get object(range) by input anchor; get text from specified range; compare position of two anchors. More...

#include <plugin_doc_navigator.h>

Inheritance diagram for IPluginDocNavigator:
Inheritance graph
[legend]

Data Fields

PluginStatus(* get_initial_anchor )(IPluginUnknown *thiz, UDSString *anchor)
 Get initial anchor of current document. The initial anchor is normally the first page of text, or the table of content.
PluginStatus(* get_object_from_anchor )(IPluginUnknown *thiz, const UDSString *anchor, PluginRange *range)
 Get the object where the anchor resides.
PluginDocObjectType(* get_type_of_object )(IPluginUnknown *thiz, const PluginRange *range)
 Get the object type for a specified object.
PluginStatus(* get_words_from_range )(IPluginUnknown *thiz, const PluginRange *char_range, PluginRange *words_range)
 Extends the range from specified char to the word.
PluginStatus(* get_text_from_range )(IPluginUnknown *thiz, const PluginRange *range, UDSString *result)
 Get the text within the specific range.
PluginBool(* is_anchor_in_current_document )(IPluginUnknown *thiz, const UDSString *anchor)
 Check whether the specified anchor is in the current document.
PluginStatus(* get_file_name_from_anchor )(IPluginUnknown *thiz, const UDSString *anchor, UDSString *file_name)
 Retrieve filename for given anchor. When the document is made up of several files, the plugin should return the file name according to the anchor.
PluginStatus(* get_file_position_from_anchor )(IPluginUnknown *thiz, const UDSString *anchor, signed long long *position)
 Retrieve object position specified by anchor inside the file.
PluginStatus(* get_uri_from_anchor )(IPluginUnknown *thiz, const UDSString *anchor, UDSString *url)
 Retrieve the url pointed by an anchor.
int(* compare_anchor_location )(IPluginUnknown *thiz, const UDSString *anchor_a, const UDSString *anchor_b)
 Compare position of two anchor objects.

Detailed Description

Universal Document Shell Plugin Document Object Navigator interafce. Through IPluginDocNavigator, caller is able to navigate among different objects inside a document. Particularly, callers can get object(range) by input anchor; get text from specified range; compare position of two anchors.

Definition at line 57 of file plugin_doc_navigator.h.


Field Documentation

int(* IPluginDocNavigator::compare_anchor_location)(IPluginUnknown *thiz, const UDSString *anchor_a, const UDSString *anchor_b)

Compare position of two anchor objects.

Parameters:
thiz IPluginUnknown pointer of document object.
anchor_a The first anchor.
anchor_b The second anchor.
Returns:
The possible return values are:
  • <0 when anchor_a's location in the document is before anchor_b's location
  • =0 when anchor_a's location in the document is the same as anchor_b's location
  • >0 when anchor_a's location in the document is after anchor_b's location

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

Retrieve filename for given anchor. When the document is made up of several files, the plugin should return the file name according to the anchor.

Parameters:
thiz IPluginUnknown pointer of document object.
anchor Location of user specified content.
file_name. The output variable stores the file name that contains the object specified by anchor. The file name must be in UTF-8 with extension name.
Returns:
Returns PLUGIN_OK if plugin is able to get the file name from anchor otherwise returns PLUGIN_ERROR.

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

PluginStatus(* IPluginDocNavigator::get_file_position_from_anchor)(IPluginUnknown *thiz, const UDSString *anchor, signed long long *position)

Retrieve object position specified by anchor inside the file.

Parameters:
thiz IPluginUnknown pointer of document object.
anchor Location of user specified content.
position. The object position inside the file. The position must be able to be compared. Usually the position is the distance of the object from file beginning.
Returns:
Returns PLUGIN_OK if plugin is able to get the object position specified by anchor otherwise returns PLUGIN_ERROR.

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

Get initial anchor of current document. The initial anchor is normally the first page of text, or the table of content.

Parameters:
thiz IPluginUnknown pinter of document object.
anchor The returned anchor.
Returns:
TODO. Add return code here.

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

Get the object where the anchor resides.

Parameters:
thiz IPluginUnknown pointer of document object.
anchor Location of user specified content.
range The range for returned object.
Returns:
TODO. Add return code here.

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

Get the text within the specific range.

Parameters:
thiz IPluginUnknown pointer of document object.
range User specified range. NOTE: The corresponding object within the range should be text.
result The result text.
Returns:
TODO. Add return code here.

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

Get the object type for a specified object.

Parameters:
thiz IPluginUnknown pointer of document object.
range The range of the specified object.
Returns:
Type of the specific object.

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

Retrieve the url pointed by an anchor.

Parameters:
thiz IPluginUnknown pointer of document object.
anchor The anchor which contains or points to a URL.
url The URL retrieved.
Returns:
Returns PLUGIN_OK if plugin is able to get the URL specified by anchor otherwise returns PLUGIN_ERROR.

Extends the range from specified char to the word.

Parameters:
thiz IPluginUnknown pointer of document object.
char_range The range of the specified character.
words_range The range of extended word.
Returns:
TODO. Add return code here.

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

Check whether the specified anchor is in the current document.

Parameters:
thiz IPluginUnknown pointer of document object.
anchor Location of user specified content.
Returns:
Returns PLUGIN_TRUE if the anchor is in current document; otherwise returns PLUGIN_FALSE.

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


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