UIBuilder.st
author Stefan Vogel <sv@exept.de>
Thu, 05 Feb 1998 13:49:55 +0100
changeset 828 1461641c4bb3
parent 775 9d9995bf31a3
child 848 c0fab03dd225
permissions -rw-r--r--
#newSubBuilder has to set applicationClass
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
100
claus
parents: 96
diff changeset
    13
WindowBuilder subclass:#UIBuilder
734
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
    14
	instanceVariableNames:'view currentMenuSelector spec specStack composite lastComponent
751
56a83a3b210c add isEditing; set to true if running UIPainter
ca
parents: 734
diff changeset
    15
		compositeView menuBar isEditing'
223
b65dc250db8d documentation
Claus Gittinger <cg@exept.de>
parents: 139
diff changeset
    16
	classVariableNames:'Verbose'
b65dc250db8d documentation
Claus Gittinger <cg@exept.de>
parents: 139
diff changeset
    17
	poolDictionaries:''
b65dc250db8d documentation
Claus Gittinger <cg@exept.de>
parents: 139
diff changeset
    18
	category:'Interface-Support-UI'
66
claus
parents:
diff changeset
    19
!
claus
parents:
diff changeset
    20
claus
parents:
diff changeset
    21
!UIBuilder class methodsFor:'documentation'!
claus
parents:
diff changeset
    22
125
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
    23
copyright
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
    24
"
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
    25
 COPYRIGHT (c) 1995 by Claus Gittinger
734
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
    26
              All Rights Reserved
125
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
    27
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
    28
 This software is furnished under a license and may be used
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
    29
 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
    30
 inclusion of the above copyright notice.   This software may not
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
    31
 be provided or otherwise made available to, or used by, any
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
    32
 other person.  No title to or ownership of the software is
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
    33
 hereby transferred.
fa5b5e4336bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 114
diff changeset
    34
"
88
claus
parents: 86
diff changeset
    35
!
claus
parents: 86
diff changeset
    36
66
claus
parents:
diff changeset
    37
documentation
claus
parents:
diff changeset
    38
"
775
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
    39
    this class allows parsing windowSpecs as created by ST/X's
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
    40
    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
    41
    (and thereby allow to run applications built with this tool).
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
    42
    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
    43
734
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
    44
    It also provides some rudimentary support for building interfaces
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
    45
    programatically, by using #newComposite .. #add: .. #endComposite.
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
    46
    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
    47
    that for new ST/X programs.
775
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
    48
    Those were added to allow execution of some PD applications.
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
    49
    The programatic building protocol is not complete and certainly not bug free.
223
b65dc250db8d documentation
Claus Gittinger <cg@exept.de>
parents: 139
diff changeset
    50
373
66283cb455bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 372
diff changeset
    51
    Notice: 
775
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
    52
        some of this class was implemented using protocol information
734
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
    53
        from alpha testers, literature and by reading public domain code
373
66283cb455bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 372
diff changeset
    54
        - it may not be complete or compatible to
66283cb455bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 372
diff changeset
    55
        the corresponding ST-80 class. 
66283cb455bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 372
diff changeset
    56
        If you encounter any incompatibilities, please forward a note 
66283cb455bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 372
diff changeset
    57
        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
    58
775
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
    59
    [instance variables:]
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
    60
        view                    <View>  
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
    61
                                        temporary - holds the view being built
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
    62
                                        when creating components using the 
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
    63
                                        programmatic building interface.
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
    64
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
    65
        currentMenuSelector             not yet used
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
        spec                    <UISpec>        
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
    68
                                        temporary - holds the spec being parsed
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
    69
                                        when creating components using the 
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
    70
                                        programmatic building interface.
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
    71
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
    72
        specStack               <Collection>
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
    73
                                        temporary - holds the spec-stack when
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
    74
                                        creating composites using newComposite/
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
    75
                                        endComposite,
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
    76
                                        while creating components using the 
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
    77
                                        programmatic building interface.
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
    78
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
    79
        composite               <SpecCollection>
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
    80
                                        temporary - holds the current composite
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
    81
                                        when using newComposite/ endComposite,
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
    82
                                        while creating components using the 
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
    83
                                        programmatic building interface.
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
    84
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
    85
        lastComponent           <View>
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
    86
                                        temporary - holds the last component
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
    87
                                        being built,
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
    88
                                        when creating components using the 
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
    89
                                        programmatic building interface.
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
    90
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
    91
        compositeView           <View>
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
    92
                                        temporary - holds the current composites
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
    93
                                        view, when creating components using the 
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
    94
                                        programmatic building interface.
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
    95
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
    96
        menuBar                         not yet used
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
        isEditing               <Boolean>
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
    99
                                        flag which is set when an interface is built
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
   100
                                        by the UIPainter (as opposed to being built
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
   101
                                        for the application).
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
   102
                                        Changes the way aspects are aquired,
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
   103
                                        (actually, no models are created/set)
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
   104
                                        to prevent false building when no
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
   105
                                        real applicationModel is present.
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
   106
                                        (as is the case when the painter builds
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
   107
                                        components).
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
   108
