add textbox::content_origin

This commit is contained in:
Jinhao
2017-07-25 07:57:48 +08:00
parent d5c01b3dd1
commit 27e1d7aff5
4 changed files with 20 additions and 1 deletions

View File

@@ -86,6 +86,7 @@ namespace nana{ namespace widgets
~text_editor();
size caret_size() const;
const point& content_origin() const;
void set_highlight(const ::std::string& name, const ::nana::color&, const ::nana::color&);
void erase_highlight(const ::std::string& name);

View File

@@ -140,6 +140,8 @@ namespace nana
colored_area_access_interface* colored_area_access();
point content_origin() const;
/// Enables/disables the textbox to indent a line. Idents a new line when it is created by pressing enter.
/// @param generator generates text for identing a line. If it is empty, textbox indents the line according to last line.
textbox& indention(bool, std::function<std::string()> generator = {});