gui: removed CWidget_GetChildBySelector (use OBJ_GetChildBySelector).
This commit is contained in:
@@ -89,30 +89,23 @@ CDialog_Init_ret:
|
|||||||
; @routine CDialog_GetChildBySelector
|
; @routine CDialog_GetChildBySelector
|
||||||
;
|
;
|
||||||
; @param Y pointer to MainWindow
|
; @param Y pointer to MainWindow
|
||||||
; @param Z pointer to dialog configuration
|
|
||||||
; @param r16 selector to search for
|
; @param r16 selector to search for
|
||||||
; @return CFLAG set if widget found, cleared otherwise
|
; @return CFLAG set if widget found, cleared otherwise
|
||||||
; @return r19:r18 resulting widget
|
; @return r19:r18 resulting widget
|
||||||
; @clobbers R16, R17, R18, R19
|
; @clobbers R16-R19
|
||||||
|
|
||||||
CDialog_GetChildBySelector:
|
CDialog_GetChildBySelector:
|
||||||
push r16
|
push r16
|
||||||
bigcall MainWindow_GetFirstChildOfContentWidget ; (r16)
|
bigcall MainWindow_GetFirstChildOfContentWidget ; r19:r18=result (r16)
|
||||||
pop r16
|
pop r16
|
||||||
brcc CDialog_GetChildBySelector_ret
|
brcc CDialog_GetChildBySelector_ret
|
||||||
push zl
|
push yl
|
||||||
push zh
|
push yh
|
||||||
ldd zl, Y+CDIALOG_OFFS_CONFIG_LO
|
mov yl, r18
|
||||||
ldd zh, Y+CDIALOG_OFFS_CONFIG_HI
|
mov yh, r19
|
||||||
push yl
|
bigcall OBJ_GetChildBySelector ; (R17, R18, R19)
|
||||||
push yh
|
pop yh
|
||||||
mov yl, r18
|
pop yl
|
||||||
mov yh, r19
|
|
||||||
bigcall CWidget_GetChildBySelector
|
|
||||||
pop yh
|
|
||||||
pop yl
|
|
||||||
pop zh
|
|
||||||
pop zl
|
|
||||||
CDialog_GetChildBySelector_ret:
|
CDialog_GetChildBySelector_ret:
|
||||||
ret
|
ret
|
||||||
; @end
|
; @end
|
||||||
|
|||||||
@@ -91,46 +91,6 @@ CWidget_Create_ret:
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
; ---------------------------------------------------------------------------
|
|
||||||
; @routine CWidget_GetChildBySelector
|
|
||||||
;
|
|
||||||
; @param Y pointer to widget created by @ref CWidget_Create
|
|
||||||
; @param Z pointer to dialog configuration
|
|
||||||
; @param r16 selector to search for
|
|
||||||
; @return CFLAG set if widget found, cleared otherwise
|
|
||||||
; @return r19:r18 resulting widget
|
|
||||||
; @clobbers R16, R18, R19
|
|
||||||
|
|
||||||
CWidget_GetChildBySelector:
|
|
||||||
push zl
|
|
||||||
push zh
|
|
||||||
adiw zh:zl, CWIDGETCFG_HEADER_SIZE
|
|
||||||
; determine child index
|
|
||||||
clr r18
|
|
||||||
CWidget_GetChildBySelector_loop:
|
|
||||||
lpm r19, Z ; CWIDGETCFG_OFFS_WIDGET_TYPE
|
|
||||||
tst r19
|
|
||||||
clc
|
|
||||||
breq CWidget_GetChildBySelector_popRet
|
|
||||||
adiw zh:zl, CWIDGETCFG_OFFS_WIDGET_SELECTOR
|
|
||||||
lpm r19, Z
|
|
||||||
sbiw zh:zl, CWIDGETCFG_OFFS_WIDGET_SELECTOR
|
|
||||||
cp r19, r16
|
|
||||||
breq CWidget_GetChildBySelector_found
|
|
||||||
inc r18
|
|
||||||
adiw zh:zl, CWIDGETCFG_WIDGET_SIZE
|
|
||||||
rjmp CWidget_GetChildBySelector_loop
|
|
||||||
CWidget_GetChildBySelector_found:
|
|
||||||
mov r16, r18
|
|
||||||
bigcall OBJ_GetChildAt ; (r16)
|
|
||||||
CWidget_GetChildBySelector_popRet:
|
|
||||||
pop zh
|
|
||||||
pop zl
|
|
||||||
ret
|
|
||||||
; @end
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
; ---------------------------------------------------------------------------
|
; ---------------------------------------------------------------------------
|
||||||
; @routine CWidget_CreateChildWidgets @global
|
; @routine CWidget_CreateChildWidgets @global
|
||||||
;
|
;
|
||||||
|
|||||||
Reference in New Issue
Block a user