223
b65dc250db8d documentation
Claus Gittinger <cg@exept.de>
parents: 139
diff changeset
   109
    [author:]
b65dc250db8d documentation
Claus Gittinger <cg@exept.de>
parents: 139
diff changeset
   110
        Claus Gittinger
66
claus
parents:
diff changeset
   111
"
claus
parents:
diff changeset
   112
! !
claus
parents:
diff changeset
   113
claus
parents:
diff changeset
   114
!UIBuilder class methodsFor:'initialization'!
claus
parents:
diff changeset
   115
claus
parents:
diff changeset
   116
initialize
claus
parents:
diff changeset
   117
    Verbose := false    "/ debugging flag
claus
parents:
diff changeset
   118
! !
claus
parents:
diff changeset
   119
734
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   120
!UIBuilder methodsFor:'ST80 compatibility'!
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   121
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   122
wrapper
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   123
    "ST/X has no wrappers - return the view here"
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   124
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   125
    ^ view
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   126
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   127
    "Created: / 3.3.1997 / 18:28:31 / cg"
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   128
    "Modified: / 31.10.1997 / 18:42:52 / cg"
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   129
! !
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   130
86
claus
parents: 80
diff changeset
   131
!UIBuilder methodsFor:'accessing'!
claus
parents: 80
diff changeset
   132
751
56a83a3b210c add isEditing; set to true if running UIPainter
ca
parents: 734
diff changeset
   133
isEditing
56a83a3b210c add isEditing; set to true if running UIPainter
ca
parents: 734
diff changeset
   134
    "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
   135
     models or actions should be set (no application is running)
56a83a3b210c add isEditing; set to true if running UIPainter
ca
parents: 734
diff changeset
   136
    "
56a83a3b210c add isEditing; set to true if running UIPainter
ca
parents: 734
diff changeset
   137
    ^ isEditing ? false
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
56a83a3b210c add isEditing; set to true if running UIPainter
ca
parents: 734
diff changeset
   140
isEditing:aState
56a83a3b210c add isEditing; set to true if running UIPainter
ca
parents: 734
diff changeset
   141
    "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
   142
     models or actions should be set (no application is running)
56a83a3b210c add isEditing; set to true if running UIPainter
ca
parents: 734
diff changeset
   143
    "
56a83a3b210c add isEditing; set to true if running UIPainter
ca
parents: 734
diff changeset
   144
    isEditing := aState
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
734
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   147
menuAt:aKey
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   148
    "Find a binding for the menu named aKey, either in the bindings 
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   149
     or from the source"
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   150
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   151
    | menu |
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   152
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   153
    menu := self bindingAt:aKey.
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   154
    menu isNil ifTrue:[
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   155
        menu := self safelyPerform:#menuFor: with:aKey.
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   156
        menu isNil ifTrue:[
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   157
            menu := self safelyPerform:aKey
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   158
        ].
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   159
        menu := menu value.
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   160
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   161
        (application notNil and:[menu notNil]) ifTrue:[
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   162
            menu isArray ifTrue:[
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   163
                menu := Menu new fromLiteralArrayEncoding:menu.
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   164
                menu receiver:application.
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   165
                ^ menu
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   166
            ].
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   167
            menu findGuiResourcesIn:application
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   168
        ]
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   169
    ].
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   170
    ^ menu
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   171
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   172
    "Modified: / 30.10.1997 / 20:37:14 / cg"
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   173
!
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   174
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   175
menuAt:aSymbol put:someMenuOrHolder
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   176
    "add someMenuOrHolder as the binding for the menu named aSymbol to the bindings"
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   177
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   178
    ^ self aspectAt:aSymbol put:someMenuOrHolder
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   179
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   180
    "Modified: / 30.10.1997 / 20:32:51 / cg"
721
1889d708a951 provide a handle to the applications menuBar
Claus Gittinger <cg@exept.de>
parents: 667
diff changeset
   181
!
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
menuBar
1889d708a951 provide a handle to the applications menuBar
Claus Gittinger <cg@exept.de>
parents: 667
diff changeset
   184
    "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
   185
1889d708a951 provide a handle to the applications menuBar
Claus Gittinger <cg@exept.de>
parents: 667
diff changeset
   186
    ^ menuBar
1889d708a951 provide a handle to the applications menuBar
Claus Gittinger <cg@exept.de>
parents: 667
diff changeset
   187
1889d708a951 provide a handle to the applications menuBar
Claus Gittinger <cg@exept.de>
parents: 667
diff changeset
   188
    "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
   189
!
1889d708a951 provide a handle to the applications menuBar
Claus Gittinger <cg@exept.de>
parents: 667
diff changeset
   190
1889d708a951 provide a handle to the applications menuBar
Claus Gittinger <cg@exept.de>
parents: 667
diff changeset
   191
menuBar:something
1889d708a951 provide a handle to the applications menuBar
Claus Gittinger <cg@exept.de>
parents: 667
diff changeset
   192
    "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
   193
1889d708a951 provide a handle to the applications menuBar
Claus Gittinger <cg@exept.de>
parents: 667
diff changeset
   194
    menuBar := something.
1889d708a951 provide a handle to the applications menuBar
Claus Gittinger <cg@exept.de>
parents: 667
diff changeset
   195
1889d708a951 provide a handle to the applications menuBar
Claus Gittinger <cg@exept.de>
parents: 667
diff changeset
   196
    "Created: / 27.10.1997 / 16:30:13 / cg"
86
claus
parents: 80
diff changeset
   197
! !
claus
parents: 80
diff changeset
   198
372
6d7718f3d298 more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents: 367
diff changeset
   199
!UIBuilder methodsFor:'building'!
66
claus
parents:
diff changeset
   200
734
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   201
buildFromSpec:aSpecOrSpecArray
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   202
    |m spec|
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   203
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   204
    window notNil ifTrue:[
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   205
        ^ self buildFromSpec:aSpecOrSpecArray in:window
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   206
    ].
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   207
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   208
    spec := UISpecification from:aSpecOrSpecArray.
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   209
    window := spec buildViewFor:self.
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   210
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   211
    ^ window
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   212
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   213
    "Modified: / 5.9.1995 / 21:43:29 / claus"
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   214
    "Modified: / 31.10.1997 / 18:41:14 / cg"
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   215
!
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   216
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   217
buildFromSpec:aSpecArray in:aView
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   218
    |m spec|
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   219
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   220
    spec := UISpecification from:aSpecArray.
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   221
    ^ spec buildViewFor:self in:aView.
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   222
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   223
    "Modified: 3.3.1997 / 18:44:02 / cg"
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   224
!
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   225
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   226
doFinalHookup
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   227
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   228
    "Created: 14.2.1997 / 14:52:27 / cg"
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   229
!
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   230
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   231
newSubBuilder
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   232
    |builder|
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   233
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   234
    builder := UIBuilder new.
751
56a83a3b210c add isEditing; set to true if running UIPainter
ca
parents: 734
diff changeset
   235
56a83a3b210c add isEditing; set to true if running UIPainter
ca
parents: 734
diff changeset
   236
    builder isEditing:isEditing.
734
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   237
    builder bindings:(self bindings).
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   238
    builder application:(self application).
828
1461641c4bb3 #newSubBuilder has to set applicationClass
Stefan Vogel <sv@exept.de>
parents: 775
diff changeset
   239
    builder applicationClass:applicationClass.
