UIHelpTool.st
author Claus Gittinger <cg@exept.de>
Tue, 07 May 2013 19:39:57 +0200
changeset 3005 9c5e0717155e
parent 2934 c01fe2833468
child 3010 12d3f7411fb6
permissions -rw-r--r--
class: Tools::ProjectBuilderAssistantApplication changed: #checkCompilerAvailability
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
156
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 151
diff changeset
     1
"
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 151
diff changeset
     2
 COPYRIGHT (c) 1995 by eXept Software AG
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
     3
	      All Rights Reserved
156
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 151
diff changeset
     4
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 151
diff changeset
     5
 This software is furnished under a license and may be used
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 151
diff changeset
     6
 only in accordance with the terms of that license and with the
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 151
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 151
diff changeset
     8
 be provided or otherwise made available to, or used by, any
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 151
diff changeset
     9
 other person.  No title to or ownership of the software is
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 151
diff changeset
    10
 hereby transferred.
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 151
diff changeset
    11
"
1554
d5e4612bf7cf implements -> includesSelector
Claus Gittinger <cg@exept.de>
parents: 1506
diff changeset
    12
"{ Package: 'stx:libtool2' }"
d5e4612bf7cf implements -> includesSelector
Claus Gittinger <cg@exept.de>
parents: 1506
diff changeset
    13
1772
e33aee13defe Use 'Discard Changes and Exit' instead of 'Forget it...'
Stefan Vogel <sv@exept.de>
parents: 1737
diff changeset
    14
ResourceSpecEditor subclass:#UIHelpTool
e33aee13defe Use 'Discard Changes and Exit' instead of 'Forget it...'
Stefan Vogel <sv@exept.de>
parents: 1737
diff changeset
    15
	instanceVariableNames:'classItemList classItemModel keyItemModel helpTextView
e33aee13defe Use 'Discard Changes and Exit' instead of 'Forget it...'
Stefan Vogel <sv@exept.de>
parents: 1737
diff changeset
    16
		modifiedHolder contentsModifiedChannel editModel'
148
785417b6955d intitial checkin
ca
parents:
diff changeset
    17
	classVariableNames:''
785417b6955d intitial checkin
ca
parents:
diff changeset
    18
	poolDictionaries:''
785417b6955d intitial checkin
ca
parents:
diff changeset
    19
	category:'Interface-UIPainter'
785417b6955d intitial checkin
ca
parents:
diff changeset
    20
!
785417b6955d intitial checkin
ca
parents:
diff changeset
    21
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
    22
HierarchicalItem subclass:#ClassItem
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
    23
	instanceVariableNames:'theClass list modified'
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
    24
	classVariableNames:''
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
    25
	poolDictionaries:''
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
    26
	privateIn:UIHelpTool
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
    27
!
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
    28
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
    29
HierarchicalItem subclass:#KeyItem
1681
7a8e5df3f07d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
    30
	instanceVariableNames:'helpKey helpText flyByText modified icon'
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
    31
	classVariableNames:''
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
    32
	poolDictionaries:''
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
    33
	privateIn:UIHelpTool
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
    34
!
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
    35
148
785417b6955d intitial checkin
ca
parents:
diff changeset
    36
!UIHelpTool class methodsFor:'documentation'!
785417b6955d intitial checkin
ca
parents:
diff changeset
    37
156
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 151
diff changeset
    38
copyright
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 151
diff changeset
    39
"
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 151
diff changeset
    40
 COPYRIGHT (c) 1995 by eXept Software AG
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
    41
	      All Rights Reserved
156
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 151
diff changeset
    42
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 151
diff changeset
    43
 This software is furnished under a license and may be used
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 151
diff changeset
    44
 only in accordance with the terms of that license and with the
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 151
diff changeset
    45
 inclusion of the above copyright notice.   This software may not
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 151
diff changeset
    46
 be provided or otherwise made available to, or used by, any
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 151
diff changeset
    47
 other person.  No title to or ownership of the software is
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 151
diff changeset
    48
 hereby transferred.
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 151
diff changeset
    49
"
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 151
diff changeset
    50
!
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 151
diff changeset
    51
148
785417b6955d intitial checkin
ca
parents:
diff changeset
    52
documentation
785417b6955d intitial checkin
ca
parents:
diff changeset
    53
"
779
2ffa22f97d5d comments + documentation
tz
parents: 761
diff changeset
    54
    The Help Tool allows you to define help dictionaries for the widgets in
761
91e524583390 do not save, if help texts have not changed (unformatting)
tz
parents: 750
diff changeset
    55
    window applications. The tool are able to run stand alone or in other master 
740
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
    56
    applications like the GUI Painter and the Menu Editor.
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
    57
    If the application responds to the selector #showHelp:aHelpText for:aView,
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
    58
    this selector is called by the widget's view when the mouse cursor moves over. 
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
    59
    If the application does not responds to that selector, and the activeHelp mode
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
    60
    is enabled, an active help bubble is shown at the widget's view.
156
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 151
diff changeset
    61
779
2ffa22f97d5d comments + documentation
tz
parents: 761
diff changeset
    62
    [instance variables:]
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
    63
	specClass       <Symbol>        class implementing the help spec
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
    64
	specSelector    <Symbol>        selector returning the help spec
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
    65
	classItemList                   the list of classItems
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
    66
	classItemModel                  keeps the selected class
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
    67
	keyItemModel                    keeps the selected helpKey
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
    68
	modifiedHolder  <ValueHolder>   true if the editField or contents changed
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
    69
	editModel                       keeps the current helpKey
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
    70
	helpTextView                    the view which shows the helpText
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
    71
	contentsModifiedChannel         true if the helpText is modified
779
2ffa22f97d5d comments + documentation
tz
parents: 761
diff changeset
    72
156
b332d7117c40 added copyrights
Claus Gittinger <cg@exept.de>
parents: 151
diff changeset
    73
    [author:]
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
    74
	Claus Atzkern, eXept Software AG
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
    75
	Thomas Zwick,  eXept Software AG
148
785417b6955d intitial checkin
ca
parents:
diff changeset
    76
"
785417b6955d intitial checkin
ca
parents:
diff changeset
    77
! !
785417b6955d intitial checkin
ca
parents:
diff changeset
    78
286
23712b1d3f3d checkin from browser
ca
parents: 261
diff changeset
    79
!UIHelpTool class methodsFor:'instance creation'!
23712b1d3f3d checkin from browser
ca
parents: 261
diff changeset
    80
832
2c5b61b168e8 allow #open (its in the docu !)
Claus Gittinger <cg@exept.de>
parents: 779
diff changeset
    81
open
833
ff2f237a309a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 832
diff changeset
    82
    ^ self openOnClass:nil.
832
2c5b61b168e8 allow #open (its in the docu !)
Claus Gittinger <cg@exept.de>
parents: 779
diff changeset
    83
!
2c5b61b168e8 allow #open (its in the docu !)
Claus Gittinger <cg@exept.de>
parents: 779
diff changeset
    84
286
23712b1d3f3d checkin from browser
ca
parents: 261
diff changeset
    85
openOnClass:aClass
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
    86
    "opens a Help Tool on aClass
286
23712b1d3f3d checkin from browser
ca
parents: 261
diff changeset
    87
    "
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
    88
    ^ self openOnClass:aClass andSelector:#helpSpec
750
9b705e31d38e some cleans
tz
parents: 740
diff changeset
    89
! !
9b705e31d38e some cleans
tz
parents: 740
diff changeset
    90
286
23712b1d3f3d checkin from browser
ca
parents: 261
diff changeset
    91
!UIHelpTool class methodsFor:'constants'!
23712b1d3f3d checkin from browser
ca
parents: 261
diff changeset
    92
23712b1d3f3d checkin from browser
ca
parents: 261
diff changeset
    93
label
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
    94
    "returns the label; used if embedded as sub canvas in the GUI Painter or Menu Editor
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
    95
    "
696
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
    96
    ^'Help'
286
23712b1d3f3d checkin from browser
ca
parents: 261
diff changeset
    97
! !
23712b1d3f3d checkin from browser
ca
parents: 261
diff changeset
    98
1772
e33aee13defe Use 'Discard Changes and Exit' instead of 'Forget it...'
Stefan Vogel <sv@exept.de>
parents: 1737
diff changeset
    99
!UIHelpTool class methodsFor:'defaults'!
e33aee13defe Use 'Discard Changes and Exit' instead of 'Forget it...'
Stefan Vogel <sv@exept.de>
parents: 1737
diff changeset
   100
e33aee13defe Use 'Discard Changes and Exit' instead of 'Forget it...'
Stefan Vogel <sv@exept.de>
parents: 1737
diff changeset
   101
resourceType
e33aee13defe Use 'Discard Changes and Exit' instead of 'Forget it...'
Stefan Vogel <sv@exept.de>
parents: 1737
diff changeset
   102
    "get the type of the resource of the method generated by the UIHelpTool"
e33aee13defe Use 'Discard Changes and Exit' instead of 'Forget it...'
Stefan Vogel <sv@exept.de>
parents: 1737
diff changeset
   103
e33aee13defe Use 'Discard Changes and Exit' instead of 'Forget it...'
Stefan Vogel <sv@exept.de>
parents: 1737
diff changeset
   104
    ^ #help
e33aee13defe Use 'Discard Changes and Exit' instead of 'Forget it...'
Stefan Vogel <sv@exept.de>
parents: 1737
diff changeset
   105
! !
e33aee13defe Use 'Discard Changes and Exit' instead of 'Forget it...'
Stefan Vogel <sv@exept.de>
parents: 1737
diff changeset
   106
151
ca
parents: 148
diff changeset
   107
!UIHelpTool class methodsFor:'help specs'!
ca
parents: 148
diff changeset
   108
ca
parents: 148
diff changeset
   109
helpSpec
740
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   110
    "This resource specification was automatically generated
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   111
     by the UIHelpTool of ST/X."
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   112
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   113
    "Do not manually edit this!! If it is corrupted,
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   114
     the UIHelpTool may not be able to read the specification."
292
af69e3e025a9 an empty selection is specified by 0
ca
parents: 286
diff changeset
   115
172
10e8e0510baa helpSpec no longer under UIPainter
ca
parents: 156
diff changeset
   116
    "
740
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   117
     UIHelpTool openOnClass:UIHelpTool    
292
af69e3e025a9 an empty selection is specified by 0
ca
parents: 286
diff changeset
   118
    "
af69e3e025a9 an empty selection is specified by 0
ca
parents: 286
diff changeset
   119
740
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   120
    <resource: #help>
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   121
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   122
    ^ super helpSpec addPairsFrom:#(
151
ca
parents: 148
diff changeset
   123
696
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   124
#addHelpTextKey
1340
4276358d937b added update function; changed layout
Claus Gittinger <cg@exept.de>
parents: 1336
diff changeset
   125
'Adds the key to the help spec.'
696
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   126
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   127
#currentHelpTexts
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   128
'Selected help text key.'
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   129
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   130
#deleteHelpTextKey
1340
4276358d937b added update function; changed layout
Claus Gittinger <cg@exept.de>
parents: 1336
diff changeset
   131
'Deletes the key from the help spec.'
4276358d937b added update function; changed layout
Claus Gittinger <cg@exept.de>
parents: 1336
diff changeset
   132
750
9b705e31d38e some cleans
tz
parents: 740
diff changeset
   133
#fileLoad
9b705e31d38e some cleans
tz
parents: 740
diff changeset
   134
'Opens a dialog for selecting and loading a help spec from a class.'
9b705e31d38e some cleans
tz
parents: 740
diff changeset
   135
9b705e31d38e some cleans
tz
parents: 740
diff changeset
   136
#fileSave
1340
4276358d937b added update function; changed layout
Claus Gittinger <cg@exept.de>
parents: 1336
diff changeset
   137
'Saves the current help spec.'
4276358d937b added update function; changed layout
Claus Gittinger <cg@exept.de>
parents: 1336
diff changeset
   138
4276358d937b added update function; changed layout
Claus Gittinger <cg@exept.de>
parents: 1336
diff changeset
   139
#fileUpdate
4276358d937b added update function; changed layout
Claus Gittinger <cg@exept.de>
parents: 1336
diff changeset
   140
'Reload the help spec.'
696
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   141
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   142
#helpTextView
1622
766547778a34 Help strings
Stefan Vogel <sv@exept.de>
parents: 1620
diff changeset
   143
'Shows the help text. Menu action ''Accept'' commits changes'
696
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   144
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   145
#listOfClasses
1340
4276358d937b added update function; changed layout
Claus Gittinger <cg@exept.de>
parents: 1336
diff changeset
   146
'Classes where help specs can be/are implemented.'
696
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   147
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   148
#listOfHelpTexts
1340
4276358d937b added update function; changed layout
Claus Gittinger <cg@exept.de>
parents: 1336
diff changeset
   149
'List of help text keys.'
696
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   150
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   151
#removeHelpTextKey
1340
4276358d937b added update function; changed layout
Claus Gittinger <cg@exept.de>
parents: 1336
diff changeset
   152
'Removes the help message from the widget.'
172
10e8e0510baa helpSpec no longer under UIPainter
ca
parents: 156
diff changeset
   153
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   154
#updateHelpTextKey
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   155
'Refetch the help spec.'
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   156
172
10e8e0510baa helpSpec no longer under UIPainter
ca
parents: 156
diff changeset
   157
)
151
ca
parents: 148
diff changeset
   158
! !
ca
parents: 148
diff changeset
   159
148
785417b6955d intitial checkin
ca
parents:
diff changeset
   160
!UIHelpTool class methodsFor:'interface specs'!
785417b6955d intitial checkin
ca
parents:
diff changeset
   161
1982
a60283327f16 hide some menu items when in browser
Claus Gittinger <cg@exept.de>
parents: 1973
diff changeset
   162
innerSpec
740
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   163
    "This resource specification was automatically generated
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   164
     by the UIPainter of ST/X."
148
785417b6955d intitial checkin
ca
parents:
diff changeset
   165
740
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   166
    "Do not manually edit this!! If it is corrupted,
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   167
     the UIPainter may not be able to read the specification."
148
785417b6955d intitial checkin
ca
parents:
diff changeset
   168
785417b6955d intitial checkin
ca
parents:
diff changeset
   169
    "
1982
a60283327f16 hide some menu items when in browser
Claus Gittinger <cg@exept.de>
parents: 1973
diff changeset
   170
     UIPainter new openOnClass:UIHelpTool andSelector:#innerSpec
a60283327f16 hide some menu items when in browser
Claus Gittinger <cg@exept.de>
parents: 1973
diff changeset
   171
     UIHelpTool new openInterface:#innerSpec
148
785417b6955d intitial checkin
ca
parents:
diff changeset
   172
    "
785417b6955d intitial checkin
ca
parents:
diff changeset
   173
785417b6955d intitial checkin
ca
parents:
diff changeset
   174
    <resource: #canvas>
785417b6955d intitial checkin
ca
parents:
diff changeset
   175
1302
f13d0e144c82 unmap previous canvasView; prepare focus sequence
ca
parents: 1243
diff changeset
   176
    ^ 
1737
de6abd3c55d2 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1735
diff changeset
   177
     #(FullSpec
1982
a60283327f16 hide some menu items when in browser
Claus Gittinger <cg@exept.de>
parents: 1973
diff changeset
   178
        name: innerSpec
1737
de6abd3c55d2 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1735
diff changeset
   179
        window: 
de6abd3c55d2 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1735
diff changeset
   180
       (WindowSpec
de6abd3c55d2 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1735
diff changeset
   181
          label: 'UIHelpTool'
de6abd3c55d2 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1735
diff changeset
   182
          name: 'UIHelpTool'
de6abd3c55d2 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1735
diff changeset
   183
          min: (Point 10 10)
1973
58e2df779faa code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1777
diff changeset
   184
          bounds: (Rectangle 0 0 461 293)
1737
de6abd3c55d2 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1735
diff changeset
   185
        )
de6abd3c55d2 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1735
diff changeset
   186
        component: 
de6abd3c55d2 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1735
diff changeset
   187
       (SpecCollection
de6abd3c55d2 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1735
diff changeset
   188
          collection: (
de6abd3c55d2 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1735
diff changeset
   189
           (VariableVerticalPanelSpec
de6abd3c55d2 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1735
diff changeset
   190
              name: 'PanelVrt'
de6abd3c55d2 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1735
diff changeset
   191
              layout: (LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
de6abd3c55d2 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1735
diff changeset
   192
              component: 
de6abd3c55d2 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1735
diff changeset
   193
             (SpecCollection
de6abd3c55d2 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1735
diff changeset
   194
                collection: (
de6abd3c55d2 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1735
diff changeset
   195
                 (VariableHorizontalPanelSpec
de6abd3c55d2 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1735
diff changeset
   196
                    name: 'PanelHrz'
de6abd3c55d2 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1735
diff changeset
   197
                    component: 
de6abd3c55d2 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1735
diff changeset
   198
                   (SpecCollection
de6abd3c55d2 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1735
diff changeset
   199
                      collection: (
de6abd3c55d2 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1735
diff changeset
   200
                       (HierarchicalListViewSpec
de6abd3c55d2 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1735
diff changeset
   201
                          name: 'keyItemModel'
de6abd3c55d2 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1735
diff changeset
   202
                          model: keyItemModel
de6abd3c55d2 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1735
diff changeset
   203
                          menu: keyItemMenu
de6abd3c55d2 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1735
diff changeset
   204
                          hasHorizontalScrollBar: true
de6abd3c55d2 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1735
diff changeset
   205
                          hasVerticalScrollBar: true
de6abd3c55d2 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1735
diff changeset
   206
                          miniScrollerHorizontal: true
de6abd3c55d2 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1735
diff changeset
   207
                          miniScrollerVertical: false
de6abd3c55d2 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1735
diff changeset
   208
                          listModel: keyItemListHolder
de6abd3c55d2 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1735
diff changeset
   209
                          useIndex: false
de6abd3c55d2 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1735
diff changeset
   210
                          highlightMode: label
de6abd3c55d2 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1735
diff changeset
   211
                          showLines: false
de6abd3c55d2 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1735
diff changeset
   212
                          showIndicators: false
de6abd3c55d2 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1735
diff changeset
   213
                          showLeftIndicators: false
de6abd3c55d2 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1735
diff changeset
   214
                          useDefaultIcons: false
de6abd3c55d2 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1735
diff changeset
   215
                          autoScrollHorizontal: false
de6abd3c55d2 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1735
diff changeset
   216
                        )
de6abd3c55d2 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1735
diff changeset
   217
                       (ViewSpec
de6abd3c55d2 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1735
diff changeset
   218
                          name: 'classItemList'
de6abd3c55d2 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1735
diff changeset
   219
                          component: 
de6abd3c55d2 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1735
diff changeset
   220
                         (SpecCollection
de6abd3c55d2 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1735
diff changeset
   221
                            collection: (
de6abd3c55d2 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1735
diff changeset
   222
                             (InputFieldSpec
de6abd3c55d2 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1735
diff changeset
   223
                                name: 'editModel'
de6abd3c55d2 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1735
diff changeset
   224
                                layout: (LayoutFrame 0 0.0 2 0 -1 1.0 25 0)
de6abd3c55d2 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1735
diff changeset
   225
                                activeHelpKey: currentHelpTexts
de6abd3c55d2 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1735
diff changeset
   226
                                model: editModel
de6abd3c55d2 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1735
diff changeset
   227
                                immediateAccept: true
de6abd3c55d2 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1735
diff changeset
   228
                                acceptOnReturn: false
de6abd3c55d2 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1735
diff changeset
   229
                                acceptOnTab: false
de6abd3c55d2 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1735
diff changeset
   230
                                acceptOnLostFocus: false
de6abd3c55d2 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1735
diff changeset
   231
                                acceptOnPointerLeave: false
de6abd3c55d2 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1735
diff changeset
   232
                              )
de6abd3c55d2 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1735
diff changeset
   233
                             (SelectionInListModelViewSpec
de6abd3c55d2 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1735
diff changeset
   234
                                name: 'classItemModel'
de6abd3c55d2 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1735
diff changeset
   235
                                layout: (LayoutFrame 0 0.0 27 0.0 0 1.0 0 1.0)
de6abd3c55d2 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1735
diff changeset
   236
                                model: classItemModel
de6abd3c55d2 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1735
diff changeset
   237
                                hasHorizontalScrollBar: true
de6abd3c55d2 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1735
diff changeset
   238
                                hasVerticalScrollBar: true
de6abd3c55d2 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1735
diff changeset
   239
                                miniScrollerHorizontal: true
de6abd3c55d2 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1735
diff changeset
   240
                                miniScrollerVertical: true
de6abd3c55d2 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1735
diff changeset
   241
                                autoHideScrollBars: false
de6abd3c55d2 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1735
diff changeset
   242
                                listModel: classItemListHolder
de6abd3c55d2 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1735
diff changeset
   243
                                useIndex: false
de6abd3c55d2 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1735
diff changeset
   244
                                highlightMode: label
de6abd3c55d2 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1735
diff changeset
   245
                              )
de6abd3c55d2 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1735
diff changeset
   246
                             )
1340
4276358d937b added update function; changed layout
Claus Gittinger <cg@exept.de>
parents: 1336
diff changeset
   247
                           
1737
de6abd3c55d2 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1735
diff changeset
   248
                          )
de6abd3c55d2 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1735
diff changeset
   249
                        )
de6abd3c55d2 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1735
diff changeset
   250
                       )
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   251
                     
1737
de6abd3c55d2 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1735
diff changeset
   252
                    )
de6abd3c55d2 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1735
diff changeset
   253
                    handles: (Any 0.607375 1.0)
de6abd3c55d2 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1735
diff changeset
   254
                  )
de6abd3c55d2 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1735
diff changeset
   255
                 (ArbitraryComponentSpec
de6abd3c55d2 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1735
diff changeset
   256
                    name: 'helpTextView'
de6abd3c55d2 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1735
diff changeset
   257
                    hasHorizontalScrollBar: true
de6abd3c55d2 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1735
diff changeset
   258
                    hasVerticalScrollBar: true
de6abd3c55d2 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1735
diff changeset
   259
                    miniScrollerHorizontal: true
de6abd3c55d2 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1735
diff changeset
   260
                    miniScrollerVertical: true
de6abd3c55d2 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1735
diff changeset
   261
                    hasBorder: false
de6abd3c55d2 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1735
diff changeset
   262
                    component: helpTextView
de6abd3c55d2 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1735
diff changeset
   263
                  )
de6abd3c55d2 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1735
diff changeset
   264
                 )
1302
f13d0e144c82 unmap previous canvasView; prepare focus sequence
ca
parents: 1243
diff changeset
   265
               
1737
de6abd3c55d2 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1735
diff changeset
   266
              )
de6abd3c55d2 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1735
diff changeset
   267
              handles: (Any 0.679181 1.0)
de6abd3c55d2 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1735
diff changeset
   268
            )
de6abd3c55d2 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1735
diff changeset
   269
           )
1302
f13d0e144c82 unmap previous canvasView; prepare focus sequence
ca
parents: 1243
diff changeset
   270
         
1737
de6abd3c55d2 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1735
diff changeset
   271
        )
148
785417b6955d intitial checkin
ca
parents:
diff changeset
   272
      )
