xref: /trunk/main/vcl/inc/vcl/button.hxx (revision 99989fd5)
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 
24 #ifndef _SV_BUTTON_HXX
25 #define _SV_BUTTON_HXX
26 
27 #include <vcl/sv.h>
28 #include <vcl/dllapi.h>
29 #include <vcl/image.hxx>
30 #include <vcl/symbol.hxx>
31 #include <vcl/ctrl.hxx>
32 #include <vcl/bitmap.hxx>
33 #include <vcl/salnativewidgets.hxx>
34 
35 #include <vector>
36 
37 class UserDrawEvent;
38 class ImplCommonButtonData;
39 
40 // ----------
41 // - Button -
42 // ----------
43 
44 class VCL_DLLPUBLIC Button : public Control
45 {
46 private:
47     ImplCommonButtonData *mpButtonData;
48     Link                  maClickHdl;
49 
50     // Copy assignment is forbidden and not implemented.
51 	SAL_DLLPRIVATE                  Button (const Button &);
52 	SAL_DLLPRIVATE                  Button & operator= (const Button &);
53 public:
54     SAL_DLLPRIVATE sal_uInt16           ImplGetButtonState() const;
55     SAL_DLLPRIVATE sal_uInt16&          ImplGetButtonState();
56     SAL_DLLPRIVATE sal_uInt16           ImplGetTextStyle( XubString& rText, WinBits nWinStyle, sal_uLong nDrawFlags );
57     SAL_DLLPRIVATE void             ImplDrawAlignedImage( OutputDevice* pDev, Point& rPos, Size& rSize,
58                                               sal_Bool bLayout, sal_uLong nImageSep, sal_uLong nDrawFlags,
59                                               sal_uInt16 nTextStyle, Rectangle *pSymbolRect=NULL, bool bAddImageSep = false );
60     SAL_DLLPRIVATE void             ImplSetFocusRect( const Rectangle &rFocusRect );
61     SAL_DLLPRIVATE const Rectangle& ImplGetFocusRect() const;
62     SAL_DLLPRIVATE void             ImplSetSymbolAlign( SymbolAlign eAlign );
63     SAL_DLLPRIVATE SymbolAlign      ImplGetSymbolAlign() const;
64     SAL_DLLPRIVATE void             ImplSetSmallSymbol( sal_Bool bSmall = sal_True );
65     SAL_DLLPRIVATE const Rectangle& ImplGetSymbolRect() const;
66     SAL_DLLPRIVATE void             ImplSetSymbolRect(const Rectangle&);
67 
68 protected:
69     explicit            Button( WindowType nType );
70 
71 public:
72     explicit            Button( Window* pParent, WinBits nStyle = 0 );
73     explicit            Button( Window* pParent, const ResId& );
74     virtual             ~Button();
75 
76     virtual void        Click();
77 
SetClickHdl(const Link & rLink)78     void                SetClickHdl( const Link& rLink ) { maClickHdl = rLink; }
GetClickHdl() const79     const Link&         GetClickHdl() const { return maClickHdl; }
80 
81     static XubString    GetStandardText( StandardButtonType eButton );
82     static XubString    GetStandardHelpText( StandardButtonType eButton );
83 
84     sal_Bool                SetModeImage( const Image& rImage, BmpColorMode eMode = BMP_COLOR_NORMAL );
85     const Image         GetModeImage( BmpColorMode eMode = BMP_COLOR_NORMAL ) const;
86     sal_Bool                HasImage() const;
87     void                SetImageAlign( ImageAlign eAlign );
88     ImageAlign          GetImageAlign() const;
89 
90     sal_Bool                SetModeBitmap( const BitmapEx& rBitmap, BmpColorMode eMode = BMP_COLOR_NORMAL );
91     BitmapEx            GetModeBitmap( BmpColorMode eMode = BMP_COLOR_NORMAL ) const;
92 
93     void                EnableImageDisplay( sal_Bool bEnable );
94     sal_Bool                IsImageDisplayEnabled();
95     void                EnableTextDisplay( sal_Bool bEnable );
96     sal_Bool                IsTextDisplayEnabled();
97 
98     void                SetFocusRect( const Rectangle& rFocusRect );
99     const Rectangle&    GetFocusRect() const;
100     void SetSmallSymbol (bool bSmall=true);
101     bool IsSmallSymbol () const;
102 };
103 
104 // --------------------
105 // - PushButton-Types -
106 // --------------------
107 
108 #define PUSHBUTTON_DROPDOWN_TOOLBOX         ((sal_uInt16)0x0001)
109 #define PUSHBUTTON_DROPDOWN_MENUBUTTON      ((sal_uInt16)0x0002)
110 
111 // --------------
112 // - PushButton -
113 // --------------
114 
115 class VCL_DLLPUBLIC PushButton : public Button
116 {
117 protected:
118     SymbolType      meSymbol;
119     TriState        meState;
120     TriState        meSaveValue;
121     sal_uInt16          mnDDStyle;
122     sal_Bool            mbPressed;
123     sal_Bool            mbInUserDraw;
124     Link            maToggleHdl;
125 
126     SAL_DLLPRIVATE void            ImplInitPushButtonData();
127     SAL_DLLPRIVATE WinBits         ImplInitStyle( const Window* pPrevWindow, WinBits nStyle );
128     SAL_DLLPRIVATE void            ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground );
129     SAL_DLLPRIVATE void            ImplDrawPushButtonContent( OutputDevice* pDev, sal_uLong nDrawFlags,
130                                                const Rectangle& rRect, bool bLayout, bool bMenuBtnSep );
131     SAL_DLLPRIVATE void            ImplDrawPushButton( bool bLayout = false );
132     using Button::ImplGetTextStyle;
133     SAL_DLLPRIVATE sal_uInt16          ImplGetTextStyle( sal_uLong nDrawFlags ) const;
IsSymbol() const134     SAL_DLLPRIVATE sal_Bool            IsSymbol() const { return ( (meSymbol != SYMBOL_NOSYMBOL) && (meSymbol != SYMBOL_IMAGE) ); }
IsImage() const135     SAL_DLLPRIVATE sal_Bool            IsImage() const { return Button::HasImage(); }
136 
137     // Copy assignment is forbidden and not implemented.
138 	SAL_DLLPRIVATE                 PushButton( const PushButton & );
139 	SAL_DLLPRIVATE                 PushButton& operator=( const PushButton & );
140 
141     SAL_DLLPRIVATE void            ImplInit( Window* pParent, WinBits nStyle );
142 
143     using Control::ImplInitSettings;
144     using Window::ImplInit;
145 public:
146     SAL_DLLPRIVATE void            ImplSetDefButton( sal_Bool bSet );
147     SAL_DLLPRIVATE static void     ImplDrawPushButtonFrame( Window* pDev, Rectangle& rRect, sal_uInt16 nStyle );
148     SAL_DLLPRIVATE static sal_Bool     ImplHitTestPushButton( Window* pDev, const Point& rPos );
149     SAL_DLLPRIVATE sal_Bool            ImplIsDefButton() const;
150 
151 protected:
152     explicit        PushButton( WindowType nType );
153 
154     virtual void    FillLayoutData() const;
155     virtual const Font&
156                     GetCanonicalFont( const StyleSettings& _rStyle ) const;
157     virtual const Color&
158                     GetCanonicalTextColor( const StyleSettings& _rStyle ) const;
159 public:
160     explicit        PushButton( Window* pParent, WinBits nStyle = 0 );
161     explicit        PushButton( Window* pParent, const ResId& );
162     virtual         ~PushButton();
163 
164     virtual void    MouseButtonDown( const MouseEvent& rMEvt );
165     virtual void    Tracking( const TrackingEvent& rTEvt );
166     virtual void    KeyInput( const KeyEvent& rKEvt );
167     virtual void    KeyUp( const KeyEvent& rKEvt );
168     virtual void    Paint( const Rectangle& rRect );
169     virtual void    Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong nFlags );
170     virtual void    Resize();
171     virtual void    GetFocus();
172     virtual void    LoseFocus();
173     virtual void    StateChanged( StateChangedType nType );
174     virtual void    DataChanged( const DataChangedEvent& rDCEvt );
175     virtual long    PreNotify( NotifyEvent& rNEvt );
176     virtual void    UserDraw( const UserDrawEvent& rUDEvt );
177 
178     virtual void    Toggle();
179 
180     void            SetSymbol( SymbolType eSymbol );
GetSymbol() const181     SymbolType      GetSymbol() const { return meSymbol; }
182     void            SetSymbolAlign( SymbolAlign eAlign );
183     SymbolAlign     GetSymbolAlign() const;
184 
185     void            SetDropDown( sal_uInt16 nStyle );
GetDropDown() const186     sal_uInt16          GetDropDown() const { return mnDDStyle; }
187 
188     void            SetState( TriState eState );
GetState() const189     TriState        GetState() const { return meState; }
190 
191     void            Check( sal_Bool bCheck = sal_True );
192     sal_Bool            IsChecked() const;
193 
194     void            SetPressed( sal_Bool bPressed );
IsPressed() const195     sal_Bool            IsPressed() const { return mbPressed; }
196 
197     void            EndSelection();
198 
SaveValue()199     void            SaveValue() { meSaveValue = GetState(); }
GetSavedValue() const200     TriState        GetSavedValue() const { return meSaveValue; }
201 
202     Size            CalcMinimumSize( long nMaxWidth = 0 ) const;
203     virtual Size    GetOptimalSize(WindowSizeType eType) const;
204 
SetToggleHdl(const Link & rLink)205     void            SetToggleHdl( const Link& rLink ) { maToggleHdl = rLink; }
GetToggleHdl() const206     const Link&     GetToggleHdl() const { return maToggleHdl; }
207 };
208 
Check(sal_Bool bCheck)209 inline void PushButton::Check( sal_Bool bCheck )
210 {
211     SetState( (bCheck) ? STATE_CHECK : STATE_NOCHECK );
212 }
213 
IsChecked() const214 inline sal_Bool PushButton::IsChecked() const
215 {
216     return (GetState() == STATE_CHECK);
217 }
218 
219 // ------------
220 // - OKButton -
221 // ------------
222 
223 class VCL_DLLPUBLIC OKButton : public PushButton
224 {
225 protected:
226     using PushButton::ImplInit;
227 private:
228     SAL_DLLPRIVATE void            ImplInit( Window* pParent, WinBits nStyle );
229 
230     // Copy assignment is forbidden and not implemented.
231 	SAL_DLLPRIVATE                 OKButton (const OKButton &);
232 	SAL_DLLPRIVATE                 OKButton & operator= (const OKButton &);
233 
234 public:
235     explicit        OKButton( Window* pParent, WinBits nStyle = WB_DEFBUTTON );
236     explicit        OKButton( Window* pParent, const ResId& );
237 
238     virtual void    Click();
239 };
240 
241 // ----------------
242 // - CancelButton -
243 // ----------------
244 
245 class VCL_DLLPUBLIC CancelButton : public PushButton
246 {
247 protected:
248     using PushButton::ImplInit;
249 private:
250     SAL_DLLPRIVATE void ImplInit( Window* pParent, WinBits nStyle );
251 
252     // Copy assignment is forbidden and not implemented.
253 	SAL_DLLPRIVATE      CancelButton (const CancelButton &);
254 	SAL_DLLPRIVATE      CancelButton & operator= (const CancelButton &);
255 
256 public:
257     explicit        CancelButton( Window* pParent, WinBits nStyle = 0 );
258     explicit        CancelButton( Window* pParent, const ResId& );
259 
260     virtual void    Click();
261 };
262 
263 // --------------
264 // - HelpButton -
265 // --------------
266 
267 class VCL_DLLPUBLIC HelpButton : public PushButton
268 {
269 protected:
270     using PushButton::ImplInit;
271 private:
272     SAL_DLLPRIVATE void ImplInit( Window* pParent, WinBits nStyle );
273 
274     // Copy assignment is forbidden and not implemented.
275 	SAL_DLLPRIVATE      HelpButton( const HelpButton & );
276 	SAL_DLLPRIVATE      HelpButton & operator= ( const HelpButton & );
277 
278 public:
279     explicit        HelpButton( Window* pParent, WinBits nStyle = 0 );
280     explicit        HelpButton( Window* pParent, const ResId& );
281 
282     virtual void    Click();
283 };
284 
285 // ---------------
286 // - RadioButton -
287 // ---------------
288 
289 class VCL_DLLPUBLIC RadioButton : public Button
290 {
291 private:
292     Rectangle       maStateRect;
293     Rectangle       maMouseRect;
294     Image           maImage;
295     Image           maImageHC;
296     sal_Bool            mbChecked;
297     sal_Bool            mbSaveValue;
298     sal_Bool            mbRadioCheck;
299     sal_Bool            mbStateChanged;
300     Link            maToggleHdl;
301 
302     SAL_DLLPRIVATE void     ImplInitRadioButtonData();
303     SAL_DLLPRIVATE WinBits  ImplInitStyle( const Window* pPrevWindow, WinBits nStyle );
304     SAL_DLLPRIVATE void     ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground );
305     SAL_DLLPRIVATE void     ImplDrawRadioButtonState();
306     SAL_DLLPRIVATE void     ImplDraw( OutputDevice* pDev, sal_uLong nDrawFlags,
307                               const Point& rPos, const Size& rSize,
308                               const Size& rImageSize, Rectangle& rStateRect,
309                               Rectangle& rMouseRect, bool bLayout = false );
310     SAL_DLLPRIVATE void     ImplDrawRadioButton( bool bLayout = false );
311     SAL_DLLPRIVATE void     ImplInvalidateOrDrawRadioButtonState();
312     SAL_DLLPRIVATE void     ImplUncheckAllOther();
313     SAL_DLLPRIVATE Size     ImplGetRadioImageSize() const;
314     SAL_DLLPRIVATE long     ImplGetImageToTextDistance() const;
315 
316     // Copy assignment is forbidden and not implemented.
317 	SAL_DLLPRIVATE          RadioButton(const RadioButton &);
318 	SAL_DLLPRIVATE          RadioButton& operator= (const RadioButton &);
319 
320 protected:
321     using Control::ImplInitSettings;
322     using Window::ImplInit;
323     SAL_DLLPRIVATE void     ImplInit( Window* pParent, WinBits nStyle );
324     SAL_DLLPRIVATE void     ImplLoadRes( const ResId& rResId );
325 
326 public:
327     SAL_DLLPRIVATE void     ImplCallClick( sal_Bool bGrabFocus = sal_False, sal_uInt16 nFocusFlags = 0 );
328     SAL_DLLPRIVATE void     ImplSetMinimumNWFSize();
329 
330 protected:
331     virtual void FillLayoutData() const;
332     virtual const Font&
333                     GetCanonicalFont( const StyleSettings& _rStyle ) const;
334     virtual const Color&
335                     GetCanonicalTextColor( const StyleSettings& _rStyle ) const;
336 
SetMouseRect(const Rectangle & _rMouseRect)337 	inline void				SetMouseRect( const Rectangle& _rMouseRect )	{ maMouseRect = _rMouseRect; }
GetMouseRect() const338 	inline const Rectangle&	GetMouseRect( ) const							{ return maMouseRect; }
SetStateRect(const Rectangle & _rStateRect)339 	inline void				SetStateRect( const Rectangle& _rStateRect )	{ maStateRect = _rStateRect; }
GetStateRect() const340 	inline const Rectangle&	GetStateRect( ) const							{ return maStateRect; }
341 
342 	// draws the radio button (the knob image), in its current state (pressed/checked)
343 	// at the usual location, which can be overridden with SetStateRect
344     void			DrawRadioButtonState( );
345 
346 public:
347     explicit        RadioButton( Window* pParent, WinBits nWinStyle = 0 );
348     explicit        RadioButton( Window* pParent, const ResId& );
349     virtual         ~RadioButton();
350 
351     virtual void    MouseButtonDown( const MouseEvent& rMEvt );
352     virtual void    Tracking( const TrackingEvent& rTEvt );
353     virtual void    KeyInput( const KeyEvent& rKEvt );
354     virtual void    KeyUp( const KeyEvent& rKEvt );
355     virtual void    Paint( const Rectangle& rRect );
356     virtual void    Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong nFlags );
357     virtual void    Resize();
358     virtual void    GetFocus();
359     virtual void    LoseFocus();
360     virtual void    StateChanged( StateChangedType nType );
361     virtual void    DataChanged( const DataChangedEvent& rDCEvt );
362     virtual long    PreNotify( NotifyEvent& rNEvt );
363 
364     virtual void    Toggle();
365 
IsStateChanged() const366     sal_Bool            IsStateChanged() const { return mbStateChanged; }
367 
EnableRadioCheck(sal_Bool bRadioCheck=sal_True)368     void            EnableRadioCheck( sal_Bool bRadioCheck = sal_True ) { mbRadioCheck = bRadioCheck; }
IsRadioCheckEnabled() const369     sal_Bool            IsRadioCheckEnabled() const { return mbRadioCheck; }
370 
371     sal_Bool            SetModeRadioImage( const Image& rImage, BmpColorMode eMode = BMP_COLOR_NORMAL );
372     const Image&    GetModeRadioImage( BmpColorMode eMode = BMP_COLOR_NORMAL ) const;
373 
374     void            SetState( sal_Bool bCheck );
375     void            Check( sal_Bool bCheck = sal_True );
IsChecked() const376     sal_Bool            IsChecked() const { return mbChecked; }
377 
SaveValue()378     void            SaveValue() { mbSaveValue = IsChecked(); }
GetSavedValue() const379     sal_Bool            GetSavedValue() const { return mbSaveValue; }
380 
381     static Image    GetRadioImage( const AllSettings& rSettings, sal_uInt16 nFlags );
382 
383     Size            CalcMinimumSize( long nMaxWidth = 0 ) const;
384     virtual Size    GetOptimalSize(WindowSizeType eType) const;
385 
SetToggleHdl(const Link & rLink)386     void            SetToggleHdl( const Link& rLink ) { maToggleHdl = rLink; }
GetToggleHdl() const387     const Link&     GetToggleHdl() const { return maToggleHdl; }
388 
389     /** GetRadioButtonGroup returns a list of pointers to <code>RadioButton</code>s in the same group.
390 
391     The pointers in the returned list are valid at the time call returns. However rescheduling
392     or giving up the SolarMutex may mean events get executed that lead to the pointers getting
393     invalid.
394 
395     @param io_rGroup
396     gets cleared on entering the function. on return contains the <code>RadioButton</code>s
397     in the same group as this <code>RadioButton</code>.
398 
399     @param bIncludeThis
400     defines whether <code>this</code> is contained in the returned list
401     */
402     void            GetRadioButtonGroup( std::vector<RadioButton*>& io_rGroup, bool bIncludeThis ) const;
403 };
404 
405 // ------------
406 // - CheckBox -
407 // ------------
408 
409 class VCL_DLLPUBLIC CheckBox : public Button
410 {
411 private:
412     Rectangle       maStateRect;
413     Rectangle       maMouseRect;
414     TriState        meState;
415     TriState        meSaveValue;
416     sal_Bool            mbTriState;
417     Link            maToggleHdl;
418 
419     SAL_DLLPRIVATE void         ImplInitCheckBoxData();
420     SAL_DLLPRIVATE WinBits      ImplInitStyle( const Window* pPrevWindow, WinBits nStyle );
421     SAL_DLLPRIVATE void         ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground );
422     SAL_DLLPRIVATE void         ImplInvalidateOrDrawCheckBoxState();
423     SAL_DLLPRIVATE void         ImplDraw( OutputDevice* pDev, sal_uLong nDrawFlags,
424                                     const Point& rPos, const Size& rSize,
425                                     const Size& rImageSize, Rectangle& rStateRect,
426                                     Rectangle& rMouseRect, bool bLayout );
427     SAL_DLLPRIVATE void         ImplDrawCheckBox( bool bLayout = false );
428     SAL_DLLPRIVATE long         ImplGetImageToTextDistance() const;
429     SAL_DLLPRIVATE Size         ImplGetCheckImageSize() const;
430 
431     // Copy assignment is forbidden and not implemented.
432 	SAL_DLLPRIVATE              CheckBox(const CheckBox &);
433 	SAL_DLLPRIVATE              CheckBox& operator= (const CheckBox &);
434 
435 protected:
436     using Control::ImplInitSettings;
437     using Window::ImplInit;
438     SAL_DLLPRIVATE void         ImplInit( Window* pParent, WinBits nStyle );
439     SAL_DLLPRIVATE void         ImplLoadRes( const ResId& rResId );
440     virtual void FillLayoutData() const;
441     virtual const Font&         GetCanonicalFont( const StyleSettings& _rStyle ) const;
442     virtual const Color&        GetCanonicalTextColor( const StyleSettings& _rStyle ) const;
443 
444     virtual void ImplDrawCheckBoxState();
GetStateRect() const445     SAL_DLLPRIVATE const Rectangle& GetStateRect() const { return maStateRect; }
GetMouseRect() const446 	SAL_DLLPRIVATE const Rectangle&	GetMouseRect() const { return maMouseRect; }
447 public:
448     SAL_DLLPRIVATE void         ImplCheck();
449     SAL_DLLPRIVATE void         ImplSetMinimumNWFSize();
450 public:
451     explicit        CheckBox( Window* pParent, WinBits nStyle = 0 );
452     explicit        CheckBox( Window* pParent, const ResId& );
453 
454     virtual void    MouseButtonDown( const MouseEvent& rMEvt );
455     virtual void    Tracking( const TrackingEvent& rTEvt );
456     virtual void    KeyInput( const KeyEvent& rKEvt );
457     virtual void    KeyUp( const KeyEvent& rKEvt );
458     virtual void    Paint( const Rectangle& rRect );
459     virtual void    Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong nFlags );
460     virtual void    Resize();
461     virtual void    GetFocus();
462     virtual void    LoseFocus();
463     virtual void    StateChanged( StateChangedType nType );
464     virtual void    DataChanged( const DataChangedEvent& rDCEvt );
465     virtual long    PreNotify( NotifyEvent& rNEvt );
466 
467     virtual void    Toggle();
468 
469     void            SetState( TriState eState );
GetState() const470     TriState        GetState() const { return meState; }
471 
472     void            Check( sal_Bool bCheck = sal_True );
473     sal_Bool            IsChecked() const;
474 
475     void            EnableTriState( sal_Bool bTriState = sal_True );
IsTriStateEnabled() const476     sal_Bool            IsTriStateEnabled() const { return mbTriState; }
477 
SaveValue()478     void            SaveValue() { meSaveValue = GetState(); }
GetSavedValue() const479     TriState        GetSavedValue() const { return meSaveValue; }
480 
481     static Image    GetCheckImage( const AllSettings& rSettings, sal_uInt16 nFlags );
482 
483     Size            CalcMinimumSize( long nMaxWidth = 0 ) const;
484     virtual Size    GetOptimalSize(WindowSizeType eType) const;
485 
SetToggleHdl(const Link & rLink)486     void            SetToggleHdl( const Link& rLink ) { maToggleHdl = rLink; }
GetToggleHdl() const487     const Link&     GetToggleHdl() const { return maToggleHdl; }
488 };
489 
Check(sal_Bool bCheck)490 inline void CheckBox::Check( sal_Bool bCheck )
491 {
492     SetState( (bCheck) ? STATE_CHECK : STATE_NOCHECK );
493 }
494 
IsChecked() const495 inline sal_Bool CheckBox::IsChecked() const
496 {
497     return (GetState() == STATE_CHECK);
498 }
499 
500 // ---------------------------------
501 // - Control layer for old code -
502 // ---------------------------------
503 
504 class VCL_DLLPUBLIC ImageButton : public PushButton
505 {
506 protected:
507     using PushButton::ImplInitStyle;
508 private:
509     SAL_DLLPRIVATE void     ImplInitStyle();
510 
511     // Copy assignment is forbidden and not implemented.
512 	SAL_DLLPRIVATE          ImageButton( const ImageButton & );
513 	SAL_DLLPRIVATE          ImageButton & operator= ( const ImageButton & );
514 
515 protected:
516     explicit        ImageButton( WindowType nType );
517 
518 public:
519     explicit        ImageButton( Window* pParent, WinBits nStyle = 0 );
520     explicit        ImageButton( Window* pParent, const ResId& );
521     virtual         ~ImageButton();
522 };
523 
524 class VCL_DLLPUBLIC ImageRadioButton : public RadioButton
525 {
526     // Copy assignment is forbidden and not implemented.
527 	SAL_DLLPRIVATE  ImageRadioButton( const ImageRadioButton & );
528 	SAL_DLLPRIVATE  ImageRadioButton & operator= ( const ImageRadioButton & );
529 
530 public:
531     explicit        ImageRadioButton( Window* pParent, WinBits nStyle = 0 );
532     explicit        ImageRadioButton( Window* pParent, const ResId& );
533     virtual         ~ImageRadioButton();
534 };
535 
536 class VCL_DLLPUBLIC TriStateBox : public CheckBox
537 {
538     // Copy assignment is forbidden and not implemented.
539 	SAL_DLLPRIVATE  TriStateBox( const TriStateBox & );
540 	SAL_DLLPRIVATE  TriStateBox & operator= ( const TriStateBox & );
541 
542 public:
543     explicit        TriStateBox( Window* pParent, WinBits nStyle = 0 );
544     explicit        TriStateBox( Window* pParent, const ResId& );
545     virtual         ~TriStateBox();
546 };
547 
548 class VCL_DLLPUBLIC DisclosureButton : public CheckBox
549 {
550 protected:
551     SAL_DLLPRIVATE virtual void ImplDrawCheckBoxState();
552 public:
553     explicit DisclosureButton( Window* pParent, WinBits nStyle = 0 );
554     explicit DisclosureButton( Window* pParent, const ResId& );
555 
556     virtual void    KeyInput( const KeyEvent& rKEvt );
557 };
558 
559 #endif  // _SV_BUTTON_HXX
560 
561 /* vim: set noet sw=4 ts=4: */
562