struct FarDialogItem
{
int Type = DI_VTEXT
int X1 = X
int Y1 = Y1
int X2 = X (not used in Dialog API 1.0, must be equal to X1)
int Y2 = Y2
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 box colors (COL_DIALOGBOX or COL_WARNDIALOGBOX) |
| DIF_CENTERGROUP | Centers two vertical text labels with equal horizontal position (Y1 is ignored) |
| DIF_SEPARATOR |
Draws a single-line vertical separator; Y1 is ignored if Data is empty; if Data is not empty, it will also be drawn with Y1 as its starting position. |
| DIF_SEPARATOR2 |
Draws a double-line vertical separator Y1 is ignored if Data is empty; if Data is not empty, it will also be drawn with Y1 as its starting position. |
| DIF_SHOWAMPERSAND | Show ampersand symbol in caption instead of using it for defining hotkeys. |
| DIF_CENTERTEXT | Centers the text between the Y1 and Y2 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. |