more work on dialog class.
This commit is contained in:
@@ -16,7 +16,9 @@
|
||||
|
||||
; DIALOG data
|
||||
.equ DIALOG_OFFS_BEGIN = MAINWINDOW_SIZE
|
||||
.equ DIALOG_SIZE = DIALOG_OFFS_BEGIN+0
|
||||
.equ DIALOG_OFFS_CURRSUBDLG_LO = DIALOG_OFFS_BEGIN+0
|
||||
.equ DIALOG_OFFS_CURRSUBDLG_HI = DIALOG_OFFS_BEGIN+1
|
||||
.equ DIALOG_SIZE = DIALOG_OFFS_BEGIN+2
|
||||
|
||||
|
||||
.equ DIALOG_OPTS_STDBTNS_BIT = 0 ; use standard buttons
|
||||
@@ -157,6 +159,65 @@ Dialog_RmContent:
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine Dialog_EnterSubDialog
|
||||
; @param Y pointer to dialog
|
||||
; @param X pointer to new dialog to enter
|
||||
; @clobbers any, !Y
|
||||
|
||||
Dialog_EnterSubDialog:
|
||||
std Y+DIALOG_OFFS_CURRSUBDLG_LO, xl
|
||||
std Y+DIALOG_OFFS_CURRSUBDLG_HI, xh
|
||||
|
||||
adiw xh:xl, OBJECT_OFFS_TARGET_LO
|
||||
st X+, yl
|
||||
st X, yh
|
||||
sbiw xh:xl, (OBJECT_OFFS_TARGET_LO+1)
|
||||
|
||||
push yl
|
||||
push yh
|
||||
bigcall Widget_GetApp ; R19:R18=gui (none)
|
||||
mov yl, r18
|
||||
mov yh, r19
|
||||
bigcall GuiApp_EnterWindow
|
||||
pop yh
|
||||
pop yl
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine Dialog_LeaveSubDialog
|
||||
; @param Y pointer to dialog
|
||||
; @clobbers any, !Y
|
||||
|
||||
Dialog_LeaveSubDialog:
|
||||
; leave sub-dialog
|
||||
push yl
|
||||
push yh
|
||||
bigcall Widget_GetApp ; R19:R18=gui
|
||||
mov yl, r18
|
||||
mov yh, r19
|
||||
bigcall GuiApp_LeaveWindow
|
||||
pop yh
|
||||
pop yl
|
||||
|
||||
; mark sub-dialog for destruction
|
||||
ldd xl, Y+DIALOG_OFFS_CURRSUBDLG_LO
|
||||
ldd xh, Y+DIALOG_OFFS_CURRSUBDLG_HI
|
||||
clr r16
|
||||
std Y+DIALOG_OFFS_CURRSUBDLG_LO, r16
|
||||
std Y+DIALOG_OFFS_CURRSUBDLG_HI, r16
|
||||
adiw xh:xl, OBJECT_OFFS_FLAGS
|
||||
ld r16, X
|
||||
sbr r16, (1<<OBJECT_FLAGS_DESTROY_BIT)
|
||||
st X, r16
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
; ***************************************************************************
|
||||
|
||||
Reference in New Issue
Block a user