#include </home/zeitlin/src/wx/github/interface/wx/bmpbuttn.h>
A bitmap button is a control that contains a bitmap.
Notice that since wxWidgets 2.9.1 bitmap display is supported by the base wxButton class itself and the only tiny advantage of using this class is that it allows to specify the bitmap in its constructor, unlike wxButton. Please see the base class documentation for more information about images support in wxButton.
This class supports the following styles:
Note that the wxBU_EXACTFIT style supported by wxButton is not used by this class as bitmap buttons don't have any minimal standard size by default.
The following event handler macros redirect the events to member function handlers 'func' with prototypes like:
Event macros for events emitted by this class:
wxEVT_COMMAND_BUTTON_CLICKED
event, when the button is clicked. wxMSW appearance | wxGTK appearance | wxMac appearance |
Public Member Functions | |
wxBitmapButton () | |
Default ctor. | |
wxBitmapButton (wxWindow *parent, wxWindowID id, const wxBitmap &bitmap, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxBU_AUTODRAW, const wxValidator &validator=wxDefaultValidator, const wxString &name=wxButtonNameStr) | |
Constructor, creating and showing a button. | |
bool | Create (wxWindow *parent, wxWindowID id, const wxBitmap &bitmap, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxBU_AUTODRAW, const wxValidator &validator=wxDefaultValidator, const wxString &name=wxButtonNameStr) |
Button creation function for two-step creation. |
wxBitmapButton::wxBitmapButton | ( | ) |
Default ctor.
wxBitmapButton::wxBitmapButton | ( | wxWindow * | parent, |
wxWindowID | id, | ||
const wxBitmap & | bitmap, | ||
const wxPoint & | pos = wxDefaultPosition , |
||
const wxSize & | size = wxDefaultSize , |
||
long | style = wxBU_AUTODRAW , |
||
const wxValidator & | validator = wxDefaultValidator , |
||
const wxString & | name = wxButtonNameStr |
||
) |
Constructor, creating and showing a button.
parent | Parent window. Must not be NULL. |
id | Button identifier. The value wxID_ANY indicates a default value. |
bitmap | Bitmap to be displayed. |
pos | Button position. If wxDefaultPosition is specified then a default position is chosen. |
size | Button size. If wxDefaultSize is specified then the button is sized appropriately for the bitmap. |
style | Window style. See wxBitmapButton. |
validator | Window validator. |
name | Window name. |
bool wxBitmapButton::Create | ( | wxWindow * | parent, |
wxWindowID | id, | ||
const wxBitmap & | bitmap, | ||
const wxPoint & | pos = wxDefaultPosition , |
||
const wxSize & | size = wxDefaultSize , |
||
long | style = wxBU_AUTODRAW , |
||
const wxValidator & | validator = wxDefaultValidator , |
||
const wxString & | name = wxButtonNameStr |
||
) |
Button creation function for two-step creation.
For more details, see wxBitmapButton().