20 #include "win_container.h"
22 win_container::win_container()
26 set_layout(NO_LAYOUT);
28 set_space_with_border(SPACE_WITH_BORDER);
30 set_space_with_object(SPACE_WITH_OBJECT);
36 win_container::~win_container()
44 for(lwb::iterator i=list_wb_.begin();i!=list_wb_.end();i++)
45 (*i)->update_position();
56 void win_container::update_position()
58 win_base::update_position();
59 for(lwb::iterator i=list_wb_.begin();i!=list_wb_.end();i++)
60 (*i)->update_position();
63 void win_container::add(
win_base * w)
65 list_wb_.push_back(w);
67 w->set_container(
this);
72 void win_container::remove(
win_base * w)
76 w->set_container(NULL);
81 void win_container::remove_all()
83 for(lwb::iterator i=list_wb_.begin();i!=list_wb_.end();i++)
85 (*i)->set_container(NULL);
90 void win_container::destroy()
92 for(lwb::iterator i=list_wb_.begin();i!=list_wb_.end();i++)
101 for(lwb::iterator i=list_wb_.begin();i!=list_wb_.end();i++)
126 void win_container::set_focus_object(
win_base * f)
128 if(focus_object_) focus_object_->
set_focus(
false);
137 for(lwb::iterator i=list_wb_.begin();i!=list_wb_.end();i++)
138 (*i)->set_brightness(b);
145 for(lwb::iterator i=list_wb_.begin();i!=list_wb_.end();i++)
149 void win_container::set_visible_all(
bool b)
152 for(lwb::iterator i=list_wb_.begin();i!=list_wb_.end();i++)
153 (*i)->set_visible(b);
164 win_background::draw(
this);
166 for(lwb::iterator i=list_wb_.begin();i!=list_wb_.end();i++)
169 win_border::draw(wb_father_);
180 void win_container::update_layout()
183 u_int16 indice_h=space_with_border_;
189 for(lwb::iterator i=list_wb_.begin();i!=list_wb_.end();i++)
191 (*i)->move((*i)->x(),indice_h);
193 indice_h+=(*i)->height()+space_with_object_;