The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Member Functions | Private Member Functions | Private Attributes | List of all members
mp::options::slider_display Class Reference

#include <mp_options.hpp>

Inheritance diagram for mp::options::slider_display:
Inheritance graph

Public Member Functions

 slider_display (CVideo &video, const config &cfg)
 
 ~slider_display ()
 
void layout (int &xpos, int &ypos, int w, int border_size, gui::scrollpane *pane)
 
void set_value (const config::attribute_value &val)
 
config::attribute_value get_value () const
 
void process_event ()
 
virtual void hide_children (bool hide)
 
- Public Member Functions inherited from mp::options::option_display
virtual ~option_display ()
 

Private Member Functions

void update_label ()
 

Private Attributes

gui::sliderslider_
 
gui::labellabel_
 
int last_value_
 
const std::string label_text_
 

Detailed Description

Definition at line 62 of file mp_options.hpp.

Constructor & Destructor Documentation

mp::options::slider_display::slider_display ( CVideo video,
const config cfg 
)
mp::options::slider_display::~slider_display ( )

Definition at line 416 of file mp_options.cpp.

References label_, and slider_.

Member Function Documentation

config::attribute_value mp::options::slider_display::get_value ( ) const
virtual

Implements mp::options::option_display.

Definition at line 436 of file mp_options.cpp.

References slider_, and gui::slider::value().

void mp::options::slider_display::hide_children ( bool  hide)
virtual

Implements mp::options::option_display.

Definition at line 451 of file mp_options.cpp.

References gui::widget::hide(), label_, and slider_.

void mp::options::slider_display::layout ( int xpos,
int ypos,
int  w,
int  border_size,
gui::scrollpane pane 
)
virtual
void mp::options::slider_display::process_event ( )
virtual

Reimplemented from mp::options::option_display.

Definition at line 443 of file mp_options.cpp.

References last_value_, slider_, update_label(), and gui::slider::value().

void mp::options::slider_display::set_value ( const config::attribute_value val)
virtual
void mp::options::slider_display::update_label ( )
private

Definition at line 457 of file mp_options.cpp.

References label_, label_text_, last_value_, and gui::label::set_text().

Referenced by process_event(), and slider_display().

Member Data Documentation

gui::label* mp::options::slider_display::label_
private

Definition at line 78 of file mp_options.hpp.

Referenced by hide_children(), layout(), update_label(), and ~slider_display().

const std::string mp::options::slider_display::label_text_
private

Definition at line 80 of file mp_options.hpp.

Referenced by update_label().

int mp::options::slider_display::last_value_
private

Definition at line 79 of file mp_options.hpp.

Referenced by process_event(), and update_label().

gui::slider* mp::options::slider_display::slider_
private

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