Changeset 52 in xtideuniversalbios for trunk/Assembly_Library/Src/Menu/Dialog
- Timestamp:
- Oct 12, 2010, 6:51:07 PM (14 years ago)
- google:author:
- aitotat
- Location:
- trunk/Assembly_Library/Src/Menu/Dialog
- Files:
-
- 1 added
- 1 deleted
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Assembly_Library/Src/Menu/Dialog/Dialog.asm
r50 r52 2 2 ; Project name : Assembly Library 3 3 ; Created date : 6.8.2010 4 ; Last update : 9.10.20104 ; Last update : 12.10.2010 5 5 ; Author : Tomi Tilli 6 6 ; Description : Common functions for many dialogs. … … 38 38 call Keyboard_RemoveAllKeystrokesFromBuffer 39 39 40 mov ax, [bp+MENU .wHighlightedItem]40 mov ax, [bp+MENUINIT.wHighlightedItem] 41 41 eLEAVE_STRUCT DIALOG_size 42 42 pop ds … … 78 78 79 79 ;-------------------------------------------------------------------- 80 ; Dialog_EventInitializeMenuinitFromDSSIforSingleItem 81 ; Parameters: 80 ; Dialog_EventInitializeMenuinitFromDSSIforSingleItemWithHighlightedItemInAX 81 ; Parameters: 82 ; AX: Index of highlighted item 82 83 ; DS:SI: Ptr to MENUINIT struct to initialize 83 84 ; SS:BP: Ptr to DIALOG … … 87 88 ;-------------------------------------------------------------------- 88 89 ALIGN JUMP_ALIGN 89 Dialog_EventInitializeMenuinitFromDSSIforSingleItem :90 Dialog_EventInitializeMenuinitFromDSSIforSingleItemWithHighlightedItemInAX: 90 91 les di, [bp+DIALOG.fpDialogIO] 91 92 mov WORD [es:di+DIALOG_INPUT.fszItems], g_szSingleItem 92 93 mov [es:di+DIALOG_INPUT.fszItems+2], cs 93 ; Fall to Dialog_EventInitializeMenuinitFromDSSI 94 95 ;-------------------------------------------------------------------- 96 ; Dialog_EventInitializeMenuinitFromDSSI 97 ; Parameters: 94 ; Fall to Dialog_EventInitializeMenuinitFromDSSIwithHighlightedItemInAX 95 96 ;-------------------------------------------------------------------- 97 ; Dialog_EventInitializeMenuinitFromDSSIwithHighlightedItemInAX 98 ; Parameters: 99 ; AX: Index of highlighted item 98 100 ; DS:SI: Ptr to MENUINIT struct to initialize 99 101 ; SS:BP: Ptr to DIALOG … … 103 105 ;-------------------------------------------------------------------- 104 106 ALIGN JUMP_ALIGN 105 Dialog_EventInitializeMenuinitFromDSSI: 107 Dialog_EventInitializeMenuinitFromDSSIwithHighlightedItemInAX: 108 mov [bp+MENUINIT.wHighlightedItem], ax 106 109 les di, [bp+DIALOG.fpDialogIO] 107 110 call .GetWidthBasedOnParentMenuToAL 108 111 mov [bp+MENUINIT.bWidth], al 109 112 110 call MenuLocation_GetMaxTextLineLengthToAX111 mov bx, ax112 113 lds si, [es:di+DIALOG_INPUT.fszTitle] 113 call LineSplitter_SplitStringFromDSSIwithMaxLineLengthInAXandGetLineCountToAX114 call ItemLineSplitter_GetLinesToAXforStringInDSSI 114 115 mov [bp+MENUINIT.bTitleLines], al 115 116 116 mov ax, bx117 117 lds si, [es:di+DIALOG_INPUT.fszItems] 118 call LineSplitter_SplitStringFromDSSIwithMaxLineLengthInAXandGetLineCountToAX118 call ItemLineSplitter_GetLinesToAXforStringInDSSI 119 119 mov [bp+MENUINIT.wItems], ax 120 120 121 xchg ax, bx122 121 lds si, [es:di+DIALOG_INPUT.fszInfo] 123 call LineSplitter_SplitStringFromDSSIwithMaxLineLengthInAXandGetLineCountToAX122 call ItemLineSplitter_GetLinesToAXforStringInDSSI 124 123 mov [bp+MENUINIT.bInfoLines], al 125 124 … … 178 177 ALIGN JUMP_ALIGN 179 178 Dialog_EventRefreshTitle: 180 mov dl, [bp+MENUINIT.bTitleLines]181 179 lds si, [bp+DIALOG.fpDialogIO] 182 l es di, [si+DIALOG_INPUT.fszTitle]183 jmp SHORT Print DLlinesFromESDI180 lds si, [si+DIALOG_INPUT.fszTitle] 181 jmp SHORT PrintTitleOrInfoLine 184 182 185 183 ALIGN JUMP_ALIGN 186 184 Dialog_EventRefreshInformation: 187 mov dl, [bp+MENUINIT.bInfoLines]188 185 lds si, [bp+DIALOG.fpDialogIO] 189 les di, [si+DIALOG_INPUT.fszInfo] 190 ; Fall to PrintDLlinesFromESDI 191 192 ALIGN JUMP_ALIGN 193 PrintDLlinesFromESDI: 194 xor cx, cx ; Start from line zero 195 mov dh, cl ; Line count now in DX 196 ALIGN JUMP_ALIGN 197 .PrintNextLine: 198 call LineSplitter_PrintLineInCXfromStringInESDI 199 push di 200 CALL_DISPLAY_LIBRARY PrintNewlineCharacters 201 pop di 202 inc cx 203 dec dx 204 jnz SHORT .PrintNextLine 186 lds si, [si+DIALOG_INPUT.fszInfo] 187 ; Fall to PrintTitleOrInfoLine 188 189 ALIGN JUMP_ALIGN 190 PrintTitleOrInfoLine: 191 mov bx, ds 192 CALL_DISPLAY_LIBRARY PrintNullTerminatedStringFromBXSI 205 193 stc 206 194 ret … … 218 206 Dialog_EventRefreshItemFromCX: 219 207 lds si, [bp+DIALOG.fpDialogIO] 220 les di, [si+DIALOG_INPUT.fszItems] 221 call LineSplitter_PrintLineInCXfromStringInESDI 208 lds si, [si+DIALOG_INPUT.fszItems] 209 call ItemLineSplitter_GetLineToDSSIandLengthToCXfromStringInDSSIwithIndexInCX 210 jnc SHORT .LineNotFound 211 212 mov bx, ds 213 CALL_DISPLAY_LIBRARY PrintCharBufferFromBXSIwithLengthInCX 214 .LineNotFound: 222 215 stc 223 216 ret -
trunk/Assembly_Library/Src/Menu/Dialog/DialogFile.asm
r51 r52 2 2 ; Project name : Assembly Library 3 3 ; Created date : 6.9.2010 4 ; Last update : 1 0.10.20104 ; Last update : 12.10.2010 5 5 ; Author : Tomi Tilli 6 6 ; Description : Displays file dialog. … … 49 49 .ItemSelectedFromCX: 50 50 call LoadItemStringBufferToESDI 51 call LineSplitter_GetOffsetToSIforLineCXfromStringInESDI 52 push es 53 pop ds 51 call Memory_CopyESDItoDSSI 52 call ItemLineSplitter_GetLineToDSSIandLengthToCXfromStringInDSSIwithIndexInCX 54 53 jmp ParseSelectionFromItemLineInDSSI 55 54 … … 115 114 call SortDirectoryContentsStringFromESDIwithCountInCX 116 115 call Memory_CopySSBPtoDSSI 117 call Dialog_EventInitializeMenuinitFromDSSI 116 xor ax, ax 117 call Dialog_EventInitializeMenuinitFromDSSIwithHighlightedItemInAX 118 118 call GetInfoLinesToCXandDialogFlagsToAX 119 119 mov [bp+MENUINIT.bInfoLines], cl 120 120 CALL_DISPLAY_LIBRARY GetColumnsToALandRowsToAH 121 121 mov [bp+MENUINIT.bHeight], ah ; Always max height 122 xor ax, ax 123 mov [bp+MENU.wHighlightedItem], ax 124 mov [bp+MENU.wFirstVisibleItem], ax 122 mov WORD [bp+MENU.wFirstVisibleItem], 0 125 123 ret 126 124 … … 256 254 mov bx, di 257 255 CALL_DISPLAY_LIBRARY PushDisplayContext 258 CALL_DISPLAY_LIBRARY PrepareOffScreenBufferInESBXtoESDI 256 mov cx, -1 257 CALL_DISPLAY_LIBRARY PrepareOffScreenBufferInESBXwithLengthInCX 259 258 260 259 call .FormatFileOrDirectoryToBufferFromDTAinDSSI … … 299 298 ;-------------------------------------------------------------------- 300 299 .FormatFile: 300 ; Convert file name to lower case 301 xchg si, ax 302 mov dx, StringProcess_ConvertToLowerCase 303 call StringProcess_DSSIwithFunctionInDX 304 xchg ax, si 305 301 306 ; Push parameters for file name 302 xchg si, ax303 call String_ConvertDSSItoLowerCase304 xchg ax, si305 307 push ax ; Push directory name offset 306 308 push ds ; Push directory name segment -
trunk/Assembly_Library/Src/Menu/Dialog/DialogMessage.asm
r41 r52 2 2 ; Project name : Assembly Library 3 3 ; Created date : 6.8.2010 4 ; Last update : 6.9.20104 ; Last update : 12.10.2010 5 5 ; Author : Tomi Tilli 6 6 ; Description : Displays message dialog. … … 44 44 .InitializeMenuinitFromDSSI: 45 45 or BYTE [bp+MENU.bFlags], FLG_MENU_USER_HANDLES_SCROLLING | FLG_MENU_NOHIGHLIGHT 46 mov WORD [bp+MENU.wHighlightedItem], 047 jmp Dialog_EventInitializeMenuinitFromDSSI 46 xor ax, ax ; Cannot be NO_ITEM_HIGHLIGHTED because of scrolling 47 jmp Dialog_EventInitializeMenuinitFromDSSIwithHighlightedItemInAX 48 48 49 49 … … 91 91 ALIGN JUMP_ALIGN 92 92 .DecrementLines: 93 cmp WORD [bp+MENU .wHighlightedItem], BYTE 093 cmp WORD [bp+MENUINIT.wHighlightedItem], BYTE 0 94 94 je SHORT .AlreadyAtTheTopOrBottom 95 95 96 96 mov ax, [bp+MENU.wFirstVisibleItem] 97 mov [bp+MENU .wHighlightedItem], ax97 mov [bp+MENUINIT.wHighlightedItem], ax 98 98 mov ah, MENU_KEY_UP 99 99 jmp MenuLoop_ProcessScrollingKeysFromAX … … 103 103 mov ax, [bp+MENUINIT.wItems] 104 104 dec ax ; Last possible item to highlight 105 cmp [bp+MENU .wHighlightedItem], ax105 cmp [bp+MENUINIT.wHighlightedItem], ax 106 106 jae SHORT .AlreadyAtTheTopOrBottom 107 107 108 108 call MenuScrollbars_GetLastVisibleItemOnPageToAX 109 mov [bp+MENU .wHighlightedItem], ax109 mov [bp+MENUINIT.wHighlightedItem], ax 110 110 mov ah, MENU_KEY_DOWN 111 111 jmp MenuLoop_ProcessScrollingKeysFromAX -
trunk/Assembly_Library/Src/Menu/Dialog/DialogProgress.asm
r48 r52 2 2 ; Project name : Assembly Library 3 3 ; Created date : 15.8.2010 4 ; Last update : 28.9.20104 ; Last update : 12.10.2010 5 5 ; Author : Tomi Tilli 6 6 ; Description : Displays progress bar dialog and starts progress task. … … 78 78 ALIGN JUMP_ALIGN 79 79 .InitializeMenuinitFromDSSI: 80 call Dialog_EventInitializeMenuinitFromDSSIforSingleItem 80 mov ax, NO_ITEM_HIGHLIGHTED 81 call Dialog_EventInitializeMenuinitFromDSSIforSingleItemWithHighlightedItemInAX 81 82 lds si, [bp+DIALOG.fpDialogIO] 82 83 call TimerTicks_ReadFromBdaToAX -
trunk/Assembly_Library/Src/Menu/Dialog/DialogSelection.asm
r41 r52 2 2 ; Project name : Assembly Library 3 3 ; Created date : 13.8.2010 4 ; Last update : 1 3.8.20104 ; Last update : 12.10.2010 5 5 ; Author : Tomi Tilli 6 6 ; Description : Displays selection dialog. … … 43 43 ALIGN JUMP_ALIGN 44 44 .InitializeMenuinitFromDSSI: 45 mov WORD [bp+MENU.wHighlightedItem], 046 jmp Dialog_EventInitializeMenuinitFromDSSI 45 xor ax, ax 46 jmp Dialog_EventInitializeMenuinitFromDSSIwithHighlightedItemInAX 47 47 48 48 -
trunk/Assembly_Library/Src/Menu/Dialog/DialogString.asm
r41 r52 2 2 ; Project name : Assembly Library 3 3 ; Created date : 12.8.2010 4 ; Last update : 7.9.20104 ; Last update : 12.10.2010 5 5 ; Author : Tomi Tilli 6 6 ; Description : Displays word input dialog. … … 43 43 44 44 ALIGN JUMP_ALIGN 45 .InitializeMenuinitFromDSSI: 46 xor ax, ax 47 jmp Dialog_EventInitializeMenuinitFromDSSIforSingleItemWithHighlightedItemInAX 48 49 50 ALIGN JUMP_ALIGN 45 51 .IdleProcessing: 46 xor ax, ax ; Item 0 is used as input line47 call MenuText_AdjustDisplayContextForDrawingItemFrom AX52 xor cx, cx ; Item 0 is used as input line 53 call MenuText_AdjustDisplayContextForDrawingItemFromCX 48 54 call GetStringFromUser 49 55 call MenuInit_CloseMenuWindow … … 55 61 .rgfnEventHandlers: 56 62 istruc MENUEVENT 57 at MENUEVENT.InitializeMenuinitFromDSSI, dw Dialog_EventInitializeMenuinitFromDSSIforSingleItem63 at MENUEVENT.InitializeMenuinitFromDSSI, dw .InitializeMenuinitFromDSSI 58 64 at MENUEVENT.ExitMenu, dw Dialog_EventNotHandled 59 65 at MENUEVENT.IdleProcessing, dw .IdleProcessing -
trunk/Assembly_Library/Src/Menu/Dialog/DialogWord.asm
r41 r52 2 2 ; Project name : Assembly Library 3 3 ; Created date : 10.8.2010 4 ; Last update : 7.9.20104 ; Last update : 12.10.2010 5 5 ; Author : Tomi Tilli 6 6 ; Description : Displays word input dialog. … … 43 43 44 44 ALIGN JUMP_ALIGN 45 .InitializeMenuinitFromDSSI: 46 xor ax, ax 47 jmp Dialog_EventInitializeMenuinitFromDSSIforSingleItemWithHighlightedItemInAX 48 49 50 ALIGN JUMP_ALIGN 45 51 .IdleProcessing: 46 xor ax, ax ; Item 0 is used as input line47 call MenuText_AdjustDisplayContextForDrawingItemFrom AX52 xor cx, cx ; Item 0 is used as input line 53 call MenuText_AdjustDisplayContextForDrawingItemFromCX 48 54 call GetWordFromUser 49 55 call MenuInit_CloseMenuWindow … … 55 61 .rgfnEventHandlers: 56 62 istruc MENUEVENT 57 at MENUEVENT.InitializeMenuinitFromDSSI, dw Dialog_EventInitializeMenuinitFromDSSIforSingleItem63 at MENUEVENT.InitializeMenuinitFromDSSI, dw .InitializeMenuinitFromDSSI 58 64 at MENUEVENT.ExitMenu, dw Dialog_EventNotHandled 59 65 at MENUEVENT.IdleProcessing, dw .IdleProcessing
Note:
See TracChangeset
for help on using the changeset viewer.