Public Member Functions | Private Member Functions | Private Attributes

gui2::tcampaign_difficulty Class Reference

#include <campaign_difficulty.hpp>

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

List of all members.

Public Member Functions

 tcampaign_difficulty (const std::vector< std::string > &items, const int default_difficulty=-1)
int selected_index () const
 Returns the selected item index after displaying.

Private Member Functions

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

int index_
std::vector< tlegacy_menu_itemitems_
const int default_difficulty_

Detailed Description

Definition at line 26 of file campaign_difficulty.hpp.


Constructor & Destructor Documentation

gui2::tcampaign_difficulty::tcampaign_difficulty ( const std::vector< std::string > &  items,
const int  default_difficulty = -1 
) [explicit]

Definition at line 65 of file campaign_difficulty.cpp.


Member Function Documentation

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

Inherited from tdialog.

Reimplemented from gui2::tdialog.

Definition at line 103 of file campaign_difficulty.cpp.

References gui2::tdialog::get_retval(), gui2::tlistbox::get_selected_row(), index_, and gui2::twindow::OK.

Here is the call graph for this function:

void gui2::tcampaign_difficulty::pre_show ( CVideo video,
twindow window 
) [private, virtual]
int gui2::tcampaign_difficulty::selected_index (  )  const [inline]

Returns the selected item index after displaying.

Returns:
-1 if the dialog was cancelled.

Definition at line 37 of file campaign_difficulty.hpp.

References index_.

Referenced by game_controller::new_campaign(), and savegame::loadgame::show_difficulty_dialog().

Here is the caller graph for this function:

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

Inherited from tdialog, implemented by REGISTER_DIALOG.

Implements gui2::tdialog.


Member Data Documentation

Definition at line 43 of file campaign_difficulty.hpp.

Definition at line 40 of file campaign_difficulty.hpp.

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

Definition at line 41 of file campaign_difficulty.hpp.

Referenced by pre_show().


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