]> git.tdb.fi Git - libs/gltk.git/blobdiff - source/widget.h
Add Text class with multiline support
[libs/gltk.git] / source / widget.h
index 6774cbec10e66991a438836e38bebd692c8f77ff..ce88c97d4e65921b6c044bdea79f79a12dd3c11c 100644 (file)
@@ -55,13 +55,17 @@ protected:
        State state;
        bool visible;
        Container *parent;
+       std::string tooltip;
 
        Widget(const Resources &);
 public:
        virtual ~Widget();
+
        void set_position(int, int);
        void set_size(unsigned, unsigned);
+       virtual void autosize() { }
        void set_geometry(const Geometry &);
+       const Geometry &get_geometry() const { return geom; }
 
        /**
        Sets the widget style.  The final style name is constructed by concatenating
@@ -70,16 +74,17 @@ public:
        void set_style(const std::string &);
        const Style &get_style() const { return *style; }
 
-       void set_visible(bool);
-       void set_focus();
+       void set_tooltip(const std::string &);
+       const std::string &get_tooltip() const { return tooltip; }
 
-       const Geometry &get_geometry() const { return geom; }
+       void set_visible(bool);
        bool is_visible() const { return visible; }
+       void set_focus();
 
        void render() const;
 protected:
-       void render_graphic(const Part &) const;
-       void render_text(const Part &, const std::string &) const;
+       /*void render_graphic(const Part &) const;
+       void render_text(const Part &, const std::string &) const;*/
        virtual void render_special(const Part &) const { }
 
 public: