gui2: more work on layout code.
This commit is contained in:
@@ -216,6 +216,38 @@ Layout_AddToTmpOfFillXChildren_done:
|
||||
|
||||
|
||||
|
||||
; ---------------------------------------------------------------------------
|
||||
; @routine LayoutCountExpandableChildren
|
||||
;
|
||||
; @param Y pointer to widget
|
||||
; @param r22 mask for OBJECT_OFFS_OPTS_LO (e.g. 1<<WIDGET_OPTSLO_FILLX_BIT)
|
||||
; @return r16 number of children with opt WIDGET_OPTSLO_FILLX_BIT
|
||||
; @clobbers r17, r18, r19
|
||||
|
||||
LayoutCountExpandableChildren:
|
||||
clr r16
|
||||
push yl
|
||||
push yh
|
||||
bigcall OBJ_GetFirstChild
|
||||
LayoutCountExpandableChildren_loop:
|
||||
brcc LayoutCountExpandableChildren_done
|
||||
mov yl, r18
|
||||
mov yh, r19
|
||||
ldd r17, Y+OBJECT_OFFS_OPTS_LO
|
||||
and r17, r22
|
||||
breq LayoutCountExpandableChildren_next
|
||||
inc r16
|
||||
LayoutCountExpandableChildren_next:
|
||||
rcall OBJ_GetNext
|
||||
rjmp LayoutCountExpandableChildren_loop
|
||||
LayoutCountExpandableChildren_done:
|
||||
pop yh
|
||||
pop yl
|
||||
ret
|
||||
; @end
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user