]> git.tdb.fi Git - libs/gltk.git/blobdiff - source/widget.h
Make sure that at least one line of text is always rendered
[libs/gltk.git] / source / widget.h
index 6774cbec10e66991a438836e38bebd692c8f77ff..2fdc68c34c778e34f4ebf72ba237921eeb2f54fb 100644 (file)
@@ -45,7 +45,6 @@ public:
        sigc::signal<void> signal_request_focus;
        sigc::signal<void> signal_grab_pointer;
        sigc::signal<void> signal_ungrab_pointer;
-       sigc::signal<void> signal_request_raise;
 
 protected:
        const Resources &res;
@@ -54,14 +53,19 @@ protected:
        const Style *style;
        State state;
        bool visible;
+       bool focusable;
        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_focusable(bool);
+       bool is_focusable() const { return focusable; }
+       void set_focus();
 
        void render() const;
 protected:
-       void render_graphic(const Part &) const;
-       void render_text(const Part &, const std::string &) const;
        virtual void render_special(const Part &) const { }
 
 public: