UIGalleryView.st
author Claus Gittinger <cg@exept.de>
Mon, 06 Aug 2012 16:58:29 +0200
changeset 2900 1a7874e7d36a
parent 2563 c2298d24621d
child 3081 feb178704671
permissions -rw-r--r--
changed: #createNewProject fix for error report (ffb@verat.net 2012-08-06 16:01:54.005).
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
181
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
     1
"
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
     2
 COPYRIGHT (c) 1997 by Claus Gittinger / eXept Software AG
1120
230fe13c4e51 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1113
diff changeset
     3
	      All Rights Reserved
181
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
     4
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
     5
 This software is furnished under a license and may be used
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
     6
 only in accordance with the terms of that license and with the
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
     8
 be provided or otherwise made available to, or used by, any
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
     9
 other person.  No title to or ownership of the software is
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
    10
 hereby transferred.
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
    11
"
1399
a0687f5e1f54 category changes
Claus Gittinger <cg@exept.de>
parents: 1337
diff changeset
    12
"{ Package: 'stx:libtool2' }"
a0687f5e1f54 category changes
Claus Gittinger <cg@exept.de>
parents: 1337
diff changeset
    13
181
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
    14
NoteBookView subclass:#UIGalleryView
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
    15
	instanceVariableNames:'majorKey minorKeys minorKeysHolder'
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
    16
	classVariableNames:''
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
    17
	poolDictionaries:''
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
    18
	category:'Interface-UIPainter'
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
    19
!
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
    20
2563
c2298d24621d renamed canvas into palette
Claus Gittinger <cg@exept.de>
parents: 2561
diff changeset
    21
View subclass:#Palette
1675
9e7465c57509 drag & drop mechanism
ca
parents: 1674
diff changeset
    22
	instanceVariableNames:'clientSpecHolder selection specification lastClickPoint
2542
5cb4a0bdc44c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
    23
		menuSelector uiBuilder hiddenCounter showBorders
5cb4a0bdc44c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
    24
		didWarnAboutUnknownSpecs'
181
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
    25
	classVariableNames:''
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
    26
	poolDictionaries:''
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
    27
	privateIn:UIGalleryView
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
    28
!
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
    29
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
    30
DropObject subclass:#DropSpec
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
    31
	instanceVariableNames:''
247
b4d3f54f2128 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 240
diff changeset
    32
	classVariableNames:''
181
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
    33
	poolDictionaries:''
2563
c2298d24621d renamed canvas into palette
Claus Gittinger <cg@exept.de>
parents: 2561
diff changeset
    34
	privateIn:UIGalleryView::Palette
181
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
    35
!
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
    36
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
    37
!UIGalleryView class methodsFor:'documentation'!
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
    38
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
    39
copyright
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
    40
"
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
    41
 COPYRIGHT (c) 1997 by Claus Gittinger / eXept Software AG
1120
230fe13c4e51 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1113
diff changeset
    42
	      All Rights Reserved
181
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
    43
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
    44
 This software is furnished under a license and may be used
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
    45
 only in accordance with the terms of that license and with the
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
    46
 inclusion of the above copyright notice.   This software may not
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
    47
 be provided or otherwise made available to, or used by, any
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
    48
 other person.  No title to or ownership of the software is
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
    49
 hereby transferred.
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
    50
"
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
    51
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
    52
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
    53
!
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
    54
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
    55
documentation
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
    56
"
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
    57
    implements a selection panel, keeping widgets which could be placed
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
    58
    into other components by drag & drop or copy @ paste. The objects
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
    59
    which are draged/droped must be kind of UISpecification's.
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
    60
    The UISelectionPanel used by the UIPainter is implemented in this way.
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
    61
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
    62
    [author:]
1120
230fe13c4e51 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1113
diff changeset
    63
	Claus Gittinger
230fe13c4e51 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1113
diff changeset
    64
	Claus Atzkern
181
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
    65
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
    66
    [see also:]
1120
230fe13c4e51 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1113
diff changeset
    67
	UIPainter
230fe13c4e51 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1113
diff changeset
    68
	UISelectionPanel
181
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
    69
"
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
    70
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
    71
!
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
    72
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
    73
examples
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
    74
"
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
    75
    opens a gallery
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
    76
1120
230fe13c4e51 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1113
diff changeset
    77
									[exBegin]
181
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
    78
    |top sel|
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
    79
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
    80
    top := StandardSystemView new label:'gallery'; extent:500@300.
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
    81
    sel := UIGalleryView origin:0.0 @ 0.0 corner:1.0 @ 1.0 in:top.
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
    82
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
    83
    sel labels:#(    'Buttons'
1120
230fe13c4e51 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1113
diff changeset
    84
		     'Panels'
230fe13c4e51 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1113
diff changeset
    85
		     'Text'
230fe13c4e51 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1113
diff changeset
    86
		   ).
181
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
    87
191
2f66509899a0 change standart to standard
ca
parents: 181
diff changeset
    88
    sel minorKeys:#( #standardButtonToggle
1120
230fe13c4e51 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1113
diff changeset
    89
		     #standardPanels
230fe13c4e51 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1113
diff changeset
    90
		     #standardText
230fe13c4e51 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1113
diff changeset
    91
		   ).
181
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
    92
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
    93
    sel majorKey:UISelectionPanel.
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
    94
    top open.
1120
230fe13c4e51 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1113
diff changeset
    95
									[exEnd]
181
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
    96
"
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
    97
! !
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
    98
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
    99
!UIGalleryView methodsFor:'accessing'!
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   100
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   101
builder
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   102
    "get the builder used to setup a window from a specification (or nil in case
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   103
     of using a new builder)
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   104
    "
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   105
  ^ canvas builder
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   106
!
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   107
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   108
builder:aBuilderOrNil
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   109
    "set the builder used to setup a window from a specification (or nil in case
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   110
     of using a new builder)
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   111
    "
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   112
    canvas builder:aBuilderOrNil
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   113
!
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   114
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   115
canvas:aCanvas
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   116
    ^ self
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   117
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   118
!
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   119
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   120
labels:listOfLabels minorKeys:listOfMinorKeys majorKey:aMajorKey
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   121
    "setup for labels, selectors and class provider
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   122
    "
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   123
    self labels:listOfLabels.
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   124
    minorKeys := listOfMinorKeys.
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   125
    majorKey  := aMajorKey.
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   126
!
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   127
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   128
majorKey
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   129
    "get the class providing the window specifications
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   130
    "
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   131
  ^ majorKey
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   132
!
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   133
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   134
majorKey:aKey
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   135
    "get the class providing the window specifications
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   136
    "
335
9f048ededd7d resolveName:
ca
parents: 331
diff changeset
   137
    |appl|
9f048ededd7d resolveName:
ca
parents: 331
diff changeset
   138
9f048ededd7d resolveName:
ca
parents: 331
diff changeset
   139
    appl := self application.
9f048ededd7d resolveName:
ca
parents: 331
diff changeset
   140
9f048ededd7d resolveName:
ca
parents: 331
diff changeset
   141
    appl notNil ifTrue:[
1120
230fe13c4e51 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1113
diff changeset
   142
	majorKey := appl resolveName:aKey
335
9f048ededd7d resolveName:
ca
parents: 331
diff changeset
   143
    ] ifFalse:[
1120
230fe13c4e51 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1113
diff changeset
   144
	majorKey := Smalltalk resolveName:aKey inClass:self class
335
9f048ededd7d resolveName:
ca
parents: 331
diff changeset
   145
    ].
181
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   146
    self selection:nil
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   147
!
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   148
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   149
minorKeys
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   150
    "get the list of selector keys
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   151
    "
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   152
  ^ minorKeys
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   153
!
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   154
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   155
minorKeys:aListOfSelectors
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   156
    "set the list of selectors
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   157
    "
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   158
    minorKeys := aListOfSelectors.
1140
d0dee47ac385 total redeisign
Claus Gittinger <cg@exept.de>
parents: 1130
diff changeset
   159
    self selection:nil.
2200
f258c24270b5 *** empty log message ***
ca
parents: 2199
diff changeset
   160
!
f258c24270b5 *** empty log message ***
ca
parents: 2199
diff changeset
   161
f258c24270b5 *** empty log message ***
ca
parents: 2199
diff changeset
   162
showBorders:aBoolean
f258c24270b5 *** empty log message ***
ca
parents: 2199
diff changeset
   163
    "show borders around dragable objects"
f258c24270b5 *** empty log message ***
ca
parents: 2199
diff changeset
   164
f258c24270b5 *** empty log message ***
ca
parents: 2199
diff changeset
   165
    canvas showBorders:aBoolean.
f258c24270b5 *** empty log message ***
ca
parents: 2199
diff changeset
   166
! !
f258c24270b5 *** empty log message ***
ca
parents: 2199
diff changeset
   167
f258c24270b5 *** empty log message ***
ca
parents: 2199
diff changeset
   168
!UIGalleryView methodsFor:'accessing-colors'!
f258c24270b5 *** empty log message ***
ca
parents: 2199
diff changeset
   169
f258c24270b5 *** empty log message ***
ca
parents: 2199
diff changeset
   170
viewBackground:aColor
f258c24270b5 *** empty log message ***
ca
parents: 2199
diff changeset
   171
    canvas notNil ifTrue:[
f258c24270b5 *** empty log message ***
ca
parents: 2199
diff changeset
   172
        canvas viewBackground:aColor.
f258c24270b5 *** empty log message ***
ca
parents: 2199
diff changeset
   173
    ].
f258c24270b5 *** empty log message ***
ca
parents: 2199
diff changeset
   174
    ^ super viewBackground:aColor
181
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   175
! !
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   176
1399
a0687f5e1f54 category changes
Claus Gittinger <cg@exept.de>
parents: 1337
diff changeset
   177
!UIGalleryView methodsFor:'accessing-holders'!
181
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   178
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   179
clientSpecHolder
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   180
    "get the holder which keeps the current selection or in case of
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   181
     no selection the specification under the cursor
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   182
    "
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   183
  ^ canvas clientSpecHolder
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   184
!
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   185
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   186
clientSpecHolder:aHolder
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   187
    "set the holder which keeps the current selection or in case of
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   188
     no selection the specification under the cursor
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   189
    "
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   190
    canvas clientSpecHolder:aHolder
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   191
!
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   192
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   193
menuSelector
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   194
    ^ canvas menuSelector
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   195
!
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   196
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   197
menuSelector:aSelector
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   198
    ^ canvas menuSelector:aSelector
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   199
!
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   200
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   201
minorKeysHolder
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   202
    "get the holder keeping the minor keys; the selectors to access
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   203
     specifications from a class associated with the majorKey.
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   204
    "
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   205
  ^ minorKeysHolder
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   206
!
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   207
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   208
minorKeysHolder:aValueHolder
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   209
    "set the holder keeping the minor keys; the selectors to access
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   210
     specifications from a class associated with the majorKey.
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   211
    "
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   212
    minorKeysHolder notNil ifTrue:[
1120
230fe13c4e51 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1113
diff changeset
   213
	minorKeysHolder removeDependent:self. 
181
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   214
    ].
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   215
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   216
    (minorKeysHolder := aValueHolder) notNil ifTrue:[
1120
230fe13c4e51 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1113
diff changeset
   217
	minorKeysHolder addDependent:self.
181
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   218
    ].
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   219
    self minorKeys:(minorKeysHolder value)
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   220
! !
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   221
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   222
!UIGalleryView methodsFor:'change & update'!
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   223
1142
f5b47cc3e563 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1140
diff changeset
   224
selectionHasChanged
181
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   225
    "selection changed
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   226
    "
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   227
    |specification selector selection application|
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   228
1140
d0dee47ac385 total redeisign
Claus Gittinger <cg@exept.de>
parents: 1130
diff changeset
   229
    selection := self listIndexOf:(self selection).
181
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   230
683
648ba2c8536e whenever selection changed; reread minorKeys from
ca
parents: 661
diff changeset
   231
    minorKeysHolder notNil ifTrue:[
1128
69bd579838f7 mapped:
Claus Gittinger <cg@exept.de>
parents: 1127
diff changeset
   232
        minorKeys := minorKeysHolder value.
683
648ba2c8536e whenever selection changed; reread minorKeys from
ca
parents: 661
diff changeset
   233
    ].
181
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   234
    (selection notNil and:[minorKeys size >= selection]) ifTrue:[
1128
69bd579838f7 mapped:
Claus Gittinger <cg@exept.de>
parents: 1127
diff changeset
   235
        selector := minorKeys at:selection.
181
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   236
1128
69bd579838f7 mapped:
Claus Gittinger <cg@exept.de>
parents: 1127
diff changeset
   237
        (majorKey respondsTo:selector) ifTrue:[
69bd579838f7 mapped:
Claus Gittinger <cg@exept.de>
parents: 1127
diff changeset
   238
            specification := majorKey perform:selector
69bd579838f7 mapped:
Claus Gittinger <cg@exept.de>
parents: 1127
diff changeset
   239
        ] ifFalse:[
69bd579838f7 mapped:
Claus Gittinger <cg@exept.de>
parents: 1127
diff changeset
   240
            (application := self application) notNil ifTrue:[
1576
ac7705f0a48d Object messageNotUnderstoodSignal -> MessageNotUnderstood
ca
parents: 1568
diff changeset
   241
                MessageNotUnderstood handle:[:ex|
1128
69bd579838f7 mapped:
Claus Gittinger <cg@exept.de>
parents: 1127
diff changeset
   242
                    (application class respondsTo:selector) ifTrue:[
69bd579838f7 mapped:
Claus Gittinger <cg@exept.de>
parents: 1127
diff changeset
   243
                        specification := application class perform:selector
69bd579838f7 mapped:
Claus Gittinger <cg@exept.de>
parents: 1127
diff changeset
   244
                    ]
69bd579838f7 mapped:
Claus Gittinger <cg@exept.de>
parents: 1127
diff changeset
   245
                ] do:[
69bd579838f7 mapped:
Claus Gittinger <cg@exept.de>
parents: 1127
diff changeset
   246
                    specification := application aspectFor:selector
69bd579838f7 mapped:
Claus Gittinger <cg@exept.de>
parents: 1127
diff changeset
   247
                ]
69bd579838f7 mapped:
Claus Gittinger <cg@exept.de>
parents: 1127
diff changeset
   248
            ]
69bd579838f7 mapped:
Claus Gittinger <cg@exept.de>
parents: 1127
diff changeset
   249
        ]
181
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   250
    ].
2199
c542a84adeb6 selectionHasChanged
Claus Gittinger <cg@exept.de>
parents: 1895
diff changeset
   251
"/    self withWaitCursorDo:[
2242
63b5fdc3c8a3 No debugger when there are unavailable classes in the widget gallery
Stefan Vogel <sv@exept.de>
parents: 2204
diff changeset
   252
        [
63b5fdc3c8a3 No debugger when there are unavailable classes in the widget gallery
Stefan Vogel <sv@exept.de>
parents: 2204
diff changeset
   253
            canvas specification:specification.
63b5fdc3c8a3 No debugger when there are unavailable classes in the widget gallery
Stefan Vogel <sv@exept.de>
parents: 2204
diff changeset
   254
        ] on:NotFoundError do:[:ex|
63b5fdc3c8a3 No debugger when there are unavailable classes in the widget gallery
Stefan Vogel <sv@exept.de>
parents: 2204
diff changeset
   255
            Transcript showCR:ex description.
63b5fdc3c8a3 No debugger when there are unavailable classes in the widget gallery
Stefan Vogel <sv@exept.de>
parents: 2204
diff changeset
   256
            ex proceed.
63b5fdc3c8a3 No debugger when there are unavailable classes in the widget gallery
Stefan Vogel <sv@exept.de>
parents: 2204
diff changeset
   257
        ]
2199
c542a84adeb6 selectionHasChanged
Claus Gittinger <cg@exept.de>
parents: 1895
diff changeset
   258
"/    ]
181
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   259
!
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   260
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   261
update
1142
f5b47cc3e563 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1140
diff changeset
   262
    self selectionHasChanged.
181
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   263
!
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   264
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   265
update:something with:aParameter from:changedObject
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   266
    "one of my models changed its value
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   267
    "
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   268
    changedObject == minorKeysHolder ifTrue:[
1128
69bd579838f7 mapped:
Claus Gittinger <cg@exept.de>
parents: 1127
diff changeset
   269
        ^ self minorKeys:( minorKeysHolder value)
181
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   270
    ].
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   271
    super update:something with:aParameter from:changedObject.
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   272
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   273
! !
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   274
1337
546e42b47b41 busy cursor while switching
Claus Gittinger <cg@exept.de>
parents: 1142
diff changeset
   275
!UIGalleryView methodsFor:'initialization & release'!
181
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   276
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   277
initialize
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   278
    "setup default attributes
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   279
    "
2563
c2298d24621d renamed canvas into palette
Claus Gittinger <cg@exept.de>
parents: 2561
diff changeset
   280
    canvas := Palette in:self.
181
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   281
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   282
    super initialize.
683
648ba2c8536e whenever selection changed; reread minorKeys from
ca
parents: 661
diff changeset
   283
1142
f5b47cc3e563 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1140
diff changeset
   284
    self action:[:something| self selectionHasChanged ].
1582
912fdf2e44a8 destroy - release
Claus Gittinger <cg@exept.de>
parents: 1576
diff changeset
   285
!
912fdf2e44a8 destroy - release
Claus Gittinger <cg@exept.de>
parents: 1576
diff changeset
   286
912fdf2e44a8 destroy - release
Claus Gittinger <cg@exept.de>
parents: 1576
diff changeset
   287
release
912fdf2e44a8 destroy - release
Claus Gittinger <cg@exept.de>
parents: 1576
diff changeset
   288
    minorKeysHolder notNil ifTrue:[
912fdf2e44a8 destroy - release
Claus Gittinger <cg@exept.de>
parents: 1576
diff changeset
   289
        minorKeysHolder removeDependent:self. 
912fdf2e44a8 destroy - release
Claus Gittinger <cg@exept.de>
parents: 1576
diff changeset
   290
        minorKeysHolder := nil.
912fdf2e44a8 destroy - release
Claus Gittinger <cg@exept.de>
parents: 1576
diff changeset
   291
    ].
912fdf2e44a8 destroy - release
Claus Gittinger <cg@exept.de>
parents: 1576
diff changeset
   292
    super release.
181
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   293
! !
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   294
2563
c2298d24621d renamed canvas into palette
Claus Gittinger <cg@exept.de>
parents: 2561
diff changeset
   295
!UIGalleryView::Palette class methodsFor:'documentation'!
2495
ead2b25a2c63 handle non-view components;
Claus Gittinger <cg@exept.de>
parents: 2359
diff changeset
   296
ead2b25a2c63 handle non-view components;
Claus Gittinger <cg@exept.de>
parents: 2359
diff changeset
   297
documentation
ead2b25a2c63 handle non-view components;
Claus Gittinger <cg@exept.de>
parents: 2359
diff changeset
   298
"
2563
c2298d24621d renamed canvas into palette
Claus Gittinger <cg@exept.de>
parents: 2561
diff changeset
   299
    I am the palette of a gallery. Most of what I do is to allow dragging of a widget out
2495
ead2b25a2c63 handle non-view components;
Claus Gittinger <cg@exept.de>
parents: 2359
diff changeset
   300
    of myself and to care for the drawing of the selection.
ead2b25a2c63 handle non-view components;
Claus Gittinger <cg@exept.de>
parents: 2359
diff changeset
   301
    The arrangement into multiple pages is done by my container, which holds me
ead2b25a2c63 handle non-view components;
Claus Gittinger <cg@exept.de>
parents: 2359
diff changeset
   302
    in a subcanvas.
ead2b25a2c63 handle non-view components;
Claus Gittinger <cg@exept.de>
parents: 2359
diff changeset
   303
"
ead2b25a2c63 handle non-view components;
Claus Gittinger <cg@exept.de>
parents: 2359
diff changeset
   304
! !
ead2b25a2c63 handle non-view components;
Claus Gittinger <cg@exept.de>
parents: 2359
diff changeset
   305
2563
c2298d24621d renamed canvas into palette
Claus Gittinger <cg@exept.de>
parents: 2561
diff changeset
   306
!UIGalleryView::Palette methodsFor:'accessing'!
181
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   307
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   308
builder
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   309
    "get the builder used to setup a window from a specification (or nil in case
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   310
     of using a new builder)
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   311
    "
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   312
  ^ uiBuilder
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   313
!
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   314
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   315
builder:something
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   316
    "set the builder used to setup a window from a specification (or nil in case
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   317
     of using a new builder)
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   318
    "
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   319
    uiBuilder := something.
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   320
!
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   321
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   322
clientSpecHolder
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   323
    "get the holder which keeps the current selection or in case of
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   324
     no selection the specification under the cursor
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   325
    "
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   326
    ^ clientSpecHolder
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   327
!
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   328
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   329
clientSpecHolder:aHolder
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   330
    "set the holder which keeps the current selection or in case of
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   331
     no selection the specification under the cursor
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   332
    "
1674
ed8aa80a11a9 *** empty log message ***
ca
parents: 1673
diff changeset
   333
    |spec|
ed8aa80a11a9 *** empty log message ***
ca
parents: 1673
diff changeset
   334
ed8aa80a11a9 *** empty log message ***
ca
parents: 1673
diff changeset
   335
    spec := clientSpecHolder value.
ed8aa80a11a9 *** empty log message ***
ca
parents: 1673
diff changeset
   336
ed8aa80a11a9 *** empty log message ***
ca
parents: 1673
diff changeset
   337
    aHolder notNil ifTrue:[ clientSpecHolder := aHolder ]
ed8aa80a11a9 *** empty log message ***
ca
parents: 1673
diff changeset
   338
                  ifFalse:[ clientSpecHolder := nil asValue ].
ed8aa80a11a9 *** empty log message ***
ca
parents: 1673
diff changeset
   339
ed8aa80a11a9 *** empty log message ***
ca
parents: 1673
diff changeset
   340
    clientSpecHolder value:spec.
181
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   341
!
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   342
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   343
menuSelector
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   344
    "return the value of the instance variable 'menuSelector' (automatically generated)"
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   345
1455
5d4d3c5ca76c Button select is identical to button 1.
Stefan Vogel <sv@exept.de>
parents: 1399
diff changeset
   346
    ^ menuSelector
5d4d3c5ca76c Button select is identical to button 1.
Stefan Vogel <sv@exept.de>
parents: 1399
diff changeset
   347
!
181
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   348
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   349
menuSelector:something
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   350
    "set the value of the instance variable 'menuSelector' (automatically generated)"
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   351
1455
5d4d3c5ca76c Button select is identical to button 1.
Stefan Vogel <sv@exept.de>
parents: 1399
diff changeset
   352
    menuSelector := something.
5d4d3c5ca76c Button select is identical to button 1.
Stefan Vogel <sv@exept.de>
parents: 1399
diff changeset
   353
!
181
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   354
2200
f258c24270b5 *** empty log message ***
ca
parents: 2199
diff changeset
   355
showBorders:aBoolean
f258c24270b5 *** empty log message ***
ca
parents: 2199
diff changeset
   356
    showBorders := aBoolean.
f258c24270b5 *** empty log message ***
ca
parents: 2199
diff changeset
   357
!
f258c24270b5 *** empty log message ***
ca
parents: 2199
diff changeset
   358
181
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   359
specification
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   360
    "get current specification
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   361
    "
1674
ed8aa80a11a9 *** empty log message ***
ca
parents: 1673
diff changeset
   362
    ^ specification
181
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   363
!
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   364
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   365
specification:aSpecOrSpecArray
2542
5cb4a0bdc44c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
   366
    "set a new specification"
5cb4a0bdc44c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
   367
5cb4a0bdc44c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
   368
    |builder newSpec|
181
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   369
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   370
    self selection:nil.
1674
ed8aa80a11a9 *** empty log message ***
ca
parents: 1673
diff changeset
   371
    self destroySubViews.
181
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   372
2542
5cb4a0bdc44c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
   373
    specification := nil.
5cb4a0bdc44c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
   374
    aSpecOrSpecArray isNil ifTrue:[^ self].
5cb4a0bdc44c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
   375
5cb4a0bdc44c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
   376
    "/ only warn once - otherwise, its annoying
5cb4a0bdc44c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
   377
    Array missingClassInLiteralArrayErrorSignal handle:[:ex |
5cb4a0bdc44c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
   378
        didWarnAboutUnknownSpecs == true ifFalse:[
5cb4a0bdc44c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
   379
            Dialog warn:(ex description,'\\(Will not warn again - please check for unloaded classes/packages)' withCRs).
5cb4a0bdc44c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
   380
        ].
5cb4a0bdc44c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
   381
        didWarnAboutUnknownSpecs := true.
5cb4a0bdc44c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
   382
        ex proceed.
5cb4a0bdc44c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
   383
    ] do:[
5cb4a0bdc44c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
   384
        newSpec := UISpecification from:aSpecOrSpecArray.
181
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   385
    ].
2542
5cb4a0bdc44c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
   386
    newSpec isNil ifTrue:[^ self].
5cb4a0bdc44c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
   387
    (newSpec respondsTo:#'buildViewFor:in:') ifFalse:[^ self].
5cb4a0bdc44c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2534
diff changeset
   388
    specification := newSpec.
181
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   389
1674
ed8aa80a11a9 *** empty log message ***
ca
parents: 1673
diff changeset
   390
    (builder := uiBuilder) isNil ifTrue:[
ed8aa80a11a9 *** empty log message ***
ca
parents: 1673
diff changeset
   391
        builder := UIBuilder new isEditing:true.
ed8aa80a11a9 *** empty log message ***
ca
parents: 1673
diff changeset
   392
        builder showDefaults:true.
2563
c2298d24621d renamed canvas into palette
Claus Gittinger <cg@exept.de>
parents: 2561
diff changeset
   393
        builder application:self application. "/ for resources like images
1674
ed8aa80a11a9 *** empty log message ***
ca
parents: 1673
diff changeset
   394
    ].
205
1188254dcbfc bug fix:
ca
parents: 191
diff changeset
   395
1674
ed8aa80a11a9 *** empty log message ***
ca
parents: 1673
diff changeset
   396
    specification buildViewFor:builder in:self.
396
e15b7b5bb81b checkin from browser
ca
parents: 335
diff changeset
   397
2502
c27a926cbe67 cleaned up the code and fixed many bugs;
Claus Gittinger <cg@exept.de>
parents: 2495
diff changeset
   398
    "/ components notEmptyOrNil ifTrue:[ self halt ].
1674
ed8aa80a11a9 *** empty log message ***
ca
parents: 1673
diff changeset
   399
    subViews size ~~ 0 ifTrue:[
2200
f258c24270b5 *** empty log message ***
ca
parents: 2199
diff changeset
   400
        showBorders ifTrue:[
f258c24270b5 *** empty log message ***
ca
parents: 2199
diff changeset
   401
            subViews do:[:v|
f258c24270b5 *** empty log message ***
ca
parents: 2199
diff changeset
   402
                (self findSpecFor:v) notNil ifTrue:[
f258c24270b5 *** empty log message ***
ca
parents: 2199
diff changeset
   403
                    v borderWidth:1
f258c24270b5 *** empty log message ***
ca
parents: 2199
diff changeset
   404
                ].
f258c24270b5 *** empty log message ***
ca
parents: 2199
diff changeset
   405
            ].
1561
dde6c4539acd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1501
diff changeset
   406
        ].
1674
ed8aa80a11a9 *** empty log message ***
ca
parents: 1673
diff changeset
   407
        realized ifTrue:[ self realizeAllSubViews ].
ed8aa80a11a9 *** empty log message ***
ca
parents: 1673
diff changeset
   408
    ].
181
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   409
! !
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   410
2563
c2298d24621d renamed canvas into palette
Claus Gittinger <cg@exept.de>
parents: 2561
diff changeset
   411
!UIGalleryView::Palette methodsFor:'building'!
181
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   412
2502
c27a926cbe67 cleaned up the code and fixed many bugs;
Claus Gittinger <cg@exept.de>
parents: 2495
diff changeset
   413
recursiveBuildSpecFromSpecPrototype:aSpec
c27a926cbe67 cleaned up the code and fixed many bugs;
Claus Gittinger <cg@exept.de>
parents: 2495
diff changeset
   414
    "build spec out of spec prototype"
2495
ead2b25a2c63 handle non-view components;
Claus Gittinger <cg@exept.de>
parents: 2359
diff changeset
   415
181
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   416
    |spec comp coll|
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   417
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   418
    (aSpec notNil and:[aSpec canUIDrag]) ifFalse:[
2495
ead2b25a2c63 handle non-view components;
Claus Gittinger <cg@exept.de>
parents: 2359
diff changeset
   419
        ^ nil
181
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   420
    ].
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   421
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   422
    spec := aSpec copy.
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   423
    (aSpec class supportsSubComponents and:[aSpec component notNil]) ifFalse:[
2495
ead2b25a2c63 handle non-view components;
Claus Gittinger <cg@exept.de>
parents: 2359
diff changeset
   424
        ^ spec
181
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   425
    ].
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   426
    comp := aSpec component.
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   427
    spec component:nil.
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   428
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   429
    comp canUIDrag ifFalse:[
2495
ead2b25a2c63 handle non-view components;
Claus Gittinger <cg@exept.de>
parents: 2359
diff changeset
   430
        ^ spec
181
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   431
    ].
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   432
    coll := OrderedCollection new.
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   433
2502
c27a926cbe67 cleaned up the code and fixed many bugs;
Claus Gittinger <cg@exept.de>
parents: 2495
diff changeset
   434
    comp do:[:anEntry|
c27a926cbe67 cleaned up the code and fixed many bugs;
Claus Gittinger <cg@exept.de>
parents: 2495
diff changeset
   435
        |spc|
c27a926cbe67 cleaned up the code and fixed many bugs;
Claus Gittinger <cg@exept.de>
parents: 2495
diff changeset
   436
c27a926cbe67 cleaned up the code and fixed many bugs;
Claus Gittinger <cg@exept.de>
parents: 2495
diff changeset
   437
        (spc := self recursiveBuildSpecFromSpecPrototype:anEntry) notNil ifTrue:[
2495
ead2b25a2c63 handle non-view components;
Claus Gittinger <cg@exept.de>
parents: 2359
diff changeset
   438
            coll add:spc
ead2b25a2c63 handle non-view components;
Claus Gittinger <cg@exept.de>
parents: 2359
diff changeset
   439
        ]
181
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   440
    ].
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   441
    coll isEmpty ifTrue:[
2495
ead2b25a2c63 handle non-view components;
Claus Gittinger <cg@exept.de>
parents: 2359
diff changeset
   442
        ^ spec
181
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   443
    ].
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   444
    comp := comp copy.
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   445
    comp collection:coll.
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   446
    spec component:comp.
2495
ead2b25a2c63 handle non-view components;
Claus Gittinger <cg@exept.de>
parents: 2359
diff changeset
   447
    ^ spec
181
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   448
! !
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   449
2563
c2298d24621d renamed canvas into palette
Claus Gittinger <cg@exept.de>
parents: 2561
diff changeset
   450
!UIGalleryView::Palette methodsFor:'drag & drop'!
181
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   451
1675
9e7465c57509 drag & drop mechanism
ca
parents: 1674
diff changeset
   452
startDragFrom:evView
2495
ead2b25a2c63 handle non-view components;
Claus Gittinger <cg@exept.de>
parents: 2359
diff changeset
   453
    "start drag at lastClickPoint"
ead2b25a2c63 handle non-view components;
Claus Gittinger <cg@exept.de>
parents: 2359
diff changeset
   454
2204
bde4a7ef693a changed #processEvent:
ca
parents: 2201
diff changeset
   455
    |spec dragObj offset clickPos dragAndDropManager|
1671
493e0430518e no longer use InputView
ca
parents: 1582
diff changeset
   456
493e0430518e no longer use InputView
ca
parents: 1582
diff changeset
   457
    clickPos := lastClickPoint.
493e0430518e no longer use InputView
ca
parents: 1582
diff changeset
   458
    clickPos isNil ifTrue:[^ self].
493e0430518e no longer use InputView
ca
parents: 1582
diff changeset
   459
    lastClickPoint := nil.
493e0430518e no longer use InputView
ca
parents: 1582
diff changeset
   460
1674
ed8aa80a11a9 *** empty log message ***
ca
parents: 1673
diff changeset
   461
    spec := clientSpecHolder value.
1671
493e0430518e no longer use InputView
ca
parents: 1582
diff changeset
   462
    spec isNil ifTrue:[^ self].
181
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   463
2495
ead2b25a2c63 handle non-view components;
Claus Gittinger <cg@exept.de>
parents: 2359
diff changeset
   464
    self withSelectionHiddenDo:[
2502
c27a926cbe67 cleaned up the code and fixed many bugs;
Claus Gittinger <cg@exept.de>
parents: 2495
diff changeset
   465
        spec := self recursiveBuildSpecFromSpecPrototype:spec.
1675
9e7465c57509 drag & drop mechanism
ca
parents: 1674
diff changeset
   466
        spec name:nil.
1674
ed8aa80a11a9 *** empty log message ***
ca
parents: 1673
diff changeset
   467
1675
9e7465c57509 drag & drop mechanism
ca
parents: 1674
diff changeset
   468
        dragObj := DropSpec for:selection specification:spec.
9e7465c57509 drag & drop mechanism
ca
parents: 1674
diff changeset
   469
        offset  := clickPos - selection origin.
9e7465c57509 drag & drop mechanism
ca
parents: 1674
diff changeset
   470
    ].
278
5b7dfe33b497 drag & drop offset
Claus Gittinger <cg@exept.de>
parents: 247
diff changeset
   471
2204
bde4a7ef693a changed #processEvent:
ca
parents: 2201
diff changeset
   472
    dragAndDropManager := DragAndDropManager new.
bde4a7ef693a changed #processEvent:
ca
parents: 2201
diff changeset
   473
    dragAndDropManager giveFocusToTargetWidget:false.
bde4a7ef693a changed #processEvent:
ca
parents: 2201
diff changeset
   474
2495
ead2b25a2c63 handle non-view components;
Claus Gittinger <cg@exept.de>
parents: 2359
diff changeset
   475
    dragAndDropManager 
ead2b25a2c63 handle non-view components;
Claus Gittinger <cg@exept.de>
parents: 2359
diff changeset
   476
        startDrag:dragObj
ead2b25a2c63 handle non-view components;
Claus Gittinger <cg@exept.de>
parents: 2359
diff changeset
   477
        from:self
ead2b25a2c63 handle non-view components;
Claus Gittinger <cg@exept.de>
parents: 2359
diff changeset
   478
        offset:offset
ead2b25a2c63 handle non-view components;
Claus Gittinger <cg@exept.de>
parents: 2359
diff changeset
   479
        atEnd:nil
ead2b25a2c63 handle non-view components;
Claus Gittinger <cg@exept.de>
parents: 2359
diff changeset
   480
        display:nil.
181
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   481
! !
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   482
2563
c2298d24621d renamed canvas into palette
Claus Gittinger <cg@exept.de>
parents: 2561
diff changeset
   483
!UIGalleryView::Palette methodsFor:'event handling'!
181
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   484
1671
493e0430518e no longer use InputView
ca
parents: 1582
diff changeset
   485
processEvent:anEvent
1895
b7d6683ebaca *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1729
diff changeset
   486
    "filter keyboard events.
b7d6683ebaca *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1729
diff changeset
   487
     Return true, if I have eaten the event"
b7d6683ebaca *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1729
diff changeset
   488
1674
ed8aa80a11a9 *** empty log message ***
ca
parents: 1673
diff changeset
   489
    |evView p|
181
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   490
1671
493e0430518e no longer use InputView
ca
parents: 1582
diff changeset
   491
    evView := anEvent view.
493e0430518e no longer use InputView
ca
parents: 1582
diff changeset
   492
    evView isNil ifTrue:[ ^ false ].
2553
2f9ced7fddeb resize-button enable
Claus Gittinger <cg@exept.de>
parents: 2542
diff changeset
   493
    (evView ~~ self and:[ (evView isComponentOf:self) not ]) ifTrue:[ ^ false ].
181
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   494
2201
c68492590b1b disable focusHandling in canvas
ca
parents: 2200
diff changeset
   495
    (anEvent isButtonPressEvent or:[anEvent isButtonReleaseEvent])ifTrue:[
c68492590b1b disable focusHandling in canvas
ca
parents: 2200
diff changeset
   496
        lastClickPoint := nil.
c68492590b1b disable focusHandling in canvas
ca
parents: 2200
diff changeset
   497
    ].
1674
ed8aa80a11a9 *** empty log message ***
ca
parents: 1673
diff changeset
   498
    anEvent isButtonEvent ifFalse:[
ed8aa80a11a9 *** empty log message ***
ca
parents: 1673
diff changeset
   499
        anEvent isInputEvent ifTrue:[^ true].
2201
c68492590b1b disable focusHandling in canvas
ca
parents: 2200
diff changeset
   500
1675
9e7465c57509 drag & drop mechanism
ca
parents: 1674
diff changeset
   501
        anEvent isDamage ifTrue:[ self redrawSelection ].
1671
493e0430518e no longer use InputView
ca
parents: 1582
diff changeset
   502
        ^ false
493e0430518e no longer use InputView
ca
parents: 1582
diff changeset
   503
    ].
181
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   504
2201
c68492590b1b disable focusHandling in canvas
ca
parents: 2200
diff changeset
   505
    anEvent isButtonReleaseEvent ifTrue:[ ^ true ].
181
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   506
1674
ed8aa80a11a9 *** empty log message ***
ca
parents: 1673
diff changeset
   507
    anEvent isButtonMotionEvent ifTrue:[
ed8aa80a11a9 *** empty log message ***
ca
parents: 1673
diff changeset
   508
        (lastClickPoint notNil and:[anEvent state ~~ 0]) ifTrue:[
ed8aa80a11a9 *** empty log message ***
ca
parents: 1673
diff changeset
   509
            p := Point x:(anEvent x) y:(anEvent y).
2201
c68492590b1b disable focusHandling in canvas
ca
parents: 2200
diff changeset
   510
            p := device translatePoint:p fromView:evView toView:self.
1671
493e0430518e no longer use InputView
ca
parents: 1582
diff changeset
   511
2201
c68492590b1b disable focusHandling in canvas
ca
parents: 2200
diff changeset
   512
            (lastClickPoint dist:p) > 20.0 ifTrue:[
1675
9e7465c57509 drag & drop mechanism
ca
parents: 1674
diff changeset
   513
                self startDragFrom:evView.
9e7465c57509 drag & drop mechanism
ca
parents: 1674
diff changeset
   514
                lastClickPoint := nil.
1671
493e0430518e no longer use InputView
ca
parents: 1582
diff changeset
   515
            ]
493e0430518e no longer use InputView
ca
parents: 1582
diff changeset
   516
        ].
493e0430518e no longer use InputView
ca
parents: 1582
diff changeset
   517
        ^ true
493e0430518e no longer use InputView
ca
parents: 1582
diff changeset
   518
    ].
493e0430518e no longer use InputView
ca
parents: 1582
diff changeset
   519
2495
ead2b25a2c63 handle non-view components;
Claus Gittinger <cg@exept.de>
parents: 2359
diff changeset
   520
    anEvent isButtonPressEvent ifTrue:[
ead2b25a2c63 handle non-view components;
Claus Gittinger <cg@exept.de>
parents: 2359
diff changeset
   521
        |button application|
ead2b25a2c63 handle non-view components;
Claus Gittinger <cg@exept.de>
parents: 2359
diff changeset
   522
1674
ed8aa80a11a9 *** empty log message ***
ca
parents: 1673
diff changeset
   523
        button := anEvent button.
ed8aa80a11a9 *** empty log message ***
ca
parents: 1673
diff changeset
   524
ed8aa80a11a9 *** empty log message ***
ca
parents: 1673
diff changeset
   525
        (button == 1 or:[button == #select]) ifTrue:[
ed8aa80a11a9 *** empty log message ***
ca
parents: 1673
diff changeset
   526
            p := Point x:(anEvent x) y:(anEvent y).
ed8aa80a11a9 *** empty log message ***
ca
parents: 1673
diff changeset
   527
            p := device translatePoint:p fromView:evView toView:self.
ed8aa80a11a9 *** empty log message ***
ca
parents: 1673
diff changeset
   528
ed8aa80a11a9 *** empty log message ***
ca
parents: 1673
diff changeset
   529
            self selection:(self findObjectAt:p).
ed8aa80a11a9 *** empty log message ***
ca
parents: 1673
diff changeset
   530
ed8aa80a11a9 *** empty log message ***
ca
parents: 1673
diff changeset
   531
            selection notNil ifTrue:[
2201
c68492590b1b disable focusHandling in canvas
ca
parents: 2200
diff changeset
   532
                lastClickPoint := p.
1674
ed8aa80a11a9 *** empty log message ***
ca
parents: 1673
diff changeset
   533
            ]
ed8aa80a11a9 *** empty log message ***
ca
parents: 1673
diff changeset
   534
        ] ifFalse:[
ed8aa80a11a9 *** empty log message ***
ca
parents: 1673
diff changeset
   535
            (menuSelector notNil and:[(application := self application) notNil]) ifTrue:[
ed8aa80a11a9 *** empty log message ***
ca
parents: 1673
diff changeset
   536
                MessageNotUnderstood catch:[
ed8aa80a11a9 *** empty log message ***
ca
parents: 1673
diff changeset
   537
                    application aspectFor:menuSelector
ed8aa80a11a9 *** empty log message ***
ca
parents: 1673
diff changeset
   538
                ]
1671
493e0430518e no longer use InputView
ca
parents: 1582
diff changeset
   539
            ]
493e0430518e no longer use InputView
ca
parents: 1582
diff changeset
   540
        ].
493e0430518e no longer use InputView
ca
parents: 1582
diff changeset
   541
        ^ true
493e0430518e no longer use InputView
ca
parents: 1582
diff changeset
   542
    ].
493e0430518e no longer use InputView
ca
parents: 1582
diff changeset
   543
493e0430518e no longer use InputView
ca
parents: 1582
diff changeset
   544
    ^ true
181
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   545
! !
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   546
2563
c2298d24621d renamed canvas into palette
Claus Gittinger <cg@exept.de>
parents: 2561
diff changeset
   547
!UIGalleryView::Palette methodsFor:'focus handling'!
2201
c68492590b1b disable focusHandling in canvas
ca
parents: 2200
diff changeset
   548
c68492590b1b disable focusHandling in canvas
ca
parents: 2200
diff changeset
   549
subviewsInFocusOrder
c68492590b1b disable focusHandling in canvas
ca
parents: 2200
diff changeset
   550
    "returns none views - focus not handled within buildin canvas"
c68492590b1b disable focusHandling in canvas
ca
parents: 2200
diff changeset
   551
c68492590b1b disable focusHandling in canvas
ca
parents: 2200
diff changeset
   552
    ^ #()
c68492590b1b disable focusHandling in canvas
ca
parents: 2200
diff changeset
   553
! !
c68492590b1b disable focusHandling in canvas
ca
parents: 2200
diff changeset
   554
2563
c2298d24621d renamed canvas into palette
Claus Gittinger <cg@exept.de>
parents: 2561
diff changeset
   555
!UIGalleryView::Palette methodsFor:'initialization'!
181
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   556
2200
f258c24270b5 *** empty log message ***
ca
parents: 2199
diff changeset
   557
destroy
f258c24270b5 *** empty log message ***
ca
parents: 2199
diff changeset
   558
    |winGrp|
f258c24270b5 *** empty log message ***
ca
parents: 2199
diff changeset
   559
f258c24270b5 *** empty log message ***
ca
parents: 2199
diff changeset
   560
    winGrp := self windowGroup.
f258c24270b5 *** empty log message ***
ca
parents: 2199
diff changeset
   561
    winGrp notNil ifTrue:[
f258c24270b5 *** empty log message ***
ca
parents: 2199
diff changeset
   562
        winGrp removePreEventHook:self.
f258c24270b5 *** empty log message ***
ca
parents: 2199
diff changeset
   563
    ].
f258c24270b5 *** empty log message ***
ca
parents: 2199
diff changeset
   564
    super destroy.
f258c24270b5 *** empty log message ***
ca
parents: 2199
diff changeset
   565
!
f258c24270b5 *** empty log message ***
ca
parents: 2199
diff changeset
   566
181
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   567
initialize
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   568
    super initialize.
1674
ed8aa80a11a9 *** empty log message ***
ca
parents: 1673
diff changeset
   569
    clientSpecHolder := nil asValue.
1675
9e7465c57509 drag & drop mechanism
ca
parents: 1674
diff changeset
   570
    hiddenCounter := 0.
2200
f258c24270b5 *** empty log message ***
ca
parents: 2199
diff changeset
   571
    showBorders := true.
1128
69bd579838f7 mapped:
Claus Gittinger <cg@exept.de>
parents: 1127
diff changeset
   572
!
69bd579838f7 mapped:
Claus Gittinger <cg@exept.de>
parents: 1127
diff changeset
   573
1671
493e0430518e no longer use InputView
ca
parents: 1582
diff changeset
   574
realize
2200
f258c24270b5 *** empty log message ***
ca
parents: 2199
diff changeset
   575
    |winGrp|
f258c24270b5 *** empty log message ***
ca
parents: 2199
diff changeset
   576
1671
493e0430518e no longer use InputView
ca
parents: 1582
diff changeset
   577
    super realize.
2200
f258c24270b5 *** empty log message ***
ca
parents: 2199
diff changeset
   578
    winGrp := self windowGroup.
f258c24270b5 *** empty log message ***
ca
parents: 2199
diff changeset
   579
    winGrp notNil ifTrue:[
f258c24270b5 *** empty log message ***
ca
parents: 2199
diff changeset
   580
        winGrp addPreEventHook:self.
f258c24270b5 *** empty log message ***
ca
parents: 2199
diff changeset
   581
   ].
1671
493e0430518e no longer use InputView
ca
parents: 1582
diff changeset
   582
! !
493e0430518e no longer use InputView
ca
parents: 1582
diff changeset
   583
2563
c2298d24621d renamed canvas into palette
Claus Gittinger <cg@exept.de>
parents: 2561
diff changeset
   584
!UIGalleryView::Palette methodsFor:'searching'!
181
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   585
1674
ed8aa80a11a9 *** empty log message ***
ca
parents: 1673
diff changeset
   586
findObjectAt:aPoint
2495
ead2b25a2c63 handle non-view components;
Claus Gittinger <cg@exept.de>
parents: 2359
diff changeset
   587
    |seeIfWidgetIsHit p x y|
181
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   588
2495
ead2b25a2c63 handle non-view components;
Claus Gittinger <cg@exept.de>
parents: 2359
diff changeset
   589
    seeIfWidgetIsHit := 
ead2b25a2c63 handle non-view components;
Claus Gittinger <cg@exept.de>
parents: 2359
diff changeset
   590
        [:v |
ead2b25a2c63 handle non-view components;
Claus Gittinger <cg@exept.de>
parents: 2359
diff changeset
   591
            p := device translatePoint:aPoint fromView:self toView:v.
ead2b25a2c63 handle non-view components;
Claus Gittinger <cg@exept.de>
parents: 2359
diff changeset
   592
            x := p x.
ead2b25a2c63 handle non-view components;
Claus Gittinger <cg@exept.de>
parents: 2359
diff changeset
   593
            y := p y.
181
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   594
2495
ead2b25a2c63 handle non-view components;
Claus Gittinger <cg@exept.de>
parents: 2359
diff changeset
   595
            (     x >= 0 and:[x <= v width
ead2b25a2c63 handle non-view components;
Claus Gittinger <cg@exept.de>
parents: 2359
diff changeset
   596
             and:[y >= 0 and:[y <= v height
ead2b25a2c63 handle non-view components;
Claus Gittinger <cg@exept.de>
parents: 2359
diff changeset
   597
             and:[(self findSpecFor:v) notNil]]]]
ead2b25a2c63 handle non-view components;
Claus Gittinger <cg@exept.de>
parents: 2359
diff changeset
   598
            ) ifTrue:[
ead2b25a2c63 handle non-view components;
Claus Gittinger <cg@exept.de>
parents: 2359
diff changeset
   599
                ^ v
ead2b25a2c63 handle non-view components;
Claus Gittinger <cg@exept.de>
parents: 2359
diff changeset
   600
            ]
ead2b25a2c63 handle non-view components;
Claus Gittinger <cg@exept.de>
parents: 2359
diff changeset
   601
        ].
239
ce46eb6f92a5 do not clobber the global named DisplayObject - shame on ca.
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   602
2495
ead2b25a2c63 handle non-view components;
Claus Gittinger <cg@exept.de>
parents: 2359
diff changeset
   603
    subViews notNil ifTrue:[ subViews do:seeIfWidgetIsHit ].
ead2b25a2c63 handle non-view components;
Claus Gittinger <cg@exept.de>
parents: 2359
diff changeset
   604
    components notNil ifTrue:[ components do:seeIfWidgetIsHit ].
1671
493e0430518e no longer use InputView
ca
parents: 1582
diff changeset
   605
    ^ nil
181
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   606
!
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   607
2495
ead2b25a2c63 handle non-view components;
Claus Gittinger <cg@exept.de>
parents: 2359
diff changeset
   608
findSpecFor:aWidget
ead2b25a2c63 handle non-view components;
Claus Gittinger <cg@exept.de>
parents: 2359
diff changeset
   609
    "returns the spec which is assigned to aWidget or nil"
ead2b25a2c63 handle non-view components;
Claus Gittinger <cg@exept.de>
parents: 2359
diff changeset
   610
239
ce46eb6f92a5 do not clobber the global named DisplayObject - shame on ca.
Claus Gittinger <cg@exept.de>
parents: 205
diff changeset
   611
    |name|
181
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   612
2495
ead2b25a2c63 handle non-view components;
Claus Gittinger <cg@exept.de>
parents: 2359
diff changeset
   613
    aWidget notNil ifTrue:[
ead2b25a2c63 handle non-view components;
Claus Gittinger <cg@exept.de>
parents: 2359
diff changeset
   614
        name := aWidget name.
181
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   615
1127
41253026b070 ignore nil-specs, as encountered when a specClass
Claus Gittinger <cg@exept.de>
parents: 1120
diff changeset
   616
        specification do:[:aSpec|
1674
ed8aa80a11a9 *** empty log message ***
ca
parents: 1673
diff changeset
   617
            (aSpec notNil and:[aSpec name = name]) ifTrue:[
2502
c27a926cbe67 cleaned up the code and fixed many bugs;
Claus Gittinger <cg@exept.de>
parents: 2495
diff changeset
   618
                aSpec canUIDrag ifFalse:[^ nil ].
c27a926cbe67 cleaned up the code and fixed many bugs;
Claus Gittinger <cg@exept.de>
parents: 2495
diff changeset
   619
                ^ aSpec
1127
41253026b070 ignore nil-specs, as encountered when a specClass
Claus Gittinger <cg@exept.de>
parents: 1120
diff changeset
   620
            ]
41253026b070 ignore nil-specs, as encountered when a specClass
Claus Gittinger <cg@exept.de>
parents: 1120
diff changeset
   621
        ]
181
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   622
    ].
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   623
    ^ nil
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   624
1127
41253026b070 ignore nil-specs, as encountered when a specClass
Claus Gittinger <cg@exept.de>
parents: 1120
diff changeset
   625
    "Modified: / 18.5.1999 / 14:47:25 / cg"
181
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   626
! !
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   627
2563
c2298d24621d renamed canvas into palette
Claus Gittinger <cg@exept.de>
parents: 2561
diff changeset
   628
!UIGalleryView::Palette methodsFor:'selection'!
181
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   629
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   630
handlesOf:aComponent do:aOneArgBlock
2534
b717cb2e0cb8 nicer handles: care for handles-on-dark (white frame)
Claus Gittinger <cg@exept.de>
parents: 2504
diff changeset
   631
    "evaluate the block on each handle; the argument to the block is a rectangle"
b717cb2e0cb8 nicer handles: care for handles-on-dark (white frame)
Claus Gittinger <cg@exept.de>
parents: 2504
diff changeset
   632
b717cb2e0cb8 nicer handles: care for handles-on-dark (white frame)
Claus Gittinger <cg@exept.de>
parents: 2504
diff changeset
   633
    |ext|
b717cb2e0cb8 nicer handles: care for handles-on-dark (white frame)
Claus Gittinger <cg@exept.de>
parents: 2504
diff changeset
   634
2561
e5a66f3365d6 handles fixed
Claus Gittinger <cg@exept.de>
parents: 2553
diff changeset
   635
    ext := 8@8.
2534
b717cb2e0cb8 nicer handles: care for handles-on-dark (white frame)
Claus Gittinger <cg@exept.de>
parents: 2504
diff changeset
   636
181
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   637
    aComponent notNil ifTrue:[
2561
e5a66f3365d6 handles fixed
Claus Gittinger <cg@exept.de>
parents: 2553
diff changeset
   638
        aOneArgBlock value:(aComponent origin       - (3@3) extent:ext).
e5a66f3365d6 handles fixed
Claus Gittinger <cg@exept.de>
parents: 2553
diff changeset
   639
        aOneArgBlock value:(aComponent corner       - (2@2) extent:ext).
e5a66f3365d6 handles fixed
Claus Gittinger <cg@exept.de>
parents: 2553
diff changeset
   640
        aOneArgBlock value:(aComponent topRight     - (2@3) extent:ext).
e5a66f3365d6 handles fixed
Claus Gittinger <cg@exept.de>
parents: 2553
diff changeset
   641
        aOneArgBlock value:(aComponent bottomLeft   - (3@2) extent:ext).
e5a66f3365d6 handles fixed
Claus Gittinger <cg@exept.de>
parents: 2553
diff changeset
   642
        aOneArgBlock value:(aComponent leftCenter rounded   - (3@0) extent:ext).
e5a66f3365d6 handles fixed
Claus Gittinger <cg@exept.de>
parents: 2553
diff changeset
   643
        aOneArgBlock value:(aComponent rightCenter rounded  - (2@0) extent:ext).
e5a66f3365d6 handles fixed
Claus Gittinger <cg@exept.de>
parents: 2553
diff changeset
   644
        aOneArgBlock value:(aComponent topCenter rounded    - (0@3) extent:ext).
e5a66f3365d6 handles fixed
Claus Gittinger <cg@exept.de>
parents: 2553
diff changeset
   645
        aOneArgBlock value:(aComponent bottomCenter rounded - (0@2) extent:ext).
181
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   646
    ]
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   647
!
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   648
1675
9e7465c57509 drag & drop mechanism
ca
parents: 1674
diff changeset
   649
redrawSelection
2495
ead2b25a2c63 handle non-view components;
Claus Gittinger <cg@exept.de>
parents: 2359
diff changeset
   650
    "redraw all items selected"
ead2b25a2c63 handle non-view components;
Claus Gittinger <cg@exept.de>
parents: 2359
diff changeset
   651
1675
9e7465c57509 drag & drop mechanism
ca
parents: 1674
diff changeset
   652
    (shown and:[selection notNil and:[hiddenCounter == 0]]) ifTrue:[
9e7465c57509 drag & drop mechanism
ca
parents: 1674
diff changeset
   653
        self clippedByChildren:false.
181
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   654
1675
9e7465c57509 drag & drop mechanism
ca
parents: 1674
diff changeset
   655
        self handlesOf:selection do:[:aRectangle|
2534
b717cb2e0cb8 nicer handles: care for handles-on-dark (white frame)
Claus Gittinger <cg@exept.de>
parents: 2504
diff changeset
   656
            self paint:Color black.
b717cb2e0cb8 nicer handles: care for handles-on-dark (white frame)
Claus Gittinger <cg@exept.de>
parents: 2504
diff changeset
   657
            self fillRectangle:aRectangle.
b717cb2e0cb8 nicer handles: care for handles-on-dark (white frame)
Claus Gittinger <cg@exept.de>
parents: 2504
diff changeset
   658
b717cb2e0cb8 nicer handles: care for handles-on-dark (white frame)
Claus Gittinger <cg@exept.de>
parents: 2504
diff changeset
   659
            self paint:Color white.
2561
e5a66f3365d6 handles fixed
Claus Gittinger <cg@exept.de>
parents: 2553
diff changeset
   660
            self displayRectangle:(aRectangle insetBy:0).
1675
9e7465c57509 drag & drop mechanism
ca
parents: 1674
diff changeset
   661
        ].
9e7465c57509 drag & drop mechanism
ca
parents: 1674
diff changeset
   662
        self clippedByChildren:true.
1671
493e0430518e no longer use InputView
ca
parents: 1582
diff changeset
   663
    ].
493e0430518e no longer use InputView
ca
parents: 1582
diff changeset
   664
!
493e0430518e no longer use InputView
ca
parents: 1582
diff changeset
   665
1674
ed8aa80a11a9 *** empty log message ***
ca
parents: 1673
diff changeset
   666
selection:aView
2495
ead2b25a2c63 handle non-view components;
Claus Gittinger <cg@exept.de>
parents: 2359
diff changeset
   667
    "selection changed"
ead2b25a2c63 handle non-view components;
Claus Gittinger <cg@exept.de>
parents: 2359
diff changeset
   668
1671
493e0430518e no longer use InputView
ca
parents: 1582
diff changeset
   669
    |spec|
493e0430518e no longer use InputView
ca
parents: 1582
diff changeset
   670
1674
ed8aa80a11a9 *** empty log message ***
ca
parents: 1673
diff changeset
   671
    selection == aView ifTrue:[^ self].
1671
493e0430518e no longer use InputView
ca
parents: 1582
diff changeset
   672
2495
ead2b25a2c63 handle non-view components;
Claus Gittinger <cg@exept.de>
parents: 2359
diff changeset
   673
    self withSelectionHiddenDo:[
1675
9e7465c57509 drag & drop mechanism
ca
parents: 1674
diff changeset
   674
        spec := self findSpecFor:aView.
2502
c27a926cbe67 cleaned up the code and fixed many bugs;
Claus Gittinger <cg@exept.de>
parents: 2495
diff changeset
   675
2495
ead2b25a2c63 handle non-view components;
Claus Gittinger <cg@exept.de>
parents: 2359
diff changeset
   676
        selection := (spec isNil) ifTrue:[nil] ifFalse:[aView].
1675
9e7465c57509 drag & drop mechanism
ca
parents: 1674
diff changeset
   677
        clientSpecHolder value:spec.
9e7465c57509 drag & drop mechanism
ca
parents: 1674
diff changeset
   678
    ].
9e7465c57509 drag & drop mechanism
ca
parents: 1674
diff changeset
   679
!
9e7465c57509 drag & drop mechanism
ca
parents: 1674
diff changeset
   680
2495
ead2b25a2c63 handle non-view components;
Claus Gittinger <cg@exept.de>
parents: 2359
diff changeset
   681
withSelectionHiddenDo:aOneArgBlock
2502
c27a926cbe67 cleaned up the code and fixed many bugs;
Claus Gittinger <cg@exept.de>
parents: 2495
diff changeset
   682
    [ 
c27a926cbe67 cleaned up the code and fixed many bugs;
Claus Gittinger <cg@exept.de>
parents: 2495
diff changeset
   683
        |r forceExpose|
c27a926cbe67 cleaned up the code and fixed many bugs;
Claus Gittinger <cg@exept.de>
parents: 2495
diff changeset
   684
        
2495
ead2b25a2c63 handle non-view components;
Claus Gittinger <cg@exept.de>
parents: 2359
diff changeset
   685
        hiddenCounter :=  hiddenCounter + 1.
1675
9e7465c57509 drag & drop mechanism
ca
parents: 1674
diff changeset
   686
        hiddenCounter == 1 ifTrue:[
9e7465c57509 drag & drop mechanism
ca
parents: 1674
diff changeset
   687
            (shown and:[selection notNil]) ifTrue:[
9e7465c57509 drag & drop mechanism
ca
parents: 1674
diff changeset
   688
                self clippedByChildren:false.
9e7465c57509 drag & drop mechanism
ca
parents: 1674
diff changeset
   689
9e7465c57509 drag & drop mechanism
ca
parents: 1674
diff changeset
   690
                self handlesOf:selection do:[:aRectangle|
2495
ead2b25a2c63 handle non-view components;
Claus Gittinger <cg@exept.de>
parents: 2359
diff changeset
   691
                    self clearRectangle:aRectangle.
ead2b25a2c63 handle non-view components;
Claus Gittinger <cg@exept.de>
parents: 2359
diff changeset
   692
                    self invalidateRectangle:aRectangle repairNow:false.
1675
9e7465c57509 drag & drop mechanism
ca
parents: 1674
diff changeset
   693
                ].
9e7465c57509 drag & drop mechanism
ca
parents: 1674
diff changeset
   694
                self clippedByChildren:true.
1671
493e0430518e no longer use InputView
ca
parents: 1582
diff changeset
   695
1675
9e7465c57509 drag & drop mechanism
ca
parents: 1674
diff changeset
   696
                r := selection bounds.
2502
c27a926cbe67 cleaned up the code and fixed many bugs;
Claus Gittinger <cg@exept.de>
parents: 2495
diff changeset
   697
c27a926cbe67 cleaned up the code and fixed many bugs;
Claus Gittinger <cg@exept.de>
parents: 2495
diff changeset
   698
                forceExpose := 
c27a926cbe67 cleaned up the code and fixed many bugs;
Claus Gittinger <cg@exept.de>
parents: 2495
diff changeset
   699
                    [:sv|
2495
ead2b25a2c63 handle non-view components;
Claus Gittinger <cg@exept.de>
parents: 2359
diff changeset
   700
                        |absOrg absFrame|
1675
9e7465c57509 drag & drop mechanism
ca
parents: 1674
diff changeset
   701
2502
c27a926cbe67 cleaned up the code and fixed many bugs;
Claus Gittinger <cg@exept.de>
parents: 2495
diff changeset
   702
                        (sv bounds intersects:r) ifTrue:[   
c27a926cbe67 cleaned up the code and fixed many bugs;
Claus Gittinger <cg@exept.de>
parents: 2495
diff changeset
   703
                            sv isView ifTrue:[
c27a926cbe67 cleaned up the code and fixed many bugs;
Claus Gittinger <cg@exept.de>
parents: 2495
diff changeset
   704
                                sv borderColor:(Color white).           "/ kludge to force a redraw
c27a926cbe67 cleaned up the code and fixed many bugs;
Claus Gittinger <cg@exept.de>
parents: 2495
diff changeset
   705
                                sv borderColor:(Color black).
1671
493e0430518e no longer use InputView
ca
parents: 1582
diff changeset
   706
2502
c27a926cbe67 cleaned up the code and fixed many bugs;
Claus Gittinger <cg@exept.de>
parents: 2495
diff changeset
   707
                                sv withAllSubViewsDo:[:v|
c27a926cbe67 cleaned up the code and fixed many bugs;
Claus Gittinger <cg@exept.de>
parents: 2495
diff changeset
   708
                                    v realized ifTrue:[
c27a926cbe67 cleaned up the code and fixed many bugs;
Claus Gittinger <cg@exept.de>
parents: 2495
diff changeset
   709
                                        v fill:v viewBackground.
c27a926cbe67 cleaned up the code and fixed many bugs;
Claus Gittinger <cg@exept.de>
parents: 2495
diff changeset
   710
                                        v exposeX:0 y:0 width:v width height:v height.
c27a926cbe67 cleaned up the code and fixed many bugs;
Claus Gittinger <cg@exept.de>
parents: 2495
diff changeset
   711
                                    ]
2495
ead2b25a2c63 handle non-view components;
Claus Gittinger <cg@exept.de>
parents: 2359
diff changeset
   712
                                ]
2502
c27a926cbe67 cleaned up the code and fixed many bugs;
Claus Gittinger <cg@exept.de>
parents: 2495
diff changeset
   713
                            ] ifFalse:[
c27a926cbe67 cleaned up the code and fixed many bugs;
Claus Gittinger <cg@exept.de>
parents: 2495
diff changeset
   714
                                sv invalidate.
c27a926cbe67 cleaned up the code and fixed many bugs;
Claus Gittinger <cg@exept.de>
parents: 2495
diff changeset
   715
                            ].
1675
9e7465c57509 drag & drop mechanism
ca
parents: 1674
diff changeset
   716
                        ]
2502
c27a926cbe67 cleaned up the code and fixed many bugs;
Claus Gittinger <cg@exept.de>
parents: 2495
diff changeset
   717
                    ].
c27a926cbe67 cleaned up the code and fixed many bugs;
Claus Gittinger <cg@exept.de>
parents: 2495
diff changeset
   718
c27a926cbe67 cleaned up the code and fixed many bugs;
Claus Gittinger <cg@exept.de>
parents: 2495
diff changeset
   719
                (subViews ? #()) do:forceExpose.
c27a926cbe67 cleaned up the code and fixed many bugs;
Claus Gittinger <cg@exept.de>
parents: 2495
diff changeset
   720
                (components ? #()) do:forceExpose.
1675
9e7465c57509 drag & drop mechanism
ca
parents: 1674
diff changeset
   721
            ].
9e7465c57509 drag & drop mechanism
ca
parents: 1674
diff changeset
   722
        ].
2502
c27a926cbe67 cleaned up the code and fixed many bugs;
Claus Gittinger <cg@exept.de>
parents: 2495
diff changeset
   723
        self repairDamage.  "/ ensure that any outstanding clear/redraw of the unselect are done before
1675
9e7465c57509 drag & drop mechanism
ca
parents: 1674
diff changeset
   724
        aOneArgBlock value.
9e7465c57509 drag & drop mechanism
ca
parents: 1674
diff changeset
   725
    ] ensure:[
2495
ead2b25a2c63 handle non-view components;
Claus Gittinger <cg@exept.de>
parents: 2359
diff changeset
   726
        self repairDamage.  "/ ensure that any outstanding clear/redraw of the unselect are done before
ead2b25a2c63 handle non-view components;
Claus Gittinger <cg@exept.de>
parents: 2359
diff changeset
   727
1675
9e7465c57509 drag & drop mechanism
ca
parents: 1674
diff changeset
   728
        hiddenCounter := hiddenCounter - 1.
9e7465c57509 drag & drop mechanism
ca
parents: 1674
diff changeset
   729
        self redrawSelection.
9e7465c57509 drag & drop mechanism
ca
parents: 1674
diff changeset
   730
    ].
181
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   731
! !
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   732
2563
c2298d24621d renamed canvas into palette
Claus Gittinger <cg@exept.de>
parents: 2561
diff changeset
   733
!UIGalleryView::Palette::DropSpec class methodsFor:'instance creation'!
181
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   734
2495
ead2b25a2c63 handle non-view components;
Claus Gittinger <cg@exept.de>
parents: 2359
diff changeset
   735
for:aWidget specification:aSpec
ead2b25a2c63 handle non-view components;
Claus Gittinger <cg@exept.de>
parents: 2359
diff changeset
   736
    "create drop object for a widget derived from a specification"
ead2b25a2c63 handle non-view components;
Claus Gittinger <cg@exept.de>
parents: 2359
diff changeset
   737
ead2b25a2c63 handle non-view components;
Claus Gittinger <cg@exept.de>
parents: 2359
diff changeset
   738
    |point extent rootView device inst displayObject view|
181
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   739
2495
ead2b25a2c63 handle non-view components;
Claus Gittinger <cg@exept.de>
parents: 2359
diff changeset
   740
    device   := aWidget device.
1501
f760ccab7a35 use new #translatePoint:fromView:toView:
Claus Gittinger <cg@exept.de>
parents: 1455
diff changeset
   741
    rootView := device rootView.
2495
ead2b25a2c63 handle non-view components;
Claus Gittinger <cg@exept.de>
parents: 2359
diff changeset
   742
    extent   := aWidget extent.
ead2b25a2c63 handle non-view components;
Claus Gittinger <cg@exept.de>
parents: 2359
diff changeset
   743
    aWidget isView ifTrue:[
ead2b25a2c63 handle non-view components;
Claus Gittinger <cg@exept.de>
parents: 2359
diff changeset
   744
        view := aWidget.
ead2b25a2c63 handle non-view components;
Claus Gittinger <cg@exept.de>
parents: 2359
diff changeset
   745
        point := device translatePoint:0@0 fromView:aWidget toView:rootView.
ead2b25a2c63 handle non-view components;
Claus Gittinger <cg@exept.de>
parents: 2359
diff changeset
   746
    ] ifFalse:[
ead2b25a2c63 handle non-view components;
Claus Gittinger <cg@exept.de>
parents: 2359
diff changeset
   747
        view := aWidget container.
ead2b25a2c63 handle non-view components;
Claus Gittinger <cg@exept.de>
parents: 2359
diff changeset
   748
        point := device translatePoint:(aWidget origin) fromView:view toView:rootView.
ead2b25a2c63 handle non-view components;
Claus Gittinger <cg@exept.de>
parents: 2359
diff changeset
   749
    ].
181
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   750
    (point x > 0 and:[point y > 0]) ifTrue:[
1501
f760ccab7a35 use new #translatePoint:fromView:toView:
Claus Gittinger <cg@exept.de>
parents: 1455
diff changeset
   751
        point := point + extent.
f760ccab7a35 use new #translatePoint:fromView:toView:
Claus Gittinger <cg@exept.de>
parents: 1455
diff changeset
   752
        (point x < rootView width and:[point y < rootView height]) ifTrue:[
2495
ead2b25a2c63 handle non-view components;
Claus Gittinger <cg@exept.de>
parents: 2359
diff changeset
   753
            aWidget topView raise.
1568
a9d61da29e8b no need for device sync - flush will do
Claus Gittinger <cg@exept.de>
parents: 1561
diff changeset
   754
            device flush.
2495
ead2b25a2c63 handle non-view components;
Claus Gittinger <cg@exept.de>
parents: 2359
diff changeset
   755
            aWidget invalidate.
ead2b25a2c63 handle non-view components;
Claus Gittinger <cg@exept.de>
parents: 2359
diff changeset
   756
            aWidget windowGroup processExposeEvents.
ead2b25a2c63 handle non-view components;
Claus Gittinger <cg@exept.de>
parents: 2359
diff changeset
   757
            displayObject := Image fromView:aWidget grab:false.
1501
f760ccab7a35 use new #translatePoint:fromView:toView:
Claus Gittinger <cg@exept.de>
parents: 1455
diff changeset
   758
        ]
181
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   759
    ].
806
4faf081e981d add displayObject for dragging
ca
parents: 720
diff changeset
   760
    displayObject isNil ifTrue:[
1501
f760ccab7a35 use new #translatePoint:fromView:toView:
Claus Gittinger <cg@exept.de>
parents: 1455
diff changeset
   761
        displayObject := Form extent:extent depth:1.
f760ccab7a35 use new #translatePoint:fromView:toView:
Claus Gittinger <cg@exept.de>
parents: 1455
diff changeset
   762
        displayObject colorMap:(Array with:Color white with:Color black).
f760ccab7a35 use new #translatePoint:fromView:toView:
Claus Gittinger <cg@exept.de>
parents: 1455
diff changeset
   763
        displayObject fill:(Color colorId:0).
f760ccab7a35 use new #translatePoint:fromView:toView:
Claus Gittinger <cg@exept.de>
parents: 1455
diff changeset
   764
        displayObject paint:(Color colorId:1).
2495
ead2b25a2c63 handle non-view components;
Claus Gittinger <cg@exept.de>
parents: 2359
diff changeset
   765
        displayObject displayRectangleX:0 y:0 width:aWidget extent x height:aWidget extent y.
181
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   766
    ].
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   767
    aSpec class == UISubSpecification ifTrue:[
1501
f760ccab7a35 use new #translatePoint:fromView:toView:
Claus Gittinger <cg@exept.de>
parents: 1455
diff changeset
   768
        aSpec layout:(LayoutOrigin fromPoint:0@0)
181
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   769
    ].
240
3f0dfabbb14d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 239
diff changeset
   770
806
4faf081e981d add displayObject for dragging
ca
parents: 720
diff changeset
   771
    inst := self new.
4faf081e981d add displayObject for dragging
ca
parents: 720
diff changeset
   772
    inst displayObject:displayObject.
4faf081e981d add displayObject for dragging
ca
parents: 720
diff changeset
   773
    inst theObject:aSpec.
2495
ead2b25a2c63 handle non-view components;
Claus Gittinger <cg@exept.de>
parents: 2359
diff changeset
   774
    ^ inst.
1501
f760ccab7a35 use new #translatePoint:fromView:toView:
Claus Gittinger <cg@exept.de>
parents: 1455
diff changeset
   775
f760ccab7a35 use new #translatePoint:fromView:toView:
Claus Gittinger <cg@exept.de>
parents: 1455
diff changeset
   776
    "Modified: / 10.10.2001 / 14:03:00 / cg"
181
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   777
! !
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   778
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   779
!UIGalleryView class methodsFor:'documentation'!
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   780
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   781
version
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   782
    ^ '$Header$'
e0a85c343cb7 intitial checkin
ca
parents:
diff changeset
   783
! !