1*01aa44aaSAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*01aa44aaSAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*01aa44aaSAndrew Rist * or more contributor license agreements. See the NOTICE file 5*01aa44aaSAndrew Rist * distributed with this work for additional information 6*01aa44aaSAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*01aa44aaSAndrew Rist * to you under the Apache License, Version 2.0 (the 8*01aa44aaSAndrew Rist * "License"); you may not use this file except in compliance 9*01aa44aaSAndrew Rist * with the License. You may obtain a copy of the License at 10*01aa44aaSAndrew Rist * 11*01aa44aaSAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*01aa44aaSAndrew Rist * 13*01aa44aaSAndrew Rist * Unless required by applicable law or agreed to in writing, 14*01aa44aaSAndrew Rist * software distributed under the License is distributed on an 15*01aa44aaSAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*01aa44aaSAndrew Rist * KIND, either express or implied. See the License for the 17*01aa44aaSAndrew Rist * specific language governing permissions and limitations 18*01aa44aaSAndrew Rist * under the License. 19*01aa44aaSAndrew Rist * 20*01aa44aaSAndrew Rist *************************************************************/ 21*01aa44aaSAndrew Rist 22*01aa44aaSAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir #ifndef SVT_TABLAYOUTER_HXX 25cdf0e10cSrcweir #define SVT_TABLAYOUTER_HXX 26cdf0e10cSrcweir 27cdf0e10cSrcweir #include "svtools/svtdllapi.h" 28cdf0e10cSrcweir #include "svtools/toolpanel/decklayouter.hxx" 29cdf0e10cSrcweir #include "svtools/toolpanel/tabalignment.hxx" 30cdf0e10cSrcweir #include "svtools/toolpanel/tabitemcontent.hxx" 31cdf0e10cSrcweir #include "svtools/toolpanel/refbase.hxx" 32cdf0e10cSrcweir 33cdf0e10cSrcweir #include <memory> 34cdf0e10cSrcweir 35cdf0e10cSrcweir #include <boost/noncopyable.hpp> 36cdf0e10cSrcweir 37cdf0e10cSrcweir class Window; 38cdf0e10cSrcweir 39cdf0e10cSrcweir //........................................................................ 40cdf0e10cSrcweir namespace svt 41cdf0e10cSrcweir { 42cdf0e10cSrcweir //........................................................................ 43cdf0e10cSrcweir 44cdf0e10cSrcweir class IToolPanelDeck; 45cdf0e10cSrcweir 46cdf0e10cSrcweir struct TabDeckLayouter_Data; 47cdf0e10cSrcweir 48cdf0e10cSrcweir //==================================================================== 49cdf0e10cSrcweir //= TabDeckLayouter 50cdf0e10cSrcweir //==================================================================== 51cdf0e10cSrcweir class SVT_DLLPUBLIC TabDeckLayouter :public RefBase 52cdf0e10cSrcweir ,public IDeckLayouter 53cdf0e10cSrcweir ,public ::boost::noncopyable 54cdf0e10cSrcweir { 55cdf0e10cSrcweir public: 56cdf0e10cSrcweir /** creates a new layouter 57cdf0e10cSrcweir @param i_rParent 58cdf0e10cSrcweir is the parent window for any VCL windows the layouter needs to create. 59cdf0e10cSrcweir @param i_rPanels 60cdf0e10cSrcweir is the panel deck which the layouter is responsible for. 61cdf0e10cSrcweir @param i_eAlignment 62cdf0e10cSrcweir specifies the alignment of the panel selector 63cdf0e10cSrcweir @param TabItemContent 64cdf0e10cSrcweir specifies the content to show on the tab items 65cdf0e10cSrcweir */ 66cdf0e10cSrcweir TabDeckLayouter( 67cdf0e10cSrcweir Window& i_rParent, 68cdf0e10cSrcweir IToolPanelDeck& i_rPanels, 69cdf0e10cSrcweir const TabAlignment i_eAlignment, 70cdf0e10cSrcweir const TabItemContent i_eItemContent 71cdf0e10cSrcweir ); 72cdf0e10cSrcweir ~TabDeckLayouter(); 73cdf0e10cSrcweir 74cdf0e10cSrcweir // attribute access 75cdf0e10cSrcweir TabItemContent GetTabItemContent() const; 76cdf0e10cSrcweir void SetTabItemContent( const TabItemContent& i_eItemContent ); 77cdf0e10cSrcweir TabAlignment GetTabAlignment() const; 78cdf0e10cSrcweir 79cdf0e10cSrcweir // helpers for the A11Y implementation 80cdf0e10cSrcweir ::boost::optional< size_t > 81cdf0e10cSrcweir GetFocusedPanelItem() const; 82cdf0e10cSrcweir void FocusPanelItem( const size_t i_nItemPos ); 83cdf0e10cSrcweir bool IsPanelSelectorEnabled() const; 84cdf0e10cSrcweir bool IsPanelSelectorVisible() const; 85cdf0e10cSrcweir Rectangle GetItemScreenRect( const size_t i_nItemPos ) const; 86cdf0e10cSrcweir 87cdf0e10cSrcweir // IDeckLayouter 88cdf0e10cSrcweir virtual Rectangle Layout( const Rectangle& i_rDeckPlayground ); 89cdf0e10cSrcweir virtual void Destroy(); 90cdf0e10cSrcweir virtual void SetFocusToPanelSelector(); 91cdf0e10cSrcweir virtual size_t GetAccessibleChildCount() const; 92cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > 93cdf0e10cSrcweir GetAccessibleChild( 94cdf0e10cSrcweir const size_t i_nChildIndex, 95cdf0e10cSrcweir const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& i_rParentAccessible 96cdf0e10cSrcweir ); 97cdf0e10cSrcweir 98cdf0e10cSrcweir // IReference 99cdf0e10cSrcweir DECLARE_IREFERENCE() 100cdf0e10cSrcweir 101cdf0e10cSrcweir private: 102cdf0e10cSrcweir ::std::auto_ptr< TabDeckLayouter_Data > m_pData; 103cdf0e10cSrcweir }; 104cdf0e10cSrcweir 105cdf0e10cSrcweir //........................................................................ 106cdf0e10cSrcweir } // namespace svt 107cdf0e10cSrcweir //........................................................................ 108cdf0e10cSrcweir 109cdf0e10cSrcweir #endif // SVT_TABLAYOUTER_HXX 110