fixed wxBitmapButton to use focus and hover bitmaps correctly; also fixed tons of misnomers

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52008 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2008-02-22 19:59:36 +00:00
parent 66470d87a3
commit 6fba6c78a4
2 changed files with 50 additions and 30 deletions

View File

@@ -7,9 +7,8 @@
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef __BMPBUTTONH__
#define __BMPBUTTONH__
#ifndef _WX_GTK_BMPBUTTON_H_
#define _WX_GTK_BMPBUTTON_H_
// ----------------------------------------------------------------------------
// wxBitmapButton
@@ -51,13 +50,10 @@ public:
// implementation
// --------------
void GTKHasFocus();
void GTKNotFocus();
void GTKStartSelect();
void GTKEndSelect();
bool m_hasFocus:1;
bool m_isSelected:1;
void GTKMouseEnters();
void GTKMouseLeaves();
void GTKPressed();
void GTKReleased();
protected:
virtual void OnSetBitmap();
@@ -67,7 +63,15 @@ protected:
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_