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 <sfx2/sidebar/GridLayouter.hxx> 29 #include <vcl/fixed.hxx> 30 #include <boost/scoped_ptr.hpp> 31 32 class FixedText; 33 class MetricField; 34 class ListBox; 35 class FloatingWindow; 36 37 38 namespace svx { namespace sidebar { 39 40 class GraphicPropertyPanel 41 : public Control, 42 public ::sfx2::sidebar::ControllerItem::ItemUpdateReceiverInterface 43 { 44 public: 45 static GraphicPropertyPanel* Create( 46 Window* pParent, 47 const cssu::Reference<css::frame::XFrame>& rxFrame, 48 SfxBindings* pBindings); 49 50 virtual void DataChanged( 51 const DataChangedEvent& rEvent); 52 53 virtual void NotifyItemUpdate( 54 const sal_uInt16 nSId, 55 const SfxItemState eState, 56 const SfxPoolItem* pState, 57 const bool bIsEnabled); 58 59 SfxBindings* GetBindings(); 60 61 virtual void Resize (void); 62 63 private: 64 //ui controls 65 ::boost::scoped_ptr< FixedText > mpFtBrightness; 66 ::boost::scoped_ptr< MetricField > mpMtrBrightness; 67 ::boost::scoped_ptr< FixedText > mpFtContrast; 68 ::boost::scoped_ptr< MetricField > mpMtrContrast; 69 ::boost::scoped_ptr< FixedText > mpFtColorMode; 70 ::boost::scoped_ptr< ListBox > mpLBColorMode; 71 ::boost::scoped_ptr< FixedText > mpFtTrans; 72 ::boost::scoped_ptr< MetricField > mpMtrTrans; 73 ::boost::scoped_ptr< MetricField > mpMtrRed; 74 ::boost::scoped_ptr< MetricField > mpMtrGreen; 75 ::boost::scoped_ptr< MetricField > mpMtrBlue; 76 ::boost::scoped_ptr< MetricField > mpMtrGamma; 77 78 ::sfx2::sidebar::ControllerItem maBrightControl; 79 ::sfx2::sidebar::ControllerItem maContrastControl; 80 ::sfx2::sidebar::ControllerItem maTransparenceControl; 81 ::sfx2::sidebar::ControllerItem maRedControl; 82 ::sfx2::sidebar::ControllerItem maGreenControl; 83 ::sfx2::sidebar::ControllerItem maBlueControl; 84 ::sfx2::sidebar::ControllerItem maGammaControl; 85 ::sfx2::sidebar::ControllerItem maModeControl; 86 87 Image maImgNormal; 88 Image maImgBW; 89 Image maImgGray; 90 Image maImgWater; 91 92 FixedImage maImgRed; 93 FixedImage maImgGreen; 94 FixedImage maImgBlue; 95 FixedImage maImgGamma; 96 97 String msNormal; 98 String msBW; 99 String msGray; 100 String msWater; 101 102 cssu::Reference<css::frame::XFrame> mxFrame; 103 SfxBindings* mpBindings; 104 ::sfx2::sidebar::GridLayouter maLayouter; 105 106 DECL_LINK( ModifyBrightnessHdl, void * ); 107 DECL_LINK( ModifyContrastHdl, void * ); 108 DECL_LINK( ModifyTransHdl, void * ); 109 DECL_LINK( ClickColorModeHdl, ToolBox * ); 110 DECL_LINK( ImplPopupModeEndHdl, FloatingWindow* ); 111 DECL_LINK( RedHdl, void*); 112 DECL_LINK( GreenHdl, void*); 113 DECL_LINK( BlueHdl, void*); 114 DECL_LINK( GammaHdl, void*); 115 116 // constructor/destuctor 117 GraphicPropertyPanel( 118 Window* pParent, 119 const cssu::Reference<css::frame::XFrame>& rxFrame, 120 SfxBindings* pBindings); 121 virtual ~GraphicPropertyPanel(); 122 123 void SetupIcons(void); 124 void Initialize(); 125 }; 126 127 128 } } // end of namespace ::svx::sidebar 129 130 #endif 131 132 // eof 133