home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 11 Util / 11-Util.zip / fdlg.zip / SET_1024.cls < prev    next >
Text File  |  1996-02-02  |  7KB  |  226 lines

  1. "  ---- Ronald Brill 1995, 1996 ---- "
  2. "  ---- Extended File Dialogs Version 2.1 ---- "
  3.  
  4.  
  5. ENFINController subclass: #ExtendedFileDialogSetupController
  6. instanceVariableNames: '
  7.     modus
  8.     setupCancelButt
  9.     setupFilterLabelEntry
  10.     setupFilterLabelList
  11.     setupFilterMappingDroDoLi
  12.     setupFilterValueEntry
  13.     setupFilterValueList
  14.     setupFontFontSelectionIC
  15.     setupNote
  16.     setupOKButt
  17.     setupOptionsReorderCheck
  18. '
  19. classVariableNames: ''
  20. poolDictionaries: '' !
  21.  
  22.  
  23. !ExtendedFileDialogSetupController class methods!
  24.  
  25.  
  26. initialize
  27.     self createInstanceName: #ExtendedFileDialogSetup.
  28. !"end initialize"
  29.  
  30.  
  31. createInstanceName: name
  32.     |controller|
  33.     controller := self name: name.
  34.     controller setStartCursorsAutomaticallyTo: false.
  35.     controller createItems; initializeBindings.
  36.     controller finishInit.
  37.     ^ controller.
  38. !"end createInstanceName:"
  39.  
  40.  
  41. !"End of ExtendedFileDialogSetupController class methods block"
  42.  
  43. !ExtendedFileDialogSetupController methods!
  44.  
  45.  
  46. createItems
  47.     |cItem temp form controller|
  48.     controller := self.
  49.     form := DialogBox
  50.         name:                controllerName
  51.         title:            #'Extended File Diaolg Setup'
  52.         rect:                {1401 400 1332 1099}
  53.         controller:        controller.
  54.     form setGridTo: false.
  55.     form setSnapTo: true.
  56.     form setXGridResTo: 19.
  57.     form setYGridResTo: 19.
  58.     cItem := controller add: #setupNote
  59.         class:            FormNoteBook
  60.         rect:                {0 19 1299 911}
  61.         options:            {#Return #Tab #Up #Down #Backtab #Left #Right}
  62.         form:                form.
  63.     cItem setMajorTabWidthTo: 330.
  64.     cItem setMajorTabHeightTo: 90.
  65.     cItem setPageButtonWidthTo: 50.
  66.     cItem setPageButtonHeightTo: 50.
  67.     cItem setTabStyleTo: #Square.
  68.     cItem setMajorTabLocationTo: #LeftOrRight.
  69.     cItem setBackPagesLocationTo: #BottomRight.
  70.     cItem setBindingStyleTo: #Spiral.
  71.    cItem setStatusTextLocationTo: #Center.
  72.     cItem setPagesTo: {#'Preview Font' #Filters #Options}.
  73.     cItem := controller add: #setupOKButt
  74.         class:            FormButton
  75.         rect:                {39 889 351 99}
  76.         options:            {#Return #Tab #Up #Down #Backtab #Left #Right}
  77.         form:                form
  78.         text:                '~OK'.
  79.     cItem := controller add: #setupCancelButt
  80.         class:            FormButton
  81.         rect:                {426 889 351 99}
  82.         options:            {#Return #Tab #Up #Down #Backtab #Left #Right}
  83.         form:                form
  84.         text:                '~Cancel'.
  85.     form := Page
  86.         name:                #Options
  87.         rect:                {1459 710 862 696}
  88.         controller:        controller.
  89.     form setGridTo: false.
  90.     form setSnapTo: true.
  91.     form setXGridResTo: 19.
  92.     form setYGridResTo: 19.
  93.     cItem := controller add: #setupOptionsReorderCheck
  94.         class:            FormCheckBox
  95.         rect:                {58 58 738 80}
  96.         options:            {#Return #Tab #Up #Down #Backtab #Left #Right}
  97.         form:                form
  98.         text:                'move last loaded file on top'.
  99.     form setPageStyleTo: {#MajorPage}.
  100.     form := Page
  101.         name:                #Filters
  102.         rect:                {1459 710 862 696}
  103.         controller:        controller.
  104.     form setGridTo: false.
  105.     form setSnapTo: true.
  106.     form setXGridResTo: 19.
  107.     form setYGridResTo: 19.
  108.     cItem := controller add: #setupFilterToBo1
  109.         class:            FormTopicBox
  110.         rect:                {19 522 815 155}
  111.         options:            {#Draw3D}
  112.         form:                form
  113.         text:                ' Map *.cls to '.
  114.     cItem setFormatTo: {#Left #Top}.
  115.     cItem := controller add: #setupFilterMappingDroDoLi
  116.         class:            FormDropList
  117.         rect:                {39 577 777 86}
  118.         options:            {#Return #Tab #Backtab}
  119.         form:                form.
  120.     (cItem formItem) setLineCountTo: 0.
  121.     cItem := controller add: #setupFilterToBo
  122.         class:            FormTopicBox
  123.         rect:                {19 39 815 467}
  124.         options:            {#Draw3D}
  125.         form:                form
  126.         text:                ' Availabe Filters '.
  127.     cItem setFormatTo: {#Left #Top}.
  128.     cItem := controller add: #setupFilterLabelEntry
  129.         class:            FormString
  130.         rect:                {47 105 451 66}
  131.         options:            {#Return #Tab #Up #Down #Backtab}
  132.         form:                form.
  133.     cItem := controller add: #setupFilterValueEntry
  134.         class:            FormString
  135.         rect:                {514 105 296 66}
  136.         options:            {#Return #Tab #Up #Down #Backtab}
  137.         form:                form.
  138.     cItem setMaximumLengthTo: 9.
  139.     cItem := controller add: #setupFilterValueList
  140.         class:            FormSyncList
  141.         rect:                {506 182 310 304}
  142.         options:            {#Return #Tab #Backtab}
  143.         form:                form.
  144.     cItem := controller add: #setupFilterLabelList
  145.         class:            FormSyncList
  146.         rect:                {39 182 464 304}
  147.         options:            {#Return #Tab #Backtab #NoVScroll}
  148.         form:                form.
  149.     form setPageStyleTo: {#MajorPage}.
  150.     temp := {{#setupFilterValueList #setupFilterLabelList}
  151.             #setupFilterMappingDroDoLi #setupFilterLabelEntry
  152.             #setupFilterValueEntry}.
  153.     form addFormItemGroups: temp in: controller.
  154.     form := Page
  155.         name:                #'Preview Font'
  156.         rect:                {1459 710 862 696}
  157.         controller:        controller.
  158.     form setGridTo: false.
  159.     form setSnapTo: true.
  160.     form setXGridResTo: 19.
  161.     form setYGridResTo: 19.
  162.     cItem := controller add: #setupFontFontSelectionIC
  163.         class: ICFontSelection
  164.         position: 20 @ 18
  165.         form:        form.
  166.     form setPageStyleTo: {#MajorPage}.
  167.     temp := {#'setupFontFontSelectionIC.fontFaceDroDoLi'
  168.             #'setupFontFontSelectionIC.fontSizeDroDoLi'
  169.             #'setupFontFontSelectionIC.fontAttributesCheckLi'}.
  170.     form addFormItemGroups: temp in: controller.
  171.     controller synchronizeList: {#setupFilterLabelList #setupFilterValueList}.
  172.     controller setMainFormTo: controllerName.
  173. !"end createItems"
  174.  
  175.  
  176. initializeBindings
  177.     |temp|
  178.     temp := IdentityDictionary newEntries: 2.
  179.     temp at: #setupFilterLabelEntry put: (#enterOnFilterEntry).
  180.     temp at: #setupFilterValueEntry put: (#enterOnFilterEntry).
  181.     (formDict at: #Filters) addReturnActions: temp.
  182.     temp := AcceleratorTable new.
  183.     temp at: #AltC put: #setupCancel.
  184.     temp at: #Altc put: #setupCancel.
  185.     temp at: #Alto put: #setupOk.
  186.     temp at: #AltO put: #setupOk.
  187.     temp at: #Delete put: #deleteOnFilterEntry.
  188.     (formDict at: #Filters) acceleratorTableAddAll: temp.
  189.     temp := AcceleratorTable new.
  190.     temp at: #AltC put: #setupCancel.
  191.     temp at: #Altc put: #setupCancel.
  192.     temp at: #AltO put: #setupOk.
  193.     temp at: #Alto put: #setupOk.
  194.     (formDict at: #'Preview Font') acceleratorTableAddAll: temp.
  195.     temp := AcceleratorTable new.
  196.     temp at: #AltC put: #setupCancel.
  197.     temp at: #Altc put: #setupCancel.
  198.     temp at: #AltO put: #setupOk.
  199.     temp at: #Alto put: #setupOk.
  200.     (formDict at: #Options) acceleratorTableAddAll: temp.
  201.     temp := self actionDict.
  202.     temp at: #setupCancelButt put: #setupCancel.
  203.     temp at: #setupOKButt put: #setupOk.
  204.     temp at: #setupFilterLabelList put: #selectFilter.
  205. !"end initializeBindings"
  206.  
  207.  
  208. finishInit
  209. | form |
  210.     form := formDict at: #'Preview Font'.
  211.    form setBackgroundTo: #DialogBackgroundColor.
  212.    form setPageStyleTo: {#MajorPage #StatusTextOn}.
  213.    form setStatusTextTo: 'Please select the preview font.'.
  214.     form := formDict at: #Filters.
  215.    form setBackgroundTo: #DialogBackgroundColor.
  216.    form setPageStyleTo: {#MajorPage #StatusTextOn}.
  217.    form setStatusTextTo: 'Create/Edit available filters.'.
  218.     form := formDict at: #Options.
  219.    form setBackgroundTo: #DialogBackgroundColor.
  220.    form setPageStyleTo: {#MajorPage #StatusTextOn}.
  221.    form setStatusTextTo: 'Please select an option.'.
  222. !"end finishInit"
  223.  
  224.  
  225. !"End of ExtendedFileDialogSetupController methods block"
  226.