gui: move some value definitions to WIDGET class (need to do the same for VALUE_LABEL!)

This commit is contained in:
Martin Preuss
2026-05-06 23:44:04 +02:00
parent ce1fd901e7
commit dfeedecf22
2 changed files with 59 additions and 73 deletions

View File

@@ -105,7 +105,10 @@
; values for signals WIDGET_SIGNAL_SETVALUE and WIDGET_SIGNAL_GETVALUE
.equ WIDGET_VALUE_DEFAULT_WIDTH = 1
.equ WIDGET_VALUE_DEFAULT_HEIGHT = 2
.equ WIDGET_VALUE_NEXTFREE = 3
.equ WIDGET_VALUE_CURRENTVALUE = 3
.equ WIDGET_VALUE_MINVALUE = 4
.equ WIDGET_VALUE_MAXVALUE = 5
.equ WIDGET_VALUE_NEXTFREE = 6
@@ -352,8 +355,7 @@ Widget_GetDefaultHeight_ret:
Widget_SetValue:
ldi r16, WIDGET_SIGNAL_SETVALUE
bigcall OBJ_HandleSignal
ret
bigjmp OBJ_HandleSignal
; @end
@@ -374,6 +376,54 @@ Widget_GetValue:
; ---------------------------------------------------------------------------
; @routine Widget_SetCurrentValue @global
;
; @param Y address of widget
; @param X value to set
; @return CFLAG set if value set, cleared on error
; @clobbers any, !Y
Widget_SetCurrentValue:
ldi r16, WIDGET_SIGNAL_SETVALUE
ldi r17, WIDGET_VALUE_CURRENTVALUE
bigjmp OBJ_HandleSignal
; @end
; ---------------------------------------------------------------------------
; @routine Widget_SetMinValue @global
;
; @param Y address of widget
; @param X value to set
; @return CFLAG set if value set, cleared on error
; @clobbers any, !Y
Widget_SetMinValue:
ldi r16, WIDGET_SIGNAL_SETVALUE
ldi r17, WIDGET_VALUE_MINVALUE
bigjmp OBJ_HandleSignal
; @end
; ---------------------------------------------------------------------------
; @routine Widget_SetMaxValue @global
;
; @param Y address of widget
; @param X value to set
; @return CFLAG set if value set, cleared on error
; @clobbers any, !Y
Widget_SetMaxValue:
ldi r16, WIDGET_SIGNAL_SETVALUE
ldi r17, WIDGET_VALUE_MAXVALUE
bigjmp OBJ_HandleSignal
; @end
; ---------------------------------------------------------------------------
; @routine Widget_IsPointInRect @global
;