696
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   273
!
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   274
1982
a60283327f16 hide some menu items when in browser
Claus Gittinger <cg@exept.de>
parents: 1973
diff changeset
   275
windowSpec
740
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   276
    "This resource specification was automatically generated
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   277
     by the UIPainter of ST/X."
696
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   278
740
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   279
    "Do not manually edit this!! If it is corrupted,
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   280
     the UIPainter may not be able to read the specification."
696
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   281
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   282
    "
1982
a60283327f16 hide some menu items when in browser
Claus Gittinger <cg@exept.de>
parents: 1973
diff changeset
   283
     UIPainter new openOnClass:UIHelpTool andSelector:#windowSpec
a60283327f16 hide some menu items when in browser
Claus Gittinger <cg@exept.de>
parents: 1973
diff changeset
   284
     UIHelpTool new openInterface:#windowSpec
a60283327f16 hide some menu items when in browser
Claus Gittinger <cg@exept.de>
parents: 1973
diff changeset
   285
     UIHelpTool open
696
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   286
    "
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   287
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   288
    <resource: #canvas>
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   289
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   290
    ^ 
1737
de6abd3c55d2 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1735
diff changeset
   291
     #(FullSpec
1982
a60283327f16 hide some menu items when in browser
Claus Gittinger <cg@exept.de>
parents: 1973
diff changeset
   292
        name: windowSpec
1737
de6abd3c55d2 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1735
diff changeset
   293
        window: 
de6abd3c55d2 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1735
diff changeset
   294
       (WindowSpec
de6abd3c55d2 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1735
diff changeset
   295
          label: 'Help Tool'
de6abd3c55d2 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1735
diff changeset
   296
          name: 'Help Tool'
de6abd3c55d2 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1735
diff changeset
   297
          min: (Point 300 300)
1982
a60283327f16 hide some menu items when in browser
Claus Gittinger <cg@exept.de>
parents: 1973
diff changeset
   298
          bounds: (Rectangle 0 0 498 429)
1737
de6abd3c55d2 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1735
diff changeset
   299
          menu: menu
de6abd3c55d2 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1735
diff changeset
   300
        )
de6abd3c55d2 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1735
diff changeset
   301
        component: 
de6abd3c55d2 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1735
diff changeset
   302
       (SpecCollection
de6abd3c55d2 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1735
diff changeset
   303
          collection: (
2002
caa9b0a1e638 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1989
diff changeset
   304
           (ViewSpec
caa9b0a1e638 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1989
diff changeset
   305
              name: 'mainPanel'
caa9b0a1e638 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1989
diff changeset
   306
              layout: (LayoutFrame 0 0.0 0 0.0 0 1.0 -24 1.0)
caa9b0a1e638 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1989
diff changeset
   307
              component: 
caa9b0a1e638 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1989
diff changeset
   308
             (SpecCollection
caa9b0a1e638 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1989
diff changeset
   309
                collection: (
caa9b0a1e638 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1989
diff changeset
   310
                 (UISubSpecification
caa9b0a1e638 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1989
diff changeset
   311
                    name: 'innerSpec'
caa9b0a1e638 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1989
diff changeset
   312
                    layout: (LayoutFrame 0 0.0 0 0.0 0 1.0 -24 1.0)
caa9b0a1e638 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1989
diff changeset
   313
                    minorKey: innerSpec
caa9b0a1e638 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1989
diff changeset
   314
                  )
caa9b0a1e638 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1989
diff changeset
   315
                 (UISubSpecification
caa9b0a1e638 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1989
diff changeset
   316
                    name: 'windowSpecForCommit'
caa9b0a1e638 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1989
diff changeset
   317
                    layout: (LayoutFrame 0 0.0 -24 1.0 0 1.0 0 1.0)
caa9b0a1e638 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1989
diff changeset
   318
                    majorKey: ToolApplicationModel
caa9b0a1e638 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1989
diff changeset
   319
                    minorKey: windowSpecForCommit
caa9b0a1e638 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1989
diff changeset
   320
                  )
caa9b0a1e638 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1989
diff changeset
   321
                 )
caa9b0a1e638 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1989
diff changeset
   322
               
caa9b0a1e638 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1989
diff changeset
   323
              )
1737
de6abd3c55d2 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1735
diff changeset
   324
            )
de6abd3c55d2 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1735
diff changeset
   325
           (UISubSpecification
2002
caa9b0a1e638 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1989
diff changeset
   326
              name: 'infoBarSubSpec'
1737
de6abd3c55d2 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1735
diff changeset
   327
              layout: (LayoutFrame 0 0 -24 1 0 1 0 1)
de6abd3c55d2 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1735
diff changeset
   328
              majorKey: ToolApplicationModel
de6abd3c55d2 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1735
diff changeset
   329
              minorKey: windowSpecForInfoBar
de6abd3c55d2 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1735
diff changeset
   330
            )
de6abd3c55d2 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1735
diff changeset
   331
           )
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   332
         
1737
de6abd3c55d2 Delete #max: (- windowsize) in windowSpecs
Stefan Vogel <sv@exept.de>
parents: 1735
diff changeset
   333
        )
696
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   334
      )
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   335
! !
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   336
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   337
!UIHelpTool class methodsFor:'menu specs'!
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   338
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   339
helpTextMenu
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   340
    "This resource specification was automatically generated
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   341
     by the MenuEditor of ST/X."
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   342
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   343
    "Do not manually edit this!! If it is corrupted,
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   344
     the MenuEditor may not be able to read the specification."
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   345
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   346
    "
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   347
     MenuEditor new openOnClass:UIHelpTool andSelector:#helpTextMenu
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   348
     (Menu new fromLiteralArrayEncoding:(UIHelpTool helpTextMenu)) startUp
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   349
    "
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   350
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   351
    <resource: #menu>
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   352
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   353
    ^ 
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   354
     #(#Menu
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   355
	#(
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   356
	 #(#MenuItem
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   357
	    #activeHelpKey: #commitOK
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   358
	    #enabled: #contentsModifiedChannel
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   359
	    #label: 'Accept'
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   360
	    #itemValue: #accept
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   361
	    #translateLabel: true
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   362
	  )
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   363
	 #(#MenuItem
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   364
	    #activeHelpKey: #commitCancel
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   365
	    #enabled: #contentsModifiedChannel
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   366
	    #label: 'Cancel'
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   367
	    #itemValue: #cancel
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   368
	    #translateLabel: true
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   369
	  )
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   370
	 )
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   371
	nil
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   372
	nil
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   373
      )
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   374
!
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   375
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   376
keyItemMenu
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   377
    "This resource specification was automatically generated
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   378
     by the MenuEditor of ST/X."
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   379
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   380
    "Do not manually edit this!! If it is corrupted,
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   381
     the MenuEditor may not be able to read the specification."
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   382
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   383
    "
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   384
     MenuEditor new openOnClass:UIHelpTool andSelector:#keyItemMenu
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   385
     (Menu new fromLiteralArrayEncoding:(UIHelpTool keyItemMenu)) startUp
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   386
    "
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   387
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   388
    <resource: #menu>
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   389
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   390
    ^ 
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   391
     #(#Menu
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   392
	#(
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   393
	 #(#MenuItem
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   394
	    #activeHelpKey: #deleteHelpTextKey
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   395
	    #label: 'Delete'
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   396
	    #itemValue: #doDelete
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   397
	    #translateLabel: true
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   398
	  )
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   399
	 )
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   400
	nil
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   401
	nil
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   402
      )
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   403
!
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   404
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   405
listOfKeysMenu
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   406
    "This resource specification was automatically generated
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   407
     by the MenuEditor of ST/X."
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   408
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   409
    "Do not manually edit this!! If it is corrupted,
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   410
     the MenuEditor may not be able to read the specification."
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   411
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   412
    "
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   413
     MenuEditor new openOnClass:UIHelpTool andSelector:#listOfKeysMenu
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   414
     (Menu new fromLiteralArrayEncoding:(UIHelpTool listOfKeysMenu)) startUp
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   415
    "
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   416
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   417
    <resource: #menu>
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   418
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   419
    ^ 
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   420
     #(#Menu
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   421
	#(
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   422
	 #(#MenuItem
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   423
	    #activeHelpKey: #deleteHelpTextKey
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   424
	    #label: 'Delete'
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   425
	    #itemValue: #doDelete
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   426
	    #translateLabel: true
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   427
	  )
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   428
	 )
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   429
	nil
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   430
	nil
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   431
      )
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   432
!
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   433
696
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   434
menu
740
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   435
    "This resource specification was automatically generated
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   436
     by the MenuEditor of ST/X."
696
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   437
740
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   438
    "Do not manually edit this!! If it is corrupted,
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   439
     the MenuEditor may not be able to read the specification."
696
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   440
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   441
    "
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   442
     MenuEditor new openOnClass:UIHelpTool andSelector:#menu
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   443
     (Menu new fromLiteralArrayEncoding:(UIHelpTool menu)) startUp
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   444
    "
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   445
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   446
    <resource: #menu>
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   447
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   448
    ^ 
