]>
git.saurik.com Git - wxWidgets.git/blob - interface/wx/bmpbuttn.h
1d352d856a6a1f19cc33f5bdc271fc2fea688df1
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: interface of wxBitmapButton
4 // Author: wxWidgets team
6 // Licence: wxWindows license
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 If this is specified, the button will be drawn automatically using
23 the label bitmap only, providing a 3D-look border. If this style is
24 not specified, the button will be drawn without borders and using
25 all provided bitmaps. Has effect only under MS Windows.
27 Left-justifies the bitmap label. Has effect only under MS Windows.
29 Aligns the bitmap label to the top of the button.
30 Has effect only under MS Windows.
32 Right-justifies the bitmap label. Has effect only under MS Windows.
34 Aligns the bitmap label to the bottom of the button.
35 Has effect only under MS Windows.
38 Note that the wxBU_EXACTFIT style supported by wxButton is not used by this
39 class as bitmap buttons don't have any minimal standard size by default.
41 @beginEventEmissionTable{wxCommandEvent}
42 @event{EVT_BUTTON(id, func)}
43 Process a wxEVT_COMMAND_BUTTON_CLICKED event, when the button is clicked.
48 @appearance{bitmapbutton.png}
52 class wxBitmapButton
: public wxButton
61 Constructor, creating and showing a button.
64 Parent window. Must not be @NULL.
66 Button identifier. The value wxID_ANY indicates a default value.
68 Bitmap to be displayed.
71 If ::wxDefaultPosition is specified then a default position is chosen.
74 If ::wxDefaultSize is specified then the button is sized appropriately
77 Window style. See wxBitmapButton.
83 @remarks The bitmap parameter is normally the only bitmap you need to provide,
84 and wxWidgets will draw the button correctly in its different states.
85 If you want more control, call any of the functions SetBitmapPressed(),
86 SetBitmapFocus(), SetBitmapDisabled().
88 @see Create(), wxValidator
90 wxBitmapButton(wxWindow
* parent
, wxWindowID id
,
91 const wxBitmap
& bitmap
,
92 const wxPoint
& pos
= wxDefaultPosition
,
93 const wxSize
& size
= wxDefaultSize
,
94 long style
= wxBU_AUTODRAW
,
95 const wxValidator
& validator
= wxDefaultValidator
,
96 const wxString
& name
= wxButtonNameStr
);
99 Button creation function for two-step creation.
100 For more details, see wxBitmapButton().
102 bool Create(wxWindow
* parent
, wxWindowID id
,
103 const wxBitmap
& bitmap
,
104 const wxPoint
& pos
= wxDefaultPosition
,
105 const wxSize
& size
= wxDefaultSize
,
106 long style
= wxBU_AUTODRAW
,
107 const wxValidator
& validator
= wxDefaultValidator
,
108 const wxString
& name
= wxButtonNameStr
);