added Widget_OnDraw and Widget_OnDrawNop
This commit is contained in:
@@ -146,10 +146,65 @@ Widget_Fini:
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
; ---------------------------------------------------------------------------
|
||||||
|
; @routine Widget_OnDraw @global
|
||||||
|
;
|
||||||
|
; @param Y address of widget
|
||||||
|
; @param xl param1
|
||||||
|
; @param xh param2
|
||||||
|
; @return CFLAG set if signal handled
|
||||||
|
; @clobbers any, !Y
|
||||||
|
|
||||||
|
Widget_OnDraw:
|
||||||
|
ldd r17, Y+OBJECT_OFFS_FLAGS
|
||||||
|
|
||||||
|
; check whether widget is visible
|
||||||
|
sbrs r17, WIDGET_FLAGS_VISIBLE_BIT
|
||||||
|
rjmp Widget_OnDraw_ret
|
||||||
|
|
||||||
|
; check whether widget is dirty
|
||||||
|
sbrs r17, WIDGET_FLAGS_DIRTY_BIT
|
||||||
|
rjmp Widget_OnDraw_ret
|
||||||
|
|
||||||
|
; clear dirty bit
|
||||||
|
cbr r17, (1<<WIDGET_FLAGS_DIRTY_BIT)
|
||||||
|
std Y+OBJECT_OFFS_FLAGS, r17
|
||||||
|
|
||||||
|
; clear widget background
|
||||||
|
rcall Widget_Clear ; (any, !Y)
|
||||||
|
|
||||||
|
Widget_OnDraw_ret:
|
||||||
|
sec
|
||||||
|
ret
|
||||||
|
; @end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
; ---------------------------------------------------------------------------
|
||||||
|
; @routine Widget_OnDrawNop @global
|
||||||
|
;
|
||||||
|
; @param Y address of widget
|
||||||
|
; @param xl param1
|
||||||
|
; @param xh param2
|
||||||
|
; @return CFLAG set if signal handled
|
||||||
|
; @clobbers any, !Y
|
||||||
|
|
||||||
|
Widget_OnDrawNop:
|
||||||
|
ldd r17, Y+OBJECT_OFFS_FLAGS
|
||||||
|
; only clear dirty bit
|
||||||
|
cbr r17, (1<<WIDGET_FLAGS_DIRTY_BIT)
|
||||||
|
std Y+OBJECT_OFFS_FLAGS, r17
|
||||||
|
sec
|
||||||
|
ret
|
||||||
|
; @end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
; ---------------------------------------------------------------------------
|
; ---------------------------------------------------------------------------
|
||||||
; @routine Widget_Clear @global
|
; @routine Widget_Clear @global
|
||||||
;
|
;
|
||||||
; @param Y address of widget
|
; @param Y address of widget
|
||||||
|
; @clobbers any, !Y
|
||||||
|
|
||||||
Widget_Clear:
|
Widget_Clear:
|
||||||
rcall widgetLoadDimsForFullWidget ; (none)
|
rcall widgetLoadDimsForFullWidget ; (none)
|
||||||
@@ -547,6 +602,8 @@ widgetCalcAbsPosAndBorders:
|
|||||||
|
|
||||||
|
|
||||||
Widget_DefaultSignalmap:
|
Widget_DefaultSignalmap:
|
||||||
|
.db 0, WIDGET_SIGNAL_DRAW, LOW(Widget_OnDraw), HIGH(Widget_OnDraw)
|
||||||
|
.db 0, OBJECT_SIGNAL_DESTROY, LOW(OBJ_OnDestroy), HIGH(OBJ_OnDestroy)
|
||||||
.db 0, 0, 0, 0 ; end of table
|
.db 0, 0, 0, 0 ; end of table
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user