1*cdf0e10cSrcweir /************************************************************************* 2*cdf0e10cSrcweir * 3*cdf0e10cSrcweir * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4*cdf0e10cSrcweir * 5*cdf0e10cSrcweir * Copyright 2000, 2010 Oracle and/or its affiliates. 6*cdf0e10cSrcweir * 7*cdf0e10cSrcweir * OpenOffice.org - a multi-platform office productivity suite 8*cdf0e10cSrcweir * 9*cdf0e10cSrcweir * This file is part of OpenOffice.org. 10*cdf0e10cSrcweir * 11*cdf0e10cSrcweir * OpenOffice.org is free software: you can redistribute it and/or modify 12*cdf0e10cSrcweir * it under the terms of the GNU Lesser General Public License version 3 13*cdf0e10cSrcweir * only, as published by the Free Software Foundation. 14*cdf0e10cSrcweir * 15*cdf0e10cSrcweir * OpenOffice.org is distributed in the hope that it will be useful, 16*cdf0e10cSrcweir * but WITHOUT ANY WARRANTY; without even the implied warranty of 17*cdf0e10cSrcweir * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18*cdf0e10cSrcweir * GNU Lesser General Public License version 3 for more details 19*cdf0e10cSrcweir * (a copy is included in the LICENSE file that accompanied this code). 20*cdf0e10cSrcweir * 21*cdf0e10cSrcweir * You should have received a copy of the GNU Lesser General Public License 22*cdf0e10cSrcweir * version 3 along with OpenOffice.org. If not, see 23*cdf0e10cSrcweir * <http://www.openoffice.org/license.html> 24*cdf0e10cSrcweir * for a copy of the LGPLv3 License. 25*cdf0e10cSrcweir * 26*cdf0e10cSrcweir ************************************************************************/ 27*cdf0e10cSrcweir #ifndef _SVX_TBXFORM_HXX 28*cdf0e10cSrcweir #define _SVX_TBXFORM_HXX 29*cdf0e10cSrcweir 30*cdf0e10cSrcweir #include <sfx2/tbxctrl.hxx> 31*cdf0e10cSrcweir #include <vcl/field.hxx> 32*cdf0e10cSrcweir #include <vcl/dialog.hxx> 33*cdf0e10cSrcweir 34*cdf0e10cSrcweir #ifndef _SV_BUTTON_HXX //autogen 35*cdf0e10cSrcweir #include <vcl/button.hxx> 36*cdf0e10cSrcweir #endif 37*cdf0e10cSrcweir 38*cdf0e10cSrcweir //======================================================================== 39*cdf0e10cSrcweir class SvxFmAbsRecWin : public NumericField 40*cdf0e10cSrcweir { 41*cdf0e10cSrcweir SfxToolBoxControl* m_pController; 42*cdf0e10cSrcweir // for invalidating our content whe losing the focus 43*cdf0e10cSrcweir public: 44*cdf0e10cSrcweir SvxFmAbsRecWin( Window* _pParent, SfxToolBoxControl* _pController ); 45*cdf0e10cSrcweir ~SvxFmAbsRecWin(); 46*cdf0e10cSrcweir 47*cdf0e10cSrcweir virtual void KeyInput( const KeyEvent& rKeyEvt ); 48*cdf0e10cSrcweir virtual void LoseFocus(); 49*cdf0e10cSrcweir 50*cdf0e10cSrcweir protected: 51*cdf0e10cSrcweir virtual void FirePosition( sal_Bool _bForce ); 52*cdf0e10cSrcweir }; 53*cdf0e10cSrcweir 54*cdf0e10cSrcweir 55*cdf0e10cSrcweir //======================================================================== 56*cdf0e10cSrcweir class SvxFmConfigWin : public SfxPopupWindow 57*cdf0e10cSrcweir { 58*cdf0e10cSrcweir private: 59*cdf0e10cSrcweir DECL_LINK( TbxSelectHdl, ToolBox* ); 60*cdf0e10cSrcweir 61*cdf0e10cSrcweir public: 62*cdf0e10cSrcweir SvxFmConfigWin( sal_uInt16 nId, ResId aRIdWin, ResId aRIdTbx ); 63*cdf0e10cSrcweir ~SvxFmConfigWin(); 64*cdf0e10cSrcweir 65*cdf0e10cSrcweir void Update(); 66*cdf0e10cSrcweir virtual void PopupModeEnd(); 67*cdf0e10cSrcweir }; 68*cdf0e10cSrcweir 69*cdf0e10cSrcweir 70*cdf0e10cSrcweir //======================================================================== 71*cdf0e10cSrcweir class SvxFmTbxCtlConfig : public SfxToolBoxControl 72*cdf0e10cSrcweir { 73*cdf0e10cSrcweir private: 74*cdf0e10cSrcweir sal_uInt16 nLastSlot; 75*cdf0e10cSrcweir 76*cdf0e10cSrcweir protected: 77*cdf0e10cSrcweir using SfxToolBoxControl::Select; 78*cdf0e10cSrcweir 79*cdf0e10cSrcweir public: 80*cdf0e10cSrcweir SFX_DECL_TOOLBOX_CONTROL(); 81*cdf0e10cSrcweir 82*cdf0e10cSrcweir SvxFmTbxCtlConfig( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ); 83*cdf0e10cSrcweir ~SvxFmTbxCtlConfig() {} 84*cdf0e10cSrcweir 85*cdf0e10cSrcweir virtual void Select( sal_uInt16 nModifier ); 86*cdf0e10cSrcweir virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState, 87*cdf0e10cSrcweir const SfxPoolItem* pState ); 88*cdf0e10cSrcweir virtual SfxPopupWindowType GetPopupWindowType() const; 89*cdf0e10cSrcweir virtual SfxPopupWindow* CreatePopupWindow(); 90*cdf0e10cSrcweir }; 91*cdf0e10cSrcweir 92*cdf0e10cSrcweir //======================================================================== 93*cdf0e10cSrcweir class FixedText; 94*cdf0e10cSrcweir class SvxFmTbxCtlAbsRec : public SfxToolBoxControl 95*cdf0e10cSrcweir { 96*cdf0e10cSrcweir public: 97*cdf0e10cSrcweir SFX_DECL_TOOLBOX_CONTROL(); 98*cdf0e10cSrcweir 99*cdf0e10cSrcweir SvxFmTbxCtlAbsRec( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ); 100*cdf0e10cSrcweir ~SvxFmTbxCtlAbsRec(); 101*cdf0e10cSrcweir 102*cdf0e10cSrcweir virtual Window* CreateItemWindow( Window* pParent ); 103*cdf0e10cSrcweir 104*cdf0e10cSrcweir virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState, 105*cdf0e10cSrcweir const SfxPoolItem* pState ); 106*cdf0e10cSrcweir }; 107*cdf0e10cSrcweir 108*cdf0e10cSrcweir //======================================================================== 109*cdf0e10cSrcweir class SvxFmTbxCtlRecText : public SfxToolBoxControl 110*cdf0e10cSrcweir { 111*cdf0e10cSrcweir public: 112*cdf0e10cSrcweir SFX_DECL_TOOLBOX_CONTROL(); 113*cdf0e10cSrcweir 114*cdf0e10cSrcweir SvxFmTbxCtlRecText( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ); 115*cdf0e10cSrcweir ~SvxFmTbxCtlRecText(); 116*cdf0e10cSrcweir 117*cdf0e10cSrcweir virtual Window* CreateItemWindow( Window* pParent ); 118*cdf0e10cSrcweir }; 119*cdf0e10cSrcweir 120*cdf0e10cSrcweir //======================================================================== 121*cdf0e10cSrcweir class SvxFmTbxCtlRecFromText : public SfxToolBoxControl 122*cdf0e10cSrcweir { 123*cdf0e10cSrcweir public: 124*cdf0e10cSrcweir SFX_DECL_TOOLBOX_CONTROL(); 125*cdf0e10cSrcweir 126*cdf0e10cSrcweir SvxFmTbxCtlRecFromText( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ); 127*cdf0e10cSrcweir ~SvxFmTbxCtlRecFromText(); 128*cdf0e10cSrcweir 129*cdf0e10cSrcweir virtual Window* CreateItemWindow( Window* pParent ); 130*cdf0e10cSrcweir }; 131*cdf0e10cSrcweir 132*cdf0e10cSrcweir //======================================================================== 133*cdf0e10cSrcweir class SvxFmTbxCtlRecTotal : public SfxToolBoxControl 134*cdf0e10cSrcweir { 135*cdf0e10cSrcweir FixedText* pFixedText; 136*cdf0e10cSrcweir 137*cdf0e10cSrcweir public: 138*cdf0e10cSrcweir SFX_DECL_TOOLBOX_CONTROL(); 139*cdf0e10cSrcweir 140*cdf0e10cSrcweir SvxFmTbxCtlRecTotal( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ); 141*cdf0e10cSrcweir ~SvxFmTbxCtlRecTotal(); 142*cdf0e10cSrcweir 143*cdf0e10cSrcweir virtual Window* CreateItemWindow( Window* pParent ); 144*cdf0e10cSrcweir virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState, 145*cdf0e10cSrcweir const SfxPoolItem* pState ); 146*cdf0e10cSrcweir }; 147*cdf0e10cSrcweir 148*cdf0e10cSrcweir //======================================================================== 149*cdf0e10cSrcweir class SvxFmTbxNextRec : public SfxToolBoxControl 150*cdf0e10cSrcweir { 151*cdf0e10cSrcweir public: 152*cdf0e10cSrcweir SFX_DECL_TOOLBOX_CONTROL(); 153*cdf0e10cSrcweir SvxFmTbxNextRec( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ); 154*cdf0e10cSrcweir }; 155*cdf0e10cSrcweir 156*cdf0e10cSrcweir //======================================================================== 157*cdf0e10cSrcweir class SvxFmTbxPrevRec : public SfxToolBoxControl 158*cdf0e10cSrcweir { 159*cdf0e10cSrcweir public: 160*cdf0e10cSrcweir SFX_DECL_TOOLBOX_CONTROL(); 161*cdf0e10cSrcweir SvxFmTbxPrevRec( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ); 162*cdf0e10cSrcweir }; 163*cdf0e10cSrcweir 164*cdf0e10cSrcweir 165*cdf0e10cSrcweir #endif 166*cdf0e10cSrcweir 167