1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/gtk/button.h
3 // Purpose: wxGTK wxButton class declaration
4 // Author: Robert Roebling
6 // Copyright: (c) 1998 Robert Roebling
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
10 #ifndef _WX_GTK_BUTTON_H_
11 #define _WX_GTK_BUTTON_H_
13 //-----------------------------------------------------------------------------
15 //-----------------------------------------------------------------------------
17 class WXDLLIMPEXP_CORE wxButton
: public wxButtonBase
21 wxButton(wxWindow
*parent
, wxWindowID id
,
22 const wxString
& label
= wxEmptyString
,
23 const wxPoint
& pos
= wxDefaultPosition
,
24 const wxSize
& size
= wxDefaultSize
, long style
= 0,
25 const wxValidator
& validator
= wxDefaultValidator
,
26 const wxString
& name
= wxButtonNameStr
)
28 Create(parent
, id
, label
, pos
, size
, style
, validator
, name
);
31 bool Create(wxWindow
*parent
, wxWindowID id
,
32 const wxString
& label
= wxEmptyString
,
33 const wxPoint
& pos
= wxDefaultPosition
,
34 const wxSize
& size
= wxDefaultSize
, long style
= 0,
35 const wxValidator
& validator
= wxDefaultValidator
,
36 const wxString
& name
= wxButtonNameStr
);
38 virtual wxWindow
*SetDefault();
39 virtual void SetLabel( const wxString
&label
);
44 static wxVisualAttributes
45 GetClassDefaultAttributes(wxWindowVariant variant
= wxWINDOW_VARIANT_NORMAL
);
47 // helper to allow access to protected member from GTK callback
48 void MoveWindow(int x
, int y
, int width
, int height
) { DoMoveWindow(x
, y
, width
, height
); }
50 // called from GTK callbacks: they update the button state and call
52 void GTKMouseEnters();
53 void GTKMouseLeaves();
58 virtual wxSize
DoGetBestSize() const;
59 virtual void DoApplyWidgetStyle(GtkRcStyle
*style
);
62 virtual bool DoSetLabelMarkup(const wxString
& markup
);
63 #endif // wxUSE_MARKUP
66 typedef wxButtonBase base_type
;
68 // Return the GtkLabel used by this button.
69 GtkLabel
*GTKGetLabel() const;
71 DECLARE_DYNAMIC_CLASS(wxButton
)
74 #endif // _WX_GTK_BUTTON_H_