zenilib: Zeni::Selector Class Reference

zenilib 0.5.3.0

- Main Page
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Classes | Public Types | Public Member Functions | List of all members
Zeni::Selector Class Reference

`#include <Widget.h>`

Inherits Zeni::Widget.

Inherited by Zeni::Configurator_Video::Resolution_Element, and Zeni::Configurator_Video::Selector_Element.

## Public Types

typedef std::vector< String > | Options

## Public Member Functions

| Selector (const Point2f &upper_left_, const Point2f &lower_right_, const Point2f &expanded_upper_left_, const Point2f &expanded_lower_right_, const String &font_)
| ~Selector ()
void | add_option (const String &option)
void | fax_Slider_BG_Renderer (const Widget_Render_Function *const &renderer)
| Set the current Widget_Render_Function, giving the Widget a copy. More...
void | fax_Slider_Renderer (const Widget_Render_Function *const &renderer)
| Set the current Widget_Render_Function, giving the Widget a copy. More...
void | fax_Text_Button_Renderer (const Widget_Render_Function *const &renderer)
| Set the current Widget_Render_Function, giving the Widget a copy. More...
const String & | get_Font () const
| Get the current font. More...
const Options & | get_options () const
String | get_selected () const
const Widget_Render_Function * | get_Slider_BG_Renderer () const
| Get the current Widget_Render_Function. More...
const Widget_Render_Function * | get_Slider_Renderer () const
| Get the current Widget_Render_Function. More...
const Widget_Render_Function * | get_Text_Button_Renderer () const
| Get the current Widget_Render_Function. More...
void | give_Slider_BG_Renderer (Widget_Render_Function *const &renderer)
| Set the current Widget_Render_Function, giving the Widget ownership. More...
void | give_Slider_Renderer (Widget_Render_Function *const &renderer)
| Set the current Widget_Render_Function, giving the Widget ownership. More...
void | give_Text_Button_Renderer (Widget_Render_Function *const &renderer)
| Set the current Widget_Render_Function, giving the Widget ownership. More...
void | lend_Slider_BG_Renderer (const Widget_Render_Function *const &renderer)
| Set the current Widget_Render_Function, giving the Widget no ownership. More...
void | lend_Slider_Renderer (const Widget_Render_Function *const &renderer)
| Set the current Widget_Render_Function, giving the Widget no ownership. More...
void | lend_Text_Button_Renderer (const Widget_Render_Function *const &renderer)
| Set the current Widget_Render_Function, giving the Widget no ownership. More...
virtual void | on_accept (const String &option)
virtual void | on_mouse_button (const Point2i &pos, const bool &down, const int &button)
virtual void | on_mouse_motion (const Point2i &pos)
void | remove_option (const String &option)
virtual void | render_impl () const
void | select_option (const String &option)
void | set_font (const String &font_)
| Set the current font. More...
Public Member Functions inherited from Zeni::Widget
| 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_Function * | get_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 | perform_logic ()
void | render () const
void | set_busy (const bool &busy_)
virtual void | set_editable (const bool &editable_)
void | set_layer (const float &layer_=0.0f)

## Detailed Description

Definition at line 660 of file Widget.h.

## Member Typedef Documentation

typedef std::vector<String> Zeni::Selector::Options

Definition at line 715 of file Widget.h.

## Constructor & Destructor Documentation

Zeni::Selector::Selector | ( | const Point2f & | upper_left_,
|  | const Point2f & | lower_right_,
|  | const Point2f & | expanded_upper_left_,
|  | const Point2f & | expanded_lower_right_,
|  | const String & | font_
| ) |  |

Definition at line 556 of file Widget.cpp.

Zeni::Selector::~Selector | ( |  | ) |

Definition at line 587 of file Widget.cpp.

## Member Function Documentation

void Zeni::Selector::add_option | ( | const String & | option | ) |

Definition at line 602 of file Widget.cpp.

References u.

void Zeni::Selector::fax_Slider_BG_Renderer | ( | const Widget_Render_Function *const & | renderer | ) |

inline

Set the current Widget_Render_Function, giving the Widget a copy.

Definition at line 520 of file Widget.hxx.

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

void Zeni::Selector::fax_Slider_Renderer | ( | const Widget_Render_Function *const & | renderer | ) |

inline

Set the current Widget_Render_Function, giving the Widget a copy.

Definition at line 500 of file Widget.hxx.

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

void Zeni::Selector::fax_Text_Button_Renderer | ( | const Widget_Render_Function *const & | renderer | ) |

inline

Set the current Widget_Render_Function, giving the Widget a copy.

Definition at line 478 of file Widget.hxx.

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

const String & Zeni::Selector::get_Font | ( |  | ) | const

inline

Get the current font.

Definition at line 524 of file Widget.hxx.

const Selector::Options & Zeni::Selector::get_options | ( |  | ) | const

Definition at line 598 of file Widget.cpp.

String Zeni::Selector::get_selected | ( |  | ) | const

Definition at line 618 of file Widget.cpp.

const Widget_Render_Function * Zeni::Selector::get_Slider_BG_Renderer | ( |  | ) | const

inline

Get the current Widget_Render_Function.

Definition at line 504 of file Widget.hxx.

const Widget_Render_Function * Zeni::Selector::get_Slider_Renderer | ( |  | ) | const

inline

Get the current Widget_Render_Function.

Definition at line 482 of file Widget.hxx.

const Widget_Render_Function * Zeni::Selector::get_Text_Button_Renderer | ( |  | ) | const

inline

Get the current Widget_Render_Function.

Definition at line 458 of file Widget.hxx.

void Zeni::Selector::give_Slider_BG_Renderer | ( | Widget_Render_Function *const & | renderer | ) |

inline

Set the current Widget_Render_Function, giving the Widget ownership.

Definition at line 508 of file Widget.hxx.

Referenced by fax_Slider_BG_Renderer(), and lend_Slider_BG_Renderer().

void Zeni::Selector::give_Slider_Renderer | ( | Widget_Render_Function *const & | renderer | ) |

inline

Set the current Widget_Render_Function, giving the Widget ownership.

Definition at line 486 of file Widget.hxx.

Referenced by fax_Slider_Renderer(), and lend_Slider_Renderer().

void Zeni::Selector::give_Text_Button_Renderer | ( | Widget_Render_Function *const & | renderer | ) |

inline

Set the current Widget_Render_Function, giving the Widget ownership.

Definition at line 462 of file Widget.hxx.

Referenced by fax_Text_Button_Renderer(), and lend_Text_Button_Renderer().

void Zeni::Selector::lend_Slider_BG_Renderer | ( | const Widget_Render_Function *const & | renderer | ) |

inline

Set the current Widget_Render_Function, giving the Widget no ownership.

Definition at line 515 of file Widget.hxx.

References give_Slider_BG_Renderer().

void Zeni::Selector::lend_Slider_Renderer | ( | const Widget_Render_Function *const & | renderer | ) |

inline

Set the current Widget_Render_Function, giving the Widget no ownership.

Definition at line 495 of file Widget.hxx.

References give_Slider_Renderer().

void Zeni::Selector::lend_Text_Button_Renderer | ( | const Widget_Render_Function *const & | renderer | ) |

inline

Set the current Widget_Render_Function, giving the Widget no ownership.

Definition at line 473 of file Widget.hxx.

References give_Text_Button_Renderer().

void Zeni::Selector::on_accept | ( | const String & | option | ) |

virtual

Definition at line 712 of file Widget.cpp.

References select_option(), Zeni::Widget::set_busy(), and Zeni::Widget::set_layer().

void Zeni::Selector::on_mouse_button | ( | const Point2i & | pos,
|  | const bool & | down,
|  | const int & | button
| ) |  |

virtual

Implements Zeni::Widget.

Definition at line 632 of file Widget.cpp.

References i, Zeni::Widget::is_editable(), SDL_BUTTON_LEFT, Zeni::Widget::set_busy(), Zeni::Widget::set_layer(), Zeni::Point2i::x, Zeni::Point2f::x, Zeni::Point2i::y, and Zeni::Point2f::y.

void Zeni::Selector::on_mouse_motion | ( | const Point2i & | pos | ) |

virtual

Implements Zeni::Widget.

Definition at line 696 of file Widget.cpp.

References i, Zeni::Widget::is_editable(), Zeni::Point2i::x, and Zeni::Point2i::y.

void Zeni::Selector::remove_option | ( | const String & | option | ) |

Definition at line 610 of file Widget.cpp.

void Zeni::Selector::render_impl | ( |  | ) | const

virtual

Reimplemented from Zeni::Widget.

Definition at line 719 of file Widget.cpp.

References Zeni::get_Video(), i, Zeni::Video::pop_world_stack(), Zeni::Video::push_world_stack(), and Zeni::Video::translate_scene().

void Zeni::Selector::select_option | ( | const String & | option | ) |

Definition at line 624 of file Widget.cpp.

Referenced by on_accept().

void Zeni::Selector::set_font | ( | const String & | font_ | ) |

inline

Set the current font.

Definition at line 528 of file Widget.hxx.

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

- zenilib/jni/external/zenilib/zeni_rest/Zeni/Widget.h
- zenilib/jni/external/zenilib/zeni_rest/Widget.cpp
- zenilib/jni/external/zenilib/zeni_rest/Zeni/Widget.hxx