751
56a83a3b210c add isEditing; set to true if running UIPainter
ca
parents: 734
diff changeset
   240
  ^ builder
828
1461641c4bb3 #newSubBuilder has to set applicationClass
Stefan Vogel <sv@exept.de>
parents: 775
diff changeset
   241
1461641c4bb3 #newSubBuilder has to set applicationClass
Stefan Vogel <sv@exept.de>
parents: 775
diff changeset
   242
    "Modified: / 5.2.1998 / 11:45:18 / stefan"
734
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
!UIBuilder methodsFor:'building - programatically'!
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   246
367
7316abe03075 made obsolete stuff ignored
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
   247
add:aSpec
478
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   248
    |collectedComponents|
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   249
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   250
    composite notNil ifTrue:[
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   251
        (collectedComponents := composite collection) isNil ifTrue:[
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   252
            composite collection:(collectedComponents := OrderedCollection new).
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   253
        ].
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   254
        collectedComponents add:aSpec.
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   255
        view := aSpec buildViewWithLayoutFor:self in:compositeView.
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   256
    ] ifFalse:[
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   257
        spec isNil ifTrue:[
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   258
            spec := FullSpec new.
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   259
        ].
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   260
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   261
        (aSpec isMemberOf:WindowSpec) ifTrue:[
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   262
            spec window:aSpec
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   263
        ] ifFalse:[
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   264
            ((aSpec isMemberOf:ComponentSpec)
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   265
            or:[(aSpec isMemberOf:SpecCollection)]) ifTrue:[
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   266
                spec component:aSpec.
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   267
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   268
                window isNil ifTrue:[
775
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
   269
                    window := StandardSystemView new.
734
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   270
                    window extent:300@300.
478
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   271
                ].
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   272
                aSpec buildViewWithLayoutFor:self in:window.
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   273
"/ builder window displayBox
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   274
                composite := aSpec.
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   275
                compositeView := window.
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   276
            ] ifFalse:[
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   277
                spec component isNil ifTrue:[
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   278
                    spec component:SpecCollection new.
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   279
                    spec component collection:OrderedCollection new.
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   280
                ].
734
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   281
                composite := spec component.
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   282
                window isNil ifTrue:[
775
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
   283
                    window := StandardSystemView new.
734
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   284
                    window extent:300@300.
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   285
                ].
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   286
                compositeView := window.
478
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   287
                spec component collection add:aSpec.
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   288
                view := aSpec buildViewWithLayoutFor:self in:compositeView.
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   289
            ].
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   290
        ]
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   291
    ].
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
    lastComponent := view.
367
7316abe03075 made obsolete stuff ignored
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
   294
    ^ view
7316abe03075 made obsolete stuff ignored
Claus Gittinger <cg@exept.de>
parents: 363
diff changeset
   295
775
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
   296
    "Modified: / 27.1.1998 / 12:28:00 / cg"
478
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   297
!
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   298
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   299
endComposite
734
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   300
    |entry finishedComposite finishedView|
478
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   301
497
6544ec670fe0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 479
diff changeset
   302
    (specStack notNil and:[specStack notEmpty]) ifTrue:[
734
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   303
        finishedComposite := composite.
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   304
        finishedView := compositeView.  
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   305
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   306
        "/ pop
478
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   307
        entry := specStack removeLast.
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   308
        composite := entry key.
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   309
        compositeView := entry value.
734
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   310
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   311
        lastComponent := finishedView.
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   312
        ^ finishedComposite
478
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   313
    ].
734
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   314
    self halt.
478
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   315
    ^ composite
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   316
734
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   317
    "Created: / 3.3.1997 / 17:17:43 / cg"
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   318
    "Modified: / 30.10.1997 / 23:28:04 / cg"
478
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
endCompositeLayout:layout
734
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   322
    composite compositeSpec isNil ifTrue:[
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   323
        composite compositeSpec:(CompositeSpec new).
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   324
    ].
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   325
    composite compositeSpec layout:layout.
479
8058c8296148 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 478
diff changeset
   326
    compositeView layout:layout.
478
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   327
    self endComposite
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   328
734
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   329
    "Modified: / 30.10.1997 / 23:10:10 / cg"
