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 SW_SIDEBAR_WRAP_PROPERTY_PANEL_HXX 23 #define SW_SIDEBAR_WRAP_PROPERTY_PANEL_HXX 24 25 #include <vcl/button.hxx> 26 #include <vcl/image.hxx> 27 28 #include <sfx2/sidebar/ControllerItem.hxx> 29 #include <com/sun/star/frame/XFrame.hpp> 30 31 #include <boost/scoped_ptr.hpp> 32 33 34 namespace sw { namespace sidebar { 35 36 class WrapPropertyPanel 37 : public Control 38 , public ::sfx2::sidebar::ControllerItem::ItemUpdateReceiverInterface 39 { 40 public: 41 static WrapPropertyPanel* Create( 42 Window* pParent, 43 const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame>& rxFrame, 44 SfxBindings* pBindings ); 45 46 // interface of ::sfx2::sidebar::ControllerItem::ItemUpdateReceiverInterface 47 virtual void NotifyItemUpdate( 48 const sal_uInt16 nSId, 49 const SfxItemState eState, 50 const SfxPoolItem* pState ); 51 52 private: 53 WrapPropertyPanel( 54 Window* pParent, 55 const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rxFrame, 56 SfxBindings* pBindings ); 57 58 virtual ~WrapPropertyPanel(); 59 60 ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > mxFrame; 61 SfxBindings* mpBindings; 62 63 ::boost::scoped_ptr<ImageRadioButton> mpRBNoWrap; 64 ::boost::scoped_ptr<ImageRadioButton> mpRBWrapLeft; 65 ::boost::scoped_ptr<ImageRadioButton> mpRBWrapRight; 66 ::boost::scoped_ptr<ImageRadioButton> mpRBWrapParallel; 67 ::boost::scoped_ptr<ImageRadioButton> mpRBWrapThrough; 68 ::boost::scoped_ptr<ImageRadioButton> mpRBIdealWrap; 69 70 //Image resource. 71 ImageList aWrapIL; 72 ImageList aWrapILH; 73 74 //Controler Items================================== 75 ::sfx2::sidebar::ControllerItem maSwNoWrapControl; 76 ::sfx2::sidebar::ControllerItem maSwWrapLeftControl; 77 ::sfx2::sidebar::ControllerItem maSwWrapRightControl; 78 ::sfx2::sidebar::ControllerItem maSwWrapParallelControl; 79 ::sfx2::sidebar::ControllerItem maSwWrapThroughControl; 80 ::sfx2::sidebar::ControllerItem maSwWrapIdealControl; 81 82 void Initialize(); 83 84 DECL_LINK(WrapTypeHdl, void*); 85 }; 86 87 } } // end of namespace ::sw::sidebar 88 89 #endif 90