A multi-line text input area with a descriptive label above it. The label is rendered as a read-only EDIT (grey background, bordered) and the input area below it is a writable EDIT where the user can type. Set |readOnly| to true to make the input area non-editable (useful for displaying results). After the dialog is dismissed, |input| holds the text entered by the user.
| 55 | // displaying results). After the dialog is dismissed, |input| holds the |
| 56 | // text entered by the user. |
| 57 | struct TextArea |
| 58 | { |
| 59 | // Descriptive text shown in a read-only EDIT above the input area. |
| 60 | std::wstring label; |
| 61 | // If true, the input area is non-editable (display-only). |
| 62 | bool readOnly; |
| 63 | // Pre-filled with default text; holds the user-entered text after OK. |
| 64 | std::wstring input; |
| 65 | |
| 66 | TextArea(const std::wstring& label, const std::wstring& input = L"", bool readOnly = false) |
| 67 | : label(label), readOnly(readOnly), input(input) |
| 68 | { |
| 69 | } |
| 70 | }; |
| 71 | |
| 72 | // Ordered collection of dynamic controls. Add new types to this variant. |
| 73 | using DialogControl = std::variant<CheckBoxGroup, TextArea>; |