; *************************************************************************** ; copyright : (C) 2026 by Martin Preuss ; email : martin@libchipcard.de ; ; *************************************************************************** ; * This file is part of the project "AqHome". * ; * Please see toplevel file COPYING of that project for license details. * ; *************************************************************************** #ifndef AQH_AVR_GUI2_VLAYOUT_ASM #define AQH_AVR_GUI2_VLAYOUT_ASM ; *************************************************************************** ; defines .equ VLAYOUT_OFFS_BEGIN = WIDGET_SIZE ; no data for now .equ VLAYOUT_SIZE = VLAYOUT_OFFS_BEGIN+0 ; *************************************************************************** ; code .cseg ; --------------------------------------------------------------------------- ; @routine VLayout_new @global ; ; @return CFLAG set of okay, cleared otherwise ; @return Y address of newly created object ; @param X parent widget ; @param r16 value for OBJECT_OFFS_OPTS_LO ; @param r17 value for OBJECT_OFFS_OPTS_HI ; @param r21:r20 ressource id for title ; @clobbers any VLayout_new: push r20 push r21 ldi r24, LOW(VLAYOUT_SIZE) ldi r25, HIGH(VLAYOUT_SIZE) bigcall Object_Alloc ; (!r16, !r17, !X) pop r21 pop r20 brcc VLayout_new_ret rcall VLayout_Init ; (r16, r17, X) sec VLayout_new_ret: ret ; @end ; --------------------------------------------------------------------------- ; @routine VLayout_Init @global ; ; @param Y address of widget ; @param X parent widget (if any) ; @clobbers r16, r17, X VLayout_Init: push r20 push r21 ; call base class bigcall Widget_Init ; (r16, r17, X) pop r21 pop r20 ; set default signal map ldi r16, LOW(VLayout_DefaultSignalmap*2) std Y+OBJECT_OFFS_SIGNALMAP_LO, r16 ldi r16, HIGH(VLayout_DefaultSignalmap*2) std Y+OBJECT_OFFS_SIGNALMAP_HI, r16 ret ; @end ; --------------------------------------------------------------------------- ; @routine VLayout_OnLayout ; ; @param Y pointer to widget ; @clobbers any, !Y VLayout_OnLayout: rcall vLayoutVertically rcall vLayoutHorizontalAdjust ; force re-drawing of this widget ldd r16, Y+OBJECT_OFFS_FLAGS ori r16, (1<