UIBuilder.st
author Claus Gittinger <cg@exept.de>
Wed, 21 Dec 2005 17:42:22 +0100
changeset 2071 9be6a5197cec
parent 1970 0becfc45c6cb
child 2083 e49e0761e827
permissions -rw-r--r--
*** empty log message ***
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
88
claus
parents: 86
diff changeset
     1
"
claus
parents: 86
diff changeset
     2
 COPYRIGHT (c) 1995 by Claus Gittinger
734
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
     3
              All Rights Reserved
88
claus
parents: 86
diff changeset
     4
claus
parents: 86
diff changeset
     5
 This software is furnished under a license and may be used
claus
parents: 86
diff changeset
     6
 only in accordance with the terms of that license and with the
claus
parents: 86
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
claus
parents: 86
diff changeset
     8
 be provided or otherwise made available to, or used by, any
claus
parents: 86
diff changeset
     9
 other person.  No title to or ownership of the software is
claus
parents: 86
diff changeset
    10
 hereby transferred.
claus
parents: 86
diff changeset
    11
"
claus
parents: 86
diff changeset
    12
1389
a25d0cb347cf category only
Claus Gittinger <cg@exept.de>
parents: 1359
diff changeset
    13
"{ Package: 'stx:libview2' }"
a25d0cb347cf category only
Claus Gittinger <cg@exept.de>
parents: 1359
diff changeset
    14
100
claus
parents: 96
diff changeset
    15
WindowBuilder subclass:#UIBuilder
734
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
    16
	instanceVariableNames:'view currentMenuSelector spec specStack composite lastComponent
1324
090574a07b89 added isSubBuilder flag
Claus Gittinger <cg@exept.de>
parents: 1309
diff changeset
    17
		compositeView menuBar isEditing showDefaults isSubBuilder'
1032
e2069e722736 move Verbose up
Claus Gittinger <cg@exept.de>
parents: 965
diff changeset
    18
	classVariableNames:''
223
b65dc250db8d documentation
Claus Gittinger <cg@exept.de>
parents: 139
diff changeset
    19
	poolDictionaries:''
b65dc250db8d documentation
Claus Gittinger <cg@exept.de>
parents: 139
diff changeset
    20
	category:'Interface-Support-UI'
66
claus
parents:
diff changeset
    21
!
claus
parents:
diff changeset
    22
claus
parents:
diff changeset
    23
!UIBuilder class methodsFor:'documentation'!
claus
parents:
diff changeset
    24
125
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
    25
copyright
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
    26
"
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
    27
 COPYRIGHT (c) 1995 by Claus Gittinger
734
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
    28
              All Rights Reserved
125
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
    29
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
    30
 This software is furnished under a license and may be used
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
    31
 only in accordance with the terms of that license and with the
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
    32
 inclusion of the above copyright notice.   This software may not
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
    33
 be provided or otherwise made available to, or used by, any
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
    34
 other person.  No title to or ownership of the software is
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
    35
 hereby transferred.
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
    36
"
88
claus
parents: 86
diff changeset
    37
!
claus
parents: 86
diff changeset
    38
66
claus
parents:
diff changeset
    39
documentation
claus
parents:
diff changeset
    40
"
775
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
    41
    this class allows parsing windowSpecs as created by ST/X's
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
    42
    UIPainter and should be able to handle most of ST-80's specs.
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
    43
    (and thereby allow to run applications built with this tool).
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
    44
    However, it is not guaranteed that all of ST-80's winSpecs are understood.
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
    45
734
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
    46
    It also provides some rudimentary support for building interfaces
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
    47
    programatically, by using #newComposite .. #add: .. #endComposite.
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
    48
    This has been added for ST80-compatibility - we do not recommend using
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
    49
    that for new ST/X programs.
775
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
    50
    Those were added to allow execution of some PD applications.
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
    51
    The programatic building protocol is not complete and certainly not bug free.
223
b65dc250db8d documentation
Claus Gittinger <cg@exept.de>
parents: 139
diff changeset
    52
373
66283cb455bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 372
diff changeset
    53
    Notice: 
775
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
    54
        some of this class was implemented using protocol information
734
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
    55
        from alpha testers, literature and by reading public domain code
373
66283cb455bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 372
diff changeset
    56
        - it may not be complete or compatible to
66283cb455bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 372
diff changeset
    57
        the corresponding ST-80 class. 
66283cb455bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 372
diff changeset
    58
        If you encounter any incompatibilities, please forward a note 
66283cb455bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 372
diff changeset
    59
        describing the incompatibility verbal (i.e. no code) to the ST/X team.
66283cb455bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 372
diff changeset
    60
775
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
    61
    [instance variables:]
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
    62
        view                    <View>  
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
    63
                                        temporary - holds the view being built
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
    64
                                        when creating components using the 
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
    65
                                        programmatic building interface.
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
    66
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
    67
        currentMenuSelector             not yet used
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
    68
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
    69
        spec                    <UISpec>        
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
    70
                                        temporary - holds the spec being parsed
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
    71
                                        when creating components using the 
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
    72
                                        programmatic building interface.
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
    73
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
    74
        specStack               <Collection>
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
    75
                                        temporary - holds the spec-stack when
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
    76
                                        creating composites using newComposite/
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
    77
                                        endComposite,
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
    78
                                        while creating components using the 
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
    79
                                        programmatic building interface.
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
    80
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
    81
        composite               <SpecCollection>
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
    82
                                        temporary - holds the current composite
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
    83
                                        when using newComposite/ endComposite,
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
    84
                                        while creating components using the 
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
    85
                                        programmatic building interface.
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
    86
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
    87
        lastComponent           <View>
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
    88
                                        temporary - holds the last component
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
    89
                                        being built,
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
    90
                                        when creating components using the 
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
    91
                                        programmatic building interface.
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
    92
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
    93
        compositeView           <View>
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
    94
                                        temporary - holds the current composites
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
    95
                                        view, when creating components using the 
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
    96
                                        programmatic building interface.
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
    97
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
    98
        menuBar                         not yet used
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
    99
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
   100
        isEditing               <Boolean>
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
   101
                                        flag which is set when an interface is built
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
   102
                                        by the UIPainter (as opposed to being built
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
   103
                                        for the application).
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
   104
                                        Changes the way aspects are aquired,
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
   105
                                        (actually, no models are created/set)
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
   106
                                        to prevent false building when no
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
   107
                                        real applicationModel is present.
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
   108
                                        (as is the case when the painter builds
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
   109
                                        components).
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
   110
223
b65dc250db8d documentation
Claus Gittinger <cg@exept.de>
parents: 139
diff changeset
   111
    [author:]
b65dc250db8d documentation
Claus Gittinger <cg@exept.de>
parents: 139
diff changeset
   112
        Claus Gittinger
66
claus
parents:
diff changeset
   113
"
claus
parents:
diff changeset
   114
! !
claus
parents:
diff changeset
   115
claus
parents:
diff changeset
   116
!UIBuilder class methodsFor:'initialization'!
claus
parents:
diff changeset
   117
claus
parents:
diff changeset
   118
initialize
claus
parents:
diff changeset
   119
    Verbose := false    "/ debugging flag
claus
parents:
diff changeset
   120
! !
claus
parents:
diff changeset
   121
1763
fabe0b506e33 method category rename
Claus Gittinger <cg@exept.de>
parents: 1498
diff changeset
   122
!UIBuilder methodsFor:'Compatibility-VW'!
734
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   123
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   124
wrapper
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   125
    "ST/X has no wrappers - return the view here"
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   126
1207
5ca42a599a49 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1204
diff changeset
   127
    ^ view ? window
734
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   128
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   129
    "Created: / 3.3.1997 / 18:28:31 / cg"
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   130
    "Modified: / 31.10.1997 / 18:42:52 / cg"
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   131
! !
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   132
86
claus
parents: 80
diff changeset
   133
!UIBuilder methodsFor:'accessing'!
claus
parents: 80
diff changeset
   134
751
56a83a3b210c add isEditing; set to true if running UIPainter
ca
parents: 734
diff changeset
   135
isEditing
56a83a3b210c add isEditing; set to true if running UIPainter
ca
parents: 734
diff changeset
   136
    "true if build from a GUI builder resource ( UIPainter, ... ); if true, no
56a83a3b210c add isEditing; set to true if running UIPainter
ca
parents: 734
diff changeset
   137
     models or actions should be set (no application is running)
56a83a3b210c add isEditing; set to true if running UIPainter
ca
parents: 734
diff changeset
   138
    "
56a83a3b210c add isEditing; set to true if running UIPainter
ca
parents: 734
diff changeset
   139
    ^ isEditing ? false
56a83a3b210c add isEditing; set to true if running UIPainter
ca
parents: 734
diff changeset
   140
!
56a83a3b210c add isEditing; set to true if running UIPainter
ca
parents: 734
diff changeset
   141
56a83a3b210c add isEditing; set to true if running UIPainter
ca
parents: 734
diff changeset
   142
isEditing:aState
56a83a3b210c add isEditing; set to true if running UIPainter
ca
parents: 734
diff changeset
   143
    "true if build from a GUI builder resource ( UIPainter, ... ); if true, no
56a83a3b210c add isEditing; set to true if running UIPainter
ca
parents: 734
diff changeset
   144
     models or actions should be set (no application is running)
56a83a3b210c add isEditing; set to true if running UIPainter
ca
parents: 734
diff changeset
   145
    "
56a83a3b210c add isEditing; set to true if running UIPainter
ca
parents: 734
diff changeset
   146
    isEditing := aState
56a83a3b210c add isEditing; set to true if running UIPainter
ca
parents: 734
diff changeset
   147
!
56a83a3b210c add isEditing; set to true if running UIPainter
ca
parents: 734
diff changeset
   148
1324
090574a07b89 added isSubBuilder flag
Claus Gittinger <cg@exept.de>
parents: 1309
diff changeset
   149
isSubBuilder
1325
dc5d9250e865 comments
Claus Gittinger <cg@exept.de>
parents: 1324
diff changeset
   150
    "return true, if this uiBuilder is for a subCanvas (i.e. a subApp)
dc5d9250e865 comments
Claus Gittinger <cg@exept.de>
parents: 1324
diff changeset
   151
     as opposed to a topApp builder"
dc5d9250e865 comments
Claus Gittinger <cg@exept.de>
parents: 1324
diff changeset
   152
1324
090574a07b89 added isSubBuilder flag
Claus Gittinger <cg@exept.de>
parents: 1309
diff changeset
   153
    ^ isSubBuilder ? false
090574a07b89 added isSubBuilder flag
Claus Gittinger <cg@exept.de>
parents: 1309
diff changeset
   154
090574a07b89 added isSubBuilder flag
Claus Gittinger <cg@exept.de>
parents: 1309
diff changeset
   155
    "Created: / 29.1.2000 / 16:31:31 / cg"
1325
dc5d9250e865 comments
Claus Gittinger <cg@exept.de>
parents: 1324
diff changeset
   156
    "Modified: / 31.1.2000 / 15:03:09 / cg"
1324
090574a07b89 added isSubBuilder flag
Claus Gittinger <cg@exept.de>
parents: 1309
diff changeset
   157
!
090574a07b89 added isSubBuilder flag
Claus Gittinger <cg@exept.de>
parents: 1309
diff changeset
   158
090574a07b89 added isSubBuilder flag
Claus Gittinger <cg@exept.de>
parents: 1309
diff changeset
   159
isSubBuilder:aBoolean
1325
dc5d9250e865 comments
Claus Gittinger <cg@exept.de>
parents: 1324
diff changeset
   160
    "set/clear the flag, which states that this uiBuilder is for a subCanvas (i.e. a subApp)
dc5d9250e865 comments
Claus Gittinger <cg@exept.de>
parents: 1324
diff changeset
   161
     as opposed to a topApp builder. The default is false."
dc5d9250e865 comments
Claus Gittinger <cg@exept.de>
parents: 1324
diff changeset
   162
