SubCanvas.st
author Claus Gittinger <cg@exept.de>
Fri, 15 Dec 2000 17:41:36 +0100
changeset 1907 e8efd065dc2b
parent 1906 0b64cfae3419
child 1908 e86e34794e84
permissions -rw-r--r--
oops - clientView again
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
970
8cbadf2b9825 also send #postBuildWith: to the app.
Claus Gittinger <cg@exept.de>
parents: 819
diff changeset
     1
"
8cbadf2b9825 also send #postBuildWith: to the app.
Claus Gittinger <cg@exept.de>
parents: 819
diff changeset
     2
 COPYRIGHT (c) 1998 by eXept Software AG
8cbadf2b9825 also send #postBuildWith: to the app.
Claus Gittinger <cg@exept.de>
parents: 819
diff changeset
     3
              All Rights Reserved
8cbadf2b9825 also send #postBuildWith: to the app.
Claus Gittinger <cg@exept.de>
parents: 819
diff changeset
     4
8cbadf2b9825 also send #postBuildWith: to the app.
Claus Gittinger <cg@exept.de>
parents: 819
diff changeset
     5
 This software is furnished under a license and may be used
8cbadf2b9825 also send #postBuildWith: to the app.
Claus Gittinger <cg@exept.de>
parents: 819
diff changeset
     6
 only in accordance with the terms of that license and with the
8cbadf2b9825 also send #postBuildWith: to the app.
Claus Gittinger <cg@exept.de>
parents: 819
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
8cbadf2b9825 also send #postBuildWith: to the app.
Claus Gittinger <cg@exept.de>
parents: 819
diff changeset
     8
 be provided or otherwise made available to, or used by, any
8cbadf2b9825 also send #postBuildWith: to the app.
Claus Gittinger <cg@exept.de>
parents: 819
diff changeset
     9
 other person.  No title to or ownership of the software is
8cbadf2b9825 also send #postBuildWith: to the app.
Claus Gittinger <cg@exept.de>
parents: 819
diff changeset
    10
 hereby transferred.
8cbadf2b9825 also send #postBuildWith: to the app.
Claus Gittinger <cg@exept.de>
parents: 819
diff changeset
    11
"
8cbadf2b9825 also send #postBuildWith: to the app.
Claus Gittinger <cg@exept.de>
parents: 819
diff changeset
    12
8cbadf2b9825 also send #postBuildWith: to the app.
Claus Gittinger <cg@exept.de>
parents: 819
diff changeset
    13
1818
fe99c5c721e9 category changes
Claus Gittinger <cg@exept.de>
parents: 1720
diff changeset
    14
"{ Package: 'stx:libwidg2' }"
fe99c5c721e9 category changes
Claus Gittinger <cg@exept.de>
parents: 1720
diff changeset
    15
455
860d66c9f047 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    16
ScrollableView subclass:#SubCanvas
1412
b426fae6edcf fix ViewScroller in scrolledView
tm
parents: 1383
diff changeset
    17
	instanceVariableNames:'builder spec client clientHolder specHolder clientView
1895
a1b2502c91d7 went back halfway to the old behavior,
Claus Gittinger <cg@exept.de>
parents: 1894
diff changeset
    18
		clientViewIsScrolled lateBuild useApplicationSubView
a1b2502c91d7 went back halfway to the old behavior,
Claus Gittinger <cg@exept.de>
parents: 1894
diff changeset
    19
		keepClientView useOwnBuilder'
455
860d66c9f047 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    20
	classVariableNames:''
860d66c9f047 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    21
	poolDictionaries:''
860d66c9f047 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    22
	category:'Views-Basic'
860d66c9f047 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    23
!
860d66c9f047 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    24
970
8cbadf2b9825 also send #postBuildWith: to the app.
Claus Gittinger <cg@exept.de>
parents: 819
diff changeset
    25
!SubCanvas class methodsFor:'documentation'!
8cbadf2b9825 also send #postBuildWith: to the app.
Claus Gittinger <cg@exept.de>
parents: 819
diff changeset
    26
8cbadf2b9825 also send #postBuildWith: to the app.
Claus Gittinger <cg@exept.de>
parents: 819
diff changeset
    27
copyright
8cbadf2b9825 also send #postBuildWith: to the app.
Claus Gittinger <cg@exept.de>
parents: 819
diff changeset
    28
"
8cbadf2b9825 also send #postBuildWith: to the app.
Claus Gittinger <cg@exept.de>
parents: 819
diff changeset
    29
 COPYRIGHT (c) 1998 by eXept Software AG
8cbadf2b9825 also send #postBuildWith: to the app.
Claus Gittinger <cg@exept.de>
parents: 819
diff changeset
    30
              All Rights Reserved
8cbadf2b9825 also send #postBuildWith: to the app.
Claus Gittinger <cg@exept.de>
parents: 819
diff changeset
    31
8cbadf2b9825 also send #postBuildWith: to the app.
Claus Gittinger <cg@exept.de>
parents: 819
diff changeset
    32
 This software is furnished under a license and may be used
8cbadf2b9825 also send #postBuildWith: to the app.
Claus Gittinger <cg@exept.de>
parents: 819
diff changeset
    33
 only in accordance with the terms of that license and with the
8cbadf2b9825 also send #postBuildWith: to the app.
Claus Gittinger <cg@exept.de>
parents: 819
diff changeset
    34
 inclusion of the above copyright notice.   This software may not
8cbadf2b9825 also send #postBuildWith: to the app.
Claus Gittinger <cg@exept.de>
parents: 819
diff changeset
    35
 be provided or otherwise made available to, or used by, any
8cbadf2b9825 also send #postBuildWith: to the app.
Claus Gittinger <cg@exept.de>
parents: 819
diff changeset
    36
 other person.  No title to or ownership of the software is
8cbadf2b9825 also send #postBuildWith: to the app.
Claus Gittinger <cg@exept.de>
parents: 819
diff changeset
    37
 hereby transferred.
8cbadf2b9825 also send #postBuildWith: to the app.
Claus Gittinger <cg@exept.de>
parents: 819
diff changeset
    38
"
8cbadf2b9825 also send #postBuildWith: to the app.
Claus Gittinger <cg@exept.de>
parents: 819
diff changeset
    39
8cbadf2b9825 also send #postBuildWith: to the app.
Claus Gittinger <cg@exept.de>
parents: 819
diff changeset
    40
!
8cbadf2b9825 also send #postBuildWith: to the app.
Claus Gittinger <cg@exept.de>
parents: 819
diff changeset
    41
8cbadf2b9825 also send #postBuildWith: to the app.
Claus Gittinger <cg@exept.de>
parents: 819
diff changeset
    42
documentation
8cbadf2b9825 also send #postBuildWith: to the app.
Claus Gittinger <cg@exept.de>
parents: 819
diff changeset
    43
"
8cbadf2b9825 also send #postBuildWith: to the app.
Claus Gittinger <cg@exept.de>
parents: 819
diff changeset
    44
    a view for a subApplication.
8cbadf2b9825 also send #postBuildWith: to the app.
Claus Gittinger <cg@exept.de>
parents: 819
diff changeset
    45
1895
a1b2502c91d7 went back halfway to the old behavior,
Claus Gittinger <cg@exept.de>
parents: 1894
diff changeset
    46
    Made to be VW compatible as much as possible (try opening a RefactoringBrowser ...).
a1b2502c91d7 went back halfway to the old behavior,
Claus Gittinger <cg@exept.de>
parents: 1894
diff changeset
    47
    However, the default setup is not very useful, to embedd arbitrary applications
a1b2502c91d7 went back halfway to the old behavior,
Claus Gittinger <cg@exept.de>
parents: 1894
diff changeset
    48
    which are meant to be separate stand-alone applications.
a1b2502c91d7 went back halfway to the old behavior,
Claus Gittinger <cg@exept.de>
parents: 1894
diff changeset
    49
    Play with the settings:
a1b2502c91d7 went back halfway to the old behavior,
Claus Gittinger <cg@exept.de>
parents: 1894
diff changeset
    50
        keepClientView          (default: true)
a1b2502c91d7 went back halfway to the old behavior,
Claus Gittinger <cg@exept.de>
parents: 1894
diff changeset
    51
        useApplicationSubView   (default: false)
a1b2502c91d7 went back halfway to the old behavior,
Claus Gittinger <cg@exept.de>
parents: 1894
diff changeset
    52
        useOwnBuilder           (default: false)
a1b2502c91d7 went back halfway to the old behavior,
Claus Gittinger <cg@exept.de>
parents: 1894
diff changeset
    53
970
8cbadf2b9825 also send #postBuildWith: to the app.
Claus Gittinger <cg@exept.de>
parents: 819
diff changeset
    54
    [author:]
8cbadf2b9825 also send #postBuildWith: to the app.
Claus Gittinger <cg@exept.de>
parents: 819
diff changeset
    55
        Claus Atzkern
8cbadf2b9825 also send #postBuildWith: to the app.
Claus Gittinger <cg@exept.de>
parents: 819
diff changeset
    56
"
8cbadf2b9825 also send #postBuildWith: to the app.
Claus Gittinger <cg@exept.de>
parents: 819
diff changeset
    57
! !
455
860d66c9f047 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    58
1414
faf0465c333b defaults for hasHVScrollbar now defined in a class method.
tm
parents: 1412
diff changeset
    59
!SubCanvas class methodsFor:'defaults'!
faf0465c333b defaults for hasHVScrollbar now defined in a class method.
tm
parents: 1412
diff changeset
    60
faf0465c333b defaults for hasHVScrollbar now defined in a class method.
tm
parents: 1412
diff changeset
    61
defaultHorizontalScrollable
faf0465c333b defaults for hasHVScrollbar now defined in a class method.
tm
parents: 1412
diff changeset
    62
    ^ false
faf0465c333b defaults for hasHVScrollbar now defined in a class method.
tm
parents: 1412
diff changeset
    63
faf0465c333b defaults for hasHVScrollbar now defined in a class method.
tm
parents: 1412
diff changeset
    64
faf0465c333b defaults for hasHVScrollbar now defined in a class method.
tm
parents: 1412
diff changeset
    65
!
faf0465c333b defaults for hasHVScrollbar now defined in a class method.
tm
parents: 1412
diff changeset
    66
faf0465c333b defaults for hasHVScrollbar now defined in a class method.
tm
parents: 1412
diff changeset
    67
defaultVerticalScrollable
faf0465c333b defaults for hasHVScrollbar now defined in a class method.
tm
parents: 1412
diff changeset
    68
    ^ false
faf0465c333b defaults for hasHVScrollbar now defined in a class method.
tm
parents: 1412
diff changeset
    69
faf0465c333b defaults for hasHVScrollbar now defined in a class method.
tm
parents: 1412
diff changeset
    70
faf0465c333b defaults for hasHVScrollbar now defined in a class method.
tm
parents: 1412
diff changeset
    71
! !
faf0465c333b defaults for hasHVScrollbar now defined in a class method.
tm
parents: 1412
diff changeset
    72
455
860d66c9f047 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    73
!SubCanvas methodsFor:'accessing'!
860d66c9f047 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    74
503
0a3ef2d34d9d add application holder
ca
parents: 455
diff changeset
    75
builder
0a3ef2d34d9d add application holder
ca
parents: 455
diff changeset
    76
    "return the value of the instance variable 'builder' (automatically generated)"
455
860d66c9f047 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    77
1893
6456c11a1307 View -> ApplicationSubView
tm
parents: 1856
diff changeset
    78
    ^ builder
6456c11a1307 View -> ApplicationSubView
tm
parents: 1856
diff changeset
    79
!
455
860d66c9f047 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    80
503
0a3ef2d34d9d add application holder
ca
parents: 455
diff changeset
    81
client
0a3ef2d34d9d add application holder
ca
parents: 455
diff changeset
    82
    "return the value of the instance variable 'client' (automatically generated)"
455
860d66c9f047 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    83
1893
6456c11a1307 View -> ApplicationSubView
tm
parents: 1856
diff changeset
    84
    ^ client
6456c11a1307 View -> ApplicationSubView
tm
parents: 1856
diff changeset
    85
!
455
860d66c9f047 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    86
503
0a3ef2d34d9d add application holder
ca
parents: 455
diff changeset
    87
client:anApplication spec:aWindowSpecOrSpecSymbol builder:aBuilder
455
860d66c9f047 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    88
    "release existing components and generate new components from
860d66c9f047 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    89
     the given windowSpec, using the given builder."
860d66c9f047 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    90
1471
09a5803325e4 when destroying or changing the client, release as subApp
Claus Gittinger <cg@exept.de>
parents: 1467
diff changeset
    91
    |myApp|
09a5803325e4 when destroying or changing the client, release as subApp
Claus Gittinger <cg@exept.de>
parents: 1467
diff changeset
    92
1686
bafa16adbf14 must release client first,
ca
parents: 1664
diff changeset
    93
    (client notNil and:[client ~~ anApplication]) ifTrue:[
bafa16adbf14 must release client first,
ca
parents: 1664
diff changeset
    94
        client releaseAsSubCanvas.
bafa16adbf14 must release client first,
ca
parents: 1664
diff changeset
    95
        client := nil.
bafa16adbf14 must release client first,
ca
parents: 1664
diff changeset
    96
    ].
bafa16adbf14 must release client first,
ca
parents: 1664
diff changeset
    97
1546
452132649648 Moved #client: and #client:spec: to SimpleView.
Stefan Vogel <sv@exept.de>
parents: 1471
diff changeset
    98
    (builder := aBuilder) isNil ifTrue:[
1846
e90341acd040 comment
Claus Gittinger <cg@exept.de>
parents: 1818
diff changeset
    99
        builder := anApplication perform:#builder ifNotUnderstood:[UIBuilder new]
1546
452132649648 Moved #client: and #client:spec: to SimpleView.
Stefan Vogel <sv@exept.de>
parents: 1471
diff changeset
   100
    ].
452132649648 Moved #client: and #client:spec: to SimpleView.
Stefan Vogel <sv@exept.de>
parents: 1471
diff changeset
   101
452132649648 Moved #client: and #client:spec: to SimpleView.
Stefan Vogel <sv@exept.de>
parents: 1471
diff changeset
   102
    spec := aWindowSpecOrSpecSymbol.
503
0a3ef2d34d9d add application holder
ca
parents: 455
diff changeset
   103
0a3ef2d34d9d add application holder
ca
parents: 455
diff changeset
   104
    "/ check for master application
0a3ef2d34d9d add application holder
ca
parents: 455
diff changeset
   105
    (anApplication notNil and:[anApplication masterApplication isNil]) ifTrue:[
1471
09a5803325e4 when destroying or changing the client, release as subApp
Claus Gittinger <cg@exept.de>
parents: 1467
diff changeset
   106
        myApp := self application.
09a5803325e4 when destroying or changing the client, release as subApp
Claus Gittinger <cg@exept.de>
parents: 1467
diff changeset
   107
        myApp ~~ anApplication ifTrue:[
09a5803325e4 when destroying or changing the client, release as subApp
Claus Gittinger <cg@exept.de>
parents: 1467
diff changeset
   108
            anApplication masterApplication:myApp
503
0a3ef2d34d9d add application holder
ca
parents: 455
diff changeset
   109
        ]
0a3ef2d34d9d add application holder
ca
parents: 455
diff changeset
   110
    ].
1471
09a5803325e4 when destroying or changing the client, release as subApp
Claus Gittinger <cg@exept.de>
parents: 1467
diff changeset
   111
503
0a3ef2d34d9d add application holder
ca
parents: 455
diff changeset
   112
    client := anApplication.
0a3ef2d34d9d add application holder
ca
parents: 455
diff changeset
   113
    self rebuild.
1471
09a5803325e4 when destroying or changing the client, release as subApp
Claus Gittinger <cg@exept.de>
parents: 1467
diff changeset
   114
    ^ builder
503
0a3ef2d34d9d add application holder
ca
parents: 455
diff changeset
   115
!
0a3ef2d34d9d add application holder
ca
parents: 455
diff changeset
   116
1412
b426fae6edcf fix ViewScroller in scrolledView
tm
parents: 1383
diff changeset
   117
makeClientViewScrollable:aBoolean
b426fae6edcf fix ViewScroller in scrolledView
tm
parents: 1383
diff changeset
   118
    |vs|
b426fae6edcf fix ViewScroller in scrolledView
tm
parents: 1383
diff changeset
   119
b426fae6edcf fix ViewScroller in scrolledView
tm
parents: 1383
diff changeset
   120
    aBoolean ~~ clientViewIsScrolled ifTrue:[
1662
b5ab432da3b9 subApp-channel support;
Claus Gittinger <cg@exept.de>
parents: 1584
diff changeset
   121
        clientView isNil ifTrue:[
1895
a1b2502c91d7 went back halfway to the old behavior,
Claus Gittinger <cg@exept.de>
parents: 1894
diff changeset
   122
            useApplicationSubView ifTrue:[
a1b2502c91d7 went back halfway to the old behavior,
Claus Gittinger <cg@exept.de>
parents: 1894
diff changeset
   123
                clientView := ApplicationSubView new.
a1b2502c91d7 went back halfway to the old behavior,
Claus Gittinger <cg@exept.de>
parents: 1894
diff changeset
   124
            ] ifFalse:[
a1b2502c91d7 went back halfway to the old behavior,
Claus Gittinger <cg@exept.de>
parents: 1894
diff changeset
   125
                clientView := View new.
a1b2502c91d7 went back halfway to the old behavior,
Claus Gittinger <cg@exept.de>
parents: 1894
diff changeset
   126
            ]
1662
b5ab432da3b9 subApp-channel support;
Claus Gittinger <cg@exept.de>
parents: 1584
diff changeset
   127
        ].
1412
b426fae6edcf fix ViewScroller in scrolledView
tm
parents: 1383
diff changeset
   128
        aBoolean ifTrue:[
b426fae6edcf fix ViewScroller in scrolledView
tm
parents: 1383
diff changeset
   129
            self scrolledView:(vs := ViewScroller new).
b426fae6edcf fix ViewScroller in scrolledView
tm
parents: 1383
diff changeset
   130
            vs scrolledView:clientView.
b426fae6edcf fix ViewScroller in scrolledView
tm
parents: 1383
diff changeset
   131
        ] ifFalse:[
b426fae6edcf fix ViewScroller in scrolledView
tm
parents: 1383
diff changeset
   132
            self scrolledView:clientView.
b426fae6edcf fix ViewScroller in scrolledView
tm
parents: 1383
diff changeset
   133
        ].
b426fae6edcf fix ViewScroller in scrolledView
tm
parents: 1383
diff changeset
   134
        clientViewIsScrolled := aBoolean.
b426fae6edcf fix ViewScroller in scrolledView
tm
parents: 1383
diff changeset
   135
    ]
b426fae6edcf fix ViewScroller in scrolledView
tm
parents: 1383
diff changeset
   136
1662
b5ab432da3b9 subApp-channel support;
Claus Gittinger <cg@exept.de>
parents: 1584
diff changeset
   137
    "Modified: / 30.1.2000 / 21:36:29 / cg"
1412
b426fae6edcf fix ViewScroller in scrolledView
tm
parents: 1383
diff changeset
   138
!
b426fae6edcf fix ViewScroller in scrolledView
tm
parents: 1383
diff changeset
   139
1450
9994adae5c1c checkin from browser
tm
parents: 1414
diff changeset
   140
setClient:anApplicationModel
9994adae5c1c checkin from browser
tm
parents: 1414
diff changeset
   141
    "set the client - do NOT rebuild"
9994adae5c1c checkin from browser
tm
parents: 1414
diff changeset
   142
9994adae5c1c checkin from browser
tm
parents: 1414
diff changeset
   143
    client := anApplicationModel 
9994adae5c1c checkin from browser
tm
parents: 1414
diff changeset
   144
!
9994adae5c1c checkin from browser
tm
parents: 1414
diff changeset
   145
503
0a3ef2d34d9d add application holder
ca
parents: 455
diff changeset
   146
spec
0a3ef2d34d9d add application holder
ca
parents: 455
diff changeset
   147
    "return the value of the instance variable 'spec' (automatically generated)"
0a3ef2d34d9d add application holder
ca
parents: 455
diff changeset
   148
1893
6456c11a1307 View -> ApplicationSubView
tm
parents: 1856
diff changeset
   149
    ^ spec
6456c11a1307 View -> ApplicationSubView
tm
parents: 1856
diff changeset
   150
!
503
0a3ef2d34d9d add application holder
ca
parents: 455
diff changeset
   151
0a3ef2d34d9d add application holder
ca
parents: 455
diff changeset
   152
spec:something
0a3ef2d34d9d add application holder
ca
parents: 455
diff changeset
   153
    "set the value of the instance variable 'spec' (automatically generated)"
0a3ef2d34d9d add application holder
ca
parents: 455
diff changeset
   154
0a3ef2d34d9d add application holder
ca
parents: 455
diff changeset
   155
    spec := something.
0a3ef2d34d9d add application holder
ca
parents: 455
diff changeset
   156
    self rebuild.
819
8450cb2ba595 Widget of SubCanvas is self
Stefan Vogel <sv@exept.de>
parents: 609
diff changeset
   157
!
8450cb2ba595 Widget of SubCanvas is self
Stefan Vogel <sv@exept.de>
parents: 609
diff changeset
   158
8450cb2ba595 Widget of SubCanvas is self
Stefan Vogel <sv@exept.de>
parents: 609
diff changeset
   159
widget
8450cb2ba595 Widget of SubCanvas is self
Stefan Vogel <sv@exept.de>
parents: 609
diff changeset
   160
    "ST80 compatibility. 
8450cb2ba595 Widget of SubCanvas is self
Stefan Vogel <sv@exept.de>
parents: 609
diff changeset
   161
     I am my own widget"
8450cb2ba595 Widget of SubCanvas is self
Stefan Vogel <sv@exept.de>
parents: 609
diff changeset
   162
8450cb2ba595 Widget of SubCanvas is self
Stefan Vogel <sv@exept.de>
parents: 609
diff changeset
   163
    ^ self
8450cb2ba595 Widget of SubCanvas is self
Stefan Vogel <sv@exept.de>
parents: 609
diff changeset
   164
8450cb2ba595 Widget of SubCanvas is self
Stefan Vogel <sv@exept.de>
parents: 609
diff changeset
   165
    "Created: / 10.3.1998 / 16:20:52 / stefan"
503
0a3ef2d34d9d add application holder
ca
parents: 455
diff changeset
   166
! !
0a3ef2d34d9d add application holder
ca
parents: 455
diff changeset
   167
1895
a1b2502c91d7 went back halfway to the old behavior,
Claus Gittinger <cg@exept.de>
parents: 1894
diff changeset
   168
!SubCanvas methodsFor:'accessing - canvasView handling'!
a1b2502c91d7 went back halfway to the old behavior,
Claus Gittinger <cg@exept.de>
parents: 1894
diff changeset
   169
a1b2502c91d7 went back halfway to the old behavior,
Claus Gittinger <cg@exept.de>
parents: 1894
diff changeset
   170
keepClientView:aBoolean
a1b2502c91d7 went back halfway to the old behavior,
Claus Gittinger <cg@exept.de>
parents: 1894
diff changeset
   171
    keepClientView := aBoolean
a1b2502c91d7 went back halfway to the old behavior,
Claus Gittinger <cg@exept.de>
parents: 1894
diff changeset
   172
!
a1b2502c91d7 went back halfway to the old behavior,
Claus Gittinger <cg@exept.de>
parents: 1894
diff changeset
   173
a1b2502c91d7 went back halfway to the old behavior,
Claus Gittinger <cg@exept.de>
parents: 1894
diff changeset
   174
useApplicationSubView:aBoolean
a1b2502c91d7 went back halfway to the old behavior,
Claus Gittinger <cg@exept.de>
parents: 1894
diff changeset
   175
    useApplicationSubView := aBoolean
a1b2502c91d7 went back halfway to the old behavior,
Claus Gittinger <cg@exept.de>
parents: 1894
diff changeset
   176
!
a1b2502c91d7 went back halfway to the old behavior,
Claus Gittinger <cg@exept.de>
parents: 1894
diff changeset
   177
a1b2502c91d7 went back halfway to the old behavior,
Claus Gittinger <cg@exept.de>
parents: 1894
diff changeset
   178
useOwnBuilder:aBoolean
a1b2502c91d7 went back halfway to the old behavior,
Claus Gittinger <cg@exept.de>
parents: 1894
diff changeset
   179
    useOwnBuilder := aBoolean
a1b2502c91d7 went back halfway to the old behavior,
Claus Gittinger <cg@exept.de>
parents: 1894
diff changeset
   180
! !
a1b2502c91d7 went back halfway to the old behavior,
Claus Gittinger <cg@exept.de>
parents: 1894
diff changeset
   181
1818
fe99c5c721e9 category changes
Claus Gittinger <cg@exept.de>
parents: 1720
diff changeset
   182
!SubCanvas methodsFor:'accessing-channels'!
503
0a3ef2d34d9d add application holder
ca
parents: 455
diff changeset
   183
0a3ef2d34d9d add application holder
ca
parents: 455
diff changeset
   184
clientHolder
0a3ef2d34d9d add application holder
ca
parents: 455
diff changeset
   185
    ^ clientHolder
0a3ef2d34d9d add application holder
ca
parents: 455
diff changeset
   186
!
0a3ef2d34d9d add application holder
ca
parents: 455
diff changeset
   187
0a3ef2d34d9d add application holder
ca
parents: 455
diff changeset
   188
clientHolder:aValueHolder
0a3ef2d34d9d add application holder
ca
parents: 455
diff changeset
   189
0a3ef2d34d9d add application holder
ca
parents: 455
diff changeset
   190
    clientHolder notNil ifTrue:[
0a3ef2d34d9d add application holder
ca
parents: 455
diff changeset
   191
        clientHolder removeDependent:self
0a3ef2d34d9d add application holder
ca
parents: 455
diff changeset
   192
    ].
0a3ef2d34d9d add application holder
ca
parents: 455
diff changeset
   193
    (clientHolder := aValueHolder) notNil ifTrue:[
0a3ef2d34d9d add application holder
ca
parents: 455
diff changeset
   194
        clientHolder addDependent:self
0a3ef2d34d9d add application holder
ca
parents: 455
diff changeset
   195
    ].
557
7cf5f021983d add method:
ca
parents: 554
diff changeset
   196
    self updateFromChannels
503
0a3ef2d34d9d add application holder
ca
parents: 455
diff changeset
   197
!
0a3ef2d34d9d add application holder
ca
parents: 455
diff changeset
   198
1893
6456c11a1307 View -> ApplicationSubView
tm
parents: 1856
diff changeset
   199
clientView:aView
6456c11a1307 View -> ApplicationSubView
tm
parents: 1856
diff changeset
   200
6456c11a1307 View -> ApplicationSubView
tm
parents: 1856
diff changeset
   201
    clientView notNil ifTrue:[
6456c11a1307 View -> ApplicationSubView
tm
parents: 1856
diff changeset
   202
        clientView destroy
6456c11a1307 View -> ApplicationSubView
tm
parents: 1856
diff changeset
   203
    ].
6456c11a1307 View -> ApplicationSubView
tm
parents: 1856
diff changeset
   204
    clientView := aView
6456c11a1307 View -> ApplicationSubView
tm
parents: 1856
diff changeset
   205
!
6456c11a1307 View -> ApplicationSubView
tm
parents: 1856
diff changeset
   206
503
0a3ef2d34d9d add application holder
ca
parents: 455
diff changeset
   207
specHolder
0a3ef2d34d9d add application holder
ca
parents: 455
diff changeset
   208
    ^ specHolder
0a3ef2d34d9d add application holder
ca
parents: 455
diff changeset
   209
!
0a3ef2d34d9d add application holder
ca
parents: 455
diff changeset
   210
0a3ef2d34d9d add application holder
ca
parents: 455
diff changeset
   211
specHolder:aValueHolder
1905
20ff18462cc6 care for keepClientView setting
tm
parents: 1895
diff changeset
   212
    |oldSpec|
503
0a3ef2d34d9d add application holder
ca
parents: 455
diff changeset
   213
0a3ef2d34d9d add application holder
ca
parents: 455
diff changeset
   214
    specHolder notNil ifTrue:[
1905
20ff18462cc6 care for keepClientView setting
tm
parents: 1895
diff changeset
   215
        oldSpec := specHolder value.
503
0a3ef2d34d9d add application holder
ca
parents: 455
diff changeset
   216
        specHolder removeDependent:self
0a3ef2d34d9d add application holder
ca
parents: 455
diff changeset
   217
    ].
0a3ef2d34d9d add application holder
ca
parents: 455
diff changeset
   218
    (specHolder := aValueHolder) notNil ifTrue:[
0a3ef2d34d9d add application holder
ca
parents: 455
diff changeset
   219
        specHolder addDependent:self
0a3ef2d34d9d add application holder
ca
parents: 455
diff changeset
   220
    ].
1905
20ff18462cc6 care for keepClientView setting
tm
parents: 1895
diff changeset
   221
    oldSpec ~~ specHolder value ifTrue:[
20ff18462cc6 care for keepClientView setting
tm
parents: 1895
diff changeset
   222
        self updateFromChannels
20ff18462cc6 care for keepClientView setting
tm
parents: 1895
diff changeset
   223
    ]
503
0a3ef2d34d9d add application holder
ca
parents: 455
diff changeset
   224
! !
0a3ef2d34d9d add application holder
ca
parents: 455
diff changeset
   225
0a3ef2d34d9d add application holder
ca
parents: 455
diff changeset
   226
!SubCanvas methodsFor:'building'!
0a3ef2d34d9d add application holder
ca
parents: 455
diff changeset
   227
1584
f020416e00ae LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents: 1577
diff changeset
   228
XXrebuild
503
0a3ef2d34d9d add application holder
ca
parents: 455
diff changeset
   229
    "rebuild
0a3ef2d34d9d add application holder
ca
parents: 455
diff changeset
   230
    "
1577
04de18fd617c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1548
diff changeset
   231
    |v subSpec savedView builderClass boundsOrLayout|
455
860d66c9f047 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   232
1548
299e14135d2d Late building if subcanvas does not have a superView. (cg)
Stefan Vogel <sv@exept.de>
parents: 1546
diff changeset
   233
    superView isNil ifTrue:[
299e14135d2d Late building if subcanvas does not have a superView. (cg)
Stefan Vogel <sv@exept.de>
parents: 1546
diff changeset
   234
        lateBuild := true.
299e14135d2d Late building if subcanvas does not have a superView. (cg)
Stefan Vogel <sv@exept.de>
parents: 1546
diff changeset
   235
        ^ self
299e14135d2d Late building if subcanvas does not have a superView. (cg)
Stefan Vogel <sv@exept.de>
parents: 1546
diff changeset
   236
    ].
299e14135d2d Late building if subcanvas does not have a superView. (cg)
Stefan Vogel <sv@exept.de>
parents: 1546
diff changeset
   237
1412
b426fae6edcf fix ViewScroller in scrolledView
tm
parents: 1383
diff changeset
   238
    clientView notNil ifTrue:[
b426fae6edcf fix ViewScroller in scrolledView
tm
parents: 1383
diff changeset
   239
        clientView destroySubViews
455
860d66c9f047 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   240
    ].
860d66c9f047 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   241
860d66c9f047 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   242
    spec notNil ifTrue:[
970
8cbadf2b9825 also send #postBuildWith: to the app.
Claus Gittinger <cg@exept.de>
parents: 819
diff changeset
   243
        (subSpec := spec) isSymbol ifTrue:[
554
c32ed45bfc6e bug fixes for spec derived from channel
ca
parents: 553
diff changeset
   244
            client isNil ifTrue:[
1216
c9f8253a9e7c give a warning with nil client
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
   245
                'SubCanvas [warning]: no client - cannot build spec' infoPrintCR.
554
c32ed45bfc6e bug fixes for spec derived from channel
ca
parents: 553
diff changeset
   246
                ^ self
553
3535a0682ac7 spec channel changed: if client is nil, try
ca
parents: 503
diff changeset
   247
            ].
970
8cbadf2b9825 also send #postBuildWith: to the app.
Claus Gittinger <cg@exept.de>
parents: 819
diff changeset
   248
            (subSpec := client class interfaceSpecFor:spec) isNil ifTrue:[
1216
c9f8253a9e7c give a warning with nil client
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
   249
                "/ Transcript showCR:'SubCanvas: nil spec'.
503
0a3ef2d34d9d add application holder
ca
parents: 455
diff changeset
   250
                ^ self
0a3ef2d34d9d add application holder
ca
parents: 455
diff changeset
   251
            ]
0a3ef2d34d9d add application holder
ca
parents: 455
diff changeset
   252
        ].
973
9114f57c9977 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 970
diff changeset
   253
554
c32ed45bfc6e bug fixes for spec derived from channel
ca
parents: 553
diff changeset
   254
        builder isNil ifTrue:[
1383
1c0ffdda1a92 care for nil client.
Claus Gittinger <cg@exept.de>
parents: 1216
diff changeset
   255
            client isNil ifTrue:[
1c0ffdda1a92 care for nil client.
Claus Gittinger <cg@exept.de>
parents: 1216
diff changeset
   256
                builderClass := UIBuilder
1c0ffdda1a92 care for nil client.
Claus Gittinger <cg@exept.de>
parents: 1216
diff changeset
   257
            ] ifFalse:[
1c0ffdda1a92 care for nil client.
Claus Gittinger <cg@exept.de>
parents: 1216
diff changeset
   258
                builderClass := client builderClass
1c0ffdda1a92 care for nil client.
Claus Gittinger <cg@exept.de>
parents: 1216
diff changeset
   259
            ].
1c0ffdda1a92 care for nil client.
Claus Gittinger <cg@exept.de>
parents: 1216
diff changeset
   260
            builder := builderClass new.
554
c32ed45bfc6e bug fixes for spec derived from channel
ca
parents: 553
diff changeset
   261
        ].
973
9114f57c9977 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 970
diff changeset
   262
970
8cbadf2b9825 also send #postBuildWith: to the app.
Claus Gittinger <cg@exept.de>
parents: 819
diff changeset
   263
        "/ old:
1412
b426fae6edcf fix ViewScroller in scrolledView
tm
parents: 1383
diff changeset
   264
"/         builder buildFromSpec:subSpec in:clientView.
970
8cbadf2b9825 also send #postBuildWith: to the app.
Claus Gittinger <cg@exept.de>
parents: 819
diff changeset
   265
973
9114f57c9977 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 970
diff changeset
   266
        "/ new (let app know (somehow) that this is a build
9114f57c9977 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 970
diff changeset
   267
        "/ for a subcanvas (i.e. it can redefine the buildSubCanvase-method
9114f57c9977 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 970
diff changeset
   268
        "/:
970
8cbadf2b9825 also send #postBuildWith: to the app.
Claus Gittinger <cg@exept.de>
parents: 819
diff changeset
   269
        savedView := builder window.
1412
b426fae6edcf fix ViewScroller in scrolledView
tm
parents: 1383
diff changeset
   270
        builder window:clientView.
1450
9994adae5c1c checkin from browser
tm
parents: 1414
diff changeset
   271
        [
9994adae5c1c checkin from browser
tm
parents: 1414
diff changeset
   272
            client buildSubCanvas:subSpec withBuilder:builder.
9994adae5c1c checkin from browser
tm
parents: 1414
diff changeset
   273
        ] valueNowOrOnUnwindDo:[
9994adae5c1c checkin from browser
tm
parents: 1414
diff changeset
   274
            builder window:savedView.
9994adae5c1c checkin from browser
tm
parents: 1414
diff changeset
   275
        ].
1412
b426fae6edcf fix ViewScroller in scrolledView
tm
parents: 1383
diff changeset
   276
        clientViewIsScrolled ifTrue:[
1577
04de18fd617c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1548
diff changeset
   277
            boundsOrLayout := builder spec window layout.
04de18fd617c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1548
diff changeset
   278
            boundsOrLayout isNil ifTrue:[
04de18fd617c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1548
diff changeset
   279
                 boundsOrLayout := builder spec window bounds
04de18fd617c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1548
diff changeset
   280
            ].
1412
b426fae6edcf fix ViewScroller in scrolledView
tm
parents: 1383
diff changeset
   281
            clientView
1577
04de18fd617c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1548
diff changeset
   282
                extent:(boundsOrLayout rectangleRelativeTo:self bounds preferred:nil) extent.
1412
b426fae6edcf fix ViewScroller in scrolledView
tm
parents: 1383
diff changeset
   283
        ].
b426fae6edcf fix ViewScroller in scrolledView
tm
parents: 1383
diff changeset
   284
503
0a3ef2d34d9d add application holder
ca
parents: 455
diff changeset
   285
        self realized ifTrue:[
1412
b426fae6edcf fix ViewScroller in scrolledView
tm
parents: 1383
diff changeset
   286
            clientView realizeAllSubViews
503
0a3ef2d34d9d add application holder
ca
parents: 455
diff changeset
   287
        ]
0a3ef2d34d9d add application holder
ca
parents: 455
diff changeset
   288
    ]
970
8cbadf2b9825 also send #postBuildWith: to the app.
Claus Gittinger <cg@exept.de>
parents: 819
diff changeset
   289
973
9114f57c9977 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 970
diff changeset
   290
    "Modified: / 20.6.1998 / 14:29:00 / cg"
503
0a3ef2d34d9d add application holder
ca
parents: 455
diff changeset
   291
!
0a3ef2d34d9d add application holder
ca
parents: 455
diff changeset
   292
1584
f020416e00ae LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents: 1577
diff changeset
   293
container:aView
f020416e00ae LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents: 1577
diff changeset
   294
    super container:aView.
1846
e90341acd040 comment
Claus Gittinger <cg@exept.de>
parents: 1818
diff changeset
   295
e90341acd040 comment
Claus Gittinger <cg@exept.de>
parents: 1818
diff changeset
   296
    "/ my builder can only build the components, when I have a container
e90341acd040 comment
Claus Gittinger <cg@exept.de>
parents: 1818
diff changeset
   297
    "/ lateBuild is set, if the spec was set some time ago, when I had no container
e90341acd040 comment
Claus Gittinger <cg@exept.de>
parents: 1818
diff changeset
   298
    "/ Now, we know where to build the GUI ...
e90341acd040 comment
Claus Gittinger <cg@exept.de>
parents: 1818
diff changeset
   299
    "/ ... and must hurry up to create the widgets.
1584
f020416e00ae LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents: 1577
diff changeset
   300
    lateBuild == true ifTrue:[
f020416e00ae LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents: 1577
diff changeset
   301
        lateBuild := false.
f020416e00ae LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents: 1577
diff changeset
   302
        self rebuild
f020416e00ae LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents: 1577
diff changeset
   303
    ].
f020416e00ae LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents: 1577
diff changeset
   304
!
f020416e00ae LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents: 1577
diff changeset
   305
f020416e00ae LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents: 1577
diff changeset
   306
rebuild
f020416e00ae LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents: 1577
diff changeset
   307
    "rebuild
f020416e00ae LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents: 1577
diff changeset
   308
    "
1893
6456c11a1307 View -> ApplicationSubView
tm
parents: 1856
diff changeset
   309
    |v subSpec savedView savedBuilder builderClass|
1584
f020416e00ae LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents: 1577
diff changeset
   310
1856
8ecbdc69f11e comment
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   311
    "/ if the superView is not yet created,
8ecbdc69f11e comment
Claus Gittinger <cg@exept.de>
parents: 1846
diff changeset
   312
    "/ we MUST delay building... (sigh)
1905
20ff18462cc6 care for keepClientView setting
tm
parents: 1895
diff changeset
   313
    superView isNil ifTrue:[          
1584
f020416e00ae LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents: 1577
diff changeset
   314
        lateBuild := true.
f020416e00ae LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents: 1577
diff changeset
   315
        ^ self
f020416e00ae LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents: 1577
diff changeset
   316
    ].
f020416e00ae LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents: 1577
diff changeset
   317
f020416e00ae LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents: 1577
diff changeset
   318
    clientView notNil ifTrue:[
1893
6456c11a1307 View -> ApplicationSubView
tm
parents: 1856
diff changeset
   319
        clientView destroySubViews.
1584
f020416e00ae LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents: 1577
diff changeset
   320
    ].
f020416e00ae LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents: 1577
diff changeset
   321
f020416e00ae LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents: 1577
diff changeset
   322
    spec notNil ifTrue:[
f020416e00ae LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents: 1577
diff changeset
   323
        (subSpec := spec) isSymbol ifTrue:[
f020416e00ae LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents: 1577
diff changeset
   324
            client isNil ifTrue:[
f020416e00ae LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents: 1577
diff changeset
   325
                'SubCanvas [warning]: no client - cannot build spec' infoPrintCR.
f020416e00ae LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents: 1577
diff changeset
   326
                ^ self
f020416e00ae LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents: 1577
diff changeset
   327
            ].
f020416e00ae LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents: 1577
diff changeset
   328
            (subSpec := client class interfaceSpecFor:spec) isNil ifTrue:[
f020416e00ae LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents: 1577
diff changeset
   329
                "/ Transcript showCR:'SubCanvas: nil spec'.
f020416e00ae LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents: 1577
diff changeset
   330
                ^ self
f020416e00ae LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents: 1577
diff changeset
   331
            ]
f020416e00ae LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents: 1577
diff changeset
   332
        ].
1662
b5ab432da3b9 subApp-channel support;
Claus Gittinger <cg@exept.de>
parents: 1584
diff changeset
   333
        subSpec isArray ifTrue:[
b5ab432da3b9 subApp-channel support;
Claus Gittinger <cg@exept.de>
parents: 1584
diff changeset
   334
            subSpec := subSpec decodeAsLiteralArray
b5ab432da3b9 subApp-channel support;
Claus Gittinger <cg@exept.de>
parents: 1584
diff changeset
   335
        ].
1584
f020416e00ae LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents: 1577
diff changeset
   336
f020416e00ae LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents: 1577
diff changeset
   337
        builder isNil ifTrue:[
f020416e00ae LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents: 1577
diff changeset
   338
            client isNil ifTrue:[
f020416e00ae LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents: 1577
diff changeset
   339
                builderClass := UIBuilder
f020416e00ae LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents: 1577
diff changeset
   340
            ] ifFalse:[
f020416e00ae LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents: 1577
diff changeset
   341
                builderClass := client builderClass
f020416e00ae LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents: 1577
diff changeset
   342
            ].
f020416e00ae LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents: 1577
diff changeset
   343
            builder := builderClass new.
f020416e00ae LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents: 1577
diff changeset
   344
        ].
f020416e00ae LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents: 1577
diff changeset
   345
f020416e00ae LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents: 1577
diff changeset
   346
        "/ old:
f020416e00ae LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents: 1577
diff changeset
   347
        "/  builder buildFromSpec:subSpec in:clientView.
f020416e00ae LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents: 1577
diff changeset
   348
f020416e00ae LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents: 1577
diff changeset
   349
        "/ new (let app know (somehow) that this is a build
f020416e00ae LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents: 1577
diff changeset
   350
        "/ for a subcanvas (i.e. it can redefine the buildSubCanvas-method):
f020416e00ae LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents: 1577
diff changeset
   351
1895
a1b2502c91d7 went back halfway to the old behavior,
Claus Gittinger <cg@exept.de>
parents: 1894
diff changeset
   352
        keepClientView ifFalse:[
a1b2502c91d7 went back halfway to the old behavior,
Claus Gittinger <cg@exept.de>
parents: 1894
diff changeset
   353
            (clientView notNil and:[clientView application ~~ client]) ifTrue:[
a1b2502c91d7 went back halfway to the old behavior,
Claus Gittinger <cg@exept.de>
parents: 1894
diff changeset
   354
                clientView destroy.
a1b2502c91d7 went back halfway to the old behavior,
Claus Gittinger <cg@exept.de>
parents: 1894
diff changeset
   355
                clientView := nil.
a1b2502c91d7 went back halfway to the old behavior,
Claus Gittinger <cg@exept.de>
parents: 1894
diff changeset
   356
            ].
1893
6456c11a1307 View -> ApplicationSubView
tm
parents: 1856
diff changeset
   357
        ].
6456c11a1307 View -> ApplicationSubView
tm
parents: 1856
diff changeset
   358
6456c11a1307 View -> ApplicationSubView
tm
parents: 1856
diff changeset
   359
        clientView isNil ifTrue:[
1895
a1b2502c91d7 went back halfway to the old behavior,
Claus Gittinger <cg@exept.de>
parents: 1894
diff changeset
   360
            useApplicationSubView ifTrue:[
a1b2502c91d7 went back halfway to the old behavior,
Claus Gittinger <cg@exept.de>
parents: 1894
diff changeset
   361
                clientView := ApplicationSubView new.
a1b2502c91d7 went back halfway to the old behavior,
Claus Gittinger <cg@exept.de>
parents: 1894
diff changeset
   362
                clientView application:client.
a1b2502c91d7 went back halfway to the old behavior,
Claus Gittinger <cg@exept.de>
parents: 1894
diff changeset
   363
            ] ifFalse:[
a1b2502c91d7 went back halfway to the old behavior,
Claus Gittinger <cg@exept.de>
parents: 1894
diff changeset
   364
                clientView := View new.
a1b2502c91d7 went back halfway to the old behavior,
Claus Gittinger <cg@exept.de>
parents: 1894
diff changeset
   365
            ]
1893
6456c11a1307 View -> ApplicationSubView
tm
parents: 1856
diff changeset
   366
        ].
6456c11a1307 View -> ApplicationSubView
tm
parents: 1856
diff changeset
   367
1584
f020416e00ae LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents: 1577
diff changeset
   368
        savedView := builder window.
f020416e00ae LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents: 1577
diff changeset
   369
        builder window:clientView.
1895
a1b2502c91d7 went back halfway to the old behavior,
Claus Gittinger <cg@exept.de>
parents: 1894
diff changeset
   370
        useOwnBuilder ifTrue:[
a1b2502c91d7 went back halfway to the old behavior,
Claus Gittinger <cg@exept.de>
parents: 1894
diff changeset
   371
            savedBuilder := client builder.
a1b2502c91d7 went back halfway to the old behavior,
Claus Gittinger <cg@exept.de>
parents: 1894
diff changeset
   372
            client builder:builder.
a1b2502c91d7 went back halfway to the old behavior,
Claus Gittinger <cg@exept.de>
parents: 1894
diff changeset
   373
        ].
a1b2502c91d7 went back halfway to the old behavior,
Claus Gittinger <cg@exept.de>
parents: 1894
diff changeset
   374
1584
f020416e00ae LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents: 1577
diff changeset
   375
        [
1905
20ff18462cc6 care for keepClientView setting
tm
parents: 1895
diff changeset
   376
1584
f020416e00ae LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents: 1577
diff changeset
   377
            client buildSubCanvas:subSpec withBuilder:builder.
1905
20ff18462cc6 care for keepClientView setting
tm
parents: 1895
diff changeset
   378
            keepClientView ifFalse:[    
20ff18462cc6 care for keepClientView setting
tm
parents: 1895
diff changeset
   379
                (scrolledView notNil and:[clientView isSubViewOf:scrolledView]) ifTrue:[
1906
0b64cfae3419 checkin from browser
tm
parents: 1905
diff changeset
   380
                    self error:'this should not happen'
1905
20ff18462cc6 care for keepClientView setting
tm
parents: 1895
diff changeset
   381
                ] ifFalse:[
20ff18462cc6 care for keepClientView setting
tm
parents: 1895
diff changeset
   382
                    self scrolledView:clientView.
20ff18462cc6 care for keepClientView setting
tm
parents: 1895
diff changeset
   383
                ]
1907
e8efd065dc2b oops - clientView again
Claus Gittinger <cg@exept.de>
parents: 1906
diff changeset
   384
            ] ifTrue:[
e8efd065dc2b oops - clientView again
Claus Gittinger <cg@exept.de>
parents: 1906
diff changeset
   385
                (clientView isSubViewOf:self) ifFalse:[
e8efd065dc2b oops - clientView again
Claus Gittinger <cg@exept.de>
parents: 1906
diff changeset
   386
                    self scrolledView:clientView.
e8efd065dc2b oops - clientView again
Claus Gittinger <cg@exept.de>
parents: 1906
diff changeset
   387
                ]
1905
20ff18462cc6 care for keepClientView setting
tm
parents: 1895
diff changeset
   388
            ]
1584
f020416e00ae LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents: 1577
diff changeset
   389
        ] valueNowOrOnUnwindDo:[
1662
b5ab432da3b9 subApp-channel support;
Claus Gittinger <cg@exept.de>
parents: 1584
diff changeset
   390
            savedView notNil ifTrue:[
b5ab432da3b9 subApp-channel support;
Claus Gittinger <cg@exept.de>
parents: 1584
diff changeset
   391
                builder window:savedView.
1893
6456c11a1307 View -> ApplicationSubView
tm
parents: 1856
diff changeset
   392
            ].
1895
a1b2502c91d7 went back halfway to the old behavior,
Claus Gittinger <cg@exept.de>
parents: 1894
diff changeset
   393
            useOwnBuilder ifTrue:[
a1b2502c91d7 went back halfway to the old behavior,
Claus Gittinger <cg@exept.de>
parents: 1894
diff changeset
   394
                savedBuilder notNil ifTrue:[
a1b2502c91d7 went back halfway to the old behavior,
Claus Gittinger <cg@exept.de>
parents: 1894
diff changeset
   395
                    client builder:savedBuilder.
a1b2502c91d7 went back halfway to the old behavior,
Claus Gittinger <cg@exept.de>
parents: 1894
diff changeset
   396
                ]
1662
b5ab432da3b9 subApp-channel support;
Claus Gittinger <cg@exept.de>
parents: 1584
diff changeset
   397
            ]
1584
f020416e00ae LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents: 1577
diff changeset
   398
        ].
1893
6456c11a1307 View -> ApplicationSubView
tm
parents: 1856
diff changeset
   399
1664
a8b97314f813 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1662
diff changeset
   400
        clientViewIsScrolled ifTrue:[
1584
f020416e00ae LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents: 1577
diff changeset
   401
            clientView extent:((subSpec window layout) ? (subSpec window bounds)) extent.
1664
a8b97314f813 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1662
diff changeset
   402
        ].
1584
f020416e00ae LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents: 1577
diff changeset
   403
f020416e00ae LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents: 1577
diff changeset
   404
        self realized ifTrue:[
f020416e00ae LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents: 1577
diff changeset
   405
            clientView realizeAllSubViews
1662
b5ab432da3b9 subApp-channel support;
Claus Gittinger <cg@exept.de>
parents: 1584
diff changeset
   406
        ].
1584
f020416e00ae LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents: 1577
diff changeset
   407
    ]
f020416e00ae LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents: 1577
diff changeset
   408
1662
b5ab432da3b9 subApp-channel support;
Claus Gittinger <cg@exept.de>
parents: 1584
diff changeset
   409
    "Modified: / 30.1.2000 / 21:36:40 / cg"
1584
f020416e00ae LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents: 1577
diff changeset
   410
!
f020416e00ae LetterPrinter now works, after changing #rebuild.
Stefan Vogel <sv@exept.de>
parents: 1577
diff changeset
   411
503
0a3ef2d34d9d add application holder
ca
parents: 455
diff changeset
   412
releaseAllComponents
1412
b426fae6edcf fix ViewScroller in scrolledView
tm
parents: 1383
diff changeset
   413
    clientView destroySubViews.
503
0a3ef2d34d9d add application holder
ca
parents: 455
diff changeset
   414
    builder := nil.
0a3ef2d34d9d add application holder
ca
parents: 455
diff changeset
   415
    spec    := nil.
0a3ef2d34d9d add application holder
ca
parents: 455
diff changeset
   416
    client  := nil.
1662
b5ab432da3b9 subApp-channel support;
Claus Gittinger <cg@exept.de>
parents: 1584
diff changeset
   417
b5ab432da3b9 subApp-channel support;
Claus Gittinger <cg@exept.de>
parents: 1584
diff changeset
   418
    "Modified: / 31.1.2000 / 16:56:14 / cg"
503
0a3ef2d34d9d add application holder
ca
parents: 455
diff changeset
   419
! !
0a3ef2d34d9d add application holder
ca
parents: 455
diff changeset
   420
0a3ef2d34d9d add application holder
ca
parents: 455
diff changeset
   421
!SubCanvas methodsFor:'change & update'!
0a3ef2d34d9d add application holder
ca
parents: 455
diff changeset
   422
0a3ef2d34d9d add application holder
ca
parents: 455
diff changeset
   423
update:something with:aParameter from:changedObject
0a3ef2d34d9d add application holder
ca
parents: 455
diff changeset
   424
    "one of my models changed its value
0a3ef2d34d9d add application holder
ca
parents: 455
diff changeset
   425
    "
557
7cf5f021983d add method:
ca
parents: 554
diff changeset
   426
    (changedObject == clientHolder or:[changedObject == specHolder]) ifTrue:[
7cf5f021983d add method:
ca
parents: 554
diff changeset
   427
        self updateFromChannels
7cf5f021983d add method:
ca
parents: 554
diff changeset
   428
    ] ifFalse:[
7cf5f021983d add method:
ca
parents: 554
diff changeset
   429
        super update:something with:aParameter from:changedObject.
7cf5f021983d add method:
ca
parents: 554
diff changeset
   430
    ]
7cf5f021983d add method:
ca
parents: 554
diff changeset
   431
7cf5f021983d add method:
ca
parents: 554
diff changeset
   432
!
7cf5f021983d add method:
ca
parents: 554
diff changeset
   433
7cf5f021983d add method:
ca
parents: 554
diff changeset
   434
updateFromChannels
7cf5f021983d add method:
ca
parents: 554
diff changeset
   435
    "update canvas from channel
7cf5f021983d add method:
ca
parents: 554
diff changeset
   436
    "
7cf5f021983d add method:
ca
parents: 554
diff changeset
   437
    |client spec|
7cf5f021983d add method:
ca
parents: 554
diff changeset
   438
7cf5f021983d add method:
ca
parents: 554
diff changeset
   439
    clientHolder isNil ifTrue:[
7cf5f021983d add method:
ca
parents: 554
diff changeset
   440
        client := self application
7cf5f021983d add method:
ca
parents: 554
diff changeset
   441
    ] ifFalse:[
7cf5f021983d add method:
ca
parents: 554
diff changeset
   442
        client := clientHolder value
554
c32ed45bfc6e bug fixes for spec derived from channel
ca
parents: 553
diff changeset
   443
    ].
503
0a3ef2d34d9d add application holder
ca
parents: 455
diff changeset
   444
557
7cf5f021983d add method:
ca
parents: 554
diff changeset
   445
    specHolder isNil ifTrue:[
7cf5f021983d add method:
ca
parents: 554
diff changeset
   446
        spec := #windowSpec
7cf5f021983d add method:
ca
parents: 554
diff changeset
   447
    ] ifFalse:[
7cf5f021983d add method:
ca
parents: 554
diff changeset
   448
        spec := specHolder value
7cf5f021983d add method:
ca
parents: 554
diff changeset
   449
    ].
7cf5f021983d add method:
ca
parents: 554
diff changeset
   450
    (client notNil and:[spec notNil]) ifTrue:[
7cf5f021983d add method:
ca
parents: 554
diff changeset
   451
    ] ifFalse:[
1467
2d85bd1a8267 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1450
diff changeset
   452
"/        spec notNil ifTrue:[
2d85bd1a8267 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1450
diff changeset
   453
"/            self halt:'spec but no app'.
2d85bd1a8267 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1450
diff changeset
   454
"/        ].
1894
f0469313b9f8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1893
diff changeset
   455
        client := nil.
f0469313b9f8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1893
diff changeset
   456
        spec := #windowSpec.  "/ is that true ?
f0469313b9f8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1893
diff changeset
   457
    ].
1905
20ff18462cc6 care for keepClientView setting
tm
parents: 1895
diff changeset
   458
1894
f0469313b9f8 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1893
diff changeset
   459
    self client:client spec:spec builder:nil
503
0a3ef2d34d9d add application holder
ca
parents: 455
diff changeset
   460
1467
2d85bd1a8267 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1450
diff changeset
   461
    "Modified: / 5.8.1999 / 13:35:26 / cg"
503
0a3ef2d34d9d add application holder
ca
parents: 455
diff changeset
   462
! !
0a3ef2d34d9d add application holder
ca
parents: 455
diff changeset
   463
0a3ef2d34d9d add application holder
ca
parents: 455
diff changeset
   464
!SubCanvas methodsFor:'initialization'!
0a3ef2d34d9d add application holder
ca
parents: 455
diff changeset
   465
609
ad75d5f13ca1 implement destroy:
ca
parents: 557
diff changeset
   466
destroy
1471
09a5803325e4 when destroying or changing the client, release as subApp
Claus Gittinger <cg@exept.de>
parents: 1467
diff changeset
   467
    client notNil ifTrue:[
1702
ff202e263b9d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1686
diff changeset
   468
        client == self application ifTrue:[
ff202e263b9d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1686
diff changeset
   469
            client releaseAsSubCanvas.
ff202e263b9d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1686
diff changeset
   470
        ] ifFalse:[
ff202e263b9d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1686
diff changeset
   471
            client release
ff202e263b9d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1686
diff changeset
   472
        ].
1471
09a5803325e4 when destroying or changing the client, release as subApp
Claus Gittinger <cg@exept.de>
parents: 1467
diff changeset
   473
    ].
09a5803325e4 when destroying or changing the client, release as subApp
Claus Gittinger <cg@exept.de>
parents: 1467
diff changeset
   474
609
ad75d5f13ca1 implement destroy:
ca
parents: 557
diff changeset
   475
    clientHolder notNil ifTrue:[
ad75d5f13ca1 implement destroy:
ca
parents: 557
diff changeset
   476
        clientHolder removeDependent:self.
ad75d5f13ca1 implement destroy:
ca
parents: 557
diff changeset
   477
        clientHolder := nil.
ad75d5f13ca1 implement destroy:
ca
parents: 557
diff changeset
   478
    ].
ad75d5f13ca1 implement destroy:
ca
parents: 557
diff changeset
   479
    specHolder notNil ifTrue:[
ad75d5f13ca1 implement destroy:
ca
parents: 557
diff changeset
   480
        specHolder removeDependent:self.
ad75d5f13ca1 implement destroy:
ca
parents: 557
diff changeset
   481
        specHolder := nil.
ad75d5f13ca1 implement destroy:
ca
parents: 557
diff changeset
   482
    ].
ad75d5f13ca1 implement destroy:
ca
parents: 557
diff changeset
   483
    super destroy.
1702
ff202e263b9d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1686
diff changeset
   484
ff202e263b9d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1686
diff changeset
   485
    "Modified: / 13.2.2000 / 23:31:12 / cg"
609
ad75d5f13ca1 implement destroy:
ca
parents: 557
diff changeset
   486
!
ad75d5f13ca1 implement destroy:
ca
parents: 557
diff changeset
   487
503
0a3ef2d34d9d add application holder
ca
parents: 455
diff changeset
   488
initialize
1412
b426fae6edcf fix ViewScroller in scrolledView
tm
parents: 1383
diff changeset
   489
503
0a3ef2d34d9d add application holder
ca
parents: 455
diff changeset
   490
    super initialize.
1893
6456c11a1307 View -> ApplicationSubView
tm
parents: 1856
diff changeset
   491
"/    self scrolledView:(clientView := ApplicationSubView new).
1412
b426fae6edcf fix ViewScroller in scrolledView
tm
parents: 1383
diff changeset
   492
    clientViewIsScrolled := false.
b426fae6edcf fix ViewScroller in scrolledView
tm
parents: 1383
diff changeset
   493
1895
a1b2502c91d7 went back halfway to the old behavior,
Claus Gittinger <cg@exept.de>
parents: 1894
diff changeset
   494
    "/ these defaults make subCanvas compatible with VW;
a1b2502c91d7 went back halfway to the old behavior,
Claus Gittinger <cg@exept.de>
parents: 1894
diff changeset
   495
    "/ however, they make our life difficult sometimes.
a1b2502c91d7 went back halfway to the old behavior,
Claus Gittinger <cg@exept.de>
parents: 1894
diff changeset
   496
    keepClientView := true.
a1b2502c91d7 went back halfway to the old behavior,
Claus Gittinger <cg@exept.de>
parents: 1894
diff changeset
   497
    useApplicationSubView := false.
a1b2502c91d7 went back halfway to the old behavior,
Claus Gittinger <cg@exept.de>
parents: 1894
diff changeset
   498
    useOwnBuilder := false.
a1b2502c91d7 went back halfway to the old behavior,
Claus Gittinger <cg@exept.de>
parents: 1894
diff changeset
   499
503
0a3ef2d34d9d add application holder
ca
parents: 455
diff changeset
   500
    spec := #windowSpec.
1662
b5ab432da3b9 subApp-channel support;
Claus Gittinger <cg@exept.de>
parents: 1584
diff changeset
   501
b5ab432da3b9 subApp-channel support;
Claus Gittinger <cg@exept.de>
parents: 1584
diff changeset
   502
    "Modified: / 31.1.2000 / 16:56:31 / cg"
503
0a3ef2d34d9d add application holder
ca
parents: 455
diff changeset
   503
! !
0a3ef2d34d9d add application holder
ca
parents: 455
diff changeset
   504
1720
d855968ce342 redefine margin computations (avoid margin if subcanvas does not scroll).
Claus Gittinger <cg@exept.de>
parents: 1702
diff changeset
   505
!SubCanvas methodsFor:'layout'!
d855968ce342 redefine margin computations (avoid margin if subcanvas does not scroll).
Claus Gittinger <cg@exept.de>
parents: 1702
diff changeset
   506
d855968ce342 redefine margin computations (avoid margin if subcanvas does not scroll).
Claus Gittinger <cg@exept.de>
parents: 1702
diff changeset
   507
usedScrolledViewHMarginWhenHasV:hasV andHasH:hasH
d855968ce342 redefine margin computations (avoid margin if subcanvas does not scroll).
Claus Gittinger <cg@exept.de>
parents: 1702
diff changeset
   508
    "return the horizontal margin around (outer margin).
d855968ce342 redefine margin computations (avoid margin if subcanvas does not scroll).
Claus Gittinger <cg@exept.de>
parents: 1702
diff changeset
   509
     Redefined to avoid margin when no scrollers are present"
d855968ce342 redefine margin computations (avoid margin if subcanvas does not scroll).
Claus Gittinger <cg@exept.de>
parents: 1702
diff changeset
   510
d855968ce342 redefine margin computations (avoid margin if subcanvas does not scroll).
Claus Gittinger <cg@exept.de>
parents: 1702
diff changeset
   511
    ^ (hasV or:[hasH]) ifTrue:[scrolledViewHMargin] ifFalse:[0]
d855968ce342 redefine margin computations (avoid margin if subcanvas does not scroll).
Claus Gittinger <cg@exept.de>
parents: 1702
diff changeset
   512
d855968ce342 redefine margin computations (avoid margin if subcanvas does not scroll).
Claus Gittinger <cg@exept.de>
parents: 1702
diff changeset
   513
d855968ce342 redefine margin computations (avoid margin if subcanvas does not scroll).
Claus Gittinger <cg@exept.de>
parents: 1702
diff changeset
   514
!
d855968ce342 redefine margin computations (avoid margin if subcanvas does not scroll).
Claus Gittinger <cg@exept.de>
parents: 1702
diff changeset
   515
d855968ce342 redefine margin computations (avoid margin if subcanvas does not scroll).
Claus Gittinger <cg@exept.de>
parents: 1702
diff changeset
   516
usedScrolledViewVMarginWhenHasV:hasV andHasH:hasH
d855968ce342 redefine margin computations (avoid margin if subcanvas does not scroll).
Claus Gittinger <cg@exept.de>
parents: 1702
diff changeset
   517
    "return the horizontal margin around (outer margin).
d855968ce342 redefine margin computations (avoid margin if subcanvas does not scroll).
Claus Gittinger <cg@exept.de>
parents: 1702
diff changeset
   518
     Redefined to avoid margin when no scrollers are present"
d855968ce342 redefine margin computations (avoid margin if subcanvas does not scroll).
Claus Gittinger <cg@exept.de>
parents: 1702
diff changeset
   519
d855968ce342 redefine margin computations (avoid margin if subcanvas does not scroll).
Claus Gittinger <cg@exept.de>
parents: 1702
diff changeset
   520
    ^ (hasV or:[hasH]) ifTrue:[scrolledViewVMargin] ifFalse:[0]
d855968ce342 redefine margin computations (avoid margin if subcanvas does not scroll).
Claus Gittinger <cg@exept.de>
parents: 1702
diff changeset
   521
d855968ce342 redefine margin computations (avoid margin if subcanvas does not scroll).
Claus Gittinger <cg@exept.de>
parents: 1702
diff changeset
   522
d855968ce342 redefine margin computations (avoid margin if subcanvas does not scroll).
Claus Gittinger <cg@exept.de>
parents: 1702
diff changeset
   523
! !
d855968ce342 redefine margin computations (avoid margin if subcanvas does not scroll).
Claus Gittinger <cg@exept.de>
parents: 1702
diff changeset
   524
503
0a3ef2d34d9d add application holder
ca
parents: 455
diff changeset
   525
!SubCanvas methodsFor:'queries'!
0a3ef2d34d9d add application holder
ca
parents: 455
diff changeset
   526
0a3ef2d34d9d add application holder
ca
parents: 455
diff changeset
   527
application
0a3ef2d34d9d add application holder
ca
parents: 455
diff changeset
   528
    "return the application, under which this view was opened,
0a3ef2d34d9d add application holder
ca
parents: 455
diff changeset
   529
    "
0a3ef2d34d9d add application holder
ca
parents: 455
diff changeset
   530
0a3ef2d34d9d add application holder
ca
parents: 455
diff changeset
   531
    client notNil ifTrue:[
0a3ef2d34d9d add application holder
ca
parents: 455
diff changeset
   532
        ^ client
455
860d66c9f047 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   533
    ].
503
0a3ef2d34d9d add application holder
ca
parents: 455
diff changeset
   534
    ^ super application
0a3ef2d34d9d add application holder
ca
parents: 455
diff changeset
   535
455
860d66c9f047 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   536
! !
860d66c9f047 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   537
860d66c9f047 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   538
!SubCanvas class methodsFor:'documentation'!
860d66c9f047 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   539
860d66c9f047 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   540
version
1907
e8efd065dc2b oops - clientView again
Claus Gittinger <cg@exept.de>
parents: 1906
diff changeset
   541
    ^ '$Header: /cvs/stx/stx/libwidg2/SubCanvas.st,v 1.34 2000-12-15 16:41:36 cg Exp $'
455
860d66c9f047 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   542
! !