The Battle for Wesnoth  1.19.5+dev
Public Member Functions | Private Attributes | List of all members
theme::menu Class Reference

#include <theme.hpp>

Inheritance diagram for theme::menu:

Public Member Functions

 menu ()
 
 menu (std::size_t sw, std::size_t sh, const config &cfg)
 
bool is_button () const
 
bool is_context () const
 
const std::string & title () const
 
const std::string & tooltip () const
 
const std::string & image () const
 
const std::string & overlay () const
 
const std::vector< config > & items () const
 
void set_title (const std::string &new_title)
 
virtual rectlocation (const SDL_Rect &screen) const
 
- Public Member Functions inherited from theme::object
 object ()
 
 object (std::size_t sw, std::size_t sh, const config &cfg)
 
virtual ~object ()
 
virtual rectlocation (const SDL_Rect &screen) const
 
const rectget_location () const
 
const std::string & get_id () const
 
void modify_location (const _rect &rect)
 
void modify_location (std::string rect_str, SDL_Rect rect_ref)
 

Private Attributes

bool button_
 
bool context_
 
std::string title_
 
std::string tooltip_
 
std::string image_
 
std::string overlay_
 
std::vector< configitems_
 

Additional Inherited Members

- Public Types inherited from theme::object
enum  ANCHORING { FIXED , TOP_ANCHORED , PROPORTIONAL , BOTTOM_ANCHORED }
 

Detailed Description

Definition at line 217 of file theme.hpp.

Constructor & Destructor Documentation

◆ menu() [1/2]

theme::menu::menu ( )

Definition at line 496 of file theme.cpp.

◆ menu() [2/2]

theme::menu::menu ( std::size_t  sw,
std::size_t  sh,
const config cfg 
)
explicit

Member Function Documentation

◆ image()

const std::string& theme::menu::image ( ) const
inline

Definition at line 233 of file theme.hpp.

References image_.

◆ is_button()

bool theme::menu::is_button ( ) const
inline

Definition at line 225 of file theme.hpp.

References button_.

◆ is_context()

bool theme::menu::is_context ( ) const
inline

Definition at line 227 of file theme.hpp.

References context_.

Referenced by theme::add_object(), theme::context_menu(), and hotkey::command_executor::show_menu().

◆ items()

const std::vector<config>& theme::menu::items ( ) const
inline

Definition at line 237 of file theme.hpp.

References items_.

Referenced by controller_base::play_slice(), and hotkey::command_executor::show_menu().

◆ location()

rect & theme::object::location

Definition at line 53 of file theme.cpp.

Referenced by controller_base::play_slice().

◆ overlay()

const std::string& theme::menu::overlay ( ) const
inline

Definition at line 235 of file theme.hpp.

References overlay_.

◆ set_title()

void theme::menu::set_title ( const std::string &  new_title)
inline

Definition at line 239 of file theme.hpp.

References title_.

◆ title()

const std::string& theme::menu::title ( ) const
inline

Definition at line 229 of file theme.hpp.

References title_.

Referenced by hotkey::command_executor::get_menu_images().

◆ tooltip()

const std::string& theme::menu::tooltip ( ) const
inline

Definition at line 231 of file theme.hpp.

References tooltip_.

Member Data Documentation

◆ button_

bool theme::menu::button_
private

Definition at line 241 of file theme.hpp.

Referenced by is_button().

◆ context_

bool theme::menu::context_
private

Definition at line 242 of file theme.hpp.

Referenced by is_context().

◆ image_

std::string theme::menu::image_
private

Definition at line 243 of file theme.hpp.

Referenced by image().

◆ items_

std::vector<config> theme::menu::items_
private

Definition at line 244 of file theme.hpp.

Referenced by items(), and menu().

◆ overlay_

std::string theme::menu::overlay_
private

Definition at line 243 of file theme.hpp.

Referenced by overlay().

◆ title_

std::string theme::menu::title_
private

Definition at line 243 of file theme.hpp.

Referenced by set_title(), and title().

◆ tooltip_

std::string theme::menu::tooltip_
private

Definition at line 243 of file theme.hpp.

Referenced by menu(), and tooltip().


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