; *************************************************************************** ; 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_HLAYOUT_ASM #define AQH_AVR_GUI2_HLAYOUT_ASM ; *************************************************************************** ; defines .equ HLAYOUT_OFFS_BEGIN = WIDGET_SIZE ; no data for now .equ HLAYOUT_SIZE = HLAYOUT_OFFS_BEGIN+0 ; *************************************************************************** ; code .cseg ; --------------------------------------------------------------------------- ; @routine HLayout_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 HLayout_new: push r20 push r21 ldi r24, LOW(HLAYOUT_SIZE) ldi r25, HIGH(HLAYOUT_SIZE) bigcall Object_Alloc ; (!r16, !r17, !X) pop r21 pop r20 brcc HLayout_new_ret rcall HLayout_Init ; (r16, r17, X) sec HLayout_new_ret: ret ; @end ; --------------------------------------------------------------------------- ; @routine HLayout_Init @global ; ; @param Y address of widget ; @param X parent widget (if any) ; @clobbers r16, r17, X HLayout_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(HLayout_DefaultSignalmap*2) std Y+OBJECT_OFFS_SIGNALMAP_LO, r16 ldi r16, HIGH(HLayout_DefaultSignalmap*2) std Y+OBJECT_OFFS_SIGNALMAP_HI, r16 ret ; @end ; --------------------------------------------------------------------------- ; @routine HLayout_OnLayout ; ; @param Y pointer to widget ; @clobbers any, !Y HLayout_OnLayout: rcall hLayoutHorizontally rcall hLayoutVerticalAdjust ; force re-drawing of this widget ldd r16, Y+OBJECT_OFFS_FLAGS ori r16, (1<