zenilib: Zeni::Slider_Int 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
Public Types | Public Member Functions | List of all members
Zeni::Slider_Int Class Reference

`#include <Widget.h>`

Inherits Zeni::Slider.

Inherited by Zeni::Configurator_Video::Slider_Element, and Zeni::Selector::Selector_Slider.

## Public Types

typedef std::pair< int, int > | Range

## Public Member Functions

| Slider_Int (const Range &range, const Point2f &end_point_a_, const Point2f &end_point_b_, const float &slider_radius_, const float &slider_position_=ZENI_DEFAULT_SLIDER_POSITION)
const Range & | get_range () const
int | get_value () const
virtual void | on_mouse_button (const Point2i &pos, const bool &down, const int &button)
virtual void | on_slide ()
void | set_range (const Range &range_)
void | set_value (const int &value)
Public Member Functions inherited from Zeni::Slider
| Slider (const Point2f &end_point_a_, const Point2f &end_point_b_, const float &slider_radius_, const float &slider_position_=ZENI_DEFAULT_SLIDER_POSITION)
Point2f | get_end_point_a () const
Point2f | get_end_point_b () const
const float & | get_mouse_wheel_continuous_rate () const
const float & | get_slider_position () const
const float & | get_slider_radius () const
void | invert_mouse_wheel (const bool &invert)
const bool & | is_mouse_wheel_inverted () const
virtual void | on_accept ()
virtual void | on_mouse_motion (const Point2i &pos)
void | set_end_points (const Point2f &end_point_a_, const Point2f &end_point_b_)
void | set_mouse_wheel_continuous_rate (const float &mouse_wheel_continuous_rate)
void | set_slider_position (const float &slider_position_)
void | set_slider_radius (const float &radius_)
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
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)

## Additional Inherited Members

Protected Member Functions inherited from Zeni::Slider
const Collision::Line_Segment & | get_line_segment () const

## Detailed Description

Definition at line 624 of file Widget.h.

## Member Typedef Documentation

typedef std::pair<int, int> Zeni::Slider_Int::Range

Definition at line 629 of file Widget.h.

## Constructor & Destructor Documentation

Zeni::Slider_Int::Slider_Int | ( | const Range & | range,
|  | const Point2f & | end_point_a_,
|  | const Point2f & | end_point_b_,
|  | const float & | slider_radius_,
|  | const float & | slider_position_ = `ZENI_DEFAULT_SLIDER_POSITION`
| ) |  |

Definition at line 448 of file Widget.cpp.

References assert, get_value(), and set_value().

## Member Function Documentation

const Slider_Int::Range & Zeni::Slider_Int::get_range | ( |  | ) | const

inline

Definition at line 440 of file Widget.hxx.

Referenced by on_mouse_button().

int Zeni::Slider_Int::get_value | ( |  | ) | const

inline

Definition at line 449 of file Widget.hxx.

References Zeni::Slider::get_slider_position(), and int.

Referenced by on_mouse_button(), on_slide(), and Slider_Int().

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

virtual

Reimplemented from Zeni::Slider.

Definition at line 465 of file Widget.cpp.

References Zeni::Slider::get_line_segment(), get_range(), Zeni::Slider::get_slider_radius(), get_value(), Zeni::Widget::is_busy(), Zeni::Widget::is_editable(), Zeni::Slider::is_mouse_wheel_inverted(), max, min, Zeni::Collision::Line_Segment::nearest_point(), Zeni::Slider::on_mouse_button(), on_slide(), set_value(), Zeni::Point2i::x, and Zeni::Point2i::y.

void Zeni::Slider_Int::on_slide | ( |  | ) |

virtual

Reimplemented from Zeni::Slider.

Definition at line 489 of file Widget.cpp.

References get_value(), Zeni::Slider::on_slide(), and set_value().

Referenced by on_mouse_button().

void Zeni::Slider_Int::set_range | ( | const Range & | range_ | ) |

inline

Definition at line 444 of file Widget.hxx.

References assert.

void Zeni::Slider_Int::set_value | ( | const int & | value | ) |

inline

Definition at line 453 of file Widget.hxx.

References Zeni::Slider::set_slider_position().

Referenced by on_mouse_button(), on_slide(), and Slider_Int().

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