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

gui2::teditor_resize_map Class Reference

#include <editor_resize_map.hpp>

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

List of all members.

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 &copy_edge_terrain)
 Constructor.

Static Public Member Functions

static bool execute (int &width, int &height, EXPAND_DIRECTION &expand_direction, bool &copy_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_integerwidth_
 The currently selected width.
tfield_integerheight_
 The currently selected height.
int old_width_
 The original width.
int old_height_
 The original height.
EXPAND_DIRECTIONexpand_direction_
 The selected expansion direction.
ttoggle_buttondirection_buttons_ [9]
 The toggle buttons show the state of expand_direction_.

Detailed Description

Definition at line 25 of file editor_resize_map.hpp.


Member Enumeration Documentation

Enumerator:
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.


Constructor & Destructor Documentation

gui2::teditor_resize_map::teditor_resize_map ( int &  width,
int &  height,
EXPAND_DIRECTION expand_direction,
bool &  copy_edge_terrain 
)

Constructor.

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

Here is the call graph for this function:

Here is the caller graph for this function:


Member Function Documentation

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

Here is the call graph for this function:

Here is the caller graph for this function:

void gui2::teditor_resize_map::pre_show ( CVideo video,
twindow window 
) [private, virtual]
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().

Here is the call graph for this function:

Here is the caller graph for this function:

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

Here is the call graph for this function:

Here is the caller graph for this function:

virtual const std::string& gui2::teditor_resize_map::window_id (  )  const [private, virtual]

Inherited from tdialog, implemented by REGISTER_DIALOG.

Implements gui2::tdialog.


Member Data Documentation

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

The currently selected height.

Definition at line 90 of file editor_resize_map.hpp.

Referenced by update_expand_direction().

The original height.

Definition at line 96 of file editor_resize_map.hpp.

Referenced by update_expand_direction().

The original width.

Definition at line 93 of file editor_resize_map.hpp.

Referenced by update_expand_direction().

The currently selected width.

Definition at line 87 of file editor_resize_map.hpp.

Referenced by update_expand_direction().


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:06 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs