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_ |
Definition at line 34 of file theme.hpp.
SDL_Rect & theme::object::location | ( | const SDL_Rect & | screen | ) | const |
Definition at line 314 of file theme.cpp.
References BOTTOM_ANCHORED, FIXED, last_screen_, loc_, location_modified_, PROPORTIONAL, relative_loc_, TOP_ANCHORED, xanchor_, XDim, yanchor_, and YDim.
Referenced by draw_label(), draw_panel(), map_editor::main_loop(), theme::main_map_location(), theme::mini_map_location(), play_controller::play_slice(), display::refresh_report(), and theme::unit_image_location().
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.
bool theme::object::location_modified_ [private] |
std::string theme::object::id_ [private] |
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] |
SDL_Rect theme::object::last_screen_ [mutable, private] |
ANCHORING theme::object::xanchor_ [private] |
ANCHORING theme::object::yanchor_ [private] |
Generated by doxygen 1.5.5 on 23 May 2008 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |