images/plugin_impl/render_result_impl.h

Go to the documentation of this file.
00001 /*
00002  * File Name: render_result_impl.h
00003  */
00004 
00005 /*
00006  * This file is part of uds-plugin-images.
00007  *
00008  * uds-plugin-images is free software: you can redistribute it and/or modify
00009  * it under the terms of the GNU General Public License as published by
00010  * the Free Software Foundation, either version 2 of the License, or
00011  * (at your option) any later version.
00012  *
00013  * uds-plugin-images is distributed in the hope that it will be useful,
00014  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00016  * GNU General Public License for more details.
00017  *
00018  * You should have received a copy of the GNU General Public License
00019  * along with this program. If not, see <http://www.gnu.org/licenses/>.
00020  */
00021 
00022 /**
00023  * Copyright (C) 2008 iRex Technologies B.V.
00024  * All rights reserved.
00025  */
00026 
00027 #ifndef IMAGES_PLUGIN_RENDER_RESULT_H_
00028 #define IMAGES_PLUGIN_RENDER_RESULT_H_
00029 
00030 #include "plugin_inc.h"
00031 #include "signal_slot.h"
00032 #include "interfaces_utils.h"
00033 #include "images_renderer.h"
00034 
00035 using namespace utils;
00036 
00037 namespace images
00038 {
00039 
00040 class PluginRenderSettingsImpl;
00041 
00042 class PluginRenderResultImpl : public IPluginUnknown
00043                              , public IPluginRenderResult
00044                              , public IPluginRenderSettings
00045                              , public IPluginZoom
00046                              , public IPluginRotation
00047 {
00048 public:
00049     PluginRenderResultImpl(void);
00050     ~PluginRenderResultImpl(void);
00051 
00052 public:
00053     void set_page(ImagePage * p);
00054 
00055 public:
00056     Signal<PluginRenderResultImpl *> release_signal;
00057 
00058 private:
00059     // IPluginUnknown
00060     static PluginStatus query_interface_impl(
00061         IPluginUnknown    *thiz,
00062         const UDSString   *id, 
00063         void              **ptr );
00064 
00065     static int release_impl(
00066         IPluginUnknown  *thiz );
00067 
00068     // IPluginRenderResult 
00069     static PluginStatus get_bitmap_attributes_impl(
00070         IPluginUnknown         *thiz, 
00071         PluginBitmapAttributes *attributes);
00072 
00073     static PluginStatus get_anchor_from_coordinates_impl(
00074         IPluginUnknown *thiz,
00075         const int      x,
00076         const int      y,
00077         UDSString      *anchor );
00078 
00079     static IPluginUnknown* get_bounding_rectangles_from_range_impl(
00080         IPluginUnknown      *thiz,
00081         const PluginRange   *range);
00082 
00083     static PluginStatus get_rendered_range_impl(
00084         IPluginUnknown *thiz,
00085         PluginRange    *range);
00086 
00087     // IPluginZoom
00088     static PluginStatus set_zoom_factor_impl(
00089         IPluginUnknown* thiz,
00090         const float zoom_factor );
00091 
00092     static float get_zoom_factor_impl(
00093         IPluginUnknown* thiz );
00094 
00095     // IPluginRotation
00096     static PluginStatus set_rotation_impl(
00097         IPluginUnknown               *thiz,
00098         const PluginRotationDegree   rotation );
00099     
00100     static PluginRotationDegree get_rotation_impl(
00101         IPluginUnknown  *thiz );
00102 
00103 private:
00104     typedef PluginRenderResultImpl * RenderResultPtr;
00105     static utils::ObjectTable<PluginRenderResultImpl> g_instances_table;
00106 
00107     ImagePage *page;     // Render result. 
00108 };
00109 
00110 };  // namespace images
00111 
00112 #endif
00113 
Generated by  doxygen 1.6.2-20100208