15 #ifndef GUI_WIDGETS_SLIDER_HPP_INCLUDED
16 #define GUI_WIDGETS_SLIDER_HPP_INCLUDED
153 return current.
x - original.
x;
int on_bar(const tpoint &coordinate) const
Inherited from tscrollbar.
void handle_key_increase(bool &handled)
unsigned best_slider_length_
t_string maximum_value_label_
When the slider shows the maximum value can show a special text.
int get_length_difference(const tpoint &original, const tpoint ¤t) const
Inherited from tscrollbar.
tbuilder_slider(const config &cfg)
void set_best_slider_length(const unsigned length)
int minimum_value_
The minimum value the slider holds.
Small abstract helper class.
int get_maximum_value() const
Inherited from tinteger_selector_.
void child_callback_positioner_moved()
Inherited from tscrollbar.
void set_minimum_value(const int minimum_value)
Inherited from tinteger_selector_.
virtual void update_canvas() override
See tcontrol::update_canvas.
void signal_handler_left_button_up(const event::tevent event, bool &handled)
void set_maximum_value(const int maximum_value)
Inherited from tinteger_selector_.
bool on_positioner(const tpoint &coordinate) const
Inherited from tscrollbar.
void set_value(const int value)
Inherited from tinteger_selector_.
t_string get_value_label() const
Returns the label shown for the current value.
Base class of a resolution, contains the common keys for a resolution.
tlabel_creator value_labels_
This allows the slider to show custom texts instead of the values.
GLuint GLsizei GLsizei * length
void set_value_labels(const std::vector< t_string > &value_labels)
A class inherited from ttext_box that displays its input as stars.
void handle_key_decrease(bool &handled)
Handlers for keyboard input.
unsigned minimum_positioner_length() const
Inherited from tscrollbar.
unsigned offset_after() const
Inherited from tscrollbar.
int get_value() const
Inherited from tinteger_selector_.
GLsizei const GLfloat * value
unsigned offset_before() const
Inherited from tscrollbar.
std::function< t_string(int, int)> tlabel_creator
unsigned minimum_positioner_length
tevent
The event send to the dispatcher.
unsigned get_length() const
Inherited from tscrollbar.
std::vector< t_string > value_labels_
unsigned best_slider_length_
The best size for the slider part itself, if 0 ignored.
tslider_definition(const config &cfg)
virtual const std::string & get_control_type() const override
See tcontrol::get_control_type.
unsigned maximum_positioner_length() const
Inherited from tscrollbar.
t_string minimum_value_label_
When the slider shows the minimum value can show a special text.
void signal_handler_sdl_key_down(const event::tevent event, bool &handled, const SDLKey key)
Signal handlers:
t_string maximum_value_label_
int get_minimum_value() const
Inherited from tinteger_selector_.
virtual tpoint calculate_best_size() const override
See twidget::calculate_best_size.
unsigned maximum_positioner_length
void set_value_labels(const tlabel_creator &value_labels)
t_string minimum_value_label_
A config object defines a single node in a WML file, with access to child nodes.
bool in_orthogonal_range(const tpoint &coordinate) const
Inherited from tscrollbar.
GLsizei const GLcharARB ** string
void set_maximum_value_label(const t_string &maximum_value_label)
Contains the implementation details for lexical_cast and shouldn't be used directly.
void set_minimum_value_label(const t_string &minimum_value_label)
tresolution(const config &cfg)