source: xtideuniversalbios/trunk/Assembly_Library/Inc/Dialog.inc@ 568

Last change on this file since 568 was 54, checked in by Tomi Tilli, 14 years ago

Changes to Assembly Library:
Drive selection moved to own dialog from File Dialog.
File Dialog now displays loading text for better usability in slow systems.
Moved some functions from Memory.asm to new Registers.asm.

File size: 2.6 KB
Line 
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
11struc DIALOG
12 .menu resb MENU_size
13 .fpDialogIO resb 4 ; Ptr to DIALOG_INPUT + dialog specific data
14 .pParentMenu resb 2
15endstruc
16
17DIALOG_DELTA_WIDTH_FROM_PARENT EQU 5
18DIALOG_MAX_WIDTH EQU 60
19DIALOG_MAX_HEIGHT EQU 25
20
21
22; Dialog parameter and return value structs
23struc DIALOG_INPUT
24 .fszTitle resb 4
25 .fszItems resb 4
26 .fszInfo resb 4
27endstruc
28
29struc 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
36endstruc
37
38struc 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
46endstruc
47
48struc PROGRESS_DIALOG_IO
49 .dialogInput resb DIALOG_INPUT_size
50 resb 2
51 .wCurrentProgressValue resb 2
52 .wMaxProgressValue resb 2
53 .wMinProgressValue resb 2
54 .fnTaskWithParamInDSSI resb 2
55
56 ; Progress Dialog internal values
57 .wProgressPerCharacter resb 2
58 .wStartTimeTicks resb 2
59endstruc
60
61struc DRIVE_DIALOG_IO
62 .dialogInput resb DIALOG_INPUT_size
63 .bUserCancellation resb 1
64 resb 1
65 .cReturnDriveLetter resb 1
66 .bReturnDriveNumber resb 1
67endstruc
68
69struc FILE_DIALOG_IO
70 ; DIALOG_INPUT adjusted for File Dialog
71 .fszTitle resb 4
72 .fszItemBuffer resb 4 ; For generating file strings
73 resb 4
74
75 .bUserCancellation resb 1
76 resb 1
77 .bDialogFlags resb 1
78 .bFileAttributes resb 1
79 resb 2
80 .fpFileFilterString: ; Ptr to NULL terminated search string (may include path and wildcards)
81 .szFile resb FILENAME_BUFFER_SIZE
82endstruc
83
84
85; Progress bar dialog
86PROGRESS_COMPLETE_CHARACTER EQU BLOCK_FULL_FOREGROUND
87PROGRESS_INCOMPLETE_CHARACTER EQU BLOCK_MOSTLY_BACKGROUND
88
89; File dialog
90FILENAME_BUFFER_SIZE EQU 14 ; 8+1+3+NULL+alignment
91MAX_FILE_DIALOG_INFO_LINES EQU 3
92FLG_FILEDIALOG_DRIVES EQU (1<<0) ; Allow changing drive
93FLG_FILEDIALOG_DIRECTORY EQU (1<<1) ; Select directory instead of file
94FLG_FILEDIALOG_NEW EQU (1<<2) ; Allow creating new file or directory
95
96KEY_FILEDIALOG_CHANGE_DRIVE EQU 3Ch ; F2
97KEY_FILEDIALOG_SELECT_DIRECTORY EQU 3Dh ; F3
98KEY_FILEDIALOG_NEW_FILE_OR_DIR EQU 3Eh ; F4
99
100
101%endif ; DIALOG_INC
Note: See TracBrowser for help on using the repository browser.