479
8058c8296148 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 478
diff changeset
   330
!
8058c8296148 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 478
diff changeset
   331
8058c8296148 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 478
diff changeset
   332
endCompositeLayout:layout properties:props
8058c8296148 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 478
diff changeset
   333
    self endCompositeLayout:layout
8058c8296148 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 478
diff changeset
   334
8058c8296148 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 478
diff changeset
   335
    "Created: 3.3.1997 / 22:15:17 / cg"
478
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   336
!
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   337
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   338
newComposite
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   339
    |newComposite|
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   340
734
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   341
    "/ push the composite being built ...
478
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   342
    specStack isNil ifTrue:[
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   343
        specStack := OrderedCollection new
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   344
    ].
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   345
    specStack addLast:(composite->compositeView).
734
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   346
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   347
    "/ start creating a new one ...
478
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   348
    newComposite := CompositeSpecCollection new.
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   349
    newComposite compositeSpec:(CompositeSpec new).
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   350
    compositeView := self add:newComposite.
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   351
    composite := newComposite.
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   352
    ^ compositeView
ae8c1aaac281 more ST80 compatibility.
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   353
734
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   354
    "Created: / 3.3.1997 / 17:15:36 / cg"
f1079f443a75 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
   355
    "Modified: / 1.11.1997 / 02:48:44 / cg"
100
claus
parents: 96
diff changeset
   356
! !
86
claus
parents: 80
diff changeset
   357
479
8058c8296148 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 478
diff changeset
   358
!UIBuilder methodsFor:'initialization'!
8058c8296148 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 478
diff changeset
   359
8058c8296148 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 478
diff changeset
   360
setupWindowFor:aView
8058c8296148 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 478
diff changeset
   361
    |ext|
8058c8296148 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 478
diff changeset
   362
8058c8296148 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 478
diff changeset
   363
    window notNil ifTrue:[
8058c8296148 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 478
diff changeset
   364
        ext := window extent.
8058c8296148 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 478
diff changeset
   365
8058c8296148 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 478
diff changeset
   366
        ((window isMemberOf:View)
8058c8296148 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 478
diff changeset
   367
        or:[window isMemberOf:SimpleView]) ifTrue:[
8058c8296148 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 478
diff changeset
   368
            aView addSubView:window.
8058c8296148 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 478
diff changeset
   369
        ].
8058c8296148 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 478
diff changeset
   370
    ].
8058c8296148 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 478
diff changeset
   371
8058c8296148 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 478
diff changeset
   372
    window := aView.
8058c8296148 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 478
diff changeset
   373
8058c8296148 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 478
diff changeset
   374
    aView container isNil ifTrue:[
8058c8296148 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 478
diff changeset
   375
        spec notNil ifTrue:[
8058c8296148 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 478
diff changeset
   376
            spec window setupView:window for:self
8058c8296148 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 478
diff changeset
   377
        ]
8058c8296148 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 478
diff changeset
   378
    ].
8058c8296148 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 478
diff changeset
   379
775
9d9995bf31a3 added commentary
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
   380
    "Modified: / 27.1.1998 / 12:27:45 / cg"
479
8058c8296148 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 478
diff changeset
   381
! !
8058c8296148 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 478
diff changeset
   382
132
0a8fe342ed91 version method at the end
Claus Gittinger <cg@exept.de>
parents: 125
diff changeset
   383
!UIBuilder class methodsFor:'documentation'!
0a8fe342ed91 version method at the end
Claus Gittinger <cg@exept.de>
parents: 125
diff changeset
   384
0a8fe342ed91 version method at the end
Claus Gittinger <cg@exept.de>
parents: 125
diff changeset
   385
version
828
1461641c4bb3 #newSubBuilder has to set applicationClass
Stefan Vogel <sv@exept.de>
parents: 775
diff changeset
   386
    ^ '$Header: /cvs/stx/stx/libview2/UIBuilder.st,v 1.32 1998-02-05 12:49:55 stefan Exp $'
132
0a8fe342ed91 version method at the end
Claus Gittinger <cg@exept.de>
parents: 125
diff changeset
   387
! !
100
claus
parents: 96
diff changeset
   388
UIBuilder initialize!