diff --git a/include/nana/gui/widgets/textbox.hpp b/include/nana/gui/widgets/textbox.hpp index 12008c37..c74fac54 100644 --- a/include/nana/gui/widgets/textbox.hpp +++ b/include/nana/gui/widgets/textbox.hpp @@ -162,6 +162,9 @@ namespace nana /// Read the text from a specified line. It returns true for success. bool getline(std::size_t pos, std::string&) const; + /// Read the text from a specified line with a set offset. It returns true for success. + bool getline(std::size_t line_index,std::size_t offset,std::string& text) const; + /// Gets the caret position /// Returns true if the caret is in the area of display, false otherwise. bool caret_pos(point& pos, bool text_coordinate) const; @@ -193,6 +196,7 @@ namespace nana /// Returns true if some text is selected. bool selected() const; + bool selected(nana::upoint &a,nana::upoint &b) const; /// Selects/unselects all text. void select(bool); @@ -206,6 +210,8 @@ namespace nana textbox& from(int); textbox& from(double); + void clear_undo(); + void set_highlight(const std::string& name, const ::nana::color& fgcolor, const ::nana::color& bgcolor); void erase_highlight(const std::string& name); void set_keywords(const std::string& name, bool case_sensitive, bool whole_word_match, std::initializer_list kw_list);