1facb16e7SArmin Le Grand /************************************************************** 2facb16e7SArmin Le Grand * 3facb16e7SArmin Le Grand * Licensed to the Apache Software Foundation (ASF) under one 4facb16e7SArmin Le Grand * or more contributor license agreements. See the NOTICE file 5facb16e7SArmin Le Grand * distributed with this work for additional information 6facb16e7SArmin Le Grand * regarding copyright ownership. The ASF licenses this file 7facb16e7SArmin Le Grand * to you under the Apache License, Version 2.0 (the 8facb16e7SArmin Le Grand * "License"); you may not use this file except in compliance 9facb16e7SArmin Le Grand * with the License. You may obtain a copy of the License at 10facb16e7SArmin Le Grand * 11facb16e7SArmin Le Grand * http://www.apache.org/licenses/LICENSE-2.0 12facb16e7SArmin Le Grand * 13facb16e7SArmin Le Grand * Unless required by applicable law or agreed to in writing, 14facb16e7SArmin Le Grand * software distributed under the License is distributed on an 15facb16e7SArmin Le Grand * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16facb16e7SArmin Le Grand * KIND, either express or implied. See the License for the 17facb16e7SArmin Le Grand * specific language governing permissions and limitations 18facb16e7SArmin Le Grand * under the License. 19facb16e7SArmin Le Grand * 20facb16e7SArmin Le Grand *************************************************************/ 21facb16e7SArmin Le Grand 22facb16e7SArmin Le Grand #ifndef SC_PROPERTYPANEL_ALIGNMENT_HXX 23facb16e7SArmin Le Grand #define SC_PROPERTYPANEL_ALIGNMENT_HXX 24facb16e7SArmin Le Grand 25facb16e7SArmin Le Grand #include <sfx2/sidebar/SidebarPanelBase.hxx> 26facb16e7SArmin Le Grand #include <sfx2/sidebar/ControllerItem.hxx> 27facb16e7SArmin Le Grand #include <sfx2/sidebar/IContextChangeReceiver.hxx> 28facb16e7SArmin Le Grand #include <vcl/fixed.hxx> 29facb16e7SArmin Le Grand #include <boost/scoped_ptr.hpp> 30facb16e7SArmin Le Grand #include <editeng/svxenum.hxx> 31facb16e7SArmin Le Grand 32facb16e7SArmin Le Grand class ToolBox; 33facb16e7SArmin Le Grand class MetricField; 34facb16e7SArmin Le Grand class MetricBox; 35facb16e7SArmin Le Grand class CheckBox; 36facb16e7SArmin Le Grand namespace svx { namespace sidebar { class SidebarDialControl; }} 37facb16e7SArmin Le Grand 38facb16e7SArmin Le Grand namespace sc { namespace sidebar { 39facb16e7SArmin Le Grand 40facb16e7SArmin Le Grand class AlignmentPropertyPanel 41facb16e7SArmin Le Grand : public Control, 42facb16e7SArmin Le Grand public ::sfx2::sidebar::IContextChangeReceiver, 43facb16e7SArmin Le Grand public ::sfx2::sidebar::ControllerItem::ItemUpdateReceiverInterface 44facb16e7SArmin Le Grand { 45facb16e7SArmin Le Grand public: 46facb16e7SArmin Le Grand static AlignmentPropertyPanel* Create( 47facb16e7SArmin Le Grand Window* pParent, 48facb16e7SArmin Le Grand const cssu::Reference<css::frame::XFrame>& rxFrame, 49facb16e7SArmin Le Grand SfxBindings* pBindings); 50facb16e7SArmin Le Grand 51facb16e7SArmin Le Grand virtual void DataChanged( 52facb16e7SArmin Le Grand const DataChangedEvent& rEvent); 53facb16e7SArmin Le Grand 54facb16e7SArmin Le Grand virtual void HandleContextChange( 55facb16e7SArmin Le Grand const ::sfx2::sidebar::EnumContext aContext); 56facb16e7SArmin Le Grand 57facb16e7SArmin Le Grand virtual void NotifyItemUpdate( 58facb16e7SArmin Le Grand const sal_uInt16 nSId, 59facb16e7SArmin Le Grand const SfxItemState eState, 60facb16e7SArmin Le Grand const SfxPoolItem* pState); 61facb16e7SArmin Le Grand 62facb16e7SArmin Le Grand SfxBindings* GetBindings(); 63facb16e7SArmin Le Grand 64facb16e7SArmin Le Grand private: 65facb16e7SArmin Le Grand //ui controls 66*37fee4fdSAndre Fischer ::boost::scoped_ptr<Window> mpTBHorizontalBackground; 67facb16e7SArmin Le Grand ::boost::scoped_ptr< ToolBox > mpTBHorizontal; 68*37fee4fdSAndre Fischer ::boost::scoped_ptr<Window> mpTBVerticalBackground; 69facb16e7SArmin Le Grand ::boost::scoped_ptr< ToolBox > mpTBVertical; 70facb16e7SArmin Le Grand ::boost::scoped_ptr< FixedText > mpFTLeftIndent; 71facb16e7SArmin Le Grand ::boost::scoped_ptr< MetricField > mpMFLeftIndent; 72facb16e7SArmin Le Grand ::boost::scoped_ptr< CheckBox > mpCBXWrapText; 73facb16e7SArmin Le Grand ::boost::scoped_ptr< CheckBox > mpCBXMergeCell; 74facb16e7SArmin Le Grand ::boost::scoped_ptr< FixedText > mpFtRotate; 75facb16e7SArmin Le Grand ::boost::scoped_ptr< svx::sidebar::SidebarDialControl > mpCtrlDial; 76facb16e7SArmin Le Grand ::boost::scoped_ptr< MetricBox > mpMtrAngle; 77facb16e7SArmin Le Grand ::boost::scoped_ptr< CheckBox > mpCbStacked; 78facb16e7SArmin Le Grand 79facb16e7SArmin Le Grand ::sfx2::sidebar::ControllerItem maAlignHorControl; 80facb16e7SArmin Le Grand ::sfx2::sidebar::ControllerItem maAlignVerControl; 81facb16e7SArmin Le Grand ::sfx2::sidebar::ControllerItem maLeftIndentControl; 82facb16e7SArmin Le Grand ::sfx2::sidebar::ControllerItem maMergeCellControl; 83facb16e7SArmin Le Grand ::sfx2::sidebar::ControllerItem maWrapTextControl; 84facb16e7SArmin Le Grand ::sfx2::sidebar::ControllerItem maAngleControl; 85facb16e7SArmin Le Grand ::sfx2::sidebar::ControllerItem maStackControl; 86facb16e7SArmin Le Grand 87facb16e7SArmin Le Grand Image maIMGAlignLeft; 88facb16e7SArmin Le Grand Image maIMGAlignCenter; 89facb16e7SArmin Le Grand Image maIMGAlignRight; 90facb16e7SArmin Le Grand Image maIMGAlignJust; 91facb16e7SArmin Le Grand Image maIMGAlignTop; 92facb16e7SArmin Le Grand Image maIMGAlignCenterV; 93facb16e7SArmin Le Grand Image maIMGAlignBottom; 94facb16e7SArmin Le Grand 95facb16e7SArmin Le Grand SvxCellHorJustify meHorAlignState; 96facb16e7SArmin Le Grand SvxCellVerJustify meVerAlignState; 97facb16e7SArmin Le Grand 98facb16e7SArmin Le Grand /// bitfield 99facb16e7SArmin Le Grand bool mbMultiDisable : 1; 100facb16e7SArmin Le Grand 101facb16e7SArmin Le Grand cssu::Reference<css::frame::XFrame> mxFrame; 102facb16e7SArmin Le Grand ::sfx2::sidebar::EnumContext maContext; 103facb16e7SArmin Le Grand SfxBindings* mpBindings; 104facb16e7SArmin Le Grand 105facb16e7SArmin Le Grand DECL_LINK( TbxHorAlignSelectHdl, ToolBox* ); 106facb16e7SArmin Le Grand DECL_LINK( TbxVerAlignSelectHdl, ToolBox* ); 107facb16e7SArmin Le Grand DECL_LINK( MFLeftIndentMdyHdl, void * ); 108facb16e7SArmin Le Grand DECL_LINK( CBOXMergnCellClkHdl, void * ); 109facb16e7SArmin Le Grand DECL_LINK( CBOXWrapTextClkHdl, void * ); 110facb16e7SArmin Le Grand DECL_LINK( AngleModifiedHdl, void * ); 111facb16e7SArmin Le Grand DECL_LINK( RotationHdl, void * ); 112facb16e7SArmin Le Grand DECL_LINK( ClickStackHdl, void * ); 113facb16e7SArmin Le Grand 114facb16e7SArmin Le Grand // constructor/destuctor 115facb16e7SArmin Le Grand AlignmentPropertyPanel( 116facb16e7SArmin Le Grand Window* pParent, 117facb16e7SArmin Le Grand const cssu::Reference<css::frame::XFrame>& rxFrame, 118facb16e7SArmin Le Grand SfxBindings* pBindings); 119facb16e7SArmin Le Grand virtual ~AlignmentPropertyPanel(); 120facb16e7SArmin Le Grand 121facb16e7SArmin Le Grand void Initialize(); 122facb16e7SArmin Le Grand void UpdateHorAlign(); 123facb16e7SArmin Le Grand void UpdateVerAlign(); 124facb16e7SArmin Le Grand void FormatDegrees(double& dTmp); 125facb16e7SArmin Le Grand }; 126facb16e7SArmin Le Grand 127facb16e7SArmin Le Grand } } // end of namespace ::sc::sidebar 128facb16e7SArmin Le Grand 129facb16e7SArmin Le Grand #endif 130facb16e7SArmin Le Grand // eof 131