1 line
9.4 KiB
Plaintext
Raw Normal View History

2023-03-04 03:45:20 +01:00
LOAD 'Macros.dump' INCLUDE 'SS.equ' INCLUDE 'Driver.equ' INCLUDE 'Heap.aii.i' ;----------------------------------------------- ; ; Imported addresses ; ;----------------------------------------------- IMPORT D_AlertBox IMPORT D_DisableMItems IMPORT D_EnableMItems IMPORT D_FastMult IMPORT D_MemoryError IMPORT S_ActiveWindow IMPORT S_BuildColWdUndo IMPORT S_CalcAutoStr IMPORT S_CalcManStr IMPORT S_CalculateSheet IMPORT S_CellWidth IMPORT S_ChangeDef IMPORT S_ColLabRect IMPORT S_CurBRSelect IMPORT S_CurBRTitle IMPORT S_CurBScrl IMPORT S_CurContHt IMPORT S_CurContRect IMPORT S_CurContWd IMPORT S_CurContXpt IMPORT S_CurContYpt IMPORT S_CurDefColWd IMPORT S_CurEditFlag IMPORT S_CurMaxTLCell IMPORT S_CurRScrl IMPORT S_CurTLCell IMPORT S_CurTLSelect IMPORT S_CurTLTitle IMPORT S_CurVPageSize IMPORT S_DoDefaultWidthDlog IMPORT S_HideGridStr IMPORT S_RestoreWidth IMPORT S_RowLabRect IMPORT S_ScrlUpdate IMPORT S_SetMaxTLCell IMPORT S_SetUndoOff IMPORT S_SetUndoOn IMPORT S_SetVertLines IMPORT S_ShowGridStr IMPORT S_SwapIn IMPORT S_TitleDialog IMPORT S_TitleTooBigStr IMPORT S_TraverseRange IMPORT S_ViewDataStr IMPORT S_ViewFormStr ;----------------------------------------------- ; ; Forward addresses and entries ; ;----------------------------------------------- ENTRY S_ActivateScrlBars ENTRY S_AdjustSheetColumns ENTRY S_AdjustTitleOffset ENTRY S_RefreshScreen ;--------------------------------------------------------------------------- ; ; S_ChangeCalcMode PROC EXPORT ;Using S_CurrentData ;Using S_AttrData BEGIN +b Call S_SwapIn,in=(S_ActiveWindow:l) Call S_SetUndoOff lda S_CurEditFlag eor #S_ManCalcBit sta S_CurEditFlag and #S_ManCalcBit beq resetCalc Tool _SetMItemName,in=(#S_CalcAutoStr:l,#S_CalculateItem:w) Call D_EnableMItems,in=(#S_RecalcMI:w,#5:w) bra Exit resetCalc Call S_CalculateSheet Tool _SetMItemName,in=(#S_CalcManStr:l,#S_CalculateItem:w) Call D_DisableMItems,in=(#S_RecalcMI:w,#5:w) Exit RETURN ENDP ;--------------------------------------------------------------------------- ; ; S_Recalc PROC EXPORT ;Using S_CurrentData BEGIN +b Call S_SwapIn,in=(S_ActiveWindow:l) Call S_SetUndoOff Call S_CalculateSheet RETURN ENDP ;--------------------------------------------------------------------------- ; ; S_ChangeView PROC EXPORT ;Using S_CurrentData ;Using S_AttrData BEGIN +b Call S_SwapIn,in=(S_ActiveWindow:l) Call S_SetUndoOff lda S_CurEditFlag eor #S_ViewFormulaBit sta S_CurEditFlag and #S_ViewFormulaBit beq resetView Tool _SetMItemName,in=(#S_ViewDataStr:l,#S_ViewItem:w) bra redraw resetView Tool _SetMItemName,in=(#S_ViewFormStr:l,#S_ViewItem:w) redraw Call S_RefreshScreen,in=(#0:w) RETURN ENDP ;--------------------------------------------------------------------------- ; ; S_ChangeDefWidth PROC EXPORT ;Using S_CurrentData local NewDefColWd:w error ErrFlag BEGIN +b stz ErrFlag Call S_SwapIn,in=(S_ActiveWindow:l) Call S_DoDefaultWidthDlog,in=(S_CurDefColWd:w),out=(a:w) bcs Exit sta NewDefColWd Call S_BuildColWdUndo,in=(#0:w),err=ErrFlag bcs memError MoveWord NewDefColWd,S_CurDefColWd in #1:w,#1:w,#702:w,#1:w in #S_ChangeDef:l XCall S_TraverseRange,err=ErrFlag bcc redraw memError Call D_MemoryError redraw Call S_AdjustTitleOffset Call S_ActivateScrlBars Call S_RefreshScreen,in=(#1:w) Call S_SetUndoOn,in=(#S_UndoColWdType:w) Exit RETURN ENDP ;--------------------------------------------------------------------------- ; ; S_RestoreColWidth PROC EXPORT ;Using S_CurrentData BEGIN +b Call S_SwapIn,in=(S_ActiveWindow:l) ; Call D_SetCursor,in=(#WatchCursor:w) in S_CurTLSelect+2:w,#1:w,S_CurBRSelect+2:w,#1:w in #S_RestoreWidth:l XCall S_TraverseRange bcc fixThings Call D_MemoryError fixThings Call S_Adjust