24 #ifndef __slider_hpp__ 41 unsigned int const i_len_x,
42 unsigned int const i_len_y);
68 double const i_value)
const;
73 int const i_len)
const;
78 int const i_len)
const;
83 struct box const& i_box)
const;
89 struct box const& i_box);
119 #define __slider_hpp__ double screen2value(int const i_pos, int const i_len) const
convert position to value
Definition: slider.cpp:146
double value2pct(double const i_value) const
converts value to percentage
Definition: slider.cpp:52
enum event_response event_key_vertical(struct event_key const &i_event)
handle key even for vertical slider
Definition: slider.cpp:350
int value2screen(double const i_value, int const i_len) const
converts value to screen units
Definition: slider.cpp:124
virtual ~slider()
destructor
Definition: slider.cpp:47
virtual enum event_response event_key(struct event_key const &i_event)
handle key event
Definition: slider.cpp:384
Allows user to select a value by moving a thumb within a defined range of the slider.
Definition: slider.hpp:28
virtual void draw() const
draws the widget
Definition: slider.cpp:311
virtual enum event_response event_mouse(struct event_mouse const &i_event)
handle mouse event
Definition: slider.cpp:444
event_response
response
Definition: event.h:14
orientation
indicator of the orientation of the widget. The defualt orientation is HORIZONTAL.
Definition: slider.hpp:32
Definition: slider.hpp:35
interface to control a floating point value
Definition: valuator.hpp:28
enum event_response event_key_horizontal(struct event_key const &i_event)
handle event for horizontal slider
Definition: slider.cpp:317
void set_orientation(enum orientation const i_orientation)
sets the orientation
Definition: slider.hpp:112
Definition: slider.hpp:34
enum orientation m_orientation
Definition: slider.hpp:64
container for a mouse event
Definition: event.h:37
defines a rectangular region
Definition: box.h:12
container for a keyboard event
Definition: event.h:23