xtd 0.2.0
Loading...
Searching...
No Matches
xtd::forms::input_box Class Referencefinal
Inheritance diagram for xtd::forms::input_box:
xtd::static_object

Definition

Represents a common dialog box that displays input box.

Header
#include <xtd/forms/input_box>
Namespace
xtd::forms
Library
xtd.forms
Appearance
Windows macOS Gnome
Light  
 
 
 
 
 
Dark  
 
 
 
 
 
Examples
The following code example demonstrates the use of input_box dialog.
#include <xtd/forms/application>
#include <xtd/forms/button>
#include <xtd/forms/form>
#include <xtd/forms/input_box>
#include <xtd/forms/label>
using namespace xtd::forms;
namespace input_box_example {
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 += [&] {
auto 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;
};
}
auto main()->int {
application::run(input_box_example::form1 {});
}
static void run()
Begins running a standard application message loop on the current thread, without a form.
Represents a Windows button control.
Definition button.h:47
Represents a window or dialog box that makes up an application's user interface.
Definition form.h:52
Represents a standard Windows label.
Definition label.h:36
@ button1
The first button on the message box is the default button.
@ text
The xtd::forms::status_bar_panel displays text in the standard font.
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition xtd_about_box.h:12

Public Static Methods

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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
static xtd::forms::dialog_result show (xtd::ustring &value)
 Displays an input box. The input box displays a text value.
 
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.
 
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.
 
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.
 
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.
 
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.
 

Member Function Documentation

◆ show() [1/12]

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

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() [2/12]

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

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.

◆ 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 
)
static

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() [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 
)
static

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() [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 
)
static

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() [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 
)
static

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() [7/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 
)
static

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() [8/12]

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

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 
)
static

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 
)
static

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 
)
static

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 
)
static

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: