Implement all necessary interfaces for document object. If the interface is not supported, the impl can remove them from parent class list. More...
#include <document_impl.h>
Public Member Functions | |
PluginDocImpl () | |
~PluginDocImpl () | |
unsigned int | get_page_count () |
unsigned int | get_page_number (const std::string &anchor) |
bool | get_anchor_of_page (const unsigned int page_number, std::string &anchor) |
Retrieve the anchor for given page number. | |
bool | get_prev_page (std::string &anchor) |
Anchor iteraotr: retrieve the previous anchor. | |
bool | get_next_page (std::string &anchor) |
Anchor iteraotr: retrieve the next anchor. | |
bool | get_original_size (const std::string &anchor, unsigned int &width, unsigned int &height) |
bool | get_content_area (const std::string &anchor, RenderArea &area) |
PluginRotationDegree | get_page_original_rotation (const std::string &anchor) |
PDFRenderer * | get_renderer () |
Get the renderer. | |
PDFController & | get_doc_ctrl () |
Get the document controller. | |
const string & | get_file_name () |
Get the file name. | |
Data Fields | |
utils::Signal< PluginDocImpl * > | release_signal |
The release signal. | |
Friends | |
class | PluginViewImpl |
Implement all necessary interfaces for document object. If the interface is not supported, the impl can remove them from parent class list.
Definition at line 49 of file pdf/plugin_impl/document_impl.h.
pdf::PluginDocImpl::PluginDocImpl | ( | ) |
Definition at line 37 of file pdf/plugin_impl/document_impl.cpp.
References IPluginDocSearch::abort_search, IPluginEventBroadcaster::add_event_receiver, utils::ObjectTable< T >::add_interface(), pdf::Signal< R, A1, A2, A3, A4, A5 >::add_slot(), IPluginDocument::close, IPluginDocNavigator::compare_anchor_location, IPluginDocSearch::create_search_criteria, IPluginDocument::create_view, IPluginDocAttributes::get_attribute, IPluginDocNavigator::get_file_name_from_anchor, IPluginDocNavigator::get_file_position_from_anchor, IPluginDocHyperlink::get_hyperlinks_in_range, IPluginDocNavigator::get_initial_anchor, IPluginDocNavigator::get_object_from_anchor, IPluginDocMarker::get_supported_marker_types, IPluginDocHyperlink::get_target_from_hyperlink, IPluginDocNavigator::get_text_from_range, IPluginDocNavigator::get_type_of_object, IPluginDocNavigator::get_words_from_range, IPluginDocMarker::has_toc, IPluginDocNavigator::is_anchor_in_current_document, IPluginDocDictionary::is_dictionary, IPluginDocHyperlink::is_hyperlink, IPluginDocument::is_open, IPluginDocument::open, _IPluginUnknown::query_interface, _IPluginUnknown::release, IPluginEventBroadcaster::remove_event_receiver, IPluginDocMarker::request_marker_trees, IPluginDocSearch::request_search_all, IPluginDocSearch::request_search_next, IPluginDocAttributes::set_attribute, and pdf::PDFController::sig_search_results_ready.
00041 { 00042 // IPluginUnknown 00043 query_interface = query_interface_impl; 00044 release = release_impl; 00045 00046 // IPluginDocument 00047 open = open_impl; 00048 is_open = is_open_impl; 00049 close = close_impl; 00050 create_view = create_view_impl; 00051 00052 // IPluginDocNavigator 00053 get_initial_anchor = get_initial_anchor_impl; 00054 get_object_from_anchor = get_object_from_anchor_impl; 00055 get_type_of_object = get_type_of_object_impl; 00056 get_words_from_range = get_words_from_range_impl; 00057 get_text_from_range = get_text_from_range_impl; 00058 is_anchor_in_current_document = is_anchor_in_current_document_impl; 00059 get_file_name_from_anchor = get_file_name_from_anchor_impl; 00060 get_file_position_from_anchor = get_file_position_from_anchor_impl; 00061 compare_anchor_location = compare_anchor_location_impl; 00062 00063 // IPluginDocAttributes 00064 get_attribute = get_attribute_impl; 00065 set_attribute = set_attribute_impl; 00066 00067 // IPluginEventBroadcaster 00068 add_event_receiver = add_event_receiver_impl; 00069 remove_event_receiver = remove_event_receiver_impl; 00070 00071 // IPluginDocHyperlink 00072 is_hyperlink = is_hyperlink_impl; 00073 get_target_from_hyperlink = get_target_from_hyperlink_impl; 00074 get_hyperlinks_in_range = get_hyperlinks_in_range_impl; 00075 00076 // IPluginDocDictionary 00077 is_dictionary = is_dictionary_impl; 00078 00079 // IPluginDocMarker 00080 get_supported_marker_types = get_supported_marker_types_impl; 00081 request_marker_trees = request_marker_trees_impl; 00082 has_toc = has_toc_impl; 00083 00084 // IPluginDocSearch 00085 create_search_criteria = create_search_criteria_impl; 00086 request_search_next = request_search_next_impl; 00087 request_search_all = request_search_all_impl; 00088 abort_search = abort_search_impl; 00089 00090 // Initialize interface and object table. 00091 g_instances_table.add_interface<IPluginUnknown>(this); 00092 g_instances_table.add_interface<IPluginDocument>(this); 00093 g_instances_table.add_interface<IPluginDocNavigator>(this); 00094 g_instances_table.add_interface<IPluginDocAttributes>(this); 00095 g_instances_table.add_interface<IPluginEventBroadcaster>(this); 00096 g_instances_table.add_interface<IPluginDocHyperlink>(this); 00097 g_instances_table.add_interface<IPluginDocDictionary>(this); 00098 g_instances_table.add_interface<IPluginDocMarker>(this); 00099 g_instances_table.add_interface<IPluginDocSearch>(this); 00100 00101 // connect to the search ready signal 00102 doc_ctrl.sig_search_results_ready.add_slot(this 00103 , &PluginDocImpl::on_search_results_ready); 00104
pdf::PluginDocImpl::~PluginDocImpl | ( | ) |
Definition at line 111 of file pdf/plugin_impl/document_impl.cpp.
bool pdf::PluginDocImpl::get_anchor_of_page | ( | const unsigned int | page_number, | |
std::string & | anchor | |||
) |
Retrieve the anchor for given page number.
Definition at line 126 of file pdf/plugin_impl/document_impl.cpp.
bool pdf::PluginDocImpl::get_content_area | ( | const std::string & | anchor, | |
RenderArea & | area | |||
) |
Definition at line 158 of file pdf/plugin_impl/document_impl.cpp.
PDFController& pdf::PluginDocImpl::get_doc_ctrl | ( | ) | [inline] |
Get the document controller.
Definition at line 95 of file pdf/plugin_impl/document_impl.h.
const string& pdf::PluginDocImpl::get_file_name | ( | ) | [inline] |
Get the file name.
Definition at line 98 of file pdf/plugin_impl/document_impl.h.
References pdf::PDFController::name().
bool pdf::PluginDocImpl::get_next_page | ( | std::string & | anchor | ) |
Anchor iteraotr: retrieve the next anchor.
Definition at line 137 of file pdf/plugin_impl/document_impl.cpp.
bool pdf::PluginDocImpl::get_original_size | ( | const std::string & | anchor, | |
unsigned int & | width, | |||
unsigned int & | height | |||
) |
Definition at line 142 of file pdf/plugin_impl/document_impl.cpp.
unsigned int pdf::PluginDocImpl::get_page_count | ( | ) |
Retrieve total page number. This function is used by PluginViewImpl
Definition at line 116 of file pdf/plugin_impl/document_impl.cpp.
unsigned int pdf::PluginDocImpl::get_page_number | ( | const std::string & | anchor | ) |
Retrieve page number from anchor. This function is used by PluginViewImpl.
Definition at line 121 of file pdf/plugin_impl/document_impl.cpp.
PluginRotationDegree pdf::PluginDocImpl::get_page_original_rotation | ( | const std::string & | anchor | ) |
Definition at line 164 of file pdf/plugin_impl/document_impl.cpp.
bool pdf::PluginDocImpl::get_prev_page | ( | std::string & | anchor | ) |
Anchor iteraotr: retrieve the previous anchor.
Definition at line 132 of file pdf/plugin_impl/document_impl.cpp.
PDFRenderer* pdf::PluginDocImpl::get_renderer | ( | ) | [inline] |
Get the renderer.
Definition at line 92 of file pdf/plugin_impl/document_impl.h.
References pdf::PDFController::get_renderer().
friend class PluginViewImpl [friend] |
Definition at line 272 of file pdf/plugin_impl/document_impl.h.
The release signal.
Definition at line 102 of file pdf/plugin_impl/document_impl.h.