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