antoine-source/appleworksgs/PL/Src/POPTIONS.S

1 line
8.1 KiB
ArmAsm
Raw Normal View History

2023-03-04 02:45:20 +00:00
load 'macros.dump' include 'driver.equ' ;----------------------------------------------- ; ; Imported addresses ; ;----------------------------------------------- IMPORT D_AlertBox IMPORT D_CloseDialog IMPORT D_DigitsOnly IMPORT D_GetNewModalDialog IMPORT P_BuildUndo IMPORT P_ChangePage IMPORT P_ContentRect IMPORT P_CurrentWin IMPORT P_DblPage IMPORT P_DrawContent IMPORT P_Entry IMPORT P_FirstPOff IMPORT P_FixSpecMenu IMPORT P_Go2PDlog IMPORT P_GrewDoc IMPORT P_HorizGuides IMPORT P_InitPage IMPORT P_KillPage IMPORT P_LoadPage IMPORT P_LockGuides IMPORT P_MagGuides IMPORT P_MergeGuides IMPORT P_ObjList IMPORT P_PIconRect IMPORT P_PNumDlog IMPORT P_Page IMPORT P_PageCount IMPORT P_PageIcons IMPORT P_PageMode IMPORT P_PageStart IMPORT P_PagesPN IMPORT P_PortRect IMPORT P_PrintChanged IMPORT P_SavePage IMPORT P_StoreV IMPORT P_UseTemplate IMPORT P_V IMPORT P_VertGuides IMPORT P_VisGuides IMPORT P_VisPalette IMPORT P_VisRuler IMPORT D_SetCursor IMPORT T_Deactivate IMPORT D_UseStdColors IMPORT P_KillLMasterStr ; poptions.s include 'pl.equ' ;--------------------------------------------------------------------------- ; ; P_ChgView ; P_ChgView PROC EXPORT ;Using P_AttrData ;Using P_DATA ;Using P_ObjData ;Using T_Data begin +b jsl P_Entry call D_SetCursor,in=(#WatchCursor:w) lda P_PageMode beq GoFull stz P_PageMode movelong P_StoreV,P_V bra Done GoFull inc P_PageMode movelong P_V,P_StoreV stzl P_V call T_Deactivate,in=(#0:w,#0:w) Done call P_FixSpecMenu call P_PrintChanged,in=(P_CurrentWin:l) return ENDP ;--------------------------------------------------------------------------- ; ; P_ChgTemplate ; ; P_ChgTemplate PROC EXPORT ;Using P_AttrData ;Using P_Data begin +b jsl P_Entry Not P_UseTemplate jsl P_FixSpecMenu call P_MergeGuides tool _EraseRect,in=(#P_ContentRect:l) call P_DrawContent,in=(#P_ContentRect:l,#0:w) return ENDP ;--------------------------------------------------------------------------- ; ; P_ChgTmplCount () ; P_ChgTmplCount PROC EXPORT ;Using P_AttrData ;Using P_Data local oldpage:w begin +b jsl P_Entry moveword P_Page,oldpage call P_SavePage,in=(a:w) lda P_DblPage beq GoDbl call P_LoadPage,in=(#0:w) IsNil P_VertGuides bne DoAlert IsNil P_HorizGuides bne DoAlert IsNil P_ObjList beq GoSingle DoAlert jsl D_UseStdColors call D_AlertBox,in=(#2:w,#P_KillLMasterStr:l),out=(a:w) cmp #Cancel jeq exit GoSingle call P_BuildUndo,in=(#P_NoUndo:w) lda oldpage bne DoKill call T_Deactivate,in=(#0:w,#0:w) DoKill call P_KillPage,in=(#0:w,#0:w) call P_InitPage,in=(#0:w) stz P_DblPage lda oldpage bne done inc oldpage bra done GoDbl inc P_DblPage done call P_LoadPage,in=(oldpage:w) jsl P_FixSpecMenu call P_GrewDoc,in=(P_CurrentWin:l) tool _EraseRect,in=(#P_ContentRect:l) call P_DrawContent,in=(#P_ContentRect:l,#0:w) bra quit exit call P_LoadPage,in=(oldpage:w) quit return ENDP ;--------------------------------------------------------------------------- ; ; P_ChgGuideVis ; P_ChgGuideVis PROC EXPORT ;Using P_AttrData ;Using P_Data begin +b jsl P_Entry lda P_VisGuides beq MakeVis stz P_VisGuides bra exit MakeVis inc P_VisGuides exit call P_FixSpecMenu tool _EraseRect,in=(#P_ContentRect:l) tool _InvalRect,in=(#P_ContentRect:l) ; generate an D_Update return ENDP ;--------------------------------------------------------------------------- ; ; P_ChgGuideLock ; P_ChgGuideLock PROC EXPORT ;Using P_AttrData ;Using P_Data begin +b lda P_LockGuides beq Lockit stz P_LockGuides bra exit Lockit inc P_LockGuides exit call P_FixSpecMenu return ENDP ;--------------------------------------------------------------------------- ; ; P_ChgGuideMag ; P_ChgGuideMag PROC EXPORT ;Using P_AttrData ;Using P_Data begin +b lda P_MagGuides beq MakeMag stz P_MagGuides bra exit MakeMag inc P_MagGuides exit call P_FixSpecMenu retu