eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'UIBuilder':

Home

Documentation
www.exept.de
Everywhere
for:
[back]

Class: UIBuilder


Inheritance:

   Object
   |
   +--WindowBuilder
      |
      +--UIBuilder

Package:
stx:libview2
Category:
Interface-Framework
Version:
rev: 1.73 date: 2023/10/25 14:31:02
user: stefan
file: UIBuilder.st directory: libview2
module: stx stc-classLibrary: libview2

Description:


this builder parses windowSpecs as created by ST/X's
UIPainter and should be able to handle most of ST-80's specs.
(and thereby allow to run applications built with this tool).
However, it is not guaranteed that all of ST-80's winSpecs are understood,
especially newer ones, which have the namespace of components inside will need some
massage.

It also provides some rudimentary support for building interfaces
programatically, by using #newComposite .. #add: .. #endComposite.
This has been added for ST80-compatibility - we do not recommend using
that for new ST/X programs.
Those were added to allow execution of some PD applications.
The programatic building protocol is not complete and certainly not bug free.

Notice: 
    some of this class was implemented using protocol information
    from alpha testers, literature and by reading public domain code
    - it may not be complete or compatible to
    the corresponding ST-80 class. 
    If you encounter any incompatibilities, please forward a note 
    describing the incompatibility verbal (i.e. no code) to the ST/X team.

[instance variables:]
    view                    <View>  
                                    temporary - holds the view being built
                                    when creating components using the 
                                    programmatic building interface.

    currentMenuSelector             not yet used

    spec                    <UISpec>        
                                    temporary - holds the spec being parsed
                                    when creating components using the 
                                    programmatic building interface.

    specStack               <Collection>
                                    temporary - holds the spec-stack when
                                    creating composites using newComposite/
                                    endComposite,
                                    while creating components using the 
                                    programmatic building interface.

    composite               <SpecCollection>
                                    temporary - holds the current composite
                                    when using newComposite/ endComposite,
                                    while creating components using the 
                                    programmatic building interface.

    lastComponent           <View>
                                    temporary - holds the last component
                                    being built,
                                    when creating components using the 
                                    programmatic building interface.

    compositeView           <View>
                                    temporary - holds the current composites
                                    view, when creating components using the 
                                    programmatic building interface.

    menuBar                         not yet used

    isEditing               <Boolean>
                                    flag which is set when an interface is built
                                    by the UIPainter (as opposed to being built
                                    for the application).
                                    Changes the way aspects are acquired,
                                    (actually, no models are created/set)
                                    to prevent false building when no
                                    real applicationModel is present.
                                    (as is the case when the painter builds
                                    components).

copyright

COPYRIGHT (c) 1995 by Claus Gittinger All Rights Reserved This software is furnished under a license and may be used only in accordance with the terms of that license and with the inclusion of the above copyright notice. This software may not be provided or otherwise made available to, or used by, any other person. No title to or ownership of the software is hereby transferred.

Class protocol:

initialization
o  initialize
debugging flag


Instance protocol:

Compatibility-VW
o  add: aSpec
ATTN: this adds a spec but returns the created view

o  endComposite
pop

o  endCompositeLayout: layout

o  endCompositeLayout: layout properties: props

o  newComposite
push the composite being built ...

o  wrapper
ST/X has no wrappers - return the view here

accessing
o  isEditing
true if building from a GUI builder resource ( UIPainter, ... ),
false if building for the real thing.
If true, no models or actions should be set (no application is running)
(i.e. the widgets have been built to be shown in the UIPainter, with no app instance)

o  isEditing: aBoolean
set to true if building from a GUI builder resource ( UIPainter, ... );
if true, no models or actions will be set (no application is running)

o  isSubBuilder
return true, if this uiBuilder is for a subCanvas (i.e. a subApp)
as opposed to a topApp builder. The default is false

o  isSubBuilder: aBoolean
set/clear the flag, which states that this uiBuilder is for a subCanvas (i.e. a subApp)
as opposed to a topApp builder. The default is false.

o  menuBar
return menuBar (or nil, of none was built)

o  menuBar: aMenuPanelOrNil
set the menuBar

o  showDefaults
returns true if the builder is in editing mode and the building
components will build a default contents

o  showDefaults: aBool
true if the builder is in editing mode and the building
components will build a default contents

o  spec
return the current spec

o  spec: aSpec
set the current spec

o  view
the 'current' view when building programmatically (for VW compat.)

o  view: aView
the 'current' view when building programmatically (for VW compat.)

o  view: viewArg spec: specArg
set instance variables (automatically generated)

building
o  buildFromSpec: aSpecOrSpecArray

o  buildFromSpec: aSpecArray in: aView
build a window hierarchy according to my spec into an existing view

o  buildViewForSpec: aSpecOrSpecArray in: aView
used when building a subSpec; moved from the UISpec class to here,
to allow different behavior in WebBuilder...

o  buildWindowFromSpec: aSpecOrSpecArray

o  doFinalHookup

o  newSubBuilder
builder applicationClass:applicationClass.

o  rebuildFromSpec: aSpecOrSpecArray
remove what I have and rebuild from a possibily different spec

initialization
o  setupWindowFor: aView



ST/X 7.7.0.0; WebServer 1.702 at 20f6060372b9.unknown:8081; Mon, 18 Nov 2024 06:54:45 GMT