]> git.saurik.com Git - wxWidgets.git/blob - interface/wx/bmpbuttn.h
fixing wrong version commit
[wxWidgets.git] / interface / wx / bmpbuttn.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: bmpbuttn.h
3 // Purpose: interface of wxBitmapButton
4 // Author: wxWidgets team
5 // RCS-ID: $Id$
6 // Licence: wxWindows license
7 /////////////////////////////////////////////////////////////////////////////
8
9 /**
10 @class wxBitmapButton
11
12 A bitmap button is a control that contains a bitmap.
13
14 Notice that since wxWidgets 2.9.1 bitmap display is supported by the base
15 wxButton class itself and the only tiny advantage of using this class is
16 that it allows to specify the bitmap in its constructor, unlike wxButton.
17 Please see the base class documentation for more information about images
18 support in wxButton.
19
20 @beginStyleTable
21 @style{wxBU_LEFT}
22 Left-justifies the bitmap label.
23 @style{wxBU_TOP}
24 Aligns the bitmap label to the top of the button.
25 @style{wxBU_RIGHT}
26 Right-justifies the bitmap label.
27 @style{wxBU_BOTTOM}
28 Aligns the bitmap label to the bottom of the button.
29 @endStyleTable
30
31 Note that the wxBU_EXACTFIT style supported by wxButton is not used by this
32 class as bitmap buttons don't have any minimal standard size by default.
33
34 @beginEventEmissionTable{wxCommandEvent}
35 @event{EVT_BUTTON(id, func)}
36 Process a wxEVT_COMMAND_BUTTON_CLICKED event, when the button is clicked.
37 @endEventTable
38
39 @library{wxcore}
40 @category{ctrl}
41 @appearance{bitmapbutton.png}
42
43 @see wxButton
44 */
45 class wxBitmapButton : public wxButton
46 {
47 public:
48 /**
49 Default ctor.
50 */
51 wxBitmapButton();
52
53 /**
54 Constructor, creating and showing a button.
55
56 @param parent
57 Parent window. Must not be @NULL.
58 @param id
59 Button identifier. The value wxID_ANY indicates a default value.
60 @param bitmap
61 Bitmap to be displayed.
62 @param pos
63 Button position.
64 If ::wxDefaultPosition is specified then a default position is chosen.
65 @param size
66 Button size.
67 If ::wxDefaultSize is specified then the button is sized appropriately
68 for the bitmap.
69 @param style
70 Window style. See wxBitmapButton.
71 @param validator
72 Window validator.
73 @param name
74 Window name.
75
76 @remarks The bitmap parameter is normally the only bitmap you need to provide,
77 and wxWidgets will draw the button correctly in its different states.
78 If you want more control, call any of the functions SetBitmapPressed(),
79 SetBitmapFocus(), SetBitmapDisabled().
80
81 @see Create(), wxValidator
82 */
83 wxBitmapButton(wxWindow* parent, wxWindowID id,
84 const wxBitmap& bitmap,
85 const wxPoint& pos = wxDefaultPosition,
86 const wxSize& size = wxDefaultSize,
87 long style = wxBU_AUTODRAW,
88 const wxValidator& validator = wxDefaultValidator,
89 const wxString& name = wxButtonNameStr);
90
91 /**
92 Button creation function for two-step creation.
93 For more details, see wxBitmapButton().
94 */
95 bool Create(wxWindow* parent, wxWindowID id,
96 const wxBitmap& bitmap,
97 const wxPoint& pos = wxDefaultPosition,
98 const wxSize& size = wxDefaultSize,
99 long style = wxBU_AUTODRAW,
100 const wxValidator& validator = wxDefaultValidator,
101 const wxString& name = wxButtonNameStr);
102 };
103