14 #include "win_container.h"
16 win_container::win_container()
20 set_layout(NO_LAYOUT);
22 set_space_with_border(SPACE_WITH_BORDER);
24 set_space_with_object(SPACE_WITH_OBJECT);
30 win_container::~win_container()
38 for(lwb::iterator i=list_wb_.begin();i!=list_wb_.end();i++)
39 (*i)->update_position();
50 void win_container::update_position()
52 win_base::update_position();
53 for(lwb::iterator i=list_wb_.begin();i!=list_wb_.end();i++)
54 (*i)->update_position();
57 void win_container::add(
win_base * w)
59 list_wb_.push_back(w);
61 w->set_container(
this);
66 void win_container::remove(
win_base * w)
70 w->set_container(NULL);
75 void win_container::remove_all()
77 for(lwb::iterator i=list_wb_.begin();i!=list_wb_.end();i++)
79 (*i)->set_container(NULL);
84 void win_container::destroy()
86 for(lwb::iterator i=list_wb_.begin();i!=list_wb_.end();i++)
95 for(lwb::iterator i=list_wb_.begin();i!=list_wb_.end();i++)
120 void win_container::set_focus_object(
win_base * f)
122 if(focus_object_) focus_object_->
set_focus(
false);
131 for(lwb::iterator i=list_wb_.begin();i!=list_wb_.end();i++)
132 (*i)->set_brightness(b);
139 for(lwb::iterator i=list_wb_.begin();i!=list_wb_.end();i++)
143 void win_container::set_visible_all(
bool b)
146 for(lwb::iterator i=list_wb_.begin();i!=list_wb_.end();i++)
147 (*i)->set_visible(b);
158 win_background::draw(
this);
160 for(lwb::iterator i=list_wb_.begin();i!=list_wb_.end();i++)
163 win_border::draw(wb_father_);
174 void win_container::update_layout()
177 u_int16 indice_h=space_with_border_;
183 for(lwb::iterator i=list_wb_.begin();i!=list_wb_.end();i++)
185 (*i)->move((*i)->x(),indice_h);
187 indice_h+=(*i)->height()+space_with_object_;
virtual void move(s_int16 tx, s_int16 ty)
Move the win_*.
#define u_int16
16 bits long unsigned integer
void detach_drawing_area()
Detach (if needed) the drawing_area which was attached to this one.
virtual void set_trans(bool b)
Set the transluency parameter.
void set_visible(const bool b)
Set the visible parameter.
void resize(u_int16, u_int16)
Rezise the win_*.
virtual bool input_update()
Input Update process
void move(s_int16, s_int16)
Move the win_*.
virtual void set_brightness(bool b)
Set the transluency parameter.
virtual void set_trans(const bool b)
Set the transluency parameter.
void assign_drawing_area(const drawing_area *da)
Assign a drawing_area to this drawing_area.
virtual bool update()
Update process.
virtual bool input_update()
Input Update process
virtual void resize(u_int16 tl, u_int16 th)
Rezise the win_*.
virtual bool draw()
Draw process.
#define s_int16
16 bits long signed integer
void set_focus(const bool b)
Set the focus parameter.
virtual void set_brightness(const bool b)
Set the transluency parameter.
virtual bool update()
Update process.
Common properties for each win_base's object.
virtual bool draw()
Draw process.