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

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

#include <old_markup.hpp>

Public Member Functions

 tlegacy_menu_item (const std::string &str=std::string())
 
const std::stringicon () const
 
const std::stringlabel () const
 
const std::stringdescription () const
 
bool is_default () const
 
tlegacy_menu_itemoperator= (const tlegacy_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 26 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_, i, icon_, label_, pos, and prev.

Member Function Documentation

const std::string& gui2::tlegacy_menu_item::description ( ) const
inline
const std::string& gui2::tlegacy_menu_item::icon ( ) const
inline
bool gui2::tlegacy_menu_item::is_default ( ) const
inline
const std::string& gui2::tlegacy_menu_item::label ( ) const
inline
tlegacy_menu_item& gui2::tlegacy_menu_item::operator= ( const tlegacy_menu_item rhs)
inline

Definition at line 65 of file old_markup.hpp.

References desc_, icon_, and label_.

Member Data Documentation

bool gui2::tlegacy_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 90 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 83 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 77 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 80 of file old_markup.hpp.

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


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