1324
090574a07b89 added isSubBuilder flag
Claus Gittinger <cg@exept.de>
parents: 1309
diff changeset
   163
    isSubBuilder := aBoolean
090574a07b89 added isSubBuilder flag
Claus Gittinger <cg@exept.de>
parents: 1309
diff changeset
   164
090574a07b89 added isSubBuilder flag
Claus Gittinger <cg@exept.de>
parents: 1309
diff changeset
   165
    "Created: / 29.1.2000 / 16:31:19 / cg"
1325
dc5d9250e865 comments
Claus Gittinger <cg@exept.de>
parents: 1324
diff changeset
   166
    "Modified: / 31.1.2000 / 15:03:37 / cg"
1324
090574a07b89 added isSubBuilder flag
Claus Gittinger <cg@exept.de>
parents: 1309
diff changeset
   167
!
090574a07b89 added isSubBuilder flag
Claus Gittinger <cg@exept.de>
parents: 1309
diff changeset
   168
721
1889d708a951 provide a handle to the applications menuBar
Claus Gittinger <cg@exept.de>
parents: 667
diff changeset
   169
menuBar
1889d708a951 provide a handle to the applications menuBar
Claus Gittinger <cg@exept.de>
parents: 667
diff changeset
   170
    "return the value of the instance variable 'menuBar' (automatically generated)"
1889d708a951 provide a handle to the applications menuBar
Claus Gittinger <cg@exept.de>
parents: 667
diff changeset
   171
1889d708a951 provide a handle to the applications menuBar
Claus Gittinger <cg@exept.de>
parents: 667
diff changeset
   172
    ^ menuBar
1889d708a951 provide a handle to the applications menuBar
Claus Gittinger <cg@exept.de>
parents: 667
diff changeset
   173
1889d708a951 provide a handle to the applications menuBar
Claus Gittinger <cg@exept.de>
parents: 667
diff changeset
   174
    "Created: / 27.10.1997 / 16:30:12 / cg"
1889d708a951 provide a handle to the applications menuBar
Claus Gittinger <cg@exept.de>
parents: 667
diff changeset
   175
!
1889d708a951 provide a handle to the applications menuBar
Claus Gittinger <cg@exept.de>
parents: 667
diff changeset
   176
1889d708a951 provide a handle to the applications menuBar
Claus Gittinger <cg@exept.de>
parents: 667
diff changeset
   177
menuBar:something
1889d708a951 provide a handle to the applications menuBar
Claus Gittinger <cg@exept.de>
parents: 667
diff changeset
   178
    "set the value of the instance variable 'menuBar' (automatically generated)"
1889d708a951 provide a handle to the applications menuBar
Claus Gittinger <cg@exept.de>
parents: 667
diff changeset
   179
1889d708a951 provide a handle to the applications menuBar
Claus Gittinger <cg@exept.de>
parents: 667
diff changeset
   180
    menuBar := something.
1246
48f23f3ffb28 delegate menuBar to keyboardProcessor
ca
parents: 1207
diff changeset
   181
    self keyboardProcessor menuBar:menuBar.
721
1889d708a951 provide a handle to the applications menuBar
Claus Gittinger <cg@exept.de>
parents: 667
diff changeset
   182
1889d708a951 provide a handle to the applications menuBar
Claus Gittinger <cg@exept.de>
parents: 667
diff changeset
   183
    "Created: / 27.10.1997 / 16:30:13 / cg"
863
8e7411aa5697 show defaults widgets for the UISelectionPanel
tz
parents: 854
diff changeset
   184
!
8e7411aa5697 show defaults widgets for the UISelectionPanel
tz
parents: 854
diff changeset
   185
8e7411aa5697 show defaults widgets for the UISelectionPanel
tz
parents: 854
diff changeset
   186
showDefaults
8e7411aa5697 show defaults widgets for the UISelectionPanel
tz
parents: 854
diff changeset
   187
    "returns true if the builder is in editing mode and the building
8e7411aa5697 show defaults widgets for the UISelectionPanel
tz
parents: 854
diff changeset
   188
     components will build a default contents
8e7411aa5697 show defaults widgets for the UISelectionPanel
tz
parents: 854
diff changeset
   189
    "
8e7411aa5697 show defaults widgets for the UISelectionPanel
tz
parents: 854
diff changeset
   190
    self isEditing ifTrue:[
8e7411aa5697 show defaults widgets for the UISelectionPanel
tz
parents: 854
diff changeset
   191
        ^ showDefaults ? false
8e7411aa5697 show defaults widgets for the UISelectionPanel
tz
parents: 854
diff changeset
   192
    ].
8e7411aa5697 show defaults widgets for the UISelectionPanel
tz
parents: 854
diff changeset
   193
    ^ false
8e7411aa5697 show defaults widgets for the UISelectionPanel
tz
parents: 854
diff changeset
   194
8e7411aa5697 show defaults widgets for the UISelectionPanel
tz
parents: 854
diff changeset
   195
!
8e7411aa5697 show defaults widgets for the UISelectionPanel
tz
parents: 854
diff changeset
   196
8e7411aa5697 show defaults widgets for the UISelectionPanel
tz
parents: 854
diff changeset
   197
showDefaults:aBool
8e7411aa5697 show defaults widgets for the UISelectionPanel
tz
parents: 854
diff changeset
   198
    "true if the builder is in editing mode and the building
8e7411aa5697 show defaults widgets for the UISelectionPanel
tz
parents: 854
diff changeset
   199
     components will build a default contents
8e7411aa5697 show defaults widgets for the UISelectionPanel
tz
parents: 854
diff changeset
   200
    "
8e7411aa5697 show defaults widgets for the UISelectionPanel
tz
parents: 854
diff changeset
   201
    showDefaults := aBool
1145
93aade1b7265 remember the current spec;
tm
parents: 1121
diff changeset
   202
!
93aade1b7265 remember the current spec;
tm
parents: 1121
diff changeset
   203
93aade1b7265 remember the current spec;
tm
parents: 1121
diff changeset
   204
spec
93aade1b7265 remember the current spec;
tm
parents: 1121
diff changeset
   205
    "return the current spec"
93aade1b7265 remember the current spec;
tm
parents: 1121
diff changeset
   206
93aade1b7265 remember the current spec;
tm
parents: 1121
diff changeset
   207
    ^ spec
1204
a043422d0565 checkin from browser
tm
parents: 1145
diff changeset
   208
!
a043422d0565 checkin from browser
tm
parents: 1145
diff changeset
   209
a043422d0565 checkin from browser
tm
parents: 1145
diff changeset
   210
spec:aSpec
a043422d0565 checkin from browser
tm
parents: 1145
diff changeset
   211
    "set the current spec"
a043422d0565 checkin from browser
tm
parents: 1145
diff changeset
   212
a043422d0565 checkin from browser
tm
parents: 1145
diff changeset
   213
    spec := aSpec
1970
0becfc45c6cb changes for werner (access to view instvar)
werner
parents: 1772
diff changeset
   214
!
0becfc45c6cb changes for werner (access to view instvar)
werner
parents: 1772
diff changeset
   215
0becfc45c6cb changes for werner (access to view instvar)
werner
parents: 1772
diff changeset
   216
view
0becfc45c6cb changes for werner (access to view instvar)
werner
parents: 1772
diff changeset
   217
0becfc45c6cb changes for werner (access to view instvar)
werner
parents: 1772
diff changeset
   218
    ^view
0becfc45c6cb changes for werner (access to view instvar)
werner
parents: 1772
diff changeset
   219
!
0becfc45c6cb changes for werner (access to view instvar)
werner
parents: 1772
diff changeset
   220
0becfc45c6cb changes for werner (access to view instvar)
werner
parents: 1772
diff changeset
   221
view: something
0becfc45c6cb changes for werner (access to view instvar)
werner
parents: 1772
diff changeset
   222
0becfc45c6cb changes for werner (access to view instvar)
werner
parents: 1772
diff changeset
   223
    view := something
0becfc45c6cb changes for werner (access to view instvar)
werner
parents: 1772
diff changeset
   224
!
0becfc45c6cb changes for werner (access to view instvar)
werner
parents: 1772
diff changeset
   225
0becfc45c6cb changes for werner (access to view instvar)
werner
parents: 1772
diff changeset
   226
view:viewArg spec:specArg 
0becfc45c6cb changes for werner (access to view instvar)
werner
parents: 1772
diff changeset
   227
    "set instance variables (automatically generated)"
0becfc45c6cb changes for werner (access to view instvar)
werner
parents: 1772
diff changeset
   228
0becfc45c6cb changes for werner (access to view instvar)
werner
parents: 1772
diff changeset
   229
    view := viewArg.
0becfc45c6cb changes for werner (access to view instvar)
werner
parents: 1772
diff changeset
   230
    spec := specArg.
86
claus
parents: 80
diff changeset
   231
! !
claus
parents: 80
diff changeset
   232
372
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 367
diff changeset
   233
!UIBuilder methodsFor:'building'!
66
claus
parents:
diff changeset
   234
734
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   235
buildFromSpec:aSpecOrSpecArray
2071
9be6a5197cec *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
   236
    spec := UISpecification from:aSpecOrSpecArray.
734
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   237
    window notNil ifTrue:[
2071
9be6a5197cec *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
   238
        spec buildViewFor:self in:window.
9be6a5197cec *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
   239
    ] ifFalse:[
9be6a5197cec *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
   240
        window := spec buildViewFor:self in:nil.
734
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   241
    ].
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   242
    ^ window
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   243
!
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   244
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   245
buildFromSpec:aSpecArray in:aView
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   246
    spec := UISpecification from:aSpecArray.
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   247
    ^ spec buildViewFor:self in:aView.
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   248
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   249
    "Modified: 3.3.1997 / 18:44:02 / cg"
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   250
!
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   251
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   252
doFinalHookup
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   253
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   254
    "Created: 14.2.1997 / 14:52:27 / cg"
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   255
!
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   256
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   257
newSubBuilder
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   258
    |builder|
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   259
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   260
    builder := UIBuilder new.
751
56a83a3b210c add isEditing; set to true if running UIPainter
ca
parents: 734
diff changeset
   261
56a83a3b210c add isEditing; set to true if running UIPainter
ca
parents: 734
diff changeset
   262
    builder isEditing:isEditing.
863
8e7411aa5697 show defaults widgets for the UISelectionPanel
tz
parents: 854
diff changeset
   263
    builder showDefaults:showDefaults.
734
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   264
    builder bindings:(self bindings).
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   265
    builder application:(self application).
854
f4d514d500ad a new builder retrieved by #newSubBuilder will
ca
parents: 848
diff changeset
   266
    "/ builder applicationClass:applicationClass.
751
56a83a3b210c add isEditing; set to true if running UIPainter
ca
parents: 734
diff changeset
   267
  ^ builder
734
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   268
! !
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   269
1772
cb41f5dbcdf4 method category rename
Claus Gittinger <cg@exept.de>
parents: 1763
diff changeset
   270
!UIBuilder methodsFor:'building-programatically'!
734
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   271
367
7316abe03075 made obsolete stuff ignored
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
   272
add:aSpec
1359
f40bfb94f862 allow for application to decide what type of
Claus Gittinger <cg@exept.de>
parents: 1325
diff changeset
   273
    |collectedComponents appWinClass|
