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

#include <theme.hpp>

Inheritance diagram for theme::action:

Public Member Functions

 action ()
 
 action (std::size_t sw, std::size_t sh, const config &cfg)
 
bool is_context () const
 
const std::string & title () const
 
const std::string tooltip (std::size_t index) const
 
const std::string & type () const
 
const std::string & image () const
 
const std::string & overlay () const
 
const std::vector< std::string > & 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 (const std::string &rect_str, SDL_Rect rect_ref)
 

Private Attributes

bool context_
 
bool auto_tooltip_
 
bool tooltip_name_prepend_
 
std::string title_
 
std::string tooltip_
 
std::string image_
 
std::string overlay_
 
std::string type_
 
std::vector< std::string > items_
 

Additional Inherited Members

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

Detailed Description

Definition at line 164 of file theme.hpp.

Constructor & Destructor Documentation

◆ action() [1/2]

theme::action::action ( )

Definition at line 530 of file theme.cpp.

◆ action() [2/2]

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

Definition at line 544 of file theme.cpp.

Member Function Documentation

◆ image()

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

Definition at line 180 of file theme.hpp.

References image_.

◆ is_context()

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

Definition at line 172 of file theme.hpp.

References context_.

Referenced by theme::add_object().

◆ items()

const std::vector<std::string>& theme::action::items ( ) const
inline

Definition at line 184 of file theme.hpp.

References items_.

Referenced by controller_base::play_slice().

◆ location()

rect & theme::object::location

Definition at line 53 of file theme.cpp.

Referenced by controller_base::play_slice().

◆ overlay()

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

Definition at line 182 of file theme.hpp.

References overlay_.

◆ set_title()

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

Definition at line 186 of file theme.hpp.

References title_.

◆ title()

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

Definition at line 174 of file theme.hpp.

References title_.

◆ tooltip()

const std::string theme::action::tooltip ( std::size_t  index) const

Definition at line 558 of file theme.cpp.

References _(), hotkey::get_hotkey_command(), hotkey::get_names(), and utf8::index().

◆ type()

const std::string& theme::action::type ( ) const
inline

Definition at line 178 of file theme.hpp.

References type_.

Member Data Documentation

◆ auto_tooltip_

bool theme::action::auto_tooltip_
private

Definition at line 188 of file theme.hpp.

◆ context_

bool theme::action::context_
private

Definition at line 188 of file theme.hpp.

Referenced by is_context().

◆ image_

std::string theme::action::image_
private

Definition at line 189 of file theme.hpp.

Referenced by image().

◆ items_

std::vector<std::string> theme::action::items_
private

Definition at line 190 of file theme.hpp.

Referenced by items().

◆ overlay_

std::string theme::action::overlay_
private

Definition at line 189 of file theme.hpp.

Referenced by overlay().

◆ title_

std::string theme::action::title_
private

Definition at line 189 of file theme.hpp.

Referenced by set_title(), and title().

◆ tooltip_

std::string theme::action::tooltip_
private

Definition at line 189 of file theme.hpp.

◆ tooltip_name_prepend_

bool theme::action::tooltip_name_prepend_
private

Definition at line 188 of file theme.hpp.

◆ type_

std::string theme::action::type_
private

Definition at line 189 of file theme.hpp.

Referenced by type().


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