1 | ; File name : Dialog.inc |
---|
2 | ; Project name : Assembly Library |
---|
3 | ; Created date : 15.9.2010 |
---|
4 | ; Last update : 22.10.2010 |
---|
5 | ; Author : Tomi Tilli |
---|
6 | ; Description : Defines for Menu library dialogs. |
---|
7 | %ifndef DIALOG_INC |
---|
8 | %define DIALOG_INC |
---|
9 | |
---|
10 | ; Struct and defines for all dialogs |
---|
11 | struc DIALOG |
---|
12 | .menu resb MENU_size |
---|
13 | .fpDialogIO resb 4 ; Ptr to DIALOG_INPUT + dialog specific data |
---|
14 | .pParentMenu resb 2 |
---|
15 | endstruc |
---|
16 | |
---|
17 | DIALOG_DELTA_WIDTH_FROM_PARENT EQU 5 |
---|
18 | DIALOG_MAX_WIDTH EQU 60 |
---|
19 | DIALOG_MAX_HEIGHT EQU 25 |
---|
20 | |
---|
21 | |
---|
22 | ; Dialog parameter and return value structs |
---|
23 | struc DIALOG_INPUT |
---|
24 | .fszTitle resb 4 |
---|
25 | .fszItems resb 4 |
---|
26 | .fszInfo resb 4 |
---|
27 | endstruc |
---|
28 | |
---|
29 | struc WORD_DIALOG_IO |
---|
30 | .dialogInput resb DIALOG_INPUT_size |
---|
31 | .bUserCancellation resb 1 |
---|
32 | .bNumericBase resb 1 |
---|
33 | .wMin resb 2 |
---|
34 | .wMax resb 2 |
---|
35 | .wReturnWord resb 2 |
---|
36 | endstruc |
---|
37 | |
---|
38 | struc STRING_DIALOG_IO |
---|
39 | .dialogInput resb DIALOG_INPUT_size |
---|
40 | .bUserCancellation resb 1 |
---|
41 | resb 1 |
---|
42 | .fnCharFilter resb 2 ; Optional, can be NULL to accept all |
---|
43 | .wBufferSize: |
---|
44 | .wReturnLength resb 2 ; String length without NULL |
---|
45 | .fpReturnBuffer resb 4 |
---|
46 | endstruc |
---|
47 | |
---|
48 | |
---|
49 | ; Progress bar dialog |
---|
50 | PROGRESS_COMPLETE_CHARACTER EQU BLOCK_FULL_FOREGROUND |
---|
51 | PROGRESS_INCOMPLETE_CHARACTER EQU BLOCK_MOSTLY_BACKGROUND |
---|
52 | |
---|
53 | struc PROGRESS_DIALOG_IO |
---|
54 | .dialogInput resb DIALOG_INPUT_size |
---|
55 | resb 2 |
---|
56 | .wCurrentProgressValue resb 2 |
---|
57 | .wMaxProgressValue resb 2 |
---|
58 | .wMinProgressValue resb 2 |
---|
59 | .fnTaskWithParamInDSSI resb 2 |
---|
60 | |
---|
61 | ; Progress Dialog internal values |
---|
62 | .wProgressPerCharacter resb 2 |
---|
63 | .wStartTimeTicks resb 2 |
---|
64 | endstruc |
---|
65 | |
---|
66 | struc DRIVE_DIALOG_IO |
---|
67 | .dialogInput resb DIALOG_INPUT_size |
---|
68 | .bUserCancellation resb 1 |
---|
69 | resb 1 |
---|
70 | .cReturnDriveLetter resb 1 |
---|
71 | .bReturnDriveNumber resb 1 |
---|
72 | endstruc |
---|
73 | |
---|
74 | |
---|
75 | ; File dialog |
---|
76 | FILENAME_BUFFER_SIZE EQU 14 ; 8+1+3+NULL+alignment |
---|
77 | MAX_FILE_DIALOG_INFO_LINES EQU 3 |
---|
78 | FLG_FILEDIALOG_DRIVES EQU (1<<0) ; Allow changing drive |
---|
79 | FLG_FILEDIALOG_DIRECTORY EQU (1<<1) ; Select directory instead of file |
---|
80 | FLG_FILEDIALOG_NEW EQU (1<<2) ; Allow creating new file or directory |
---|
81 | |
---|
82 | KEY_FILEDIALOG_CHANGE_DRIVE EQU 3Ch ; F2 |
---|
83 | KEY_FILEDIALOG_SELECT_DIRECTORY EQU 3Dh ; F3 |
---|
84 | KEY_FILEDIALOG_NEW_FILE_OR_DIR EQU 3Eh ; F4 |
---|
85 | |
---|
86 | struc FILE_DIALOG_IO |
---|
87 | ; DIALOG_INPUT adjusted for File Dialog |
---|
88 | .fszTitle resb 4 |
---|
89 | .fszItemBuffer resb 4 ; For generating file strings |
---|
90 | resb 4 |
---|
91 | |
---|
92 | .bUserCancellation resb 1 |
---|
93 | resb 1 |
---|
94 | .bDialogFlags resb 1 |
---|
95 | .bFileAttributes resb 1 |
---|
96 | resb 2 |
---|
97 | .fpFileFilterString: ; Ptr to NULL terminated search string (may include path and wildcards) |
---|
98 | .szFile resb FILENAME_BUFFER_SIZE |
---|
99 | endstruc |
---|
100 | |
---|
101 | |
---|
102 | %endif ; DIALOG_INC |
---|