X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f40fdaa339e19bbdf60c9c065c82daae4ca77b36..af27647706cb7ca50cf04814ff867532919a252c:/include/wx/gtk/bmpbuttn.h diff --git a/include/wx/gtk/bmpbuttn.h b/include/wx/gtk/bmpbuttn.h index f4d71460df..a8a396b8c5 100644 --- a/include/wx/gtk/bmpbuttn.h +++ b/include/wx/gtk/bmpbuttn.h @@ -7,19 +7,14 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// - -#ifndef __BMPBUTTONH__ -#define __BMPBUTTONH__ - -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) -#pragma interface -#endif +#ifndef _WX_GTK_BMPBUTTON_H_ +#define _WX_GTK_BMPBUTTON_H_ // ---------------------------------------------------------------------------- // wxBitmapButton // ---------------------------------------------------------------------------- -class wxBitmapButton: public wxBitmapButtonBase +class WXDLLIMPEXP_CORE wxBitmapButton: public wxBitmapButtonBase { public: wxBitmapButton() { Init(); } @@ -48,32 +43,35 @@ public: const wxString& name = wxButtonNameStr); void SetLabel( const wxString &label ); - wxString GetLabel() const; virtual void SetLabel( const wxBitmap& bitmap ) { SetBitmapLabel(bitmap); } - virtual void SetDefault(); - virtual bool Enable(bool enable = TRUE); + virtual bool Enable(bool enable = true); // implementation // -------------- - void HasFocus(); - void NotFocus(); - void StartSelect(); - void EndSelect(); - void DoApplyWidgetStyle(GtkRcStyle *style); - - bool m_hasFocus:1; - bool m_isSelected:1; + void GTKMouseEnters(); + void GTKMouseLeaves(); + void GTKPressed(); + void GTKReleased(); protected: virtual void OnSetBitmap(); virtual wxSize DoGetBestSize() const; + void DoApplyWidgetStyle(GtkRcStyle *style); void Init(); private: + void OnFocusChange(wxFocusEvent& event); + + // true iff mouse hovers over the button + bool m_mouseHovers; + // true iff the button is in pressed state + bool m_isPressed; + DECLARE_DYNAMIC_CLASS(wxBitmapButton) + DECLARE_EVENT_TABLE() }; -#endif // __BMPBUTTONH__ +#endif // _WX_GTK_BMPBUTTON_H_