#include </home/zeitlin/src/wx/github/interface/wx/anybutton.h>
A class for common button functionality used as the base for the various button classes.
Public Member Functions | |
wxAnyButton () | |
~wxAnyButton () | |
wxBitmap | GetBitmap () const |
Return the bitmap shown by the button. | |
wxBitmap | GetBitmapCurrent () const |
Returns the bitmap used when the mouse is over the button, which may be invalid. | |
wxBitmap | GetBitmapDisabled () const |
Returns the bitmap for the disabled state, which may be invalid. | |
wxBitmap | GetBitmapFocus () const |
Returns the bitmap for the focused state, which may be invalid. | |
wxBitmap | GetBitmapLabel () const |
Returns the bitmap for the normal state. | |
wxBitmap | GetBitmapPressed () const |
Returns the bitmap for the pressed state, which may be invalid. | |
void | SetBitmap (const wxBitmap &bitmap, wxDirection dir=wxLEFT) |
Sets the bitmap to display in the button. | |
void | SetBitmapCurrent (const wxBitmap &bitmap) |
Sets the bitmap to be shown when the mouse is over the button. | |
void | SetBitmapDisabled (const wxBitmap &bitmap) |
Sets the bitmap for the disabled button appearance. | |
void | SetBitmapFocus (const wxBitmap &bitmap) |
Sets the bitmap for the button appearance when it has the keyboard focus. | |
void | SetBitmapLabel (const wxBitmap &bitmap) |
Sets the bitmap label for the button. | |
void | SetBitmapPressed (const wxBitmap &bitmap) |
Sets the bitmap for the selected (depressed) button appearance. | |
wxSize | GetBitmapMargins () |
Get the margins between the bitmap and the text of the button. | |
void | SetBitmapPosition (wxDirection dir) |
Set the position at which the bitmap is displayed. | |
void | SetBitmapMargins (wxCoord x, wxCoord y) |
Set the margins between the bitmap and the text of the button. | |
void | SetBitmapMargins (const wxSize &sz) |
Set the margins between the bitmap and the text of the button. |
wxAnyButton::wxAnyButton | ( | ) |
wxAnyButton::~wxAnyButton | ( | ) |
wxBitmap wxAnyButton::GetBitmap | ( | ) | const |
Return the bitmap shown by the button.
The returned bitmap may be invalid only if the button doesn't show any images.
wxBitmap wxAnyButton::GetBitmapCurrent | ( | ) | const |
Returns the bitmap used when the mouse is over the button, which may be invalid.
wxBitmap wxAnyButton::GetBitmapDisabled | ( | ) | const |
Returns the bitmap for the disabled state, which may be invalid.
wxBitmap wxAnyButton::GetBitmapFocus | ( | ) | const |
Returns the bitmap for the focused state, which may be invalid.
wxBitmap wxAnyButton::GetBitmapLabel | ( | ) | const |
Returns the bitmap for the normal state.
This is exactly the same as GetBitmap() but uses a name backwards-compatible with wxBitmapButton.
wxSize wxAnyButton::GetBitmapMargins | ( | ) |
wxBitmap wxAnyButton::GetBitmapPressed | ( | ) | const |
Returns the bitmap for the pressed state, which may be invalid.
void wxAnyButton::SetBitmap | ( | const wxBitmap & | bitmap, |
wxDirection | dir = wxLEFT |
||
) |
Sets the bitmap to display in the button.
The bitmap is displayed together with the button label. This method sets up a single bitmap which is used in all button states, use SetBitmapDisabled(), SetBitmapPressed(), SetBitmapCurrent() or SetBitmapFocus() to change the individual images used in different states.
bitmap | The bitmap to display in the button. May be invalid to remove any currently displayed bitmap. |
dir | The position of the bitmap inside the button. By default it is positioned to the left of the text, near to the left button border. Other possible values include wxRIGHT, wxTOP and wxBOTTOM. |
void wxAnyButton::SetBitmapCurrent | ( | const wxBitmap & | bitmap | ) |
Sets the bitmap to be shown when the mouse is over the button.
void wxAnyButton::SetBitmapDisabled | ( | const wxBitmap & | bitmap | ) |
Sets the bitmap for the disabled button appearance.
void wxAnyButton::SetBitmapFocus | ( | const wxBitmap & | bitmap | ) |
Sets the bitmap for the button appearance when it has the keyboard focus.
void wxAnyButton::SetBitmapLabel | ( | const wxBitmap & | bitmap | ) |
Sets the bitmap label for the button.
Set the margins between the bitmap and the text of the button.
This method is currently only implemented under MSW. If it is not called, default margin is used around the bitmap.
void wxAnyButton::SetBitmapMargins | ( | const wxSize & | sz | ) |
Set the margins between the bitmap and the text of the button.
This method is currently only implemented under MSW. If it is not called, default margin is used around the bitmap.
void wxAnyButton::SetBitmapPosition | ( | wxDirection | dir | ) |
Set the position at which the bitmap is displayed.
This method should only be called if the button does have an associated bitmap.
dir | Direction in which the bitmap should be positioned, one of wxLEFT, wxRIGHT, wxTOP or wxBOTTOM. |
void wxAnyButton::SetBitmapPressed | ( | const wxBitmap & | bitmap | ) |
Sets the bitmap for the selected (depressed) button appearance.