X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fpanel.cpp;h=836d991eb73e3b226d859b5c2c4a2da7acf5037a;hb=31e9ee682f8a9cd77c97ed9dc142283559ddaacc;hp=c7b1574979d7883d8f03c44816dc6152eb1daf4a;hpb=1b29f1987b8891852a606afbb03e5e08b16c8c3e;p=libs%2Fgltk.git diff --git a/source/panel.cpp b/source/panel.cpp index c7b1574..836d991 100644 --- a/source/panel.cpp +++ b/source/panel.cpp @@ -1,16 +1,20 @@ #include +#include #include #include "button.h" +#include "column.h" +#include "draghandle.h" #include "dropdown.h" #include "entry.h" +#include "grid.h" #include "hslider.h" #include "indicator.h" #include "label.h" -#include "layout.h" #include "list.h" #include "panel.h" #include "part.h" -#include "table.h" +#include "row.h" +#include "stack.h" #include "toggle.h" #include "vslider.h" @@ -36,10 +40,10 @@ void Panel::set_layout(Layout *l) layout = l; } -void Panel::autosize() +void Panel::autosize_special(const Part &part, Geometry &ageom) { - if(layout) - layout->autosize(); + if(part.get_name()=="children" && layout) + layout->autosize(ageom); } void Panel::render_special(const Part &part, GL::Renderer &renderer) const @@ -78,38 +82,115 @@ void Panel::on_child_removed(Widget &wdg) Panel::Loader::Loader(Panel &p, map &m): - Widget::Loader(p), - pnl(p), - wdg_map(m) + DataFile::DerivedObjectLoader(p), + wdg_map(m), + last_widget(0) { add("button", &Loader::child