X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fentry.h;h=0bba6f0fbe0e26cd74018b81610d4a4a12b27aec;hb=768c65e13861f72929290ac2513df9975579e543;hp=3ee0b2c2b2c132ef8164f0e66593dabcec07a620;hpb=fdc7fecc65f5f517d66abe3546a949a46836c4a6;p=libs%2Fgltk.git diff --git a/source/entry.h b/source/entry.h index 3ee0b2c..0bba6f0 100644 --- a/source/entry.h +++ b/source/entry.h @@ -22,22 +22,19 @@ Special parts: class Entry: virtual public Widget, private Container { public: - class Loader: public Widget::Loader - { - public: - Loader(Entry &); - }; - sigc::signal 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();