00001 /* 00002 * File Name: render_settings_impl.h 00003 */ 00004 00005 /* 00006 * This file is part of uds-plugin-pdf. 00007 * 00008 * uds-plugin-pdf 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-pdf 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 PDF_PLUGIN_RENDER_SETTINGS_IMPL_H_ 00028 #define PDF_PLUGIN_RENDER_SETTINGS_IMPL_H_ 00029 00030 #include <vector> 00031 #include "plugin_inc.h" 00032 #include "signal_slot.h" 00033 #include "interfaces_utils.h" 00034 #include "pdf_page.h" 00035 00036 using namespace utils; 00037 00038 namespace pdf 00039 { 00040 00041 class PluginRenderSettingsImpl : public IPluginUnknown 00042 , public IPluginClone 00043 , public IPluginRenderSettings 00044 , public IPluginZoom 00045 , public IPluginRotation 00046 { 00047 public: 00048 PluginRenderSettingsImpl(void); 00049 PluginRenderSettingsImpl(const PluginRenderSettingsImpl &ref); 00050 ~PluginRenderSettingsImpl(void); 00051 00052 double zoom() const {return attr.get_zoom_setting();} 00053 00054 double rotation() const {return attr.get_rotate();} 00055 00056 const PDFRenderAttributes& get_render_attr() const {return attr;} 00057 00058 static PluginRenderSettingsImpl * query_instance(IPluginUnknown * thiz); 00059 00060 public: 00061 utils::Signal<PluginRenderSettingsImpl *> release_signal; 00062 00063 private: 00064 static PluginStatus query_interface_impl( 00065 IPluginUnknown *thiz, 00066 const UDSString *id, 00067 void **ptr); 00068 00069 static int release_impl( 00070 IPluginUnknown *thiz); 00071 00072 static IPluginUnknown* create_clone_object_impl( 00073 IPluginUnknown *thiz); 00074 00075 static PluginStatus set_zoom_factor_impl( 00076 IPluginUnknown* thiz, 00077 const float zoom_factor ); 00078 00079 static float get_zoom_factor_impl( 00080 IPluginUnknown* thiz ); 00081 00082 static PluginStatus set_rotation_impl( 00083 IPluginUnknown *thiz, 00084 const PluginRotationDegree rotation); 00085 00086 static PluginRotationDegree get_rotation_impl( 00087 IPluginUnknown *thiz ); 00088 00089 private: 00090 static utils::ObjectTable<PluginRenderSettingsImpl> g_instances_table; 00091 00092 private: 00093 // the render attributes 00094 PDFRenderAttributes attr; 00095 00096 }; 00097 00098 }; // namespace pdf 00099 00100 #endif 00101