]> git.tdb.fi Git - libs/gltk.git/blobdiff - source/entry.h
Combine common parts of Column and Row into LinearArrangement
[libs/gltk.git] / source / entry.h
index 3ee0b2c2b2c132ef8164f0e66593dabcec07a620..0bba6f0fbe0e26cd74018b81610d4a4a12b27aec 100644 (file)
@@ -22,22 +22,19 @@ Special parts:
 class Entry: virtual public Widget, private Container
 {
 public:
-       class Loader: public Widget::Loader
-       {
-       public:
-               Loader(Entry &);
-       };
-
        sigc::signal<void> signal_enter;
 
 private:
        Text text;
        bool multiline;
+       unsigned edit_width;
+       unsigned edit_height;
        unsigned edit_pos;
        unsigned first_row;
        unsigned visible_rows;
        const Part *text_part;
        VSlider *slider;
+       bool got_key_press;
 
 public:
        Entry(const std::string & = std::string());
@@ -48,6 +45,11 @@ public:
 
        void set_text(const std::string &);
        const std::string &get_text() const { return text.get(); }
+
+       /** Sets the minimum size of the editing area, in characters and rows.  This
+       only affects autosizing. */
+       void set_edit_size(unsigned w, unsigned h);
+
        void set_multiline(bool);
        bool is_multiline() const { return multiline; }
 
@@ -58,6 +60,7 @@ private:
 public:
        virtual void key_press(unsigned, unsigned);
        virtual void character(wchar_t);
+       virtual void focus_out();
 private:
        virtual void on_geometry_change();
        virtual void on_style_change();