X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8552e6f031ded8ae61b4a5b489fbf06962365da7..ec75509f94fb11322c1c69056d1ec2af8f041fe2:/contrib/include/wx/fl/newbmpbtn.h diff --git a/contrib/include/wx/fl/newbmpbtn.h b/contrib/include/wx/fl/newbmpbtn.h index 1421594b41..09041cb157 100644 --- a/contrib/include/wx/fl/newbmpbtn.h +++ b/contrib/include/wx/fl/newbmpbtn.h @@ -63,7 +63,7 @@ protected: // labels for particular state wxBitmap mFocusedBmp; // may not be always present - - // only if mHasFocusedBmp is TRUE + // only if mHasFocusedBmp is true wxBitmap* mpDepressedImg; wxBitmap* mpPressedImg; @@ -74,6 +74,7 @@ protected: bool mDragStarted; bool mIsPressed; bool mIsInFocus; + bool mIsToggled; bool mHasFocusedBmp; @@ -103,22 +104,26 @@ protected: wxPen& upperLeftSidePen, wxPen& lowerRightSidePen ); - // Returns TRUE if the given point is in the window. + // Returns true if the given point is in the window. bool IsInWindow( int x, int y ); + virtual void OnIdle(wxIdleEvent& event); + // (EVT_UPDATE_UI handler) + virtual void DoButtonUpdate(); + public: // Constructor. wxNewBitmapButton( const wxBitmap& labelBitmap = wxNullBitmap, const wxString& labelText = wxT(""), int alignText = NB_ALIGN_TEXT_BOTTOM, - bool isFlat = TRUE, + bool isFlat = true, // this is the default type of fired events int firedEventType = wxEVT_COMMAND_MENU_SELECTED, int marginX = NB_DEFAULT_MARGIN, int marginY = NB_DEFAULT_MARGIN, int textToLabelGap = 2, - bool isSticky = FALSE + bool isSticky = false ); // Use this constructor if buttons have to be persistant @@ -126,13 +131,13 @@ public: const wxBitmapType bitmapFileType = wxBITMAP_TYPE_BMP, const wxString& labelText = wxT(""), int alignText = NB_ALIGN_TEXT_BOTTOM, - bool isFlat = TRUE, + bool isFlat = true, // this is the default type of fired events int firedEventType = wxEVT_COMMAND_MENU_SELECTED, int marginX = NB_DEFAULT_MARGIN, int marginY = NB_DEFAULT_MARGIN, int textToLabelGap = 2, - bool isSticky = FALSE + bool isSticky = false ); // Destructor. @@ -164,8 +169,8 @@ public: // Renders the label image. virtual void RenderLabelImage( wxBitmap*& destBmp, wxBitmap* srcBmp, - bool isEnabled = TRUE, - bool isPressed = FALSE); + bool isEnabled = true, + bool isPressed = false); // Renders label images. virtual void RenderLabelImages(); @@ -176,6 +181,9 @@ public: // Enables/disables button virtual bool Enable(bool enable); + // Depress button + virtual bool Toggle(bool enable); + // Responds to a left mouse button down event. void OnLButtonDown( wxMouseEvent& event );