xref: /aoo42x/main/svx/source/inc/tbxform.hxx (revision 3334a7e6)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 #ifndef _SVX_TBXFORM_HXX
24 #define _SVX_TBXFORM_HXX
25 
26 #include <sfx2/tbxctrl.hxx>
27 #include <vcl/field.hxx>
28 #include <vcl/dialog.hxx>
29 
30 #ifndef _SV_BUTTON_HXX //autogen
31 #include <vcl/button.hxx>
32 #endif
33 
34 //========================================================================
35 class SvxFmAbsRecWin : public NumericField
36 {
37 	SfxToolBoxControl*	m_pController;
38 		// for invalidating our content whe losing the focus
39 public:
40 	SvxFmAbsRecWin( Window* _pParent, SfxToolBoxControl* _pController );
41 	~SvxFmAbsRecWin();
42 
43 	virtual void KeyInput( const KeyEvent& rKeyEvt );
44 	virtual void LoseFocus();
45 
46 protected:
47 	virtual void FirePosition( sal_Bool _bForce );
48 };
49 
50 
51 //========================================================================
52 class SvxFmConfigWin : public SfxPopupWindow
53 {
54 private:
55 	DECL_LINK( TbxSelectHdl, ToolBox* );
56 
57 public:
58 	SvxFmConfigWin( sal_uInt16 nId, ResId aRIdWin, ResId aRIdTbx );
59 	~SvxFmConfigWin();
60 
61 	void			Update();
62 	virtual void	PopupModeEnd();
63 };
64 
65 
66 //========================================================================
67 class SvxFmTbxCtlConfig : public SfxToolBoxControl
68 {
69 private:
70 	sal_uInt16 nLastSlot;
71 
72 protected:
73     using SfxToolBoxControl::Select;
74 
75 public:
76 	SFX_DECL_TOOLBOX_CONTROL();
77 
78 	SvxFmTbxCtlConfig( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx );
~SvxFmTbxCtlConfig()79 	~SvxFmTbxCtlConfig() {}
80 
81 	virtual void				Select( sal_uInt16 nModifier );
82 	virtual void				StateChanged( sal_uInt16 nSID, SfxItemState eState,
83 											  const SfxPoolItem* pState );
84 	virtual SfxPopupWindowType	GetPopupWindowType() const;
85 	virtual SfxPopupWindow*		CreatePopupWindow();
86 };
87 
88 //========================================================================
89 class FixedText;
90 class SvxFmTbxCtlAbsRec : public SfxToolBoxControl
91 {
92 public:
93 	SFX_DECL_TOOLBOX_CONTROL();
94 
95 	SvxFmTbxCtlAbsRec( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx );
96 	~SvxFmTbxCtlAbsRec();
97 
98 	virtual Window*	CreateItemWindow( Window* pParent );
99 
100 	virtual void	StateChanged( sal_uInt16 nSID, SfxItemState eState,
101 								  const SfxPoolItem* pState );
102 };
103 
104 //========================================================================
105 class SvxFmTbxCtlRecText : public SfxToolBoxControl
106 {
107 public:
108 	SFX_DECL_TOOLBOX_CONTROL();
109 
110 	SvxFmTbxCtlRecText( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx );
111 	~SvxFmTbxCtlRecText();
112 
113 	virtual Window*	CreateItemWindow( Window* pParent );
114 };
115 
116 //========================================================================
117 class SvxFmTbxCtlRecFromText : public SfxToolBoxControl
118 {
119 public:
120 	SFX_DECL_TOOLBOX_CONTROL();
121 
122 	SvxFmTbxCtlRecFromText( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx );
123 	~SvxFmTbxCtlRecFromText();
124 
125 	virtual Window*	CreateItemWindow( Window* pParent );
126 };
127 
128 //========================================================================
129 class SvxFmTbxCtlRecTotal : public SfxToolBoxControl
130 {
131 	FixedText* pFixedText;
132 
133 public:
134 	SFX_DECL_TOOLBOX_CONTROL();
135 
136 	SvxFmTbxCtlRecTotal( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx );
137 	~SvxFmTbxCtlRecTotal();
138 
139 	virtual Window*	CreateItemWindow( Window* pParent );
140 	virtual void	StateChanged( sal_uInt16 nSID, SfxItemState eState,
141 								  const SfxPoolItem* pState );
142 };
143 
144 //========================================================================
145 class SvxFmTbxNextRec : public SfxToolBoxControl
146 {
147 public:
148 	SFX_DECL_TOOLBOX_CONTROL();
149 	SvxFmTbxNextRec( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx );
150 };
151 
152 //========================================================================
153 class SvxFmTbxPrevRec : public SfxToolBoxControl
154 {
155 public:
156 	SFX_DECL_TOOLBOX_CONTROL();
157 	SvxFmTbxPrevRec( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx );
158 };
159 
160 
161 #endif
162 
163