ToolApplicationModel.st
author tz
Fri, 23 Jan 1998 18:48:01 +0100
changeset 769 0fdaa6ecea6a
parent 768 5178394ec8f6
child 772 6164c303afde
permissions -rw-r--r--
commit buttons tabable

"
 COPYRIGHT (c) 1997 by eXept Software AG / Thomas Zwick
              All Rights Reserved

 This software is furnished under a license and may be used
 only in accordance with the terms of that license and with the
 inclusion of the above copyright notice. This software may not
 be provided or otherwise made available to, or used by, any
 other person. No title to or ownership of the software is
 hereby transferred.
"



ApplicationModel subclass:#ToolApplicationModel
	instanceVariableNames:'activeHelp timeBlock'
	classVariableNames:''
	poolDictionaries:''
	category:'Interface-Advanced-Tools'
!

ToolApplicationModel class instanceVariableNames:'history clipboard'

"
 The following class instance variables are inherited by this class:

	ApplicationModel - ClassResources
	Model - 
	Object - 
"
!

!ToolApplicationModel class methodsFor:'documentation'!

copyright
"
 COPYRIGHT (c) 1997 by eXept Software AG / Thomas Zwick
              All Rights Reserved

 This software is furnished under a license and may be used
 only in accordance with the terms of that license and with the
 inclusion of the above copyright notice. This software may not
 be provided or otherwise made available to, or used by, any
 other person. No title to or ownership of the software is
 hereby transferred.
"


!

documentation
"
    Standard framework for tools; provides hooks for history management,
    about menu, help menu etc.
    See concrete subclasses for examples.

    [author:]
        Thomas Zwick
"
!

history
    "Created: / 10.1.1998 / 11:01:21 / tz"
! !

!ToolApplicationModel class methodsFor:'accessing'!

author

    ^((((self class withAllSuperclasses detect: [:metacls| metacls implements:#documentation]))
        compiledMethodAt: #documentation) source readStream upToAll: '[author:]'; nextLine; nextLine) trimBlanks
  
!

label

    |label|
    label := ''.
    self name do:
    [:c|
        c isUppercase ifTrue: [label := label, $ ].
        label := label, c
    ].
    ^label trimBlanks
! !

!ToolApplicationModel class methodsFor:'clipboard'!

clipboard

    ^clipboard
!

clipboard: anEditObject

    clipboard := anEditObject
! !

!ToolApplicationModel class methodsFor:'help specs'!

helpSpec
    "return a dictionary filled with helpKey -> helptext associations.
     These are used by the activeHelp tool."

    "
    UIHelpTool openOnClass:ToolApplicationModel    
    "

  ^ super helpSpec addPairsFrom:#(

#aboutSTX
'Opens an InfoBox about running ST/X.'

#aboutThisAppliaction
'Opens an InfoBox about release and author of current application.'

#fileExit
'Exits current application.'

#helpClassDocumentation
'Opens a HTML-browser with a class documentation for current application.'

#helpProgrammersGuide
'Opens a HTML-browser with a programmers guide.'

#helpShowHelp
'Toggles on/off displaying help texts.'

#helpTutorial
'Opens a HTML-browser with a tutorial for beginners.'

)
! !

!ToolApplicationModel class methodsFor:'history'!

getHistory

    history isNil ifTrue: [history := OrderedCollection new].
    ^history

!

historyMaxSize

    ^10

! !

!ToolApplicationModel class methodsFor:'interface specs'!

menuAbout
    "this window spec was automatically generated by the ST/X MenuEditor"

    "do not manually edit this - the builder may not be able to
     handle the specification if its corrupted."

    "
     MenuEditor new openOnClass:ToolApplicationModel andSelector:#menuAbout
     (Menu new fromLiteralArrayEncoding:(ToolApplicationModel menuAbout)) startUp
    "

    <resource: #menu>

    ^
     
       #(#Menu
          
           #(
             #(#MenuItem
                #'label:' 'About Smalltalk/X...'
                #'value:' #openAbout
                #'activeHelpKey:' #aboutSTX
            )
             #(#MenuItem
                #'label:' '-'
            )
             #(#MenuItem
                #'label:' 'About This Application...'
                #'value:' #openAboutThisApplication
                #'activeHelpKey:' #aboutThisAppliaction
            )
          ) nil
          nil
      )
!

menuHelp
    "this window spec was automatically generated by the ST/X MenuEditor"

    "do not manually edit this - the builder may not be able to
     handle the specification if its corrupted."

    "
     MenuEditor new openOnClass:ToolApplicationModel andSelector:#menuHelp
     (Menu new fromLiteralArrayEncoding:(ToolApplicationModel menuHelp)) startUp
    "

    <resource: #menu>

    ^
     
       #(#Menu
          
           #(
             #(#MenuItem
                #'label:' 'Tutorial'
                #'value:' #openTutorial
                #'activeHelpKey:' #helpTutorial
            )
             #(#MenuItem
                #'label:' 'Programmer''s Guide'
                #'value:' #openProgrammersGuide
                #'activeHelpKey:' #helpProgrammersGuide
            )
             #(#MenuItem
                #'label:' '-'
            )
             #(#MenuItem
                #'label:' 'Class Documentation'
                #'value:' #openClassDocumentation
                #'activeHelpKey:' #helpClassDocumentation
            )
             #(#MenuItem
                #'label:' '-'
            )
             #(#MenuItem
                #'label:' 'Show Help'
                #'value:' #'activeHelp:'
                #'activeHelpKey:' #helpShowHelp
                #'indication:' #activeHelp
            )
          ) nil
          nil
      )
!

menuSettings
    "this window spec was automatically generated by the ST/X MenuEditor"

    "do not manually edit this - the builder may not be able to
     handle the specification if its corrupted."

    "
     MenuEditor new openOnClass:ToolApplicationModel andSelector:#menuSettings
     (Menu new fromLiteralArrayEncoding:(ToolApplicationModel menuSettings)) startUp
    "

    <resource: #menu>

    ^
     
       #(#Menu
          
           #(
             #(#MenuItem
                #'label:' 'Language'
                #'value:' #languageSetting
            )
          ) nil
          nil
      )
!

windowSpecForCommit
    "this window spec was automatically generated by the ST/X UIPainter"

    "do not manually edit this - the painter/builder may not be able to
     handle the specification if its corrupted."

    "
     UIPainter new openOnClass:ToolApplicationModel andSelector:#windowSpecForCommit
     ToolApplicationModel new openInterface:#windowSpecForCommit
    "

    <resource: #canvas>

    ^
     
       #(#FullSpec
          #'window:' 
           #(#WindowSpec
              #'name:' 'unnamed canvas'
              #'layout:' #(#LayoutFrame 325 0 361 0 624 0 420 0)
              #'label:' 'unnamed canvas'
              #'min:' #(#Point 100 22)
              #'max:' #(#Point 1152 900)
              #'bounds:' #(#Rectangle 325 361 625 421)
              #'usePreferredExtent:' false
          )
          #'component:' 
           #(#SpecCollection
              #'collection:' 
               #(
                 #(#ActionButtonSpec
                    #'name:' 'cancelButton'
                    #'layout:' #(#LayoutFrame 5 0 0 0 -2 0.5 0 1)
                    #'label:' 'Cancel'
                    #'tabable:' true
                    #'model:' #cancel
                    #'enableChannel:' #valueOfEnablingCommitButtons
                )
                 #(#ActionButtonSpec
                    #'name:' 'okButton'
                    #'layout:' #(#LayoutFrame 2 0.5 0 0.0 -5 1 0 1.0)
                    #'label:' 'OK'
                    #'tabable:' true
                    #'model:' #accept
                    #'enableChannel:' #valueOfEnablingCommitButtons
                )
              )
          )
      )
!

windowSpecForCommitWithoutChannels
    "this window spec was automatically generated by the ST/X UIPainter"

    "do not manually edit this - the painter/builder may not be able to
     handle the specification if its corrupted."

    "
     UIPainter new openOnClass:ToolApplicationModel andSelector:#windowSpecForCommitWithoutChannels
     ToolApplicationModel new openInterface:#windowSpecForCommitWithoutChannels
    "

    <resource: #canvas>

    ^
     
       #(#FullSpec
          #'window:' 
           #(#WindowSpec
              #'name:' 'unnamed canvas'
              #'layout:' #(#LayoutFrame 418 0 386 0 717 0 445 0)
              #'label:' 'unnamed canvas'
              #'min:' #(#Point 100 22)
              #'max:' #(#Point 1152 900)
              #'bounds:' #(#Rectangle 418 386 718 446)
              #'usePreferredExtent:' false
          )
          #'component:' 
           #(#SpecCollection
              #'collection:' 
               #(
                 #(#ActionButtonSpec
                    #'name:' 'cancelButton'
                    #'layout:' #(#LayoutFrame 5 0 0 0 -2 0.5 0 1)
                    #'label:' 'Cancel'
                    #'tabable:' true
                    #'model:' #cancel
                )
                 #(#ActionButtonSpec
                    #'name:' 'okButton'
                    #'layout:' #(#LayoutFrame 2 0.5 0 0.0 -5 1 0 1.0)
                    #'label:' 'OK'
                    #'tabable:' true
                    #'model:' #accept
                )
              )
          )
      )
! !

!ToolApplicationModel class methodsFor:'resources'!

downIcon
    "ImageEditor openOnClass:self andSelector:#downIcon"

    <resource: #image>
    ^(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(#[85 85 0 5 85 80 85 85 42 149 85 80 85 85 42 149 85 80 85 85 42 149 85 80 85 85 42 149 85 80 85 85 42 149 85 80 85 85 42 149 85 80 85 85 42 149 85 80 85 85 42 149 85 80 85 85 42 149 85 80 85 85 42 149 85 80 85 85 42 149 85 80 85 85 42 149 85 80 85 85 42 149 85 80 85 85 42 149 85 80 85 64 42 144 21 80 85 74 170 170 85 80 85 90 170 169 85 80 85 86 170 165 85 80 85 85 170 149 85 80 85 85 106 85 85 80 85 85 89 85 85 80]) ; colorMap:((OrderedCollection new add:(Color white); add:(Color black); add:(Color red:0.0 green:49.9977 blue:0.0); add:(Color red:100.0 green:0.0 blue:0.0); yourself)); mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(#[0 252 0 0 252 0 0 252 0 0 252 0 0 252 0 0 252 0 0 252 0 0 252 0 0 252 0 0 252 0 0 252 0 0 252 0 0 252 0 0 252 0 0 252 0 7 255 128 7 255 128 3 255 0 1 254 0 0 252 0 0 120 0 0 48 0]) ; yourself); yourself!

downLeftIcon
    "ImageEditor openOnClass:self andSelector:#downLeftIcon"

    <resource: #image>
    ^(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(#[85 85 85 85 85 80 85 85 85 84 0 16 85 85 85 84 170 80 85 85 85 84 170 80 85 85 85 84 170 80 85 85 85 84 170 80 85 85 85 84 170 80 85 85 85 84 170 80 85 85 85 84 170 80 85 85 85 84 170 80 85 80 85 84 170 80 85 73 85 84 170 80 85 41 85 84 170 80 84 169 0 0 170 80 82 170 170 170 170 80 74 170 170 170 170 80 90 170 170 170 170 80 86 170 170 170 170 80 85 169 85 85 85 80 85 105 85 85 85 80 85 89 85 85 85 80 85 85 85 85 85 80]) ; colorMap:((OrderedCollection new add:(Color white); add:(Color black); add:(Color red:0.0 green:49.9977 blue:0.0); add:(Color red:100.0 green:0.0 blue:0.0); yourself)); mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(#[0 0 0 0 1 248 0 1 248 0 1 248 0 1 248 0 1 248 0 1 248 0 1 248 0 1 248 0 1 248 3 1 248 7 1 248 15 1 248 31 255 248 63 255 248 127 255 248 127 255 248 63 255 248 31 255 248 15 0 0 7 0 0 3 0 0]) ; yourself); yourself!

downRightIcon
    "ImageEditor openOnClass:self andSelector:#downRightIcon"

    <resource: #image>
    ^(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(#[85 85 85 85 85 80 64 1 85 85 85 80 74 165 85 85 85 80 74 165 85 85 85 80 74 165 85 85 85 80 74 165 85 85 85 80 74 165 85 85 85 80 74 165 85 85 85 80 74 165 85 85 85 80 74 165 85 85 85 80 74 165 85 80 85 80 74 165 85 82 21 80 74 165 85 82 133 80 74 164 0 2 161 80 74 170 170 170 168 80 74 170 170 170 170 16 74 170 170 170 170 80 74 170 170 170 169 80 69 85 85 86 165 80 85 85 85 82 149 80 85 85 85 82 85 80 85 85 85 81 85 80]) ; colorMap:((OrderedCollection new add:(Color white); add:(Color black); add:(Color red:0.0 green:49.9977 blue:0.0); add:(Color red:100.0 green:0.0 blue:0.0); yourself)); mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(#[0 0 0 126 0 0 126 0 0 126 0 0 126 0 0 126 0 0 126 0 0 126 0 0 126 0 0 126 0 0 126 3 0 126 3 128 126 3 192 127 255 224 127 255 240 127 255 248 127 255 248 127 255 240 127 255 224 0 3 192 0 3 128 0 3 0]) ; yourself); yourself!

fileOutIcon
    "ImageEditor openOnClass:self andSelector:#fileOutIcon"

    <resource: #image>
    ^(Depth2Image new) width: 24; height: 24; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(#[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 32 0 0 0 0 0 40 0 0 0 0 2 170 0 0 0 0 8 40 0 0 0 0 8 32 0 0 0 0 8 0 0 0 0 0 8 0 0 0 0 0 8 0 0 0 0 0 8 0 0 0 0 0 8 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 64 0 5 17 5 4 68 65 4 17 4 4 68 65 0 17 0 4 68 65 5 17 5 4 68 65 4 17 4 4 68 65 4 16 0 1 0 65 4 17 69 0 1 1]) ; colorMap:((OrderedCollection new add:(Color black); add:(Color white); add:(Color red:0.0 green:49.9977 blue:0.0); add:(Color red:100.0 green:0.0 blue:0.0); yourself)); mask:((Depth1Image new) width: 24; height: 24; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(#[0 0 0 0 0 0 0 0 0 0 0 0 4 0 110 6 80 132 31 32 68 38 80 36 36 4 196 32 0 0 32 0 0 32 0 0 32 0 0 32 0 0 0 0 0 0 0 0 106 98 215 127 119 251 111 103 251 111 103 251 127 119 251 111 103 251 111 99 43 37 176 17]) ; yourself); yourself!

garbageCollectIcon
    "ImageEditor openOnClass:self andSelector:#garbageCollectIcon"

    <resource: #image>
    ^(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(#[64 0 5 85 85 80 64 0 1 85 85 80 64 0 0 80 1 80 64 0 0 0 1 80 64 0 4 1 0 16 64 0 4 1 56 16 64 0 0 1 78 16 64 0 5 85 83 128 64 0 5 84 0 192 64 0 5 66 170 0 64 0 5 68 0 192 0 0 0 5 95 192 0 0 0 4 252 128 0 0 0 4 204 128 0 0 0 4 204 128 0 0 0 4 204 128 0 0 20 4 204 128 0 0 16 4 204 128 0 0 0 4 204 128 0 0 1 71 207 128 0 0 1 67 170 0 85 64 21 84 0 80]) ; colorMap:(((Array new:4) at:1 put:((Color black)); at:2 put:((Color white)); at:3 put:((Color grey:49.9962)); at:4 put:((Color grey:66.9978)); yourself)); mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(#[0 0 0 3 224 0 7 242 0 14 62 0 12 30 224 12 30 240 12 62 120 30 0 60 45 1 252 82 135 252 0 7 252 1 71 252 7 231 252 2 135 252 15 199 252 5 7 252 40 7 252 252 167 252 83 247 252 249 71 252 167 231 252 2 129 240]) ; yourself); yourself!

icon

    |iconSelector|
    (super respondsTo: (iconSelector := ('start', self name, 'Icon') asSymbol)) ifFalse: [^self stxIcon].
    ^(self perform: iconSelector) subImageIn: (0@0 extent: (22@13))
!

leftDownIcon
    "ImageEditor openOnClass:self andSelector:#leftDownIcon"

    <resource: #image>
    ^(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(#[85 85 85 85 85 80 84 0 0 0 0 16 84 170 170 170 170 80 84 170 170 170 170 80 84 170 170 170 170 80 84 170 170 170 170 80 84 170 85 85 85 80 84 170 85 85 85 80 84 170 85 85 85 80 84 170 85 85 85 80 84 170 85 85 85 80 84 170 85 85 85 80 84 170 85 85 85 80 84 170 85 85 85 80 0 170 128 85 85 80 42 170 169 85 85 80 74 170 165 85 85 80 82 170 149 85 85 80 84 170 85 85 85 80 85 41 85 85 85 80 85 69 85 85 85 80 85 85 85 85 85 80]) ; colorMap:((OrderedCollection new add:(Color white); add:(Color black); add:(Color red:0.0 green:49.9977 blue:0.0); add:(Color red:100.0 green:0.0 blue:0.0); yourself)); mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(#[0 0 0 31 255 248 31 255 248 31 255 248 31 255 248 31 255 248 31 255 248 31 128 0 31 128 0 31 128 0 31 128 0 31 128 0 31 128 0 31 128 0 255 240 0 255 240 0 127 224 0 63 192 0 31 128 0 15 0 0 6 0 0 0 0 0]) ; yourself); yourself!

leftIcon
    "ImageEditor openOnClass:self andSelector:#leftIcon"

    <resource: #image>
    ^(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(#[85 85 85 85 85 80 85 85 85 85 85 80 85 85 85 85 85 80 85 85 85 85 85 80 85 85 85 85 85 80 85 69 85 85 85 80 85 37 85 85 85 80 84 165 85 85 85 80 82 164 0 0 0 16 74 170 170 170 170 144 42 170 170 170 170 144 106 170 170 170 170 144 90 170 170 170 170 144 86 165 85 85 85 80 85 165 85 85 85 80 85 101 85 85 85 80 85 85 85 85 85 80 85 85 85 85 85 80 85 85 85 85 85 80 85 85 85 85 85 80 85 85 85 85 85 80 85 85 85 85 85 80]) ; colorMap:((OrderedCollection new add:(Color white); add:(Color black); add:(Color red:0.0 green:49.9962 blue:0.0); add:(Color red:100.0 green:0.0 blue:0.0); yourself)); mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(#[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6 0 0 14 0 0 30 0 0 63 255 252 127 255 252 255 255 252 255 255 252 127 255 252 63 255 252 30 0 0 14 0 0 6 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]) ; yourself); yourself!

leftUpIcon
    "ImageEditor openOnClass:self andSelector:#leftUpIcon"

    <resource: #image>
    ^(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(#[85 85 85 85 85 80 85 69 85 85 85 80 85 41 85 85 85 80 84 170 85 85 85 80 82 170 149 85 85 80 74 170 165 85 85 80 42 170 169 85 85 80 149 170 85 85 85 80 84 170 85 85 85 80 84 170 85 85 85 80 84 170 85 85 85 80 84 170 85 85 85 80 84 170 85 85 85 80 84 170 85 85 85 80 84 170 85 85 85 80 84 170 64 0 0 16 84 170 170 170 170 80 84 170 170 170 170 80 84 170 170 170 170 80 84 170 170 170 170 80 84 85 85 85 85 80 85 85 85 85 85 80]) ; colorMap:((OrderedCollection new add:(Color white); add:(Color black); add:(Color red:0.0 green:49.9962 blue:0.0); add:(Color red:100.0 green:0.0 blue:0.0); yourself)); mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(#[0 0 0 6 0 0 15 0 0 31 128 0 63 192 0 127 224 0 255 240 0 255 240 0 31 128 0 31 128 0 31 128 0 31 128 0 31 128 0 31 128 0 31 128 0 31 255 248 31 255 248 31 255 248 31 255 248 31 255 248 31 255 248 0 0 0]) ; yourself); yourself!

loadIcon
    "ImageEditor openOnClass:self andSelector:#loadIcon"

    <resource: #image>
    ^(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(#[85 85 85 85 85 80 85 85 85 87 245 80 85 85 85 94 173 80 87 255 255 250 171 208 87 170 170 170 170 80 85 85 85 85 86 144 64 0 0 0 1 80 79 255 255 255 249 144 79 255 255 255 249 80 79 255 255 255 249 144 79 255 255 255 249 80 83 255 255 255 254 80 83 255 255 255 254 80 83 255 255 255 254 80 83 255 255 255 254 80 83 255 255 255 254 80 83 255 255 255 254 80 84 255 255 255 255 144 84 255 255 255 255 144 84 255 255 255 255 144 87 170 170 170 170 144 85 85 85 85 85 80]) ; colorMap:(((Array new:4) at:1 put:((Color white)); at:2 put:((Color black)); at:3 put:((Color grey:49.9962)); at:4 put:((Color grey:66.9978)); yourself)); mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(#[0 1 192 0 3 224 31 255 248 63 255 252 63 255 252 127 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 127 255 252 127 255 252 127 255 252 127 255 252 127 255 252 127 255 252 63 255 252 63 255 252 63 255 252 63 255 252 63 255 252]) ; yourself); yourself!

newIcon
    "ImageEditor openOnClass:self andSelector:#newIcon"

    <resource: #image>
    ^(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(#[0 0 0 0 0 0 5 85 85 85 0 0 7 255 255 255 32 0 7 255 255 255 40 0 7 255 255 255 0 0 7 255 255 255 254 0 7 255 255 255 254 0 7 255 255 255 254 0 7 255 255 255 254 0 7 255 255 255 254 0 7 255 255 255 254 0 7 255 255 255 254 0 7 255 255 255 254 0 7 255 255 255 254 0 7 255 255 255 254 0 7 255 255 255 254 0 7 255 255 255 254 0 7 255 255 255 254 0 7 255 255 255 254 0 7 255 255 255 254 0 14 170 170 170 170 0 0 0 0 0 0 0]) ; colorMap:(((Array new:4) at:1 put:((Color black)); at:2 put:((Color white)); at:3 put:((Color grey:49.9962)); at:4 put:((Color grey:66.9978)); yourself)); mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(#[127 255 128 127 255 192 127 255 224 127 255 240 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248]) ; yourself); yourself!

removeIcon
    "ImageEditor openOnClass:self andSelector:#removeIcon"

    <resource: #image>
    ^(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(#[0 0 0 0 0 0 9 85 85 85 0 0 10 255 255 255 32 0 10 191 255 255 40 0 6 175 255 255 0 0 7 171 255 254 174 0 7 234 255 250 190 0 7 250 191 234 254 0 7 254 175 171 254 0 7 255 170 175 254 0 7 255 234 191 254 0 7 255 234 191 254 0 7 255 170 175 254 0 7 254 175 171 254 0 7 250 191 234 254 0 7 234 255 250 190 0 7 171 255 254 174 0 6 175 255 255 170 0 10 191 255 255 234 0 10 255 255 255 250 0 10 170 170 170 170 0 0 0 0 0 0 0]) ; colorMap:(((Array new:4) at:1 put:((Color black)); at:2 put:((Color white)); at:3 put:((Color grey:49.9962)); at:4 put:((Color grey:66.9978)); yourself)); mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(#[127 255 128 127 255 192 127 255 224 127 255 240 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248]) ; yourself); yourself!

rightIcon
    "ImageEditor openOnClass:self andSelector:#rightIcon"

    <resource: #image>
    ^(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(#[85 85 85 85 85 80 85 85 85 85 85 80 85 85 85 85 85 80 85 85 85 85 85 80 85 85 85 85 85 80 85 85 85 84 85 80 85 85 85 84 149 80 85 85 85 84 165 80 0 0 0 0 169 80 42 170 170 170 170 80 42 170 170 170 170 144 42 170 170 170 170 144 42 170 170 170 170 80 21 85 85 85 169 80 85 85 85 84 165 80 85 85 85 84 149 80 85 85 85 84 85 80 85 85 85 85 85 80 85 85 85 85 85 80 85 85 85 85 85 80 85 85 85 85 85 80 85 85 85 85 85 80]) ; colorMap:((OrderedCollection new add:(Color white); add:(Color black); add:(Color red:0.0 green:49.9962 blue:0.0); add:(Color red:100.0 green:0.0 blue:0.0); yourself)); mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(#[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 128 0 1 192 0 1 224 255 255 240 255 255 248 255 255 252 255 255 252 255 255 248 255 255 240 0 1 224 0 1 192 0 1 128 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]) ; yourself); yourself!

runIcon
    "ImageEditor openOnClass:self andSelector:#runIcon"

    <resource: #image>
    ^(Depth4Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(#[0 0 0 0 0 0 0 0 0 0 0 0 0 238 0 0 0 0 0 0 0 0 0 14 241 224 0 0 0 0 0 0 0 0 14 238 238 238 238 238 224 0 0 0 0 14 241 224 0 0 0 225 224 0 0 0 14 241 224 0 0 0 1 0 0 0 0 14 241 224 0 0 0 1 0 0 0 0 14 238 238 238 238 224 1 0 0 0 0 14 241 224 0 0 0 0 0 0 0 0 14 241 224 0 0 14 17 238 0 0 0 14 241 224 0 0 0 31 224 0 0 0 14 238 238 238 238 0 31 224 0 0 0 14 241 224 0 0 0 31 224 0 0 0 14 241 224 0 0 0 31 224 0 0 0 14 241 224 0 0 0 31 224 0 0 0 14 238 238 238 238 0 31 224 0 0 0 14 241 224 0 0 0 31 224 0 0 0 14 241 224 0 0 0 31 224 0 0 0 14 241 224 0 0 0 0 0 0 0 0 14 238 224 0 0 0 17 16 0 0 0 224 238 14 0 0 0 102 96 0 0 14 14 0 224 224 0 2 34 34 0 0]) ; colorMap:((OrderedCollection new add:(Color black); add:(Color white); add:(Color red:100.0 green:0.0 blue:0.0); add:(Color red:0.0 green:100.0 blue:0.0); add:(Color red:0.0 green:0.0 blue:100.0); add:(Color red:0.0 green:100.0 blue:100.0); add:(Color red:100.0 green:100.0 blue:0.0); add:(Color red:100.0 green:0.0 blue:100.0); add:(Color red:49.9962 green:0.0 blue:0.0); add:(Color red:0.0 green:49.9962 blue:0.0); add:(Color red:0.0 green:0.0 blue:49.9962); add:(Color red:0.0 green:49.9962 blue:49.9962); add:(Color red:49.9962 green:49.9962 blue:0.0); add:(Color red:49.9962 green:0.0 blue:49.9962); add:(Color grey:49.9962); add:(Color grey:66.9978); yourself)); mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(#[0 0 0 12 1 0 30 1 0 31 255 0 30 3 128 30 3 128 30 3 128 31 251 128 30 3 128 30 7 192 30 7 192 31 247 192 30 7 192 30 7 192 30 7 192 31 247 192 30 15 224 30 31 240 30 31 240 30 27 144 45 19 144 82 135 192 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]) ; yourself); yourself!

saveIcon
    "ImageEditor openOnClass:self andSelector:#saveIcon"

    <resource: #image>
    ^(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(#[4 204 204 204 192 16 55 51 51 51 15 208 52 204 204 204 207 80 55 51 51 51 15 80 52 204 204 204 207 208 55 51 51 51 15 208 52 204 204 204 207 208 55 51 51 51 15 208 52 204 204 204 207 208 55 51 51 51 15 208 52 204 204 204 207 208 52 0 0 0 15 208 63 255 255 255 255 208 63 255 255 255 255 208 63 255 255 255 255 208 63 213 85 85 95 208 63 223 255 253 191 208 63 221 79 253 175 208 63 221 143 253 175 208 63 221 143 253 175 208 63 220 15 253 175 208 213 90 170 169 93 80]) ; colorMap:(((Array new:4) at:1 put:((Color white)); at:2 put:((Color black)); at:3 put:((Color grey:49.9962)); at:4 put:((Color grey:66.9978)); yourself)); mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(#[255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 248]) ; yourself); yourself!

searchIcon
    "ImageEditor openOnClass:self andSelector:#searchIcon"

    <resource: #image>
    ^(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(#[0 0 0 0 0 0 0 0 0 0 0 0 13 106 128 53 170 0 0 0 0 0 0 0 13 106 128 53 170 0 13 106 128 53 170 0 13 106 128 53 170 0 13 106 128 53 170 0 13 106 128 53 170 0 13 106 128 53 170 0 13 106 138 53 170 0 13 106 0 5 170 0 13 106 54 133 170 0 13 106 0 5 170 0 13 106 128 53 170 0 0 0 0 0 0 0 0 214 160 213 160 0 0 0 0 0 0 0 0 26 0 6 128 0 0 0 0 0 0 0 0 218 128 54 160 0 0 0 0 0 0 0]) ; colorMap:((OrderedCollection new add:(Color black); add:(Color grey:74.5083); add:(Color grey:49.9962); add:(Color white); yourself)); mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(#[0 0 0 127 207 248 127 207 248 127 207 248 127 207 248 127 207 248 127 207 248 127 207 248 127 207 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 127 255 248 31 255 224 31 255 224 15 135 192 15 135 192 31 207 224 31 207 224]) ; yourself); yourself!

startChangesBrowserIcon
    "ImageEditor openOnClass:self andSelector:#startChangesBrowserIcon"

    <resource: #image>
    ^(Depth2Image new) width: 24; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(#[0 0 0 0 0 0 10 170 170 170 170 160 0 0 0 0 0 0 5 85 85 85 85 80 5 85 85 85 85 80 5 85 85 85 85 80 5 85 85 85 85 80 0 0 0 0 0 0 5 85 85 85 85 80 5 85 85 85 85 80 5 85 85 85 85 80 5 85 85 85 85 80 0 0 0 0 0 0 0 0 0 0 0 0 128 2 32 2 0 8 0 0 192 0 192 3 0 0 0 0 0 0 0 0 0 0 128 10 0 0 0 0 0 0 0 0 0 0 0 0 128 0 0 2 0 2 0 0 0 0 0 0]) ; colorMap:(((Array new:4) at:1 put:((Color black)); at:2 put:((Color white)); at:3 put:((Color grey:49.9962)); at:4 put:((Color grey:66.9978)); yourself)); mask:((Depth1Image new) width: 24; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(#[127 255 254 127 255 254 127 255 254 127 255 254 127 255 254 127 255 254 127 255 254 127 255 254 127 255 254 127 255 254 127 255 254 127 255 254 127 255 254 0 0 0 213 213 219 149 213 147 149 93 18 157 221 219 149 93 81 149 85 81 213 85 219 0 0 0]) ; yourself); yourself!

startFileBrowserIcon
    "ImageEditor openOnClass:self andSelector:#startFileBrowserIcon"

    <resource: #image>
    ^(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(#[0 0 0 0 0 0 42 170 170 170 170 128 0 0 0 0 0 0 21 85 81 85 85 64 21 85 81 85 85 64 21 85 81 85 85 64 21 85 81 85 85 64 0 0 0 0 0 0 21 85 85 85 85 64 21 85 85 85 85 64 21 85 85 85 85 64 21 85 85 85 85 64 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]) ; colorMap:(((Array new:4) at:1 put:((Color black)); at:2 put:((Color white)); at:3 put:((Color grey:49.9962)); at:4 put:((Color grey:66.9978)); yourself)); mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(#[255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 0 0 0 114 71 48 66 68 64 66 68 64 114 70 32 66 68 16 66 68 16 66 119 96 0 0 0]) ; yourself); yourself!

startImageEditorIcon
    "ImageEditor openOnClass:self andSelector:#startImageEditorIcon"

    <resource: #image>
    ^(Depth4Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(#[0 0 0 0 0 0 0 0 0 0 0 13 221 221 221 221 221 221 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 35 34 4 68 57 153 0 0 0 0 3 51 51 4 68 57 153 0 0 0 0 3 34 35 4 68 57 153 0 0 0 0 3 51 51 3 51 51 51 0 0 0 0 3 34 35 5 85 56 136 0 0 0 0 3 51 51 5 85 56 136 0 0 0 0 3 50 34 5 85 56 136 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 34 34 34 34 34 34 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3 3 0 48 3 2 0 48 0 0 0 0 48 0 2 32 0 32 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 32 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]) ; colorMap:((OrderedCollection new add:(Color black); add:(Color white); add:(Color grey:66.9978); add:(Color grey:49.9962); add:(Color red:100.0 green:0.0 blue:0.0); add:(Color red:0.0 green:100.0 blue:0.0); add:(Color red:0.0 green:0.0 blue:100.0); add:(Color red:0.0 green:100.0 blue:100.0); add:(Color red:100.0 green:100.0 blue:0.0); add:(Color red:100.0 green:0.0 blue:100.0); add:(Color red:49.9962 green:0.0 blue:0.0); add:(Color red:0.0 green:49.9962 blue:0.0); add:(Color red:0.0 green:0.0 blue:49.9962); add:(Color red:0.0 green:49.9962 blue:49.9962); add:(Color red:49.9962 green:49.9962 blue:0.0); add:(Color red:49.9962 green:0.0 blue:49.9962); yourself)); mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(#[255 254 0 255 254 0 255 254 64 255 254 96 255 254 112 255 254 120 255 254 124 255 254 112 255 254 80 255 254 8 255 254 8 255 254 4 255 254 4 0 0 0 182 247 184 190 246 160 170 148 32 162 245 176 162 180 160 162 148 160 162 151 184 0 0 0]) ; yourself); yourself!

startMenuEditorIcon
    "ImageEditor openOnClass:self andSelector:#startMenuEditorIcon"

    <resource: #image>
    ^(Depth4Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(#[0 0 0 0 0 0 0 0 0 0 0 4 68 68 68 68 68 68 0 0 0 0 0 0 0 0 0 0 0 0 32 0 0 5 34 34 5 17 81 21 0 0 0 0 2 82 2 5 34 34 33 0 0 0 0 2 34 34 5 34 34 33 0 0 0 0 2 82 2 5 34 34 33 0 0 0 0 2 34 34 5 34 34 33 0 0 0 0 2 82 2 5 34 34 33 0 32 0 0 2 34 34 5 34 34 33 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 34 34 34 34 34 34 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 5 5 0 0 0 0 0 0 0 0 0 0 80 0 0 0 5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 80 0 0 0 0 0 0 0 0 0 0 0 5 0 80 0 0 0 0 0 0 0 0 0 0 0 0]) ; colorMap:((OrderedCollection new add:(Color black); add:(Color white); add:(Color grey:66.9978); add:(Color red:100.0 green:100.0 blue:0.0); add:(Color red:0.0 green:49.9962 blue:49.9962); add:(Color grey:49.9962); add:(Color red:100.0 green:0.0 blue:0.0); add:(Color red:0.0 green:100.0 blue:0.0); add:(Color red:0.0 green:0.0 blue:100.0); add:(Color red:0.0 green:100.0 blue:100.0); add:(Color red:100.0 green:0.0 blue:100.0); add:(Color red:49.9962 green:0.0 blue:0.0); add:(Color red:0.0 green:49.9962 blue:0.0); add:(Color red:0.0 green:0.0 blue:49.9962); add:(Color red:49.9962 green:49.9962 blue:0.0); add:(Color red:49.9962 green:0.0 blue:0.0); yourself)); mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(#[255 254 0 255 254 0 255 254 192 255 254 96 255 254 112 255 254 120 255 254 124 255 254 112 255 254 208 255 254 8 255 254 8 255 254 4 255 254 4 0 0 0 219 165 32 250 53 32 170 53 32 139 61 32 138 45 32 138 45 32 139 165 224 0 0 0]) ; yourself); yourself!

startSourceCodeBrowserIcon
    "ImageEditor openOnClass:self andSelector:#startSourceCodeBrowserIcon"

    <resource: #image>
    ^(Depth2Image new) width: 24; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(#[0 0 0 0 0 0 15 255 255 255 255 240 0 0 0 0 0 0 5 85 84 85 85 80 5 85 84 85 85 80 5 85 84 85 85 80 5 85 84 85 85 80 0 0 0 0 0 0 5 85 84 85 85 80 69 85 84 85 85 80 5 85 84 85 85 80 5 85 84 85 85 80 0 0 0 0 0 0 0 0 0 0 0 0 48 51 0 3 48 0 8 8 0 0 8 0 0 0 0 0 0 0 0 0 0 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3 51 51 0 48 0 0 0 0 0 0 0]) ; colorMap:((OrderedCollection new add:(Color black); add:(Color white); add:(Color grey:66.9978); add:(Color grey:49.9962); yourself)); mask:((Depth1Image new) width: 24; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(#[127 255 254 127 255 254 127 255 254 127 255 254 127 255 254 127 255 254 127 255 254 127 255 254 127 255 254 127 255 254 127 255 254 127 255 254 127 255 254 0 0 0 119 87 118 103 85 100 69 85 68 37 87 70 21 85 68 21 85 68 119 117 118 0 0 0]) ; yourself); yourself!

startSystemBrowserIcon
    "ImageEditor openOnClass:self andSelector:#startSystemBrowserIcon"

    <resource: #image>
    ^(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(#[0 0 0 0 0 0 63 255 255 255 255 192 0 0 0 0 0 0 21 69 81 84 85 64 21 69 81 84 85 64 21 64 1 84 85 64 21 69 81 84 85 64 0 0 0 0 0 0 21 85 85 85 85 64 21 85 85 85 85 64 21 85 85 85 85 64 21 85 85 85 85 64 0 0 0 0 0 0 0 0 0 0 0 0 192 12 204 48 3 0 32 2 2 8 0 128 0 0 0 0 0 0 0 0 0 130 0 0 0 0 0 0 0 0 0 0 0 0 0 0 192 0 3 12 0 192 0 0 0 0 0 0]) ; colorMap:(((Array new:4) at:1 put:((Color black)); at:2 put:((Color white)); at:3 put:((Color grey:66.9978)); at:4 put:((Color grey:49.9962)); yourself)); mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(#[255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 0 0 0 211 191 248 211 182 152 146 164 144 147 191 216 146 146 136 146 146 136 222 254 248 0 0 0]) ; yourself); yourself!

startUIPainterIcon
    "ImageEditor openOnClass:self andSelector:#startUIPainterIcon"

    <resource: #image>
    ^(Depth4Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(#[0 0 0 0 0 0 0 0 0 0 0 13 221 221 221 221 221 221 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 8 34 34 3 17 49 19 0 0 0 0 2 130 2 3 34 34 33 0 0 0 0 2 34 34 3 34 34 33 0 0 0 0 2 130 2 3 34 34 33 0 0 0 0 2 34 34 3 34 34 33 0 0 0 0 2 130 2 3 34 34 33 0 0 0 0 2 34 34 3 17 17 17 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 34 34 34 34 34 34 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 48 0 0 0 0 0 0 0 0 0 0 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 48 0 0 3 0 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]) ; colorMap:((OrderedCollection new add:(Color black); add:(Color white); add:(Color grey:66.9978); add:(Color grey:49.9962); add:(Color red:100.0 green:0.0 blue:0.0); add:(Color red:0.0 green:100.0 blue:0.0); add:(Color red:0.0 green:0.0 blue:100.0); add:(Color red:0.0 green:100.0 blue:100.0); add:(Color red:100.0 green:100.0 blue:0.0); add:(Color red:100.0 green:0.0 blue:100.0); add:(Color red:49.9962 green:0.0 blue:0.0); add:(Color red:0.0 green:49.9962 blue:0.0); add:(Color red:0.0 green:0.0 blue:49.9962); add:(Color red:0.0 green:49.9962 blue:49.9962); add:(Color red:49.9962 green:49.9962 blue:0.0); add:(Color red:49.9962 green:0.0 blue:49.9962); yourself)); mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(#[255 254 0 255 254 0 255 254 64 255 254 96 255 254 112 255 254 120 255 254 124 255 254 112 255 254 80 255 254 8 255 254 8 255 254 4 255 254 4 0 0 0 249 19 128 193 17 0 129 17 0 185 17 0 137 17 0 137 17 0 249 243 128 0 0 0]) ; yourself); yourself!

stxIcon
    "ImageEditor openOnClass:self andSelector:#stxIcon"

    <resource: #image>
    ^(Depth2Image new) width: 19; height: 19; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(#[0 0 0 0 3 0 0 0 0 0 0 0 0 0 0 0 5 0 0 64 0 5 0 1 65 0 1 64 0 0 0 1 64 20 0 0 0 80 64 0 0 0 81 64 3 0 0 21 0 0 0 0 20 0 0 0 0 84 0 0 0 1 65 0 3 0 5 0 64 0 0 20 0 64 0 1 80 0 0 0 1 80 0 4 3 0 0 0 0 1 0 0 0 0 0]) ; colorMap:((OrderedCollection new add:(Color grey:9.41024); add:(Color red:0.0 green:80.7828 blue:18.822); add:(Color black); add:(Color white); yourself)); yourself!

upIcon
    "ImageEditor openOnClass:self andSelector:#upIcon"

    <resource: #image>
    ^(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(#[85 85 81 85 85 80 85 85 74 85 85 80 85 85 42 149 85 80 85 84 170 165 85 80 85 82 170 169 85 80 85 74 170 170 85 80 85 69 170 149 85 80 85 85 42 149 85 80 85 85 42 149 85 80 85 85 42 149 85 80 85 85 42 149 85 80 85 85 42 149 85 80 85 85 42 149 85 80 85 85 42 149 85 80 85 85 42 149 85 80 85 85 42 149 85 80 85 85 42 149 85 80 85 85 42 149 85 80 85 85 42 149 85 80 85 85 42 149 85 80 85 85 42 149 85 80 85 85 21 85 85 80]) ; colorMap:((OrderedCollection new add:(Color white); add:(Color black); add:(Color red:0.0 green:49.9977 blue:0.0); add:(Color red:100.0 green:0.0 blue:0.0); yourself)); mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(#[0 48 0 0 120 0 0 252 0 1 254 0 3 255 0 7 255 128 7 255 128 0 252 0 0 252 0 0 252 0 0 252 0 0 252 0 0 252 0 0 252 0 0 252 0 0 252 0 0 252 0 0 252 0 0 252 0 0 252 0 0 252 0 0 252 0]) ; yourself); yourself!

upRightIcon
    "ImageEditor openOnClass:self andSelector:#upRightIcon"

    <resource: #image>
    ^(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(#[85 85 85 81 85 80 85 85 85 82 85 80 85 85 85 82 149 80 64 0 0 2 165 80 74 170 170 170 169 80 74 170 170 170 170 80 74 170 170 170 170 80 74 170 170 170 169 80 74 165 85 86 165 80 74 165 85 82 149 80 74 165 85 82 85 80 74 165 85 81 85 80 74 165 85 85 85 80 74 165 85 85 85 80 74 165 85 85 85 80 74 165 85 85 85 80 74 165 85 85 85 80 74 165 85 85 85 80 74 165 85 85 85 80 74 165 85 85 85 80 69 85 85 85 85 80 85 85 85 85 85 80]) ; colorMap:((OrderedCollection new add:(Color white); add:(Color black); add:(Color red:0.0 green:49.9962 blue:0.0); add:(Color red:100.0 green:0.0 blue:0.0); yourself)); mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(#[0 3 0 0 3 128 0 3 192 127 255 224 127 255 240 127 255 248 127 255 248 127 255 240 127 255 224 126 3 192 126 3 128 126 3 0 126 0 0 126 0 0 126 0 0 126 0 0 126 0 0 126 0 0 126 0 0 126 0 0 126 0 0 0 0 0]) ; yourself); yourself! !

!ToolApplicationModel methodsFor:'accessing - views'!

menuToolbarView

    ^builder componentAt: #menuToolbarView
!

preferredExtent
    "preferred extent of my window; top menu and top toolbar (named by 'menuToolbar')
     will be considered"

    |window menuPanel menuToolbarView preferredExtentOfWindow|

    window          := self builder window. 
    menuPanel       := window subViews first.
    menuToolbarView := self menuToolbarView.

    preferredExtentOfWindow := window extent.
    menuPanel class = MenuPanel ifTrue: [preferredExtentOfWindow := preferredExtentOfWindow max: menuPanel preferredExtent].
    menuToolbarView notNil      ifTrue: [preferredExtentOfWindow := preferredExtentOfWindow max: menuToolbarView preferredExtent].

    ^window minExtent max: (preferredExtentOfWindow min: window maxExtent)
! !

!ToolApplicationModel methodsFor:'action - settings'!

languageSetting 
    "open a dialog on language related settings"

    |listOfLanguages translatedLanguages switch box languageList flags|

    "
     get list of supported languages from the launchers resources ...
    "
    listOfLanguages := resources at:'LIST_OF_OFFERED_LANGUAGES' default:#('default').
    listOfLanguages := listOfLanguages asOrderedCollection.
    translatedLanguages := listOfLanguages collect:[:lang | |item|
                                        item := resources at:lang.
                                        item isString ifTrue:[
                                            item
                                        ] ifFalse:[
                                            item at:1
                                        ]
                                ].
    flags := listOfLanguages collect:[:lang | |item|
                                        item := resources at:lang.
                                        item isArray ifTrue:[
                                            item at:2
                                        ] ifFalse:[
                                            nil
                                        ]
                                ].
    flags := flags collect:[:nm | nm notNil ifTrue:[Image fromFile:nm] ifFalse:[nil]].

    languageList := translatedLanguages with:flags collect:[:lang :flag |
                                LabelAndIcon icon:flag string:lang.
                        ].

    box := ListSelectionBox title:(resources string:'LANG_MSG') withCRs.
    box label:(resources string:'Language selection').
    box list:languageList.
    box initialText:(Language).
    box action:[:newLanguage |
        self withWaitCursorDo:[
            |fontPref idx language oldLanguage enc answer matchingFonts|

            idx := translatedLanguages indexOf:newLanguage withoutSeparators.
            idx ~~ 0 ifTrue:[
                language := listOfLanguages at:idx
            ] ifFalse:[
                language := newLanguage
            ].

            "/ check if the new language needs a differently encoded font;
            "/ ask user to switch font and allow cancellation.
            "/ Otherwise, you are left with unreadable menu & button items ...

            oldLanguage := Smalltalk language.
            Smalltalk language:language asSymbol.
            ResourcePack flushCachedResourcePacks.
            fontPref := self class classResources at:'PREFERRED_FONT_ENCODING'.
            Smalltalk language:oldLanguage.

            switch := true.
            enc := MenuView defaultFont encoding.
            (fontPref match:enc) ifFalse:[
                "/ look if there is one at all.
                matchingFonts := Screen current listOfAvailableFonts select:[:f | fontPref match:f encoding].
                matchingFonts size == 0 ifTrue:[
                    (Dialog 
                        confirm:(resources 
                                    string:'your display does not offer any %1-encoded font.\\Change the language anyway ?\ (texts will probably be unreadable then)'
                                      with:fontPref) withCRs)
                    ifFalse:[
                        switch := false
                    ]
                ] ifFalse:[
                    answer := Dialog 
                                confirmWithCancel:(resources 
                                                        string:'menu font is not %1-encoded.\\Change it ?'
                                                        with:fontPref) withCRs
                                           labels:(resources
                                                        array:#('cancel' 'no' 'yes'))
                                           default:3.
                    answer isNil ifTrue:[
                        switch := false
                    ] ifFalse:[
                        answer ifTrue:[
                            switch := (self fontBoxForEncoding:fontPref)
                        ]
                    ].
                ].
            ].

            switch ifTrue:[
                Smalltalk language:language asSymbol.
                ResourcePack flushCachedResourcePacks
            ].
        ].
        switch ifTrue:[
            self reOpen
        ]
    ].    
    box
        addHelpButtonFor:'Launcher/languageSetting.html'.
    box open.
    box destroy



! !

!ToolApplicationModel methodsFor:'active help'!

activeHelp
    "Answer whether active help is turned on/off"

    ^activeHelp
!

activeHelp: aValue
    "toggle active help"

    (activeHelp := aValue)
        ifTrue: [ActiveHelp startFor: self]
        ifFalse: [ActiveHelp stopFor: self]
!

defaultInfoLabel

    ^''
!

openAbout
    "show an about box"

    |box|

    box := AboutBox new.
    box autoHideAfter:10 with:[].
    box showAtCenter

!

openAboutThisApplication
    "show an about this application box"

    |rev box|
    rev := ''.
    self class revision notNil ifTrue: [rev := '  (rev: ', self class revision printString, ')'].
    box := AboutBox title:
        '\The application\\' withCRs,
        (Text string: self class label emphasis: #bold), rev,
        '\\has been designed and implemented by \' withCRs,self class author,', eXept Software AG, Germany.  \\' withCRs.

     box   label:'About This Application'.
     box   autoHideAfter:10 with:[].
     box   showAtCenter.
!

openClassDocumentation

    Autoload autoloadFailedSignal handle:[:ex |
        self warn:'autoload failed.

Check your source directory and/or 
the abbreviation file for the classes (correct) shortened name.'.
        ex return.
    ] do:[
        |text v|

        text := self class htmlDocumentation.
        text notNil ifTrue:[
            v := HTMLDocumentView
                    openFullOnText:text 
                    inDirectory:(Smalltalk getSystemFileName:'doc/online/english/classDoc').
            v nameSpaceForExecution: self class nameSpace.
        ]
    ]


!

openProgrammersGuide

    |dir|
    ((dir := Smalltalk getSystemFileName: 'doc/online/english/programming/TOP.html') asFilename exists)
    ifTrue:
    [
        ^HTMLDocumentView openFullOnFile: dir
    ]
!

openTutorial

    |dir|
    ((dir := Smalltalk getSystemFileName: 'doc/online/english/getstart/tutorial.html') asFilename exists)
    ifTrue:
    [
        ^HTMLDocumentView openFullOnFile: dir
    ]
!

showHelp:aHelpText for:view
    "display aHelpText in the info label or if present detour to masterApplication."

    self masterApplication notNil
    ifTrue:
    [
        ^masterApplication showHelp: aHelpText for:view
    ]
    ifFalse:
    [
        aHelpText isNil 
            ifTrue:  [self valueOfInfoLabel value: self defaultInfoLabel] 
            ifFalse: [self valueOfInfoLabel value: (aHelpText asString printString upTo: Character cr)].

        ^true
    ]
! !

!ToolApplicationModel methodsFor:'aspects'!

valueOfEnablingCommitButtons

    |holder|
    (holder := builder bindingAt:#valueOfEnablingCommitButtons) isNil ifTrue:[
        builder aspectAt:#valueOfEnablingCommitButtons put:(holder :=  false asValue).
    ].
    ^ holder

!

valueOfHavingClipboard

    |holder|
    (holder := builder bindingAt:#valueOfHavingClipboard) isNil ifTrue:[
        builder aspectAt:#valueOfHavingClipboard put:(holder :=  self class clipboard notNil asValue).
    ].
    ^ holder

!

valueOfInfoLabel

    |holder|
    (holder := builder bindingAt:#valueOfInfoLabel) isNil ifTrue:[
        builder aspectAt:#valueOfInfoLabel put:(holder :=  ValueHolder new).
    ].
    ^ holder

!

valueOfTimeLabel

    |holder|
    (holder := builder bindingAt:#valueOfTimeLabel) isNil ifTrue:[
        builder aspectAt:#valueOfTimeLabel put:(holder :=  ValueHolder new).
    ].
    ^ holder

! !

!ToolApplicationModel methodsFor:'clipboard'!

clipboard: anEditObject

    self class clipboard: anEditObject.

    self valueOfHavingClipboard value: anEditObject notNil
! !

!ToolApplicationModel methodsFor:'history'!

addToHistory: aHistoryEntry

    self history remove: (self history detect: [:histEntry| histEntry key = aHistoryEntry key] ifNone: nil) ifAbsent: nil.
    self history addFirst: aHistoryEntry.
    [self history size > self class historyMaxSize] whileTrue: [self history removeLast]
!

emptyHistory

    ^self history removeAll
!

history

    ^self class getHistory
!

menuHistory

    |menu a|
    menu := Menu new receiver: self.
    (self history collect: [:histEntry| histEntry value]) asSet asOrderedCollection do:
    [:historyEntryType|    
        menu addItemGroup: ((a := self history select: [:histEntry| histEntry value = historyEntryType]) collect: [:histEntry|  MenuItem new label: histEntry key printString; value: histEntry value; argument: histEntry key]).
    ]. 
    menu addItem: (MenuItem new label: 'Empty History'; value: #emptyHistory).

    ^menu
!

removeFromHistory: aHistoryEntry

    self history remove: (self history detect: [:histEntry| histEntry key = aHistoryEntry key] ifNone: nil) ifAbsent: nil.
    [self history size > self class historyMaxSize] whileTrue: [self history removeLast]
! !

!ToolApplicationModel methodsFor:'startup / release'!

close

    self uninitialize.

    super close
!

closeRequest

    self uninitialize.

    super closeRequest
!

initialize

    self activeHelp: true.
    timeBlock := nil.
    timeBlock := [self showTime].
    self showTime
!

open

    super open.

    self class allInstances size = 1 
    ifTrue: 
    [
        self class classResources: nil.
        self clipboard: nil
    ].
    builder window label: self class label

!

openInterface

    super openInterface.

    self builder window extent: self preferredExtent
!

reOpen

    self close.

    self class open
!

removeAllTemporalViews

    self builder namedComponents keys copy do: 
    [:comp| 
        (comp includesString: '_Temporal') ifTrue: [self builder namedComponents removeKey: comp]
    ]
!

restarted

    self initialize
!

uninitialize

    self class allInstances size = 1 ifTrue: [self clipboard: nil].
    activeHelp ifTrue: [ActiveHelp stopFor: self].
    Processor removeTimedBlock:timeBlock.
    timeBlock := nil.
! !

!ToolApplicationModel methodsFor:'window events'!

showTime

    |hours minutes suffix|
    suffix := ' am '.  
    (hours := Time now hours) > 12 ifTrue: [hours := hours - 12].
    Time now hours >= 12 ifTrue: [suffix := ' pm '].
    (minutes := Time now minutes printString) size = 1 ifTrue: [minutes := '0', minutes printString].
    self valueOfTimeLabel value: hours printString, ':', minutes, suffix.
    Processor addTimedBlock: timeBlock afterSeconds: 1

! !

!ToolApplicationModel class methodsFor:'documentation'!

version
    ^ '$Header: /cvs/stx/stx/libview2/ToolApplicationModel.st,v 1.14 1998-01-23 17:48:01 tz Exp $'
! !