plaintext/plugin_impl/render_result_impl.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #ifndef TEXT_PLUGIN_RENDER_RESULT_H_
00028 #define TEXT_PLUGIN_RENDER_RESULT_H_
00029
00030 #include "plugin_inc.h"
00031 #include "signal_slot.h"
00032 #include "text_base_types.h"
00033 #include "interfaces_utils.h"
00034
00035 using namespace utils;
00036
00037 namespace text
00038 {
00039
00040 class PluginViewImpl;
00041 class PluginRenderSettingsImpl;
00042
00043 class PluginRenderResultImpl : public IPluginUnknown
00044 , public IPluginRenderResult
00045 , public IPluginRenderSettings
00046
00047
00048 {
00049 public:
00050 PluginRenderResultImpl(PluginViewImpl *view,
00051 const PluginBitmapAttributes&,
00052 const unsigned long id,
00053 PluginRenderSettingsImpl * settings);
00054 ~PluginRenderResultImpl(void);
00055
00056 public:
00057 void set_render_result_range(const Position& start, const Position& end)
00058 {
00059 page_range.start = start;
00060 page_range.end = end;
00061 }
00062 Signal<PluginRenderResultImpl *> release_signal;
00063
00064 private:
00065
00066 static PluginStatus query_interface_impl(
00067 IPluginUnknown *thiz,
00068 const UDSString *id,
00069 void **ptr );
00070
00071 static int release_impl(
00072 IPluginUnknown *thiz );
00073
00074
00075 static PluginStatus get_bitmap_attributes_impl(
00076 IPluginUnknown *thiz,
00077 PluginBitmapAttributes *attributes);
00078
00079 static PluginStatus get_anchor_from_coordinates_impl(
00080 IPluginUnknown *thiz,
00081 const int x,
00082 const int y,
00083 UDSString *anchor );
00084
00085 static IPluginUnknown* get_bounding_rectangles_from_range_impl(
00086 IPluginUnknown *thiz,
00087 const PluginRange *range);
00088
00089 static PluginStatus get_rendered_range_impl(
00090 IPluginUnknown *thiz,
00091 PluginRange *range);
00092
00093
00094
00095
00096 private:
00097 PluginViewImpl *view_impl;
00098 typedef PluginRenderResultImpl * RenderResultPtr;
00099 static utils::ObjectTable<PluginRenderResultImpl> g_instances_table;
00100
00101 PluginBitmapAttributes atts;
00102 unsigned long ref_id;
00103 Range page_range;
00104 PluginRenderSettingsImpl *settings;
00105 };
00106
00107 };
00108
00109 #endif
00110