This is an alternative class to wxBitmapButton. It is used in the implementation of dynamic toolbars.
Derived from
wxPanel (REF NOT FOUND)
Include files
<wx/fl/newbmpbtn.h>
Data structures
Members
wxNewBitmapButton::wxNewBitmapButton
wxNewBitmapButton::~wxNewBitmapButton
wxNewBitmapButton::DestroyLabels
wxNewBitmapButton::DrawDecorations
wxNewBitmapButton::DrawLabel
wxNewBitmapButton::DrawShade
wxNewBitmapButton::GetStateLabel
wxNewBitmapButton::IsInWindow
wxNewBitmapButton::OnEraseBackground
wxNewBitmapButton::OnKillFocus
wxNewBitmapButton::OnLButtonDown
wxNewBitmapButton::OnLButtonUp
wxNewBitmapButton::OnMouseMove
wxNewBitmapButton::OnPaint
wxNewBitmapButton::OnSize
wxNewBitmapButton::RenderAllLabelImages
wxNewBitmapButton::RenderLabelImage
wxNewBitmapButton::RenderLabelImages
wxNewBitmapButton::Reshape
wxNewBitmapButton::SetAlignments
wxNewBitmapButton::SetLabel
wxNewBitmapButton(const wxBitmap& labelBitmap = wxNullBitmap, const wxString& labelText = "", int alignText = NB_ALIGN_TEXT_BOTTOM, bool isFlat = TRUE, int firedEventType = wxEVT_COMMAND_MENU_SELECTED, int marginX = 2, int marginY = 2, int textToLabelGap = 2, bool isSticky = FALSE)
Constructor.
wxNewBitmapButton(const wxString& bitmapFileName, const wxBitmapType bitmapFileType = wxBITMAP_TYPE_BMP, const wxString& labelText = "", int alignText = NB_ALIGN_TEXT_BOTTOM, bool isFlat = TRUE, int firedEventType = wxEVT_COMMAND_MENU_SELECTED, int marginX = 2, int marginY = 2, int textToLabelGap = 2, bool isSticky = FALSE)
Use this constructor if buttons have to be persistant
~wxNewBitmapButton()
Destructor.
void DestroyLabels()
Internal function for destroying labels.
void DrawDecorations(wxDC& dc)
Draws the decorations.
void DrawLabel(wxDC& dc)
Draws the label.
void DrawShade(int outerLevel, wxDC& dc, wxPen& upperLeftSidePen, wxPen& lowerRightSidePen)
Draws shading on the button.
wxBitmap* GetStateLabel()
Returns the label that matches the current button state.
bool IsInWindow(int x, int y)
Returns TRUE if the given point is in the window.
void OnEraseBackground(wxEraseEvent& event)
Responds to an erase background event.
void OnKillFocus(wxFocusEvent& event)
Responds to a kill focus event.
void OnLButtonDown(wxMouseEvent& event)
Responds to a left mouse button down event.
void OnLButtonUp(wxMouseEvent& event)
Responds to a left mouse button up event.
void OnMouseMove(wxMouseEvent& event)
Responds to a mouse move event.
void OnPaint(wxPaintEvent& event)
Responds to a paint event.
void OnSize(wxSizeEvent& event)
Responds to a size event.
void RenderAllLabelImages()
Renders label images.
void RenderLabelImage(wxBitmap*& destBmp, wxBitmap* srcBmp, bool isEnabled = TRUE, bool isPressed = FALSE)
Renders the label image.
void RenderLabelImages()
Renders label images.
void Reshape()
This function should be called after Create. It renders the labels, having reloaded the button image if necessary.
void SetAlignments(int alignText = NB_ALIGN_TEXT_BOTTOM, int marginX = 2, int marginY = 2, int textToLabelGap = 2)
Sets the text alignment and margins.
void SetLabel(const wxBitmap& labelBitmap, const wxString& labelText = "")
Sets the label and optionally label text.