# dialog.textinput Shows a dialog that accepts user input as text
Usage
    dialog.textinput [-d=<default text>] [-i=<icon>] [-m] [-b] (<caption>,<info_text>,<button0>[,<button1>[,<button2>[,<magic1>[,<magic2>[...]]]]])
    {
        <callback_command>
    }
Description
Shows a text input dialog box with the specified <caption>, <info_text>, <icon> and buttons. <caption> is a text string that will appear in the caption of the dialog box. <info_text> is a fixed text string that will appear in the dialog box and can contain HTML formatting. <button0> is the text of the first button (on the left). <button1> is the text of the second button (if empty or not given at all, only one button will appear in the dialog). <button2> is the text of the third button (if empty or not given, only two buttons will appear in the dialog). The first button is the default button - it is activated when the user presses the enter key. The third (or the second if only two buttons are present) is treated as the escape button and is activated when the user presses the Esc key or closes the dialog with the window manager close button. If one of the button text strings starts with a "default=" prefix then that button is assumed to be the default button of the dialog. If one of the button text strings starts with a "escape=" prefix then that button is assumed to be the escape button of the dialog. If the -m switch is used, the dialog will be a multi-line text input, otherwise the user will be able to input only a single line of text. If the -d switch is used, the initial text input value is set to <default text>. If the -i switch is used, the dialog displays also the icon <icon> to the left of <info_text>. <icon> is an image identifier (a relative or absolute path to an image file, or a signed number that maps to an internal KVIrc image). If the -b or -modal switch is specified the dialog will have blocking modal behaviour: it will appear above its parent widget and block its input until it's closed. In that case <icon> is an image identifier (can be a relative or absolute path to an image file or a signed number (in that case it defines an internal KVIrc image). <magic1>,<magic2>... are the magic parameters: evaluated at dialog.textinput call time and passed to the <callback_command> as positional parameters. Once the dialog has been shown, the user will click one of the buttons. At this point the dialog is hidden and the <callback_command> is executed passing the text input value in $1, the number of the button clicked as $0, and the magic parameters as positional parameters $2, $3, $4....
Switches
-d=<default_text> | --default=<default_text>
Set the initial text input value to <default_text>
-i=<icon> | --icon=<icon>
Display the specified icon, to the left of the informational text
-m | --multiline
Input multiline text instead of single line
Syntax Specification
    dialog.textinput [-d=<default text>] [-i=<icon>] [-m] [-b] (<caption>,<info_text>,<button0>[,<button1>[,<button2>[,<magic1>[,<magic2>[...]]]]])
    {
        <callback_command>
    }
Examples
    # We need a single line "reason"
    dialog.textinput -d="Working !" (Away,<center>Please enter the <h1>away message</h1></center>,"Ok","Cancel")
    {
        switch($0)
        {
            case(0):
                away $1-
            break;
            default:
                # Cancelled
            break;
        }
    }

Index, Commands

KVIrc 4.2.0.6190 Documentation
Generated by root at Wed Sep 25 16:57:30 2013