theme::object Class Reference

Inheritance diagram for theme::object:

Inheritance graph
[legend]

List of all members.

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 (void) const
const std::string & get_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 34 of file theme.hpp.


Member Enumeration Documentation

Enumerator:
FIXED 
TOP_ANCHORED 
PROPORTIONAL 
BOTTOM_ANCHORED 

Definition at line 58 of file theme.hpp.


Constructor & Destructor Documentation

theme::object::object (  ) 

Definition at line 270 of file theme.cpp.

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

Definition at line 275 of file theme.cpp.

virtual theme::object::~object (  )  [inline, virtual]

Definition at line 39 of file theme.hpp.


Member Function Documentation

SDL_Rect & theme::object::location ( const SDL_Rect &  screen  )  const

const SDL_Rect& theme::object::get_location ( void   )  const [inline]

Definition at line 42 of file theme.hpp.

References loc_.

Referenced by theme::set_object_location().

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

Definition at line 43 of file theme.hpp.

References id_.

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

void theme::object::modify_location ( const _rect  rect  ) 

Definition at line 386 of file theme.cpp.

References loc_, location_modified_, _rect::x1, _rect::x2, _rect::y1, and _rect::y2.

Referenced by modify_location(), and theme::set_object_location().

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

Definition at line 394 of file theme.cpp.

References compute(), modify_location(), rect, utils::split(), _rect::x1, _rect::x2, _rect::y1, and _rect::y2.

theme::object::ANCHORING theme::object::read_anchor ( const std::string &  str  )  [static, private]

Definition at line 371 of file theme.cpp.

References BOTTOM_ANCHORED, FIXED, PROPORTIONAL, and TOP_ANCHORED.


Member Data Documentation

Definition at line 61 of file theme.hpp.

Referenced by location(), and modify_location().

std::string theme::object::id_ [private]

Definition at line 62 of file theme.hpp.

Referenced by get_id().

SDL_Rect theme::object::loc_ [private]

Definition at line 63 of file theme.hpp.

Referenced by get_location(), location(), and modify_location().

SDL_Rect theme::object::relative_loc_ [mutable, private]

Definition at line 64 of file theme.hpp.

Referenced by location().

SDL_Rect theme::object::last_screen_ [mutable, private]

Definition at line 65 of file theme.hpp.

Referenced by location().

Definition at line 67 of file theme.hpp.

Referenced by location().

Definition at line 67 of file theme.hpp.

Referenced by location().


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

Generated by doxygen 1.5.5 on 23 May 2008 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs