gui::focus_frame Class Reference

Abstract gui widget that can receive and loose focus. More...

#include <gui_focusframe.hpp>

Inheritance diagram for gui::focus_frame:
gui::frame gui::event_receiver gui::region gui::uiobject gui::edit_box

List of all members.

Public Member Functions

 focus_frame (manager *pManager)
 Constructor.
virtual ~focus_frame ()
 Destructor.
virtual void copy_from (uiobject *pObj)
 Copies an uiobject's parameters into this focus_frame (inheritance).
void enable_auto_focus (bool bEnable)
 Enables automatic focus for this focus_frame.
bool is_auto_focus_enabled () const
 Checks if automatic focus is enabled.
void set_focus (bool bFocus)
 Asks for focus for this focus_frame.
virtual void notify_focus (bool bFocus)
 Notifies this focus_frame it has gained/lost focus.
virtual void create_glue ()
 Returns this widget's Lua glue.
virtual void parse_block (xml::block *pBlock)
 Parses data from an xml::block.

Protected Attributes

bool bFocus_
bool bAutoFocus_

Detailed Description

Abstract gui widget that can receive and loose focus.

A typical example is the edit_box widget.

Definition at line 12 of file gui_focusframe.hpp.


Constructor & Destructor Documentation

gui::focus_frame::focus_frame ( manager pManager  )  [explicit]

Constructor.

Definition at line 8 of file gui_focusframe.cpp.

gui::focus_frame::~focus_frame (  )  [virtual]

Destructor.

Definition at line 14 of file gui_focusframe.cpp.


Member Function Documentation

void gui::focus_frame::copy_from ( uiobject pObj  )  [virtual]

Copies an uiobject's parameters into this focus_frame (inheritance).

Parameters:
pObj The uiobject to copy

Reimplemented from gui::frame.

Reimplemented in gui::edit_box.

Definition at line 19 of file gui_focusframe.cpp.

void gui::focus_frame::create_glue (  )  [virtual]

Returns this widget's Lua glue.

Reimplemented from gui::frame.

Reimplemented in gui::edit_box.

Definition at line 29 of file gui_focusframe.cpp.

void gui::focus_frame::enable_auto_focus ( bool  bEnable  ) 

Enables automatic focus for this focus_frame.

Parameters:
bEnable 'true' to enable auto focus
Note:
When auto focus is enabled, this focus_frame will be focused immediately after it is shown.

Definition at line 49 of file gui_focusframe.cpp.

bool gui::focus_frame::is_auto_focus_enabled (  )  const

Checks if automatic focus is enabled.

Returns:
'true' if automatic focus is enabled

Definition at line 54 of file gui_focusframe.cpp.

void gui::focus_frame::notify_focus ( bool  bFocus  )  [virtual]

Notifies this focus_frame it has gained/lost focus.

Parameters:
bFocus 'true' if the focus_frame has gained focus
Note:
This function is called by the manager.

Reimplemented in gui::edit_box.

Definition at line 67 of file gui_focusframe.cpp.

void gui::focus_frame::parse_block ( xml::block *  pBlock  )  [virtual]

Parses data from an xml::block.

Parameters:
pBlock The edit_box's xml::block

Reimplemented from gui::frame.

Reimplemented in gui::edit_box.

Definition at line 8 of file gui_focusframe_parser.cpp.

void gui::focus_frame::set_focus ( bool  bFocus  ) 

Asks for focus for this focus_frame.

Parameters:
bFocus 'true' to give to focus, 'false' to remove it
Note:
This does not give focus immediately to the focus_frame. It is up to the manager class to actually give the focus through notify_focus().

Definition at line 59 of file gui_focusframe.cpp.


Member Data Documentation

Definition at line 64 of file gui_focusframe.hpp.

bool gui::focus_frame::bFocus_ [protected]

Definition at line 63 of file gui_focusframe.hpp.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines

Generated on Tue Jan 1 21:58:12 2013 for gui by  doxygen 1.6.1