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