gui: removed CWidget_GetChildBySelector (use OBJ_GetChildBySelector).
This commit is contained in:
@@ -89,30 +89,23 @@ CDialog_Init_ret:
|
||||
; @routine CDialog_GetChildBySelector
|
||||
;
|
||||
; @param Y pointer to MainWindow
|
||||
; @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, R17, R18, R19
|
||||
; @clobbers R16-R19
|
||||
|
||||
CDialog_GetChildBySelector:
|
||||
push r16
|
||||
bigcall MainWindow_GetFirstChildOfContentWidget ; (r16)
|
||||
bigcall MainWindow_GetFirstChildOfContentWidget ; r19:r18=result (r16)
|
||||
pop r16
|
||||
brcc CDialog_GetChildBySelector_ret
|
||||
push zl
|
||||
push zh
|
||||
ldd zl, Y+CDIALOG_OFFS_CONFIG_LO
|
||||
ldd zh, Y+CDIALOG_OFFS_CONFIG_HI
|
||||
push yl
|
||||
push yh
|
||||
mov yl, r18
|
||||
mov yh, r19
|
||||
bigcall CWidget_GetChildBySelector
|
||||
pop yh
|
||||
pop yl
|
||||
pop zh
|
||||
pop zl
|
||||
push yl
|
||||
push yh
|
||||
mov yl, r18
|
||||
mov yh, r19
|
||||
bigcall OBJ_GetChildBySelector ; (R17, R18, R19)
|
||||
pop yh
|
||||
pop yl
|
||||
CDialog_GetChildBySelector_ret:
|
||||
ret
|
||||
; @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
|
||||
;
|
||||
|
||||
Reference in New Issue
Block a user