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