ToolApplicationModel.st
author tz
Mon, 08 Dec 1997 22:12:11 +0100
changeset 748 1d7cf4eb02a4
parent 745 9a306f58ea68
permissions -rw-r--r--
checkin from browser
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
741
59bf61da6319 intitial checkin
tz
parents:
diff changeset
     1
ApplicationModel subclass:#ToolApplicationModel
745
9a306f58ea68 history support
tz
parents: 741
diff changeset
     2
	instanceVariableNames:'activeHelp timeBlock'
741
59bf61da6319 intitial checkin
tz
parents:
diff changeset
     3
	classVariableNames:''
59bf61da6319 intitial checkin
tz
parents:
diff changeset
     4
	poolDictionaries:''
748
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
     5
	category:'Interface-Advanced-Tools'
741
59bf61da6319 intitial checkin
tz
parents:
diff changeset
     6
!
59bf61da6319 intitial checkin
tz
parents:
diff changeset
     7
745
9a306f58ea68 history support
tz
parents: 741
diff changeset
     8
ToolApplicationModel class instanceVariableNames:'history'
9a306f58ea68 history support
tz
parents: 741
diff changeset
     9
9a306f58ea68 history support
tz
parents: 741
diff changeset
    10
"
9a306f58ea68 history support
tz
parents: 741
diff changeset
    11
 The following class instance variables are inherited by this class:
9a306f58ea68 history support
tz
parents: 741
diff changeset
    12
9a306f58ea68 history support
tz
parents: 741
diff changeset
    13
	ApplicationModel - ClassResources
9a306f58ea68 history support
tz
parents: 741
diff changeset
    14
	Model - 
9a306f58ea68 history support
tz
parents: 741
diff changeset
    15
	Object - 
9a306f58ea68 history support
tz
parents: 741
diff changeset
    16
"
9a306f58ea68 history support
tz
parents: 741
diff changeset
    17
!
9a306f58ea68 history support
tz
parents: 741
diff changeset
    18
741
59bf61da6319 intitial checkin
tz
parents:
diff changeset
    19
!ToolApplicationModel class methodsFor:'documentation'!
59bf61da6319 intitial checkin
tz
parents:
diff changeset
    20
59bf61da6319 intitial checkin
tz
parents:
diff changeset
    21
documentation
59bf61da6319 intitial checkin
tz
parents:
diff changeset
    22
"
748
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
    23
    standard framework for tools; provides hooks for history management,
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
    24
    about menu, help menu etc.
741
59bf61da6319 intitial checkin
tz
parents:
diff changeset
    25
    See concrete subclasses for examples.
59bf61da6319 intitial checkin
tz
parents:
diff changeset
    26
59bf61da6319 intitial checkin
tz
parents:
diff changeset
    27
    [see also:]
59bf61da6319 intitial checkin
tz
parents:
diff changeset
    28
        ApplicationModel
59bf61da6319 intitial checkin
tz
parents:
diff changeset
    29
        ImageEditor
59bf61da6319 intitial checkin
tz
parents:
diff changeset
    30
59bf61da6319 intitial checkin
tz
parents:
diff changeset
    31
    [author:]
59bf61da6319 intitial checkin
tz
parents:
diff changeset
    32
        Thomas Zwick
59bf61da6319 intitial checkin
tz
parents:
diff changeset
    33
"
59bf61da6319 intitial checkin
tz
parents:
diff changeset
    34
! !
59bf61da6319 intitial checkin
tz
parents:
diff changeset
    35
59bf61da6319 intitial checkin
tz
parents:
diff changeset
    36
!ToolApplicationModel class methodsFor:'accessing'!
59bf61da6319 intitial checkin
tz
parents:
diff changeset
    37
59bf61da6319 intitial checkin
tz
parents:
diff changeset
    38
author
59bf61da6319 intitial checkin
tz
parents:
diff changeset
    39
59bf61da6319 intitial checkin
tz
parents:
diff changeset
    40
    ^'unknown'
59bf61da6319 intitial checkin
tz
parents:
diff changeset
    41
!
59bf61da6319 intitial checkin
tz
parents:
diff changeset
    42
59bf61da6319 intitial checkin
tz
parents:
diff changeset
    43
label
59bf61da6319 intitial checkin
tz
parents:
diff changeset
    44
59bf61da6319 intitial checkin
tz
parents:
diff changeset
    45
    |label|
59bf61da6319 intitial checkin
tz
parents:
diff changeset
    46
    label := ''.
59bf61da6319 intitial checkin
tz
parents:
diff changeset
    47
    self name do:
59bf61da6319 intitial checkin
tz
parents:
diff changeset
    48
    [:c|
59bf61da6319 intitial checkin
tz
parents:
diff changeset
    49
        c isUppercase ifTrue: [label := label, $ ].
59bf61da6319 intitial checkin
tz
parents:
diff changeset
    50
        label := label, c
59bf61da6319 intitial checkin
tz
parents:
diff changeset
    51
    ].
59bf61da6319 intitial checkin
tz
parents:
diff changeset
    52
    ^label trimBlanks
59bf61da6319 intitial checkin
tz
parents:
diff changeset
    53
! !
59bf61da6319 intitial checkin
tz
parents:
diff changeset
    54
745
9a306f58ea68 history support
tz
parents: 741
diff changeset
    55
!ToolApplicationModel class methodsFor:'history'!
9a306f58ea68 history support
tz
parents: 741
diff changeset
    56
748
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
    57
getHistory
745
9a306f58ea68 history support
tz
parents: 741
diff changeset
    58
748
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
    59
    ^history ? (history := OrderedCollection new)
745
9a306f58ea68 history support
tz
parents: 741
diff changeset
    60
9a306f58ea68 history support
tz
parents: 741
diff changeset
    61
!
9a306f58ea68 history support
tz
parents: 741
diff changeset
    62
9a306f58ea68 history support
tz
parents: 741
diff changeset
    63
historyMaxSize
9a306f58ea68 history support
tz
parents: 741
diff changeset
    64
9a306f58ea68 history support
tz
parents: 741
diff changeset
    65
    ^10
9a306f58ea68 history support
tz
parents: 741
diff changeset
    66
9a306f58ea68 history support
tz
parents: 741
diff changeset
    67
! !
9a306f58ea68 history support
tz
parents: 741
diff changeset
    68
741
59bf61da6319 intitial checkin
tz
parents:
diff changeset
    69
!ToolApplicationModel class methodsFor:'interface specs'!
59bf61da6319 intitial checkin
tz
parents:
diff changeset
    70
59bf61da6319 intitial checkin
tz
parents:
diff changeset
    71
menuAbout
59bf61da6319 intitial checkin
tz
parents:
diff changeset
    72
    "this window spec was automatically generated by the ST/X MenuEditor"
59bf61da6319 intitial checkin
tz
parents:
diff changeset
    73
59bf61da6319 intitial checkin
tz
parents:
diff changeset
    74
    "do not manually edit this - the builder may not be able to
59bf61da6319 intitial checkin
tz
parents:
diff changeset
    75
     handle the specification if its corrupted."
59bf61da6319 intitial checkin
tz
parents:
diff changeset
    76
59bf61da6319 intitial checkin
tz
parents:
diff changeset
    77
    "
59bf61da6319 intitial checkin
tz
parents:
diff changeset
    78
     MenuEditor new openOnClass:MyApplicationModel andSelector:#menuAbout
59bf61da6319 intitial checkin
tz
parents:
diff changeset
    79
     (Menu new fromLiteralArrayEncoding:(MyApplicationModel menuAbout)) startUp
59bf61da6319 intitial checkin
tz
parents:
diff changeset
    80
    "
59bf61da6319 intitial checkin
tz
parents:
diff changeset
    81
59bf61da6319 intitial checkin
tz
parents:
diff changeset
    82
    <resource: #menu>
59bf61da6319 intitial checkin
tz
parents:
diff changeset
    83
59bf61da6319 intitial checkin
tz
parents:
diff changeset
    84
    ^
59bf61da6319 intitial checkin
tz
parents:
diff changeset
    85
     
59bf61da6319 intitial checkin
tz
parents:
diff changeset
    86
       #(#Menu
59bf61da6319 intitial checkin
tz
parents:
diff changeset
    87
          
59bf61da6319 intitial checkin
tz
parents:
diff changeset
    88
           #(
59bf61da6319 intitial checkin
tz
parents:
diff changeset
    89
             #(#MenuItem
59bf61da6319 intitial checkin
tz
parents:
diff changeset
    90
                #'label:' 'about Smalltalk/X...'
59bf61da6319 intitial checkin
tz
parents:
diff changeset
    91
                #'value:' #openAbout
59bf61da6319 intitial checkin
tz
parents:
diff changeset
    92
            )
59bf61da6319 intitial checkin
tz
parents:
diff changeset
    93
             #(#MenuItem
59bf61da6319 intitial checkin
tz
parents:
diff changeset
    94
                #'label:' '-'
59bf61da6319 intitial checkin
tz
parents:
diff changeset
    95
            )
59bf61da6319 intitial checkin
tz
parents:
diff changeset
    96
             #(#MenuItem
59bf61da6319 intitial checkin
tz
parents:
diff changeset
    97
                #'label:' 'about this application...'
59bf61da6319 intitial checkin
tz
parents:
diff changeset
    98
                #'value:' #openAboutThisApplication
59bf61da6319 intitial checkin
tz
parents:
diff changeset
    99
            )
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   100
          ) nil
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   101
          nil
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   102
      )
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   103
!
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   104
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   105
menuHelp
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   106
    "this window spec was automatically generated by the ST/X MenuEditor"
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   107
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   108
    "do not manually edit this - the builder may not be able to
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   109
     handle the specification if its corrupted."
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   110
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   111
    "
745
9a306f58ea68 history support
tz
parents: 741
diff changeset
   112
     MenuEditor new openOnClass:ToolApplicationModel andSelector:#menuHelp
9a306f58ea68 history support
tz
parents: 741
diff changeset
   113
     (Menu new fromLiteralArrayEncoding:(ToolApplicationModel menuHelp)) startUp
741
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   114
    "
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   115
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   116
    <resource: #menu>
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   117
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   118
    ^
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   119
     
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   120
       #(#Menu
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   121
          
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   122
           #(
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   123
             #(#MenuItem
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   124
                #'label:' 'tutorial'
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   125
                #'value:' #openTutorial
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   126
            )
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   127
             #(#MenuItem
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   128
                #'label:' 'programmer''s guide'
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   129
                #'value:' #openProgrammersGuide
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   130
            )
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   131
             #(#MenuItem
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   132
                #'label:' '-'
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   133
            )
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   134
             #(#MenuItem
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   135
                #'label:' 'class documentation'
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   136
                #'value:' #openClassDocumentation
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   137
            )
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   138
             #(#MenuItem
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   139
                #'label:' '-'
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   140
            )
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   141
             #(#MenuItem
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   142
                #'label:' 'active help'
745
9a306f58ea68 history support
tz
parents: 741
diff changeset
   143
                #'value:' #'activeHelp:'
9a306f58ea68 history support
tz
parents: 741
diff changeset
   144
                #'indication:' #activeHelp
741
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   145
            )
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   146
          ) nil
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   147
          nil
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   148
      )
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   149
! !
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   150
745
9a306f58ea68 history support
tz
parents: 741
diff changeset
   151
!ToolApplicationModel class methodsFor:'resources'!
9a306f58ea68 history support
tz
parents: 741
diff changeset
   152
748
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
   153
compressChanges
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
   154
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
   155
    <resource: #image>
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
   156
    ^(Depth2Image new) width: 32; height: 32; 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 0 3 255 255 255 255 192 0 0 3 252 0 0 3 240 0 0 3 240 0 0 0 240 0 0 3 240 0 0 0 240 0 0 0 0 0 0 0 240 0 0 0 0 0 0 0 240 0 0 0 0 0 0 0 240 0 0 0 0 0 0 0 240 0 0 0 0 0 0 0 240 0 0 0 0 0 0 0 240 0 0 0 0 0 0 0 240 0 0 0 0 0 0 0 240 0 0 0 0 0 0 0 240 0 0 0 0 0 0 0 240 0 0 0 0 0 0 0 240 0 0 0 0 0 0 0 240 0 0 0 128 0 0 0 240 0 0 0 128 0 0 0 240 0 0 0 0 0 0 3 240 0 0 15 255 255 255 255 192 0 0 0 0 0 0 0 0 0 0 0 128 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 128 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 128 0 0 0 0 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 black)); at:3 put:((Color grey:49.0196)); at:4 put:((Color red:44.3137 green:50.5882 blue:56.8627)); yourself)); mask:((ImageMask new) width: 32; height: 32; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(#[0 0 0 0 0 0 0 0 0 31 255 248 0 63 255 252 0 63 255 254 0 62 0 30 0 62 0 30 0 127 0 30 0 127 0 30 0 0 0 30 53 37 118 222 69 87 68 158 71 119 86 222 69 87 84 94 53 85 118 222 0 0 0 30 0 127 0 30 0 127 0 30 0 62 0 30 0 28 0 30 0 28 0 30 0 127 255 254 0 127 255 252 0 127 255 248 0 28 0 0 1 28 64 0 1 156 192 0 1 255 192 0 1 156 192 0 1 28 64 0 0 0 0 0 0 0 0 0]) ; yourself); yourself!
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
   157
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
   158
compressChangesIcon
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
   159
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
   160
    <resource: #image>
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
   161
    ^(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.0196); add:(Color red:44.3137 green:50.5882 blue:56.8627); 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!
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
   162
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
   163
garbageCollectIcon
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
   164
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
   165
    <resource: #image>
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
   166
    ^(Depth4Image new) width: 24; height: 24; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(#[17 0 0 0 0 1 17 17 17 17 17 17 17 0 0 0 0 1 17 17 17 17 17 17 17 0 0 2 34 34 17 17 17 17 17 17 17 0 0 34 34 34 33 18 0 0 17 17 17 0 2 34 0 2 34 34 0 0 17 17 17 0 2 32 0 1 34 34 16 0 0 17 17 0 2 32 0 1 34 34 16 254 0 17 17 0 2 32 0 2 34 34 17 15 224 17 17 0 34 34 0 1 17 17 17 16 254 1 17 2 2 32 32 1 17 17 0 0 15 1 17 32 32 2 2 1 17 0 238 238 224 1 17 0 0 0 0 1 17 1 0 0 15 1 16 0 0 0 0 0 0 1 17 31 255 1 16 0 0 0 0 0 0 1 15 255 14 1 16 0 0 0 0 0 0 1 15 15 14 1 16 0 0 0 0 0 0 1 15 15 14 1 16 0 0 0 0 0 0 1 15 15 14 1 16 0 0 0 0 17 0 1 15 15 14 1 16 0 0 0 0 16 0 1 15 15 14 1 16 0 0 0 0 0 0 1 15 15 14 1 0 0 0 0 0 0 17 1 255 15 254 1 16 0 0 0 0 0 17 0 254 238 224 1 17 17 17 0 0 17 17 17 0 0 1 17 17 17 17 17 16 1 17 17 17 17 17 17 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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:((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.9977 green:0.0 blue:0.0); add:(Color red:0.0 green:49.9977 blue:0.0); add:(Color red:0.0 green:0.0 blue:49.9977); add:(Color red:0.0 green:49.9977 blue:49.9977); add:(Color red:49.9977 green:49.9977 blue:0.0); add:(Color red:49.9977 green:0.0 blue:49.9977); add:(Color grey:49.9977); add:(Color grey:66.9978); yourself)); mask:((Depth1Image new) width: 24; height: 24; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(#[0 0 0 0 0 0 1 240 0 3 249 0 7 31 0 6 15 112 6 15 120 6 31 60 15 0 30 22 128 254 41 67 254 0 3 254 0 163 254 3 243 254 1 67 254 7 227 254 2 131 254 20 3 254 126 83 254 41 251 254 252 163 254 83 243 254 1 64 248 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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!
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
   167
745
9a306f58ea68 history support
tz
parents: 741
diff changeset
   168
icon
9a306f58ea68 history support
tz
parents: 741
diff changeset
   169
748
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
   170
    |iconSelector|
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
   171
    (super respondsTo: (iconSelector := ('start', self name, 'Icon') asSymbol)) ifFalse: [^self stxIcon].
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
   172
    ^(self perform: iconSelector) subImageIn: (0@0 extent: (24@16))
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
   173
!
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
   174
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
   175
newProjectIcon
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
   176
745
9a306f58ea68 history support
tz
parents: 741
diff changeset
   177
    <resource: #image>
748
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
   178
    ^(Depth4Image new) width: 24; height: 24; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(#[17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 0 0 0 0 0 0 0 0 17 17 17 17 0 0 0 0 0 0 0 0 16 17 17 17 0 0 0 0 0 0 0 0 16 1 17 17 0 0 0 0 0 0 0 0 17 17 17 17 0 0 0 0 0 0 0 0 0 0 17 17 0 0 0 0 0 0 0 0 0 0 17 17 0 0 0 0 0 0 0 0 0 0 17 17 1 17 1 16 0 16 0 0 0 0 17 17 1 1 1 1 1 1 0 0 0 0 17 17 1 17 1 16 1 1 1 17 0 0 17 17 1 0 1 1 1 1 0 0 0 0 17 17 1 0 1 1 0 16 0 0 0 0 17 17 0 0 0 0 0 0 0 0 0 0 17 17 0 0 0 0 0 0 0 0 0 0 17 17 1 17 1 17 0 17 1 17 0 0 17 17 0 1 1 0 1 0 0 16 0 0 17 17 0 1 1 16 1 0 0 16 0 0 17 17 0 1 1 0 1 0 0 16 0 0 17 17 1 16 1 17 0 17 0 16 0 0 17 17 0 0 0 0 0 0 0 0 0 0 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17]) ; colorMap:((OrderedCollection new add:(Color white); add:(Color black); 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); add:(Color black); yourself)); mask:((Depth1Image new) width: 24; height: 24; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(#[0 0 0 127 255 224 127 255 240 127 255 248 127 255 252 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 127 255 254 127 255 254 127 255 254 127 255 254 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
   179
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
   180
!
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
   181
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
   182
removeProjectIcon
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
   183
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
   184
    <resource: #image>
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
   185
    ^(Depth2Image new) width: 24; height: 24; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(#[85 85 85 85 85 85 85 85 85 85 85 85 90 0 0 0 5 85 90 128 0 0 4 85 82 160 0 0 4 21 80 168 0 0 37 85 80 42 0 0 168 5 80 10 128 2 160 5 80 2 160 10 128 5 81 81 168 106 0 5 81 17 42 168 0 5 81 81 74 161 80 5 81 1 26 160 0 5 81 1 42 168 0 5 80 0 168 42 0 5 80 2 160 10 128 5 81 90 144 82 160 5 80 42 1 0 168 5 80 169 65 0 106 5 82 161 1 0 74 133 90 129 80 80 66 165 90 0 0 0 0 165 85 85 85 85 85 85 85 85 85 85 85 85]) ; colorMap:((OrderedCollection new add:(Color white); add:(Color black); add:(Color grey:49.9992); 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 127 255 224 127 255 240 127 255 248 127 255 252 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 127 255 254 127 255 254 127 255 254 127 255 254 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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!
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
   186
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
   187
saveIcon
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
   188
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
   189
    <resource: #image>
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
   190
    ^(Depth2Image new) width: 24; height: 24; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(#[85 85 85 85 85 85 89 0 0 0 3 169 105 0 0 0 3 169 105 0 0 0 3 153 105 0 0 0 3 153 105 0 0 0 3 169 105 0 0 0 3 169 105 0 0 0 3 169 105 0 0 0 3 169 105 0 0 0 3 169 105 0 0 0 3 169 105 0 0 0 3 169 105 0 0 0 3 169 107 255 255 255 255 169 106 170 170 170 170 169 106 170 170 170 170 169 106 165 85 85 86 169 106 167 255 255 111 169 106 167 83 255 107 169 106 167 99 255 107 169 106 167 99 255 107 169 106 167 3 255 107 169 90 167 255 255 107 165 85 85 85 85 85 85]) ; 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: 24; height: 24; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(#[0 0 0 63 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 127 255 254 127 255 254 127 255 254 127 255 254 127 255 254 127 255 254 127 255 254 63 255 252 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
   191
!
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
   192
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
   193
startFileBrowserIcon
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
   194
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
   195
    <resource: #image>
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
   196
    ^(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 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 85 85 85 80 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 0 16 65 0 16 16 1 80 65 1 81 80 1 0 65 1 1 0 0 16 65 0 64 64 1 80 65 1 64 16 1 0 65 1 0 16 1 0 64 16 16 80 1 0 65 81 81 64]) ; colorMap:((OrderedCollection new add:(Color black); add:(Color white); add:(Color red:0.0 green:49.9962 blue:49.9962); 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 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 61 179 220 61 179 252 49 179 48 61 179 152 61 179 140 49 179 12 49 191 252 16 157 216]) ; yourself); yourself!
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
   197
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
   198
startGUIBuilderIcon
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
   199
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
   200
    <resource: #image>
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
   201
    ^(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 204 204 204 204 204 204 192 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 114 34 32 17 18 33 16 0 0 0 0 0 39 255 32 34 34 34 32 0 0 0 0 0 34 255 240 34 34 34 32 0 0 0 0 0 39 255 32 34 34 34 32 0 0 0 0 0 34 255 32 34 34 34 32 0 0 0 0 0 39 255 240 34 34 34 32 0 0 0 0 0 34 34 32 255 255 255 240 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 17 17 17 17 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 33 17 16 1 0 1 0 1 16 0 0 0 16 0 0 1 0 1 0 1 0 0 0 0 16 0 0 1 0 1 0 1 0 0 0 0 16 16 16 1 0 1 0 1 0 0 0 0 16 0 16 1 0 1 0 1 0 0 0 0 0 0 16 0 0 17 0 0 0 0 0 0 1 17 16 0 17 16 0 17 16 0 0]) ; colorMap:((OrderedCollection new add:(Color black); add:(Color white); add:(Color grey:66.9978); 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); 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 60 137 192 126 204 224 96 204 192 124 204 192 110 204 192 102 204 192 62 125 192 30 56 224]) ; yourself); yourself!
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
   202
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
   203
startImageEditorIcon
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
   204
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
   205
    <resource: #image>
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
   206
    ^(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 204 204 204 204 204 204 192 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 34 34 32 68 64 101 96 0 0 0 0 0 33 17 32 68 64 86 80 0 0 0 0 0 63 255 32 68 64 101 96 0 0 0 0 0 79 255 32 0 0 0 0 0 0 0 0 0 95 255 32 131 128 119 112 0 0 0 0 0 241 17 16 56 48 119 112 0 0 0 0 0 241 17 16 131 128 119 112 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 16 0 0 0 0 0 0 0 0 0 0 0 16 0 0 16 1 0 0 16 0 17 16 0 16 16 16 16 16 1 1 0 16 16 0 0 16 16 16 16 0 1 1 0 0 0 0 0 16 16 0 16 17 1 1 0 16 17 0 0 16 16 0 16 16 1 1 0 16 16 0 0 16 16 0 16 16 1 0 0 16 0 0 0 16 16 0 16 16 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: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); 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 113 49 156 123 218 222 127 239 56 123 255 216 121 255 124 121 239 120 121 237 252 40 164 238]) ; yourself); yourself!
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
   207
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
   208
startLibraryBuilderIcon
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
   209
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
   210
    <resource: #image>
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
   211
    ^(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 68 68 68 68 68 68 64 0 0 0 0 0 0 0 0 0 0 0 0 2 0 0 0 0 98 82 80 37 37 37 32 0 0 0 0 0 101 37 32 82 82 82 80 0 0 0 0 0 98 82 80 37 37 37 32 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 33 18 33 18 33 18 32 0 0 0 0 0 34 34 34 34 34 34 32 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 17 17 17 17 17 17 16 0 0 0 0 0 17 17 17 17 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 16 0 16 16 0 0 0 0 0 0 0 0 16 16 16 16 16 17 16 0 0 0 16 16 16 16 16 2 16 18 0 0 0 0 16 0 16 0 16 1 16 2 0 0 0 0 16 0 16 16 16 16 16 17 0 0 0 0 16 0 16 16 16 16 16 16 0 0 0 0 16 0 16 16 16 16 16 0 0 0 0 0 16 0 16 16 16 16 17 17 16 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 70 189 192 111 255 224 127 255 192 103 255 192 103 255 192 103 255 128 103 255 192 34 171 224]) ; yourself); yourself!
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
   212
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
   213
startMenuEditorIcon
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
   214
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
   215
    <resource: #image>
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
   216
    ^(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 68 68 68 68 68 68 64 0 0 0 0 0 0 0 0 0 0 0 0 2 0 0 0 0 50 34 32 17 18 33 16 0 0 0 0 0 35 85 32 34 34 34 32 0 0 0 0 0 34 85 80 34 34 34 32 0 0 0 0 0 35 85 32 34 34 34 32 0 0 0 0 0 34 85 32 34 34 34 32 0 0 0 0 0 35 85 80 34 34 34 32 2 0 0 0 0 34 34 32 34 34 34 32 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 17 17 17 17 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 16 0 16 0 1 0 0 0 0 0 0 0 16 17 16 1 1 1 0 16 0 0 16 16 16 16 0 1 1 1 0 16 0 0 16 16 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 16 1 1 0 16 0 0 16 0 16 0 0 16 1 0 0 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 71 243 144 111 255 216 127 159 216 111 159 216 103 223 216 103 159 216 103 219 104 34 233 48]) ; yourself); yourself!
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
   217
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
   218
startNewChangesBrowserIcon
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
   219
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
   220
    <resource: #image>
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
   221
    ^(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 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 5 85 85 85 85 80 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 52 68 192 68 84 81 16 68 68 4 64 65 16 4 4 4 0 0 16 68 68 4 68 80 16 68 68 68 68 64 0 68 68 68 4 0 4 68 68 68 84 81]) ; colorMap:(((Array new:4) at:1 put:((Color black)); at:2 put:((Color white)); at:3 put:((Color red:0.0 green:49.9962 blue: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 84 149 219 255 223 255 223 255 155 223 255 219 223 255 253 223 255 249 95 255 251 42 170 237]) ; yourself); yourself
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
   222
!
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
   223
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
   224
startSourceCodeBrowserIcon
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
   225
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
   226
    <resource: #image>
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
   227
    ^(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 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 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 0 0 0 0 0 0 0 0 192 192 0 0 13 76 68 68 77 21 4 4 68 68 68 16 0 4 68 67 68 0 0 4 68 68 68 20 0 68 68 68 68 16 3 67 67 68 64 0 5 1 1 4 65 21]) ; colorMap:(((Array new:4) at:1 put:((Color black)); at:2 put:((Color white)); at:3 put:((Color red:0.0 green:49.9962 blue: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 50 222 46 127 255 255 103 255 236 39 255 236 23 255 238 31 255 236 123 191 174 49 18 151]) ; yourself); yourself!
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
   228
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
   229
startSystemBrowserIcon
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
   230
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
   231
    <resource: #image>
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
   232
    ^(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 5 81 84 85 21 80 5 81 84 85 21 80 5 80 0 85 21 80 5 81 84 85 21 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 5 85 85 85 85 80 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 53 16 192 81 69 21 16 16 68 65 4 16 16 16 4 48 192 0 16 16 68 16 69 17 16 16 68 16 68 1 0 0 64 0 64 1 5 21 69 85 69 85]) ; colorMap:(((Array new:4) at:1 put:((Color black)); at:2 put:((Color white)); at:3 put:((Color red:0.0 green:49.9962 blue:49.9962)); at:4 put:((Color grey:66.9993)); 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 104 159 254 253 223 255 205 251 108 205 255 238 205 237 247 205 237 227 111 255 255 55 191 191]) ; yourself); yourself
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
   233
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
   234
!
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
   235
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
   236
stxIcon
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
   237
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
   238
    <resource: #image>
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
   239
    ^(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.41176); add:(Color red:0.0 green:80.7843 blue:18.8235); add:(Color black); add:(Color white); yourself)); yourself
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
   240
! !
745
9a306f58ea68 history support
tz
parents: 741
diff changeset
   241
741
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   242
!ToolApplicationModel methodsFor:'accessing menu'!
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   243
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   244
menuAbout
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   245
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   246
    ^ self class menuAbout
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   247
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   248
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   249
!
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   250
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   251
menuHelp
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   252
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   253
    ^ self class menuHelp
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   254
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   255
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   256
! !
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   257
745
9a306f58ea68 history support
tz
parents: 741
diff changeset
   258
!ToolApplicationModel methodsFor:'aspects'!
9a306f58ea68 history support
tz
parents: 741
diff changeset
   259
9a306f58ea68 history support
tz
parents: 741
diff changeset
   260
valueOfInfoLabel
9a306f58ea68 history support
tz
parents: 741
diff changeset
   261
9a306f58ea68 history support
tz
parents: 741
diff changeset
   262
    |holder|
9a306f58ea68 history support
tz
parents: 741
diff changeset
   263
    (holder := builder bindingAt:#valueOfInfoLabel) isNil ifTrue:[
9a306f58ea68 history support
tz
parents: 741
diff changeset
   264
        builder aspectAt:#valueOfInfoLabel put:(holder :=  ValueHolder new).
9a306f58ea68 history support
tz
parents: 741
diff changeset
   265
    ].
9a306f58ea68 history support
tz
parents: 741
diff changeset
   266
    ^ holder
9a306f58ea68 history support
tz
parents: 741
diff changeset
   267
9a306f58ea68 history support
tz
parents: 741
diff changeset
   268
!
9a306f58ea68 history support
tz
parents: 741
diff changeset
   269
9a306f58ea68 history support
tz
parents: 741
diff changeset
   270
valueOfTimeLabel
9a306f58ea68 history support
tz
parents: 741
diff changeset
   271
9a306f58ea68 history support
tz
parents: 741
diff changeset
   272
    |holder|
9a306f58ea68 history support
tz
parents: 741
diff changeset
   273
    (holder := builder bindingAt:#valueOfTimeLabel) isNil ifTrue:[
9a306f58ea68 history support
tz
parents: 741
diff changeset
   274
        builder aspectAt:#valueOfTimeLabel put:(holder :=  ValueHolder new).
9a306f58ea68 history support
tz
parents: 741
diff changeset
   275
    ].
9a306f58ea68 history support
tz
parents: 741
diff changeset
   276
    ^ holder
9a306f58ea68 history support
tz
parents: 741
diff changeset
   277
9a306f58ea68 history support
tz
parents: 741
diff changeset
   278
! !
9a306f58ea68 history support
tz
parents: 741
diff changeset
   279
741
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   280
!ToolApplicationModel methodsFor:'help'!
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   281
745
9a306f58ea68 history support
tz
parents: 741
diff changeset
   282
activeHelp
748
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
   283
    "Answer whether active help is turned on/off"
745
9a306f58ea68 history support
tz
parents: 741
diff changeset
   284
9a306f58ea68 history support
tz
parents: 741
diff changeset
   285
    ^activeHelp
9a306f58ea68 history support
tz
parents: 741
diff changeset
   286
!
9a306f58ea68 history support
tz
parents: 741
diff changeset
   287
9a306f58ea68 history support
tz
parents: 741
diff changeset
   288
activeHelp: aValue
748
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
   289
    "toggle active help"
745
9a306f58ea68 history support
tz
parents: 741
diff changeset
   290
9a306f58ea68 history support
tz
parents: 741
diff changeset
   291
    (activeHelp := aValue)
9a306f58ea68 history support
tz
parents: 741
diff changeset
   292
        ifTrue: [ActiveHelp startFor: self]
9a306f58ea68 history support
tz
parents: 741
diff changeset
   293
        ifFalse: [ActiveHelp stopFor: self]
9a306f58ea68 history support
tz
parents: 741
diff changeset
   294
!
9a306f58ea68 history support
tz
parents: 741
diff changeset
   295
741
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   296
openAbout
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   297
    "show an about box"
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   298
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   299
    |box|
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   300
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   301
    box := AboutBox new.
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   302
    box autoHideAfter:10 with:[].
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   303
    box showAtCenter
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   304
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   305
!
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   306
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   307
openAboutThisApplication
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   308
    "show an about this application box"
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   309
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   310
    (AboutBox title:
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   311
        'The application\\' withCRs,
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   312
        (Text string: self class label emphasis: #bold),
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   313
        '\\has been designed and implemented by \' withCRs,self class author,', eXept Software AG, Germany.  \\' withCRs)
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   314
        label:'About this application...';
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   315
        autoHideAfter:10 with:[];
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   316
        showAtCenter.
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   317
!
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   318
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   319
openClassDocumentation
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   320
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   321
    Autoload autoloadFailedSignal handle:[:ex |
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   322
        self warn:'autoload failed.
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   323
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   324
Check your source directory and/or 
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   325
the abbreviation file for the classes (correct) shortened name.'.
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   326
        ex return.
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   327
    ] do:[
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   328
        |text v|
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   329
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   330
        text := self class htmlDocumentation.
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   331
        text notNil ifTrue:[
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   332
            v := HTMLDocumentView
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   333
                    openFullOnText:text 
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   334
                    inDirectory:(Smalltalk getSystemFileName:'doc/online/english/classDoc').
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   335
            v nameSpaceForExecution: self class nameSpace.
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   336
        ]
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   337
    ]
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   338
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   339
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   340
!
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   341
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   342
openProgrammersGuide
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   343
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   344
    |dir|
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   345
    ((dir := Smalltalk getSystemFileName: 'doc/online/english/programming/TOP.html') asFilename exists)
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   346
    ifTrue:
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   347
    [
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   348
        ^HTMLDocumentView openFullOnFile: dir
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   349
    ]
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   350
!
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   351
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   352
openTutorial
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   353
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   354
    |dir|
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   355
    ((dir := Smalltalk getSystemFileName: 'doc/online/english/getstart/tutorial.html') asFilename exists)
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   356
    ifTrue:
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   357
    [
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   358
        ^HTMLDocumentView openFullOnFile: dir
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   359
    ]
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   360
! !
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   361
745
9a306f58ea68 history support
tz
parents: 741
diff changeset
   362
!ToolApplicationModel methodsFor:'history'!
9a306f58ea68 history support
tz
parents: 741
diff changeset
   363
9a306f58ea68 history support
tz
parents: 741
diff changeset
   364
addToHistory: aHistoryEntry
9a306f58ea68 history support
tz
parents: 741
diff changeset
   365
9a306f58ea68 history support
tz
parents: 741
diff changeset
   366
    self history remove: (self history detect: [:histEntry| histEntry key = aHistoryEntry key] ifNone: nil) ifAbsent: nil.
9a306f58ea68 history support
tz
parents: 741
diff changeset
   367
    self history addFirst: aHistoryEntry.
9a306f58ea68 history support
tz
parents: 741
diff changeset
   368
    [self history size > self class historyMaxSize] whileTrue: [self history removeLast]
9a306f58ea68 history support
tz
parents: 741
diff changeset
   369
!
9a306f58ea68 history support
tz
parents: 741
diff changeset
   370
9a306f58ea68 history support
tz
parents: 741
diff changeset
   371
emptyHistory
9a306f58ea68 history support
tz
parents: 741
diff changeset
   372
9a306f58ea68 history support
tz
parents: 741
diff changeset
   373
    ^self history removeAll
9a306f58ea68 history support
tz
parents: 741
diff changeset
   374
!
9a306f58ea68 history support
tz
parents: 741
diff changeset
   375
9a306f58ea68 history support
tz
parents: 741
diff changeset
   376
history
9a306f58ea68 history support
tz
parents: 741
diff changeset
   377
748
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
   378
    ^self class getHistory
745
9a306f58ea68 history support
tz
parents: 741
diff changeset
   379
!
9a306f58ea68 history support
tz
parents: 741
diff changeset
   380
9a306f58ea68 history support
tz
parents: 741
diff changeset
   381
menuHistory
9a306f58ea68 history support
tz
parents: 741
diff changeset
   382
9a306f58ea68 history support
tz
parents: 741
diff changeset
   383
    |menu a|
9a306f58ea68 history support
tz
parents: 741
diff changeset
   384
    menu := Menu new receiver: self.
9a306f58ea68 history support
tz
parents: 741
diff changeset
   385
    (self history collect: [:histEntry| histEntry value]) asSet asOrderedCollection do:
9a306f58ea68 history support
tz
parents: 741
diff changeset
   386
    [:historyEntryType|    
9a306f58ea68 history support
tz
parents: 741
diff changeset
   387
        menu addItemGroup: ((a := self history select: [:histEntry| histEntry value = historyEntryType]) collect: [:histEntry|  MenuItem new label: histEntry key; value: histEntry value; argument: histEntry key]).
9a306f58ea68 history support
tz
parents: 741
diff changeset
   388
    ]. 
9a306f58ea68 history support
tz
parents: 741
diff changeset
   389
    menu addItem: (MenuItem new label: 'empty history'; value: #emptyHistory).
9a306f58ea68 history support
tz
parents: 741
diff changeset
   390
9a306f58ea68 history support
tz
parents: 741
diff changeset
   391
    ^menu
9a306f58ea68 history support
tz
parents: 741
diff changeset
   392
!
9a306f58ea68 history support
tz
parents: 741
diff changeset
   393
9a306f58ea68 history support
tz
parents: 741
diff changeset
   394
removeFromHistory: aHistoryEntry
9a306f58ea68 history support
tz
parents: 741
diff changeset
   395
9a306f58ea68 history support
tz
parents: 741
diff changeset
   396
    self history remove: (self history detect: [:histEntry| histEntry key = aHistoryEntry key] ifNone: nil) ifAbsent: nil.
748
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
   397
    [self history size > self historyMaxSize] whileTrue: [self history removeLast]
745
9a306f58ea68 history support
tz
parents: 741
diff changeset
   398
! !
9a306f58ea68 history support
tz
parents: 741
diff changeset
   399
9a306f58ea68 history support
tz
parents: 741
diff changeset
   400
!ToolApplicationModel methodsFor:'startup / release'!
9a306f58ea68 history support
tz
parents: 741
diff changeset
   401
748
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
   402
close
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
   403
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
   404
    activeHelp ifTrue: [ActiveHelp stopFor: self].
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
   405
    Processor removeTimedBlock:timeBlock.
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
   406
    timeBlock := nil.
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
   407
    super close
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
   408
!
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
   409
745
9a306f58ea68 history support
tz
parents: 741
diff changeset
   410
closeRequest
9a306f58ea68 history support
tz
parents: 741
diff changeset
   411
9a306f58ea68 history support
tz
parents: 741
diff changeset
   412
    activeHelp ifTrue: [ActiveHelp stopFor: self].
9a306f58ea68 history support
tz
parents: 741
diff changeset
   413
    Processor removeTimedBlock:timeBlock.
748
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
   414
    timeBlock := nil.
745
9a306f58ea68 history support
tz
parents: 741
diff changeset
   415
    super closeRequest
9a306f58ea68 history support
tz
parents: 741
diff changeset
   416
!
9a306f58ea68 history support
tz
parents: 741
diff changeset
   417
9a306f58ea68 history support
tz
parents: 741
diff changeset
   418
initialize
9a306f58ea68 history support
tz
parents: 741
diff changeset
   419
9a306f58ea68 history support
tz
parents: 741
diff changeset
   420
    activeHelp := false.
748
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
   421
    timeBlock := nil.
745
9a306f58ea68 history support
tz
parents: 741
diff changeset
   422
    timeBlock := [self showTime].
748
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
   423
    self showTime
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
   424
!
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
   425
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
   426
restarted
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
   427
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
   428
    self initialize
745
9a306f58ea68 history support
tz
parents: 741
diff changeset
   429
! !
9a306f58ea68 history support
tz
parents: 741
diff changeset
   430
9a306f58ea68 history support
tz
parents: 741
diff changeset
   431
!ToolApplicationModel methodsFor:'window events'!
9a306f58ea68 history support
tz
parents: 741
diff changeset
   432
9a306f58ea68 history support
tz
parents: 741
diff changeset
   433
showTime
9a306f58ea68 history support
tz
parents: 741
diff changeset
   434
9a306f58ea68 history support
tz
parents: 741
diff changeset
   435
    |hours minutes suffix|
748
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
   436
    suffix := ' am '.  
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
   437
    (hours := Time now hours) > 12 ifTrue: [hours := hours - 12].
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
   438
    Time now hours >= 12 ifTrue: [suffix := ' pm '].
745
9a306f58ea68 history support
tz
parents: 741
diff changeset
   439
    (minutes := Time now minutes printString) size = 1 ifTrue: [minutes := '0', minutes printString].
9a306f58ea68 history support
tz
parents: 741
diff changeset
   440
    self valueOfTimeLabel value: hours printString, ':', minutes, suffix.
9a306f58ea68 history support
tz
parents: 741
diff changeset
   441
    Processor addTimedBlock: timeBlock afterSeconds: 1
9a306f58ea68 history support
tz
parents: 741
diff changeset
   442
9a306f58ea68 history support
tz
parents: 741
diff changeset
   443
! !
9a306f58ea68 history support
tz
parents: 741
diff changeset
   444
741
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   445
!ToolApplicationModel class methodsFor:'documentation'!
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   446
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   447
version
748
1d7cf4eb02a4 checkin from browser
tz
parents: 745
diff changeset
   448
    ^ '$Header: /cvs/stx/stx/libview2/ToolApplicationModel.st,v 1.3 1997-12-08 21:12:11 tz Exp $'
741
59bf61da6319 intitial checkin
tz
parents:
diff changeset
   449
! !