Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes

gui2::teditor_settings Class Reference

#include <editor_settings.hpp>

Inheritance diagram for gui2::teditor_settings:
Inheritance graph
[legend]
Collaboration diagram for gui2::teditor_settings:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 teditor_settings (editor::editor_display *display, const std::vector< time_of_day > &tods)

Static Public Member Functions

static bool execute (editor::editor_display *display, const std::vector< time_of_day > &tods, CVideo &video)

Private Member Functions

void do_next_tod (twindow &window)
 Callback for the next tod button.
void update_tod_display (twindow &window)
void slider_update_callback (twindow &window)
void set_selected_tod (time_of_day tod)
const time_of_dayget_selected_tod () const
void update_selected_tod_info (twindow &window)
virtual const std::string & window_id () const
 Inherited from tdialog, implemented by REGISTER_DIALOG.
void pre_show (CVideo &video, twindow &window)
 Inherited from tdialog.
void post_show (twindow &window)
 Inherited from tdialog.

Private Attributes

std::vector< time_of_daytods_
 Available time_of_days.
int current_tod_
 Current map generator index.
tlabelcurrent_tod_label_
 Label for the current tod.
tlabelcurrent_tod_image_
 Label for the current tod image.
ttoggle_buttoncustom_tod_toggle_
ttoggle_buttoncustom_tod_auto_refresh_
tfield_boolcustom_tod_toggle_field_
tfield_integercustom_tod_red_field_
tfield_integercustom_tod_green_field_
tfield_integercustom_tod_blue_field_
editor::editor_displaydisplay_
 The display to update when the ToD changes.
bool can_update_display_

Detailed Description

Definition at line 35 of file editor_settings.hpp.


Constructor & Destructor Documentation

gui2::teditor_settings::teditor_settings ( editor::editor_display display,
const std::vector< time_of_day > &  tods 
)

Definition at line 79 of file editor_settings.cpp.

References preferences::editor::set_use_mdi(), and preferences::editor::use_mdi().

Referenced by execute().

Here is the call graph for this function:

Here is the caller graph for this function:


Member Function Documentation

void gui2::teditor_settings::do_next_tod ( twindow window  )  [private]

Callback for the next tod button.

Definition at line 109 of file editor_settings.cpp.

References current_tod_, custom_tod_toggle_, gui2::ttoggle_button::set_value(), tods_, and update_selected_tod_info().

Referenced by pre_show().

Here is the call graph for this function:

Here is the caller graph for this function:

static bool gui2::teditor_settings::execute ( editor::editor_display display,
const std::vector< time_of_day > &  tods,
CVideo video 
) [inline, static]

Definition at line 41 of file editor_settings.hpp.

References teditor_settings().

Referenced by editor::editor_controller::editor_settings_dialog().

Here is the call graph for this function:

Here is the caller graph for this function:

const time_of_day & gui2::teditor_settings::get_selected_tod (  )  const [private]

Definition at line 117 of file editor_settings.cpp.

References current_tod_, and tods_.

Referenced by update_selected_tod_info().

Here is the caller graph for this function:

void gui2::teditor_settings::post_show ( twindow window  )  [private, virtual]

Inherited from tdialog.

Reimplemented from gui2::tdialog.

Definition at line 273 of file editor_settings.cpp.

References can_update_display_, and update_tod_display().

Here is the call graph for this function:

void gui2::teditor_settings::pre_show ( CVideo video,
twindow window 
) [private, virtual]
void gui2::teditor_settings::set_selected_tod ( time_of_day  tod  )  [private]
void gui2::teditor_settings::slider_update_callback ( twindow window  )  [private]

Definition at line 155 of file editor_settings.cpp.

References custom_tod_auto_refresh_, gui2::ttoggle_button::get_value(), and update_tod_display().

Referenced by pre_show().

Here is the call graph for this function:

Here is the caller graph for this function:

void gui2::teditor_settings::update_selected_tod_info ( twindow window  )  [private]

Todo:
Implement the showing of the ToD icon.

Note at the moment the icon is a label widget, should become an image widget.

Definition at line 162 of file editor_settings.cpp.

References _, can_update_display_, current_tod_, current_tod_label_, custom_tod_blue_field_, custom_tod_green_field_, custom_tod_red_field_, custom_tod_toggle_, get_selected_tod(), gui2::ttoggle_button::get_value(), gui2::twindow::invalidate_layout(), time_of_day::name, gui2::tlabel::set_active(), gui2::tcontrol::set_active(), gui2::tcontrol::set_label(), gui2::tfield< T, W, CT >::set_widget_value(), tods_, update_tod_display(), and gui2::tfield_::widget().

Referenced by do_next_tod(), and pre_show().

Here is the call graph for this function:

Here is the caller graph for this function:

void gui2::teditor_settings::update_tod_display ( twindow window  )  [private]
virtual const std::string& gui2::teditor_settings::window_id (  )  const [private, virtual]

Inherited from tdialog, implemented by REGISTER_DIALOG.

Implements gui2::tdialog.


Member Data Documentation

Definition at line 101 of file editor_settings.hpp.

Referenced by post_show(), pre_show(), and update_selected_tod_info().

Current map generator index.

Definition at line 76 of file editor_settings.hpp.

Referenced by do_next_tod(), get_selected_tod(), pre_show(), and update_selected_tod_info().

Label for the current tod image.

Definition at line 82 of file editor_settings.hpp.

Referenced by pre_show().

Label for the current tod.

Definition at line 79 of file editor_settings.hpp.

Referenced by pre_show(), and update_selected_tod_info().

Definition at line 85 of file editor_settings.hpp.

Referenced by pre_show(), and slider_update_callback().

Definition at line 91 of file editor_settings.hpp.

Referenced by pre_show(), update_selected_tod_info(), and update_tod_display().

Definition at line 90 of file editor_settings.hpp.

Referenced by pre_show(), update_selected_tod_info(), and update_tod_display().

Definition at line 89 of file editor_settings.hpp.

Referenced by pre_show(), update_selected_tod_info(), and update_tod_display().

Definition at line 84 of file editor_settings.hpp.

Referenced by do_next_tod(), pre_show(), and update_selected_tod_info().

Definition at line 87 of file editor_settings.hpp.

The display to update when the ToD changes.

The pointer may be NULL, in the unit tests, but normally it should be a pointer to a valid object.

Definition at line 99 of file editor_settings.hpp.

Referenced by update_tod_display().

Available time_of_days.

Definition at line 73 of file editor_settings.hpp.

Referenced by do_next_tod(), get_selected_tod(), pre_show(), and update_selected_tod_info().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated by doxygen 1.7.1 on Thu May 24 2012 01:22:07 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs