struct FarDialogItem
{
int Type = DI_TEXT
int X1 = X1
int Y1 = Y
int X2 = X2
int Y2 = Y (not used in Dialog API 1.0, must be equal to Y1)
int Focus = 0
int Selected = 0
DWORD Flags = Flags
int DefaultButton = 0
char Data[512] = text label
};
Attention!
| Flag | Description |
|---|---|
| DIF_SETCOLOR | The low byte of Flags will be used as the item's color. |
| DIF_BOXCOLOR | The text item will be displayed using frame color (COL_DIALOGBOX or COL_WARNDIALOGBOX) |
| DIF_CENTERGROUP | Sequential strings with this flag set and equal vertical coordinates will be horizontally centered in the dialog. Their X1 and X2 coordinates are ignored. |
| DIF_SEPARATOR | Draws a single-line separator. You may write any text on the separator line, just use Data and the coordinate fields. |
| DIF_SEPARATOR2 | Draws a double-line separator. You may write any text on the separator line, just use Data and the coordinate fields. |
| DIF_SHOWAMPERSAND | Show ampersand symbol in caption instead of using it for defining hotkeys. |
| DIF_CENTERTEXT | Centers the text between the X1 and X2 coordinates. |
| Event | Description |
|---|---|
| DN_DRAWDLGITEM | This event is sent to the dialog callback function just before the text item is drawn. |
| DN_CTLCOLORDLGITEM | Plugin should pass the color attributes of the text item when this event comes. Param2 parameter (foreground+background):
LoWord LoByte - color of the text
(COL_WARNDIALOGTEXT or
COL_DIALOGTEXT).
If DIF_BOXCOLOR flag is set:
COL_WARNDIALOGBOX or
COL_DIALOGBOX
LoWord HiByte - color of highlighted text
(COL_WARNDIALOGHIGHLIGHTTEXT or
COL_DIALOGHIGHLIGHTTEXT)
HiWord LoByte - 0 (not used)
HiWord HiByte - 0 (not used)
If a special attribute is used (DIF_SETCOLOR flag), the text (LoWord LoByte) will be drawn according to the parameters. |
| DN_MOUSECLICK | This event comes after the user has clicked one of the dialog items or outside the dialog with the mouse button. |
| DN_HOTKEY | Hotkey was pressed (Alt-<letter>). |