Инструменты пользователя

Инструменты сайта


en:documentation:movebutton_adddialog

AddDialog

The command adds the dialog to the list of dialogs being processed.

AddDialog [/NOSCALE] [/X:<value>] [/Y:<value>] [/W:<value>] [/H:<value>] [/SAVE:<value>] [/CENTER:<value>] [/WAIT:<value>] <name/class> [<text>]

Dialog search parameters

<name/class>The name of the dialog or the name of the dialog class. If this name is not one of the predefined names (see below), then it is interpreted as the name of the dialog class.

Dialog modify parameters

The parameters /X, /Y, /W, /H set the offset relative to the original coordinates of the window or change its size. If the parameter is omitted, then its value is considered to be = 0 (i.e., the window does not move along this coordinate or does not change the corresponding size).

Parameter values are set for a standard density of 96 dpi. At higher density values, the dialog will scale automatically. This behavior can be changed with the / NOSCALE option.

/X:<value>The offset of the dialogue on the X relative to the initial position of the dialogue. A positive value shifts the dialog to the right, a negative one to the left.
/Y:<value>The offset of the dialogue on Y relative to the initial position of the dialogue. A positive value shifts the dialogue down, a negative one — up.
/W:<value>Changing the width of the dialogue relative to the original. A positive value increases the width, a negative value decreases.
/H:<value>Change the height of the dialogue relative to the original. A positive value increases the height, a negative value decreases.
<text>New dialog title text.
/NOSCALEDisables the automatic scaling of the offset/size changes for this dialog and all its controls. Allows you to accurately specify the desired values for the desired pixel density. When using this parameter, you need to make sets of controls for each pixel density used and select the desired set in Autorun.
/SAVE:<value>Includes saving and loading of position and/or size for this dialog. The value is the sum of the flags:
1 — save x
2 — save y
4 — save width
8 — save height

The positions are saved in a file with the name of the plugin and the extension «pos», by default it is Autorun_ModifyDialogs.pos

Note that the operation of the save function depends on the class of the dialog and the conditions set for it, so if you change any of these parameters, the saved values will be reset to their default values. Also, those dialogues that have different conditions for different versions will be saved independently for the 32-bit and 64-bit versions.

:!: Not all Total Commander windows allow you to resize, in some dialogs the restriction on resizing is included (for example, the height cannot be changed in the «File Search» dialog).

Saving supports fine tuning by editing the keys in the pos-file, see below for details.
/CENTER:<value>Enables centering the dialog. The value is the sum of the flags:
1 — center on x
2 — center on y
4 — center on the parent window

By default, windows are centered on the main window of Total Commander. Flag 4 allows centering relative to the parent window. If the parent window to the dialog is the main window, then using flag 4 does not matter.

Note that the window is centered after resizing with the /W, /H parameters or restoring them with /SAVE with 4, 8 or 12.
/WAIT:<value>Waiting before performing operations on the dialogue. The value is set in milliseconds.

The size and position of some dialogs cannot be changed while the plugin is running (or they are changed by Total Commander later). To circumvent such situations, it is possible to enable a delay. At the same time, operations on the dialog (changing position and size, restoring dimensions, centering) will be done after Total Commander processes them.

Please note that when using this parameter, the operations for the dialog will be performed after it will become visible, so you will see it's movement. This effect can be minimized by properly setting the delay.

The delay number must be greater than 0. If it is 0, no waiting will be given.

Dialogs predefined names

Due to the fact that in Total Commander can use one class for different dialogues, that are difficult to distinguish, or additional processing is required (for example, controls that appear after pressing the «Options» button in the copy dialog), some dialogs have been assigned special names. Currently, special processing requires only one dialogue, for which the names are provided:

DIALOG_COPYMOVEStandard copy/move dialog.
DIALOG_COPYMOVE_POSTSets the controls that appear after pressing the «Options» button in the copy/move dialog.
DIALOG_COPYMOVE_PINNEDSets the controls for the open window (with the «pin» button pressed) in the copy/move dialog.

Save fine tuning

When you enable saving dialog positions, a file with the pos extension will be created. By structure, this is a regular ini-file, and the following keys will be created in the «Common» section, by changing the values of which you can change some aspects of the storage function:

ScreenResDependent=1By default, storing positions/sizes depends on the screen resolution. Set to 0 so that the save does not depend on the resolution.
RestoreFromLastRes=1When you first open a dialog on a new resolution, the positions/dimensions of the dialog will be taken from the last resolution used. Set to 0 to allow Total Commander to set the position/size of the dialog for the new resolution. It works only if ScreenResDependent is 1.
NoRestartToCreate=1By default, when the resolution is changed, the section for the new resolution is created immediately upon the next opening of the dialog. When this key is set to 0, new sections will be created only when Total Commander next starts up. It can be useful in environments with frequent resolution changes, such as virtual machines. It works only if ScreenResDependent is 1.
en/documentation/movebutton_adddialog.txt · Последние изменения: 2019/06/20 16:38 (внешнее изменение)

Инструменты страницы