xref: /aoo41x/main/toolkit/inc/layout/layout.hxx (revision 50e6b072)
1*50e6b072SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*50e6b072SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*50e6b072SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*50e6b072SAndrew Rist  * distributed with this work for additional information
6*50e6b072SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*50e6b072SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*50e6b072SAndrew Rist  * "License"); you may not use this file except in compliance
9*50e6b072SAndrew Rist  * with the License.  You may obtain a copy of the License at
10*50e6b072SAndrew Rist  *
11*50e6b072SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*50e6b072SAndrew Rist  *
13*50e6b072SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*50e6b072SAndrew Rist  * software distributed under the License is distributed on an
15*50e6b072SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*50e6b072SAndrew Rist  * KIND, either express or implied.  See the License for the
17*50e6b072SAndrew Rist  * specific language governing permissions and limitations
18*50e6b072SAndrew Rist  * under the License.
19*50e6b072SAndrew Rist  *
20*50e6b072SAndrew Rist  *************************************************************/
21*50e6b072SAndrew Rist 
22*50e6b072SAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir #ifndef _LAYOUT_HXX
25cdf0e10cSrcweir #define _LAYOUT_HXX
26cdf0e10cSrcweir 
27cdf0e10cSrcweir #include <com/sun/star/awt/XLayoutContainer.hpp>
28cdf0e10cSrcweir #include <com/sun/star/uno/XInterface.hpp>
29cdf0e10cSrcweir #include <com/sun/star/util/Color.hpp>
30cdf0e10cSrcweir #include <i18npool/lang.h>
31cdf0e10cSrcweir #include <toolkit/dllapi.h>
32cdf0e10cSrcweir #include <tools/gen.hxx>
33cdf0e10cSrcweir #include <tools/link.hxx>
34cdf0e10cSrcweir #include <tools/string.hxx>
35cdf0e10cSrcweir #include <vcl/bitmap.hxx>
36cdf0e10cSrcweir #include <vcl/combobox.h>
37cdf0e10cSrcweir #include <tools/fldunit.hxx>
38cdf0e10cSrcweir #include <vcl/lstbox.h>
39cdf0e10cSrcweir #include <tools/wintypes.hxx>
40cdf0e10cSrcweir 
41cdf0e10cSrcweir class Button;
42cdf0e10cSrcweir class ComboBox;
43cdf0e10cSrcweir class Color;
44cdf0e10cSrcweir class Control;
45cdf0e10cSrcweir class Dialog;
46cdf0e10cSrcweir class Edit;
47cdf0e10cSrcweir class Font;
48cdf0e10cSrcweir class Image;
49cdf0e10cSrcweir class ListBox;
50cdf0e10cSrcweir class MapMode;
51cdf0e10cSrcweir class MultiListBox;
52cdf0e10cSrcweir class NotifyEvent;
53cdf0e10cSrcweir class Pointer;
54cdf0e10cSrcweir class PushButton;
55cdf0e10cSrcweir class RadioButton;
56cdf0e10cSrcweir class ResId;
57cdf0e10cSrcweir struct SfxChildWinInfo;
58cdf0e10cSrcweir //class SvxFontListBox;
59cdf0e10cSrcweir //class SvxLanguageBox;
60cdf0e10cSrcweir class TabControl;
61cdf0e10cSrcweir class TabPage;
62cdf0e10cSrcweir class VCLXRadioButton;
63cdf0e10cSrcweir class VCLXWindow;
64cdf0e10cSrcweir class Window;
65cdf0e10cSrcweir 
66cdf0e10cSrcweir namespace layoutimpl
67cdf0e10cSrcweir {
68cdf0e10cSrcweir class VCLXTabControl;
69cdf0e10cSrcweir }
70cdf0e10cSrcweir 
71cdf0e10cSrcweir class VCLXTabControl;
72cdf0e10cSrcweir 
73cdf0e10cSrcweir namespace com { namespace sun { namespace star { namespace awt { class XWindow; } } } }
74cdf0e10cSrcweir 
75cdf0e10cSrcweir namespace layout
76cdf0e10cSrcweir {
77cdf0e10cSrcweir 
78cdf0e10cSrcweir namespace css = ::com::sun::star;
79cdf0e10cSrcweir 
80cdf0e10cSrcweir typedef css::uno::Reference< css::uno::XInterface > PeerHandle;
81cdf0e10cSrcweir class ContextImpl;
82cdf0e10cSrcweir class TOOLKIT_DLLPUBLIC Context
83cdf0e10cSrcweir {
84cdf0e10cSrcweir     ContextImpl *pImpl;
85cdf0e10cSrcweir public:
86cdf0e10cSrcweir     Context( char const* pPath );
87cdf0e10cSrcweir     virtual ~Context();
88cdf0e10cSrcweir     PeerHandle GetPeerHandle( char const* id, sal_uInt32 nId = 0 ) const;
89cdf0e10cSrcweir     void setToplevel( PeerHandle xToplevel );
90cdf0e10cSrcweir     PeerHandle getToplevel();
91cdf0e10cSrcweir     PeerHandle getRoot();
92cdf0e10cSrcweir };
93cdf0e10cSrcweir 
94cdf0e10cSrcweir // make declaring wrappers easier ...
95cdf0e10cSrcweir #define DECL_CONSTRUCTORS(t,par,defaultWinBit) \
96cdf0e10cSrcweir     protected:                                 \
97cdf0e10cSrcweir         explicit t( WindowImpl *pImpl ) : \
98cdf0e10cSrcweir             par( pImpl ) {} \
99cdf0e10cSrcweir         char const* GetUnoName() const; \
100cdf0e10cSrcweir     public: \
101cdf0e10cSrcweir         t( Context *context, char const* id, sal_uInt32 nId = 0 ); \
102cdf0e10cSrcweir         t( Window *parent, WinBits nStyle = defaultWinBit ); \
103cdf0e10cSrcweir         t (Window *parent, ResId const &res)
104cdf0e10cSrcweir #define DECL_GET_IMPL(t) \
105cdf0e10cSrcweir         inline t##Impl &getImpl() const
106cdf0e10cSrcweir 
107cdf0e10cSrcweir #define DECL_GET_WINDOW( cls ) ::cls* Get##cls() const
108cdf0e10cSrcweir #define IMPL_GET_WINDOW( cls ) ::cls* cls::Get##cls() const { return dynamic_cast< ::cls*>( GetWindow() ); }
109cdf0e10cSrcweir 
110cdf0e10cSrcweir #define DECL_GET_VCLXWINDOW( cls ) ::VCLX##cls* GetVCLX##cls() const
111cdf0e10cSrcweir #define IMPL_GET_VCLXWINDOW( cls ) ::VCLX##cls* cls::Get##VCLX##cls() const { return dynamic_cast< ::VCLX##cls*>( GetVCLXWindow() ); }
112cdf0e10cSrcweir 
113cdf0e10cSrcweir #define DECL_GET_LAYOUT_VCLXWINDOW( cls ) ::layoutimpl::VCLX##cls* GetVCLX##cls() const
114cdf0e10cSrcweir #define IMPL_GET_LAYOUT_VCLXWINDOW( cls ) ::layoutimpl::VCLX##cls* cls::Get##VCLX##cls() const { return dynamic_cast< ::layoutimpl::VCLX##cls*>( GetVCLXWindow() ); }
115cdf0e10cSrcweir 
116cdf0e10cSrcweir // follows the VCL inheritance hierarchy ...
117cdf0e10cSrcweir 
118cdf0e10cSrcweir class WindowImpl;
119cdf0e10cSrcweir class TOOLKIT_DLLPUBLIC Window
120cdf0e10cSrcweir {
121cdf0e10cSrcweir protected:
122cdf0e10cSrcweir     friend class WindowImpl;
123cdf0e10cSrcweir     WindowImpl *mpImpl;
124cdf0e10cSrcweir     static PeerHandle CreatePeer( Window *parent, WinBits nStyle,
125cdf0e10cSrcweir                                   char const* pName);
126cdf0e10cSrcweir 
127cdf0e10cSrcweir     virtual void setRes (ResId const& res);
128cdf0e10cSrcweir 
129cdf0e10cSrcweir public:
130cdf0e10cSrcweir     DECL_GET_IMPL( Window );
131cdf0e10cSrcweir     explicit Window( WindowImpl *pImpl );
132cdf0e10cSrcweir     virtual ~Window();
133cdf0e10cSrcweir 
134cdf0e10cSrcweir     PeerHandle GetPeer() const;
135cdf0e10cSrcweir     Context *getContext();
136cdf0e10cSrcweir 
137cdf0e10cSrcweir     void Enable( bool bEnable = true );
Disable()138cdf0e10cSrcweir     inline void Disable() { Enable( false ); }
139cdf0e10cSrcweir     void Show( bool bVisible = true );
Hide()140cdf0e10cSrcweir     inline void Hide() { Show( false ); }
141cdf0e10cSrcweir     void GrabFocus();
FreeResource()142cdf0e10cSrcweir     void FreeResource() {}
143cdf0e10cSrcweir 
144cdf0e10cSrcweir     void SetParent( ::Window *parent );
145cdf0e10cSrcweir     virtual void ParentSet (Window *window);
146cdf0e10cSrcweir     void SetParent( Window *parent );
147cdf0e10cSrcweir 
148cdf0e10cSrcweir     css::uno::Reference<css::awt::XWindow> GetRef() const;
149cdf0e10cSrcweir     VCLXWindow* GetVCLXWindow() const;
150cdf0e10cSrcweir     ::Window* GetWindow() const;
151cdf0e10cSrcweir     ::Window* GetParent() const;
152cdf0e10cSrcweir 
153cdf0e10cSrcweir     void SetPointer( Pointer const& pointer );
154cdf0e10cSrcweir     Pointer const& GetPointer() const;
155cdf0e10cSrcweir     WinBits GetStyle();
156cdf0e10cSrcweir     void SetText( rtl::OUString const& str );
157cdf0e10cSrcweir     String GetText() const;
158cdf0e10cSrcweir     void SetStyle( WinBits style );
159cdf0e10cSrcweir     void SetUpdateMode( bool mode );
160cdf0e10cSrcweir     void SetHelpId( const rtl::OString& id );
161cdf0e10cSrcweir     const rtl::OString& GetHelpId() const;
162cdf0e10cSrcweir     void EnterWait ();
163cdf0e10cSrcweir     void LeaveWait ();
164cdf0e10cSrcweir     bool IsWait () const;
165cdf0e10cSrcweir     //void Enable (bool enable=true, bool child=true);
166cdf0e10cSrcweir     //void Disable (bool child=true);
167cdf0e10cSrcweir     bool IsEnabled () const;
168cdf0e10cSrcweir     void EnableInput (bool enable=true, bool child=true);
169cdf0e10cSrcweir     bool IsInputEnabled () const;
170cdf0e10cSrcweir 
171cdf0e10cSrcweir     bool IsVisible () const;
172cdf0e10cSrcweir     bool HasChildPathFocus (bool systemWindow=false) const;
173cdf0e10cSrcweir     void SetPosPixel (Point const&);
174cdf0e10cSrcweir     Point GetPosPixel () const;
175cdf0e10cSrcweir     void SetSizePixel (Size const&);
176cdf0e10cSrcweir     Size GetSizePixel () const;
177cdf0e10cSrcweir     void SetPosSizePixel (Point const&, Size const&);
178cdf0e10cSrcweir     sal_Int32 GetCtrlTextWidth (rtl::OUString const& str) const;
179cdf0e10cSrcweir     sal_Int32 GetTextHeight () const;
180cdf0e10cSrcweir 
181cdf0e10cSrcweir     Size LogicToPixel( Size const& size ) const;
182cdf0e10cSrcweir     Size LogicToPixel( Size const& size, MapMode const& mapMode ) const;
183cdf0e10cSrcweir 
184cdf0e10cSrcweir     bool HasFocus () const;
185cdf0e10cSrcweir     Font& GetFont () const;
186cdf0e10cSrcweir     void SetFont (Font const& font);
187cdf0e10cSrcweir     virtual void Invalidate (sal_uInt8 flags=0);
188cdf0e10cSrcweir };
189cdf0e10cSrcweir 
190cdf0e10cSrcweir class ControlImpl;
191cdf0e10cSrcweir class TOOLKIT_DLLPUBLIC Control : public Window
192cdf0e10cSrcweir {
193cdf0e10cSrcweir     DECL_GET_IMPL( Control );
194cdf0e10cSrcweir     DECL_CONSTRUCTORS( Control, Window, 0 );
195cdf0e10cSrcweir 
196cdf0e10cSrcweir public:
197cdf0e10cSrcweir     ~Control ();
198cdf0e10cSrcweir     void SetGetFocusHdl (Link const& link);
199cdf0e10cSrcweir     Link& GetGetFocusHdl ();
200cdf0e10cSrcweir     void SetLoseFocusHdl (Link const& link);
201cdf0e10cSrcweir     Link& GetLoseFocusHdl ();
202cdf0e10cSrcweir };
203cdf0e10cSrcweir 
204cdf0e10cSrcweir class FixedLineImpl;
205cdf0e10cSrcweir class TOOLKIT_DLLPUBLIC FixedLine : public Control
206cdf0e10cSrcweir {
207cdf0e10cSrcweir     DECL_GET_IMPL( FixedLine );
208cdf0e10cSrcweir     DECL_CONSTRUCTORS( FixedLine, Control, WB_HORZ );
209cdf0e10cSrcweir 
210cdf0e10cSrcweir public:
211cdf0e10cSrcweir     bool IsEnabled() const;
212cdf0e10cSrcweir };
213cdf0e10cSrcweir 
214cdf0e10cSrcweir class FixedTextImpl;
215cdf0e10cSrcweir class TOOLKIT_DLLPUBLIC FixedText : public Control
216cdf0e10cSrcweir {
217cdf0e10cSrcweir     DECL_GET_IMPL( FixedText );
218cdf0e10cSrcweir     DECL_CONSTRUCTORS( FixedText, Control, 0 );
219cdf0e10cSrcweir 
220cdf0e10cSrcweir public:
221cdf0e10cSrcweir     ~FixedText ();
222cdf0e10cSrcweir     void SetText( rtl::OUString const& rStr );
223cdf0e10cSrcweir };
224cdf0e10cSrcweir 
225cdf0e10cSrcweir class FixedImageImpl;
226cdf0e10cSrcweir class TOOLKIT_DLLPUBLIC FixedImage : public Control
227cdf0e10cSrcweir {
228cdf0e10cSrcweir     DECL_GET_IMPL( FixedImage );
229cdf0e10cSrcweir     DECL_CONSTRUCTORS( FixedImage, Control, 0 );
230cdf0e10cSrcweir public:
231cdf0e10cSrcweir     void setImage( ::Image const& );
232cdf0e10cSrcweir };
233cdf0e10cSrcweir 
234cdf0e10cSrcweir class FixedInfoImpl;
235cdf0e10cSrcweir class TOOLKIT_DLLPUBLIC FixedInfo : public FixedText
236cdf0e10cSrcweir {
237cdf0e10cSrcweir     DECL_GET_IMPL( FixedInfo );
238cdf0e10cSrcweir     DECL_CONSTRUCTORS( FixedInfo, FixedText, 0 );
239cdf0e10cSrcweir };
240cdf0e10cSrcweir 
241cdf0e10cSrcweir class ImageImpl;
242cdf0e10cSrcweir class TOOLKIT_DLLPUBLIC Image
243cdf0e10cSrcweir {
244cdf0e10cSrcweir     ImageImpl *pImpl;
245cdf0e10cSrcweir public:
246cdf0e10cSrcweir     Image( char const* pName );
247cdf0e10cSrcweir     ~Image();
getImpl() const248cdf0e10cSrcweir     ImageImpl &getImpl() const { return *pImpl; }
249cdf0e10cSrcweir };
250cdf0e10cSrcweir 
251cdf0e10cSrcweir class ButtonImpl;
252cdf0e10cSrcweir class TOOLKIT_DLLPUBLIC Button : public Control
253cdf0e10cSrcweir {
254cdf0e10cSrcweir     DECL_GET_IMPL( Button );
255cdf0e10cSrcweir     DECL_CONSTRUCTORS( Button, Control, 0 );
256cdf0e10cSrcweir     DECL_GET_WINDOW (Button);
257cdf0e10cSrcweir 
258cdf0e10cSrcweir public:
259cdf0e10cSrcweir     ~Button ();
260cdf0e10cSrcweir     static String GetStandardText (sal_uInt16 button_type);
261cdf0e10cSrcweir     void SetText( rtl::OUString const& rStr );
262cdf0e10cSrcweir     bool SetModeImage (Image const& image);
263cdf0e10cSrcweir     bool SetModeImage (::Image const& image, BmpColorMode mode=BMP_COLOR_NORMAL);
264cdf0e10cSrcweir     void SetImageAlign( ImageAlign eAlign );
265cdf0e10cSrcweir 
266cdf0e10cSrcweir     void SetClickHdl( Link const& rLink );
267cdf0e10cSrcweir     virtual void Click() /* pure virtual? */;
268cdf0e10cSrcweir     Link& GetClickHdl ();
269cdf0e10cSrcweir };
270cdf0e10cSrcweir 
271cdf0e10cSrcweir class PushButtonImpl;
272cdf0e10cSrcweir class TOOLKIT_DLLPUBLIC PushButton : public Button
273cdf0e10cSrcweir {
274cdf0e10cSrcweir     DECL_GET_IMPL( PushButton );
275cdf0e10cSrcweir     DECL_CONSTRUCTORS( PushButton, Button, 0 );
276cdf0e10cSrcweir     DECL_GET_WINDOW (PushButton);
277cdf0e10cSrcweir 
278cdf0e10cSrcweir public:
279cdf0e10cSrcweir     ~PushButton ();
280cdf0e10cSrcweir     void Check( bool bCheck=true );
281cdf0e10cSrcweir     bool IsChecked() const;
282cdf0e10cSrcweir 
283cdf0e10cSrcweir     void Toggle();
284cdf0e10cSrcweir     void SetToggleHdl( Link const& rLink );
285cdf0e10cSrcweir };
286cdf0e10cSrcweir 
287cdf0e10cSrcweir class TOOLKIT_DLLPUBLIC OKButton : public PushButton
288cdf0e10cSrcweir {
289cdf0e10cSrcweir     DECL_CONSTRUCTORS( OKButton, PushButton, WB_DEFBUTTON );
290cdf0e10cSrcweir };
291cdf0e10cSrcweir class TOOLKIT_DLLPUBLIC CancelButton : public PushButton
292cdf0e10cSrcweir {
293cdf0e10cSrcweir     DECL_CONSTRUCTORS( CancelButton, PushButton, 0 );
294cdf0e10cSrcweir };
295cdf0e10cSrcweir class TOOLKIT_DLLPUBLIC YesButton : public PushButton
296cdf0e10cSrcweir {
297cdf0e10cSrcweir     DECL_CONSTRUCTORS( YesButton, PushButton, WB_DEFBUTTON );
298cdf0e10cSrcweir };
299cdf0e10cSrcweir class TOOLKIT_DLLPUBLIC NoButton : public PushButton
300cdf0e10cSrcweir {
301cdf0e10cSrcweir     DECL_CONSTRUCTORS( NoButton, PushButton, 0 );
302cdf0e10cSrcweir };
303cdf0e10cSrcweir class TOOLKIT_DLLPUBLIC RetryButton : public PushButton
304cdf0e10cSrcweir {
305cdf0e10cSrcweir     DECL_CONSTRUCTORS( RetryButton, PushButton, 0 );
306cdf0e10cSrcweir };
307cdf0e10cSrcweir class TOOLKIT_DLLPUBLIC IgnoreButton : public PushButton
308cdf0e10cSrcweir {
309cdf0e10cSrcweir     DECL_CONSTRUCTORS( IgnoreButton, PushButton, 0 );
310cdf0e10cSrcweir };
311cdf0e10cSrcweir class TOOLKIT_DLLPUBLIC ResetButton : public PushButton
312cdf0e10cSrcweir {
313cdf0e10cSrcweir     DECL_CONSTRUCTORS( ResetButton, PushButton, 0 );
314cdf0e10cSrcweir };
315cdf0e10cSrcweir class TOOLKIT_DLLPUBLIC ApplyButton : public PushButton
316cdf0e10cSrcweir {
317cdf0e10cSrcweir     DECL_CONSTRUCTORS( ApplyButton, PushButton, 0 );
318cdf0e10cSrcweir };
319cdf0e10cSrcweir class TOOLKIT_DLLPUBLIC HelpButton : public PushButton
320cdf0e10cSrcweir {
321cdf0e10cSrcweir     DECL_CONSTRUCTORS( HelpButton, PushButton, 0 );
322cdf0e10cSrcweir };
323cdf0e10cSrcweir class TOOLKIT_DLLPUBLIC ImageButton : public PushButton
324cdf0e10cSrcweir {
325cdf0e10cSrcweir     DECL_CONSTRUCTORS( ImageButton, PushButton, 0 );
326cdf0e10cSrcweir };
327cdf0e10cSrcweir 
328cdf0e10cSrcweir class AdvancedButtonImpl;
329cdf0e10cSrcweir class TOOLKIT_DLLPUBLIC AdvancedButton : public PushButton
330cdf0e10cSrcweir {
331cdf0e10cSrcweir     DECL_CONSTRUCTORS( AdvancedButton, PushButton, 0 );
332cdf0e10cSrcweir     DECL_GET_IMPL( AdvancedButton );
333cdf0e10cSrcweir 
334cdf0e10cSrcweir     void AddAdvanced( Window* w );
335cdf0e10cSrcweir     void AddSimple( Window* w );
336cdf0e10cSrcweir     void RemoveAdvanced( Window* w );
337cdf0e10cSrcweir     void RemoveSimple( Window* w );
338cdf0e10cSrcweir 
339cdf0e10cSrcweir     void SetAdvancedText (rtl::OUString const& text);
340cdf0e10cSrcweir     void SetSimpleText (rtl::OUString const& text);
341cdf0e10cSrcweir     rtl::OUString GetAdvancedText () const;
342cdf0e10cSrcweir     rtl::OUString GetSimpleText () const;
343cdf0e10cSrcweir     void SetDelta (int);
344cdf0e10cSrcweir };
345cdf0e10cSrcweir 
346cdf0e10cSrcweir class MoreButtonImpl;
347cdf0e10cSrcweir class TOOLKIT_DLLPUBLIC MoreButton : public AdvancedButton
348cdf0e10cSrcweir {
349cdf0e10cSrcweir     DECL_CONSTRUCTORS( MoreButton, AdvancedButton, 0 );
350cdf0e10cSrcweir     DECL_GET_IMPL( MoreButton );
351cdf0e10cSrcweir     void AddWindow( Window* w );
352cdf0e10cSrcweir     void RemoveWindow( Window* w );
353cdf0e10cSrcweir 
354cdf0e10cSrcweir     void SetMoreText (rtl::OUString const& text);
355cdf0e10cSrcweir     void SetLessText (rtl::OUString const& text);
356cdf0e10cSrcweir     rtl::OUString GetMoreText () const;
357cdf0e10cSrcweir     rtl::OUString GetLessText () const;
358cdf0e10cSrcweir };
359cdf0e10cSrcweir 
360cdf0e10cSrcweir class RadioButtonImpl;
361cdf0e10cSrcweir class TOOLKIT_DLLPUBLIC RadioButton : public Button
362cdf0e10cSrcweir {
363cdf0e10cSrcweir     DECL_GET_IMPL( RadioButton );
364cdf0e10cSrcweir     DECL_CONSTRUCTORS( RadioButton, Button, 0 );
365cdf0e10cSrcweir     DECL_GET_WINDOW( RadioButton );
366cdf0e10cSrcweir     DECL_GET_VCLXWINDOW( RadioButton );
367cdf0e10cSrcweir public:
368cdf0e10cSrcweir     ~RadioButton ();
369cdf0e10cSrcweir     void Check( bool bCheck=true );
370cdf0e10cSrcweir     bool IsChecked() const;
371cdf0e10cSrcweir 
372cdf0e10cSrcweir     void Toggle();
373cdf0e10cSrcweir     void SetToggleHdl( Link const& rLink );
374cdf0e10cSrcweir };
375cdf0e10cSrcweir 
376cdf0e10cSrcweir class CheckBoxImpl;
377cdf0e10cSrcweir class TOOLKIT_DLLPUBLIC CheckBox : public Button
378cdf0e10cSrcweir {
379cdf0e10cSrcweir     DECL_GET_IMPL( CheckBox );
380cdf0e10cSrcweir     DECL_CONSTRUCTORS( CheckBox, Button, 0 );
381cdf0e10cSrcweir 
382cdf0e10cSrcweir public:
383cdf0e10cSrcweir     ~CheckBox ();
384cdf0e10cSrcweir     void Check( bool bCheck=true );
385cdf0e10cSrcweir     bool IsChecked() const;
386cdf0e10cSrcweir 
387cdf0e10cSrcweir     void Toggle();
388cdf0e10cSrcweir     void SetToggleHdl( Link const& rLink );
389cdf0e10cSrcweir };
390cdf0e10cSrcweir 
391cdf0e10cSrcweir class EditImpl;
392cdf0e10cSrcweir class TOOLKIT_DLLPUBLIC Edit : public Control
393cdf0e10cSrcweir {
394cdf0e10cSrcweir     DECL_GET_IMPL( Edit );
395cdf0e10cSrcweir     DECL_CONSTRUCTORS( Edit, Control, WB_BORDER );
396cdf0e10cSrcweir     DECL_GET_WINDOW (Edit);
397cdf0e10cSrcweir 
398cdf0e10cSrcweir public:
399cdf0e10cSrcweir     ~Edit ();
400cdf0e10cSrcweir     void SetText( rtl::OUString const& rStr );
401cdf0e10cSrcweir     String GetText() const;
402cdf0e10cSrcweir     void SetModifyHdl( Link const& rLink );
403cdf0e10cSrcweir     void SetSelection( Selection const& rSelection );
404cdf0e10cSrcweir };
405cdf0e10cSrcweir 
406cdf0e10cSrcweir class MultiLineEditImpl;
407cdf0e10cSrcweir class TOOLKIT_DLLPUBLIC MultiLineEdit : public Edit
408cdf0e10cSrcweir {
409cdf0e10cSrcweir     DECL_GET_IMPL( MultiLineEdit );
410cdf0e10cSrcweir     DECL_CONSTRUCTORS( MultiLineEdit, Edit, WB_LEFT|WB_BORDER );
411cdf0e10cSrcweir };
412cdf0e10cSrcweir 
413cdf0e10cSrcweir class SpinFieldImpl;
414cdf0e10cSrcweir class TOOLKIT_DLLPUBLIC SpinField : public Edit
415cdf0e10cSrcweir {
416cdf0e10cSrcweir     DECL_GET_IMPL( SpinField );
417cdf0e10cSrcweir     DECL_CONSTRUCTORS( SpinField, Edit, 0 );
418cdf0e10cSrcweir };
419cdf0e10cSrcweir 
420cdf0e10cSrcweir class FormatterBaseImpl;
421cdf0e10cSrcweir class TOOLKIT_DLLPUBLIC FormatterBase
422cdf0e10cSrcweir {
423cdf0e10cSrcweir protected:
424cdf0e10cSrcweir     FormatterBaseImpl *mpFormatImpl;
425cdf0e10cSrcweir     FormatterBase( FormatterBaseImpl *pFormatImpl );
426cdf0e10cSrcweir };
427cdf0e10cSrcweir 
428cdf0e10cSrcweir class NumericFormatterImpl;
429cdf0e10cSrcweir class TOOLKIT_DLLPUBLIC NumericFormatter : public FormatterBase
430cdf0e10cSrcweir {
431cdf0e10cSrcweir protected:
432cdf0e10cSrcweir     explicit NumericFormatter( FormatterBaseImpl *pImpl );
433cdf0e10cSrcweir     NumericFormatterImpl &getFormatImpl() const;
434cdf0e10cSrcweir public:
435cdf0e10cSrcweir     void SetMin( sal_Int64 nNewMin );
436cdf0e10cSrcweir     void SetMax( sal_Int64 nNewMax );
437cdf0e10cSrcweir     void SetFirst( sal_Int64 nNewFirst );
438cdf0e10cSrcweir     void SetLast( sal_Int64 nNewLast );
439cdf0e10cSrcweir     void SetSpinSize( sal_Int64 nNewSize );
440cdf0e10cSrcweir 
441cdf0e10cSrcweir     void SetValue( sal_Int64 nNewValue );
442cdf0e10cSrcweir     sal_Int64 GetValue() const;
443cdf0e10cSrcweir };
444cdf0e10cSrcweir 
445cdf0e10cSrcweir class NumericFieldImpl;
446cdf0e10cSrcweir class TOOLKIT_DLLPUBLIC NumericField : public SpinField, public NumericFormatter
447cdf0e10cSrcweir {
448cdf0e10cSrcweir     DECL_GET_IMPL( NumericField );
449cdf0e10cSrcweir public:
450cdf0e10cSrcweir     NumericField( Context *context, char const* id, sal_uInt32 nId=0 );
451cdf0e10cSrcweir     NumericField( Window *parent, WinBits nStyle );
452cdf0e10cSrcweir };
453cdf0e10cSrcweir 
454cdf0e10cSrcweir class MetricFormatterImpl;
455cdf0e10cSrcweir // Different inheritance to save code
456cdf0e10cSrcweir class TOOLKIT_DLLPUBLIC MetricFormatter : public FormatterBase
457cdf0e10cSrcweir {
458cdf0e10cSrcweir   protected:
459cdf0e10cSrcweir     explicit MetricFormatter( FormatterBaseImpl *pImpl );
460cdf0e10cSrcweir     MetricFormatterImpl &getFormatImpl() const;
461cdf0e10cSrcweir public:
462cdf0e10cSrcweir     void SetMin( sal_Int64 nNewMin, FieldUnit nUnit=FUNIT_NONE );
463cdf0e10cSrcweir     void SetMax( sal_Int64 nNewMax, FieldUnit nUnit=FUNIT_NONE );
464cdf0e10cSrcweir     void SetFirst( sal_Int64 nNewFirst, FieldUnit nUnit=FUNIT_NONE );
465cdf0e10cSrcweir     void SetLast( sal_Int64 nNewLast, FieldUnit nUnit=FUNIT_NONE );
466cdf0e10cSrcweir     void SetValue( sal_Int64 nNewValue, FieldUnit nUnit=FUNIT_NONE );
467cdf0e10cSrcweir     sal_Int64 GetValue( FieldUnit nUnit=FUNIT_NONE ) const;
468cdf0e10cSrcweir 
469cdf0e10cSrcweir     void SetSpinSize( sal_Int64 nNewSize );
470cdf0e10cSrcweir };
471cdf0e10cSrcweir 
472cdf0e10cSrcweir class MetricFieldImpl;
473cdf0e10cSrcweir class TOOLKIT_DLLPUBLIC MetricField : public SpinField, public MetricFormatter
474cdf0e10cSrcweir {
475cdf0e10cSrcweir     DECL_GET_IMPL( MetricField );
476cdf0e10cSrcweir public:
477cdf0e10cSrcweir     MetricField( Context *context, char const* id, sal_uInt32 nId=0 );
478cdf0e10cSrcweir     MetricField( Window *parent, WinBits nStyle );
479cdf0e10cSrcweir };
480cdf0e10cSrcweir 
481cdf0e10cSrcweir class ComboBoxImpl;
482cdf0e10cSrcweir class TOOLKIT_DLLPUBLIC ComboBox : public Edit
483cdf0e10cSrcweir {
484cdf0e10cSrcweir     DECL_GET_IMPL( ComboBox );
485cdf0e10cSrcweir     DECL_GET_WINDOW (ComboBox );
486cdf0e10cSrcweir     DECL_CONSTRUCTORS( ComboBox, Edit, 0 );
487cdf0e10cSrcweir 
488cdf0e10cSrcweir public:
489cdf0e10cSrcweir     ~ComboBox ();
490cdf0e10cSrcweir     sal_uInt16 InsertEntry( String const& rStr, sal_uInt16 nPos=COMBOBOX_APPEND );
491cdf0e10cSrcweir     void RemoveEntry( String const& rStr );
492cdf0e10cSrcweir     void RemoveEntry( sal_uInt16 nPos );
493cdf0e10cSrcweir     void Clear();
494cdf0e10cSrcweir 
495cdf0e10cSrcweir     sal_uInt16 GetEntryPos( String const& rStr ) const;
496cdf0e10cSrcweir     String GetEntry( sal_uInt16 nPos ) const;
497cdf0e10cSrcweir     sal_uInt16 GetEntryCount() const;
498cdf0e10cSrcweir 
499cdf0e10cSrcweir     void SetClickHdl( Link const& rLink );
500cdf0e10cSrcweir     void SetSelectHdl( Link const& rLink );
501cdf0e10cSrcweir     void EnableAutocomplete (bool enable, bool matchCase=false );
502cdf0e10cSrcweir };
503cdf0e10cSrcweir 
504cdf0e10cSrcweir class ListBoxImpl;
505cdf0e10cSrcweir class TOOLKIT_DLLPUBLIC ListBox : public Control
506cdf0e10cSrcweir {
507cdf0e10cSrcweir     DECL_GET_IMPL( ListBox );
508cdf0e10cSrcweir     DECL_CONSTRUCTORS( ListBox, Control, WB_BORDER );
509cdf0e10cSrcweir     DECL_GET_WINDOW (ListBox);
510cdf0e10cSrcweir 
511cdf0e10cSrcweir public:
512cdf0e10cSrcweir     ~ListBox ();
513cdf0e10cSrcweir     sal_uInt16 InsertEntry( String const& rStr, sal_uInt16 nPos=LISTBOX_APPEND );
514cdf0e10cSrcweir 
515cdf0e10cSrcweir     void RemoveEntry( String const& rStr );
516cdf0e10cSrcweir     void RemoveEntry( sal_uInt16 nPos );
517cdf0e10cSrcweir     void Clear();
518cdf0e10cSrcweir 
519cdf0e10cSrcweir     sal_uInt16 GetEntryPos( String const& rStr ) const;
520cdf0e10cSrcweir     String GetEntry( sal_uInt16 nPos ) const;
521cdf0e10cSrcweir     sal_uInt16 GetEntryCount() const;
522cdf0e10cSrcweir 
523cdf0e10cSrcweir     void SelectEntry( String const& rStr, bool bSelect=true );
524cdf0e10cSrcweir     void SelectEntryPos( sal_uInt16 nPos, bool bSelect=true );
525cdf0e10cSrcweir 
526cdf0e10cSrcweir     sal_uInt16 GetSelectEntryCount() const;
527cdf0e10cSrcweir     String GetSelectEntry( sal_uInt16 nSelIndex=0 ) const;
528cdf0e10cSrcweir     sal_uInt16 GetSelectEntryPos( sal_uInt16 nSelIndex=0 ) const;
529cdf0e10cSrcweir 
530cdf0e10cSrcweir     void SetSelectHdl (Link const& link);
531cdf0e10cSrcweir     Link& GetSelectHdl ();
532cdf0e10cSrcweir 
533cdf0e10cSrcweir     void SetClickHdl (Link const& link);
534cdf0e10cSrcweir     Link& GetClickHdl ();
535cdf0e10cSrcweir 
536cdf0e10cSrcweir     void SetDoubleClickHdl (Link const& link);
537cdf0e10cSrcweir     Link& GetDoubleClickHdl ();
538cdf0e10cSrcweir 
539cdf0e10cSrcweir     void SetEntryData (sal_uInt16 pos, void* data);
540cdf0e10cSrcweir     void* GetEntryData (sal_uInt16 pos) const;
541cdf0e10cSrcweir 
542cdf0e10cSrcweir 	virtual void SetNoSelection ();
543cdf0e10cSrcweir };
544cdf0e10cSrcweir 
545cdf0e10cSrcweir class MultiListBoxImpl;
546cdf0e10cSrcweir class TOOLKIT_DLLPUBLIC MultiListBox : public ListBox
547cdf0e10cSrcweir {
548cdf0e10cSrcweir     DECL_GET_IMPL( MultiListBox );
549cdf0e10cSrcweir     DECL_CONSTRUCTORS( MultiListBox, ListBox, 0 );
550cdf0e10cSrcweir     DECL_GET_WINDOW( MultiListBox );
551cdf0e10cSrcweir };
552cdf0e10cSrcweir 
553cdf0e10cSrcweir class DialogImpl;
554cdf0e10cSrcweir class TOOLKIT_DLLPUBLIC Dialog : public Context, public Window
555cdf0e10cSrcweir {
556cdf0e10cSrcweir     DECL_GET_WINDOW (Dialog);
557cdf0e10cSrcweir 
558cdf0e10cSrcweir public:
559cdf0e10cSrcweir     DECL_GET_IMPL (Dialog);
560cdf0e10cSrcweir     Dialog( Window *parent, char const* xml_file, char const* id, sal_uInt32 nId=0 );
561cdf0e10cSrcweir     Dialog( ::Window *parent, char const* xml_file, char const* id, sal_uInt32 nId=0 );
562cdf0e10cSrcweir     ~Dialog ();
563cdf0e10cSrcweir     virtual short Execute();
564cdf0e10cSrcweir     void EndDialog( long nResult=0 );
565cdf0e10cSrcweir     void SetText( rtl::OUString const& rStr );
566cdf0e10cSrcweir     void SetTitle (rtl::OUString const& rStr );
567cdf0e10cSrcweir     bool Close ();
568cdf0e10cSrcweir     long Notify (NotifyEvent & event);
569cdf0e10cSrcweir 
570cdf0e10cSrcweir     // Sxf*Dialog
571cdf0e10cSrcweir     bool bConstruct;
572cdf0e10cSrcweir 	void Initialize (SfxChildWinInfo*);
573cdf0e10cSrcweir };
574cdf0e10cSrcweir 
575cdf0e10cSrcweir #define DECL_MESSAGE_BOX_CTORS(Name)\
576cdf0e10cSrcweir     public:\
577cdf0e10cSrcweir     Name##Box (::Window *parent, char const* message,\
578cdf0e10cSrcweir                char const* yes=0, char const* no=0, const rtl::OString& help_id=rtl::OString(),\
579cdf0e10cSrcweir                char const* xml_file="message-box.xml", char const* id="message-box");\
580cdf0e10cSrcweir     Name##Box (::Window *parent, rtl::OUString const& message,\
581cdf0e10cSrcweir                rtl::OUString yes=String (),\
582cdf0e10cSrcweir                rtl::OUString no=String (),\
583cdf0e10cSrcweir                const rtl::OString& help_id=rtl::OString(),\
584cdf0e10cSrcweir                char const* xml_file="message-box.xml", char const* id="message-box");\
585cdf0e10cSrcweir     Name##Box (::Window *parent, WinBits, char const* message,\
586cdf0e10cSrcweir                char const* yes=0, char const* no=0, const rtl::OString& help_id=rtl::OString(),\
587cdf0e10cSrcweir                char const* xml_file="message-box.xml", char const* id="message-box");\
588cdf0e10cSrcweir     Name##Box (::Window *parent, WinBits, rtl::OUString const& message,\
589cdf0e10cSrcweir                rtl::OUString yes=String (),\
590cdf0e10cSrcweir                rtl::OUString no=String (),\
591cdf0e10cSrcweir                const rtl::OString& help_id=rtl::OString(),\
592cdf0e10cSrcweir                char const* xml_file="message-box.xml", char const* id="message-box")\
593cdf0e10cSrcweir 
594cdf0e10cSrcweir class TOOLKIT_DLLPUBLIC MessageBox : public Dialog
595cdf0e10cSrcweir {
596cdf0e10cSrcweir     DECL_MESSAGE_BOX_CTORS(Message);
597cdf0e10cSrcweir 
598cdf0e10cSrcweir protected:
599cdf0e10cSrcweir     FixedImage imageError;
600cdf0e10cSrcweir     FixedImage imageInfo;
601cdf0e10cSrcweir     FixedImage imageQuery;
602cdf0e10cSrcweir     FixedImage imageWarning;
603cdf0e10cSrcweir     FixedText messageText;
604cdf0e10cSrcweir     CancelButton cancelButton;
605cdf0e10cSrcweir     HelpButton helpButton;
606cdf0e10cSrcweir     IgnoreButton ignoreButton;
607cdf0e10cSrcweir     NoButton noButton;
608cdf0e10cSrcweir     RetryButton retryButton;
609cdf0e10cSrcweir     YesButton yesButton;
610cdf0e10cSrcweir 
611cdf0e10cSrcweir     void bits_init (WinBits bits, rtl::OUString const& message,
612cdf0e10cSrcweir                     rtl::OUString yes, rtl::OUString, const rtl::OString& help_id);
613cdf0e10cSrcweir     void init (rtl::OUString const& message,
614cdf0e10cSrcweir                rtl::OUString const& yes, rtl::OUString const& no, const rtl::OString& help_id);
615cdf0e10cSrcweir     void init (char const* message, char const* yes, char const* no, const rtl::OString& help_id);
616cdf0e10cSrcweir };
617cdf0e10cSrcweir 
618cdf0e10cSrcweir #define CLASS_MESSAGE_BOX(Name)\
619cdf0e10cSrcweir     class TOOLKIT_DLLPUBLIC Name##Box : public MessageBox\
620cdf0e10cSrcweir     {\
621cdf0e10cSrcweir         DECL_MESSAGE_BOX_CTORS (Name);\
622cdf0e10cSrcweir     }
623cdf0e10cSrcweir 
624cdf0e10cSrcweir //CLASS_MESSAGE_BOX (Mess);
625cdf0e10cSrcweir typedef MessageBox MessBox;
626cdf0e10cSrcweir CLASS_MESSAGE_BOX (Error);
627cdf0e10cSrcweir CLASS_MESSAGE_BOX (Info);
628cdf0e10cSrcweir CLASS_MESSAGE_BOX (Query);
629cdf0e10cSrcweir CLASS_MESSAGE_BOX (Warning);
630cdf0e10cSrcweir 
631cdf0e10cSrcweir #undef CLASS_MESSAGE_BOX
632cdf0e10cSrcweir 
633cdf0e10cSrcweir #undef TAB_APPEND
634cdf0e10cSrcweir 
635cdf0e10cSrcweir class TabControlImpl;
636cdf0e10cSrcweir class TOOLKIT_DLLPUBLIC TabControl : public Control
637cdf0e10cSrcweir {
638cdf0e10cSrcweir //#ifndef TAB_APPEND
639cdf0e10cSrcweir #define TAB_APPEND 0xFFFF
640cdf0e10cSrcweir //#endif /* !TAB_APPEND */
641cdf0e10cSrcweir 
642cdf0e10cSrcweir     DECL_GET_IMPL (TabControl);
643cdf0e10cSrcweir     DECL_CONSTRUCTORS (TabControl, Control, 0);
644cdf0e10cSrcweir     DECL_GET_WINDOW (TabControl);
645cdf0e10cSrcweir     DECL_GET_LAYOUT_VCLXWINDOW (TabControl);
646cdf0e10cSrcweir 
647cdf0e10cSrcweir public:
648cdf0e10cSrcweir     ~TabControl ();
649cdf0e10cSrcweir     void InsertPage (sal_uInt16 id, rtl::OUString const& title, sal_uInt16 pos=TAB_APPEND);
650cdf0e10cSrcweir     void RemovePage (sal_uInt16 id);
651cdf0e10cSrcweir     sal_uInt16 GetPageCount () const;
652cdf0e10cSrcweir     sal_uInt16 GetPageId (sal_uInt16 pos) const;
653cdf0e10cSrcweir     sal_uInt16 GetPagePos (sal_uInt16 id) const;
654cdf0e10cSrcweir     void SetCurPageId (sal_uInt16 id);
655cdf0e10cSrcweir     sal_uInt16 GetCurPageId () const;
656cdf0e10cSrcweir     void SetTabPage (sal_uInt16 id, ::TabPage* page);
657cdf0e10cSrcweir     ::TabPage* GetTabPage (sal_uInt16 id) const;
658cdf0e10cSrcweir     void SetActivatePageHdl (Link const& link);
659cdf0e10cSrcweir     Link& GetActivatePageHdl () const;
660cdf0e10cSrcweir     void SetDeactivatePageHdl (Link const& link);
661cdf0e10cSrcweir     Link& GetDeactivatePageHdl () const;
662cdf0e10cSrcweir     void SetTabPageSizePixel (Size const& size);
663cdf0e10cSrcweir     Size GetTabPageSizePixel () const;
664cdf0e10cSrcweir };
665cdf0e10cSrcweir 
666cdf0e10cSrcweir class TabPageImpl;
667cdf0e10cSrcweir class TOOLKIT_DLLPUBLIC TabPage : public Context, public Window
668cdf0e10cSrcweir {
669cdf0e10cSrcweir     DECL_GET_IMPL( TabPage );
670cdf0e10cSrcweir public:
671cdf0e10cSrcweir     static ::Window* global_parent;
672cdf0e10cSrcweir     static TabControl* global_tabcontrol;
673cdf0e10cSrcweir 
674cdf0e10cSrcweir     TabPage( Window *parent, char const* xml_file, char const* id, sal_uInt32 nId=0 );
675cdf0e10cSrcweir     TabPage( ::Window *parent, char const* xml_file, char const* id, sal_uInt32 nId=0 );
676cdf0e10cSrcweir     ~TabPage();
677cdf0e10cSrcweir     DECL_GET_WINDOW( TabPage );
678cdf0e10cSrcweir     virtual void ActivatePage();
679cdf0e10cSrcweir     virtual void DeactivatePage();
680cdf0e10cSrcweir };
681cdf0e10cSrcweir 
682cdf0e10cSrcweir class ProgressBarImpl;
683cdf0e10cSrcweir class TOOLKIT_DLLPUBLIC ProgressBar : public Control
684cdf0e10cSrcweir {
685cdf0e10cSrcweir     DECL_GET_IMPL( ProgressBar );
686cdf0e10cSrcweir     DECL_CONSTRUCTORS( ProgressBar, Control, WB_BORDER );
687cdf0e10cSrcweir public:
688cdf0e10cSrcweir     void SetForegroundColor( css::util::Color color );
689cdf0e10cSrcweir     void SetBackgroundColor( css::util::Color color );
690cdf0e10cSrcweir     void SetValue( sal_Int32 i );
691cdf0e10cSrcweir     void SetRange( sal_Int32 min, sal_Int32 max );
692cdf0e10cSrcweir     sal_Int32 GetValue();
693cdf0e10cSrcweir };
694cdf0e10cSrcweir 
695cdf0e10cSrcweir // -----------------------------------------------------------------
696cdf0e10cSrcweir //                 layout container / helper wrappers
697cdf0e10cSrcweir // -----------------------------------------------------------------
698cdf0e10cSrcweir 
699cdf0e10cSrcweir class TOOLKIT_DLLPUBLIC Container
700cdf0e10cSrcweir {
701cdf0e10cSrcweir protected:
702cdf0e10cSrcweir     css::uno::Reference< css::awt::XLayoutContainer > mxContainer;
703cdf0e10cSrcweir     Container( rtl::OUString const& rName, sal_Int32 nBorder );
704cdf0e10cSrcweir public:
705cdf0e10cSrcweir     Container( Context const* context, char const* id );
706cdf0e10cSrcweir 
707cdf0e10cSrcweir     void Add( Window *pWindow );
708cdf0e10cSrcweir     void Add( Container *pContainer );
709cdf0e10cSrcweir 
710cdf0e10cSrcweir     void Remove( Window *pWindow );
711cdf0e10cSrcweir     void Remove( Container *pContainer );
712cdf0e10cSrcweir     void Clear();
713cdf0e10cSrcweir     // we can't really do a GetChildren() as they don't have a common class,
714cdf0e10cSrcweir     // besides we would need to keep track of children, uh
715cdf0e10cSrcweir 
716cdf0e10cSrcweir     void ShowAll( bool bVisible );
717cdf0e10cSrcweir     void Show();
718cdf0e10cSrcweir     void Hide();
719cdf0e10cSrcweir 
getImpl()720cdf0e10cSrcweir     css::uno::Reference< css::awt::XLayoutContainer > getImpl()
721cdf0e10cSrcweir     { return mxContainer; }
722cdf0e10cSrcweir };
723cdf0e10cSrcweir 
724cdf0e10cSrcweir class TOOLKIT_DLLPUBLIC Table : public Container
725cdf0e10cSrcweir {
726cdf0e10cSrcweir protected:
727cdf0e10cSrcweir     Table( sal_Int32 nBorder, sal_Int32 nColumns );
728cdf0e10cSrcweir public:
729cdf0e10cSrcweir     Table( Context const* context, char const* id );
730cdf0e10cSrcweir     void Add( Window *pWindow, bool bXExpand, bool bYExpand,
731cdf0e10cSrcweir               sal_Int32 nXSpan=1, sal_Int32 nYSpan=1 );
732cdf0e10cSrcweir     void Add( Container *pContainer, bool bXExpand, bool bYExpand,
733cdf0e10cSrcweir               sal_Int32 nXSpan=1, sal_Int32 nYSpan=1 );
734cdf0e10cSrcweir 
735cdf0e10cSrcweir private:
736cdf0e10cSrcweir     void setProps( css::uno::Reference< css::awt::XLayoutConstrains > xChild,
737cdf0e10cSrcweir                    bool bXExpand, bool bYExpand, sal_Int32 nXSpan, sal_Int32 nYSpan );
738cdf0e10cSrcweir };
739cdf0e10cSrcweir 
740cdf0e10cSrcweir class TOOLKIT_DLLPUBLIC Box : public Container
741cdf0e10cSrcweir {
742cdf0e10cSrcweir protected:
743cdf0e10cSrcweir     Box( rtl::OUString const& rName, sal_Int32 nBorder, bool bHomogeneous );
744cdf0e10cSrcweir public:
745cdf0e10cSrcweir     Box( Context const* context, char const* id );
746cdf0e10cSrcweir     void Add( Window *pWindow, bool bExpand, bool bFill, sal_Int32 nPadding);
747cdf0e10cSrcweir     void Add( Container *pContainer, bool bExpand, bool bFill, sal_Int32 nPadding);
748cdf0e10cSrcweir 
749cdf0e10cSrcweir private:
750cdf0e10cSrcweir     void setProps( css::uno::Reference< css::awt::XLayoutConstrains > xChild,
751cdf0e10cSrcweir                    bool bXExpand, bool bYExpand, sal_Int32 nPadding );
752cdf0e10cSrcweir };
753cdf0e10cSrcweir 
754cdf0e10cSrcweir class TOOLKIT_DLLPUBLIC HBox : public Box
755cdf0e10cSrcweir {
756cdf0e10cSrcweir public:
757cdf0e10cSrcweir     HBox( Context const* context, char const* id );
758cdf0e10cSrcweir     HBox( sal_Int32 nBorder, bool bHomogeneous );
759cdf0e10cSrcweir };
760cdf0e10cSrcweir class TOOLKIT_DLLPUBLIC VBox : public Box
761cdf0e10cSrcweir {
762cdf0e10cSrcweir public:
763cdf0e10cSrcweir     VBox( Context const* context, char const* id );
764cdf0e10cSrcweir     VBox( sal_Int32 nBorder, bool bHomogeneous );
765cdf0e10cSrcweir };
766cdf0e10cSrcweir 
767cdf0e10cSrcweir class PluginImpl;
768cdf0e10cSrcweir class TOOLKIT_DLLPUBLIC Plugin : public Control
769cdf0e10cSrcweir {
770cdf0e10cSrcweir     DECL_GET_IMPL( Plugin );
771cdf0e10cSrcweir     //DECL_CONSTRUCTORS( Plugin, Control, 0 );
772cdf0e10cSrcweir public:
773cdf0e10cSrcweir     ::Control *mpPlugin;
774cdf0e10cSrcweir     Plugin( Context *context, char const* id, ::Control *plugin );
775cdf0e10cSrcweir };
776cdf0e10cSrcweir 
777cdf0e10cSrcweir class LocalizedStringImpl;
778cdf0e10cSrcweir class TOOLKIT_DLLPUBLIC LocalizedString : public Window
779cdf0e10cSrcweir {
780cdf0e10cSrcweir     DECL_GET_IMPL( LocalizedString );
781cdf0e10cSrcweir 
782cdf0e10cSrcweir public:
783cdf0e10cSrcweir     LocalizedString( Context *context, char const* id );
784cdf0e10cSrcweir 
785cdf0e10cSrcweir     rtl::OUString operator= (rtl::OUString const&);
786cdf0e10cSrcweir     rtl::OUString operator+= (sal_Unicode );
787cdf0e10cSrcweir     rtl::OUString operator+= (rtl::OUString const&);
788cdf0e10cSrcweir 
789cdf0e10cSrcweir     operator rtl::OUString ();
790cdf0e10cSrcweir     operator rtl::OUString const& ();
791cdf0e10cSrcweir     operator String();
792cdf0e10cSrcweir     String getString ();
793cdf0e10cSrcweir     rtl::OUString getOUString ();
794cdf0e10cSrcweir     String GetToken (sal_uInt16 i, sal_Char c);
795cdf0e10cSrcweir };
796cdf0e10cSrcweir 
797cdf0e10cSrcweir class InPlugImpl;
798cdf0e10cSrcweir class TOOLKIT_DLLPUBLIC InPlug : public Context, public Window
799cdf0e10cSrcweir {
800cdf0e10cSrcweir     DECL_GET_IMPL (InPlug);
801cdf0e10cSrcweir 
802cdf0e10cSrcweir public:
803cdf0e10cSrcweir     InPlug ( Window *parent, char const* xml_file, char const* id, sal_uInt32 nId=0);
804cdf0e10cSrcweir     InPlug ( ::Window *parent, char const* xml_file, char const* id, sal_uInt32 nId=0);
805cdf0e10cSrcweir 
806cdf0e10cSrcweir     void ParentSet (Window *window);
807cdf0e10cSrcweir };
808cdf0e10cSrcweir 
809cdf0e10cSrcweir } // end namespace layout
810cdf0e10cSrcweir 
811cdf0e10cSrcweir #if ENABLE_LAYOUT
812cdf0e10cSrcweir #define LAYOUT_NS layout::
813cdf0e10cSrcweir #define LAYOUT_DIALOG_PARENT\
814cdf0e10cSrcweir     VCLXWindow::GetImplementation( uno::Reference <awt::XWindow> ( GetPeer(), uno::UNO_QUERY ) )->GetWindow()
815cdf0e10cSrcweir #define LAYOUT_THIS_WINDOW( this ) this->GetWindow ()
816cdf0e10cSrcweir #else /* !ENABLE_LAYOUT */
817cdf0e10cSrcweir #define LAYOUT_NS
818cdf0e10cSrcweir #define LAYOUT_DIALOG_PARENT this
819cdf0e10cSrcweir #define LAYOUT_THIS_WINDOW( this ) this
820cdf0e10cSrcweir #endif /* !ENABLE_LAYOUT */
821cdf0e10cSrcweir 
822cdf0e10cSrcweir #endif /* _LAYOUT_HXX */
823