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, 60*45da7d5eSAndre Fischer const SfxPoolItem* pState, 61*45da7d5eSAndre Fischer const bool bIsEnabled); 62facb16e7SArmin Le Grand 63facb16e7SArmin Le Grand SfxBindings* GetBindings(); 64facb16e7SArmin Le Grand 65facb16e7SArmin Le Grand private: 66facb16e7SArmin Le Grand //ui controls 6737fee4fdSAndre Fischer ::boost::scoped_ptr<Window> mpTBHorizontalBackground; 68facb16e7SArmin Le Grand ::boost::scoped_ptr< ToolBox > mpTBHorizontal; 6937fee4fdSAndre Fischer ::boost::scoped_ptr<Window> mpTBVerticalBackground; 70facb16e7SArmin Le Grand ::boost::scoped_ptr< ToolBox > mpTBVertical; 71facb16e7SArmin Le Grand ::boost::scoped_ptr< FixedText > mpFTLeftIndent; 72facb16e7SArmin Le Grand ::boost::scoped_ptr< MetricField > mpMFLeftIndent; 73facb16e7SArmin Le Grand ::boost::scoped_ptr< CheckBox > mpCBXWrapText; 74facb16e7SArmin Le Grand ::boost::scoped_ptr< CheckBox > mpCBXMergeCell; 75facb16e7SArmin Le Grand ::boost::scoped_ptr< FixedText > mpFtRotate; 76facb16e7SArmin Le Grand ::boost::scoped_ptr< svx::sidebar::SidebarDialControl > mpCtrlDial; 77facb16e7SArmin Le Grand ::boost::scoped_ptr< MetricBox > mpMtrAngle; 78facb16e7SArmin Le Grand ::boost::scoped_ptr< CheckBox > mpCbStacked; 79facb16e7SArmin Le Grand 80facb16e7SArmin Le Grand ::sfx2::sidebar::ControllerItem maAlignHorControl; 81facb16e7SArmin Le Grand ::sfx2::sidebar::ControllerItem maAlignVerControl; 82facb16e7SArmin Le Grand ::sfx2::sidebar::ControllerItem maLeftIndentControl; 83facb16e7SArmin Le Grand ::sfx2::sidebar::ControllerItem maMergeCellControl; 84facb16e7SArmin Le Grand ::sfx2::sidebar::ControllerItem maWrapTextControl; 85facb16e7SArmin Le Grand ::sfx2::sidebar::ControllerItem maAngleControl; 86facb16e7SArmin Le Grand ::sfx2::sidebar::ControllerItem maStackControl; 87facb16e7SArmin Le Grand 88facb16e7SArmin Le Grand Image maIMGAlignLeft; 89facb16e7SArmin Le Grand Image maIMGAlignCenter; 90facb16e7SArmin Le Grand Image maIMGAlignRight; 91facb16e7SArmin Le Grand Image maIMGAlignJust; 92facb16e7SArmin Le Grand Image maIMGAlignTop; 93facb16e7SArmin Le Grand Image maIMGAlignCenterV; 94facb16e7SArmin Le Grand Image maIMGAlignBottom; 95facb16e7SArmin Le Grand 96facb16e7SArmin Le Grand SvxCellHorJustify meHorAlignState; 97facb16e7SArmin Le Grand SvxCellVerJustify meVerAlignState; 98facb16e7SArmin Le Grand 99facb16e7SArmin Le Grand /// bitfield 100facb16e7SArmin Le Grand bool mbMultiDisable : 1; 101facb16e7SArmin Le Grand 102facb16e7SArmin Le Grand cssu::Reference<css::frame::XFrame> mxFrame; 103facb16e7SArmin Le Grand ::sfx2::sidebar::EnumContext maContext; 104facb16e7SArmin Le Grand SfxBindings* mpBindings; 105facb16e7SArmin Le Grand 106facb16e7SArmin Le Grand DECL_LINK( TbxHorAlignSelectHdl, ToolBox* ); 107facb16e7SArmin Le Grand DECL_LINK( TbxVerAlignSelectHdl, ToolBox* ); 108facb16e7SArmin Le Grand DECL_LINK( MFLeftIndentMdyHdl, void * ); 109facb16e7SArmin Le Grand DECL_LINK( CBOXMergnCellClkHdl, void * ); 110facb16e7SArmin Le Grand DECL_LINK( CBOXWrapTextClkHdl, void * ); 111facb16e7SArmin Le Grand DECL_LINK( AngleModifiedHdl, void * ); 112facb16e7SArmin Le Grand DECL_LINK( RotationHdl, void * ); 113facb16e7SArmin Le Grand DECL_LINK( ClickStackHdl, void * ); 114facb16e7SArmin Le Grand 115facb16e7SArmin Le Grand // constructor/destuctor 116facb16e7SArmin Le Grand AlignmentPropertyPanel( 117facb16e7SArmin Le Grand Window* pParent, 118facb16e7SArmin Le Grand const cssu::Reference<css::frame::XFrame>& rxFrame, 119facb16e7SArmin Le Grand SfxBindings* pBindings); 120facb16e7SArmin Le Grand virtual ~AlignmentPropertyPanel(); 121facb16e7SArmin Le Grand 122facb16e7SArmin Le Grand void Initialize(); 123facb16e7SArmin Le Grand void UpdateHorAlign(); 124facb16e7SArmin Le Grand void UpdateVerAlign(); 125facb16e7SArmin Le Grand void FormatDegrees(double& dTmp); 126facb16e7SArmin Le Grand }; 127facb16e7SArmin Le Grand 128facb16e7SArmin Le Grand } } // end of namespace ::sc::sidebar 129facb16e7SArmin Le Grand 130facb16e7SArmin Le Grand #endif 131facb16e7SArmin Le Grand // eof 132