#include <editor_resize_map.hpp>


Public Types | |
| enum | EXPAND_DIRECTION { EXPAND_BOTTOM_RIGHT, EXPAND_BOTTOM, EXPAND_BOTTOM_LEFT, EXPAND_RIGHT, EXPAND_CENTER, EXPAND_LEFT, EXPAND_TOP_RIGHT, EXPAND_TOP, EXPAND_TOP_LEFT } |
Public Member Functions | |
| teditor_resize_map (int &width, int &height, EXPAND_DIRECTION &expand_direction, bool ©_edge_terrain) | |
| Constructor. | |
Static Public Member Functions | |
| static bool | execute (int &width, int &height, EXPAND_DIRECTION &expand_direction, bool ©_edge_terrain, CVideo &video) |
| The excute function see tdialog for more information. | |
Private Member Functions | |
| void | update_expand_direction (twindow &window) |
| void | set_direction_icon (int index, std::string icon) |
| void | pre_show (CVideo &video, twindow &window) |
| Inherited from tdialog. | |
| virtual const std::string & | window_id () const |
| Inherited from tdialog, implemented by REGISTER_DIALOG. | |
Private Attributes | |
| tfield_integer * | width_ |
| The currently selected width. | |
| tfield_integer * | height_ |
| The currently selected height. | |
| int | old_width_ |
| The original width. | |
| int | old_height_ |
| The original height. | |
| EXPAND_DIRECTION & | expand_direction_ |
| The selected expansion direction. | |
| ttoggle_button * | direction_buttons_ [9] |
| The toggle buttons show the state of expand_direction_. | |
Definition at line 25 of file editor_resize_map.hpp.
| EXPAND_BOTTOM_RIGHT | |
| EXPAND_BOTTOM | |
| EXPAND_BOTTOM_LEFT | |
| EXPAND_RIGHT | |
| EXPAND_CENTER | |
| EXPAND_LEFT | |
| EXPAND_TOP_RIGHT | |
| EXPAND_TOP | |
| EXPAND_TOP_LEFT |
Definition at line 28 of file editor_resize_map.hpp.
| gui2::teditor_resize_map::teditor_resize_map | ( | int & | width, | |
| int & | height, | |||
| EXPAND_DIRECTION & | expand_direction, | |||
| bool & | copy_edge_terrain | |||
| ) |
Constructor.
| width | [in] The initial width of the map. | |
| width | [out] The selected width of the map if the dialog returns twindow::OK undefined otherwise. | |
| height | [in] The initial height of the map. | |
| height | [out] The selected height of the map if the dialog returns twindow::OK undefined otherwise. | |
| expand_direction | [out] The selected expand direction if the dialog returns twindow::OK undefined otherwise. | |
| copy_edge_terrain | [in] The initial value of the copy edge toggle. | |
| copy_edge_terrain | [out] The final value of the copy edge toggle if the dialog returns twindow::OK undefined otherwise. |
Definition at line 91 of file editor_resize_map.cpp.
References str_cast().
Referenced by execute().


| static bool gui2::teditor_resize_map::execute | ( | int & | width, | |
| int & | height, | |||
| EXPAND_DIRECTION & | expand_direction, | |||
| bool & | copy_edge_terrain, | |||
| CVideo & | video | |||
| ) | [inline, static] |
The excute function see tdialog for more information.
Definition at line 70 of file editor_resize_map.hpp.
References teditor_resize_map().
Referenced by editor::context_manager::resize_map_dialog().


Inherited from tdialog.
Reimplemented from gui2::tdialog.
Definition at line 108 of file editor_resize_map.cpp.
References gui2::event::connect_signal_notify_modified(), gui2::dialog_callback(), direction_buttons_, lexical_cast(), gui2::ttoggle_button::set_callback_state_change(), gui2::ttoggle_button::set_value(), and update_expand_direction().

| void gui2::teditor_resize_map::set_direction_icon | ( | int | index, | |
| std::string | icon | |||
| ) | [private] |
Definition at line 151 of file editor_resize_map.cpp.
References direction_buttons_, and gui2::ttoggle_button::set_icon_name().
Referenced by update_expand_direction().


| void gui2::teditor_resize_map::update_expand_direction | ( | twindow & | window | ) | [private] |
Definition at line 159 of file editor_resize_map.cpp.
References direction_buttons_, expand_direction_, gui2::tfield< T, W, CT >::get_widget_value(), height_, left, old_height_, old_width_, gui2::resize_grid_xy_to_idx(), right, set_direction_icon(), gui2::ttoggle_button::set_value(), and width_.
Referenced by pre_show().


| virtual const std::string& gui2::teditor_resize_map::window_id | ( | ) | const [private, virtual] |
Inherited from tdialog, implemented by REGISTER_DIALOG.
Implements gui2::tdialog.
ttoggle_button* gui2::teditor_resize_map::direction_buttons_[9] [private] |
The toggle buttons show the state of expand_direction_.
Allows both so select a direction and visually show the effect of the selection.
Definition at line 107 of file editor_resize_map.hpp.
Referenced by pre_show(), set_direction_icon(), and update_expand_direction().
The selected expansion direction.
Definition at line 99 of file editor_resize_map.hpp.
Referenced by update_expand_direction().
tfield_integer* gui2::teditor_resize_map::height_ [private] |
The currently selected height.
Definition at line 90 of file editor_resize_map.hpp.
Referenced by update_expand_direction().
int gui2::teditor_resize_map::old_height_ [private] |
The original height.
Definition at line 96 of file editor_resize_map.hpp.
Referenced by update_expand_direction().
int gui2::teditor_resize_map::old_width_ [private] |
The original width.
Definition at line 93 of file editor_resize_map.hpp.
Referenced by update_expand_direction().
tfield_integer* gui2::teditor_resize_map::width_ [private] |
The currently selected width.
Definition at line 87 of file editor_resize_map.hpp.
Referenced by update_expand_direction().
| Generated by doxygen 1.7.1 on Thu May 24 2012 01:22:06 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |