MainWindow: no longer auto-create content widget
will be called later by deriving classes upon SHOW signal to save on SDRAM.
This commit is contained in:
@@ -14,9 +14,10 @@
|
|||||||
; ***************************************************************************
|
; ***************************************************************************
|
||||||
; defines
|
; defines
|
||||||
|
|
||||||
.equ MAINWINDOW_OFFS_BEGIN = VLAYOUT_SIZE
|
.equ MAINWINDOW_OFFS_BEGIN = VLAYOUT_SIZE
|
||||||
; no data for now
|
.equ MAINWINDOW_OFFS_PREVWIN_LO = MAINWINDOW_OFFS_BEGIN+0
|
||||||
.equ MAINWINDOW_SIZE = MAINWINDOW_OFFS_BEGIN+0
|
.equ MAINWINDOW_OFFS_PREVWIN_HI = MAINWINDOW_OFFS_BEGIN+1
|
||||||
|
.equ MAINWINDOW_SIZE = MAINWINDOW_OFFS_BEGIN+2
|
||||||
|
|
||||||
|
|
||||||
; index of sub-windows
|
; index of sub-windows
|
||||||
@@ -96,7 +97,6 @@ MainWindow_Init:
|
|||||||
|
|
||||||
; create sub widgets
|
; create sub widgets
|
||||||
rcall mainWindowCreateTitleWidget
|
rcall mainWindowCreateTitleWidget
|
||||||
rcall mainWindowCreateContentWidget
|
|
||||||
|
|
||||||
ret
|
ret
|
||||||
; @end
|
; @end
|
||||||
@@ -221,13 +221,13 @@ mainWindowCreateTitleWidget_done:
|
|||||||
|
|
||||||
|
|
||||||
; ---------------------------------------------------------------------------
|
; ---------------------------------------------------------------------------
|
||||||
; @routine mainWindowCreateContentWidget
|
; @routine MainWindow_CreateContentWidget
|
||||||
;
|
;
|
||||||
; @param Y address of main window widget
|
; @param Y address of main window widget
|
||||||
; @param r21:r20 ressource id for title
|
|
||||||
; @return CFLAG set of okay, cleared otherwise
|
; @return CFLAG set of okay, cleared otherwise
|
||||||
|
; @return r19:r18 pointer to created widget
|
||||||
|
|
||||||
mainWindowCreateContentWidget:
|
MainWindow_CreateContentWidget:
|
||||||
; create content widget
|
; create content widget
|
||||||
push yl
|
push yl
|
||||||
push yh
|
push yh
|
||||||
@@ -237,13 +237,15 @@ mainWindowCreateContentWidget:
|
|||||||
ldi r17, (WIDGET_PACK_FILLED<<WIDGET_PACK_HSELF0_BIT) | (WIDGET_PACK_FILLED<<WIDGET_PACK_VSELF0_BIT) ; PACK
|
ldi r17, (WIDGET_PACK_FILLED<<WIDGET_PACK_HSELF0_BIT) | (WIDGET_PACK_FILLED<<WIDGET_PACK_VSELF0_BIT) ; PACK
|
||||||
ldi r20, VLAYOUT_MODE_EXPAND
|
ldi r20, VLAYOUT_MODE_EXPAND
|
||||||
bigcall VLayout_new
|
bigcall VLayout_new
|
||||||
brcc mainWindowCreateContentWidget_done
|
brcc MainWindow_CreateContentWidget_done
|
||||||
; set style for title widget
|
; set style for content widget
|
||||||
ldi r16, LOW(DefaultStyle_Window*2)
|
ldi r16, LOW(DefaultStyle_Window*2)
|
||||||
std Y+WIDGET_OFFS_STYLE_LO, r16
|
std Y+WIDGET_OFFS_STYLE_LO, r16
|
||||||
ldi r16, HIGH(DefaultStyle_Window*2)
|
ldi r16, HIGH(DefaultStyle_Window*2)
|
||||||
std Y+WIDGET_OFFS_STYLE_HI, r16
|
std Y+WIDGET_OFFS_STYLE_HI, r16
|
||||||
mainWindowCreateContentWidget_done:
|
mov r18, yl
|
||||||
|
mov r19, yh
|
||||||
|
MainWindow_CreateContentWidget_done:
|
||||||
pop yh
|
pop yh
|
||||||
pop yl
|
pop yl
|
||||||
ret
|
ret
|
||||||
|
|||||||
Reference in New Issue
Block a user