#include <wx/bmpbuttn.h>
It may be placed on a wxDialog or a wxPanel, or indeed almost any other window.
This class supports the following styles:
The following event handler macros redirect the events to member function handlers 'func' with prototypes like:
![]() | ![]() | ![]() |
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. | |
virtual | ~wxBitmapButton () |
Destructor, destroying the 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. | |
const wxBitmap & | GetBitmapSelected () const |
Returns the bitmap for the selected state. | |
virtual void | SetBitmapDisabled (const wxBitmap &bitmap) |
Sets the bitmap for the disabled button appearance. | |
virtual void | SetBitmapFocus (const wxBitmap &bitmap) |
Sets the bitmap for the button appearance when it has the keyboard focus. | |
virtual void | SetBitmapHover (const wxBitmap &bitmap) |
Sets the bitmap to be shown when the mouse is over the button. | |
virtual void | SetBitmapLabel (const wxBitmap &bitmap) |
Sets the bitmap label for the button. | |
virtual void | SetBitmapSelected (const wxBitmap &bitmap) |
Sets the bitmap for the selected (depressed) button appearance. | |
const wxBitmap & | GetBitmapDisabled () const |
Returns the bitmap for the disabled state, which may be invalid. | |
wxBitmap & | GetBitmapDisabled () |
Returns the bitmap for the disabled state, which may be invalid. | |
const wxBitmap & | GetBitmapFocus () const |
Returns the bitmap for the focused state, which may be invalid. | |
wxBitmap & | GetBitmapFocus () |
Returns the bitmap for the focused state, which may be invalid. | |
const wxBitmap & | GetBitmapHover () const |
Returns the bitmap used when the mouse is over the button, which may be invalid. | |
wxBitmap & | GetBitmapHover () |
Returns the bitmap used when the mouse is over the button, which may be invalid. | |
const wxBitmap & | GetBitmapLabel () const |
Returns the label bitmap (the one passed to the constructor), always valid. | |
wxBitmap & | GetBitmapLabel () |
Returns the label bitmap (the one passed to the constructor), always valid. |
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. | |
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. |
virtual wxBitmapButton::~wxBitmapButton | ( | ) | [virtual] |
Destructor, destroying the button.
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().
wxBitmap& wxBitmapButton::GetBitmapDisabled | ( | ) |
Returns the bitmap for the disabled state, which may be invalid.
const wxBitmap& wxBitmapButton::GetBitmapDisabled | ( | ) | const |
Returns the bitmap for the disabled state, which may be invalid.
wxBitmap& wxBitmapButton::GetBitmapFocus | ( | ) |
Returns the bitmap for the focused state, which may be invalid.
const wxBitmap& wxBitmapButton::GetBitmapFocus | ( | ) | const |
Returns the bitmap for the focused state, which may be invalid.
wxBitmap& wxBitmapButton::GetBitmapHover | ( | ) |
Returns the bitmap used when the mouse is over the button, which may be invalid.
const wxBitmap& wxBitmapButton::GetBitmapHover | ( | ) | const |
Returns the bitmap used when the mouse is over the button, which may be invalid.
wxBitmap& wxBitmapButton::GetBitmapLabel | ( | ) |
Returns the label bitmap (the one passed to the constructor), always valid.
const wxBitmap& wxBitmapButton::GetBitmapLabel | ( | ) | const |
Returns the label bitmap (the one passed to the constructor), always valid.
const wxBitmap& wxBitmapButton::GetBitmapSelected | ( | ) | const |
Returns the bitmap for the selected state.
virtual void wxBitmapButton::SetBitmapDisabled | ( | const wxBitmap & | bitmap | ) | [virtual] |
Sets the bitmap for the disabled button appearance.
bitmap | The bitmap to set. |
virtual void wxBitmapButton::SetBitmapFocus | ( | const wxBitmap & | bitmap | ) | [virtual] |
Sets the bitmap for the button appearance when it has the keyboard focus.
bitmap | The bitmap to set. |
virtual void wxBitmapButton::SetBitmapHover | ( | const wxBitmap & | bitmap | ) | [virtual] |
Sets the bitmap to be shown when the mouse is over the button.
virtual void wxBitmapButton::SetBitmapLabel | ( | const wxBitmap & | bitmap | ) | [virtual] |
Sets the bitmap label for the button.
bitmap | The bitmap label to set. |
virtual void wxBitmapButton::SetBitmapSelected | ( | const wxBitmap & | bitmap | ) | [virtual] |
Sets the bitmap for the selected (depressed) button appearance.
bitmap | The bitmap to set. |
![]() |
[ top ] |