478
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   274
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   275
    composite notNil ifTrue:[
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   276
        (collectedComponents := composite collection) isNil ifTrue:[
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   277
            composite collection:(collectedComponents := OrderedCollection new).
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   278
        ].
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   279
        collectedComponents add:aSpec.
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   280
        view := aSpec buildViewWithLayoutFor:self in:compositeView.
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   281
    ] ifFalse:[
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   282
        spec isNil ifTrue:[
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   283
            spec := FullSpec new.
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   284
        ].
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   285
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   286
        (aSpec isMemberOf:WindowSpec) ifTrue:[
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   287
            spec window:aSpec
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   288
        ] ifFalse:[
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   289
            ((aSpec isMemberOf:ComponentSpec)
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   290
            or:[(aSpec isMemberOf:SpecCollection)]) ifTrue:[
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   291
                spec component:aSpec.
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   292
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   293
                window isNil ifTrue:[
1359
f40bfb94f862 allow for application to decide what type of
Claus Gittinger <cg@exept.de>
parents: 1325
diff changeset
   294
                    application notNil ifTrue:[
f40bfb94f862 allow for application to decide what type of
Claus Gittinger <cg@exept.de>
parents: 1325
diff changeset
   295
                        appWinClass := application applicationWindowClass
f40bfb94f862 allow for application to decide what type of
Claus Gittinger <cg@exept.de>
parents: 1325
diff changeset
   296
                    ] ifFalse:[
f40bfb94f862 allow for application to decide what type of
Claus Gittinger <cg@exept.de>
parents: 1325
diff changeset
   297
                        appWinClass := ApplicationWindow
f40bfb94f862 allow for application to decide what type of
Claus Gittinger <cg@exept.de>
parents: 1325
diff changeset
   298
                    ].
f40bfb94f862 allow for application to decide what type of
Claus Gittinger <cg@exept.de>
parents: 1325
diff changeset
   299
                    window := appWinClass new.
734
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   300
                    window extent:300@300.
478
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   301
                ].
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   302
                aSpec buildViewWithLayoutFor:self in:window.
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   303
"/ builder window displayBox
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   304
                composite := aSpec.
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   305
                compositeView := window.
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   306
            ] ifFalse:[
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   307
                spec component isNil ifTrue:[
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   308
                    spec component:SpecCollection new.
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   309
                    spec component collection:OrderedCollection new.
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   310
                ].
734
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   311
                composite := spec component.
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   312
                window isNil ifTrue:[
965
04cadbd21aac use new ApplicationWindow (instead of StandardSystemView)
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
   313
                    window := ApplicationWindow new.
734
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   314
                    window extent:300@300.
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   315
                ].
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   316
                compositeView := window.
478
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   317
                spec component collection add:aSpec.
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   318
                view := aSpec buildViewWithLayoutFor:self in:compositeView.
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   319
            ].
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   320
        ]
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   321
    ].
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   322
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   323
    lastComponent := view.
367
7316abe03075 made obsolete stuff ignored
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
   324
    ^ view
7316abe03075 made obsolete stuff ignored
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
   325
965
04cadbd21aac use new ApplicationWindow (instead of StandardSystemView)
Claus Gittinger <cg@exept.de>
parents: 917
diff changeset
   326
    "Modified: / 18.6.1998 / 19:09:38 / cg"
478
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   327
!
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   328
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   329
endComposite
734
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   330
    |entry finishedComposite finishedView|
478
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   331
497
6544ec670fe0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 479
diff changeset
   332
    (specStack notNil and:[specStack notEmpty]) ifTrue:[
734
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   333
        finishedComposite := composite.
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   334
        finishedView := compositeView.  
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   335
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   336
        "/ pop
478
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   337
        entry := specStack removeLast.
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   338
        composite := entry key.
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   339
        compositeView := entry value.
734
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   340
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   341
        lastComponent := finishedView.
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   342
        ^ finishedComposite
478
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   343
    ].
734
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   344
    self halt.
478
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   345
    ^ composite
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   346
734
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   347
    "Created: / 3.3.1997 / 17:17:43 / cg"
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   348
    "Modified: / 30.10.1997 / 23:28:04 / cg"
478
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   349
!
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   350
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   351
endCompositeLayout:layout
734
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   352
    composite compositeSpec isNil ifTrue:[
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   353
        composite compositeSpec:(CompositeSpec new).
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   354
    ].
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   355
    composite compositeSpec layout:layout.
479
8058c8296148 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 478
diff changeset
   356
    compositeView layout:layout.
478
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   357
    self endComposite
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   358
734
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   359
    "Modified: / 30.10.1997 / 23:10:10 / cg"
479
8058c8296148 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 478
diff changeset
   360
!
8058c8296148 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 478
diff changeset
   361
8058c8296148 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 478
diff changeset
   362
endCompositeLayout:layout properties:props
8058c8296148 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 478
diff changeset
   363
    self endCompositeLayout:layout
8058c8296148 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 478
diff changeset
   364
8058c8296148 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 478
diff changeset
   365
    "Created: 3.3.1997 / 22:15:17 / cg"
478
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   366
!
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   367
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   368
newComposite
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   369
    |newComposite|
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   370
734
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   371
    "/ push the composite being built ...
478
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   372
    specStack isNil ifTrue:[
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   373
        specStack := OrderedCollection new
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   374
    ].
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   375
    specStack addLast:(composite->compositeView).
734
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   376
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   377
    "/ start creating a new one ...
478
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   378
    newComposite := CompositeSpecCollection new.
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   379
    newComposite compositeSpec:(CompositeSpec new).
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   380
    compositeView := self add:newComposite.
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   381
    composite := newComposite.
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   382
    ^ compositeView
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   383
734
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   384
    "Created: / 3.3.1997 / 17:15:36 / cg"
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   385
    "Modified: / 1.11.1997 / 02:48:44 / cg"
100
claus
parents: 96
diff changeset
   386
! !
86
claus
parents: 80
diff changeset
   387
479
8058c8296148 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 478
diff changeset
   388
!UIBuilder methodsFor:'initialization'!
8058c8296148 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 478
diff changeset
   389
8058c8296148 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 478
diff changeset
   390
setupWindowFor:aView
8058c8296148 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 478
diff changeset
   391
    |ext|
8058c8296148 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 478
diff changeset
   392
8058c8296148 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 478
diff changeset
   393
    window notNil ifTrue:[
8058c8296148 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 478
diff changeset
   394
        ext := window extent.
8058c8296148 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 478
diff changeset
   395
8058c8296148 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 478
diff changeset
   396
        ((window isMemberOf:View)
8058c8296148 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 478
diff changeset
   397
        or:[window isMemberOf:SimpleView]) ifTrue:[
8058c8296148 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 478
diff changeset
   398
            aView addSubView:window.
8058c8296148 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 478
diff changeset
   399
        ].
8058c8296148 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 478
diff changeset
   400
    ].
8058c8296148 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 478
diff changeset
   401
8058c8296148 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 478
diff changeset
   402
    window := aView.
8058c8296148 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 478
diff changeset
   403
8058c8296148 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 478
diff changeset
   404
    aView container isNil ifTrue:[
8058c8296148 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 478
diff changeset
   405
        spec notNil ifTrue:[
8058c8296148 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 478
diff changeset
   406
            spec window setupView:window for:self
8058c8296148 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 478
diff changeset
   407
        ]
8058c8296148 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 478
diff changeset
   408
    ].
8058c8296148 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 478
diff changeset
   409
775
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
   410
    "Modified: / 27.1.1998 / 12:27:45 / cg"
479
8058c8296148 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 478
diff changeset
   411
! !
8058c8296148 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 478
diff changeset
   412
132
0a8fe342ed91 version method at the end
Claus Gittinger <cg@exept.de>
parents: 125
diff changeset
   413
!UIBuilder class methodsFor:'documentation'!
0a8fe342ed91 version method at the end
Claus Gittinger <cg@exept.de>
parents: 125
diff changeset
   414
0a8fe342ed91 version method at the end
Claus Gittinger <cg@exept.de>
parents: 125
diff changeset
   415
version
2071
9be6a5197cec *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1970
diff changeset
   416
    ^ '$Header: /cvs/stx/stx/libview2/UIBuilder.st,v 1.55 2005-12-21 16:42:22 cg Exp $'
132
0a8fe342ed91 version method at the end
Claus Gittinger <cg@exept.de>
parents: 125
diff changeset
   417
! !
1763
fabe0b506e33 method category rename
Claus Gittinger <cg@exept.de>
parents: 1498
diff changeset
   418
100
claus
parents: 96
diff changeset
   419
UIBuilder initialize!