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_;
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.