Merge branch 'ad_textbox_text_function' of https://github.com/wpp2014/nana into wpp2014-ad_textbox_text_function

This commit is contained in:
Jinhao 2019-05-24 08:52:01 +08:00
commit 913801244d

View File

@ -1,4 +1,4 @@
/**
/**
* A Textbox Implementation
* Nana C++ Library(http://www.nanapro.org)
* Copyright(C) 2003-2019 Jinhao(cnjinhao@hotmail.com)
@ -177,6 +177,10 @@ namespace nana
/// 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;
// Get all text from textbox.
// It returns a empty string if failed or the textbox is empty.
std::string text() const { return caption(); }
/// Read the text from a specified line; returns an empty optional on failure
std::optional<std::string> getline(std::size_t pos) const;