#include <canvas.hpp>
Public Types | |
typedef boost::intrusive_ptr < tshape > | tshape_ptr |
typedef boost::intrusive_ptr < const tshape > | const_tshape_ptr |
Public Member Functions | |
tcanvas () | |
tcanvas (const config &cfg) | |
void | draw (const config &cfg) |
void | draw (const bool force=false) |
void | set_width (const unsigned width) |
unsigned | get_width () const |
void | set_height (const unsigned height) |
unsigned | get_height () const |
surface & | surf () |
void | set_cfg (const config &cfg) |
void | set_variable (const std::string &key, const variant &value) |
Private Member Functions | |
void | set_dirty (const bool dirty=true) |
void | parse_cfg (const config &cfg) |
Private Attributes | |
std::vector< tshape_ptr > | shapes_ |
unsigned | w_ |
unsigned | h_ |
surface | canvas_ |
The canvas we draw all items on. | |
game_logic::map_formula_callable | variables_ |
bool | dirty_ |
Classes | |
class | tshape |
Base class for all other shapes. More... |
But that will be looked into later. The copy constructor does a shallow copy of the shapes to draw. a clone() will be implemented if really needed.
Definition at line 44 of file canvas.hpp.
typedef boost::intrusive_ptr<tshape> gui2::tcanvas::tshape_ptr |
Definition at line 67 of file canvas.hpp.
typedef boost::intrusive_ptr<const tshape> gui2::tcanvas::const_tshape_ptr |
Definition at line 68 of file canvas.hpp.
gui2::tcanvas::tcanvas | ( | ) |
Definition at line 678 of file canvas.cpp.
gui2::tcanvas::tcanvas | ( | const config & | cfg | ) |
void gui2::tcanvas::draw | ( | const config & | cfg | ) |
void gui2::tcanvas::draw | ( | const bool | force = false |
) |
Definition at line 705 of file canvas.cpp.
References game_logic::map_formula_callable::add(), surface::assign(), canvas_, DBG_G_D, dirty_, lg::gui_draw, h_, log_scope2, shapes_, variables_, and w_.
void gui2::tcanvas::set_width | ( | const unsigned | width | ) | [inline] |
Definition at line 76 of file canvas.hpp.
References set_dirty(), and w_.
Referenced by gui2::tcontrol::set_size().
unsigned gui2::tcanvas::get_width | ( | ) | const [inline] |
void gui2::tcanvas::set_height | ( | const unsigned | height | ) | [inline] |
Definition at line 79 of file canvas.hpp.
References h_, and set_dirty().
Referenced by gui2::tcontrol::set_size().
unsigned gui2::tcanvas::get_height | ( | ) | const [inline] |
surface& gui2::tcanvas::surf | ( | ) | [inline] |
void gui2::tcanvas::set_cfg | ( | const config & | cfg | ) | [inline] |
Definition at line 84 of file canvas.hpp.
References parse_cfg().
Referenced by gui2::tstate_definition::tstate_definition().
void gui2::tcanvas::set_variable | ( | const std::string & | key, | |
const variant & | value | |||
) | [inline] |
Definition at line 86 of file canvas.hpp.
References game_logic::map_formula_callable::add(), and variables_.
Referenced by gui2::tscrollbar_::load_config_extra(), gui2::ttext_box::set_canvas_text(), gui2::tcontrol::set_canvas_text(), gui2::tscrollbar_::update_canvas(), and gui2::ttext_box::update_offsets().
void gui2::tcanvas::set_dirty | ( | const bool | dirty = true |
) | [inline, private] |
Definition at line 90 of file canvas.hpp.
References dirty_.
Referenced by set_height(), and set_width().
void gui2::tcanvas::parse_cfg | ( | const config & | cfg | ) | [private] |
Definition at line 733 of file canvas.cpp.
References data, DBG_G_P, ERR_G_P, lg::gui_parse, log_scope2, config::ordered_begin(), config::ordered_end(), shapes_, and type.
std::vector<tshape_ptr> gui2::tcanvas::shapes_ [private] |
unsigned gui2::tcanvas::w_ [private] |
unsigned gui2::tcanvas::h_ [private] |
surface gui2::tcanvas::canvas_ [private] |
bool gui2::tcanvas::dirty_ [private] |
Generated by doxygen 1.5.5 on 23 May 2008 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |