UISpecificationTool.st
author Claus Gittinger <cg@exept.de>
Sun, 25 Oct 2009 02:20:52 +0200
changeset 2692 fe9fe2fa192c
parent 2631 8d74338aa3bd
child 2743 a3413ff28529
permissions -rw-r--r--
*** empty log message ***
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
164
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
     1
"
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
     2
 COPYRIGHT (c) 1995 by eXept Software AG
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
     3
              All Rights Reserved
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
     4
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
     5
 This software is furnished under a license and may be used
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
     6
 only in accordance with the terms of that license and with the
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
     8
 be provided or otherwise made available to, or used by, any
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
     9
 other person.  No title to or ownership of the software is
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
    10
 hereby transferred.
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
    11
"
1386
5b562fd44e68 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1364
diff changeset
    12
"{ Package: 'stx:libtool2' }"
5b562fd44e68 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1364
diff changeset
    13
164
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
    14
ApplicationModel subclass:#UISpecificationTool
759
f0c325edcc6c add scroller
ca
parents: 752
diff changeset
    15
	instanceVariableNames:'modifiedHolder aspects specification selection specChannel
1307
52898ecde37d tabing: use map/unmap insteat of raise
ca
parents: 1296
diff changeset
    16
		buildInView listOfSpecViews'
164
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
    17
	classVariableNames:''
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
    18
	poolDictionaries:''
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
    19
	category:'Interface-UIPainter'
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
    20
!
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
    21
1307
52898ecde37d tabing: use map/unmap insteat of raise
ca
parents: 1296
diff changeset
    22
ViewScroller subclass:#BuildInView
1573
bf9c5ca8e48a reuse functionality of changed ViewScroller
ca
parents: 1505
diff changeset
    23
	instanceVariableNames:''
1307
52898ecde37d tabing: use map/unmap insteat of raise
ca
parents: 1296
diff changeset
    24
	classVariableNames:''
52898ecde37d tabing: use map/unmap insteat of raise
ca
parents: 1296
diff changeset
    25
	poolDictionaries:''
52898ecde37d tabing: use map/unmap insteat of raise
ca
parents: 1296
diff changeset
    26
	privateIn:UISpecificationTool
52898ecde37d tabing: use map/unmap insteat of raise
ca
parents: 1296
diff changeset
    27
!
52898ecde37d tabing: use map/unmap insteat of raise
ca
parents: 1296
diff changeset
    28
164
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
    29
!UISpecificationTool class methodsFor:'documentation'!
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
    30
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
    31
copyright
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
    32
"
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
    33
 COPYRIGHT (c) 1995 by eXept Software AG
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
    34
              All Rights Reserved
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
    35
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
    36
 This software is furnished under a license and may be used
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
    37
 only in accordance with the terms of that license and with the
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
    38
 inclusion of the above copyright notice.   This software may not
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
    39
 be provided or otherwise made available to, or used by, any
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
    40
 other person.  No title to or ownership of the software is
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
    41
 hereby transferred.
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
    42
"
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
    43
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
    44
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
    45
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
    46
!
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
    47
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
    48
documentation
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
    49
"
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
    50
    used by the UIPainter to manipulate the specifications of the selected component
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
    51
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
    52
    [author:]
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
    53
        Claus Atzkern
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
    54
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
    55
    [see also:]
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
    56
        UIPainter
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
    57
        UILayoutTool
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
    58
        UIHelpTool
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
    59
"
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
    60
! !
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
    61
1963
a0c51ed97fc3 autoScrollHoriz is now configurable
Claus Gittinger <cg@exept.de>
parents: 1956
diff changeset
    62
!UISpecificationTool class methodsFor:'help specs'!
a0c51ed97fc3 autoScrollHoriz is now configurable
Claus Gittinger <cg@exept.de>
parents: 1956
diff changeset
    63
a0c51ed97fc3 autoScrollHoriz is now configurable
Claus Gittinger <cg@exept.de>
parents: 1956
diff changeset
    64
helpSpec
a0c51ed97fc3 autoScrollHoriz is now configurable
Claus Gittinger <cg@exept.de>
parents: 1956
diff changeset
    65
    "This resource specification was automatically generated
a0c51ed97fc3 autoScrollHoriz is now configurable
Claus Gittinger <cg@exept.de>
parents: 1956
diff changeset
    66
     by the UIHelpTool of ST/X."
a0c51ed97fc3 autoScrollHoriz is now configurable
Claus Gittinger <cg@exept.de>
parents: 1956
diff changeset
    67
a0c51ed97fc3 autoScrollHoriz is now configurable
Claus Gittinger <cg@exept.de>
parents: 1956
diff changeset
    68
    "Do not manually edit this!! If it is corrupted,
a0c51ed97fc3 autoScrollHoriz is now configurable
Claus Gittinger <cg@exept.de>
parents: 1956
diff changeset
    69
     the UIHelpTool may not be able to read the specification."
a0c51ed97fc3 autoScrollHoriz is now configurable
Claus Gittinger <cg@exept.de>
parents: 1956
diff changeset
    70
a0c51ed97fc3 autoScrollHoriz is now configurable
Claus Gittinger <cg@exept.de>
parents: 1956
diff changeset
    71
    "
a0c51ed97fc3 autoScrollHoriz is now configurable
Claus Gittinger <cg@exept.de>
parents: 1956
diff changeset
    72
     UIHelpTool openOnClass:UISpecificationTool    
a0c51ed97fc3 autoScrollHoriz is now configurable
Claus Gittinger <cg@exept.de>
parents: 1956
diff changeset
    73
    "
a0c51ed97fc3 autoScrollHoriz is now configurable
Claus Gittinger <cg@exept.de>
parents: 1956
diff changeset
    74
a0c51ed97fc3 autoScrollHoriz is now configurable
Claus Gittinger <cg@exept.de>
parents: 1956
diff changeset
    75
    <resource: #help>
a0c51ed97fc3 autoScrollHoriz is now configurable
Claus Gittinger <cg@exept.de>
parents: 1956
diff changeset
    76
a0c51ed97fc3 autoScrollHoriz is now configurable
Claus Gittinger <cg@exept.de>
parents: 1956
diff changeset
    77
    ^ super helpSpec addPairsFrom:#(
a0c51ed97fc3 autoScrollHoriz is now configurable
Claus Gittinger <cg@exept.de>
parents: 1956
diff changeset
    78
2316
32e98f335115 Configure wether symbolic colors are allowed
Stefan Vogel <sv@exept.de>
parents: 2283
diff changeset
    79
#allowSymbolicColors
2335
10ccdd81d985 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2316
diff changeset
    80
'ColorMenu is allowed to return a symbolic color name'
10ccdd81d985 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2316
diff changeset
    81
10ccdd81d985 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2316
diff changeset
    82
#allowSymbolicFonts
10ccdd81d985 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2316
diff changeset
    83
'FontMenu is allowed to return a symbolic font name'
2316
32e98f335115 Configure wether symbolic colors are allowed
Stefan Vogel <sv@exept.de>
parents: 2283
diff changeset
    84
2209
c7ac53d62021 action creation/browse added
Claus Gittinger <cg@exept.de>
parents: 2160
diff changeset
    85
#browseAction
c7ac53d62021 action creation/browse added
Claus Gittinger <cg@exept.de>
parents: 2160
diff changeset
    86
'Browse/Create the Action method.'
c7ac53d62021 action creation/browse added
Claus Gittinger <cg@exept.de>
parents: 2160
diff changeset
    87
2237
c1d95982e1c3 browse/generate aspect methods
Claus Gittinger <cg@exept.de>
parents: 2211
diff changeset
    88
#browseAspectMethod
c1d95982e1c3 browse/generate aspect methods
Claus Gittinger <cg@exept.de>
parents: 2211
diff changeset
    89
'Browse/Create the Aspect method.'
c1d95982e1c3 browse/generate aspect methods
Claus Gittinger <cg@exept.de>
parents: 2211
diff changeset
    90
2283
b14becb50aac EditListIcon
Stefan Vogel <sv@exept.de>
parents: 2245
diff changeset
    91
#editListSpec
b14becb50aac EditListIcon
Stefan Vogel <sv@exept.de>
parents: 2245
diff changeset
    92
'Edit the contents of the list (inline)'
b14becb50aac EditListIcon
Stefan Vogel <sv@exept.de>
parents: 2245
diff changeset
    93
2316
32e98f335115 Configure wether symbolic colors are allowed
Stefan Vogel <sv@exept.de>
parents: 2283
diff changeset
    94
#labelsAreColored
32e98f335115 Configure wether symbolic colors are allowed
Stefan Vogel <sv@exept.de>
parents: 2283
diff changeset
    95
'Show color in ColorMenuLabels'
32e98f335115 Configure wether symbolic colors are allowed
Stefan Vogel <sv@exept.de>
parents: 2283
diff changeset
    96
2377
460554434db0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2350
diff changeset
    97
#showFrame
460554434db0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2350
diff changeset
    98
'Show the frame'
460554434db0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2350
diff changeset
    99
1963
a0c51ed97fc3 autoScrollHoriz is now configurable
Claus Gittinger <cg@exept.de>
parents: 1956
diff changeset
   100
)
a0c51ed97fc3 autoScrollHoriz is now configurable
Claus Gittinger <cg@exept.de>
parents: 1956
diff changeset
   101
! !
a0c51ed97fc3 autoScrollHoriz is now configurable
Claus Gittinger <cg@exept.de>
parents: 1956
diff changeset
   102
2209
c7ac53d62021 action creation/browse added
Claus Gittinger <cg@exept.de>
parents: 2160
diff changeset
   103
!UISpecificationTool class methodsFor:'image specs'!
c7ac53d62021 action creation/browse added
Claus Gittinger <cg@exept.de>
parents: 2160
diff changeset
   104
c7ac53d62021 action creation/browse added
Claus Gittinger <cg@exept.de>
parents: 2160
diff changeset
   105
browseActionImage
c7ac53d62021 action creation/browse added
Claus Gittinger <cg@exept.de>
parents: 2160
diff changeset
   106
    ^ UIPainter browseActionImage
2283
b14becb50aac EditListIcon
Stefan Vogel <sv@exept.de>
parents: 2245
diff changeset
   107
!
b14becb50aac EditListIcon
Stefan Vogel <sv@exept.de>
parents: 2245
diff changeset
   108
b14becb50aac EditListIcon
Stefan Vogel <sv@exept.de>
parents: 2245
diff changeset
   109
editTableIcon
b14becb50aac EditListIcon
Stefan Vogel <sv@exept.de>
parents: 2245
diff changeset
   110
    ^ UIPainter editTableIcon
2209
c7ac53d62021 action creation/browse added
Claus Gittinger <cg@exept.de>
parents: 2160
diff changeset
   111
! !
c7ac53d62021 action creation/browse added
Claus Gittinger <cg@exept.de>
parents: 2160
diff changeset
   112
164
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   113
!UISpecificationTool class methodsFor:'interface specs'!
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   114
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   115
windowSpec
1307
52898ecde37d tabing: use map/unmap insteat of raise
ca
parents: 1296
diff changeset
   116
    "This resource specification was automatically generated
52898ecde37d tabing: use map/unmap insteat of raise
ca
parents: 1296
diff changeset
   117
     by the UIPainter of ST/X."
164
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   118
1307
52898ecde37d tabing: use map/unmap insteat of raise
ca
parents: 1296
diff changeset
   119
    "Do not manually edit this!! If it is corrupted,
52898ecde37d tabing: use map/unmap insteat of raise
ca
parents: 1296
diff changeset
   120
     the UIPainter may not be able to read the specification."
164
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   121
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   122
    "
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   123
     UIPainter new openOnClass:UISpecificationTool andSelector:#windowSpec
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   124
     UISpecificationTool new openInterface:#windowSpec
1307
52898ecde37d tabing: use map/unmap insteat of raise
ca
parents: 1296
diff changeset
   125
     UISpecificationTool open
164
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   126
    "
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   127
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   128
    <resource: #canvas>
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   129
1307
52898ecde37d tabing: use map/unmap insteat of raise
ca
parents: 1296
diff changeset
   130
    ^ 
52898ecde37d tabing: use map/unmap insteat of raise
ca
parents: 1296
diff changeset
   131
     #(#FullSpec
52898ecde37d tabing: use map/unmap insteat of raise
ca
parents: 1296
diff changeset
   132
        #name: #windowSpec
52898ecde37d tabing: use map/unmap insteat of raise
ca
parents: 1296
diff changeset
   133
        #window: 
52898ecde37d tabing: use map/unmap insteat of raise
ca
parents: 1296
diff changeset
   134
       #(#WindowSpec
52898ecde37d tabing: use map/unmap insteat of raise
ca
parents: 1296
diff changeset
   135
          #label: 'unnamed canvas'
52898ecde37d tabing: use map/unmap insteat of raise
ca
parents: 1296
diff changeset
   136
          #name: 'unnamed canvas'
1313
95ef9b917d82 no level for scrollable windowSpec ..
ca
parents: 1307
diff changeset
   137
          #bounds: #(#Rectangle 12 22 312 322)
1307
52898ecde37d tabing: use map/unmap insteat of raise
ca
parents: 1296
diff changeset
   138
        )
52898ecde37d tabing: use map/unmap insteat of raise
ca
parents: 1296
diff changeset
   139
        #component: 
52898ecde37d tabing: use map/unmap insteat of raise
ca
parents: 1296
diff changeset
   140
       #(#SpecCollection
52898ecde37d tabing: use map/unmap insteat of raise
ca
parents: 1296
diff changeset
   141
          #collection: #(
52898ecde37d tabing: use map/unmap insteat of raise
ca
parents: 1296
diff changeset
   142
           #(#ArbitraryComponentSpec
1313
95ef9b917d82 no level for scrollable windowSpec ..
ca
parents: 1307
diff changeset
   143
              #name: 'BuildInView'
1307
52898ecde37d tabing: use map/unmap insteat of raise
ca
parents: 1296
diff changeset
   144
              #layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
1313
95ef9b917d82 no level for scrollable windowSpec ..
ca
parents: 1307
diff changeset
   145
              #hasVerticalScrollBar: true
95ef9b917d82 no level for scrollable windowSpec ..
ca
parents: 1307
diff changeset
   146
              #miniScrollerVertical: true
95ef9b917d82 no level for scrollable windowSpec ..
ca
parents: 1307
diff changeset
   147
              #autoHideScrollBars: true
1307
52898ecde37d tabing: use map/unmap insteat of raise
ca
parents: 1296
diff changeset
   148
              #hasBorder: false
1313
95ef9b917d82 no level for scrollable windowSpec ..
ca
parents: 1307
diff changeset
   149
              #component: #buildInView
1307
52898ecde37d tabing: use map/unmap insteat of raise
ca
parents: 1296
diff changeset
   150
            )
52898ecde37d tabing: use map/unmap insteat of raise
ca
parents: 1296
diff changeset
   151
           )
52898ecde37d tabing: use map/unmap insteat of raise
ca
parents: 1296
diff changeset
   152
         
52898ecde37d tabing: use map/unmap insteat of raise
ca
parents: 1296
diff changeset
   153
        )
164
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   154
      )
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   155
! !
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   156
1781
d67090b1ad57 resources shared with UIPainter class
Claus Gittinger <cg@exept.de>
parents: 1677
diff changeset
   157
!UISpecificationTool class methodsFor:'resources'!
d67090b1ad57 resources shared with UIPainter class
Claus Gittinger <cg@exept.de>
parents: 1677
diff changeset
   158
d67090b1ad57 resources shared with UIPainter class
Claus Gittinger <cg@exept.de>
parents: 1677
diff changeset
   159
classResources
d67090b1ad57 resources shared with UIPainter class
Claus Gittinger <cg@exept.de>
parents: 1677
diff changeset
   160
    "my translations are found in the UIPainter classes resources"
d67090b1ad57 resources shared with UIPainter class
Claus Gittinger <cg@exept.de>
parents: 1677
diff changeset
   161
d67090b1ad57 resources shared with UIPainter class
Claus Gittinger <cg@exept.de>
parents: 1677
diff changeset
   162
    ^ UIPainter classResources 
d67090b1ad57 resources shared with UIPainter class
Claus Gittinger <cg@exept.de>
parents: 1677
diff changeset
   163
! !
d67090b1ad57 resources shared with UIPainter class
Claus Gittinger <cg@exept.de>
parents: 1677
diff changeset
   164
1331
fa88e14d026d help texts
Claus Gittinger <cg@exept.de>
parents: 1328
diff changeset
   165
!UISpecificationTool methodsFor:'accessing-channels'!
1315
8722cfe3cce1 checkin from browser
ca
parents: 1313
diff changeset
   166
8722cfe3cce1 checkin from browser
ca
parents: 1313
diff changeset
   167
modifiedHolder:aValueHolder
8722cfe3cce1 checkin from browser
ca
parents: 1313
diff changeset
   168
    "set the value holder set to true in case of modifying attributes
8722cfe3cce1 checkin from browser
ca
parents: 1313
diff changeset
   169
    "
8722cfe3cce1 checkin from browser
ca
parents: 1313
diff changeset
   170
8722cfe3cce1 checkin from browser
ca
parents: 1313
diff changeset
   171
    modifiedHolder removeDependent:self.
164
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   172
1315
8722cfe3cce1 checkin from browser
ca
parents: 1313
diff changeset
   173
    (modifiedHolder := aValueHolder) notNil ifTrue:[
8722cfe3cce1 checkin from browser
ca
parents: 1313
diff changeset
   174
        modifiedHolder addDependent:self.
8722cfe3cce1 checkin from browser
ca
parents: 1313
diff changeset
   175
    ].
1063
9e710dbc7c92 inputFields use modified & acceptChannels
Claus Gittinger <cg@exept.de>
parents: 1051
diff changeset
   176
1315
8722cfe3cce1 checkin from browser
ca
parents: 1313
diff changeset
   177
! !
8722cfe3cce1 checkin from browser
ca
parents: 1313
diff changeset
   178
1331
fa88e14d026d help texts
Claus Gittinger <cg@exept.de>
parents: 1328
diff changeset
   179
!UISpecificationTool methodsFor:'accessing-specification'!
1063
9e710dbc7c92 inputFields use modified & acceptChannels
Claus Gittinger <cg@exept.de>
parents: 1051
diff changeset
   180
2245
fdc284aa0671 changed #initialize
Claus Gittinger <cg@exept.de>
parents: 2239
diff changeset
   181
listOfAspects
fdc284aa0671 changed #initialize
Claus Gittinger <cg@exept.de>
parents: 2239
diff changeset
   182
    ^ masterApplication listOfAspects
fdc284aa0671 changed #initialize
Claus Gittinger <cg@exept.de>
parents: 2239
diff changeset
   183
fdc284aa0671 changed #initialize
Claus Gittinger <cg@exept.de>
parents: 2239
diff changeset
   184
    "Created: / 12-01-2008 / 19:24:39 / cg"
fdc284aa0671 changed #initialize
Claus Gittinger <cg@exept.de>
parents: 2239
diff changeset
   185
!
fdc284aa0671 changed #initialize
Claus Gittinger <cg@exept.de>
parents: 2239
diff changeset
   186
fdc284aa0671 changed #initialize
Claus Gittinger <cg@exept.de>
parents: 2239
diff changeset
   187
listOfCallbacks
fdc284aa0671 changed #initialize
Claus Gittinger <cg@exept.de>
parents: 2239
diff changeset
   188
    ^ masterApplication listOfCallbacks
fdc284aa0671 changed #initialize
Claus Gittinger <cg@exept.de>
parents: 2239
diff changeset
   189
fdc284aa0671 changed #initialize
Claus Gittinger <cg@exept.de>
parents: 2239
diff changeset
   190
    "Created: / 12-01-2008 / 19:25:05 / cg"
fdc284aa0671 changed #initialize
Claus Gittinger <cg@exept.de>
parents: 2239
diff changeset
   191
!
fdc284aa0671 changed #initialize
Claus Gittinger <cg@exept.de>
parents: 2239
diff changeset
   192
172
10e8e0510baa helpSpec no longer under UIPainter
ca
parents: 164
diff changeset
   193
specification
10e8e0510baa helpSpec no longer under UIPainter
ca
parents: 164
diff changeset
   194
    "gets current edit specification
10e8e0510baa helpSpec no longer under UIPainter
ca
parents: 164
diff changeset
   195
    "
10e8e0510baa helpSpec no longer under UIPainter
ca
parents: 164
diff changeset
   196
    ^ specification
10e8e0510baa helpSpec no longer under UIPainter
ca
parents: 164
diff changeset
   197
10e8e0510baa helpSpec no longer under UIPainter
ca
parents: 164
diff changeset
   198
10e8e0510baa helpSpec no longer under UIPainter
ca
parents: 164
diff changeset
   199
!
10e8e0510baa helpSpec no longer under UIPainter
ca
parents: 164
diff changeset
   200
10e8e0510baa helpSpec no longer under UIPainter
ca
parents: 164
diff changeset
   201
specification:aSpec
10e8e0510baa helpSpec no longer under UIPainter
ca
parents: 164
diff changeset
   202
    "sets current edit specification
10e8e0510baa helpSpec no longer under UIPainter
ca
parents: 164
diff changeset
   203
    "
1315
8722cfe3cce1 checkin from browser
ca
parents: 1313
diff changeset
   204
    aSpec notNil ifTrue:[
8722cfe3cce1 checkin from browser
ca
parents: 1313
diff changeset
   205
        "/ same type of spec - simply change the spec;  no need to setup everything
8722cfe3cce1 checkin from browser
ca
parents: 1313
diff changeset
   206
        specification class == aSpec class ifTrue:[
8722cfe3cce1 checkin from browser
ca
parents: 1313
diff changeset
   207
            specification := aSpec.
8722cfe3cce1 checkin from browser
ca
parents: 1313
diff changeset
   208
            specChannel value:specification.
8722cfe3cce1 checkin from browser
ca
parents: 1313
diff changeset
   209
          ^ self
8722cfe3cce1 checkin from browser
ca
parents: 1313
diff changeset
   210
        ]
1307
52898ecde37d tabing: use map/unmap insteat of raise
ca
parents: 1296
diff changeset
   211
    ].
428
f87cca33874e remove dependencies from builder when selection changed
ca
parents: 367
diff changeset
   212
1315
8722cfe3cce1 checkin from browser
ca
parents: 1313
diff changeset
   213
    "/ release resources
8722cfe3cce1 checkin from browser
ca
parents: 1313
diff changeset
   214
    specChannel release.
8722cfe3cce1 checkin from browser
ca
parents: 1313
diff changeset
   215
    aspects     release.
8722cfe3cce1 checkin from browser
ca
parents: 1313
diff changeset
   216
    selection := listOfSpecViews := nil.
1573
bf9c5ca8e48a reuse functionality of changed ViewScroller
ca
parents: 1505
diff changeset
   217
    buildInView destroyAllClientViews.
1315
8722cfe3cce1 checkin from browser
ca
parents: 1313
diff changeset
   218
8722cfe3cce1 checkin from browser
ca
parents: 1313
diff changeset
   219
    (specification := aSpec) isNil ifTrue:[
8722cfe3cce1 checkin from browser
ca
parents: 1313
diff changeset
   220
        aspects := specChannel := nil.
8722cfe3cce1 checkin from browser
ca
parents: 1313
diff changeset
   221
      ^ self
1307
52898ecde37d tabing: use map/unmap insteat of raise
ca
parents: 1296
diff changeset
   222
    ].
52898ecde37d tabing: use map/unmap insteat of raise
ca
parents: 1296
diff changeset
   223
    
52898ecde37d tabing: use map/unmap insteat of raise
ca
parents: 1296
diff changeset
   224
    "/ some tricky specs need the builder during the addBindings phase.
52898ecde37d tabing: use map/unmap insteat of raise
ca
parents: 1296
diff changeset
   225
    "/ This is passed down in a special UIBindingsDictionary
52898ecde37d tabing: use map/unmap insteat of raise
ca
parents: 1296
diff changeset
   226
    "/ (remain backward compatible)
536
3991e37ec19f pass special dictionary as bindings-environmnt
Claus Gittinger <cg@exept.de>
parents: 428
diff changeset
   227
1307
52898ecde37d tabing: use map/unmap insteat of raise
ca
parents: 1296
diff changeset
   228
    aspects := UISpecification newBindingsDictionary.
52898ecde37d tabing: use map/unmap insteat of raise
ca
parents: 1296
diff changeset
   229
    aspects builder:builder.
52898ecde37d tabing: use map/unmap insteat of raise
ca
parents: 1296
diff changeset
   230
    aspects at:#modifiedChannel put:modifiedHolder.
52898ecde37d tabing: use map/unmap insteat of raise
ca
parents: 1296
diff changeset
   231
    aspects at:#acceptChannel   put:self acceptChannel.
172
10e8e0510baa helpSpec no longer under UIPainter
ca
parents: 164
diff changeset
   232
2245
fdc284aa0671 changed #initialize
Claus Gittinger <cg@exept.de>
parents: 2239
diff changeset
   233
    aspects at:#listOfAspects put:[self listOfAspects].
fdc284aa0671 changed #initialize
Claus Gittinger <cg@exept.de>
parents: 2239
diff changeset
   234
    aspects at:#listOfCallbacks put:[self listOfCallbacks].
fdc284aa0671 changed #initialize
Claus Gittinger <cg@exept.de>
parents: 2239
diff changeset
   235
1307
52898ecde37d tabing: use map/unmap insteat of raise
ca
parents: 1296
diff changeset
   236
    specChannel := specification asValue.
52898ecde37d tabing: use map/unmap insteat of raise
ca
parents: 1296
diff changeset
   237
    specification class addBindingsTo:aspects for:specification channel:specChannel.
536
3991e37ec19f pass special dictionary as bindings-environmnt
Claus Gittinger <cg@exept.de>
parents: 428
diff changeset
   238
1307
52898ecde37d tabing: use map/unmap insteat of raise
ca
parents: 1296
diff changeset
   239
    "/ arrange for being notified, if any aspect changes
52898ecde37d tabing: use map/unmap insteat of raise
ca
parents: 1296
diff changeset
   240
    aspects do:[:el| el addDependent:self ].
2245
fdc284aa0671 changed #initialize
Claus Gittinger <cg@exept.de>
parents: 2239
diff changeset
   241
fdc284aa0671 changed #initialize
Claus Gittinger <cg@exept.de>
parents: 2239
diff changeset
   242
    "Modified: / 12-01-2008 / 19:28:47 / cg"
172
10e8e0510baa helpSpec no longer under UIPainter
ca
parents: 164
diff changeset
   243
! !
10e8e0510baa helpSpec no longer under UIPainter
ca
parents: 164
diff changeset
   244
364
c175e197f050 setMin / setMax
Claus Gittinger <cg@exept.de>
parents: 350
diff changeset
   245
!UISpecificationTool methodsFor:'actions'!
c175e197f050 setMin / setMax
Claus Gittinger <cg@exept.de>
parents: 350
diff changeset
   246
c175e197f050 setMin / setMax
Claus Gittinger <cg@exept.de>
parents: 350
diff changeset
   247
setMaxExtent
c175e197f050 setMin / setMax
Claus Gittinger <cg@exept.de>
parents: 350
diff changeset
   248
    "set the windows maxExtent from its current extent"
c175e197f050 setMin / setMax
Claus Gittinger <cg@exept.de>
parents: 350
diff changeset
   249
c175e197f050 setMin / setMax
Claus Gittinger <cg@exept.de>
parents: 350
diff changeset
   250
    |canvas currentExtent|
c175e197f050 setMin / setMax
Claus Gittinger <cg@exept.de>
parents: 350
diff changeset
   251
2211
f7fac4c1afe9 UseViewScroller
Claus Gittinger <cg@exept.de>
parents: 2209
diff changeset
   252
    canvas := self masterApplication canvas.
364
c175e197f050 setMin / setMax
Claus Gittinger <cg@exept.de>
parents: 350
diff changeset
   253
    currentExtent := canvas extent.
c175e197f050 setMin / setMax
Claus Gittinger <cg@exept.de>
parents: 350
diff changeset
   254
    (self aspectFor:#maxX) value:currentExtent x.
c175e197f050 setMin / setMax
Claus Gittinger <cg@exept.de>
parents: 350
diff changeset
   255
    (self aspectFor:#maxY) value:currentExtent y.
c175e197f050 setMin / setMax
Claus Gittinger <cg@exept.de>
parents: 350
diff changeset
   256
c175e197f050 setMin / setMax
Claus Gittinger <cg@exept.de>
parents: 350
diff changeset
   257
    "Modified: / 29.10.1997 / 18:29:17 / cg"
c175e197f050 setMin / setMax
Claus Gittinger <cg@exept.de>
parents: 350
diff changeset
   258
!
c175e197f050 setMin / setMax
Claus Gittinger <cg@exept.de>
parents: 350
diff changeset
   259
c175e197f050 setMin / setMax
Claus Gittinger <cg@exept.de>
parents: 350
diff changeset
   260
setMinExtent
c175e197f050 setMin / setMax
Claus Gittinger <cg@exept.de>
parents: 350
diff changeset
   261
    "set the windows minExtent from its current extent"
c175e197f050 setMin / setMax
Claus Gittinger <cg@exept.de>
parents: 350
diff changeset
   262
c175e197f050 setMin / setMax
Claus Gittinger <cg@exept.de>
parents: 350
diff changeset
   263
    |canvas currentExtent|
c175e197f050 setMin / setMax
Claus Gittinger <cg@exept.de>
parents: 350
diff changeset
   264
2211
f7fac4c1afe9 UseViewScroller
Claus Gittinger <cg@exept.de>
parents: 2209
diff changeset
   265
    canvas := self masterApplication canvas.
364
c175e197f050 setMin / setMax
Claus Gittinger <cg@exept.de>
parents: 350
diff changeset
   266
    currentExtent := canvas extent.
c175e197f050 setMin / setMax
Claus Gittinger <cg@exept.de>
parents: 350
diff changeset
   267
    (self aspectFor:#minX) value:currentExtent x.
c175e197f050 setMin / setMax
Claus Gittinger <cg@exept.de>
parents: 350
diff changeset
   268
    (self aspectFor:#minY) value:currentExtent y.
c175e197f050 setMin / setMax
Claus Gittinger <cg@exept.de>
parents: 350
diff changeset
   269
c175e197f050 setMin / setMax
Claus Gittinger <cg@exept.de>
parents: 350
diff changeset
   270
    "Created: / 29.10.1997 / 18:17:55 / cg"
c175e197f050 setMin / setMax
Claus Gittinger <cg@exept.de>
parents: 350
diff changeset
   271
    "Modified: / 29.10.1997 / 18:28:53 / cg"
c175e197f050 setMin / setMax
Claus Gittinger <cg@exept.de>
parents: 350
diff changeset
   272
! !
c175e197f050 setMin / setMax
Claus Gittinger <cg@exept.de>
parents: 350
diff changeset
   273
164
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   274
!UISpecificationTool methodsFor:'bindings'!
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   275
1315
8722cfe3cce1 checkin from browser
ca
parents: 1313
diff changeset
   276
acceptChannel
2245
fdc284aa0671 changed #initialize
Claus Gittinger <cg@exept.de>
parents: 2239
diff changeset
   277
    ^ masterApplication acceptChannel
1315
8722cfe3cce1 checkin from browser
ca
parents: 1313
diff changeset
   278
2245
fdc284aa0671 changed #initialize
Claus Gittinger <cg@exept.de>
parents: 2239
diff changeset
   279
    "Modified: / 12-01-2008 / 11:28:38 / cg"
1315
8722cfe3cce1 checkin from browser
ca
parents: 1313
diff changeset
   280
!
8722cfe3cce1 checkin from browser
ca
parents: 1313
diff changeset
   281
164
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   282
aspectFor:aKey
2245
fdc284aa0671 changed #initialize
Claus Gittinger <cg@exept.de>
parents: 2239
diff changeset
   283
    "returns the aspect for a key or nil"
fdc284aa0671 changed #initialize
Claus Gittinger <cg@exept.de>
parents: 2239
diff changeset
   284
164
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   285
    aspects notNil ifTrue:[
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   286
        ^ aspects at:aKey ifAbsent:nil
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   287
    ].
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   288
    ^ super aspectFor:aKey
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   289
2245
fdc284aa0671 changed #initialize
Claus Gittinger <cg@exept.de>
parents: 2239
diff changeset
   290
    "Modified: / 12-01-2008 / 11:28:52 / cg"
428
f87cca33874e remove dependencies from builder when selection changed
ca
parents: 367
diff changeset
   291
!
f87cca33874e remove dependencies from builder when selection changed
ca
parents: 367
diff changeset
   292
1313
95ef9b917d82 no level for scrollable windowSpec ..
ca
parents: 1307
diff changeset
   293
buildInView
95ef9b917d82 no level for scrollable windowSpec ..
ca
parents: 1307
diff changeset
   294
    ^ buildInView
1307
52898ecde37d tabing: use map/unmap insteat of raise
ca
parents: 1296
diff changeset
   295
!
52898ecde37d tabing: use map/unmap insteat of raise
ca
parents: 1296
diff changeset
   296
584
351914fcc5a4 Define #specificationFor: to fetch subspecifications and
Stefan Vogel <sv@exept.de>
parents: 580
diff changeset
   297
specificationFor:aKey
351914fcc5a4 Define #specificationFor: to fetch subspecifications and
Stefan Vogel <sv@exept.de>
parents: 580
diff changeset
   298
    "this is called if our current specification contains 
351914fcc5a4 Define #specificationFor: to fetch subspecifications and
Stefan Vogel <sv@exept.de>
parents: 580
diff changeset
   299
     subspecifications or subcanvases.
351914fcc5a4 Define #specificationFor: to fetch subspecifications and
Stefan Vogel <sv@exept.de>
parents: 580
diff changeset
   300
     Get the subspecification from the current specification"
351914fcc5a4 Define #specificationFor: to fetch subspecifications and
Stefan Vogel <sv@exept.de>
parents: 580
diff changeset
   301
1307
52898ecde37d tabing: use map/unmap insteat of raise
ca
parents: 1296
diff changeset
   302
    specification notNil ifTrue:[
52898ecde37d tabing: use map/unmap insteat of raise
ca
parents: 1296
diff changeset
   303
        ^ specification class perform:aKey ifNotUnderstood:nil
584
351914fcc5a4 Define #specificationFor: to fetch subspecifications and
Stefan Vogel <sv@exept.de>
parents: 580
diff changeset
   304
    ].
351914fcc5a4 Define #specificationFor: to fetch subspecifications and
Stefan Vogel <sv@exept.de>
parents: 580
diff changeset
   305
    ^ nil
172
10e8e0510baa helpSpec no longer under UIPainter
ca
parents: 164
diff changeset
   306
! !
10e8e0510baa helpSpec no longer under UIPainter
ca
parents: 164
diff changeset
   307
10e8e0510baa helpSpec no longer under UIPainter
ca
parents: 164
diff changeset
   308
!UISpecificationTool methodsFor:'change & update'!
164
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   309
172
10e8e0510baa helpSpec no longer under UIPainter
ca
parents: 164
diff changeset
   310
update
10e8e0510baa helpSpec no longer under UIPainter
ca
parents: 164
diff changeset
   311
    "reload specification
164
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   312
    "
172
10e8e0510baa helpSpec no longer under UIPainter
ca
parents: 164
diff changeset
   313
    specChannel notNil ifTrue:[
10e8e0510baa helpSpec no longer under UIPainter
ca
parents: 164
diff changeset
   314
        specChannel value:specification.
10e8e0510baa helpSpec no longer under UIPainter
ca
parents: 164
diff changeset
   315
    ]
164
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   316
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   317
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   318
!
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   319
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   320
update:something with:someArgument from:someone
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   321
    "any attribute changed its state in the current specification
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   322
    "
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   323
    someone ~~ modifiedHolder ifTrue:[
893
09ea254a9fda comments
Claus Gittinger <cg@exept.de>
parents: 876
diff changeset
   324
        "/ any in the spec has changed.
09ea254a9fda comments
Claus Gittinger <cg@exept.de>
parents: 876
diff changeset
   325
        "/ update my modified holders value
09ea254a9fda comments
Claus Gittinger <cg@exept.de>
parents: 876
diff changeset
   326
1071
560a9eb1a5d8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1069
diff changeset
   327
        modifiedHolder value:true
164
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   328
    ]
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   329
893
09ea254a9fda comments
Claus Gittinger <cg@exept.de>
parents: 876
diff changeset
   330
    "Modified: / 16.7.1998 / 19:25:59 / cg"
164
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   331
! !
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   332
1956
65cc475656d3 help texts
Claus Gittinger <cg@exept.de>
parents: 1941
diff changeset
   333
!UISpecificationTool methodsFor:'help'!
65cc475656d3 help texts
Claus Gittinger <cg@exept.de>
parents: 1941
diff changeset
   334
2524
759b4b908fcb allow master to provide an alternative help text
Claus Gittinger <cg@exept.de>
parents: 2377
diff changeset
   335
basicFlyByHelpTextForKey:aKey
759b4b908fcb allow master to provide an alternative help text
Claus Gittinger <cg@exept.de>
parents: 2377
diff changeset
   336
    "activeHelp interface: return some help text for a key.
759b4b908fcb allow master to provide an alternative help text
Claus Gittinger <cg@exept.de>
parents: 2377
diff changeset
   337
     Redefined to ask the current components Spec first."
759b4b908fcb allow master to provide an alternative help text
Claus Gittinger <cg@exept.de>
parents: 2377
diff changeset
   338
759b4b908fcb allow master to provide an alternative help text
Claus Gittinger <cg@exept.de>
parents: 2377
diff changeset
   339
    |helpText|
759b4b908fcb allow master to provide an alternative help text
Claus Gittinger <cg@exept.de>
parents: 2377
diff changeset
   340
759b4b908fcb allow master to provide an alternative help text
Claus Gittinger <cg@exept.de>
parents: 2377
diff changeset
   341
    "/ first, ask the master (a hook for expecco, to provide different help texts)
759b4b908fcb allow master to provide an alternative help text
Claus Gittinger <cg@exept.de>
parents: 2377
diff changeset
   342
    masterApplication notNil ifTrue:[
759b4b908fcb allow master to provide an alternative help text
Claus Gittinger <cg@exept.de>
parents: 2377
diff changeset
   343
        helpText := masterApplication basicFlyByHelpTextForKey:aKey.
759b4b908fcb allow master to provide an alternative help text
Claus Gittinger <cg@exept.de>
parents: 2377
diff changeset
   344
        helpText notNil ifTrue:[^ helpText ].
2545
cd5d45739973 more flexible flyByHelpText redefinition
Claus Gittinger <cg@exept.de>
parents: 2524
diff changeset
   345
cd5d45739973 more flexible flyByHelpText redefinition
Claus Gittinger <cg@exept.de>
parents: 2524
diff changeset
   346
        "/ then, ask the master about the spec
cd5d45739973 more flexible flyByHelpText redefinition
Claus Gittinger <cg@exept.de>
parents: 2524
diff changeset
   347
        helpText := masterApplication basicHelpTextFromSpecification:specification forKey:aKey.
cd5d45739973 more flexible flyByHelpText redefinition
Claus Gittinger <cg@exept.de>
parents: 2524
diff changeset
   348
    ] ifFalse:[
cd5d45739973 more flexible flyByHelpText redefinition
Claus Gittinger <cg@exept.de>
parents: 2524
diff changeset
   349
        "/ then, ask the spec
cd5d45739973 more flexible flyByHelpText redefinition
Claus Gittinger <cg@exept.de>
parents: 2524
diff changeset
   350
        helpText := (specification helpSpec) at:aKey ifAbsent:nil.
2524
759b4b908fcb allow master to provide an alternative help text
Claus Gittinger <cg@exept.de>
parents: 2377
diff changeset
   351
    ].
759b4b908fcb allow master to provide an alternative help text
Claus Gittinger <cg@exept.de>
parents: 2377
diff changeset
   352
    helpText notNil ifTrue:[^ helpText ].
759b4b908fcb allow master to provide an alternative help text
Claus Gittinger <cg@exept.de>
parents: 2377
diff changeset
   353
759b4b908fcb allow master to provide an alternative help text
Claus Gittinger <cg@exept.de>
parents: 2377
diff changeset
   354
    "/ finally, ask myself...
759b4b908fcb allow master to provide an alternative help text
Claus Gittinger <cg@exept.de>
parents: 2377
diff changeset
   355
    ^ super basicFlyByHelpTextForKey:aKey.
759b4b908fcb allow master to provide an alternative help text
Claus Gittinger <cg@exept.de>
parents: 2377
diff changeset
   356
!
759b4b908fcb allow master to provide an alternative help text
Claus Gittinger <cg@exept.de>
parents: 2377
diff changeset
   357
1956
65cc475656d3 help texts
Claus Gittinger <cg@exept.de>
parents: 1941
diff changeset
   358
basicHelpTextForKey:aKey
65cc475656d3 help texts
Claus Gittinger <cg@exept.de>
parents: 1941
diff changeset
   359
    "activeHelp interface: return some help text for a key.
65cc475656d3 help texts
Claus Gittinger <cg@exept.de>
parents: 1941
diff changeset
   360
     Redefined to ask the current components Spec first."
65cc475656d3 help texts
Claus Gittinger <cg@exept.de>
parents: 1941
diff changeset
   361
65cc475656d3 help texts
Claus Gittinger <cg@exept.de>
parents: 1941
diff changeset
   362
    |helpText|
65cc475656d3 help texts
Claus Gittinger <cg@exept.de>
parents: 1941
diff changeset
   363
2524
759b4b908fcb allow master to provide an alternative help text
Claus Gittinger <cg@exept.de>
parents: 2377
diff changeset
   364
    "/ first, ask the master (a hook for expecco, to provide different help texts)
759b4b908fcb allow master to provide an alternative help text
Claus Gittinger <cg@exept.de>
parents: 2377
diff changeset
   365
    masterApplication notNil ifTrue:[
759b4b908fcb allow master to provide an alternative help text
Claus Gittinger <cg@exept.de>
parents: 2377
diff changeset
   366
        helpText := masterApplication basicHelpTextForKey:aKey.
759b4b908fcb allow master to provide an alternative help text
Claus Gittinger <cg@exept.de>
parents: 2377
diff changeset
   367
        helpText notNil ifTrue:[^ helpText ].
2545
cd5d45739973 more flexible flyByHelpText redefinition
Claus Gittinger <cg@exept.de>
parents: 2524
diff changeset
   368
cd5d45739973 more flexible flyByHelpText redefinition
Claus Gittinger <cg@exept.de>
parents: 2524
diff changeset
   369
        "/ then, ask the master about the spec
cd5d45739973 more flexible flyByHelpText redefinition
Claus Gittinger <cg@exept.de>
parents: 2524
diff changeset
   370
        helpText := masterApplication basicHelpTextFromSpecification:specification forKey:aKey.
cd5d45739973 more flexible flyByHelpText redefinition
Claus Gittinger <cg@exept.de>
parents: 2524
diff changeset
   371
    ] ifFalse:[
cd5d45739973 more flexible flyByHelpText redefinition
Claus Gittinger <cg@exept.de>
parents: 2524
diff changeset
   372
        "/ then, ask the spec
cd5d45739973 more flexible flyByHelpText redefinition
Claus Gittinger <cg@exept.de>
parents: 2524
diff changeset
   373
        helpText := (specification helpSpec) at:aKey ifAbsent:nil.
2524
759b4b908fcb allow master to provide an alternative help text
Claus Gittinger <cg@exept.de>
parents: 2377
diff changeset
   374
    ].
759b4b908fcb allow master to provide an alternative help text
Claus Gittinger <cg@exept.de>
parents: 2377
diff changeset
   375
    helpText notNil ifTrue:[^ helpText ].
759b4b908fcb allow master to provide an alternative help text
Claus Gittinger <cg@exept.de>
parents: 2377
diff changeset
   376
759b4b908fcb allow master to provide an alternative help text
Claus Gittinger <cg@exept.de>
parents: 2377
diff changeset
   377
    "/ finally, ask myself...
759b4b908fcb allow master to provide an alternative help text
Claus Gittinger <cg@exept.de>
parents: 2377
diff changeset
   378
    ^ super basicHelpTextForKey:aKey.
1956
65cc475656d3 help texts
Claus Gittinger <cg@exept.de>
parents: 1941
diff changeset
   379
! !
65cc475656d3 help texts
Claus Gittinger <cg@exept.de>
parents: 1941
diff changeset
   380
1315
8722cfe3cce1 checkin from browser
ca
parents: 1313
diff changeset
   381
!UISpecificationTool methodsFor:'initialization'!
8722cfe3cce1 checkin from browser
ca
parents: 1313
diff changeset
   382
8722cfe3cce1 checkin from browser
ca
parents: 1313
diff changeset
   383
initialize
8722cfe3cce1 checkin from browser
ca
parents: 1313
diff changeset
   384
    super initialize.
8722cfe3cce1 checkin from browser
ca
parents: 1313
diff changeset
   385
    buildInView := BuildInView new.
1573
bf9c5ca8e48a reuse functionality of changed ViewScroller
ca
parents: 1505
diff changeset
   386
    buildInView keepViews:true.
1315
8722cfe3cce1 checkin from browser
ca
parents: 1313
diff changeset
   387
! !
8722cfe3cce1 checkin from browser
ca
parents: 1313
diff changeset
   388
164
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   389
!UISpecificationTool methodsFor:'selection'!
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   390
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   391
selection:something
172
10e8e0510baa helpSpec no longer under UIPainter
ca
parents: 164
diff changeset
   392
    "selection changed
10e8e0510baa helpSpec no longer under UIPainter
ca
parents: 164
diff changeset
   393
    "
1307
52898ecde37d tabing: use map/unmap insteat of raise
ca
parents: 1296
diff changeset
   394
    |slices index spec window|
164
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   395
172
10e8e0510baa helpSpec no longer under UIPainter
ca
parents: 164
diff changeset
   396
    specification notNil ifTrue:[
10e8e0510baa helpSpec no longer under UIPainter
ca
parents: 164
diff changeset
   397
        slices := specification class slices.
1307
52898ecde37d tabing: use map/unmap insteat of raise
ca
parents: 1296
diff changeset
   398
        index  := slices findFirst:[:aSlice| aSlice first = something ].
164
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   399
1307
52898ecde37d tabing: use map/unmap insteat of raise
ca
parents: 1296
diff changeset
   400
        index ~~ 0 ifTrue:[
52898ecde37d tabing: use map/unmap insteat of raise
ca
parents: 1296
diff changeset
   401
            spec := specification class perform:((slices at:index) last)
428
f87cca33874e remove dependencies from builder when selection changed
ca
parents: 367
diff changeset
   402
        ]
164
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   403
    ].
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   404
172
10e8e0510baa helpSpec no longer under UIPainter
ca
parents: 164
diff changeset
   405
    spec ~= selection ifTrue:[
1307
52898ecde37d tabing: use map/unmap insteat of raise
ca
parents: 1296
diff changeset
   406
        (selection := spec) notNil ifTrue:[
52898ecde37d tabing: use map/unmap insteat of raise
ca
parents: 1296
diff changeset
   407
            listOfSpecViews isNil ifTrue:[
52898ecde37d tabing: use map/unmap insteat of raise
ca
parents: 1296
diff changeset
   408
                listOfSpecViews := Array new:(slices size).
52898ecde37d tabing: use map/unmap insteat of raise
ca
parents: 1296
diff changeset
   409
            ] ifFalse:[
52898ecde37d tabing: use map/unmap insteat of raise
ca
parents: 1296
diff changeset
   410
                window := listOfSpecViews at:index
52898ecde37d tabing: use map/unmap insteat of raise
ca
parents: 1296
diff changeset
   411
            ].
52898ecde37d tabing: use map/unmap insteat of raise
ca
parents: 1296
diff changeset
   412
            window isNil ifTrue:[
52898ecde37d tabing: use map/unmap insteat of raise
ca
parents: 1296
diff changeset
   413
                builder buildFromSpec:spec in:(window := SimpleView new).
52898ecde37d tabing: use map/unmap insteat of raise
ca
parents: 1296
diff changeset
   414
                listOfSpecViews at:index put:window.
52898ecde37d tabing: use map/unmap insteat of raise
ca
parents: 1296
diff changeset
   415
            ].
52898ecde37d tabing: use map/unmap insteat of raise
ca
parents: 1296
diff changeset
   416
        ].
1315
8722cfe3cce1 checkin from browser
ca
parents: 1313
diff changeset
   417
        buildInView scrolledView:window.
164
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   418
    ].
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   419
! !
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   420
1307
52898ecde37d tabing: use map/unmap insteat of raise
ca
parents: 1296
diff changeset
   421
!UISpecificationTool::BuildInView methodsFor:'accessing'!
759
f0c325edcc6c add scroller
ca
parents: 752
diff changeset
   422
2160
8f6a8896f10d focus handling
ca
parents: 1963
diff changeset
   423
mapped
8f6a8896f10d focus handling
ca
parents: 1963
diff changeset
   424
    super mapped.
8f6a8896f10d focus handling
ca
parents: 1963
diff changeset
   425
8f6a8896f10d focus handling
ca
parents: 1963
diff changeset
   426
    scrolledView notNil ifTrue:[
8f6a8896f10d focus handling
ca
parents: 1963
diff changeset
   427
        scrolledView beVisible.
8f6a8896f10d focus handling
ca
parents: 1963
diff changeset
   428
        scrolledView raise.
8f6a8896f10d focus handling
ca
parents: 1963
diff changeset
   429
    ].
8f6a8896f10d focus handling
ca
parents: 1963
diff changeset
   430
!
8f6a8896f10d focus handling
ca
parents: 1963
diff changeset
   431
1307
52898ecde37d tabing: use map/unmap insteat of raise
ca
parents: 1296
diff changeset
   432
scrolledView:aView
52898ecde37d tabing: use map/unmap insteat of raise
ca
parents: 1296
diff changeset
   433
    "set the view to be scrolled"
1573
bf9c5ca8e48a reuse functionality of changed ViewScroller
ca
parents: 1505
diff changeset
   434
    |wrapper y|
1307
52898ecde37d tabing: use map/unmap insteat of raise
ca
parents: 1296
diff changeset
   435
52898ecde37d tabing: use map/unmap insteat of raise
ca
parents: 1296
diff changeset
   436
    scrolledView == aView ifTrue:[^ self].
759
f0c325edcc6c add scroller
ca
parents: 752
diff changeset
   437
2160
8f6a8896f10d focus handling
ca
parents: 1963
diff changeset
   438
    scrolledView notNil ifTrue:[
8f6a8896f10d focus handling
ca
parents: 1963
diff changeset
   439
        scrolledView unmap.
8f6a8896f10d focus handling
ca
parents: 1963
diff changeset
   440
    ].
8f6a8896f10d focus handling
ca
parents: 1963
diff changeset
   441
    (scrolledView := aView) notNil ifTrue:[
8f6a8896f10d focus handling
ca
parents: 1963
diff changeset
   442
        scrolledView superView ~~ frame ifTrue:[
8f6a8896f10d focus handling
ca
parents: 1963
diff changeset
   443
            scrolledView borderWidth:0; level:0.
1307
52898ecde37d tabing: use map/unmap insteat of raise
ca
parents: 1296
diff changeset
   444
2160
8f6a8896f10d focus handling
ca
parents: 1963
diff changeset
   445
            frame addSubView:scrolledView.
1573
bf9c5ca8e48a reuse functionality of changed ViewScroller
ca
parents: 1505
diff changeset
   446
2160
8f6a8896f10d focus handling
ca
parents: 1963
diff changeset
   447
            scrolledView subViews size == 1 ifTrue:[
8f6a8896f10d focus handling
ca
parents: 1963
diff changeset
   448
                wrapper := scrolledView subViews first.
8f6a8896f10d focus handling
ca
parents: 1963
diff changeset
   449
                wrapper isScrollWrapper ifTrue:[
8f6a8896f10d focus handling
ca
parents: 1963
diff changeset
   450
                    "/ give it a full-relative size, and let it do
8f6a8896f10d focus handling
ca
parents: 1963
diff changeset
   451
                    "/ the scrolling itself.
8f6a8896f10d focus handling
ca
parents: 1963
diff changeset
   452
                    y := 1.0
8f6a8896f10d focus handling
ca
parents: 1963
diff changeset
   453
                ]
8f6a8896f10d focus handling
ca
parents: 1963
diff changeset
   454
            ].
8f6a8896f10d focus handling
ca
parents: 1963
diff changeset
   455
            y isNil ifTrue:[
2350
3421f548e14a preferredX
Claus Gittinger <cg@exept.de>
parents: 2335
diff changeset
   456
                y := scrolledView preferredHeight
2160
8f6a8896f10d focus handling
ca
parents: 1963
diff changeset
   457
            ].
8f6a8896f10d focus handling
ca
parents: 1963
diff changeset
   458
            scrolledView origin:0@0 corner:1.0 @ y.
8f6a8896f10d focus handling
ca
parents: 1963
diff changeset
   459
            scrolledView allViewBackground:(self viewBackground).
1351
811686e8acab no additional scrollBar, if embedded view is itself a scrollable
Claus Gittinger <cg@exept.de>
parents: 1344
diff changeset
   460
        ].
2160
8f6a8896f10d focus handling
ca
parents: 1963
diff changeset
   461
    ].    
8f6a8896f10d focus handling
ca
parents: 1963
diff changeset
   462
    shown ifTrue:[
8f6a8896f10d focus handling
ca
parents: 1963
diff changeset
   463
        scrolledView beVisible.
8f6a8896f10d focus handling
ca
parents: 1963
diff changeset
   464
        scrolledView raise.
1307
52898ecde37d tabing: use map/unmap insteat of raise
ca
parents: 1296
diff changeset
   465
        self sizeChanged:nil.
52898ecde37d tabing: use map/unmap insteat of raise
ca
parents: 1296
diff changeset
   466
    ].
1573
bf9c5ca8e48a reuse functionality of changed ViewScroller
ca
parents: 1505
diff changeset
   467
    model value:scrolledView.
759
f0c325edcc6c add scroller
ca
parents: 752
diff changeset
   468
! !
f0c325edcc6c add scroller
ca
parents: 752
diff changeset
   469
1313
95ef9b917d82 no level for scrollable windowSpec ..
ca
parents: 1307
diff changeset
   470
!UISpecificationTool::BuildInView methodsFor:'initialization'!
95ef9b917d82 no level for scrollable windowSpec ..
ca
parents: 1307
diff changeset
   471
95ef9b917d82 no level for scrollable windowSpec ..
ca
parents: 1307
diff changeset
   472
level:aLevel
95ef9b917d82 no level for scrollable windowSpec ..
ca
parents: 1307
diff changeset
   473
    super level:0
95ef9b917d82 no level for scrollable windowSpec ..
ca
parents: 1307
diff changeset
   474
!
95ef9b917d82 no level for scrollable windowSpec ..
ca
parents: 1307
diff changeset
   475
95ef9b917d82 no level for scrollable windowSpec ..
ca
parents: 1307
diff changeset
   476
realize
1315
8722cfe3cce1 checkin from browser
ca
parents: 1313
diff changeset
   477
1313
95ef9b917d82 no level for scrollable windowSpec ..
ca
parents: 1307
diff changeset
   478
    super realize.
95ef9b917d82 no level for scrollable windowSpec ..
ca
parents: 1307
diff changeset
   479
    superView notNil ifTrue:[superView level:0].
95ef9b917d82 no level for scrollable windowSpec ..
ca
parents: 1307
diff changeset
   480
! !
95ef9b917d82 no level for scrollable windowSpec ..
ca
parents: 1307
diff changeset
   481
164
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   482
!UISpecificationTool class methodsFor:'documentation'!
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   483
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   484
version
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   485
    ^ '$Header$'
2631
8d74338aa3bd changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2545
diff changeset
   486
!
8d74338aa3bd changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2545
diff changeset
   487
8d74338aa3bd changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2545
diff changeset
   488
version_CVS
8d74338aa3bd changed: #helpSpec
Claus Gittinger <cg@exept.de>
parents: 2545
diff changeset
   489
    ^ '$Header$'
164
1bc26edd0d3e intitial checkin
ca
parents:
diff changeset
   490
! !