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

#include <theme.hpp>

Inheritance diagram for theme::label:
Inheritance graph

Public Member Functions

 label ()
 
 label (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
 
- Public Member Functions inherited from theme::object
 object ()
 
 object (const config &cfg)
 
virtual ~object ()
 
virtual SDL_Rect & location (const SDL_Rect &screen) const
 
const SDL_Rect & get_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 95 of file theme.hpp.

Constructor & Destructor Documentation

◆ label() [1/2]

theme::label::label ( )

Definition at line 416 of file theme.cpp.

◆ label() [2/2]

theme::label::label ( const config cfg)
explicit

Member Function Documentation

◆ empty()

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

Definition at line 107 of file theme.hpp.

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

◆ font_rgb()

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

Definition at line 110 of file theme.hpp.

Referenced by draw_label().

◆ font_rgb_set()

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

Definition at line 111 of file theme.hpp.

Referenced by draw_label().

◆ font_size()

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

Definition at line 109 of file theme.hpp.

Referenced by draw_label().

◆ icon()

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

Definition at line 105 of file theme.hpp.

Referenced by draw_label().

◆ set_text()

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

Definition at line 104 of file theme.hpp.

Referenced by theme::modify_label().

◆ text()

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

Definition at line 103 of file theme.hpp.

Referenced by draw_label().

Member Data Documentation

◆ font_

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

Definition at line 114 of file theme.hpp.

Referenced by label().

◆ font_rgb_

color_t theme::label::font_rgb_
private

Definition at line 116 of file theme.hpp.

Referenced by label().

◆ font_rgb_set_

bool theme::label::font_rgb_set_
private

Definition at line 115 of file theme.hpp.

Referenced by label().

◆ icon_

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

Definition at line 113 of file theme.hpp.

◆ text_

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

Definition at line 113 of file theme.hpp.


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