1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 #ifndef SVX_PROPERTYPANEL_GRAPHICPAGE_HXX 23 #define SVX_PROPERTYPANEL_GRAPHICPAGE_HXX 24 25 #include <vcl/ctrl.hxx> 26 #include <sfx2/sidebar/SidebarPanelBase.hxx> 27 #include <sfx2/sidebar/ControllerItem.hxx> 28 #include <vcl/fixed.hxx> 29 #include <boost/scoped_ptr.hpp> 30 31 class FixedText; 32 class MetricField; 33 class ListBox; 34 class FloatingWindow; 35 36 37 namespace svx { namespace sidebar { 38 39 class GraphicPropertyPanel 40 : public Control, 41 public ::sfx2::sidebar::ControllerItem::ItemUpdateReceiverInterface 42 { 43 public: 44 static GraphicPropertyPanel* Create( 45 Window* pParent, 46 const cssu::Reference<css::frame::XFrame>& rxFrame, 47 SfxBindings* pBindings); 48 49 virtual void DataChanged( 50 const DataChangedEvent& rEvent); 51 52 virtual void NotifyItemUpdate( 53 const sal_uInt16 nSId, 54 const SfxItemState eState, 55 const SfxPoolItem* pState); 56 57 SfxBindings* GetBindings(); 58 59 private: 60 //ui controls 61 ::boost::scoped_ptr< FixedText > mpFtBrightness; 62 ::boost::scoped_ptr< MetricField > mpMtrBrightness; 63 ::boost::scoped_ptr< FixedText > mpFtContrast; 64 ::boost::scoped_ptr< MetricField > mpMtrContrast; 65 ::boost::scoped_ptr< FixedText > mpFtColorMode; 66 ::boost::scoped_ptr< ListBox > mpLBColorMode; 67 ::boost::scoped_ptr< FixedText > mpFtTrans; 68 ::boost::scoped_ptr< MetricField > mpMtrTrans; 69 ::boost::scoped_ptr< MetricField > mpMtrRed; 70 ::boost::scoped_ptr< MetricField > mpMtrGreen; 71 ::boost::scoped_ptr< MetricField > mpMtrBlue; 72 ::boost::scoped_ptr< MetricField > mpMtrGamma; 73 74 ::sfx2::sidebar::ControllerItem maBrightControl; 75 ::sfx2::sidebar::ControllerItem maContrastControl; 76 ::sfx2::sidebar::ControllerItem maTransparenceControl; 77 ::sfx2::sidebar::ControllerItem maRedControl; 78 ::sfx2::sidebar::ControllerItem maGreenControl; 79 ::sfx2::sidebar::ControllerItem maBlueControl; 80 ::sfx2::sidebar::ControllerItem maGammaControl; 81 ::sfx2::sidebar::ControllerItem maModeControl; 82 83 Image maImgNormal; 84 Image maImgBW; 85 Image maImgGray; 86 Image maImgWater; 87 88 FixedImage maImgRed; 89 FixedImage maImgGreen; 90 FixedImage maImgBlue; 91 FixedImage maImgGamma; 92 93 String msNormal; 94 String msBW; 95 String msGray; 96 String msWater; 97 98 cssu::Reference<css::frame::XFrame> mxFrame; 99 SfxBindings* mpBindings; 100 101 DECL_LINK( ModifyBrightnessHdl, void * ); 102 DECL_LINK( ModifyContrastHdl, void * ); 103 DECL_LINK( ModifyTransHdl, void * ); 104 DECL_LINK( ClickColorModeHdl, ToolBox * ); 105 DECL_LINK( ImplPopupModeEndHdl, FloatingWindow* ); 106 DECL_LINK( RedHdl, void*); 107 DECL_LINK( GreenHdl, void*); 108 DECL_LINK( BlueHdl, void*); 109 DECL_LINK( GammaHdl, void*); 110 111 // constructor/destuctor 112 GraphicPropertyPanel( 113 Window* pParent, 114 const cssu::Reference<css::frame::XFrame>& rxFrame, 115 SfxBindings* pBindings); 116 virtual ~GraphicPropertyPanel(); 117 118 void SetupIcons(void); 119 void Initialize(); 120 }; 121 122 123 } } // end of namespace ::svx::sidebar 124 125 #endif 126 127 // eof 128