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

gui::combo Class Reference

#include <combo.hpp>

Inheritance diagram for gui::combo:
Inheritance graph
[legend]
Collaboration diagram for gui::combo:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 combo (display &disp, const std::vector< std::string > &items)
void set_selected (int val)
void set_items (const std::vector< std::string > &items)
int selected () const
bool changed ()

Protected Member Functions

virtual void process_event ()
void make_drop_down_menu ()

Private Member Functions

void set_selected_internal (int val)

Private Attributes

std::vector< std::string > items_
int selected_
int oldSelected_
displaydisp_

Static Private Attributes

static const std::string empty_combo_label = ""
static const int font_size = font::SIZE_SMALL
static const int horizontal_padding = 10
static const int vertical_padding = 10

Detailed Description

Definition at line 24 of file combo.hpp.


Constructor & Destructor Documentation

gui::combo::combo ( display disp,
const std::vector< std::string > &  items 
)

Definition at line 33 of file combo.cpp.


Member Function Documentation

bool gui::combo::changed (  ) 

Definition at line 44 of file combo.cpp.

References oldSelected_, and selected_.

Referenced by mp::wait::leader_preview_pane::process_event(), and mp::connect::side::process_event().

Here is the caller graph for this function:

void gui::combo::make_drop_down_menu (  )  [protected]

Definition at line 75 of file combo.cpp.

References disp_, items_, gui::widget::location(), gui::MESSAGE, set_selected_internal(), and gui::show_dialog().

Referenced by gui::combo_drag::process_event(), and process_event().

Here is the call graph for this function:

Here is the caller graph for this function:

void gui::combo::process_event (  )  [protected, virtual]

Reimplemented from events::handler.

Definition at line 82 of file combo.cpp.

References make_drop_down_menu(), and gui::button::pressed().

Here is the call graph for this function:

int gui::combo::selected (  )  const
void gui::combo::set_items ( const std::vector< std::string > &  items  ) 
void gui::combo::set_selected ( int  val  ) 
void gui::combo::set_selected_internal ( int  val  )  [private]

Definition at line 59 of file combo.cpp.

References items_, oldSelected_, selected_, and gui::button::set_label().

Referenced by make_drop_down_menu(), and set_selected().

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Definition at line 42 of file combo.hpp.

Referenced by make_drop_down_menu().

const std::string gui::combo::empty_combo_label = "" [static, private]

Definition at line 43 of file combo.hpp.

const int gui::combo::font_size = font::SIZE_SMALL [static, private]

Definition at line 44 of file combo.hpp.

const int gui::combo::horizontal_padding = 10 [static, private]

Definition at line 45 of file combo.hpp.

std::vector<std::string> gui::combo::items_ [private]

Definition at line 40 of file combo.hpp.

Referenced by make_drop_down_menu(), set_items(), and set_selected_internal().

int gui::combo::oldSelected_ [private]

Definition at line 41 of file combo.hpp.

Referenced by changed(), set_selected(), and set_selected_internal().

int gui::combo::selected_ [private]

Definition at line 41 of file combo.hpp.

Referenced by changed(), selected(), set_items(), set_selected(), and set_selected_internal().

const int gui::combo::vertical_padding = 10 [static, private]

Definition at line 46 of file combo.hpp.


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