images::PluginViewImpl Class Reference

Implement all interfaces of view object. If view object provider does not want to support optional interface, it may remove the interface from parent class list. More...

#include <view_impl.h>

Inheritance diagram for images::PluginViewImpl:
Inheritance graph
[legend]
Collaboration diagram for images::PluginViewImpl:
Collaboration graph
[legend]

Public Member Functions

 PluginViewImpl (PluginDocImpl *doc)
 ~PluginViewImpl (void)
void stop_renderer (void)

Data Fields

Signal< PluginViewImpl * > release_signal

Detailed Description

Implement all interfaces of view object. If view object provider does not want to support optional interface, it may remove the interface from parent class list.

Definition at line 46 of file images/plugin_impl/view_impl.h.


Constructor & Destructor Documentation

images::PluginViewImpl::PluginViewImpl ( PluginDocImpl doc  )  [explicit]

Definition at line 37 of file images/plugin_impl/view_impl.cpp.

References IPluginEventBroadcaster::add_event_receiver, utils::ObjectTable< T >::add_interface(), utils::Signal< A1, A2, A3, A4, A5 >::add_slot(), IPluginRender::create_render_settings, IPluginView::get_anchor_by_page, IPluginView::get_cover_page, images::PluginDocImpl::get_doc(), IPluginFont::get_font_family, IPluginFont::get_font_size, IPluginView::get_next_page, IPluginView::get_number_of_pages, IPluginRender::get_original_rotation, IPluginRender::get_original_size, IPluginRender::get_page_content_area, IPluginView::get_page_name, IPluginView::get_page_number, IPluginView::get_physical_page_start, IPluginView::get_prev_page, IPluginView::get_rendered_page_start, LOGPRINTF, _IPluginUnknown::query_interface, _IPluginUnknown::release, IPluginEventBroadcaster::remove_event_receiver, IPluginRender::render, IPluginViewSettings::set_color_depth, IPluginViewSettings::set_display_size, IPluginViewSettings::set_DPI, IPluginFont::set_font_family, IPluginFont::set_font_size, IPluginRender::set_memory_limit, and images::ImagesRenderer::sig_page_ready.

00038 : document(doc)
00039 {
00040     LOGPRINTF("%p", doc);
00041 
00042     assert(document);
00043     renderer = new ImagesRenderer(document->get_doc());
00044     assert(renderer);
00045     renderer->sig_page_ready.add_slot(this, 
00046             &PluginViewImpl::render_page_ready);
00047 
00048     // IPluginUnknown
00049     query_interface = query_interface_impl;
00050     release         = release_impl;
00051 
00052     // IPluginView
00053     get_page_number     = get_page_number_impl;
00054     get_page_name       = get_page_name_impl;
00055     get_number_of_pages = get_number_of_pages_impl;
00056     get_anchor_by_page  = get_anchor_by_page_impl;
00057     get_prev_page       = get_prev_page_impl;
00058     get_next_page       = get_next_page_impl;
00059     get_rendered_page_start = get_rendered_page_start_impl;
00060     get_physical_page_start = get_physical_page_start_impl;
00061     get_cover_page      = get_cover_page_impl;
00062 
00063     // IPluginViewSettings
00064     set_display_size    = set_display_size_impl;
00065     set_DPI             = set_DPI_impl;
00066     set_color_depth     = set_color_depth_impl;
00067 
00068     // IPluginRender
00069     render                  = render_impl;
00070     create_render_settings  = create_render_settings_impl;
00071     set_memory_limit        = set_memory_limit_impl;
00072     get_original_size       = get_original_size_impl;
00073     get_page_content_area   = get_page_content_area_impl;
00074     get_original_rotation   = get_original_rotation_impl;
00075 
00076     // IPluginFont
00077     get_font_size   = get_font_size_impl;
00078     set_font_size   = set_font_size_impl;
00079     get_font_family = get_font_family_impl;
00080     set_font_family = set_font_family_impl;
00081 
00082     // IPluginEventBroadcaster
00083     add_event_receiver      = add_event_receiver_impl;
00084     remove_event_receiver   = remove_event_receiver_impl;
00085 
00086     g_instances_table.add_interface<IPluginUnknown>(this);
00087     g_instances_table.add_interface<IPluginView>(this);
00088     g_instances_table.add_interface<IPluginViewSettings>(this);
00089     g_instances_table.add_interface<IPluginRender>(this);
00090     g_instances_table.add_interface<IPluginEventBroadcaster>(this);
00091 
00092     // The images plugin does not support IPluginFont.
00093     // If want to support IPluginFont, uncomment the following line.
00094     // g_instances_table.add_interface<IPluginFont>(this);
00095 
00096 }

Here is the call graph for this function:

images::PluginViewImpl::~PluginViewImpl ( void   ) 

Definition at line 98 of file images/plugin_impl/view_impl.cpp.

References LOGPRINTF, and utils::ObjectTable< T >::remove().

00099 {
00100     LOGPRINTF("entry");
00101 
00102     remove_slots();
00103 
00104     delete renderer;
00105     renderer = 0;
00106 
00107     g_instances_table.remove(this);
00108 }

Here is the call graph for this function:


Member Function Documentation

void images::PluginViewImpl::stop_renderer ( void   ) 

Definition at line 110 of file images/plugin_impl/view_impl.cpp.

References images::ImagesRenderer::stop().

00111 {
00112     if (renderer)
00113     {
00114         renderer->stop();
00115     }
00116 }

Here is the call graph for this function:


Field Documentation

Definition at line 62 of file images/plugin_impl/view_impl.h.


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