00001 #ifndef GUI_FOCUSFRAME_HPP
00002 #define GUI_FOCUSFRAME_HPP
00003
00004 #include <utils.hpp>
00005 #include "gui_frame.hpp"
00006
00007 namespace gui
00008 {
00010
00012 class focus_frame : public frame
00013 {
00014 public :
00015
00017 explicit focus_frame(manager* pManager);
00018
00020 virtual ~focus_frame();
00021
00023
00025 virtual void copy_from(uiobject* pObj);
00026
00028
00032 void enable_auto_focus(bool bEnable);
00033
00035
00037 bool is_auto_focus_enabled() const;
00038
00040
00045 void set_focus(bool bFocus);
00046
00048
00051 virtual void notify_focus(bool bFocus);
00052
00054 virtual void create_glue();
00055
00057
00059 virtual void parse_block(xml::block* pBlock);
00060
00061 protected :
00062
00063 bool bFocus_;
00064 bool bAutoFocus_;
00065 };
00066
00070 class lua_focus_frame : public lua_frame
00071 {
00072 public :
00073
00074 explicit lua_focus_frame(lua_State* pLua);
00075
00076
00077 int _clear_focus(lua_State*);
00078 int _is_auto_focus(lua_State*);
00079 int _set_auto_focus(lua_State*);
00080 int _set_focus(lua_State*);
00081
00082 static const char className[];
00083 static const char* classList[];
00084 static Lunar<lua_focus_frame>::RegType methods[];
00085
00086 protected :
00087
00088 focus_frame* pFocusFrameParent_;
00089 };
00090
00093 }
00094
00095 #endif