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