]>
git.saurik.com Git - wxWidgets.git/blob - interface/wx/bmpbuttn.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: interface of wxBitmapButton
4 // Author: wxWidgets team
6 // Licence: wxWindows licence
7 /////////////////////////////////////////////////////////////////////////////
12 A bitmap button is a control that contains a bitmap.
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
22 Left-justifies the bitmap label.
24 Aligns the bitmap label to the top of the button.
26 Right-justifies the bitmap label.
28 Aligns the bitmap label to the bottom of the button.
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.
34 @beginEventEmissionTable{wxCommandEvent}
35 @event{EVT_BUTTON(id, func)}
36 Process a wxEVT_COMMAND_BUTTON_CLICKED event, when the button is clicked.
41 @appearance{bitmapbutton.png}
45 class wxBitmapButton
: public wxButton
54 Constructor, creating and showing a button.
57 Parent window. Must not be @NULL.
59 Button identifier. The value wxID_ANY indicates a default value.
61 Bitmap to be displayed.
64 If ::wxDefaultPosition is specified then a default position is chosen.
67 If ::wxDefaultSize is specified then the button is sized appropriately
70 Window style. See wxBitmapButton.
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().
81 @see Create(), wxValidator
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
);
92 Button creation function for two-step creation.
93 For more details, see wxBitmapButton().
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
);