]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/button.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxButtonBase class
4 // Author: Vadim Zetlin
8 // Copyright: (c) Vadim Zetlin
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_BUTTON_H_BASE_
13 #define _WX_BUTTON_H_BASE_
19 // ----------------------------------------------------------------------------
21 // ----------------------------------------------------------------------------
23 // These two flags are obsolete
24 #define wxBU_NOAUTODRAW 0x0000
25 #define wxBU_AUTODRAW 0x0004
27 // These flags affect label alignment
28 #define wxBU_LEFT 0x0040
29 #define wxBU_TOP 0x0080
30 #define wxBU_RIGHT 0x0100
31 #define wxBU_BOTTOM 0x0200
33 // by default, the buttons will be created with some (system dependent)
34 // minimal size to make them look nicer, giving this style will make them as
36 #define wxBU_EXACTFIT 0x0001
38 #include "wx/control.h"
40 class WXDLLEXPORT wxBitmap
;
42 WXDLLEXPORT_DATA(extern const wxChar
*) wxButtonNameStr
;
44 // ----------------------------------------------------------------------------
45 // wxButton: a push button
46 // ----------------------------------------------------------------------------
48 class WXDLLEXPORT wxButtonBase
: public wxControl
51 // show the image in the button in addition to the label
52 virtual void SetImageLabel(const wxBitmap
& WXUNUSED(bitmap
)) { }
54 // set the margins around the image
55 virtual void SetImageMargins(wxCoord
WXUNUSED(x
), wxCoord
WXUNUSED(y
)) { }
57 // this wxButton method is called when the button becomes the default one
59 virtual void SetDefault() { }
61 // returns the default button size for this platform
62 static wxSize
GetDefaultSize();
65 #if defined(__WXUNIVERSAL__)
66 #include "wx/univ/button.h"
67 #elif defined(__WXMSW__)
68 #include "wx/msw/button.h"
69 #elif defined(__WXMOTIF__)
70 #include "wx/motif/button.h"
71 #elif defined(__WXGTK__)
72 #include "wx/gtk/button.h"
73 #elif defined(__WXMAC__)
74 #include "wx/mac/button.h"
75 #elif defined(__WXCOCOA__)
76 #include "wx/cocoa/button.h"
77 #elif defined(__WXPM__)
78 #include "wx/os2/button.h"
81 #endif // wxUSE_BUTTON