eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'UISpecification':

Home

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

Class: UISpecification


Inheritance:

   Object
   |
   +--UISpecification
      |
      +--ComponentSpec
      |
      +--NoteBookSpec
      |
      +--UIEventCallbackSubSpec
      |
      +--UnknownSpec

Package:
stx:libui
Category:
Interface-Support-UI-Specs
Version:
rev: 1.450 date: 2024/02/09 11:43:00
user: stefan
file: UISpecification.st directory: libui
module: stx stc-classLibrary: libui

Description:


Instances (and derived instances) are used temporarily while a view
is created from a spec. They collect attributes from a specArray and
know how to create & initialize a view from those.

They are not normally used by applications.

Notice: 
    this class was implemented using protocol information
    from alpha testers, literature and by reading public domain code
    - it may be incomplete or oncompatible 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.

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:

class initialization
o  initialize
very often used; keep only once

constants
o  flagBorder
return the bit mask of the border flag in the flags instVar

o  flagDisabled
return the bit mask of the initially disabled flag in the flags instVar

o  flagHScroll
return the bit mask of the horizontalScrollable flag in the flags instVar

o  flagHScrollMini
return the bit mask of the miniScrollerHorizontal flag in the flags instVar

o  flagInvisible
return the bit mask of the initially invisible flag in the flags instVar

o  flagMenuBar
return the bit mask of the menuBar flag in the flags instVar

o  flagVScroll
return the bit mask of the verticalScrollable flag in the flags instVar

o  flagVScrollMini
return the bit mask of the miniScrollerVertical flag in the flags instVar

help specs
o  helpSpec
UIHelpTool openOnClass:UISpecification

instance creation
o  from: aSpecOrSpecArray
create and return a new spec, given a literalArray encoding

Usage example(s):

example from ClassChooser PD code:

        UISpecification from:
             #(#FullSpec 
                #window: 
                    #(#WindowSpec 
                        #label: 'Unlabeled Canvas' 
                        #min: #(#Point 50 50 ) 
                        #bounds: #(#Rectangle 448 407 648 607 ) ) 
                #component: 
                    #(#SpecCollection
                        #collection: 
                            #(
                                #(#LabelSpec 
                                    #layout: #(#Point 0 2 ) 
                                    #label: 'Classes:' )
                                #(#SequenceViewSpec 
                                    #layout: #(#LayoutFrame 0 0 27 0 0 1 0 1 ) 
                                    #model: #classChoice 
                                    #tabable: false ) 
                                #(#InputFieldSpec 
                                    #layout: #(#LayoutFrame 70 0 2 0 0 1 25 0 )   
                                    #model: #classPattern ) ) ) )

o  fromView: aView
create and return a new instance, by walking over a view's hierarchy.
(used by the UIPainters pick-a-view function)

o  fromView: aView callBack: aTwoArgCallBackBlock
create and return a new instance, by walking over a view's hierarchy.
(used by the UIPainters pick-a-view function).
For every created subSpec-element, the callBackBlock is evaluated,
passing the specElement and the view as arguments.
This can be used to fill in additional information, which cannot be
extracted from the view (for example: names, aspects etc.).
The callBack argument may be nil.

o  fromViewWithLayout: aView

o  label: l layout: ly

o  model: m label: l layout: ly

o  model: m label: l select: s layout: ly

o  model: m layout: ly

o  model: m menu: l layout: ly

o  new
(comment from inherited method)
return an instance of myself without indexed variables

interface specs
o  basicsEditSpec

o  basicsEditSpecWithModel
This resource specification was automatically generated
by the UIPainter of ST/X.

Usage example(s):

     UIPainter new openOnClass:UISpecification andSelector:#basicsEditSpecWithModel

o  basicsEditSpecWithModelAndViewClass
This resource specification was automatically generated
by the UIPainter of ST/X.

Usage example(s):

     UIPainter new openOnClass:UISpecification andSelector:#basicsEditSpecWithModelAndViewClass

o  basicsEditSpecWithViewClass
This resource specification was automatically generated
by the UIPainter of ST/X.

Usage example(s):

     UIPainter new openOnClass:UISpecification andSelector:#basicsEditSpecWithViewClass

o  basicsEditSpecWithoutModelAndViewClass
This resource specification was automatically generated
by the UIPainter of ST/X.

Usage example(s):

     UIPainter new openOnClass:UISpecification andSelector:#basicsEditSpecWithoutModelAndViewClass

o  channelsEditSpec
This resource specification was automatically generated
by the UIPainter of ST/X.

Usage example(s):

     UIPainter new openOnClass:UISpecification andSelector:#channelsEditSpec

o  dragAndDropEditSpec
This resource specification was automatically generated
by the UIPainter of ST/X.

Usage example(s):

     UIPainter new openOnClass:UISpecification andSelector:#dragAndDropEditSpec

o  dragAndDropSpec
returns the drag & drop spec (drag, drop or dragAndDrop spec)

o  dragEditSpec
This resource specification was automatically generated
by the UIPainter of ST/X.

Usage example(s):

     UIPainter new openOnClass:UISpecification andSelector:#dragEditSpec

o  dropEditSpec
This resource specification was automatically generated
by the UIPainter of ST/X.

Usage example(s):

     UIPainter new openOnClass:UISpecification andSelector:#dropEditSpec

o  subChannelsEditSpec
This resource specification was automatically generated
by the UIPainter of ST/X.

Usage example(s):

     UIPainter new openOnClass:UISpecification andSelector:#subChannelsEditSpec

interface sub-specs
o  colorBGSubSpec
This resource specification was automatically generated
by the UIPainter of ST/X.

Usage example(s):

     UIPainter new openOnClass:UISpecification andSelector:#colorBGSubSpec

o  colorSubSpec
This resource specification was automatically generated
by the UIPainter of ST/X.

Usage example(s):

     UIPainter new openOnClass:UISpecification andSelector:#colorSubSpec

o  detailsInitSubSpec
This resource specification was automatically generated
by the UIPainter of ST/X.

Usage example(s):

     UIPainter new openOnClass:UISpecification andSelector:#detailsInitSubSpec

o  fontColorBorderSubSpec
This resource specification was automatically generated
by the UIPainter of ST/X.

Usage example(s):

     UIPainter new openOnClass:UISpecification andSelector:#fontColorBorderSubSpec

o  fontColorSubSpec
This resource specification was automatically generated
by the UIPainter of ST/X.

Usage example(s):

     UIPainter new openOnClass:UISpecification andSelector:#fontColorSubSpec

o  fontSubSpec
This resource specification was automatically generated
by the UIPainter of ST/X.

Usage example(s):

     UIPainter new openOnClass:UISpecification andSelector:#fontSubSpec

o  menuSubSpec
This resource specification was automatically generated
by the UIPainter of ST/X.

Usage example(s):

     UIPainter new openOnClass:UISpecification andSelector:#menuSubSpec

o  modelListSubSpec
This resource specification was automatically generated
by the UIPainter of ST/X.

Usage example(s):

     UIPainter new openOnClass:UISpecification andSelector:#modelListSubSpec

o  scrollerSubSpec
This resource specification was automatically generated
by the UIPainter of ST/X.

Usage example(s):

     UIPainter new openOnClass:UISpecification andSelector:#scrollerSubSpec

o  subSpecForAcceptCallBack
This resource specification was automatically generated
by the UIPainter of ST/X.

Usage example(s):

     UIPainter new openOnClass:UISpecification andSelector:#subSpecForAcceptCallBack

o  subSpecForAcceptChannel
This resource specification was automatically generated
by the UIPainter of ST/X.

Usage example(s):

     UIPainter new openOnClass:UISpecification andSelector:#subSpecForAcceptChannel

o  subSpecForBGColorChannel
This resource specification was automatically generated
by the UIPainter of ST/X.

Usage example(s):

     UIPainter new openOnClass:UISpecification andSelector:#subSpecForBGColorChannel

o  subSpecForDoubleClickCallBack
This resource specification was automatically generated
by the UIPainter of ST/X.

Usage example(s):

     UIPainter new openOnClass:UISpecification andSelector:#subSpecForDoubleClickCallBack

o  subSpecForDoubleClickChannel
This resource specification was automatically generated
by the UIPainter of ST/X.

Usage example(s):

     UIPainter new openOnClass:UISpecification andSelector:#subSpecForDoubleClickChannel

o  subSpecForEnableChannel
This resource specification was automatically generated
by the UIPainter of ST/X.

Usage example(s):

     UIPainter new openOnClass:UISpecification andSelector:#subSpecForEnableChannel

o  subSpecForEnableDisableColorChannel
This resource specification was automatically generated
by the UIPainter of ST/X.

Usage example(s):

     UIPainter new openOnClass:UISpecification andSelector:#subSpecForEnableDisableColorChannel

o  subSpecForFGColorChannel
This resource specification was automatically generated
by the UIPainter of ST/X.

Usage example(s):

     UIPainter new openOnClass:UISpecification andSelector:#subSpecForFGColorChannel

o  subSpecForID
This resource specification was automatically generated
by the UIPainter of ST/X.

Usage example(s):

     UIPainter new openOnClass:UISpecification andSelector:#subSpecForID

o  subSpecForIDAndModel
This resource specification was automatically generated
by the UIPainter of ST/X.

Usage example(s):

     UIPainter new openOnClass:UISpecification andSelector:#subSpecForIDAndModel

o  subSpecForIDAndModelAndViewClass
This resource specification was automatically generated
by the UIPainter of ST/X.

Usage example(s):

     UIPainter new openOnClass:UISpecification andSelector:#subSpecForIDAndModelAndViewClass

o  subSpecForIDAndViewClass
This resource specification was automatically generated
by the UIPainter of ST/X.

Usage example(s):

     UIPainter new openOnClass:UISpecification andSelector:#subSpecForIDAndViewClass

o  subSpecForLabelChannel
This resource specification was automatically generated
by the UIPainter of ST/X.

Usage example(s):

     UIPainter new openOnClass:UISpecification andSelector:#subSpecForLabelChannel

o  subSpecForMaxChannel
This resource specification was automatically generated
by the UIPainter of ST/X.

Usage example(s):

     UIPainter new openOnClass:UISpecification andSelector:#subSpecForMaxChannel

o  subSpecForMinChannel
This resource specification was automatically generated
by the UIPainter of ST/X.

Usage example(s):

     UIPainter new openOnClass:UISpecification andSelector:#subSpecForMinChannel

o  subSpecForModifiedChannel
This resource specification was automatically generated
by the UIPainter of ST/X.

Usage example(s):

     UIPainter new openOnClass:UISpecification andSelector:#subSpecForModifiedChannel

o  subSpecForPostBuildCallBack
This resource specification was automatically generated
by the UIPainter of ST/X.

Usage example(s):

     UIPainter new openOnClass:UISpecification andSelector:#subSpecForPostBuildCallBack

o  subSpecForSelectConditionCallBack
This resource specification was automatically generated
by the UIPainter of ST/X.

Usage example(s):

     UIPainter new openOnClass:UISpecification andSelector:#subSpecForSelectConditionCallBack

o  subSpecForSelectedValueChangeCallBack
This resource specification was automatically generated
by the UIPainter of ST/X.

Usage example(s):

     UIPainter new openOnClass:UISpecification andSelector:#subSpecForSelectedValueChangeCallBack

o  subSpecForValueChangeCallBack
This resource specification was automatically generated
by the UIPainter of ST/X.

Usage example(s):

     UIPainter new openOnClass:UISpecification andSelector:#subSpecForValueChangeCallBack

o  subSpecForVisibilityChannel
This resource specification was automatically generated
by the UIPainter of ST/X.

Usage example(s):

     UIPainter new openOnClass:UISpecification andSelector:#subSpecForVisibilityChannel

o  visibilityAndBackgroundChannelEditSpec
This resource specification was automatically generated
by the UIPainter of ST/X.

Usage example(s):

     UIPainter new openOnClass:UISpecification andSelector:#visibilityAndBackgroundChannelEditSpec

o  visibilityChannelEditSpec
This resource specification was automatically generated
by the UIPainter of ST/X.

Usage example(s):

     UIPainter new openOnClass:UISpecification andSelector:#visibilityChannelEditSpec

interface-painter
o  adapt: aSpec forAspect: anAspect channel: aChannel
generate an aspect adaptor, to access one of
my instance variables

o  adaptApects: aCollectionOfAspects to: aDirectory for: anInstance channel: aChannel
helper - adapting a bunch of aspects is so common ...
generate and install a aspect adaptors, for a list of aspect
(i.e. instance variable). Add each to the binding environment

