Public Member Functions | Private Attributes

gui2::tlegacy_menu_item Class Reference

Implements simple parsing of legacy GUI1 item markup. More...

#include <old_markup.hpp>

Collaboration diagram for gui2::tlegacy_menu_item:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 tlegacy_menu_item (const std::string &str=std::string())
const std::string & icon () const
const std::string & label () const
const std::string & description () const
bool is_default () const
tlegacy_menu_itemoperator= (const tlegacy_menu_item &rhs)

Private Attributes

std::string icon_
 The icon for the menu item.
std::string label_
 The first text item of the menu item, normally a short string.
std::string desc_
 The second text item of the menu item, normally a longer string.
bool default_
 Is the item the default item and thus initially selected.

Detailed Description

Implements simple parsing of legacy GUI1 item markup.

Definition at line 27 of file old_markup.hpp.


Constructor & Destructor Documentation

gui2::tlegacy_menu_item::tlegacy_menu_item ( const std::string &  str = std::string()  )  [explicit]
Todo:
This syntax looks like a bad hack, it would be nice to write a new syntax which doesn't use those hacks (also avoids the problem with special meanings for certain characters.

Definition at line 20 of file old_markup.cpp.

References default_, desc_, icon_, label_, and pos.


Member Function Documentation

const std::string& gui2::tlegacy_menu_item::description (  )  const [inline]

Definition at line 54 of file old_markup.hpp.

References desc_.

Referenced by gui2::twml_message_::pre_show(), and gui2::tcampaign_difficulty::pre_show().

Here is the caller graph for this function:

const std::string& gui2::tlegacy_menu_item::icon (  )  const [inline]

Definition at line 46 of file old_markup.hpp.

References icon_.

Referenced by gui2::twml_message_::pre_show(), and gui2::tcampaign_difficulty::pre_show().

Here is the caller graph for this function:

bool gui2::tlegacy_menu_item::is_default (  )  const [inline]

Definition at line 58 of file old_markup.hpp.

References default_.

Referenced by gui2::twml_message_::pre_show(), and gui2::tcampaign_difficulty::pre_show().

Here is the caller graph for this function:

const std::string& gui2::tlegacy_menu_item::label (  )  const [inline]

Definition at line 50 of file old_markup.hpp.

References label_.

Referenced by gui2::twml_message_::pre_show(), and gui2::tcampaign_difficulty::pre_show().

Here is the caller graph for this function:

tlegacy_menu_item& gui2::tlegacy_menu_item::operator= ( const tlegacy_menu_item rhs  )  [inline]

Definition at line 62 of file old_markup.hpp.

References desc_, icon_, and label_.


Member Data Documentation

Is the item the default item and thus initially selected.

It's unspecified what happens if multiple items in a menu are selected.

Definition at line 86 of file old_markup.hpp.

Referenced by is_default(), and tlegacy_menu_item().

std::string gui2::tlegacy_menu_item::desc_ [private]

The second text item of the menu item, normally a longer string.

Definition at line 79 of file old_markup.hpp.

Referenced by description(), operator=(), and tlegacy_menu_item().

std::string gui2::tlegacy_menu_item::icon_ [private]

The icon for the menu item.

Definition at line 73 of file old_markup.hpp.

Referenced by icon(), operator=(), and tlegacy_menu_item().

std::string gui2::tlegacy_menu_item::label_ [private]

The first text item of the menu item, normally a short string.

Definition at line 76 of file old_markup.hpp.

Referenced by label(), operator=(), and tlegacy_menu_item().


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