#include <editor_settings.hpp>


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_day & | get_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_day > | tods_ |
| Available time_of_days. | |
| int | current_tod_ |
| Current map generator index. | |
| tlabel * | current_tod_label_ |
| Label for the current tod. | |
| tlabel * | current_tod_image_ |
| Label for the current tod image. | |
| ttoggle_button * | custom_tod_toggle_ |
| ttoggle_button * | custom_tod_auto_refresh_ |
| tfield_bool * | custom_tod_toggle_field_ |
| tfield_integer * | custom_tod_red_field_ |
| tfield_integer * | custom_tod_green_field_ |
| tfield_integer * | custom_tod_blue_field_ |
| editor::editor_display * | display_ |
| The display to update when the ToD changes. | |
| bool | can_update_display_ |
Definition at line 35 of file editor_settings.hpp.
| 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().


| 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().


| 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().


| 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().

| 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().

Inherited from tdialog.
Reimplemented from gui2::tdialog.
Definition at line 201 of file editor_settings.cpp.
References tod_color::b, can_update_display_, time_of_day::color, gui2::event::connect_signal_mouse_left_click(), gui2::event::connect_signal_notify_modified(), current_tod_, current_tod_image_, current_tod_label_, custom_tod_auto_refresh_, custom_tod_blue_field_, custom_tod_green_field_, custom_tod_red_field_, custom_tod_toggle_, gui2::dialog_callback(), do_next_tod(), tod_color::g, gui2::tfield< T, W, CT >::get_widget_value(), tod_color::r, slider_update_callback(), tods_, update_selected_tod_info(), update_tod_display(), and gui2::tfield_::widget().

| 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().


| void gui2::teditor_settings::update_selected_tod_info | ( | twindow & | window | ) | [private] |
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().


| void gui2::teditor_settings::update_tod_display | ( | twindow & | window | ) | [private] |
Definition at line 123 of file editor_settings.cpp.
References custom_tod_blue_field_, custom_tod_green_field_, custom_tod_red_field_, display_, display::draw(), gui2::tfield< T, W, CT >::get_widget_value(), display::invalidate_all(), image::set_color_adjustment(), gui2::twidget::set_dirty(), and gui2::twindow::undraw().
Referenced by post_show(), pre_show(), slider_update_callback(), and update_selected_tod_info().


| virtual const std::string& gui2::teditor_settings::window_id | ( | ) | const [private, virtual] |
Inherited from tdialog, implemented by REGISTER_DIALOG.
Implements gui2::tdialog.
bool gui2::teditor_settings::can_update_display_ [private] |
Definition at line 101 of file editor_settings.hpp.
Referenced by post_show(), pre_show(), and update_selected_tod_info().
int gui2::teditor_settings::current_tod_ [private] |
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().
tlabel* gui2::teditor_settings::current_tod_image_ [private] |
Label for the current tod image.
Definition at line 82 of file editor_settings.hpp.
Referenced by pre_show().
tlabel* gui2::teditor_settings::current_tod_label_ [private] |
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().
std::vector<time_of_day> gui2::teditor_settings::tods_ [private] |
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().
| Generated by doxygen 1.7.1 on Thu May 24 2012 01:22:07 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |