The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Types | Public Member Functions | Static Private Member Functions | Private Attributes | List of all members
theme::object Class Reference
Inheritance diagram for theme::object:
Inheritance graph

Public Types

enum  ANCHORING { FIXED, TOP_ANCHORED, PROPORTIONAL, BOTTOM_ANCHORED }
 

Public Member Functions

 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)
 

Static Private Member Functions

static ANCHORING read_anchor (const std::string &str)
 

Private Attributes

bool location_modified_
 
std::string id_
 
SDL_Rect loc_
 
SDL_Rect relative_loc_
 
SDL_Rect last_screen_
 
ANCHORING xanchor_
 
ANCHORING yanchor_
 

Detailed Description

Definition at line 40 of file theme.hpp.

Member Enumeration Documentation

Enumerator
FIXED 
TOP_ANCHORED 
PROPORTIONAL 
BOTTOM_ANCHORED 

Definition at line 64 of file theme.hpp.

Constructor & Destructor Documentation

theme::object::object ( )

Definition at line 278 of file theme.cpp.

theme::object::object ( const config cfg)

Definition at line 289 of file theme.cpp.

virtual theme::object::~object ( )
inlinevirtual

Definition at line 45 of file theme.hpp.

Member Function Documentation

const std::string& theme::object::get_id ( ) const
inline

Definition at line 49 of file theme.hpp.

References id_.

Referenced by draw_panel(), theme::modify(), and theme::set_object_location().

const SDL_Rect& theme::object::get_location ( ) const
inline

Definition at line 48 of file theme.hpp.

References loc_.

Referenced by theme::set_object_location().

SDL_Rect & theme::object::location ( const SDL_Rect &  screen) const
void theme::object::modify_location ( const _rect rect)

Definition at line 414 of file theme.cpp.

References loc_, map_location::x, _rect::x1, _rect::x2, map_location::y, _rect::y1, and _rect::y2.

Referenced by theme::set_object_location().

void theme::object::modify_location ( std::string  rect_str,
SDL_Rect  rect_ref 
)

Definition at line 422 of file theme.cpp.

References compute(), mp_ui_alerts::items, utils::split(), _rect::x1, _rect::x2, _rect::y1, and _rect::y2.

theme::object::ANCHORING theme::object::read_anchor ( const std::string str)
staticprivate

Definition at line 399 of file theme.cpp.

Member Data Documentation

std::string theme::object::id_
private

Definition at line 68 of file theme.hpp.

Referenced by get_id().

SDL_Rect theme::object::last_screen_
mutableprivate

Definition at line 71 of file theme.hpp.

SDL_Rect theme::object::loc_
private

Definition at line 69 of file theme.hpp.

Referenced by get_location().

bool theme::object::location_modified_
private

Definition at line 67 of file theme.hpp.

SDL_Rect theme::object::relative_loc_
mutableprivate

Definition at line 70 of file theme.hpp.

ANCHORING theme::object::xanchor_
private

Definition at line 73 of file theme.hpp.

ANCHORING theme::object::yanchor_
private

Definition at line 73 of file theme.hpp.


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