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

#include <theme.hpp>

Inheritance diagram for theme::label:

Public Member Functions

 label ()
 
 label (std::size_t sw, std::size_t sh, const config &cfg)
 
const std::string & text () const
 
void set_text (const std::string &text)
 
const std::string & icon () const
 
bool empty () const
 
std::size_t font_size () const
 
color_t font_rgb () const
 
bool font_rgb_set () const
 
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

std::string text_
 
std::string icon_
 
std::size_t font_
 
bool font_rgb_set_
 
color_t font_rgb_
 

Additional Inherited Members

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

Detailed Description

Definition at line 101 of file theme.hpp.

Constructor & Destructor Documentation

◆ label() [1/2]

theme::label::label ( )

Definition at line 423 of file theme.cpp.

◆ label() [2/2]

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

Member Function Documentation

◆ empty()

bool theme::label::empty ( ) const
inline

Definition at line 113 of file theme.hpp.

References icon_, and text_.

Referenced by theme::status_item::get_label().

◆ font_rgb()

color_t theme::label::font_rgb ( ) const
inline

Definition at line 116 of file theme.hpp.

References font_rgb_.

◆ font_rgb_set()

bool theme::label::font_rgb_set ( ) const
inline

Definition at line 117 of file theme.hpp.

References font_rgb_set_.

◆ font_size()

std::size_t theme::label::font_size ( ) const
inline

Definition at line 115 of file theme.hpp.

References font_.

◆ icon()

const std::string& theme::label::icon ( ) const
inline

Definition at line 111 of file theme.hpp.

References icon_.

◆ location()

rect & theme::object::location

Definition at line 53 of file theme.cpp.

◆ set_text()

void theme::label::set_text ( const std::string &  text)
inline

Definition at line 110 of file theme.hpp.

References text(), and text_.

Referenced by theme::modify_label().

◆ text()

const std::string& theme::label::text ( ) const
inline

Definition at line 109 of file theme.hpp.

References text_.

Referenced by set_text().

Member Data Documentation

◆ font_

std::size_t theme::label::font_
private

Definition at line 120 of file theme.hpp.

Referenced by font_size(), and label().

◆ font_rgb_

color_t theme::label::font_rgb_
private

Definition at line 122 of file theme.hpp.

Referenced by font_rgb(), and label().

◆ font_rgb_set_

bool theme::label::font_rgb_set_
private

Definition at line 121 of file theme.hpp.

Referenced by font_rgb_set(), and label().

◆ icon_

std::string theme::label::icon_
private

Definition at line 119 of file theme.hpp.

Referenced by empty(), and icon().

◆ text_

std::string theme::label::text_
private

Definition at line 119 of file theme.hpp.

Referenced by empty(), set_text(), and text().


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