add 'sub-consumer' to textbox
This commit is contained in:
@@ -17,6 +17,7 @@ namespace gui {
|
||||
std::wstring placeholder;
|
||||
wstringsupplier supplier = nullptr;
|
||||
wstringconsumer consumer = nullptr;
|
||||
wstringconsumer subconsumer = nullptr;
|
||||
wstringchecker validator = nullptr;
|
||||
runnable onEditStart = nullptr;
|
||||
runnable onUpPressed;
|
||||
@@ -65,6 +66,8 @@ namespace gui {
|
||||
void performEditingKeyboardEvents(keycode key);
|
||||
|
||||
void refreshLabel();
|
||||
|
||||
void onInput();
|
||||
public:
|
||||
TextBox(
|
||||
std::wstring placeholder,
|
||||
@@ -79,6 +82,10 @@ namespace gui {
|
||||
/// @param consumer std::wstring consumer function
|
||||
virtual void setTextConsumer(wstringconsumer consumer);
|
||||
|
||||
/// @brief Sub-consumer called while editing text
|
||||
/// @param consumer std::wstring consumer function
|
||||
virtual void setTextSubConsumer(wstringconsumer consumer);
|
||||
|
||||
/// @brief Text validator called while text editing and returns true if
|
||||
/// text is valid
|
||||
/// @param validator std::wstring consumer returning boolean
|
||||
|
||||
Reference in New Issue
Block a user