1 | ; File name : DialogSelection.asm
|
---|
2 | ; Project name : Assembly Library
|
---|
3 | ; Created date : 13.8.2010
|
---|
4 | ; Last update : 18.11.2010
|
---|
5 | ; Author : Tomi Tilli
|
---|
6 | ; Description : Displays selection dialog.
|
---|
7 |
|
---|
8 | ; Section containing code
|
---|
9 | SECTION .text
|
---|
10 |
|
---|
11 | ;--------------------------------------------------------------------
|
---|
12 | ; DialogSelection_GetSelectionToAXwithInputInDSSI
|
---|
13 | ; Parameters:
|
---|
14 | ; DS:SI: Ptr to DIALOG_INPUT
|
---|
15 | ; SS:BP: Ptr to parent MENU
|
---|
16 | ; Returns:
|
---|
17 | ; Nothing
|
---|
18 | ; Corrupts registers:
|
---|
19 | ; AX, BX, CX, DX, SI, DI
|
---|
20 | ;--------------------------------------------------------------------
|
---|
21 | ALIGN JUMP_ALIGN
|
---|
22 | DialogSelection_GetSelectionToAXwithInputInDSSI:
|
---|
23 | mov bx, SelectionEventHandler
|
---|
24 | jmp Dialog_DisplayWithDialogInputInDSSIandHandlerInBX
|
---|
25 |
|
---|
26 |
|
---|
27 | ;--------------------------------------------------------------------
|
---|
28 | ; SelectionEventHandler
|
---|
29 | ; Common parameters for all events:
|
---|
30 | ; BX: Menu event (anything from MENUEVENT struct)
|
---|
31 | ; SS:BP: Ptr to DIALOG
|
---|
32 | ; Common return values for all events:
|
---|
33 | ; CF: Set if event processed
|
---|
34 | ; Cleared if event not processed
|
---|
35 | ; Corrupts registers:
|
---|
36 | ; All
|
---|
37 | ;--------------------------------------------------------------------
|
---|
38 | ALIGN JUMP_ALIGN
|
---|
39 | SelectionEventHandler:
|
---|
40 | jmp [cs:bx+.rgfnEventHandlers]
|
---|
41 |
|
---|
42 |
|
---|
43 | ALIGN JUMP_ALIGN
|
---|
44 | .InitializeMenuinitFromDSSI:
|
---|
45 | xor ax, ax
|
---|
46 | jmp Dialog_EventInitializeMenuinitFromDSSIwithHighlightedItemInAX
|
---|
47 |
|
---|
48 |
|
---|
49 | ALIGN WORD_ALIGN
|
---|
50 | .rgfnEventHandlers:
|
---|
51 | istruc MENUEVENT
|
---|
52 | at MENUEVENT.InitializeMenuinitFromDSSI, dw .InitializeMenuinitFromDSSI
|
---|
53 | at MENUEVENT.ExitMenu, dw Dialog_EventExitMenu
|
---|
54 | at MENUEVENT.IdleProcessing, dw Dialog_EventNotHandled
|
---|
55 | at MENUEVENT.ItemHighlightedFromCX, dw Dialog_EventNotHandled
|
---|
56 | at MENUEVENT.ItemSelectedFromCX, dw Dialog_EventAnyThatClosesDialog
|
---|
57 | at MENUEVENT.KeyStrokeInAX, dw Dialog_EventNotHandled
|
---|
58 | at MENUEVENT.RefreshTitle, dw Dialog_EventRefreshTitle
|
---|
59 | at MENUEVENT.RefreshInformation, dw Dialog_EventRefreshInformation
|
---|
60 | at MENUEVENT.RefreshItemFromCX, dw Dialog_EventRefreshItemFromCX
|
---|
61 | iend
|
---|