pdf::PluginDocImpl Class Reference

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>

Inheritance diagram for pdf::PluginDocImpl:
Inheritance graph
[legend]
Collaboration diagram for pdf::PluginDocImpl:
Collaboration graph
[legend]

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)
PDFRendererget_renderer ()
 Get the renderer.
PDFControllerget_doc_ctrl ()
 Get the document controller.
const stringget_file_name ()
 Get the file name.

Data Fields

utils::Signal< PluginDocImpl * > release_signal
 The release signal.

Friends

class PluginViewImpl

Detailed Description

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.


Constructor & Destructor Documentation

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 

Here is the call graph for this function:

pdf::PluginDocImpl::~PluginDocImpl (  ) 

Definition at line 111 of file pdf/plugin_impl/document_impl.cpp.

00115 {


Member Function Documentation

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.

00131 {

bool pdf::PluginDocImpl::get_content_area ( const std::string &  anchor,
RenderArea area 
)

Definition at line 158 of file pdf/plugin_impl/document_impl.cpp.

00163 {

PDFController& pdf::PluginDocImpl::get_doc_ctrl (  )  [inline]

Get the document controller.

Definition at line 95 of file pdf/plugin_impl/document_impl.h.

00095 { return doc_ctrl; }

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().

00098 { return doc_ctrl.name(); }

Here is the call graph for this function:

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.

00141 {

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.

00148 {
00149     double w, h;
00150     if (doc_ctrl.get_page_crop_width(anchor, w) &&
00151         doc_ctrl.get_page_crop_height(anchor, h))
00152     {
00153         width = static_cast<unsigned int>(w);
00154         height = static_cast<unsigned int>(h);
00155         return true;
00156     }

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.

00120 {

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.

00125 {

PluginRotationDegree pdf::PluginDocImpl::get_page_original_rotation ( const std::string &  anchor  ) 

Definition at line 164 of file pdf/plugin_impl/document_impl.cpp.

00168 {

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.

00136 {

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().

00092 { return doc_ctrl.get_renderer(); }

Here is the call graph for this function:


Friends And Related Function Documentation

friend class PluginViewImpl [friend]

Definition at line 272 of file pdf/plugin_impl/document_impl.h.


Field Documentation

The release signal.

Definition at line 102 of file pdf/plugin_impl/document_impl.h.


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