home *** CD-ROM | disk | FTP | other *** search
/ Enigma Amiga Life 109 / EnigmaAmiga109CD.iso / software / manutenzione / smartinfo / sfs / objcreating.asm < prev    next >
Assembly Source File  |  1999-11-30  |  8KB  |  305 lines

  1. *-----------------------------------------------*
  2. *    @CreateObjects                *
  3. *-----------------------------------------------*
  4.  
  5. CreateObjects:
  6.     bsr    Tee_CustomClass
  7.     beq.b    .x
  8.  
  9.     bsr    CreateMainWindow
  10.     bsr    CreatePrefsWindow
  11.  
  12.     bsr    CreateMenus
  13.  
  14.     CREATEOBJECT    MUIC_Application,ApplicationTags
  15.     move.l    d0,App(a4)
  16.     beq.b    .x
  17.  
  18.     TEE_METODI    WI_Main-t(a5),WI_Main_Metodit
  19.     TEE_METODI    WI_PrefsWindow-t(a5),WI_Prefs_Metodit
  20.  
  21.     TEE_METODI    LV_LaiteLista-t(a5),LV_LaiteLista_Metodit
  22.  
  23. ;    TEE_METODI    BT_Suorita_SFScheck-t(a5),BT_Suorita_SFScheck_Metodit
  24.     TEE_METODI    BT_Eheytä_SFS-t(a5),BT_Eheytä_SFS_Metodit
  25.  
  26.     TEE_METODI    BT_Prefs_Save-t(a5),BT_Prefs_Save_Metodit
  27.     TEE_METODI    BT_Prefs_Use-t(a5),BT_Prefs_Use_Metodit
  28.     TEE_METODI    BT_Prefs_Cancel-t(a5),BT_Prefs_Cancel_Metodit
  29.  
  30.     bsr    AdjustConfig
  31.  
  32.     moveq    #-1,d0
  33. .x    rts
  34.  
  35. *-----------------------------------------------*
  36. *    @LueKynät                *
  37. *-----------------------------------------------*
  38.  
  39. LueKynät:
  40.     move.l    intui(a4),a6
  41.     move.l    PP_UsedBlock-t(a5),a0
  42.     lea    PenSpec1(a4),a1
  43.     bsr    .get_pen_spec
  44.     move.l    PP_RemovedBlock-t(a5),a0
  45.     lea    PenSpec2(a4),a1
  46.     bsr    .get_pen_spec
  47.     move.l    PP_NewBlock-t(a5),a0
  48.     lea    PenSpec3(a4),a1
  49.  
  50. .get_pen_spec:
  51.     move.l    #MUIA_Pendisplay_Spec,d0
  52.     jmp    _LVOGetAttr(a6)
  53.  
  54. *-----------------------------------------------*
  55. *       @AdjustConfig                *
  56. *-----------------------------------------------*
  57.  
  58. AdjustConfig:
  59.     tst.b    bfConfigExists(a4)
  60.     bne.b    .ohita
  61.  
  62.     TEE_METODI    PP_UsedBlock-t(a5),PP_UsedBlock_Metodit
  63.     TEE_METODI    PP_RemovedBlock-t(a5),PP_RemovedBlock_Metodit
  64.     TEE_METODI    PP_NewBlock-t(a5),PP_NewBlock_Metodit
  65.     bra    LueKynät
  66.  
  67. .ohita    move.l    intui(a4),a6
  68.     move.l    PP_UsedBlock-t(a5),a0
  69.     SET2    #MUIA_Pendisplay_Spec,PenSpec1(a4)
  70.     move.l    PP_RemovedBlock-t(a5),a0
  71.     SET2    #MUIA_Pendisplay_Spec,PenSpec2(a4)
  72.     move.l    PP_NewBlock-t(a5),a0
  73.     SET2    #MUIA_Pendisplay_Spec,PenSpec3(a4)
  74.     bra    UseConfig2
  75.  
  76. *-----------------------------------------------*
  77. *    @CreateMenus                *
  78. *-----------------------------------------------*
  79.  
  80. CreateMenus:
  81.     move.l    muimaster(a4),a6
  82.     move.l    sp,d1
  83.     clr.l    -(sp)
  84.     move.l    #MUIO_MenustripNM_CommandKeyCheck,-(sp)
  85.     lea    MenuTags-t(a5),a0
  86.     move.l    a0,-(sp)
  87.     move.l    sp,a0
  88.     move.l    d1,-(sp)
  89.     move.l    #MUIO_MenustripNM,d0
  90.     jsr    _LVOMUI_MakeObjectA(a6)
  91.     move.l    d0,MN_Menustrip-t(a5)
  92.     move.l    (sp)+,sp
  93.     rts
  94.  
  95. *-----------------------------------------------*
  96. *    @CreateMainWindow            *
  97. *-----------------------------------------------*
  98.  
  99. CreateMainWindow:
  100.     move.l    muimaster(a4),a6
  101.  
  102.         CREATEOBJECT    MUIC_NList,DeviceListTags
  103.         move.l    d0,LV_LaiteLista_obj-t(a5)
  104.  
  105.         CREATEOBJECT    MUIC_NListview,DeviceListviewTags
  106.         move.l    d0,LV_LaiteLista-t(a5)
  107.         move.l    d0,MainWindowDefaultObject-t(a5)
  108.  
  109. ;        TeeObj    MUIO_Button,MSG_PERFORM_SFSCHECK_GAD,BT_Suorita_SFScheck
  110.         TeeObj    MUIO_Button,MSG_DEFRAGMENT_GAD,BT_Eheytä_SFS
  111.  
  112.     ;    ikkunan toinen puolisko
  113.  
  114.         TeeLabel    MSG_START_OFFSET,NO_FLAGS,TX_StartOffset_obj
  115.         TeeLabel    MSG_END_OFFSET,NO_FLAGS,TX_EndOffset_obj
  116.         TeeLabel    MSG_DEVICE_API,NO_FLAGS,TX_DeviceAPI_obj
  117.         TeeLabel    MSG_BYTES_PER_BLOCK,NO_FLAGS,TX_BytesPerBlock_obj
  118.         TeeLabel    MSG_TOTAL_BLOCKS,NO_FLAGS,TX_TotalBlocks_obj
  119.         TeeLabel    MSG_CACHE_ACCESSES,NO_FLAGS,TX_CacheAccesses_obj
  120.         TeeLabel    MSG_CACHE_MISSES,NO_FLAGS,TX_CacheMisses_obj
  121.         TeeLabel    MSG_READ_AHEAD_CACHE,NO_FLAGS,TX_ReadAheadCache_obj
  122.         TeeLabel    MSG_DOS_BUFFERS,NO_FLAGS,TX_DOS_Buffers_obj
  123.         TeeLabel    MSG_SFS_SETTINGS,NO_FLAGS,TX_SFS_Settings_obj
  124.  
  125.         CREATEOBJECT    MUIC_Text,TextTags
  126.         move.l    d0,TX_StartOffset-t(a5)
  127.         CREATEOBJECT    MUIC_Text,TextTags
  128.         move.l    d0,TX_EndOffset-t(a5)
  129.         CREATEOBJECT    MUIC_Text,TextTags
  130.         move.l    d0,TX_DeviceAPI-t(a5)
  131.         CREATEOBJECT    MUIC_Text,TextTags
  132.         move.l    d0,TX_BytesPerBlock-t(a5)
  133.         CREATEOBJECT    MUIC_Text,TextTags
  134.         move.l    d0,TX_TotalBlocks-t(a5)
  135.         CREATEOBJECT    MUIC_Text,TextTags
  136.         move.l    d0,TX_CacheAccesses-t(a5)
  137.         CREATEOBJECT    MUIC_Text,TextTags
  138.         move.l    d0,TX_CacheMisses-t(a5)
  139.         CREATEOBJECT    MUIC_Text,TextTags
  140.         move.l    d0,TX_ReadAheadCache-t(a5)
  141.         CREATEOBJECT    MUIC_Text,TextTags
  142.         move.l    d0,TX_DOS_Buffers-t(a5)
  143.         CREATEOBJECT    MUIC_Text,TextTags
  144.         move.l    d0,TX_SFS_Settings-t(a5)
  145.  
  146.         CREATEOBJECT    MUIC_Text,TextTags
  147.         move.l    d0,TX_GeneralInfo-t(a5)
  148.  
  149.     CREATEOBJECT    MUIC_Group,MainWindowGroup_B
  150.     move.l    d0,MainWindowChild_B-t(a5)
  151.  
  152.     CREATEOBJECT    MUIC_Group,MainWindowGroup_A
  153.     move.l    d0,MainWindowChild_A-t(a5)
  154.  
  155.     CREATEOBJECT    MUIC_Group,MainWindowGroup_C
  156.     move.l    d0,MainWindowChild_C-t(a5)
  157.  
  158.     CREATEOBJECT    MUIC_Group,MainWindowRootGroup
  159.     move.l    d0,MainWinRootGroup-t(a5)
  160.  
  161.     CREATEOBJECT    MUIC_Window,MainWinTags
  162.     move.l    d0,WI_Main-t(a5)
  163.     move.l    d0,tgMainWindow0-t(a5)
  164.     rts
  165.  
  166. *-------------------------------------------------------*
  167. *    @CreateDefragWindow                *
  168. *-------------------------------------------------------*
  169.  
  170. CreateDefragWindow:
  171.     move.l    intui(a4),a6
  172.  
  173.     tst.l    WI_DefragWindow(a4)
  174.     bne    .valmis
  175.  
  176.         move.l    Defrag_mcc(a4),a0
  177.         move.l    mcc_Class(a0),a0
  178.         suba.l    a1,a1
  179.         lea    MapTags-t(a5),a2
  180.         jsr    _LVONewObjectA(a6)
  181.         move.l    d0,MP_Kartta-t(a5)
  182.  
  183.     GETSTR    MSG_DEFRAGMENT_WIN
  184.     move.l    d0,DefragWindowTitle-t(a5)
  185.  
  186.     move.l    muimaster(a4),a6
  187.  
  188.         TeeObj    MUIO_Button,MSG_PAUSE_DEFRAGMENT_GAD,BT_Pause_Defragment
  189.         TeeObj    MUIO_Button,MSG_CONTINUE_DEFRAGMENT_GAD,BT_Continue_Defragment
  190.  
  191.     CREATEOBJECT    MUIC_Group,DefragWindowGroup_A
  192.     move.l    d0,DefragWindowChild_A-t(a5)
  193.  
  194.         TeeObj    MUIO_Button,MSG_START_DEFRAGMENT_GAD,BT_Start_Defragment
  195.         TeeObj    MUIO_Button,MSG_ABORT_DEFRAGMENT_GAD,BT_Abort_Defragment
  196.  
  197.         CREATEOBJECT    MUIC_Text,TimeTextTags
  198.         move.l    d0,TX_Defrag_Time-t(a5)
  199.  
  200.         CREATEOBJECT    MUIC_Rectangle,NO_TAGS
  201.         move.l    d0,RE_Rectangle-t(a5)
  202.  
  203.     CREATEOBJECT    MUIC_Group,DefragWindowGroup_B
  204.     move.l    d0,DefragWindowChild_B-t(a5)
  205.  
  206.     CREATEOBJECT    MUIC_Group,DefragWindowGroup_C
  207.     move.l    d0,DefragWindowChild_C-t(a5)
  208.  
  209.     CREATEOBJECT    MUIC_Group,DefragWindowGroup_D
  210.     move.l    d0,DefragWindowChild_D-t(a5)
  211.  
  212.     CREATEOBJECT    MUIC_Group,DefragWindowGroup
  213.     move.l    d0,DefragWindowChild-t(a5)
  214.  
  215.     CREATEOBJECT    MUIC_Window,DefragWindowTags
  216.     move.l    d0,WI_DefragWindow(a4)
  217.     beq.b    .x
  218.  
  219.     move.l    d0,UusiIkkuna-t(a5)
  220.  
  221.     TEE_METODI    App(a4),LisääIkkunaMetodit
  222.     TEE_METODI    WI_DefragWindow(a4),WI_Defrag_Metodit
  223.  
  224.     TEE_METODI    BT_Start_Defragment-t(a5),BT_Start_Defrag_Metodit
  225.     TEE_METODI    BT_Pause_Defragment-t(a5),BT_Switch_Defrag_Metodit
  226.     TEE_METODI    BT_Continue_Defragment-t(a5),BT_Switch_Defrag_Metodit
  227.     TEE_METODI    BT_Abort_Defragment-t(a5),BT_Abort_Defrag_Metodit
  228.  
  229.     moveq    #-1,d0
  230. .x    rts
  231.  
  232. .valmis    move.l    DefragWindowChild-t(a5),a0
  233.     SETI    MUIA_Group_ActivePage,MUIV_Group_ActivePage_First
  234.     moveq    #-1,d0
  235.     rts
  236.  
  237. *-----------------------------------------------*
  238. *    @CreatePrefsWindow            *
  239. *-----------------------------------------------*
  240.  
  241. CreatePrefsWindow:
  242.     GETSTR    MSG_PREFS_WIN
  243.     move.l    d0,PrefsWindowTitle-t(a5)
  244.     GETSTR2    MSG_PREFS_DEFRAG_GUI_TITLE
  245.     move.l    d0,PrefsTitle-t(a5)
  246.     GETSTR2    MSG_PREFS_DEFRAG_OPTIONS_TITLE
  247.     move.l    d0,PrefsOptionsTitle-t(a5)
  248.  
  249.     move.l    muimaster(a4),a6
  250.  
  251.         CREATEOBJECT    MUIC_Poppen,PopUpPenTags
  252.         move.l    d0,PP_UsedBlock-t(a5)
  253.         CREATEOBJECT    MUIC_Poppen,PopUpPenTags
  254.         move.l    d0,PP_RemovedBlock-t(a5)
  255.         CREATEOBJECT    MUIC_Poppen,PopUpPenTags
  256.         move.l    d0,PP_NewBlock-t(a5)
  257.  
  258.         CREATEOBJECT    MUIC_BetterString,AddBuffersStringTags
  259.         move.l    d0,STR_Prefs_AddBuffers-t(a5)
  260.  
  261.         TeeLabel    MSG_USED_BLOCK,NO_FLAGS,PP_UsedBlock_obj
  262.         TeeLabel    MSG_REMOVED_BLOCK,NO_FLAGS,PP_RemovedBlock_obj
  263.         TeeLabel    MSG_NEW_BLOCK,NO_FLAGS,PP_NewBlock_obj
  264.  
  265.         TeeLabel    MSG_PREFS_EMPTY_RECYCLED,MUIO_Label_LeftAligned,CH_Prefs_EmptyRecycled_obj
  266.         TeeLabel    MSG_PREFS_SERIALIZE_DISK,MUIO_Label_LeftAligned,CH_Prefs_Serialize_obj
  267.         TeeLabel    MSG_PREFS_ADDBUFFERS,NO_FLAGS,STR_Prefs_AddBuffers_obj
  268.  
  269.         TeeCheckmark    TRUE,CH_Prefs_EmptyRecycled
  270.         TeeCheckmark    TRUE,CH_Prefs_Serialize
  271.  
  272.         CREATEOBJECT    MUIC_Rectangle,NO_TAGS
  273.         move.l    d0,RE_Prefs1-t(a5)
  274.         CREATEOBJECT    MUIC_Rectangle,HorizBarTags
  275.         move.l    d0,RE_Prefs2-t(a5)
  276.  
  277.         TeeObj    MUIO_Button,MSG_SAVE_PREFS_GAD,BT_Prefs_Save
  278.         TeeObj    MUIO_Button,MSG_USE_PREFS_GAD,BT_Prefs_Use
  279.         TeeObj    MUIO_Button,MSG_CANCEL_PREFS_GAD,BT_Prefs_Cancel
  280.  
  281.     CREATEOBJECT    MUIC_Group,PrefsWindowGroup_A
  282.     move.l    d0,PrefsWindowChild_A-t(a5)
  283.  
  284.     CREATEOBJECT    MUIC_Group,PrefsWindowGroup_B1
  285.     move.l    d0,PrefsWindowChild_B1-t(a5)
  286.  
  287.     CREATEOBJECT    MUIC_Group,PrefsWindowGroup_B2
  288.     move.l    d0,PrefsWindowChild_B2-t(a5)
  289.  
  290.     CREATEOBJECT    MUIC_Group,PrefsWindowGroup_B3
  291.     move.l    d0,PrefsWindowChild_B3-t(a5)
  292.  
  293.     CREATEOBJECT    MUIC_Group,PrefsWindowGroup_B
  294.     move.l    d0,PrefsWindowChild_B-t(a5)
  295.  
  296.     CREATEOBJECT    MUIC_Group,PrefsWindowGroup_C
  297.     move.l    d0,PrefsWindowChild_C-t(a5)
  298.  
  299.     CREATEOBJECT    MUIC_Group,PrefsWindowGroup
  300.     move.l    d0,PrefsWindowChild-t(a5)
  301.  
  302.     CREATEOBJECT    MUIC_Window,PrefsWindowTags
  303.     move.l    d0,WI_PrefsWindow-t(a5)
  304.     rts
  305.