xtd - Reference Guide  0.2.0
Modern c++17/20 framework to create console, GUI and unit test applications on Windows, macOS, Linux, iOS and android.
Static Public Member Functions | List of all members
xtd::forms::input_box Class Referencefinal

#include <input_box.h>

Definition

Represents a common dialog box that displays input box.

Namespace
xtd::forms
Library
xtd.forms
Examples
The following code example demonstrate the use of input_box dialog.
#include <xtd/xtd>
using namespace xtd;
using namespace xtd::forms;
namespace examples {
class form1 : public form {
public:
form1() {
text("Input box example");
controls().push_back_range({button1, label1});
button1.location({10, 10});
button1.text("Text...");
button1.click += [&] {
ustring value = label1.text();
if (input_box::show(value, *this, "Message text", "Caption text") == dialog_result::ok)
label1.text(value);
};
label1.location({10, 50});
label1.auto_size(true);
label1.text("Default value");
}
private:
label label1;
};
}
int main() {
application::run(examples::form1());
}

Static Public Member Functions

static xtd::forms::dialog_result show (xtd::ustring &value, const xtd::forms::iwin32_window &owner)
 Displays an input box in front of the specified window. The input box displays a text value. More...
 
static xtd::forms::dialog_result show (xtd::ustring &value, const xtd::forms::iwin32_window &owner, const xtd::ustring &text)
 Displays an input box in front of the specified window. The input box displays a input text value with specified invite message text. More...
 
static xtd::forms::dialog_result show (xtd::ustring &value, const xtd::forms::iwin32_window &owner, const xtd::ustring &text, const xtd::ustring &caption)
 Displays an input box in front of the specified window. The input box displays a input text value with specified invite message text and caption title. More...
 
static xtd::forms::dialog_result show (xtd::ustring &value, const xtd::forms::iwin32_window &owner, const xtd::ustring &text, const xtd::ustring &caption, xtd::forms::input_box_style style)
 Displays an input box in front of the specified window. The input box displays a input text value with specified invite message text, caption title and input box style. More...
 
static xtd::forms::dialog_result show (xtd::ustring &value, const xtd::forms::iwin32_window &owner, const xtd::ustring &text, const xtd::ustring &caption, xtd::forms::input_box_style style, xtd::forms::character_casing casing)
 Displays an input box in front of the specified window. The input box displays a input text value with specified invite message text, caption title, input box style and character casing. More...
 
static xtd::forms::dialog_result show (xtd::ustring &value, const xtd::forms::iwin32_window &owner, const xtd::ustring &text, const xtd::ustring &caption, xtd::forms::input_box_style style, xtd::forms::character_casing casing, bool word_wrap)
 Displays an input box in front of the specified window. The input box displays a input text value with specified invite message text, caption title, input box style, character casing and word_wrap. More...
 
static xtd::forms::dialog_result show (xtd::ustring &value)
 Displays an input box. The input box displays a text value. More...
 
static xtd::forms::dialog_result show (xtd::ustring &value, const xtd::ustring &text)
 Displays an input box. The input box displays a input text value with specified invite message text. More...
 
static xtd::forms::dialog_result show (xtd::ustring &value, const xtd::ustring &text, const xtd::ustring &caption)
 Displays an input box. The input box displays a input text value with specified invite message text and caption title. More...
 
static xtd::forms::dialog_result show (xtd::ustring &value, const xtd::ustring &text, const xtd::ustring &caption, xtd::forms::input_box_style style)
 Displays an input box. The input box displays a input text value with specified invite message text, caption title and input box style. More...
 
static xtd::forms::dialog_result show (xtd::ustring &value, const xtd::ustring &text, const xtd::ustring &caption, xtd::forms::input_box_style style, xtd::forms::character_casing casing)
 Displays an input box. The input box displays a input text value with specified invite message text, caption title, input box style and character casing. More...
 
static xtd::forms::dialog_result show (xtd::ustring &value, const xtd::ustring &text, const xtd::ustring &caption, xtd::forms::input_box_style style, xtd::forms::character_casing casing, bool word_wrap)
 Displays an input box. The input box displays a input text value with specified invite message text, caption title, input box style, character casing and word_wrap. More...
 

Member Function Documentation

◆ show() [1/12]

static xtd::forms::dialog_result xtd::forms::input_box::show ( xtd::ustring value,
const xtd::forms::iwin32_window owner 
)
inlinestatic

Displays an input box in front of the specified window. The input box displays a text value.

Parameters
valueA xtd::ustring that specifies the text to display.
ownerA iwin32_window that represents the owner window of the color box.
Returns
ok if the user clicks OK in the dialog box; otherwise, cancel.
Remarks
If dialog_result is ok, the value parameter contains the new chosen value.
Examples:
input_box.cpp.

◆ show() [2/12]

static xtd::forms::dialog_result xtd::forms::input_box::show ( xtd::ustring value,
const xtd::forms::iwin32_window owner,
const xtd::ustring text 
)
inlinestatic

Displays an input box in front of the specified window. The input box displays a input text value with specified invite message text.

Parameters
valueA xtd::ustring that specifies the text to display.
ownerA iwin32_window that represents the owner window of the color box.
textA xtd::ustring that specifies the invite message text to display.
Returns
ok if the user clicks OK in the dialog box; otherwise, cancel.
Remarks
If dialog_result is ok, the value parameter contains the new chosen value.

◆ show() [3/12]

static xtd::forms::dialog_result xtd::forms::input_box::show ( xtd::ustring value,
const xtd::forms::iwin32_window owner,
const xtd::ustring text,
const xtd::ustring caption 
)
inlinestatic

Displays an input box in front of the specified window. The input box displays a input text value with specified invite message text and caption title.

Parameters
valueA xtd::ustring that specifies the text to display.
ownerA iwin32_window that represents the owner window of the color box.
textA xtd::ustring that specifies the invite message text to display.
captionA xtd::ustring that specifies the caption title of dialog.
Returns
ok if the user clicks OK in the dialog box; otherwise, cancel.
Remarks
If dialog_result is ok, the value parameter contains the new chosen value.

◆ show() [4/12]

static xtd::forms::dialog_result xtd::forms::input_box::show ( xtd::ustring value,
const xtd::forms::iwin32_window owner,
const xtd::ustring text,
const xtd::ustring caption,
xtd::forms::input_box_style  style 
)
inlinestatic

Displays an input box in front of the specified window. The input box displays a input text value with specified invite message text, caption title and input box style.

Parameters
valueA xtd::ustring that specifies the text to display.
ownerA iwin32_window that represents the owner window of the color box.
textA xtd::ustring that specifies the invite message text to display.
captionA xtd::ustring that specifies the caption title of dialog.
styleOn of xtd::forms::input_box_style values.
Returns
ok if the user clicks OK in the dialog box; otherwise, cancel.
Remarks
If dialog_result is ok, the value parameter contains the new chosen value.

◆ show() [5/12]

static xtd::forms::dialog_result xtd::forms::input_box::show ( xtd::ustring value,
const xtd::forms::iwin32_window owner,
const xtd::ustring text,
const xtd::ustring caption,
xtd::forms::input_box_style  style,
xtd::forms::character_casing  casing 
)
inlinestatic

Displays an input box in front of the specified window. The input box displays a input text value with specified invite message text, caption title, input box style and character casing.

Parameters
valueA xtd::ustring that specifies the text to display.
ownerA iwin32_window that represents the owner window of the color box.
textA xtd::ustring that specifies the invite message text to display.
captionA xtd::ustring that specifies the caption title of dialog.
styleOn of xtd::forms::input_box_style values. The default is xtd::forms::input_box_style::normal
casingOn of xtd::forms::character_casing values. The default is xtd::forms::character_casing::normal
Returns
ok if the user clicks OK in the dialog box; otherwise, cancel.
Remarks
If dialog_result is ok, the value parameter contains the new chosen value.

◆ show() [6/12]

static xtd::forms::dialog_result xtd::forms::input_box::show ( xtd::ustring value,
const xtd::forms::iwin32_window owner,
const xtd::ustring text,
const xtd::ustring caption,
xtd::forms::input_box_style  style,
xtd::forms::character_casing  casing,
bool  word_wrap 
)
inlinestatic

Displays an input box in front of the specified window. The input box displays a input text value with specified invite message text, caption title, input box style, character casing and word_wrap.

Parameters
valueA xtd::ustring that specifies the text to display.
ownerA iwin32_window that represents the owner window of the color box.
textA xtd::ustring that specifies the invite message text to display.
captionA xtd::ustring that specifies the caption title of dialog.
styleOn of xtd::forms::input_box_style values. The default is xtd::forms::input_box_style::normal
casingOn of xtd::forms::character_casing values. The default is xtd::forms::character_casing::normal
Returns
ok if the user clicks OK in the dialog box; otherwise, cancel.
Parameters
word_wraptrue if word_wrap; otherwise false. The default is true.
Remarks
If dialog_result is ok, the value parameter contains the new chosen value.

◆ show() [7/12]

static xtd::forms::dialog_result xtd::forms::input_box::show ( xtd::ustring value)
inlinestatic

Displays an input box. The input box displays a text value.

Parameters
valueA xtd::ustring that specifies the text to display.
ownerA iwin32_window that represents the owner window of the color box.
Returns
ok if the user clicks OK in the dialog box; otherwise, cancel.
Remarks
If dialog_result is ok, the value parameter contains the new chosen value.

◆ show() [8/12]

static xtd::forms::dialog_result xtd::forms::input_box::show ( xtd::ustring value,
const xtd::ustring text 
)
inlinestatic

Displays an input box. The input box displays a input text value with specified invite message text.

Parameters
valueA xtd::ustring that specifies the text to display.
ownerA iwin32_window that represents the owner window of the color box.
textA xtd::ustring that specifies the invite message text to display.
Returns
ok if the user clicks OK in the dialog box; otherwise, cancel.
Remarks
If dialog_result is ok, the value parameter contains the new chosen value.

◆ show() [9/12]

static xtd::forms::dialog_result xtd::forms::input_box::show ( xtd::ustring value,
const xtd::ustring text,
const xtd::ustring caption 
)
inlinestatic

Displays an input box. The input box displays a input text value with specified invite message text and caption title.

Parameters
valueA xtd::ustring that specifies the text to display.
ownerA iwin32_window that represents the owner window of the color box.
textA xtd::ustring that specifies the invite message text to display.
captionA xtd::ustring that specifies the caption title of dialog.
Returns
ok if the user clicks OK in the dialog box; otherwise, cancel.
Remarks
If dialog_result is ok, the value parameter contains the new chosen value.

◆ show() [10/12]

static xtd::forms::dialog_result xtd::forms::input_box::show ( xtd::ustring value,
const xtd::ustring text,
const xtd::ustring caption,
xtd::forms::input_box_style  style 
)
inlinestatic

Displays an input box. The input box displays a input text value with specified invite message text, caption title and input box style.

Parameters
valueA xtd::ustring that specifies the text to display.
ownerA iwin32_window that represents the owner window of the color box.
textA xtd::ustring that specifies the invite message text to display.
captionA xtd::ustring that specifies the caption title of dialog.
styleOn of xtd::forms::input_box_style values.
Returns
ok if the user clicks OK in the dialog box; otherwise, cancel.
Remarks
If dialog_result is ok, the value parameter contains the new chosen value.

◆ show() [11/12]

static xtd::forms::dialog_result xtd::forms::input_box::show ( xtd::ustring value,
const xtd::ustring text,
const xtd::ustring caption,
xtd::forms::input_box_style  style,
xtd::forms::character_casing  casing 
)
inlinestatic

Displays an input box. The input box displays a input text value with specified invite message text, caption title, input box style and character casing.

Parameters
valueA xtd::ustring that specifies the text to display.
ownerA iwin32_window that represents the owner window of the color box.
textA xtd::ustring that specifies the invite message text to display.
captionA xtd::ustring that specifies the caption title of dialog.
styleOn of xtd::forms::input_box_style values. The default is xtd::forms::input_box_style::normal
casingOn of xtd::forms::character_casing values. The default is xtd::forms::character_casing::normal
Returns
ok if the user clicks OK in the dialog box; otherwise, cancel.
Remarks
If dialog_result is ok, the value parameter contains the new chosen value.

◆ show() [12/12]

static xtd::forms::dialog_result xtd::forms::input_box::show ( xtd::ustring value,
const xtd::ustring text,
const xtd::ustring caption,
xtd::forms::input_box_style  style,
xtd::forms::character_casing  casing,
bool  word_wrap 
)
inlinestatic

Displays an input box. The input box displays a input text value with specified invite message text, caption title, input box style, character casing and word_wrap.

Parameters
valueA xtd::ustring that specifies the text to display.
ownerA iwin32_window that represents the owner window of the color box.
textA xtd::ustring that specifies the invite message text to display.
captionA xtd::ustring that specifies the caption title of dialog.
styleOn of xtd::forms::input_box_style values. The default is xtd::forms::input_box_style::normal
casingOn of xtd::forms::character_casing values. The default is xtd::forms::character_casing::normal
word_wraptrue if word_wrap; otherwise false. The default is true.
Returns
ok if the user clicks OK in the dialog box; otherwise, cancel.
Remarks
If dialog_result is ok, the value parameter contains the new chosen value.

The documentation for this class was generated from the following file: