1*96821c26SAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*96821c26SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*96821c26SAndrew Rist * or more contributor license agreements. See the NOTICE file 5*96821c26SAndrew Rist * distributed with this work for additional information 6*96821c26SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*96821c26SAndrew Rist * to you under the Apache License, Version 2.0 (the 8*96821c26SAndrew Rist * "License"); you may not use this file except in compliance 9*96821c26SAndrew Rist * with the License. You may obtain a copy of the License at 10*96821c26SAndrew Rist * 11*96821c26SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*96821c26SAndrew Rist * 13*96821c26SAndrew Rist * Unless required by applicable law or agreed to in writing, 14*96821c26SAndrew Rist * software distributed under the License is distributed on an 15*96821c26SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*96821c26SAndrew Rist * KIND, either express or implied. See the License for the 17*96821c26SAndrew Rist * specific language governing permissions and limitations 18*96821c26SAndrew Rist * under the License. 19*96821c26SAndrew Rist * 20*96821c26SAndrew Rist *************************************************************/ 21*96821c26SAndrew Rist 22*96821c26SAndrew Rist 23cdf0e10cSrcweir #ifndef _BASIDE_TBXCTL_HXX 24cdf0e10cSrcweir #define _BASIDE_TBXCTL_HXX 25cdf0e10cSrcweir 26cdf0e10cSrcweir #include <sfx2/tbxctrl.hxx> 27cdf0e10cSrcweir #include <com/sun/star/frame/XLayoutManager.hpp> 28cdf0e10cSrcweir 29cdf0e10cSrcweir /* 30cdf0e10cSrcweir #ifdef _BASIDE_POPUPWINDOWTBX 31cdf0e10cSrcweir 32cdf0e10cSrcweir // class PopupWindowTbx -------------------------------------------------- 33cdf0e10cSrcweir 34cdf0e10cSrcweir class PopupWindowTbx : public SfxPopupWindow 35cdf0e10cSrcweir { 36cdf0e10cSrcweir private: 37cdf0e10cSrcweir SfxToolBoxManager aTbx; 38cdf0e10cSrcweir Link aSelectLink; 39cdf0e10cSrcweir 40cdf0e10cSrcweir DECL_LINK( SelectHdl, void* ); 41cdf0e10cSrcweir 42cdf0e10cSrcweir public: 43cdf0e10cSrcweir PopupWindowTbx( sal_uInt16 nId, WindowAlign eAlign, 44cdf0e10cSrcweir ResId aRIdWin, ResId aRIdTbx, SfxBindings& rBind ); 45cdf0e10cSrcweir ~PopupWindowTbx(); 46cdf0e10cSrcweir 47cdf0e10cSrcweir void StartSelection() 48cdf0e10cSrcweir { aTbx.GetToolBox().StartSelection(); } 49cdf0e10cSrcweir void Update(); 50cdf0e10cSrcweir 51cdf0e10cSrcweir virtual SfxPopupWindow* Clone() const; 52cdf0e10cSrcweir virtual void PopupModeEnd(); 53cdf0e10cSrcweir }; 54cdf0e10cSrcweir #endif 55cdf0e10cSrcweir */ 56cdf0e10cSrcweir //------------------- 57cdf0e10cSrcweir // class TbxControls 58cdf0e10cSrcweir //------------------- 59cdf0e10cSrcweir class TbxControls : public SfxToolBoxControl 60cdf0e10cSrcweir { 61cdf0e10cSrcweir private: 62cdf0e10cSrcweir 63cdf0e10cSrcweir struct StateChangedInfo 64cdf0e10cSrcweir { 65cdf0e10cSrcweir ::com::sun::star::uno::Reference< ::com::sun::star::frame::XLayoutManager > xLayoutManager; 66cdf0e10cSrcweir bool bDisabled; 67cdf0e10cSrcweir }; 68cdf0e10cSrcweir 69cdf0e10cSrcweir sal_uInt16 nLastSlot; 70cdf0e10cSrcweir 71cdf0e10cSrcweir protected: 72cdf0e10cSrcweir virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState, 73cdf0e10cSrcweir const SfxPoolItem* pState ); 74cdf0e10cSrcweir public: 75cdf0e10cSrcweir SFX_DECL_TOOLBOX_CONTROL(); 76cdf0e10cSrcweir 77cdf0e10cSrcweir TbxControls(sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ); ~TbxControls()78cdf0e10cSrcweir ~TbxControls() {} 79cdf0e10cSrcweir 80cdf0e10cSrcweir virtual SfxPopupWindowType GetPopupWindowType() const; 81cdf0e10cSrcweir virtual SfxPopupWindow* CreatePopupWindow(); 82cdf0e10cSrcweir 83cdf0e10cSrcweir using SfxToolBoxControl::Select; 84cdf0e10cSrcweir void Select( sal_uInt16 nModifier ); 85cdf0e10cSrcweir }; 86cdf0e10cSrcweir 87cdf0e10cSrcweir 88cdf0e10cSrcweir #endif // _BASIDE_TBXCTL_HXX 89cdf0e10cSrcweir 90