zenilib: Zeni::Slider 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 Member Functions | Protected Member Functions | List of all members
Zeni::Slider Class Reference
Zenilib

A Slider. More...

`#include <Widget.h>`

Inherits Zeni::Widget.

Inherited by Zeni::Slider_Int.

## Public Member Functions

| 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_button (const Point2i &pos, const bool &down, const int &button)
virtual void | on_mouse_motion (const Point2i &pos)
virtual void | on_slide ()
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)

## Protected Member Functions

const Collision::Line_Segment & | get_line_segment () const

## Detailed Description

A Slider.

A line segment that has a slider overlaid, so a floating point value from [0.0f, 1.0f] can be extracted.

Author
  bazald

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

Definition at line 576 of file Widget.h.

## Constructor & Destructor Documentation

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`
| ) |  |

Definition at line 367 of file Widget.cpp.

References Zeni::get_Colors(), and Zeni::Widget::give_Renderer().

## Member Function Documentation

Point2f Zeni::Slider::get_end_point_a | ( |  | ) | const

inline

Definition at line 387 of file Widget.hxx.

References Zeni::Collision::Line_Segment::get_end_point_a().

Referenced by Zeni::Widget_Renderer_Slider::render_to().

Point2f Zeni::Slider::get_end_point_b | ( |  | ) | const

inline

Definition at line 391 of file Widget.hxx.

References Zeni::Collision::Line_Segment::get_end_point_b().

Referenced by Zeni::Widget_Renderer_Slider::render_to().

const Collision::Line_Segment & Zeni::Slider::get_line_segment | ( |  | ) | const

inlineprotected

Definition at line 436 of file Widget.hxx.

Referenced by Zeni::Slider_Int::on_mouse_button().

const float & Zeni::Slider::get_mouse_wheel_continuous_rate | ( |  | ) | const

inline

Definition at line 428 of file Widget.hxx.

const float & Zeni::Slider::get_slider_position | ( |  | ) | const

inline

Definition at line 399 of file Widget.hxx.

Referenced by Zeni::Slider_Int::get_value(), and Zeni::Widget_Renderer_Slider::render_to().

const float & Zeni::Slider::get_slider_radius | ( |  | ) | const

inline

Definition at line 395 of file Widget.hxx.

Referenced by Zeni::Slider_Int::on_mouse_button(), and Zeni::Widget_Renderer_Slider::render_to().

void Zeni::Slider::invert_mouse_wheel | ( | const bool & | invert | ) |

inline

Definition at line 424 of file Widget.hxx.

const bool & Zeni::Slider::is_mouse_wheel_inverted | ( |  | ) | const

inline

Definition at line 420 of file Widget.hxx.

Referenced by Zeni::Slider_Int::on_mouse_button().

void Zeni::Slider::on_accept | ( |  | ) |

virtual

Definition at line 444 of file Widget.cpp.

Referenced by on_mouse_button().

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

virtual

Implements Zeni::Widget.

Reimplemented in Zeni::Slider_Int.

Definition at line 380 of file Widget.cpp.

References Zeni::Widget::is_editable(), Zeni::Collision::Line_Segment::nearest_point(), on_accept(), on_slide(), SDL_BUTTON_LEFT, Zeni::Widget::set_busy(), Zeni::Point2i::x, and Zeni::Point2i::y.

Referenced by Zeni::Slider_Int::on_mouse_button().

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

virtual

Implements Zeni::Widget.

Definition at line 409 of file Widget.cpp.

References Zeni::Collision::Line_Segment::nearest_point(), on_slide(), Zeni::Point2i::x, and Zeni::Point2i::y.

void Zeni::Slider::on_slide | ( |  | ) |

virtual

Reimplemented in Zeni::Slider_Int.

Definition at line 441 of file Widget.cpp.

Referenced by on_mouse_button(), on_mouse_motion(), and Zeni::Slider_Int::on_slide().

void Zeni::Slider::set_end_points | ( | const Point2f & | end_point_a_,
|  | const Point2f & | end_point_b_
| ) |  |

inline

Definition at line 403 of file Widget.hxx.

void Zeni::Slider::set_mouse_wheel_continuous_rate | ( | const float & | mouse_wheel_continuous_rate | ) |

inline

Definition at line 432 of file Widget.hxx.

void Zeni::Slider::set_slider_position | ( | const float & | slider_position_ | ) |

inline

Definition at line 411 of file Widget.hxx.

Referenced by Zeni::Slider_Int::set_value().

void Zeni::Slider::set_slider_radius | ( | const float & | radius_ | ) |

inline

Definition at line 407 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