wxMessageBox off the main thread lost result code.
[wxWidgets.git] / include / wx / motif / button.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/motif/button.h
3 // Purpose: wxButton class
4 // Author: Julian Smart
5 // Modified by:
6 // Created: 17/09/98
7 // Copyright: (c) Julian Smart
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
10
11 #ifndef _WX_BUTTON_H_
12 #define _WX_BUTTON_H_
13
14 // Pushbutton
15 class WXDLLIMPEXP_CORE wxButton: public wxButtonBase
16 {
17 public:
18 wxButton() { }
19 wxButton(wxWindow *parent,
20 wxWindowID id,
21 const wxString& label = wxEmptyString,
22 const wxPoint& pos = wxDefaultPosition,
23 const wxSize& size = wxDefaultSize, long style = 0,
24 const wxValidator& validator = wxDefaultValidator,
25 const wxString& name = wxButtonNameStr)
26 {
27 Create(parent, id, label, pos, size, style, validator, name);
28 }
29
30 bool Create(wxWindow *parent, wxWindowID id,
31 const wxString& label = wxEmptyString,
32 const wxPoint& pos = wxDefaultPosition,
33 const wxSize& size = wxDefaultSize, long style = 0,
34 const wxValidator& validator = wxDefaultValidator,
35 const wxString& name = wxButtonNameStr);
36
37 virtual wxWindow *SetDefault();
38 virtual void Command(wxCommandEvent& event);
39
40 static wxSize GetDefaultSize();
41
42 // Implementation
43 virtual wxSize GetMinSize() const;
44
45 protected:
46 virtual wxSize DoGetBestSize() const;
47
48 private:
49 wxSize OldGetBestSize() const;
50 wxSize OldGetMinSize() const;
51 void SetDefaultShadowThicknessAndResize();
52
53 DECLARE_DYNAMIC_CLASS(wxButton)
54 };
55
56 #endif // _WX_BUTTON_H_