- // show the image in the button in addition to the label: this method is
- // supported on all (major) platforms
- void SetBitmap(const wxBitmap& bitmap, wxDirection dir = wxLEFT)
- {
- SetBitmapLabel(bitmap);
- SetBitmapPosition(dir);
- }
-
- wxBitmap GetBitmap() const { return DoGetBitmap(State_Normal); }
-
- // Methods for setting individual images for different states: normal,
- // selected (meaning pushed or pressed), focused (meaning normal state for
- // a focused button), disabled or hover (a.k.a. hot or current).
- //
- // Remember that SetBitmap() itself must be called before any other
- // SetBitmapXXX() methods (except for SetBitmapLabel() which is a synonym
- // for it anyhow) and that all bitmaps passed to these functions should be
- // of the same size.
- void SetBitmapLabel(const wxBitmap& bitmap)
- { DoSetBitmap(bitmap, State_Normal); }
- void SetBitmapPressed(const wxBitmap& bitmap)
- { DoSetBitmap(bitmap, State_Pressed); }
- void SetBitmapDisabled(const wxBitmap& bitmap)
- { DoSetBitmap(bitmap, State_Disabled); }
- void SetBitmapCurrent(const wxBitmap& bitmap)
- { DoSetBitmap(bitmap, State_Current); }
- void SetBitmapFocus(const wxBitmap& bitmap)
- { DoSetBitmap(bitmap, State_Focused); }
-
- wxBitmap GetBitmapLabel() const { return DoGetBitmap(State_Normal); }
- wxBitmap GetBitmapPressed() const { return DoGetBitmap(State_Pressed); }
- wxBitmap GetBitmapDisabled() const { return DoGetBitmap(State_Disabled); }
- wxBitmap GetBitmapCurrent() const { return DoGetBitmap(State_Current); }
- wxBitmap GetBitmapFocus() const { return DoGetBitmap(State_Focused); }
-
-
- // set the margins around the image
- void SetBitmapMargins(wxCoord x, wxCoord y) { DoSetBitmapMargins(x, y); }
- void SetBitmapMargins(const wxSize& sz) { DoSetBitmapMargins(sz.x, sz.y); }
-
- // set the image position relative to the text, i.e. wxLEFT means that the
- // image is to the left of the text (this is the default)
- void SetBitmapPosition(wxDirection dir);
-