]> git.tdb.fi Git - libs/gltk.git/blobdiff - source/panel.cpp
Add an input method subsystem
[libs/gltk.git] / source / panel.cpp
index 836d991eb73e3b226d859b5c2c4a2da7acf5037a..44c41eac98fd6e62d0d69e2ace47c5a52e6910af 100644 (file)
@@ -8,6 +8,7 @@
 #include "entry.h"
 #include "grid.h"
 #include "hslider.h"
+#include "image.h"
 #include "indicator.h"
 #include "label.h"
 #include "list.h"
@@ -25,7 +26,9 @@ namespace GLtk {
 
 Panel::Panel():
        layout(0)
-{ }
+{
+       input_type = INPUT_TEXT;
+}
 
 Panel::~Panel()
 {
@@ -40,7 +43,7 @@ void Panel::set_layout(Layout *l)
        layout = l;
 }
 
-void Panel::autosize_special(const Part &part, Geometry &ageom)
+void Panel::autosize_special(const Part &part, Geometry &ageom) const
 {
        if(part.get_name()=="children" && layout)
                layout->autosize(ageom);
@@ -97,6 +100,7 @@ Panel::Loader::Loader(Panel &p, map<string, Widget *> &m):
        add("gravity",   &Loader::gravity);
        add("grid",      &Loader::grid);
        add("hslider",   &Loader::child<HSlider>);
+       add("image",     &Loader::child<Image>);
        add("indicator", &Loader::child<Indicator>);
        add("label",     &Loader::child<Label>);
        add("layout",    &Loader::layout);