Improvements to keyboard handling (TAB)

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@660 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2007-09-02 01:03:37 +00:00
parent 4840ba824c
commit 100d48b5a7
19 changed files with 105 additions and 54 deletions
+4 -1
View File
@@ -37,11 +37,13 @@ class HoverButton : public wxControl {
/** name+"_normal", name+"_hover", name+"_focus", name+"_down"
* are the resource names of the images used.
*/
HoverButton(Window* parent, int id, const String& name, const Color& background = Color(240,247,255));
HoverButton(Window* parent, int id, const String& name, const Color& background = Color(240,247,255), bool accepts_focus = true);
/// Load different bitmaps for this button
void loadBitmaps(const String& name);
virtual bool AcceptsFocus() const;
private:
DECLARE_EVENT_TABLE();
@@ -49,6 +51,7 @@ class HoverButton : public wxControl {
Bitmap bg_normal, bg_hover, bg_focus, bg_down; ///< Bitmaps for the states of the button
bool hover, focus, mouse_down, key_down;
Color background;
const bool accepts_focus;
void onMouseEnter(wxMouseEvent&);
void onMouseLeave(wxMouseEvent&);