TabListEditor.st
changeset 1845 d6d62913c2cc
parent 1431 cdcadf6df14d
child 1855 b340a5b9ff78
equal deleted inserted replaced
1844:62f5b971145e 1845:d6d62913c2cc
   125      UIHelpTool openOnClass:TabListEditor    
   125      UIHelpTool openOnClass:TabListEditor    
   126     "
   126     "
   127 
   127 
   128     <resource: #help>
   128     <resource: #help>
   129 
   129 
   130     ^super helpSpec addPairsFrom:#(
   130     ^ super helpSpec addPairsFrom:#(
   131 
   131 
   132 #addTabItem
   132 #addTabItem
   133 'Adds a new tab item.'
   133 'Adds a new tab item.'
   134 
   134 
   135 #autoHideScrollBars
   135 #autoHideScrollBars
   136 'ScrollBars should be made invisible dynamically, if there is nothing to scroll.'
   136 'ScrollBars should be made invisible dynamically, if there is nothing to scroll.'
   137 
   137 
       
   138 #basicTab
       
   139 'Define the basic attributes.'
       
   140 
   138 #canSelect
   141 #canSelect
   139 'Turns on/off whether the tab item is selectable.'
   142 'Turns on/off whether the tab item is selectable.'
   140 
   143 
       
   144 #canvasTab
       
   145 'Define an application, which is started if the tab is pressed the first time.'
       
   146 
       
   147 #color
       
   148 'Defines the foreground color of the label. The default color derives from the style sheet.'
       
   149 
   141 #createNewBuilder
   150 #createNewBuilder
   142 'Create a new builder for the application; the application use its own aspects.'
   151 'Create a new builder for the application; the application use its own aspects.'
   143 
   152 
   144 #color
   153 #detailTab
   145 'Defines the foreground color of the label. The default color derives from the style sheet.'
   154 'Define the optional/specific attributes.'
       
   155 
       
   156 #detailsAccelerator
       
   157 'Key to be pressed to select the tab item from the keyboard (accelerator key).'
       
   158 
       
   159 #detailsAccessCharaterPosition
       
   160 'Index of the access character position of the textual label (optional).'
       
   161 
       
   162 #detailsArgument
       
   163 'An optional argument stored with the tab item.'
   146 
   164 
   147 #fileCreateAspectMethod
   165 #fileCreateAspectMethod
   148 'Creates the aspect method for the tab list.'
   166 'Creates the aspect method for the tab list.'
   149 
   167 
   150 #fileLoad
   168 #fileLoad
   154 'Creates a new tab list.'
   172 'Creates a new tab list.'
   155 
   173 
   156 #fileSave
   174 #fileSave
   157 'Saves current tab list.'
   175 'Saves current tab list.'
   158 
   176 
       
   177 #horizontalMiniScroller
       
   178 'Use a mini-scroller as horizontal scrollbar.'
       
   179 
   159 #horizontalScroller
   180 #horizontalScroller
   160 'Enable horizontal scrollability.'
   181 'Enable horizontal scrollability.'
   161 
   182 
   162 #horizontalMiniScroller
   183 #label
   163 'Use a mini-scroller as horizontal scrollbar.'
   184 'Label of the tab item.'
       
   185 
       
   186 #labelDerivesFromApplication
       
   187 'If turned on, the label''s string is a selector returning a string or bitmap image, which is used as logo in the tab item.'
   164 
   188 
   165 #majorKey
   189 #majorKey
   166 'Name of the class to be started; if empty, the application itself is used.'
   190 'Name of the class to be started (application if empty); or app-selector returning application instance.'
   167 
   191 
   168 #minorKey
   192 #minorKey
   169 'Message sent to the class which returns the window specification (default: #windowSpec).'
   193 'Message sent to the class which returns the window specification (default: #windowSpec).'
   170 
   194 
       
   195 #testPreview
       
   196 'Turns on/off preview of the tab list.'
       
   197 
       
   198 #verticalMiniScroller
       
   199 'Use a mini-scroller as vertical scrollbar.'
       
   200 
   171 #verticalScroller
   201 #verticalScroller
   172 'Enable vertical scrollability.'
   202 'Enable vertical scrollability.'
   173 
       
   174 #verticalMiniScroller
       
   175 'Use a mini-scroller as vertical scrollbar.'
       
   176 
       
   177 #canvasTab
       
   178 'Define an application, which is started if the tab is pressed the first time.'
       
   179 
       
   180 #basicTab
       
   181 'Define the basic attributes.'
       
   182 
       
   183 #detailTab
       
   184 'Define the optional/specific attributes.'
       
   185 
       
   186 #label
       
   187 'Label of the tab item.'
       
   188 
       
   189 #labelDerivesFromApplication
       
   190 'If turned on, the label''s string is a selector returning a string or bitmap image, which is used as logo in the tab item.'
       
   191 
       
   192 #detailsAccessCharaterPosition
       
   193 'Index of the access character position of the textual label (optional).'
       
   194 
       
   195 #detailsAccelerator
       
   196 'Key to be pressed to select the tab item from the keyboard (accelerator key).'
       
   197 
       
   198 #detailsArgument
       
   199 'An optional argument stored with the tab item.'
       
   200 
       
   201 #testPreview
       
   202 'Turns on/off preview of the tab list.'
       
   203 
   203 
   204 )
   204 )
   205 ! !
   205 ! !
   206 
   206 
   207 !TabListEditor class methodsFor:'image specs'!
   207 !TabListEditor class methodsFor:'image specs'!
   389     "
   389     "
   390 
   390 
   391     <resource: #canvas>
   391     <resource: #canvas>
   392 
   392 
   393     ^ 
   393     ^ 
   394      #(#FullSpec
   394      #(FullSpec
   395         #name: #canvasSpec
   395         name: canvasSpec
   396         #window: 
   396         window: 
   397        #(#WindowSpec
   397        (WindowSpec
   398           #label: 'Canvas'
   398           label: 'Canvas'
   399           #name: 'Canvas'
   399           name: 'Canvas'
   400           #min: #(#Point 10 10)
   400           min: (Point 10 10)
   401           #max: #(#Point 1280 1024)
   401           max: (Point 1280 1024)
   402           #bounds: #(#Rectangle 803 137 1186 357)
   402           bounds: (Rectangle 0 0 383 220)
   403         )
   403         )
   404         #component: 
   404         component: 
   405        #(#SpecCollection
   405        (SpecCollection
   406           #collection: #(
   406           collection: (
   407            #(#LabelSpec
   407            (LabelSpec
   408               #label: 'Class Name:'
   408               label: 'Class Name / Major Key:'
   409               #name: 'majorKeyLabel'
   409               name: 'majorKeyLabel'
   410               #layout: #(#AlignmentOrigin 98 0 26 0 1 0.5)
   410               layout: (AlignmentOrigin 160 0 26 0 1 0.5)
   411               #resizeForLabel: true
   411               activeHelpKey: majorKey
   412             )
   412               translateLabel: true
   413            #(#InputFieldSpec
   413               resizeForLabel: true
   414               #name: 'majorKeyField'
   414             )
   415               #layout: #(#LayoutFrame 100 0 15 0 -5 1.0 37 0)
   415            (InputFieldSpec
   416               #activeHelpKey: #majorKey
   416               name: 'majorKeyField'
   417               #tabable: true
   417               layout: (LayoutFrame 161 0 15 0 -5 1.0 37 0)
   418               #model: #majorKey
   418               activeHelpKey: majorKey
   419               #group: #inputGroup
   419               tabable: true
   420               #type: #symbolOrNil
   420               model: majorKey
   421               #immediateAccept: true
   421               group: inputGroup
   422               #acceptOnReturn: false
   422               type: symbolOrNil
   423               #acceptOnTab: false
   423               immediateAccept: true
   424               #acceptOnLostFocus: false
   424               acceptOnReturn: false
   425               #modifiedChannel: #modifiedChannel
   425               acceptOnTab: false
   426               #acceptOnPointerLeave: false
   426               acceptOnLostFocus: false
   427             )
   427               modifiedChannel: modifiedChannel
   428            #(#LabelSpec
   428               acceptOnPointerLeave: false
   429               #label: 'Spec. Selector:'
   429             )
   430               #name: 'minorKeyLabel'
   430            (LabelSpec
   431               #layout: #(#AlignmentOrigin 98 0 55 0 1 0.5)
   431               label: 'Selector / Minor Key:'
   432               #resizeForLabel: true
   432               name: 'minorKeyLabel'
   433             )
   433               layout: (AlignmentOrigin 160 0 55 0 1 0.5)
   434            #(#InputFieldSpec
   434               translateLabel: true
   435               #name: 'minorKeyField'
   435               resizeForLabel: true
   436               #layout: #(#LayoutFrame 100 0 44 0 -5 1.0 66 0)
   436             )
   437               #activeHelpKey: #minorKey
   437            (InputFieldSpec
   438               #tabable: true
   438               name: 'minorKeyField'
   439               #model: #minorKey
   439               layout: (LayoutFrame 161 0 44 0 -5 1.0 66 0)
   440               #group: #inputGroup
   440               activeHelpKey: majorKey
   441               #type: #symbolOrNil
   441               tabable: true
   442               #immediateAccept: true
   442               model: minorKey
   443               #acceptOnReturn: false
   443               group: inputGroup
   444               #acceptOnTab: false
   444               type: symbolOrNil
   445               #acceptOnLostFocus: false
   445               immediateAccept: true
   446               #modifiedChannel: #modifiedChannel
   446               acceptOnReturn: false
   447               #acceptOnPointerLeave: false
   447               acceptOnTab: false
   448             )
   448               acceptOnLostFocus: false
   449            #(#FramedBoxSpec
   449               modifiedChannel: modifiedChannel
   450               #label: 'Scroll Bars'
   450               acceptOnPointerLeave: false
   451               #name: 'FramedBox'
   451             )
   452               #layout: #(#LayoutFrame 0 0.0 119 0.0 0 1.0 214 0)
   452            (FramedBoxSpec
   453               #labelPosition: #topLeft
   453               label: 'Scroll Bars'
   454               #component: 
   454               name: 'FramedBox'
   455              #(#SpecCollection
   455               layout: (LayoutFrame 0 0.0 119 0.0 0 1.0 214 0)
   456                 #collection: #(
   456               labelPosition: topLeft
   457                  #(#HorizontalPanelViewSpec
   457               component: 
   458                     #name: 'HorizontalPanel1'
   458              (SpecCollection
   459                     #layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
   459                 collection: (
   460                     #horizontalLayout: #fitSpace
   460                  (HorizontalPanelViewSpec
   461                     #verticalLayout: #fitSpace
   461                     name: 'HorizontalPanel1'
   462                     #horizontalSpace: 3
   462                     layout: (LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
   463                     #verticalSpace: 3
   463                     horizontalLayout: fitSpace
   464                     #component: 
   464                     verticalLayout: fitSpace
   465                    #(#SpecCollection
   465                     horizontalSpace: 3
   466                       #collection: #(
   466                     verticalSpace: 3
   467                        #(#ViewSpec
   467                     component: 
   468                           #name: 'Box1'
   468                    (SpecCollection
   469                           #component: 
   469                       collection: (
   470                          #(#SpecCollection
   470                        (ViewSpec
   471                             #collection: #(
   471                           name: 'Box1'
   472                              #(#CheckBoxSpec
   472                           component: 
   473                                 #label: 'Vertical'
   473                          (SpecCollection
   474                                 #name: 'verticalScrollBarCheckBox'
   474                             collection: (
   475                                 #layout: #(#LayoutFrame 0 0.0 3 0 0 1.0 27 0)
   475                              (CheckBoxSpec
   476                                 #activeHelpKey: #verticalScroller
   476                                 label: 'Vertical'
   477                                 #tabable: true
   477                                 name: 'verticalScrollBarCheckBox'
   478                                 #model: #hasVerticalScrollBar
   478                                 layout: (LayoutFrame 0 0.0 3 0 0 1.0 27 0)
       
   479                                 activeHelpKey: verticalScroller
       
   480                                 tabable: true
       
   481                                 model: hasVerticalScrollBar
       
   482                                 translateLabel: true
   479                               )
   483                               )
   480                              #(#CheckBoxSpec
   484                              (CheckBoxSpec
   481                                 #label: 'Mini'
   485                                 label: 'Mini'
   482                                 #name: 'miniScrollerVerticalCheckBox'
   486                                 name: 'miniScrollerVerticalCheckBox'
   483                                 #layout: #(#LayoutFrame 0 0.0 32 0 0 1.0 56 0)
   487                                 layout: (LayoutFrame 0 0.0 32 0 0 1.0 56 0)
   484                                 #activeHelpKey: #verticalMiniScroller
   488                                 activeHelpKey: verticalMiniScroller
   485                                 #tabable: true
   489                                 tabable: true
   486                                 #model: #miniScrollerVertical
   490                                 model: miniScrollerVertical
       
   491                                 translateLabel: true
   487                               )
   492                               )
   488                              )
   493                              )
   489                            
   494                            
   490                           )
   495                           )
   491                           #useDefaultExtent: true
   496                           useDefaultExtent: true
   492                         )
   497                         )
   493                        #(#ViewSpec
   498                        (ViewSpec
   494                           #name: 'Box2'
   499                           name: 'Box2'
   495                           #component: 
   500                           component: 
   496                          #(#SpecCollection
   501                          (SpecCollection
   497                             #collection: #(
   502                             collection: (
   498                              #(#CheckBoxSpec
   503                              (CheckBoxSpec
   499                                 #label: 'Horizontal'
   504                                 label: 'Horizontal'
   500                                 #name: 'horizontalScrollBarCheckBox'
   505                                 name: 'horizontalScrollBarCheckBox'
   501                                 #layout: #(#LayoutFrame 0 0.0 3 0 0 1.0 27 0)
   506                                 layout: (LayoutFrame 0 0.0 3 0 0 1.0 27 0)
   502                                 #activeHelpKey: #horizontalScroller
   507                                 activeHelpKey: horizontalScroller
   503                                 #tabable: true
   508                                 tabable: true
   504                                 #model: #hasHorizontalScrollBar
   509                                 model: hasHorizontalScrollBar
       
   510                                 translateLabel: true
   505                               )
   511                               )
   506                              #(#CheckBoxSpec
   512                              (CheckBoxSpec
   507                                 #label: 'Mini'
   513                                 label: 'Mini'
   508                                 #name: 'miniScrollerHorizontalCheckBox'
   514                                 name: 'miniScrollerHorizontalCheckBox'
   509                                 #layout: #(#LayoutFrame 0 0.0 32 0 0 1.0 56 0)
   515                                 layout: (LayoutFrame 0 0.0 32 0 0 1.0 56 0)
   510                                 #activeHelpKey: #horizontalMiniScroller
   516                                 activeHelpKey: horizontalMiniScroller
   511                                 #tabable: true
   517                                 tabable: true
   512                                 #model: #miniScrollerHorizontal
   518                                 model: miniScrollerHorizontal
       
   519                                 translateLabel: true
   513                               )
   520                               )
   514                              )
   521                              )
   515                            
   522                            
   516                           )
   523                           )
   517                           #extent: #(#Point 114 59)
   524                           extent: (Point 113 57)
   518                         )
   525                         )
   519                        #(#ViewSpec
   526                        (ViewSpec
   520                           #name: 'Box3'
   527                           name: 'Box3'
   521                           #component: 
   528                           component: 
   522                          #(#SpecCollection
   529                          (SpecCollection
   523                             #collection: #(
   530                             collection: (
   524                              #(#LabelSpec
   531                              (LabelSpec
   525                                 #label: 'Auto Hide:'
   532                                 label: 'Auto Hide:'
   526                                 #name: 'Label1'
   533                                 name: 'Label1'
   527                                 #layout: #(#LayoutFrame 0 0.0 6 0 0 1.0 23 0)
   534                                 layout: (LayoutFrame 0 0.0 6 0 0 1.0 23 0)
   528                                 #translateLabel: true
   535                                 translateLabel: true
   529                                 #resizeForLabel: true
   536                                 resizeForLabel: true
   530                                 #adjust: #left
   537                                 adjust: left
   531                               )
   538                               )
   532                              #(#PopUpListSpec
   539                              (PopUpListSpec
   533                                 #label: 'Default'
   540                                 label: 'Default'
   534                                 #name: 'PopUpList1'
   541                                 name: 'PopUpList1'
   535                                 #layout: #(#LayoutFrame 0 0.0 32 0 0 1.0 54 0)
   542                                 layout: (LayoutFrame 0 0.0 32 0 0 1.0 54 0)
   536                                 #tabable: true
   543                                 activeHelpKey: autoHideScrollBars
   537                                 #activeHelpKey: #autoHideScrollBars
   544                                 tabable: true
   538                                 #model: #autoHideScrollBars
   545                                 model: autoHideScrollBars
   539                                 #menu: 
   546                                 menu: 
   540                                #(#Default
   547                                (Default
   541                                   #On #Off
   548                                   On Off
   542                                 )
   549                                 )
   543                                 #useIndex: true
   550                                 useIndex: true
   544                                 #showHandle: true
       
   545                               )
   551                               )
   546                              )
   552                              )
   547                            
   553                            
   548                           )
   554                           )
   549                           #extent: #(#Point 114 59)
   555                           extent: (Point 113 57)
   550                         )
   556                         )
   551                        )
   557                        )
   552                      
   558                      
   553                     )
   559                     )
   554                   )
   560                   )
   555                  )
   561                  )
   556                
   562                
   557               )
   563               )
   558             )
   564             )
   559            #(#CheckBoxSpec
   565            (CheckBoxSpec
   560               #label: 'Create New Builder'
   566               label: 'Create New Builder'
   561               #name: 'createNewBuilder'
   567               name: 'createNewBuilder'
   562               #layout: #(#Point 97 75)
   568               layout: (Point 161 75)
   563               #model: #createNewBuilder
   569               activeHelpKey: createNewBuilder
   564               #activeHelpKey: #createNewBuilder
   570               model: createNewBuilder
       
   571               translateLabel: true
   565             )
   572             )
   566            )
   573            )
   567          
   574          
   568         )
   575         )
   569       )
   576       )