]>
Commit | Line | Data |
---|---|---|
1e6feb95 VZ |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: wx/button.h | |
3 | // Purpose: wxButtonBase class | |
4 | // Author: Vadim Zetlin | |
5 | // Modified by: | |
6 | // Created: 15.08.00 | |
7 | // RCS-ID: $Id$ | |
8 | // Copyright: (c) Vadim Zetlin | |
9 | // Licence: wxWindows licence | |
10 | ///////////////////////////////////////////////////////////////////////////// | |
11 | ||
34138703 JS |
12 | #ifndef _WX_BUTTON_H_BASE_ |
13 | #define _WX_BUTTON_H_BASE_ | |
c801d85f | 14 | |
1e6feb95 VZ |
15 | #if wxUSE_BUTTON |
16 | ||
7ef8bfc4 VZ |
17 | // ---------------------------------------------------------------------------- |
18 | // wxButton flags | |
19 | // ---------------------------------------------------------------------------- | |
20 | ||
21 | // all these flags are obsolete | |
22 | #define wxBU_NOAUTODRAW 0x0000 | |
23 | #define wxBU_AUTODRAW 0x0004 | |
24 | #define wxBU_LEFT 0x0040 | |
25 | #define wxBU_TOP 0x0080 | |
26 | #define wxBU_RIGHT 0x0100 | |
27 | #define wxBU_BOTTOM 0x0200 | |
28 | ||
29 | // by default, the buttons will be created with some (system dependent) | |
30 | // minimal size to make them look nicer, giving this style will make them as | |
31 | // small as possible | |
32 | #define wxBU_EXACTFIT 0x0001 | |
33 | ||
1e6feb95 VZ |
34 | #include "wx/control.h" |
35 | ||
36 | class WXDLLEXPORT wxBitmap; | |
37 | ||
38 | WXDLLEXPORT_DATA(extern const wxChar*) wxButtonNameStr; | |
39 | ||
40 | // ---------------------------------------------------------------------------- | |
41 | // wxButton: a push button | |
42 | // ---------------------------------------------------------------------------- | |
43 | ||
44 | class WXDLLEXPORT wxButtonBase : public wxControl | |
45 | { | |
46 | public: | |
47 | // show the image in the button in addition to the label | |
48 | virtual void SetImageLabel(const wxBitmap& bitmap) { } | |
49 | ||
50 | // set the margins around the image | |
51 | virtual void SetImageMargins(wxCoord x, wxCoord y) { } | |
52 | ||
53 | // this wxButton method is called when the button becomes the default one | |
54 | // on its panel | |
55 | virtual void SetDefault() { } | |
56 | ||
57 | // returns the default button size for this platform | |
58 | static wxSize GetDefaultSize(); | |
59 | }; | |
60 | ||
61 | #if defined(__WXUNIVERSAL__) | |
62 | #include "wx/univ/button.h" | |
63 | #elif defined(__WXMSW__) | |
64 | #include "wx/msw/button.h" | |
2049ba38 | 65 | #elif defined(__WXMOTIF__) |
1e6feb95 | 66 | #include "wx/motif/button.h" |
2049ba38 | 67 | #elif defined(__WXGTK__) |
1e6feb95 | 68 | #include "wx/gtk/button.h" |
b4e76e0d | 69 | #elif defined(__WXQT__) |
1e6feb95 | 70 | #include "wx/qt/button.h" |
34138703 | 71 | #elif defined(__WXMAC__) |
1e6feb95 | 72 | #include "wx/mac/button.h" |
1777b9bb | 73 | #elif defined(__WXPM__) |
1e6feb95 | 74 | #include "wx/os2/button.h" |
34138703 | 75 | #elif defined(__WXSTUBS__) |
1e6feb95 | 76 | #include "wx/stubs/button.h" |
c801d85f KB |
77 | #endif |
78 | ||
1e6feb95 VZ |
79 | #endif // wxUSE_BUTTON |
80 | ||
c801d85f | 81 | #endif |
34138703 | 82 | // _WX_BUTTON_H_BASE_ |