The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
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::stringtext () const
 
void set_text (const std::string &text)
 
const std::stringicon () const
 
bool empty () const
 
size_t font_size () const
 
Uint32 font_rgb () const
 
bool font_rgb_set () const
 
- Public Member Functions inherited from theme::object
 object ()
 
 object (const config &cfg)
 
virtual ~object ()
 
SDL_Rect & location (const SDL_Rect &screen) const
 
const SDL_Rect & get_location () const
 
const std::stringget_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_
 
size_t font_
 
bool font_rgb_set_
 
Uint32 font_rgb_
 

Additional Inherited Members

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

Detailed Description

Definition at line 111 of file theme.hpp.

Constructor & Destructor Documentation

theme::label::label ( )

Definition at line 440 of file theme.cpp.

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

Definition at line 448 of file theme.cpp.

References c, font_, font_rgb_, font_rgb_set_, g, config::has_attribute(), and utils::split().

Member Function Documentation

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

Definition at line 123 of file theme.hpp.

References icon_, and text_.

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

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

Definition at line 126 of file theme.hpp.

References font_rgb_.

Referenced by draw_label().

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

Definition at line 127 of file theme.hpp.

References font_rgb_set_.

Referenced by draw_label().

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

Definition at line 125 of file theme.hpp.

References font_.

Referenced by draw_label().

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

Definition at line 121 of file theme.hpp.

References icon_.

Referenced by draw_label().

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

Definition at line 120 of file theme.hpp.

References text(), and text_.

Referenced by theme::modify_label().

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

Definition at line 119 of file theme.hpp.

References text_.

Referenced by draw_label(), and set_text().

Member Data Documentation

size_t theme::label::font_
private

Definition at line 130 of file theme.hpp.

Referenced by font_size(), and label().

Uint32 theme::label::font_rgb_
private

Definition at line 132 of file theme.hpp.

Referenced by font_rgb(), and label().

bool theme::label::font_rgb_set_
private

Definition at line 131 of file theme.hpp.

Referenced by font_rgb_set(), and label().

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

Definition at line 129 of file theme.hpp.

Referenced by empty(), and icon().

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

Definition at line 129 of file theme.hpp.

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


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