1775
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
   449
     #(Menu
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
   450
        (
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
   451
         (MenuItem
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
   452
            label: 'File'
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
   453
            translateLabel: true
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
   454
            submenu: 
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
   455
           (Menu
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
   456
              (
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
   457
               (MenuItem
1973
58e2df779faa code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1777
diff changeset
   458
                  label: 'New'
58e2df779faa code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1777
diff changeset
   459
                  itemValue: doNew
58e2df779faa code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1777
diff changeset
   460
                  translateLabel: true
58e2df779faa code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1777
diff changeset
   461
                )
58e2df779faa code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1777
diff changeset
   462
               (MenuItem
58e2df779faa code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1777
diff changeset
   463
                  label: '-'
58e2df779faa code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1777
diff changeset
   464
                )
58e2df779faa code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1777
diff changeset
   465
               (MenuItem
1775
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
   466
                  activeHelpKey: fileLoad
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
   467
                  label: 'Load...'
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
   468
                  itemValue: doLoad
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
   469
                  translateLabel: true
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
   470
                )
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
   471
               (MenuItem
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
   472
                  activeHelpKey: fileSave
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
   473
                  label: 'Save'
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
   474
                  itemValue: doSave
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
   475
                  translateLabel: true
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
   476
                )
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
   477
               (MenuItem
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
   478
                  label: '-'
1982
a60283327f16 hide some menu items when in browser
Claus Gittinger <cg@exept.de>
parents: 1973
diff changeset
   479
                  isVisible: isStandAlone
1775
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
   480
                )
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
   481
               (MenuItem
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
   482
                  activeHelpKey: fileExit
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
   483
                  label: 'Exit'
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
   484
                  itemValue: closeRequest
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
   485
                  translateLabel: true
1982
a60283327f16 hide some menu items when in browser
Claus Gittinger <cg@exept.de>
parents: 1973
diff changeset
   486
                  isVisible: isStandAlone
1775
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
   487
                )
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
   488
               )
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
   489
              nil
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
   490
              nil
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
   491
            )
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
   492
          )
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
   493
         (MenuItem
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
   494
            label: 'Edit'
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
   495
            translateLabel: true
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
   496
            submenuChannel: keyItemMenu
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
   497
            keepLinkedMenu: true
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
   498
          )
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
   499
         (MenuItem
1973
58e2df779faa code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1777
diff changeset
   500
            label: 'History'
58e2df779faa code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1777
diff changeset
   501
            translateLabel: true
1982
a60283327f16 hide some menu items when in browser
Claus Gittinger <cg@exept.de>
parents: 1973
diff changeset
   502
            isVisible: isStandAlone
1973
58e2df779faa code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1777
diff changeset
   503
            submenuChannel: menuHistory
58e2df779faa code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1777
diff changeset
   504
          )
58e2df779faa code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1777
diff changeset
   505
         (MenuItem
2665
b26986ad5ab9 changed: #menu
Claus Gittinger <cg@exept.de>
parents: 2127
diff changeset
   506
            label: 'MENU_Help'
1775
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
   507
            translateLabel: true
2127
e629b1f6c81b conditionalRight in startGroup
Claus Gittinger <cg@exept.de>
parents: 2069
diff changeset
   508
            startGroup: conditionalRight
1775
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
   509
            submenuChannel: menuHelp
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
   510
          )
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
   511
         )
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
   512
        nil
695f10f213d1 no flyByHelp for menu
ca
parents: 1772
diff changeset
   513
        nil
696
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   514
      )
148
785417b6955d intitial checkin
ca
parents:
diff changeset
   515
! !
785417b6955d intitial checkin
ca
parents:
diff changeset
   516
785417b6955d intitial checkin
ca
parents:
diff changeset
   517
!UIHelpTool methodsFor:'accessing'!
785417b6955d intitial checkin
ca
parents:
diff changeset
   518
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   519
helpKey
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   520
    "returns the helpKey as symbol or nil
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   521
    "
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   522
    |key|
710
8c968790c885 use same help dict if started from the gui painter
tz
parents: 704
diff changeset
   523
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   524
    key := editModel value.
151
ca
parents: 148
diff changeset
   525
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   526
    key size ~~ 0 ifTrue:[
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   527
	key := key withoutSeparators.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   528
	key notEmpty ifTrue:[ ^ key asSymbol ]
151
ca
parents: 148
diff changeset
   529
    ].
286
23712b1d3f3d checkin from browser
ca
parents: 261
diff changeset
   530
    ^ nil
23712b1d3f3d checkin from browser
ca
parents: 261
diff changeset
   531
!
23712b1d3f3d checkin from browser
ca
parents: 261
diff changeset
   532
23712b1d3f3d checkin from browser
ca
parents: 261
diff changeset
   533
helpKey:aKey
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   534
    "change the helpKey without any change notification (modifiedHolder).
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   535
    "
286
23712b1d3f3d checkin from browser
ca
parents: 261
diff changeset
   536
    |key|
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   537
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   538
    self withoutModifyDo:[
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   539
	aKey size ~~ 0 ifTrue:[
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   540
	    key := aKey withoutSeparators.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   541
	    key isEmpty ifTrue:[ key := nil ]
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   542
	] ifFalse:[
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   543
	    key := nil
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   544
	].
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   545
	editModel value:key.
286
23712b1d3f3d checkin from browser
ca
parents: 261
diff changeset
   546
    ].
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   547
    self cancel.
151
ca
parents: 148
diff changeset
   548
!
ca
parents: 148
diff changeset
   549
740
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   550
modified
2020
9de675480091 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2018
diff changeset
   551
    "true if any items are added, deleted or modified
9de675480091 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2018
diff changeset
   552
    "
9de675480091 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2018
diff changeset
   553
    classItemList do:[:aClassItem|
9de675480091 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2018
diff changeset
   554
	aClassItem modified ifTrue:[^ true].
9de675480091 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2018
diff changeset
   555
    ].
9de675480091 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2018
diff changeset
   556
    ^ false
700
2aae4f3b6526 supports merging into existing help specs
tz
parents: 696
diff changeset
   557
!
2aae4f3b6526 supports merging into existing help specs
tz
parents: 696
diff changeset
   558
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   559
modified:aBoolean
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   560
    "true if any items are added, deleted or modified
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   561
    "
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   562
    classItemList do:[:aClassItem| aClassItem modified:aBoolean ].
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   563
!
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   564
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   565
modifiedHolder
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   566
    "boolean holder which is set to true if the helpKey or contents changed
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   567
    "
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   568
    ^ modifiedHolder
700
2aae4f3b6526 supports merging into existing help specs
tz
parents: 696
diff changeset
   569
!
2aae4f3b6526 supports merging into existing help specs
tz
parents: 696
diff changeset
   570
286
23712b1d3f3d checkin from browser
ca
parents: 261
diff changeset
   571
modifiedHolder:aValueHolder
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   572
    "boolean holder which is set to true if the helpKey or contents changed
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   573
    "
286
23712b1d3f3d checkin from browser
ca
parents: 261
diff changeset
   574
    modifiedHolder notNil ifTrue:[
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   575
	modifiedHolder removeDependent:self. 
286
23712b1d3f3d checkin from browser
ca
parents: 261
diff changeset
   576
    ].
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   577
    modifiedHolder := aValueHolder.
459
fb5b5ecf7e86 set modified if help text has changed
tz
parents: 456
diff changeset
   578
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   579
    modifiedHolder notNil ifTrue:[
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   580
	modifiedHolder addDependent:self.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   581
    ].
1604
69dc29cf0fc5 *** empty log message ***
ca
parents: 1597
diff changeset
   582
!
69dc29cf0fc5 *** empty log message ***
ca
parents: 1597
diff changeset
   583
715
7eebac822985 modified bug fixed
tz
parents: 710
diff changeset
   584
specClass
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   585
    "returns the class on which the help tool works on
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   586
    "
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   587
    ^ specClass
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   588
!
779
2ffa22f97d5d comments + documentation
tz
parents: 761
diff changeset
   589
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   590
specSelector
1681
7a8e5df3f07d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
   591
    "returns the selector of the edited helpSpec method
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   592
    "
1681
7a8e5df3f07d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
   593
    ^ specSelector ? #helpSpec
354
a6de8821d3bf add & remove popUpMenu
Claus Gittinger <cg@exept.de>
parents: 339
diff changeset
   594
! !
a6de8821d3bf add & remove popUpMenu
Claus Gittinger <cg@exept.de>
parents: 339
diff changeset
   595
148
785417b6955d intitial checkin
ca
parents:
diff changeset
   596
!UIHelpTool methodsFor:'aspects'!
785417b6955d intitial checkin
ca
parents:
diff changeset
   597
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   598
classItemListHolder
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   599
    "returns the holder which keeps the class items
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   600
    "
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   601
    |holder|
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   602
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   603
    holder := builder bindingAt:#classItemListHolder.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   604
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   605
    holder isNil ifTrue:[
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   606
	holder := nil asValue.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   607
	holder value:classItemList.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   608
	builder aspectAt:#classItemListHolder put:holder.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   609
    ].
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   610
    ^ holder
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   611
!
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   612
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   613
classItemModel
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   614
    "returns the holder which keeps the current selected class
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   615
    "
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   616
    ^ classItemModel
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   617
!
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   618
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   619
contentsModifiedChannel
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   620
    "boolean holder, which is set to true if the contents assigned to the
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   621
     helpKey changed
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   622
    "
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   623
    ^ contentsModifiedChannel
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   624
!
779
2ffa22f97d5d comments + documentation
tz
parents: 761
diff changeset
   625
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   626
editModel
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   627
    "string holder, which keeps the current editing helpKey as string
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   628
    "
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   629
    ^ editModel.
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   630
!
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   631
1989
c7b003c5b013 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1982
diff changeset
   632
enablingCommitButtonsHolder
c7b003c5b013 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1982
diff changeset
   633
    "returns the enabling of the commit of this tool as value holder"
c7b003c5b013 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1982
diff changeset
   634
c7b003c5b013 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1982
diff changeset
   635
    masterApplication notNil ifTrue:[
c7b003c5b013 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1982
diff changeset
   636
        ^ masterApplication enablingCommitButtonsHolder
c7b003c5b013 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1982
diff changeset
   637
    ].
c7b003c5b013 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1982
diff changeset
   638
    ^ contentsModifiedChannel
c7b003c5b013 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1982
diff changeset
   639
!
c7b003c5b013 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1982
diff changeset
   640
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   641
helpTextView
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   642
    "the editView which keeps the current help contents assigned to the key
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   643
    "
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   644
    ^ helpTextView
148
785417b6955d intitial checkin
ca
parents:
diff changeset
   645
!
785417b6955d intitial checkin
ca
parents:
diff changeset
   646
1989
c7b003c5b013 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1982
diff changeset
   647
infoLabelHolder
c7b003c5b013 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1982
diff changeset
   648
    "returns the info label as value holder"
c7b003c5b013 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1982
diff changeset
   649
c7b003c5b013 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1982
diff changeset
   650
    masterApplication notNil ifTrue:[
2037
35576ff838ca *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2020
diff changeset
   651
        builder aspectAt:#useAlienInfoLabelHolder put:true.
1989
c7b003c5b013 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1982
diff changeset
   652
        ^ masterApplication infoLabelHolder
c7b003c5b013 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1982
diff changeset
   653
    ].
c7b003c5b013 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1982
diff changeset
   654
    ^ super infoLabelHolder
c7b003c5b013 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1982
diff changeset
   655
!
c7b003c5b013 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1982
diff changeset
   656
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   657
keyItemListHolder
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   658
    "holder, which keeps the current hierarchical list
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   659
     assigned to the selected class item
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   660
    "
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   661
    |holder|
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   662
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   663
    holder := builder bindingAt:#keyItemListHolder.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   664
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   665
    holder isNil ifTrue:[
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   666
	holder := nil asValue.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   667
	holder value:(classItemList last list).
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   668
	builder aspectAt:#keyItemListHolder put:holder.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   669
    ].
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   670
    ^ holder
696
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   671
!
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   672
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   673
keyItemModel
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   674
    "model which keeps the current selected helpKey or nil
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   675
    "
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   676
    ^ keyItemModel.
148
785417b6955d intitial checkin
ca
parents:
diff changeset
   677
! !
785417b6955d intitial checkin
ca
parents:
diff changeset
   678
750
9b705e31d38e some cleans
tz
parents: 740
diff changeset
   679
!UIHelpTool methodsFor:'building'!
9b705e31d38e some cleans
tz
parents: 740
diff changeset
   680
1663
60bd14266560 *** empty log message ***
ca
parents: 1648
diff changeset
   681
buildAndMergeFromClass:aClass
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   682
     "setup a new specClass, merge the current items into
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   683
     "
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   684
     |root mergeItems|
1663
60bd14266560 *** empty log message ***
ca
parents: 1648
diff changeset
   685
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   686
     root := classItemList first.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   687
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   688
     root isUnspecified ifTrue:[ mergeItems := root children ]
1973
58e2df779faa code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1777
diff changeset
   689
                       ifFalse:[ mergeItems := nil ].
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   690
1973
58e2df779faa code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1777
diff changeset
   691
     self loadFromClass:aClass.
1663
60bd14266560 *** empty log message ***
ca
parents: 1648
diff changeset
   692
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   693
     mergeItems size ~~ 0 ifTrue:[
1973
58e2df779faa code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1777
diff changeset
   694
        root := classItemList first.
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   695
1973
58e2df779faa code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1777
diff changeset
   696
        mergeItems do:[:anItem| |item hkey|
58e2df779faa code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1777
diff changeset
   697
            hkey := anItem helpKey.
58e2df779faa code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1777
diff changeset
   698
            item := root detectItemWithKey:hkey.
1663
60bd14266560 *** empty log message ***
ca
parents: 1648
diff changeset
   699
1973
58e2df779faa code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1777
diff changeset
   700
            item isNil ifTrue:[
58e2df779faa code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1777
diff changeset
   701
                item := KeyItem helpKey:hkey helpText:(anItem helpText).
58e2df779faa code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1777
diff changeset
   702
                root add:item sortBlock:[:a :b| a label < b label ].
58e2df779faa code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1777
diff changeset
   703
            ] ifFalse:[
58e2df779faa code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1777
diff changeset
   704
                item helpText:(anItem helpText).
58e2df779faa code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1777
diff changeset
   705
            ]
58e2df779faa code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1777
diff changeset
   706
        ]
1663
60bd14266560 *** empty log message ***
ca
parents: 1648
diff changeset
   707
    ].
60bd14266560 *** empty log message ***
ca
parents: 1648
diff changeset
   708
!
60bd14266560 *** empty log message ***
ca
parents: 1648
diff changeset
   709
1973
58e2df779faa code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1777
diff changeset
   710
loadFromClass:aClass
779
2ffa22f97d5d comments + documentation
tz
parents: 761
diff changeset
   711
    "reads the help dictionary from aClass and find remaining classes 
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   712
     'between' aClass and ApplicationModel
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   713
    " 
1973
58e2df779faa code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1777
diff changeset
   714
    |lastContents root list helpSpecSelector|
779
2ffa22f97d5d comments + documentation
tz
parents: 761
diff changeset
   715
2934
c01fe2833468 changed:
Claus Gittinger <cg@exept.de>
parents: 2933
diff changeset
   716
    (specClass notNil and:[specClass == aClass]) ifTrue:[
c01fe2833468 changed:
Claus Gittinger <cg@exept.de>
parents: 2933
diff changeset
   717
        ^ self.
c01fe2833468 changed:
Claus Gittinger <cg@exept.de>
parents: 2933
diff changeset
   718
    ].
c01fe2833468 changed:
Claus Gittinger <cg@exept.de>
parents: 2933
diff changeset
   719
1681
7a8e5df3f07d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
   720
    helpSpecSelector := self specSelector.
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   721
    specClass := self getHelpSpecClassFromClass:aClass.
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   722
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   723
    list := OrderedCollection new.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   724
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   725
    (specClass isClass and:[specClass isLoaded]) ifTrue:[
1670
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   726
        lastContents := nil.
1973
58e2df779faa code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1777
diff changeset
   727
58e2df779faa code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1777
diff changeset
   728
        self addHistoryEntryForClass:specClass selector:helpSpecSelector.
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   729
1670
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   730
        specClass withAllSuperclasses reverse do:[:aClass| |value name|
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   731
            lastContents isNil ifTrue:[
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   732
                aClass == ApplicationModel ifTrue:[ 
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   733
                    lastContents := IdentityDictionary new
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   734
                ].
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   735
            ] ifFalse:[
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   736
                root := ClassItem onClass:aClass.
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   737
1973
58e2df779faa code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1777
diff changeset
   738
                (aClass respondsTo: helpSpecSelector) ifTrue:[ 
58e2df779faa code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1777
diff changeset
   739
                    value := aClass perform: helpSpecSelector.
58e2df779faa code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1777
diff changeset
   740
                ].
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   741
1973
58e2df779faa code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1777
diff changeset
   742
                value notNil ifTrue:[
2933
a4f4d63953b3 changed: #loadFromClass:
Claus Gittinger <cg@exept.de>
parents: 2772
diff changeset
   743
                    (value isKindOf:Dictionary) ifTrue:[
a4f4d63953b3 changed: #loadFromClass:
Claus Gittinger <cg@exept.de>
parents: 2772
diff changeset
   744
                        value keysAndValuesDo:[:k :v| |cval|
a4f4d63953b3 changed: #loadFromClass:
Claus Gittinger <cg@exept.de>
parents: 2772
diff changeset
   745
                            cval := lastContents at:k ifAbsent:self.
a4f4d63953b3 changed: #loadFromClass:
Claus Gittinger <cg@exept.de>
parents: 2772
diff changeset
   746
                            cval = v ifFalse:[ root add:(KeyItem helpKey:k helpText:v) ].
a4f4d63953b3 changed: #loadFromClass:
Claus Gittinger <cg@exept.de>
parents: 2772
diff changeset
   747
                        ].
a4f4d63953b3 changed: #loadFromClass:
Claus Gittinger <cg@exept.de>
parents: 2772
diff changeset
   748
                        lastContents := value.
a4f4d63953b3 changed: #loadFromClass:
Claus Gittinger <cg@exept.de>
parents: 2772
diff changeset
   749
                    ] ifFalse:[
a4f4d63953b3 changed: #loadFromClass:
Claus Gittinger <cg@exept.de>
parents: 2772
diff changeset
   750
                        |dict|
a4f4d63953b3 changed: #loadFromClass:
Claus Gittinger <cg@exept.de>
parents: 2772
diff changeset
   751
                        dict := Dictionary new.
a4f4d63953b3 changed: #loadFromClass:
Claus Gittinger <cg@exept.de>
parents: 2772
diff changeset
   752
                        value pairWiseDo:[:k :v| |cval|
a4f4d63953b3 changed: #loadFromClass:
Claus Gittinger <cg@exept.de>
parents: 2772
diff changeset
   753
                            cval := lastContents at:k ifAbsent:self.
a4f4d63953b3 changed: #loadFromClass:
Claus Gittinger <cg@exept.de>
parents: 2772
diff changeset
   754
                            cval = v ifFalse:[ root add:(KeyItem helpKey:k helpText:v) ].
a4f4d63953b3 changed: #loadFromClass:
Claus Gittinger <cg@exept.de>
parents: 2772
diff changeset
   755
                            dict at:k put:v.
a4f4d63953b3 changed: #loadFromClass:
Claus Gittinger <cg@exept.de>
parents: 2772
diff changeset
   756
                        ].
a4f4d63953b3 changed: #loadFromClass:
Claus Gittinger <cg@exept.de>
parents: 2772
diff changeset
   757
                        lastContents := dict.
1670
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   758
                    ].
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   759
                ].
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   760
                root sort:[:a :b| a label < b label ].
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   761
                root modified:false.
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   762
                list add:root.
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   763
            ]
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   764
        ]
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   765
    ].
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   766
    list isEmpty ifTrue:[
1670
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   767
        list add:(ClassItem onClass:nil)
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   768
    ].
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   769
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   770
    self withoutModifyDo:[
1670
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   771
        classItemList contents:list.
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   772
        self updateIcons.
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   773
        classItemModel value:(list last)
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   774
    ].
1340
4276358d937b added update function; changed layout
Claus Gittinger <cg@exept.de>
parents: 1336
diff changeset
   775
!
4276358d937b added update function; changed layout
Claus Gittinger <cg@exept.de>
parents: 1336
diff changeset
   776
1973
58e2df779faa code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1777
diff changeset
   777
loadFromClass:aClass andSelector:aSelector
58e2df779faa code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1777
diff changeset
   778
    "reads the help dictionary from aClass"
58e2df779faa code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1777
diff changeset
   779
58e2df779faa code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1777
diff changeset
   780
    self assert:(aClass isNil or:[aClass isClass]).
58e2df779faa code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1777
diff changeset
   781
1340
4276358d937b added update function; changed layout
Claus Gittinger <cg@exept.de>
parents: 1336
diff changeset
   782
    specSelector := aSelector.
1973
58e2df779faa code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1777
diff changeset
   783
    self loadFromClass:aClass
1340
4276358d937b added update function; changed layout
Claus Gittinger <cg@exept.de>
parents: 1336
diff changeset
   784
!
4276358d937b added update function; changed layout
Claus Gittinger <cg@exept.de>
parents: 1336
diff changeset
   785
1973
58e2df779faa code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1777
diff changeset
   786
loadFromHelpTool:aHelpTool
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   787
    "build from another helpTool
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   788
    "
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   789
    specClass     := aHelpTool specClass.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   790
    specSelector  := aHelpTool specSelector.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   791
    classItemList := aHelpTool classItemListHolder value.
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   792
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   793
    self classItemListHolder value:classItemList.
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   794
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   795
    classItemModel triggerValue:(classItemList last).
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   796
! !
1340
4276358d937b added update function; changed layout
Claus Gittinger <cg@exept.de>
parents: 1336
diff changeset
   797
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   798
!UIHelpTool methodsFor:'change & update'!
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   799
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   800
editModelChanged
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   801
    "called if the editModel changed
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   802
    "
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   803
    |key|
1340
4276358d937b added update function; changed layout
Claus Gittinger <cg@exept.de>
parents: 1336
diff changeset
   804
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   805
    key := self helpKey.
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   806
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   807
    modifiedHolder notNil ifTrue:[
1989
c7b003c5b013 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1982
diff changeset
   808
        modifiedHolder value:true
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   809
    ].
963
62cdb7923a3b care for setup, before view components are built
Claus Gittinger <cg@exept.de>
parents: 946
diff changeset
   810
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   811
    contentsModifiedChannel value:false.
963
62cdb7923a3b care for setup, before view components are built
Claus Gittinger <cg@exept.de>
parents: 946
diff changeset
   812
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   813
    key notNil ifTrue:[
1989
c7b003c5b013 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1982
diff changeset
   814
        keyItemModel value = key ifTrue:[^ self].
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   815
1989
c7b003c5b013 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1982
diff changeset
   816
        classItemList reverseDo:[:root| |item|
c7b003c5b013 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1982
diff changeset
   817
            item := root detectItemWithKey:key.
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   818
1989
c7b003c5b013 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1982
diff changeset
   819
            item notNil ifTrue:[
c7b003c5b013 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1982
diff changeset
   820
                classItemModel value:root.
c7b003c5b013 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1982
diff changeset
   821
                keyItemModel   value:item.
c7b003c5b013 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1982
diff changeset
   822
                ^ self.
c7b003c5b013 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1982
diff changeset
   823
            ].
c7b003c5b013 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1982
diff changeset
   824
        ].
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   825
1989
c7b003c5b013 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1982
diff changeset
   826
        masterApplication isNil ifTrue:[
c7b003c5b013 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1982
diff changeset
   827
            "entered a new helpKey
c7b003c5b013 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1982
diff changeset
   828
            "
c7b003c5b013 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1982
diff changeset
   829
            self enablingCommitButtonsHolder value:true.
c7b003c5b013 valueOf* methods renamed
Claus Gittinger <cg@exept.de>
parents: 1982
diff changeset
   830
        ].
750
9b705e31d38e some cleans
tz
parents: 740
diff changeset
   831
    ].
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   832
    keyItemModel value:nil.
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   833
!
779
2ffa22f97d5d comments + documentation
tz
parents: 761
diff changeset
   834
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   835
update:something with:aParameter from:changedObject
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   836
    "Invoked when an object that I depend upon sends a change notification.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   837
    "
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   838
    |root item list|
722
a1bb632b1e00 better save routine + help text added
tz
parents: 717
diff changeset
   839
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   840
    changedObject == keyItemModel ifTrue:[
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   841
	item := keyItemModel value.
1597
b670ad8c30e1 builder componentAt: -> self componentAt:
Claus Gittinger <cg@exept.de>
parents: 1554
diff changeset
   842
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   843
	item notNil ifTrue:[
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   844
	    editModel value:(item helpKey).
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   845
	].
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   846
	self cancel.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   847
	^ self
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   848
    ].
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   849
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   850
    changedObject == classItemModel ifTrue:[
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   851
	root := classItemModel value.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   852
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   853
	root notNil ifTrue:[
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   854
	    item := root detectItemWithKey:(self helpKey).
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   855
	    list := root list.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   856
	] ifFalse:[
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   857
	    list := item := nil.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   858
	].
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   859
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   860
	item notNil ifTrue:[
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   861
	    keyItemModel value:nil withoutNotifying:self.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   862
	].
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   863
	self keyItemListHolder value:list.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   864
	keyItemModel value:item.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   865
	^ self
740
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   866
    ].
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   867
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   868
    changedObject == editModel ifTrue:[
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   869
	self editModelChanged.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   870
	^ self
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   871
    ].
750
9b705e31d38e some cleans
tz
parents: 740
diff changeset
   872
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   873
    changedObject == contentsModifiedChannel ifTrue:[
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   874
	modifiedHolder notNil ifTrue:[
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   875
	    modifiedHolder value:true
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   876
	].
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   877
	^ self
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   878
    ].
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   879
    super update:something with:aParameter from:changedObject
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   880
!
904
b40cce7f3748 use standard help calls
tz
parents: 896
diff changeset
   881
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   882
withoutModifyDo:aBlock
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   883
    "discard modifications; trigger not the modifiedHolder during
1723
30d20151ed81 Stream streamErrorSignal -> StreamError
Stefan Vogel <sv@exept.de>
parents: 1681
diff changeset
   884
     the action is active"
30d20151ed81 Stream streamErrorSignal -> StreamError
Stefan Vogel <sv@exept.de>
parents: 1681
diff changeset
   885
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   886
    |holder|
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   887
1723
30d20151ed81 Stream streamErrorSignal -> StreamError
Stefan Vogel <sv@exept.de>
parents: 1681
diff changeset
   888
    modifiedHolder isNil ifTrue:[
30d20151ed81 Stream streamErrorSignal -> StreamError
Stefan Vogel <sv@exept.de>
parents: 1681
diff changeset
   889
        ^ aBlock value
30d20151ed81 Stream streamErrorSignal -> StreamError
Stefan Vogel <sv@exept.de>
parents: 1681
diff changeset
   890
    ].
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   891
    holder := modifiedHolder.
1723
30d20151ed81 Stream streamErrorSignal -> StreamError
Stefan Vogel <sv@exept.de>
parents: 1681
diff changeset
   892
    ^ aBlock ensure:[modifiedHolder := holder]
750
9b705e31d38e some cleans
tz
parents: 740
diff changeset
   893
! !
9b705e31d38e some cleans
tz
parents: 740
diff changeset
   894
286
23712b1d3f3d checkin from browser
ca
parents: 261
diff changeset
   895
!UIHelpTool methodsFor:'private'!
23712b1d3f3d checkin from browser
ca
parents: 261
diff changeset
   896
1973
58e2df779faa code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1777
diff changeset
   897
getHelpSpecClassFromClass:aClass
58e2df779faa code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1777
diff changeset
   898
    |cls|
696
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   899
1973
58e2df779faa code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1777
diff changeset
   900
    aClass isNil ifTrue:[^ nil].
696
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   901
1973
58e2df779faa code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1777
diff changeset
   902
    cls := self resolveName:aClass.
58e2df779faa code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1777
diff changeset
   903
    cls isNil ifTrue:[ ^ nil ].
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
   904
1973
58e2df779faa code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1777
diff changeset
   905
    cls := cls perform:#helpSpecClass ifNotUnderstood:cls.
58e2df779faa code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1777
diff changeset
   906
58e2df779faa code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1777
diff changeset
   907
    (cls isBehavior and:[cls isLoaded]) ifTrue:[
58e2df779faa code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1777
diff changeset
   908
        ^ cls
696
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   909
    ].
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   910
    ^ nil
696
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   911
!
e91402372900 popup menu replaced by a list + supporting of help specs from different classes
tz
parents: 479
diff changeset
   912
1973
58e2df779faa code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1777
diff changeset
   913
loadFromMessage:classAndSelector
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   914
    "Set and rebuild the specClass and specSelector from a resource string.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   915
     On success true is returned otherwise false. If the current spec is
1973
58e2df779faa code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1777
diff changeset
   916
     modified, a dialog is launched."
740
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   917
1973
58e2df779faa code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1777
diff changeset
   918
    self askForModification ifFalse:[ ^ false].
740
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   919
1973
58e2df779faa code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1777
diff changeset
   920
    classAndSelector notNil ifTrue:[
58e2df779faa code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1777
diff changeset
   921
        self loadFromClass:(classAndSelector methodClass) andSelector:(classAndSelector methodSelector).
58e2df779faa code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1777
diff changeset
   922
        ^ true
750
9b705e31d38e some cleans
tz
parents: 740
diff changeset
   923
    ].
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   924
    ^ false
1670
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   925
!
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   926
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   927
updateIcons
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   928
    "update all icons (redefinitions below above or both)
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   929
    "
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   930
    |iconBelow iconAbove iconAboveAndBelow isBehind redefinedAbove redefinedBelow icon|
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   931
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   932
    "/ if only one class exists, its not possible to have redefinitions
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   933
    classItemList size > 1 ifFalse:[ ^ self ].
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   934
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   935
    iconBelow         := SystemBrowser medium_methodRedefinedBelowIcon.
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   936
    iconAbove         := SystemBrowser medium_methodInheritedFromAboveIcon.
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   937
    iconAboveAndBelow := SystemBrowser medium_methodInheritedFromAboveAndRedefinedBelowIcon.
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   938
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   939
    classItemList do:[:runClass|
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   940
        runClass do:[:aKeyItem|
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   941
            isBehind := redefinedBelow := redefinedAbove := false.
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   942
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   943
            classItemList do:[:testClass|
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   944
                testClass == runClass ifTrue:[
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   945
                    isBehind := true
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   946
                ] ifFalse:[
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   947
                    (testClass detectItemWithKey:(aKeyItem helpKey)) notNil ifTrue:[
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   948
                        isBehind ifTrue:[ redefinedBelow := true ]
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   949
                                ifFalse:[ redefinedAbove := true ].
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   950
                    ]
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   951
                ]
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   952
            ].
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   953
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   954
            redefinedBelow ifTrue:[
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   955
                redefinedAbove ifTrue:[ icon := iconAboveAndBelow ]
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   956
                              ifFalse:[ icon := iconBelow ]
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   957
            ] ifFalse:[
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   958
                redefinedAbove ifTrue:[ icon := iconAbove ]
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   959
                              ifFalse:[ icon := nil ]
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   960
            ].
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   961
            aKeyItem icon:icon.
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   962
        ]
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
   963
    ].
286
23712b1d3f3d checkin from browser
ca
parents: 261
diff changeset
   964
! !
23712b1d3f3d checkin from browser
ca
parents: 261
diff changeset
   965
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   966
!UIHelpTool methodsFor:'startup & release'!
369
9d34f1ff4d29 support of lineFeed charaters
ca
parents: 354
diff changeset
   967
9d34f1ff4d29 support of lineFeed charaters
ca
parents: 354
diff changeset
   968
closeRequest
1772
e33aee13defe Use 'Discard Changes and Exit' instead of 'Forget it...'
Stefan Vogel <sv@exept.de>
parents: 1737
diff changeset
   969
    "asks for permission before closing"
e33aee13defe Use 'Discard Changes and Exit' instead of 'Forget it...'
Stefan Vogel <sv@exept.de>
parents: 1737
diff changeset
   970
e33aee13defe Use 'Discard Changes and Exit' instead of 'Forget it...'
Stefan Vogel <sv@exept.de>
parents: 1737
diff changeset
   971
    masterApplication isNil ifTrue:[
e33aee13defe Use 'Discard Changes and Exit' instead of 'Forget it...'
Stefan Vogel <sv@exept.de>
parents: 1737
diff changeset
   972
        super closeRequest.
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   973
    ].
740
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   974
!
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   975
2002
caa9b0a1e638 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1989
diff changeset
   976
commonPostBuild
caa9b0a1e638 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1989
diff changeset
   977
    "/ using masters infoHolder ?
caa9b0a1e638 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1989
diff changeset
   978
    (builder aspectAt:#useAlienInfoLabelHolder) == true ifTrue:[
caa9b0a1e638 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1989
diff changeset
   979
        (builder componentAt:#mainPanel) layout bottomOffset:0.
caa9b0a1e638 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1989
diff changeset
   980
        (builder componentAt:#infoBarSubSpec) beInvisible
caa9b0a1e638 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1989
diff changeset
   981
    ]
caa9b0a1e638 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1989
diff changeset
   982
!
caa9b0a1e638 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1989
diff changeset
   983
740
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   984
initialize
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   985
    "setup default attributes
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   986
    "
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   987
    super initialize.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   988
    self createBuilder.
779
2ffa22f97d5d comments + documentation
tz
parents: 761
diff changeset
   989
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   990
    specSelector   := #helpSpec.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   991
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   992
    classItemList  := List new.
740
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
   993
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   994
    classItemModel := nil asValue.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   995
    classItemModel addDependent:self.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   996
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   997
    keyItemModel := nil asValue.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   998
    keyItemModel addDependent:self.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
   999
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1000
    contentsModifiedChannel := false asValue.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1001
    contentsModifiedChannel addDependent:self.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1002
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1003
    helpTextView := EditTextView new.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1004
    helpTextView acceptAction:[:dummy| self accept ].
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1005
    helpTextView modifiedChannel:contentsModifiedChannel.
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
  1006
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
  1007
    editModel := nil asValue.
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
  1008
    editModel addDependent:self.
740
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
  1009
1973
58e2df779faa code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1777
diff changeset
  1010
    self loadFromClass:nil.
750
9b705e31d38e some cleans
tz
parents: 740
diff changeset
  1011
!
9b705e31d38e some cleans
tz
parents: 740
diff changeset
  1012
9b705e31d38e some cleans
tz
parents: 740
diff changeset
  1013
openOnClass:aClass
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1014
    "opens the UIHelpTool on aClass
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1015
    "
1597
b670ad8c30e1 builder componentAt: -> self componentAt:
Claus Gittinger <cg@exept.de>
parents: 1554
diff changeset
  1016
    self openOnClass:aClass andSelector:nil
940
fa34addf6b1d added #openOnClass:aClass andSelector: aSelector
tz
parents: 904
diff changeset
  1017
!
fa34addf6b1d added #openOnClass:aClass andSelector: aSelector
tz
parents: 904
diff changeset
  1018
fa34addf6b1d added #openOnClass:aClass andSelector: aSelector
tz
parents: 904
diff changeset
  1019
openOnClass:aClass andSelector: aSelector
fa34addf6b1d added #openOnClass:aClass andSelector: aSelector
tz
parents: 904
diff changeset
  1020
    "opens the UIHelpTool on aClass and aSelector"
fa34addf6b1d added #openOnClass:aClass andSelector: aSelector
tz
parents: 904
diff changeset
  1021
1982
a60283327f16 hide some menu items when in browser
Claus Gittinger <cg@exept.de>
parents: 1973
diff changeset
  1022
    self openInterface:#windowSpec "ForStandAlone".
1597
b670ad8c30e1 builder componentAt: -> self componentAt:
Claus Gittinger <cg@exept.de>
parents: 1554
diff changeset
  1023
1973
58e2df779faa code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1777
diff changeset
  1024
    builder window label:'Help Tool'.
58e2df779faa code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1777
diff changeset
  1025
    self loadFromClass:aClass andSelector:aSelector
369
9d34f1ff4d29 support of lineFeed charaters
ca
parents: 354
diff changeset
  1026
! !
9d34f1ff4d29 support of lineFeed charaters
ca
parents: 354
diff changeset
  1027
740
e7362f3ab5e5 some bugs fixed
tz
parents: 722
diff changeset
  1028
!UIHelpTool methodsFor:'user actions'!
286
23712b1d3f3d checkin from browser
ca
parents: 261
diff changeset
  1029
722
a1bb632b1e00 better save routine + help text added
tz
parents: 717
diff changeset
  1030
accept
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1031
    "accepts the help text
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1032
    "
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1033
    |helpKey helpItem root|
779
2ffa22f97d5d comments + documentation
tz
parents: 761
diff changeset
  1034
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1035
    helpKey := self helpKey.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1036
    helpKey isNil ifTrue:[^ self].
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
  1037
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1038
    root := classItemModel value.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1039
    root isNil ifTrue:[^ self].
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1040
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1041
    helpItem := root detectItemWithKey:helpKey.
1648
d88ec5777284 empty help string - add key anyway
Claus Gittinger <cg@exept.de>
parents: 1646
diff changeset
  1042
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1043
    helpItem isNil ifTrue:[
1670
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
  1044
        helpItem := KeyItem helpKey:helpKey helpText:(helpTextView contents).
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
  1045
        root add:helpItem sortBlock:[:a :b| a label < b label ].
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
  1046
        self updateIcons.
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1047
    ] ifFalse:[
1670
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
  1048
        helpItem helpText:(helpTextView contents).
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
  1049
    ].
722
a1bb632b1e00 better save routine + help text added
tz
parents: 717
diff changeset
  1050
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1051
    contentsModifiedChannel value:false.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1052
    keyItemModel triggerValue:helpItem.
722
a1bb632b1e00 better save routine + help text added
tz
parents: 717
diff changeset
  1053
!
a1bb632b1e00 better save routine + help text added
tz
parents: 717
diff changeset
  1054
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
  1055
cancel
2069
3db21bf80a51 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2037
diff changeset
  1056
    "cancel modifications, reload helpText"
3db21bf80a51 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2037
diff changeset
  1057
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1058
    |item contents modified|
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
  1059
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1060
    item := keyItemModel value.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1061
    modified := false.
779
2ffa22f97d5d comments + documentation
tz
parents: 761
diff changeset
  1062
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1063
    item notNil ifTrue:[
2069
3db21bf80a51 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2037
diff changeset
  1064
        contents := item helpText.
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1065
    ] ifFalse:[
2069
3db21bf80a51 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2037
diff changeset
  1066
        contents := nil.
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1067
2069
3db21bf80a51 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2037
diff changeset
  1068
        modifiedHolder isNil ifTrue:[
3db21bf80a51 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2037
diff changeset
  1069
            modified := self helpKey notNil
3db21bf80a51 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2037
diff changeset
  1070
        ]
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
  1071
    ].
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1072
    helpTextView contents:contents.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1073
    contentsModifiedChannel value:modified.
2069
3db21bf80a51 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2037
diff changeset
  1074
3db21bf80a51 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2037
diff changeset
  1075
    "Modified: / 29-08-2006 / 10:20:37 / cg"
722
a1bb632b1e00 better save routine + help text added
tz
parents: 717
diff changeset
  1076
!
a1bb632b1e00 better save routine + help text added
tz
parents: 717
diff changeset
  1077
750
9b705e31d38e some cleans
tz
parents: 740
diff changeset
  1078
doDelete
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
  1079
    "deletes the selected help key
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
  1080
    "
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1081
    |item|
1646
4d2809c829e0 reworked... to add/delete and modify keys
ca
parents: 1622
diff changeset
  1082
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1083
    item := keyItemModel value.
1670
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
  1084
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
  1085
    item notNil ifTrue:[
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
  1086
        item remove.
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
  1087
        item icon notNil ifTrue:[ self updateIcons ].
72af7609bb08 *** empty log message ***
ca
parents: 1669
diff changeset
  1088
    ].    
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1089
    editModel value:nil.
722
a1bb632b1e00 better save routine + help text added
tz
parents: 717
diff changeset
  1090
!
a1bb632b1e00 better save routine + help text added
tz
parents: 717
diff changeset
  1091
750
9b705e31d38e some cleans
tz
parents: 740
diff changeset
  1092
doLoad
1973
58e2df779faa code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1777
diff changeset
  1093
    "opens a Resource Selection Browser in order to get a resource message"
58e2df779faa code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1777
diff changeset
  1094
750
9b705e31d38e some cleans
tz
parents: 740
diff changeset
  1095
    self loadFromMessage: 
1681
7a8e5df3f07d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  1096
        (ResourceSelectionBrowser
7a8e5df3f07d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  1097
            request: 'Load Help Spec From Class'
7a8e5df3f07d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  1098
            onSuperclass: nil
7a8e5df3f07d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  1099
            andClass: specClass
7a8e5df3f07d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  1100
            andSelector: (self specSelector)
7a8e5df3f07d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  1101
            withResourceTypes: (Array with: #help)).
779
2ffa22f97d5d comments + documentation
tz
parents: 761
diff changeset
  1102
2ffa22f97d5d comments + documentation
tz
parents: 761
diff changeset
  1103
    self updateInfoLabel
750
9b705e31d38e some cleans
tz
parents: 740
diff changeset
  1104
!
286
23712b1d3f3d checkin from browser
ca
parents: 261
diff changeset
  1105
750
9b705e31d38e some cleans
tz
parents: 740
diff changeset
  1106
doNew
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1107
    "reset all to empty
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1108
    "
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1109
    contentsModifiedChannel value:false.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1110
    self helpKey:nil.
1973
58e2df779faa code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1777
diff changeset
  1111
    self loadFromClass:nil.
750
9b705e31d38e some cleans
tz
parents: 740
diff changeset
  1112
!
9b705e31d38e some cleans
tz
parents: 740
diff changeset
  1113
722
a1bb632b1e00 better save routine + help text added
tz
parents: 717
diff changeset
  1114
doSave
1973
58e2df779faa code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1777
diff changeset
  1115
    "save the help spec to the spec-class(es)"
58e2df779faa code cleanup & refactoring
Claus Gittinger <cg@exept.de>
parents: 1777
diff changeset
  1116
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1117
    specClass isNil ifTrue:[
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1118
        self information:(resources string:'No class specified !!').
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1119
        ^ nil
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1120
    ].
1777
fbf082828db6 allow save into non/AppModel classes
Claus Gittinger <cg@exept.de>
parents: 1775
diff changeset
  1121
"/ cg: the following test is rubbish !!
fbf082828db6 allow save into non/AppModel classes
Claus Gittinger <cg@exept.de>
parents: 1775
diff changeset
  1122
"/    (specClass isSubclassOf:ApplicationModel) ifFalse:[
fbf082828db6 allow save into non/AppModel classes
Claus Gittinger <cg@exept.de>
parents: 1775
diff changeset
  1123
"/        self information:(resources string:'Cannot save help into non-Application class').
fbf082828db6 allow save into non/AppModel classes
Claus Gittinger <cg@exept.de>
parents: 1775
diff changeset
  1124
"/        ^ nil
fbf082828db6 allow save into non/AppModel classes
Claus Gittinger <cg@exept.de>
parents: 1775
diff changeset
  1125
"/    ].
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1126
2934
c01fe2833468 changed:
Claus Gittinger <cg@exept.de>
parents: 2933
diff changeset
  1127
    classItemList do:[:aClassItem|
c01fe2833468 changed:
Claus Gittinger <cg@exept.de>
parents: 2933
diff changeset
  1128
        aClassItem theClass isNil ifTrue:[
c01fe2833468 changed:
Claus Gittinger <cg@exept.de>
parents: 2933
diff changeset
  1129
            aClassItem onClass:specClass
c01fe2833468 changed:
Claus Gittinger <cg@exept.de>
parents: 2933
diff changeset
  1130
        ].
1681
7a8e5df3f07d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  1131
        aClassItem createHelpMethodNamed:(self specSelector) 
7a8e5df3f07d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1670
diff changeset
  1132
    ].
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1133
!
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1134
2020
9de675480091 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2018
diff changeset
  1135
openDocumentation
9de675480091 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2018
diff changeset
  1136
    "opens the documentation file of the Help Tool
9de675480091 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2018
diff changeset
  1137
    "
9de675480091 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2018
diff changeset
  1138
    self openHTMLDocument: 'tools/uipainter/HelpTool.html'
9de675480091 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2018
diff changeset
  1139
! !
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1140
2020
9de675480091 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2018
diff changeset
  1141
!UIHelpTool::ClassItem class methodsFor:'instance creation'!
9de675480091 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2018
diff changeset
  1142
9de675480091 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2018
diff changeset
  1143
onClass:aClass
9de675480091 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2018
diff changeset
  1144
    |root|
9de675480091 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2018
diff changeset
  1145
9de675480091 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2018
diff changeset
  1146
    root := self new.
9de675480091 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2018
diff changeset
  1147
    root onClass:aClass.
9de675480091 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2018
diff changeset
  1148
    ^ root
9de675480091 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2018
diff changeset
  1149
! !
9de675480091 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2018
diff changeset
  1150
9de675480091 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2018
diff changeset
  1151
!UIHelpTool::ClassItem methodsFor:'accessing'!
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1152
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1153
list
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1154
    "returns the hierarchical list assigned to the classItem; the
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1155
     list contains the keyItems
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1156
    "
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1157
    list isNil ifTrue:[
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1158
	list := HierarchicalList new.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1159
	list showRoot:false.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1160
	list root:self.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1161
    ].
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1162
    ^ list
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1163
!
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1164
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1165
theClass
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1166
    "returns the class or nil if unspecified
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1167
    "
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1168
    ^ theClass
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1169
! !
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1170
2020
9de675480091 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2018
diff changeset
  1171
!UIHelpTool::ClassItem methodsFor:'change & update'!
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1172
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1173
helpTextChangedFor:anItem
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1174
    "called if an helpKey changed its contents
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1175
    "
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1176
    self model notNil ifTrue:[
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1177
	self   modified:true.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1178
	anItem modified:true.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1179
    ].
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1180
! !
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1181
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1182
!UIHelpTool::ClassItem methodsFor:'code generation'!
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1183
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1184
createHelpMethodNamed:aMethodName
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1185
    |stream|
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1186
2934
c01fe2833468 changed:
Claus Gittinger <cg@exept.de>
parents: 2933
diff changeset
  1187
    modified ifFalse:[
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1188
        ^ self
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1189
    ].
2934
c01fe2833468 changed:
Claus Gittinger <cg@exept.de>
parents: 2933
diff changeset
  1190
    theClass isNil ifTrue:[
c01fe2833468 changed:
Claus Gittinger <cg@exept.de>
parents: 2933
diff changeset
  1191
        theClass := Dialog requestClass:'Save helpSpec in which class?' initialAnswer:''.
c01fe2833468 changed:
Claus Gittinger <cg@exept.de>
parents: 2933
diff changeset
  1192
        theClass isNil ifTrue:[
c01fe2833468 changed:
Claus Gittinger <cg@exept.de>
parents: 2933
diff changeset
  1193
            ^ self
c01fe2833468 changed:
Claus Gittinger <cg@exept.de>
parents: 2933
diff changeset
  1194
        ].
c01fe2833468 changed:
Claus Gittinger <cg@exept.de>
parents: 2933
diff changeset
  1195
    ].
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1196
    stream := '' writeStream.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1197
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1198
    stream nextPutAll:
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1199
        aMethodName, '\' withCRs,
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1200
        (ResourceSpecEditor codeGenerationCommentForClass:UIHelpTool) withCRs,
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1201
    '\\' withCRs,
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1202
    '    "\' withCRs,
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1203
    '     UIHelpTool openOnClass:', theClass name asString ,'    
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1204
    "
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1205
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1206
    <resource: #help>
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1207
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1208
    ^ super ', aMethodName, ' addPairsFrom:#(
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1209
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1210
'.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1211
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1212
    self do:[:aKeyItem| |helpText|
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1213
        helpText := aKeyItem helpText.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1214
        helpText isNil ifTrue:[ helpText := '' ].
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1215
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1216
        stream nextPutLine:(aKeyItem helpKey storeString).
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1217
        stream nextPutLine:(helpText storeString); cr.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1218
    ].
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1219
    stream nextPutLine:')'.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1220
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1221
    Compiler 
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1222
        compile:(stream contents)
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1223
        forClass:theClass class 
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1224
        inCategory:'help specs'.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1225
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1226
    self modified:false.
2020
9de675480091 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2018
diff changeset
  1227
! !
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1228
2020
9de675480091 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2018
diff changeset
  1229
!UIHelpTool::ClassItem methodsFor:'displaying'!
9de675480091 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2018
diff changeset
  1230
9de675480091 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2018
diff changeset
  1231
icon
9de675480091 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2018
diff changeset
  1232
    "returns the display icon (always nil)
9de675480091 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2018
diff changeset
  1233
    "
9de675480091 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2018
diff changeset
  1234
    ^ nil
9de675480091 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2018
diff changeset
  1235
!
9de675480091 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2018
diff changeset
  1236
9de675480091 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2018
diff changeset
  1237
label
9de675480091 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2018
diff changeset
  1238
    "returns the display label
9de675480091 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2018
diff changeset
  1239
    "
9de675480091 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2018
diff changeset
  1240
    |label|
9de675480091 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2018
diff changeset
  1241
9de675480091 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2018
diff changeset
  1242
    theClass notNil ifTrue:[ label := theClass name ]
9de675480091 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2018
diff changeset
  1243
		   ifFalse:[ label := '** not yet defined **' ].
9de675480091 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2018
diff changeset
  1244
9de675480091 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2018
diff changeset
  1245
    modified ifTrue:[
9de675480091 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2018
diff changeset
  1246
	label := Text string:label color:(Color red).
9de675480091 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2018
diff changeset
  1247
    ].
9de675480091 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2018
diff changeset
  1248
    ^ label
9de675480091 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2018
diff changeset
  1249
! !
9de675480091 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2018
diff changeset
  1250
9de675480091 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2018
diff changeset
  1251
!UIHelpTool::ClassItem methodsFor:'instance creation'!
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1252
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1253
initialize
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1254
    "setup defaults
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1255
    "
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1256
    super initialize.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1257
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1258
    children   := OrderedCollection new.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1259
    isExpanded := true.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1260
    modified   := false.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1261
!
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1262
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1263
onClass:aClass
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1264
    "the class the ys are assigned to; if the class is nil,
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1265
     the class is not yet specified.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1266
    "
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1267
    theClass := aClass.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1268
! !
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1269
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1270
!UIHelpTool::ClassItem methodsFor:'private'!
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1271
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1272
basicAdd:aChild sortBlock:aBlock
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1273
    "catch low-level add to update the modification flag
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1274
    "
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1275
    self   modified:true.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1276
    aChild modified:true.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1277
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1278
    ^ super basicAdd:aChild sortBlock:aBlock.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1279
!
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1280
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1281
basicAddAll:aList beforeIndex:anIndex
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1282
    "catch low-level add to update the modification flag
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1283
    "
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1284
    self modified:true.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1285
2020
9de675480091 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2018
diff changeset
  1286
    aList do:[:el| el modified:true ].
9de675480091 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2018
diff changeset
  1287
    ^ super basicAddAll:aList beforeIndex:anIndex.
9de675480091 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2018
diff changeset
  1288
!
779
2ffa22f97d5d comments + documentation
tz
parents: 761
diff changeset
  1289
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1290
basicRemoveFromIndex:startIndex toIndex:stopIndex
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1291
    "catch low-level remove to update the modification flag
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1292
    "
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1293
    self isUnspecified ifFalse:[
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1294
	self modified:true.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1295
    ].
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1296
    ^ super basicRemoveFromIndex:startIndex toIndex:stopIndex
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1297
! !
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1298
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1299
!UIHelpTool::ClassItem methodsFor:'queries'!
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1300
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1301
isUnspecified
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1302
    "true if the class is unspecified
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1303
    "
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1304
    ^ theClass isNil
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1305
!
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1306
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1307
modified
2020
9de675480091 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2018
diff changeset
  1308
    "true, if any item is modified, created or deleted
9de675480091 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2018
diff changeset
  1309
    "
9de675480091 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2018
diff changeset
  1310
    ^ modified
9de675480091 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2018
diff changeset
  1311
!
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1312
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1313
modified:aBoolean
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1314
    "true, if any item is modified, created or deleted
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1315
    "
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1316
    modified ~~ aBoolean ifTrue:[
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1317
	modified := aBoolean.
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1318
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1319
	modified ifFalse:[
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1320
	    self do:[:el| el modified:false ].
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1321
	].
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1322
    ].
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1323
! !
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1324
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1325
!UIHelpTool::ClassItem methodsFor:'searching'!
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1326
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1327
detectItemWithKey:aKey
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1328
    "returns the item assigned to a helpKey or nil
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1329
    "
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1330
    |key|
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1331
2037
35576ff838ca *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2020
diff changeset
  1332
    aKey isEmptyOrNil ifTrue:[ ^ nil ].
35576ff838ca *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2020
diff changeset
  1333
    key := aKey asSymbol.
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1334
2037
35576ff838ca *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2020
diff changeset
  1335
    self do:[:anItem|
35576ff838ca *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2020
diff changeset
  1336
        anItem helpKey == key ifTrue:[ ^ anItem ].
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1337
    ].
2020
9de675480091 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2018
diff changeset
  1338
    ^ nil
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1339
! !
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1340
2020
9de675480091 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2018
diff changeset
  1341
!UIHelpTool::KeyItem class methodsFor:'instance creation'!
9de675480091 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2018
diff changeset
  1342
9de675480091 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2018
diff changeset
  1343
helpKey:aKey helpText:aText 
9de675480091 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2018
diff changeset
  1344
    |key|
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1345
2020
9de675480091 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2018
diff changeset
  1346
    key := self new.
9de675480091 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2018
diff changeset
  1347
    key helpKey:aKey helpText:aText.
9de675480091 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2018
diff changeset
  1348
    ^ key
9de675480091 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2018
diff changeset
  1349
! !
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1350
2020
9de675480091 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2018
diff changeset
  1351
!UIHelpTool::KeyItem methodsFor:'accessing'!
1669
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1352
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1353
helpKey
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1354
    "returns the helpKey, a symbol
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1355
    "
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1356
    ^ helpKey
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1357
!
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1358
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1359
helpText
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1360
    "returns the contents assigned to the helpKey or nil
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1361
    "
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1362
    ^ helpText
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1363
!
e6ea33c843a0 *** empty log message ***
ca
parents: 1665
diff changeset
  1364
e6ea33c843a0 *** empty log message ***
ca
parents: 1665