]> git.saurik.com Git - wxWidgets.git/blob - include/wx/button.h
Removed wxHTMLHelpControllerBase (putting the
[wxWidgets.git] / include / wx / button.h
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
12 #ifndef _WX_BUTTON_H_BASE_
13 #define _WX_BUTTON_H_BASE_
14
15 #if wxUSE_BUTTON
16
17 // ----------------------------------------------------------------------------
18 // wxButton flags
19 // ----------------------------------------------------------------------------
20
21 // These two flags are obsolete
22 #define wxBU_NOAUTODRAW 0x0000
23 #define wxBU_AUTODRAW 0x0004
24
25 // These flags affect label alignment
26 #define wxBU_LEFT 0x0040
27 #define wxBU_TOP 0x0080
28 #define wxBU_RIGHT 0x0100
29 #define wxBU_BOTTOM 0x0200
30
31 // by default, the buttons will be created with some (system dependent)
32 // minimal size to make them look nicer, giving this style will make them as
33 // small as possible
34 #define wxBU_EXACTFIT 0x0001
35
36 #include "wx/control.h"
37
38 class WXDLLEXPORT wxBitmap;
39
40 WXDLLEXPORT_DATA(extern const wxChar*) wxButtonNameStr;
41
42 // ----------------------------------------------------------------------------
43 // wxButton: a push button
44 // ----------------------------------------------------------------------------
45
46 class WXDLLEXPORT wxButtonBase : public wxControl
47 {
48 public:
49 // show the image in the button in addition to the label
50 virtual void SetImageLabel(const wxBitmap& WXUNUSED(bitmap)) { }
51
52 // set the margins around the image
53 virtual void SetImageMargins(wxCoord WXUNUSED(x), wxCoord WXUNUSED(y)) { }
54
55 // this wxButton method is called when the button becomes the default one
56 // on its panel
57 virtual void SetDefault() { }
58
59 // returns the default button size for this platform
60 static wxSize GetDefaultSize();
61 };
62
63 #if defined(__WXUNIVERSAL__)
64 #include "wx/univ/button.h"
65 #elif defined(__WXMSW__)
66 #include "wx/msw/button.h"
67 #elif defined(__WXMOTIF__)
68 #include "wx/motif/button.h"
69 #elif defined(__WXGTK__)
70 #include "wx/gtk/button.h"
71 #elif defined(__WXMAC__)
72 #include "wx/mac/button.h"
73 #elif defined(__WXCOCOA__)
74 #include "wx/cocoa/button.h"
75 #elif defined(__WXPM__)
76 #include "wx/os2/button.h"
77 #endif
78
79 #endif // wxUSE_BUTTON
80
81 #endif
82 // _WX_BUTTON_H_BASE_