The Battle for Wesnoth  1.15.0-dev
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="", const std::string deprecation_msg="")
 
const std::string & icon () const
 
const std::string & label () const
 
const std::string & description () const
 
bool is_default () const
 
bool contained_markup () 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...
 
bool contained_markup_
 Was any old markup actually parsed? More...
 

Detailed Description

Implements simple parsing of legacy GUI1 item markup.

Definition at line 25 of file old_markup.hpp.

Constructor & Destructor Documentation

◆ legacy_menu_item()

gui2::legacy_menu_item::legacy_menu_item ( const std::string &  str = "",
const std::string  deprecation_msg = "" 
)
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 22 of file old_markup.cpp.

References contained_markup_, default_, deprecated_message(), desc_, FOR_REMOVAL, i, icon_, label_, and prev.

Member Function Documentation

◆ contained_markup()

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

Definition at line 64 of file old_markup.hpp.

References contained_markup_.

Referenced by game_events::wml_menu_item::update().

◆ description()

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

Definition at line 54 of file old_markup.hpp.

References desc_.

Referenced by lua_gui2::show_message_dialog(), and game_events::wml_menu_item::update().

◆ icon()

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

Definition at line 44 of file old_markup.hpp.

References icon_.

Referenced by lua_gui2::show_message_dialog().

◆ is_default()

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

Definition at line 59 of file old_markup.hpp.

References default_.

Referenced by lua_gui2::show_message_dialog().

◆ label()

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

Definition at line 49 of file old_markup.hpp.

References label_.

Referenced by lua_gui2::show_message_dialog(), and game_events::wml_menu_item::update().

◆ operator=()

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

Definition at line 69 of file old_markup.hpp.

References default_, desc_, icon_, and label_.

Member Data Documentation

◆ contained_markup_

bool gui2::legacy_menu_item::contained_markup_
private

Was any old markup actually parsed?

Definition at line 100 of file old_markup.hpp.

Referenced by contained_markup(), and legacy_menu_item().

◆ default_

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

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

◆ desc_

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

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

Definition at line 88 of file old_markup.hpp.

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

◆ icon_

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

The icon for the menu item.

Definition at line 82 of file old_markup.hpp.

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

◆ label_

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

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

Definition at line 85 of file old_markup.hpp.

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


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