merge the formfield patch from ooo-build
[ooovba.git] / svx / source / inc / tbxform.hxx
blob269a97ea194a020a519426bb6f4ad360fc0c6d9c
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: tbxform.hxx,v $
10 * $Revision: 1.10 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef _SVX_TBXFORM_HXX
31 #define _SVX_TBXFORM_HXX
33 #include <sfx2/tbxctrl.hxx>
34 #include <vcl/field.hxx>
35 #include <vcl/dialog.hxx>
37 #ifndef _SV_BUTTON_HXX //autogen
38 #include <vcl/button.hxx>
39 #endif
41 //========================================================================
42 class SvxFmAbsRecWin : public NumericField
44 SfxToolBoxControl* m_pController;
45 // for invalidating our content whe losing the focus
46 public:
47 SvxFmAbsRecWin( Window* _pParent, SfxToolBoxControl* _pController );
48 ~SvxFmAbsRecWin();
50 virtual void KeyInput( const KeyEvent& rKeyEvt );
51 virtual void LoseFocus();
53 protected:
54 virtual void FirePosition( sal_Bool _bForce );
58 //========================================================================
59 class SvxFmConfigWin : public SfxPopupWindow
61 private:
62 DECL_LINK( TbxSelectHdl, ToolBox* );
64 public:
65 SvxFmConfigWin( USHORT nId, ResId aRIdWin, ResId aRIdTbx );
66 ~SvxFmConfigWin();
68 void Update();
69 virtual void PopupModeEnd();
73 //========================================================================
74 class SvxFmTbxCtlConfig : public SfxToolBoxControl
76 private:
77 UINT16 nLastSlot;
79 protected:
80 using SfxToolBoxControl::Select;
82 public:
83 SFX_DECL_TOOLBOX_CONTROL();
85 SvxFmTbxCtlConfig( USHORT nSlotId, USHORT nId, ToolBox& rTbx );
86 ~SvxFmTbxCtlConfig() {}
88 virtual void Select( USHORT nModifier );
89 virtual void StateChanged( USHORT nSID, SfxItemState eState,
90 const SfxPoolItem* pState );
91 virtual SfxPopupWindowType GetPopupWindowType() const;
92 virtual SfxPopupWindow* CreatePopupWindow();
95 //========================================================================
96 class FixedText;
97 class SvxFmTbxCtlAbsRec : public SfxToolBoxControl
99 public:
100 SFX_DECL_TOOLBOX_CONTROL();
102 SvxFmTbxCtlAbsRec( USHORT nSlotId, USHORT nId, ToolBox& rTbx );
103 ~SvxFmTbxCtlAbsRec();
105 virtual Window* CreateItemWindow( Window* pParent );
107 virtual void StateChanged( USHORT nSID, SfxItemState eState,
108 const SfxPoolItem* pState );
111 //========================================================================
112 class SvxFmTbxCtlRecText : public SfxToolBoxControl
114 public:
115 SFX_DECL_TOOLBOX_CONTROL();
117 SvxFmTbxCtlRecText( USHORT nSlotId, USHORT nId, ToolBox& rTbx );
118 ~SvxFmTbxCtlRecText();
120 virtual Window* CreateItemWindow( Window* pParent );
123 //========================================================================
124 class SvxFmTbxCtlRecFromText : public SfxToolBoxControl
126 public:
127 SFX_DECL_TOOLBOX_CONTROL();
129 SvxFmTbxCtlRecFromText( USHORT nSlotId, USHORT nId, ToolBox& rTbx );
130 ~SvxFmTbxCtlRecFromText();
132 virtual Window* CreateItemWindow( Window* pParent );
135 //========================================================================
136 class SvxFmTbxCtlRecTotal : public SfxToolBoxControl
138 FixedText* pFixedText;
140 public:
141 SFX_DECL_TOOLBOX_CONTROL();
143 SvxFmTbxCtlRecTotal( USHORT nSlotId, USHORT nId, ToolBox& rTbx );
144 ~SvxFmTbxCtlRecTotal();
146 virtual Window* CreateItemWindow( Window* pParent );
147 virtual void StateChanged( USHORT nSID, SfxItemState eState,
148 const SfxPoolItem* pState );
151 //========================================================================
152 class SvxFmTbxNextRec : public SfxToolBoxControl
154 public:
155 SFX_DECL_TOOLBOX_CONTROL();
156 SvxFmTbxNextRec( USHORT nSlotId, USHORT nId, ToolBox& rTbx );
159 //========================================================================
160 class SvxFmTbxPrevRec : public SfxToolBoxControl
162 public:
163 SFX_DECL_TOOLBOX_CONTROL();
164 SvxFmTbxPrevRec( USHORT nSlotId, USHORT nId, ToolBox& rTbx );
168 #endif