The Battle for Wesnoth  1.13.10+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Member Functions | Private Attributes | List of all members
gui2::legacy_menu_item Class Reference

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

#include <old_markup.hpp>

Public Member Functions

 legacy_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
 
legacy_menu_itemoperator= (const legacy_menu_item &rhs)
 

Private Attributes

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

Detailed Description

Implements simple parsing of legacy GUI1 item markup.

Definition at line 25 of file old_markup.hpp.

Constructor & Destructor Documentation

gui2::legacy_menu_item::legacy_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_, i, icon_, label_, and prev.

Member Function Documentation

const std::string& gui2::legacy_menu_item::description ( ) const
inline

Definition at line 54 of file old_markup.hpp.

References desc_.

Referenced by gui2::dialogs::generate_difficulty_config(), and lua_gui2::show_message_dialog().

const std::string& gui2::legacy_menu_item::icon ( ) const
inline

Definition at line 44 of file old_markup.hpp.

References icon_.

Referenced by gui2::dialogs::generate_difficulty_config(), and lua_gui2::show_message_dialog().

bool gui2::legacy_menu_item::is_default ( ) const
inline

Definition at line 59 of file old_markup.hpp.

References default_.

Referenced by gui2::dialogs::generate_difficulty_config(), and lua_gui2::show_message_dialog().

const std::string& gui2::legacy_menu_item::label ( ) const
inline

Definition at line 49 of file old_markup.hpp.

References label_.

Referenced by gui2::dialogs::generate_difficulty_config(), and lua_gui2::show_message_dialog().

legacy_menu_item& gui2::legacy_menu_item::operator= ( const legacy_menu_item rhs)
inline

Definition at line 64 of file old_markup.hpp.

References desc_, icon_, and label_.

Member Data Documentation

bool gui2::legacy_menu_item::default_
private

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 89 of file old_markup.hpp.

Referenced by is_default(), and legacy_menu_item().

std::string gui2::legacy_menu_item::desc_
private

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

Definition at line 82 of file old_markup.hpp.

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

std::string gui2::legacy_menu_item::icon_
private

The icon for the menu item.

Definition at line 76 of file old_markup.hpp.

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

std::string gui2::legacy_menu_item::label_
private

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

Definition at line 79 of file old_markup.hpp.

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


The documentation for this class was generated from the following files: