zenilib  0.5.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Zeni::Widget Class Referenceabstract

The Widget base class. More...

#include <Widget.h>

Inherited by Zeni::Radio_Button_Set, Zeni::Selector, Zeni::Slider, Zeni::Widget_Button, Zeni::Widget_Input_Repeater, and Zeni::Widgets.

Public Member Functions

 Widget ()
 
virtual ~Widget ()
 
void fax_Renderer (const Widget_Render_Function *const &renderer)
 Set the current Widget_Render_Function, giving the Widget a copy. More...
 
const float & get_layer () const
 
const Widget_Render_Functionget_Renderer () const
 Get the current Widget_Render_Function. More...
 
void give_Renderer (Widget_Render_Function *const &renderer)
 Set the current Widget_Render_Function, giving the Widget ownership. More...
 
const bool & is_busy () const
 
const bool & is_editable () const
 
void lend_Renderer (const Widget_Render_Function *const &renderer)
 Set the current Widget_Render_Function, giving the Widget no ownership. More...
 
void on_event (const SDL_KeyboardEvent &event)
 
void on_event (const SDL_MouseButtonEvent &event)
 
void on_event (const SDL_MouseButtonEvent &event, const Projector2D &projector)
 
void on_event (const SDL_MouseMotionEvent &event)
 
void on_event (const SDL_MouseMotionEvent &event, const Projector2D &projector)
 
virtual void on_key (const SDL_Keysym &, const bool &)
 
virtual void on_mouse_button (const Point2i &pos, const bool &down, const int &button)=0
 
virtual void on_mouse_motion (const Point2i &pos)=0
 
virtual void perform_logic ()
 
void render () const
 
virtual void render_impl () const
 
void set_busy (const bool &busy_)
 
virtual void set_editable (const bool &editable_)
 
void set_layer (const float &layer_=0.0f)
 

Detailed Description

The Widget base class.

The basic interface for all Widgets is outlined in this class.

Author
bazald

Contact: bazal.nosp@m.d@ze.nosp@m.nipex.nosp@m..com

Definition at line 243 of file Widget.h.

Constructor & Destructor Documentation

Zeni::Widget::Widget ( )
inline

Definition at line 39 of file Widget.hxx.

Zeni::Widget::~Widget ( )
virtual

Definition at line 31 of file Widget.cpp.

Member Function Documentation

void Zeni::Widget::fax_Renderer ( const Widget_Render_Function *const renderer)
inline

Set the current Widget_Render_Function, giving the Widget a copy.

Definition at line 138 of file Widget.hxx.

References Zeni::Widget_Render_Function::get_duplicate(), and give_Renderer().

const float & Zeni::Widget::get_layer ( ) const
inline

Definition at line 56 of file Widget.hxx.

Referenced by Zeni::widget_layer_less().

const Widget_Render_Function * Zeni::Widget::get_Renderer ( ) const
inline

Get the current Widget_Render_Function.

Definition at line 122 of file Widget.hxx.

void Zeni::Widget::give_Renderer ( Widget_Render_Function *const renderer)
inline
void Zeni::Widget::lend_Renderer ( const Widget_Render_Function *const renderer)
inline

Set the current Widget_Render_Function, giving the Widget no ownership.

Definition at line 133 of file Widget.hxx.

References give_Renderer().

void Zeni::Widget::on_event ( const SDL_MouseMotionEvent event)
inline

Definition at line 86 of file Widget.hxx.

References on_mouse_motion(), SDL_MouseMotionEvent::x, and SDL_MouseMotionEvent::y.

void Zeni::Widget::on_event ( const SDL_MouseMotionEvent event,
const Projector2D projector 
)
inline
virtual void Zeni::Widget::on_key ( const SDL_Keysym ,
const bool &   
)
inlinevirtual
virtual void Zeni::Widget::perform_logic ( )
inlinevirtual

Reimplemented in Zeni::Widgets, and Zeni::Widget_Input_Repeater.

Definition at line 279 of file Widget.h.

void Zeni::Widget::set_editable ( const bool &  editable_)
virtual

Reimplemented in Zeni::Text_Box.

Definition at line 36 of file Widget.cpp.

Referenced by Zeni::Check_Box::Check_Box(), and Zeni::Text_Box::set_editable().

void Zeni::Widget::set_layer ( const float &  layer_ = 0.0f)
inline

Definition at line 64 of file Widget.hxx.

Referenced by Zeni::Selector::on_accept(), and Zeni::Selector::on_mouse_button().


The documentation for this class was generated from the following files: