X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4cbc57f086cee690f397ac5622d3f1d7153b300e..437bd21582cad07eb32cc0ea50dee260f2c4eff3:/contrib/include/wx/fl/newbmpbtn.h diff --git a/contrib/include/wx/fl/newbmpbtn.h b/contrib/include/wx/fl/newbmpbtn.h index 609923f417..507880b7ce 100644 --- a/contrib/include/wx/fl/newbmpbtn.h +++ b/contrib/include/wx/fl/newbmpbtn.h @@ -12,12 +12,16 @@ #ifndef __NEWBMPBTN_G__ #define __NEWBMPBTN_G__ -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(__APPLE__) #pragma interface "newbmpbtn.h" #endif #include "wx/button.h" #include "wx/string.h" +#include "wx/fl/fldefs.h" + +// defaults +#define NB_DEFAULT_MARGIN 2 // button label-text alignment types @@ -28,8 +32,8 @@ // classes declared in this header file -class wxNewBitmapButton; -class wxBorderLessBitmapButton; +class WXFL_DECLSPEC wxNewBitmapButton; +class WXFL_DECLSPEC wxBorderLessBitmapButton; /* This is an alternative class to wxBitmapButton. It is used @@ -70,8 +74,6 @@ protected: bool mDragStarted; bool mIsPressed; bool mIsInFocus; - bool mPrevPressedState; - bool mPrevInFocusState; bool mHasFocusedBmp; @@ -113,8 +115,8 @@ public: bool isFlat = TRUE, // this is the default type of fired events int firedEventType = wxEVT_COMMAND_MENU_SELECTED, - int marginX = 2, - int marginY = 2, + int marginX = NB_DEFAULT_MARGIN, + int marginY = NB_DEFAULT_MARGIN, int textToLabelGap = 2, bool isSticky = FALSE ); @@ -127,8 +129,8 @@ public: bool isFlat = TRUE, // this is the default type of fired events int firedEventType = wxEVT_COMMAND_MENU_SELECTED, - int marginX = 2, - int marginY = 2, + int marginX = NB_DEFAULT_MARGIN, + int marginY = NB_DEFAULT_MARGIN, int textToLabelGap = 2, bool isSticky = FALSE ); @@ -145,8 +147,8 @@ public: // Sets the text alignment and margins. virtual void SetAlignments( int alignText = NB_ALIGN_TEXT_BOTTOM, - int marginX = 2, - int marginY = 2, + int marginX = NB_DEFAULT_MARGIN, + int marginY = NB_DEFAULT_MARGIN, int textToLabelGap = 2); // Draws the decorations. @@ -166,14 +168,20 @@ public: // Renders label images. virtual void RenderAllLabelImages(); + // Enables/disables button + virtual bool Enable(bool enable); + // Responds to a left mouse button down event. void OnLButtonDown( wxMouseEvent& event ); // Responds to a left mouse button up event. void OnLButtonUp( wxMouseEvent& event ); - // Responds to a mouse move event. - void OnMouseMove( wxMouseEvent& event ); + // Responds to mouse enter to window. + void OnMouseEnter( wxMouseEvent& event ); + + // Responds to mouse leave from window. + void OnMouseLeave( wxMouseEvent& event ); // Responds to a size event. void OnSize( wxSizeEvent& event );