ToolApplicationModel.st
author tz
Wed, 21 Jan 1998 12:35:49 +0100
changeset 760 26cf45040420
parent 758 f979af2fbb90
child 761 cc0404f8aec6
permissions -rw-r--r--
#preferredExtent cleaned

"
 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.

    [see also:]
        ApplicationModel
        ImageEditor

    [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:'history'!

getHistory

    ^history ? (history := OrderedCollection new)

!

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
            )
             #(#MenuItem
                #'label:' '-'
            )
             #(#MenuItem
                #'label:' 'About This Application...'
                #'value:' #openAboutThisApplication
            )
          ) 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
            )
             #(#MenuItem
                #'label:' 'Programmer''s Guide'
                #'value:' #openProgrammersGuide
            )
             #(#MenuItem
                #'label:' '-'
            )
             #(#MenuItem
                #'label:' 'Class Documentation'
                #'value:' #openClassDocumentation
            )
             #(#MenuItem
                #'label:' '-'
            )
             #(#MenuItem
                #'label:' 'Active Help'
                #'value:' #'activeHelp:'
                #'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 264 0 340 0 563 0 399 0)
              #'label:' 'unnamed canvas'
              #'min:' #(#Point 100 22)
              #'max:' #(#Point 1152 900)
              #'bounds:' #(#Rectangle 264 340 564 400)
              #'usePreferredExtent:' false
          )
          #'component:' 
           #(#SpecCollection
              #'collection:' 
               #(
                 #(#ActionButtonSpec
                    #'name:' 'cancelButton'
                    #'layout:' #(#LayoutFrame 5 0 0 0 -2 0.5 0 1)
                    #'label:' 'Cancel'
                    #'model:' #cancel
                    #'enableChannel:' #valueOfEnablingCommitButtons
                )
                 #(#ActionButtonSpec
                    #'name:' 'okButton'
                    #'layout:' #(#LayoutFrame 2 0.5 0 0.0 -5 1 0 1.0)
                    #'label:' 'OK'
                    #'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 323 0 410 0 622 0 469 0)
              #'label:' 'unnamed canvas'
              #'min:' #(#Point 100 22)
              #'max:' #(#Point 1152 900)
              #'bounds:' #(#Rectangle 323 410 623 470)
              #'usePreferredExtent:' false
          )
          #'component:' 
           #(#SpecCollection
              #'collection:' 
               #(
                 #(#ActionButtonSpec
                    #'name:' 'cancelButton'
                    #'layout:' #(#LayoutFrame 5 0 0 0 -2 0.5 0 1)
                    #'label:' 'Cancel'
                    #'model:' #cancel
                )
                 #(#ActionButtonSpec
                    #'name:' 'okButton'
                    #'layout:' #(#LayoutFrame 2 0.5 0 0.0 -5 1 0 1.0)
                    #'label:' 'OK'
                    #'model:' #accept
                )
              )
          )
      )
! !

!ToolApplicationModel class methodsFor:'resources'!

compressChangesIcon
    "ImageEditor openOnClass:self andSelector:#compressChangesIcon"

    <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 42 170 170 168 0 0 40 0 0 8 0 0 40 0 0 8 0 1 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 8 0 0 0 0 0 8 0 0 0 0 0 8 0 1 0 0 0 8 0 0 64 0 0 8 0 0 16 0 0 8 0 0 0 0 0 8 0 0 170 170 170 168 0 0 0 0 0 0 0 0 16 0 0 0 0 0 16 0 0 0 0 0 16 0 0 0 0 0 16 0 0 0 0 0 0 0 0 0]) ; colorMap:((OrderedCollection new add:(Color black); add:(Color grey:49.0181); add:(Color red:44.3122 green:50.5852 blue:56.8597); add:(Color white); yourself)); mask:((ImageMask new) width: 24; height: 24; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(#[0 0 0 0 127 254 0 255 255 0 255 255 0 240 7 1 248 7 0 0 7 217 54 223 154 180 151 155 182 215 154 182 151 218 182 247 0 0 7 1 248 7 0 240 7 0 96 7 1 255 255 1 255 255 1 255 254 0 96 0 2 100 0 3 252 0 2 100 0 0 0 0]) ; yourself); yourself!

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: (24@16))
!

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!

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 42 170 146 170 170 64 47 255 210 255 255 64 47 255 210 255 255 64 37 85 82 85 85 64 0 0 0 0 0 0 42 170 170 170 170 64 47 255 255 255 255 64 47 255 255 255 255 64 37 85 85 85 85 64 0 0 0 0 0 0 0 0 0 0 0 0 0 65 4 0 64 64 5 65 4 5 69 64 4 1 4 4 4 0 0 65 4 1 1 0 5 65 4 5 0 64 4 1 4 4 0 64 4 1 0 64 65 64 4 1 5 69 69 0]) ; colorMap:(((Array new:4) at:1 put:((Color black)); at:2 put:((Color white)); at:3 put:((Color grey:49.9977)); 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 123 103 184 123 103 248 99 102 96 123 103 48 123 103 24 99 102 24 99 127 248 33 59 176]) ; yourself); yourself!

startGUIBuilderIcon
    "ImageEditor openOnClass:self andSelector:#startGUIBuilderIcon"

    <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 15 255 255 252 0 0 0 0 0 0 0 0 15 244 215 92 0 0 13 116 234 164 0 0 14 244 234 164 0 0 13 116 234 164 0 0 14 244 234 164 0 0 13 116 234 164 0 0 14 164 213 84 0 0 0 0 0 0 0 0 10 170 170 168 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 9 84 16 16 20 0 4 0 16 16 16 0 4 0 16 16 16 0 4 68 16 16 16 0 4 4 16 16 16 0 48 4 192 208 0 0 1 84 5 64 84 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: 24; height: 24; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(#[0 0 0 127 255 0 127 255 0 127 255 32 127 255 48 127 255 56 127 255 60 127 255 62 127 255 56 127 255 40 127 255 4 127 255 4 127 255 2 127 255 2 0 0 0 0 0 0 124 137 192 126 204 224 96 204 192 124 204 192 110 204 192 102 204 192 126 253 192 30 56 224]) ; yourself); yourself!

startImageEditorIcon
    "ImageEditor openOnClass:self andSelector:#startImageEditorIcon"

    <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 15 255 255 252 0 0 0 0 0 0 0 0 15 244 87 168 0 0 13 116 87 168 0 0 14 244 87 168 0 0 13 116 255 252 0 0 14 244 171 84 0 0 13 116 171 84 0 0 14 164 171 84 0 0 0 0 0 0 0 0 10 170 170 168 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 204 48 204 48 0 4 48 73 18 64 84 4 64 68 17 4 64 4 64 64 17 0 0 4 64 69 17 4 80 4 64 68 17 4 64 4 64 68 28 4 0 4 64 68 16 84 84]) ; 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: 24; height: 24; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(#[0 0 0 127 255 0 127 255 0 127 255 32 127 255 48 127 255 56 127 255 60 127 255 62 127 255 56 127 255 40 127 255 4 127 255 4 127 255 2 127 255 2 0 0 0 0 0 0 123 123 220 127 255 222 125 239 56 121 255 216 121 255 124 121 239 120 121 239 252 40 164 238]) ; yourself); yourself!

startMenuEditorIcon
    "ImageEditor openOnClass:self andSelector:#startMenuEditorIcon"

    <resource: #image>
    ^(Depth4Image new) width: 24; height: 24; photometric:(#palette); bitsPerSample:(#(4 )); 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 85 85 85 85 85 85 80 0 0 0 0 0 0 0 0 0 0 0 0 2 0 0 0 0 85 85 16 81 21 17 80 0 0 0 0 0 81 21 16 82 34 34 16 0 0 0 0 0 82 85 16 82 34 34 16 0 0 0 0 0 81 21 16 82 34 34 16 0 0 0 0 0 82 85 16 82 34 34 16 0 0 0 0 0 81 21 16 82 34 34 16 2 0 0 0 0 82 34 16 82 34 34 16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 34 34 34 34 34 34 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 0 0 0 0 0 0 0 0 0 0 0 80 80 16 0 0 0 1 0 0 0 0 0 5 0 16 17 16 80 1 1 0 16 0 0 16 0 16 16 0 0 1 1 0 16 0 0 16 0 16 0 0 0 1 1 0 16 0 0 16 0 16 17 0 16 1 1 0 16 0 0 16 0 16 16 0 21 1 1 0 16 0 0 16 0 16 0 0 16 1 80 5 16 0 0 16 0 16 17 16 16 1 0 17 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:0.0 green:49.9962 blue:49.9962); add:(Color red:49.9962 green:49.9962 blue:0.0); yourself)); mask:((Depth1Image new) width: 24; height: 24; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(#[0 0 0 127 255 0 127 255 0 127 255 96 127 255 48 127 255 56 127 255 60 127 255 62 127 255 56 127 255 104 127 255 4 127 255 4 127 255 2 127 255 2 0 0 0 0 0 0 111 211 144 127 251 216 119 155 216 103 159 216 103 223 216 103 159 216 103 219 248 34 233 48]) ; yourself); yourself!

startNewChangesBrowserIcon
    "ImageEditor openOnClass:self andSelector:#startNewChangesBrowserIcon"

    <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 10 170 170 170 170 160 0 0 0 0 0 0 10 170 170 170 170 144 11 255 255 255 255 208 11 255 255 255 255 208 9 85 85 85 85 80 0 0 0 0 0 0 10 170 170 170 170 144 11 255 255 255 255 208 11 255 255 255 255 208 11 255 255 255 255 208 9 85 85 85 85 80 0 0 0 0 0 0 0 0 0 0 0 0 128 2 36 2 0 8 52 68 196 68 212 83 16 68 68 4 64 65 16 4 4 4 128 10 16 68 68 4 68 80 16 68 68 68 68 64 128 68 68 70 4 2 4 68 68 68 84 81]) ; 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: 24; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(#[0 0 0 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 127 255 254 0 0 0 213 245 219 255 255 255 223 255 155 223 255 219 223 255 253 223 255 249 223 255 251 42 170 237]) ; yourself); yourself!

startProjectBuilderIcon
    "ImageEditor openOnClass:self andSelector:#startProjectBuilderIcon"

    <resource: #image>
    ^(Depth4Image new) width: 24; height: 24; photometric:(#palette); bitsPerSample:(#(4 )); 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 85 85 85 85 85 85 80 0 0 0 0 0 0 0 0 0 0 0 0 2 0 0 0 0 33 21 17 81 21 17 80 0 0 0 0 0 82 34 21 82 34 34 16 0 0 0 0 0 82 34 21 82 34 34 16 0 0 0 0 0 81 17 21 81 17 17 16 0 0 0 0 0 85 85 85 85 85 85 80 0 0 0 0 0 85 85 21 85 85 85 16 2 0 0 0 0 82 34 21 82 34 34 16 0 0 0 0 0 82 34 21 82 34 34 16 0 0 0 0 0 81 17 21 81 17 17 16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 17 0 1 0 16 1 0 16 0 17 0 0 16 1 1 0 16 1 0 16 0 16 1 0 0 1 1 0 16 1 0 16 0 16 1 0 17 0 1 0 16 1 0 16 0 16 1 0 16 1 1 0 16 1 0 16 0 16 1 0 0 1 0 2 16 1 0 0 0 0 33 0 17 16 0 17 0 1 0 17 16 17 16]) ; 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:0.0 green:49.9962 blue:49.9962); add:(Color red:49.9962 green:49.9962 blue:0.0); yourself)); mask:((Depth1Image new) width: 24; height: 24; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(#[0 0 0 127 255 0 127 255 0 127 255 96 127 255 48 127 255 56 127 255 60 127 255 62 127 255 56 127 255 104 127 255 4 127 255 4 127 255 2 127 255 2 0 0 0 0 0 0 114 73 28 123 109 158 111 109 155 119 109 155 123 109 155 111 109 155 117 237 223 56 196 238]) ; yourself); yourself!

startSourceCodeBrowserIcon
    "ImageEditor openOnClass:self andSelector:#startSourceCodeBrowserIcon"

    <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 15 255 255 255 255 240 0 0 0 0 0 0 15 255 244 255 255 208 14 170 164 234 170 144 14 170 164 234 170 144 13 85 84 213 85 80 0 0 0 0 0 0 15 255 244 255 255 208 78 170 164 234 170 144 78 170 164 234 170 144 14 170 164 234 170 144 13 85 84 213 85 80 0 0 0 0 0 0 0 0 0 0 0 0 48 51 68 67 48 0 9 72 68 68 73 5 4 4 68 68 68 4 0 4 68 66 68 0 0 4 68 68 68 5 0 68 68 68 68 4 3 115 115 68 112 0 5 1 1 4 65 85]) ; 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: 24; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(#[0 0 0 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 127 255 254 0 0 0 119 255 118 127 255 247 103 255 230 39 255 230 23 255 231 31 255 230 127 255 246 49 18 159]) ; yourself); yourself!

startSystemBrowserIcon
    "ImageEditor openOnClass:self andSelector:#startSystemBrowserIcon"

    <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 15 255 255 255 255 240 0 0 0 0 0 0 15 211 244 253 63 208 14 147 84 233 58 144 14 144 0 233 58 144 13 82 168 213 53 80 0 0 0 0 0 0 15 255 255 255 255 208 14 170 170 170 170 144 14 170 170 170 170 144 14 170 170 170 170 144 13 85 85 85 85 80 0 0 0 0 0 0 0 0 0 0 0 0 192 3 51 12 0 192 37 16 128 146 69 37 16 16 68 65 4 16 16 16 7 239 128 0 16 16 68 16 69 16 16 16 68 16 68 1 192 0 64 195 64 13 5 21 69 85 69 84]) ; 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: 24; height: 24; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(#[0 0 0 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 127 255 254 0 0 0 233 223 254 253 223 255 205 251 108 205 255 228 205 237 246 205 237 227 239 255 255 55 191 190]) ; 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:'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:'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]
!

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
    ]
! !

!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

    activeHelp := false.
    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.8 1998-01-21 11:35:49 tz Exp $'
! !