o  adaptApects: aCollectionOfAspects to: aDirectory for: anInstance channel: aChannel converter: converterSymbol
helper - adapting a bunch of aspects and converting the type is so common ...
for each aspect in the list, generate an aspect adaptor and a typeconverter,
Add each to the binding environment.
converterSymbol is sent to TypeConverter to define the conversion
(typically something like #symbolOrNil)

o  addBindingsTo: aDictionary for: anInstance
not currently used

o  addBindingsTo: env for: anInstance channel: aChannel
add bindings as required to allow the GUI Painter to operate on an instance of me

o  addScrollBarBindingsTo: env for: anInstance channel: aChannel
add bindings as required to allow the GUI Painter to operate on an instance of me

o  commonReplacementClasses
used by the UIPainter's 'replace-by' function

o  helpSpecClass
return the class implementing the help texts of the field attributes

o  icon
This resource specification was automatically generated
by the ImageEditor of ST/X.

Usage example(s):

     self icon inspect
     ImageEditor openOnClass:self andSelector:#icon
     Icon flushCachedIcons

o  possiblePrintConverterTypes

o  slices
return the slices for the attribute sections in the GUI Painter

misc
o  newBindingsDictionary
create & return an instance of my private UIBindingsDictionary class.
This has the same functionality like ordinary dictionaries,
put passes the builder as instvars for those specs which need to know about
it.

o  updatedAspectHolderDataList: subAspectHolders forClassNamed: className
update subAspectHolders for aClass;
common helper for SubCanvas and ArbitraryComponents

printing support
o  prettyPrintSpecArray: spec on: aStream indent: i
just for your convenience: prettyPrint a specArray to aStream - it looks better that way

o  prettyPrintSpecArray: spec on: aStream indent: i isArrayElement: isArrayElement
just for your convenience: prettyPrint a specArray to aStream - it looks better that way

o  prettyPrintSpecArray: spec on: aStream tabLevel: i
prettyPrint - ST-80 compatible name

queries
o  canResizeSubComponents
answer whether included sub components can be resized or are handled by the view itself

o  isAbstract
Return if this class is an abstract class.
True is returned here for myself only; false for subclasses.
Abstract subclasses must redefine this again.

o  isLayoutContainer
answer whether corresponding view instances of the spec class can contain (and arrange) other view

o  resolveName: aName

o  resolveName: aName in: aBuilder

o  supportsDrag

o  supportsDrop

o  supportsLabel
answer whether corresponding view instances of the spec class can have labels

o  supportsSubComponents
answer whether instances of the spec class support sub components

o  uiMajorKeyBindingNameSpaceQuery

o  userFriendlyName
answer a good noticeable name of the widget for the GUI Painter and the documentation

o  viewClass
return the corresponding view class of the spec.
This is a fallback, being delegated from an instance method,
because it may depend on some attribute (see eg. ComboBoxSpec).

Usage example(s):

must have redefined #viewClass in the concrete spec-class.

Usage example(s):

     WindowSpec viewClass 
     ComboBoxSpec viewClass 

testing
o  testBuild
some specs to play with, extracted from PD code found
in the manchester archives:

The examples below will not fill the view with live
(no appModel provided)


found in a classSelection tool:

|spec builder view|

spec := UISpecification from:
#(#FullSpec
#window:
#(#WindowSpec
#label: 'Unlabeled Canvas'
#min: #(#Point 50 50 )
#bounds: #(#Rectangle 448 407 648 607 ) )
#component:
#(#SpecCollection
#collection:
#(
#(#LabelSpec
#layout: #(#Point 0 2 )
#label: 'Classes:' )
#(#SequenceViewSpec
#layout: #(#LayoutFrame 0 0 27 0 0 1 0 1 )
#model: #classChoice
#tabable: false )
#(#InputFieldSpec
#layout: #(#LayoutFrame 70 0 2 0 0 1 25 0 )
#model: #classPattern ) ) ) ).

builder := UIBuilder new.
view := spec buildViewFor:builder.
view open


Found in a file dialog goody:

|spec builder view|

spec := UISpecification from:
#(#FullSpec
#window:
#(#WindowSpec
#label: 'File Dialog'
#bounds: #(#Rectangle 16 155 485 402 ) )
#component:
#(#SpecCollection
#collection: #(
#(#LabelSpec
#layout: #(#Point 10 7 )
#label: 'File Name:' )
#(#InputFieldSpec
#layout: #(#Rectangle 10 30 168 51 )
#model: #filePatternHolder
#callbacksSpec:
#(#UIEventCallbackSubSpec
#valueChangeSelector: #typedNewFileName ) )
#(#SequenceViewSpec
#layout: #(#Rectangle 10 59 168 181 )
#model: #fileNamesHolder
#callbacksSpec:
#(#UIEventCallbackSubSpec
#valueChangeSelector: #changedFileName
#doubleClickSelector: #acceptedFileName ) )
#(#LabelSpec
#layout: #(#Point 10 186 )
#label: 'List Files of Type:' )
#(#LabelSpec
#layout: #(#Point 192 7 )
#label: 'Directories:' )
#(#SequenceViewSpec
#layout: #(#Rectangle 192 59 350 181 )
#model: #directoriesHolder
#callbacksSpec:
#(#UIEventCallbackSubSpec
#valueChangeSelector: #changedDirectory
#doubleClickSelector: #expandedOrContractedDirectory ) )
#(#LabelSpec
#layout: #(#Point 192 186 )
#label: 'Drives:' )
#(#ActionButtonSpec
#layout: #(#Rectangle 365 11 453 36 )
#model: #clickedOK
#label: 'OK'
#defaultable: true )
#(#ActionButtonSpec
#layout: #(#Rectangle 365 45 453 70 )
#model: #clickedCancel
#label: 'Cancel'
#defaultable: true )
#(#ComboBoxSpec
#layout: #(#Rectangle 10 209 168 230 )
#model: #fileTypesSelectionHolder
#callbacksSpec:
#(#UIEventCallbackSubSpec
#valueChangeSelector: #changedFileType )
#comboList: #fileTypesHolder )
#(#ComboBoxSpec
#layout: #(#Rectangle 192 209 350 230 )
#model: #driveListSelectionHolder
#callbacksSpec:
#(#UIEventCallbackSubSpec
#valueChangeSelector: #changedDrive )
#comboList: #driveListHolder )
#(#InputFieldSpec
#layout: #(#Rectangle 192 30 350 51 )
#flags: 0
#model: #currentDirectoryHolder
#callbacksSpec:
#(#UIEventCallbackSubSpec
#valueChangeSelector: #typedNewFileName )
#isReadOnly: true ) ) ) ).

builder := UIBuilder new.
view := spec buildViewFor:builder.
view open

o  testing
[exBegin]
|top|

top := StandardSystemView new.
top extent:200@350.
top label:'hello'.

(WindowSpec fromView:top) inspect
[exEnd]

[exBegin]
|top spec app|

top := StandardSystemView new.
top extent:200@350.
top label:'hello'.

spec := (FullSpec fromView:top).

app := ApplicationModel new.
app allButOpenFrom:spec.
app builder openWithExtent:nil.
[exEnd]

[exBegin]
|top l b|

top := StandardSystemView new.
top extent:200@350.
top label:'hello'.

l := Label label:'some label'.
l layout:(10@10) asLayout.
top addComponent:l.

b := Button label:'press me'.
b layout:((0.0@0.5) corner:(1.0@1.0)) asLayout.
top addComponent:b.

(FullSpec fromView:top) inspect
[exEnd]

[exBegin]
|top|

top := FileBrowser new.
top openAndWaitUntilVisible.

(FullSpec fromView:top) inspect
[exEnd]


Instance protocol:

accessing
o  activeHelpKey
the key used to ask the application for the tooltip text (via helpTextFor:)

o  activeHelpKey: aSymbolicKey
the key used to ask the application for the tooltip text (via helpTextFor:)

o  attributes

o  attributes: something

o  colors

o  colors: something

o  extent: extentPoint
very special - only an extent is specified

o  flags

o  flags: something

o  keepSpaceForOSXResizeHandleH
very very special - if running under OS/X, AND my right corner is 1.0,
then subtract the space needed for the window resize handle from my width.
This is used for the lower info-areas (in Launcher and Browser), to avoid
this area being overdrawn by the window's resize handle (which OSX draws inside the view).
May also be useful for other window systems, which place the resize handle there.
This is a boolean flag, which is ignored on non MACOS-X systems.

o  keepSpaceForOSXResizeHandleH: aBoolean
very very special - if running under OS/X, AND my right corner is 1.0,
then subtract the space needed for the window resize handle from the width.
This is used for the lower info-areas (in Launcher and Browser), to avoid
this area being overdrawn by the window's resize handle (which OSX draws inside the view).
May also be useful for other window systems, which place the resize handle there.
This is a boolean flag, which is ignored on non MACOS-X systems.

o  keepSpaceForOSXResizeHandleV
very very special - if running under OS/X, AND my bottom corner is 1.0,
then subtract the space needed for the window resize handle from my height.
This is used for the lower info-areas (in Launcher and Browser), to avoid
this area being overdrawn by the window's resize handle (which OSX draws inside the view).
May also be useful for other window systems, which place the resize handle there.
This is a boolean flag, which is ignored on non MACOS-X systems.

o  keepSpaceForOSXResizeHandleV: aBoolean
very very special - if running under OS/X, AND my bottom corner is 1.0,
then subtract the space needed for the window resize handle from the height.
This is used for the lower info-areas (in Launcher and Browser), to avoid
this area being overdrawn by the window's resize handle (which OSX draws inside the view).
May also be useful for other window systems, which place the resize handle there.
This is a boolean flag, which is ignored on non MACOS-X systems.

o  layout

o  layout: aLayout

o  name
name of the component, by which it can be retrieved from the builder via componentNamed:

o  name: aSymbol
name of the component, by which it can be retrieved from the builder via componentNamed:

o  postBuildCallback
very special - allow application to hook on component creation

o  postBuildCallback: anActionSelector
very special - allow application to hook on component creation

o  style

o  style: something

o  useDefaultExtent
very special - let view use its default extent

o  useDefaultExtent: aBoolean
very special - let view use its default extent

o  useDynamicPreferredHeight
very special - let view use its dynamic preferred height

o  useDynamicPreferredHeight: aBoolean
very special - let view use its dynamic preferred height

o  useDynamicPreferredWidth
very special - let view use its dynamic preferred width

o  useDynamicPreferredWidth: aBoolean
very special - let view use its dynamic preferred width

o  usePreferredHeight
very special - let view use its preferred height

o  usePreferredHeight: aBoolean
very special - let view use its preferred height

o  usePreferredWidth
very special - let view use its preferred width

o  usePreferredWidth: aBoolean
very special - let view use its preferred width

o  usedBackgroundColor

o  uuid
this UUID will be unique among all specs.
When the spec is used by the builder,
this uuid is set in the generated view;
Thus, all views which will ever be created will get this same
uuid assigned, and can thus be accessed using that id,
independent of their hierarchy, label, contents etc.
Useful for automation of Smalltalk applications (i.e. expecco).

If a spec has no uuid, it will get one assigned, when stored the next time
(and then remain fix forever)

o  uuid: aUUID
this UUID MUST be unique among all specs.
When the spec is used by the builder,
this uuid is set in the generated view;
Thus, all views which will ever be created will get this same
uuid assigned, and can thus be accessed using that id,
independent of their hierarchy, label, contents etc.
Useful for automation of Smalltalk applications (i.e. expecco).

If a spec has no uuid, it will get one assigned, when stored the next time
(and then remain fix forever)

accessing-channels
o  foregroundChannel
return nil here, so every component can be asked for it

accessing-color & font
o  backgroundColor
return nil here, so every component can be asked for it

accessing-dummies
o  defaultable

o  defaultable: aBoolean

o  initiallyInvisible

o  initiallyInvisible: aBoolean

o  labelSelector

o  listSelector

o  listSelector: aSelector

o  menuSelector

o  menuSelector: something

o  model
many subclasses redefine this to return a real model

o  modelSelector
return my model selector

o  tabable

o  tabable: something

o  translateLabel

building
o  addView: aView toMappingOfBuilder: aBuilder

o  basicCreateViewFor: aBuilder in: aParentView
low level create - no attributes are set.
Can be redefined for special creation (see arbitraryComponentSpec)

o  buildViewFor: aBuilder in: aView
create and set attributes.
No need to redefine

o  buildViewWithLayoutFor: aBuilder in: aParentView

o  callBackActionFor: aSelector with: aBuilder
given a callBack selector, return a corresponding action block

o  channel: aChannelSymbol inBuilder: aBuilder

o  createViewFor: aBuilder in: aParentView
low level create - no attributes are set.
Can be redefined for special creation (see arbitraryComponentSpec)

o  getBindingIn: aBuilder

o  getBindingIn: aBuilder binding: b

o  getLabel: label translate: translateLabel with: aBuilder
setup a view's label; if translate is true, the string is passed
through the resource translation mechanism (national language string)

o  layout: aLayout for: aView
aView top +

o  modelInBuilder: aBuilder
special VW kludge:

o  postBuildView: aView for: aBuilder
callback from builder, when a components subComponents
have been built - allows for late fixups ...

o  postCreateView: v for: aBuilder
code moved to the builder

o  setAttributesIn: aView with: aBuilder
having just built a view, now, set my attributes in aView
(actually, translating ST-80 messages to ST/X messages where required)

o  setChannelsIn: aView with: aBuilder
set channels in aView

o  setColorAttributesIn: v with: aBuilder

o  setKeyboardFocusAttributesIn: aView with: aBuilder

o  setLayoutsInLayoutContainer: aLayoutContainer
intentionally left blank here

o  setModelAttributeIn: aView with: aBuilder
set my model attributes to aView (or its model)

o  setModelIn: aView useIndex: useIndex with: aBuilder
special - allow constant list.

o  setViewBackgroundAttribute: backgroundColor in: aView with: aBuilder
setup a view's viewBackground

o  setVisibilityAttribute: invisible in: aView
attention: we may not unconditionally call beVisible here,

o  setVisibilityChannel: aHolder inView: aView with: aBuilder
set my visibility channel in aView

o  setupInitialLayoutFor: aView

o  validateModel: aModel forView: aView withValue: constantValue
nothing done here - but can be redefined to check
for the model being of correct type for that view,
and return an adapted or converted model, and/or
change the view's aspect/changeSelectors as appropriate.
(for example: being a selectionInList in a sequenceView)

o  validateSelectionInListModel: aModel forView: aView withValue: constantList
about to set the model.
If it's a plain valueHolder, change the listMessage
to #value

o  wrappedViewOf: aView
redefined in specs, which automatically build a wrapper
(scroller) around a component

converting
o  basicFromLiteralArrayEncoding: aSpecArray
read my attributes from aSpecArray.
Similar to Object>>fromLiteralArrayEncoding: ;
however, does NOT decode the arguments.

o  fromLiteralArrayEncoding: aSpecArray
read my attributes from aSpecArray

o  literalArrayEncoding
generate a literalArrayEncoding array for myself.
This uses #literalArrayEncodingSlotOrder which defines the slots and
order and #skippedInLiteralEncoding which defines slots to skip.
For most subclasses, there is no need to redefine those.

o  literalArrayEncodingSlotOrder
define the order in which inst-slots are saved when generating a literalArrayEncoding

o  prettyPrintString

o  skippedInLiteralEncoding
define the inst-slots which are skipped when generating a literalArrayEncoding;
(to skip the ones with default values.)

copying-private
o  postCopy
must copy collections as well

drag & drop
o  canDropSelector

o  canDropSelector: aSelector

o  displayObjectSelector

o  displayObjectSelector: aSelector

o  dragAndDropArgumentAt: aKey

o  dragAndDropArgumentAt: aKey put: anArgument

o  dragArgument

o  dragArgument: anArgument

o  dropArgument

o  dropArgument: anArgument

o  dropFeedBackSelector

o  dropFeedBackSelector: aSelector

o  dropObjectSelector

o  dropObjectSelector: aSelector

o  dropSelector

o  dropSelector: aSelector

o  enterSelector

o  enterSelector: aSelector

o  leaveSelector

o  leaveSelector: aSelector

o  overSelector

o  overSelector: aSelector

o  startDragSelector

o  startDragSelector: aSelector

enumerating
o  do: aBlock
evaluate aBlock for me and all of my sub-componen-specs.
To be redefined in specs which have children

o  findSpecForWhich: aBlock
find a spec

o  findSpecNamed: aName
find a spec by name

help specs
o  helpSpec

helpers
o  resolveColor: colorOrSymbol ifUnknown: relacementValue with: aBuilder
resolve colorOrSymol to a real color

o  resolveColor: colorOrSymbol with: aBuilder
resolve colorOrSymbol to a real color

o  sendMessage: selector withOptionalArg: optionalArg to: target

initialization
o  initialize

inspection
o  inspectorExtraAttributes
(comment from inherited method)
extra (pseudo instvar) entries to be shown in an inspector.
Answers a dictionary of aString -> aBlock.
aString is name of extra attribute and MUST start with minus ($-).
aBlock returns the object representing extra attribute

obsolete
o  feedBackSelector

** This is an obsolete interface - do not use it (it may vanish in future versions) **

o  feedBackSelector: aSelector

** This is an obsolete interface - do not use it (it may vanish in future versions) **

o  parseArg: argSpec
if the arg is another spec,
parse it and assign the resulting spec-object


** This is an obsolete interface - do not use it (it may vanish in future versions) **

o  parseSpecCollectionFrom: argArray

** This is an obsolete interface - do not use it (it may vanish in future versions) **

other attributes
o  canUIDrag
true, if I can be dragged out of the UIGallery. All draggable objects are marked
by the UIGalleryView::Canvas as such, to avoid the user from dragging out labels and other decoration.
cg: I think this is a bad design by ca, to place this UIGallery specific, private stuff
into the UISpec here - it ought to be an additional attribute placed onto the view
and handled in the UIGallery alone.

o  canUIDrag: aBool
true, if I can be dragged out of the UIGallery. All draggable objects are marked
by the UIGalleryView::Canvas as such, to avoid the user from dragging out labels and other decoration.
cg: I think this is a bad design by ca, to place this UIGallery specific, private stuff
into the UISpec here - it ought to be an additional attribute placed onto the view
and handled in the UIGallery alone.

o  keepUILayout
true, if when I am dragged out of the UIGallery, the layout should be preserved.
False by default, there is (currently) only one which has this attribute false
(the buttonPanel).

o  keepUILayout: aBool
true, if when I am dragged out of the UIGallery, the layout should be preserved.
False by default, there is (currently) only one which has this attribute false
(the buttonPanel).

o  otherAttributeAt: selector

o  otherAttributeAt: selector put: args
change arguments assigned to a selector; in case of nil arguments,
the selector will be removed from the otherAttributes list.

o  otherAttributesLiteralArrayEncoding: aColl skipping: skipped
generate a literalArrayEncoding array for other attributes

o  properties
(comment from inherited method)
return a collection of properties - nil if there is none.

Notice: properties and objectAttributes are similar mechanisms to dynamically add slots to an object.
Sigh: objectAttributes are older, and are named properties in Pharo.

The default implementation here uses a global WeakDictionary to store properties
This may be too slow for high frequency slot access,
therefore, some classes may redefine this for better performance.
Notice the mentioning of a WeakDictionary - read the classes documentation.

o  properties: something
(comment from inherited method)
set the collection of properties.

Notice: properties and objectAttributes are similar mechanisms to dynamically add slots to an object.
Sigh: objectAttributes are older, and are named properties in Pharo.

The default implementation here uses a global Dictionary to store
properties which may be too slow for high frequency change&update.
Therefore, some classes may redefine this for better performance.

o  propertyAt: aKey
(comment from inherited method)
return the property for a given key or raise an error if not found.
Such propertys behave like dynamically addable slots in languages like JavaScript.
They are much more expensive though, because they are not a ''natural'' mechanism in Smalltalk,
but instead simulated via an additional properties collection mechanism, which
defaults to using a dictionary holding per instance properties.
So only use it for seldom needed/seldom assigned properties,
and only if it is not easy to add an instance variable or class-private mechanism for that.

Notice: properties and objectAttributes are similar mechanisms to dynamically add slots to an object.
Sigh: objectAttributes are older, and are named properties in Pharo.

o  propertyAt: aKey put: something
(comment from inherited method)
store the property anObject referenced by key into the receiver.
Such propertys behave like dynamically addable slots in languages like JavaScript.
They are much more expensive though, because they are not a ''natural'' mechanism in Smalltalk,
but instead simulated via an additional properties collection mechanism, which
defaults to using a dictionary holding per instance properties.
So only use it for seldom needed/seldom assigned properties,
and only if it is not easy to add an instance variable or class-private mechanism for that.

Notice: properties and objectAttributes are similar mechanisms to dynamically add slots to an object.
Sigh: objectAttributes are older, and are named properties in Pharo.

o  setPropertiesIn: aView with: aBuilder
set properties; DragAndDrop

o  viewClassName

o  viewClassName: aSymbol

o  viewCreationMessage

o  viewCreationMessage: aSymbol

parsing a view
o  attributesFromView: aView
(try to) extract the attributes from the view

o  dragAndDropArgumentsFromView: aView
(try to) extract the drag & drop attributes from the view

o  fromView: aView
extract attributes from aView

o  fromView: aView callBack: aBlock
extract attributes from aView;
if aBlock is non-nil, call it for me and the view I copied from.

o  layoutFromView: aView

o  tabableFromView: aView
(try to) extract the canTab attribute from the view

printing & storing
o  printOn: aStream
(comment from inherited method)
append a user printed representation of the receiver to aStream.
The format is suitable for a human - not meant to be read back.

The default here is to output the receiver's class name.
BUT: this method is heavily redefined for objects which
can print prettier.

queries
o  documentFileName
returns the basename of the file, which contains the html documentation for
the widget (shown in the UI-Painters widget-doc).

o  hasApplication: aBuilder

o  hasCharacterOrientedLabel
this is true, if my label is not an image

o  hasKeyboardFocusInitially
this is true, if will catch the focus initially (there should only be one...)

o  resolveName: className
Modified (format): / 30-12-2011 / 11:01:51 / cg

o  resolveName: className in: aBuilder
Modified (format): / 30-12-2011 / 11:01:56 / cg

o  usefulReplacementSpecClassNames
returns a list of possible replacement UISpec-class names.

o  usefulReplacementSpecClasses
returns a list of possible replacement UISpec-classes.

o  userFriendlyName
answer a good noticeable name of the widget for the GUI Painter and the documentation

o  viewClass
returns the view class to be created for that spec
This is an instance method, since it may depend on some attribute.
However, here we ask the class, to allow for class-specific defaults.

queries-UIDefiner
o  actionSelectors
return my action selectors (these generate callBack stub methods in the definer)

o  aspectSelectors
return my aspect selectors (these generate aspect methods in the definer)

o  basicAspectSelectors
add more aspect selectors (these generate aspect methods in the definer)

o  defaultModelClassFor: someAspect
used by the UIPainter's aspectGenerator;
Return the default class for some aspect's value.

o  defaultModelIsCallBackMethodSelector: someAspect
used by the UIPainters aspectGenerator;
Return true if the aspect specifies an action method
(or callBack) as opposed to a real model value.

o  defaultModelValueFor: someAspect
used by the UIPainters aspectGenerator;
Return the default value for some aspect.

o  defaultModelValueStringFor: someAspect
used by the UIPainters aspectGenerator;
Return the default value-generating string for some aspect.

o  uiParametersForViewClass: classOfView
is the class of the view known?

o  valueSelectors
return my value selectors (these could generate simple value-returning stub methods in the definer)

queries-UIPainter
o  hasLayout
return true, if my view/component optionally has a layout.
All Views and Components except for the lineSegment, spline and polygons, do
support layouts. The other are defined by a set of controlling points.

o  icon

o  nameOfMainAspect
return the name of the main aspect; this is used in the UIPainters tree
to show the aspect of the widget.
For example, for a checkBox, this is the name of the model-aspect;
for a Label, this might be the name of the labelChannel-aspect.

o  needsRebuildForAttributes
return true, if my view must be rebuild
when an attribute changes.
True may be returned by a concrete subclass,
if attribute changes imply a view-class change
(such as horizontal/vertical)

o  realViewClass

** This is an obsolete interface - do not use it (it may vanish in future versions) **

o  realViewClassFor: aBuilderOrNil
returns the real view class to be created for that spec.
That is typically the UISpecs viewClass (i.e. what it thinks),
but can be overwritten per instance in some widgets (and specified in
the UIPainter).

style
o  setStyle: aStyle in: aView
backward compatibility

o  setStyle: aStyle in: aView with: aBuilder
set style for a view

testing
o  isWindowSpec

visiting
o  acceptUISpecVisitor: aVisitor
Double dispatch back to the visitor, passing my type encoded in
the selector (visitor pattern)


Private classes:

    UIBindingsIdentityDictionary
    UIMajorKeyBindingNameSpaceQuery


ST/X 7.7.0.0; WebServer 1.702 at 20f6060372b9.unknown:8081; Fri, 13 Dec 2024 15:17:46 GMT