|
Class: UISpecification
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
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.
copyrightCOPYRIGHT (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 initialization
-
initialize
-
very often used; keep only once
constants
-
flagBorder
-
return the bit mask of the border flag in the flags instVar
-
flagDisabled
-
return the bit mask of the initially disabled flag in the flags instVar
-
flagHScroll
-
return the bit mask of the horizontalScrollable flag in the flags instVar
-
flagHScrollMini
-
return the bit mask of the miniScrollerHorizontal flag in the flags instVar
-
flagInvisible
-
return the bit mask of the initially invisible flag in the flags instVar
-
flagMenuBar
-
return the bit mask of the menuBar flag in the flags instVar
-
flagVScroll
-
return the bit mask of the verticalScrollable flag in the flags instVar
-
flagVScrollMini
-
return the bit mask of the miniScrollerVertical flag in the flags instVar
help specs
-
helpSpec
-
UIHelpTool openOnClass:UISpecification
instance creation
-
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 ) ) ) )
|
-
fromView: aView
-
create and return a new instance, by walking over a view's hierarchy.
(used by the UIPainters pick-a-view function)
-
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.
-
fromViewWithLayout: aView
-
-
label: l layout: ly
-
-
model: m label: l layout: ly
-
-
model: m label: l select: s layout: ly
-
-
model: m layout: ly
-
-
model: m menu: l layout: ly
-
-
new
-
(comment from inherited method)
return an instance of myself without indexed variables
interface specs
-
basicsEditSpec
-
-
basicsEditSpecWithModel
-
This resource specification was automatically generated
by the UIPainter of ST/X.
Usage example(s):
UIPainter new openOnClass:UISpecification andSelector:#basicsEditSpecWithModel
|
-
basicsEditSpecWithModelAndViewClass
-
This resource specification was automatically generated
by the UIPainter of ST/X.
Usage example(s):
UIPainter new openOnClass:UISpecification andSelector:#basicsEditSpecWithModelAndViewClass
|
-
basicsEditSpecWithViewClass
-
This resource specification was automatically generated
by the UIPainter of ST/X.
Usage example(s):
UIPainter new openOnClass:UISpecification andSelector:#basicsEditSpecWithViewClass
|
-
basicsEditSpecWithoutModelAndViewClass
-
This resource specification was automatically generated
by the UIPainter of ST/X.
Usage example(s):
UIPainter new openOnClass:UISpecification andSelector:#basicsEditSpecWithoutModelAndViewClass
|
-
channelsEditSpec
-
This resource specification was automatically generated
by the UIPainter of ST/X.
Usage example(s):
UIPainter new openOnClass:UISpecification andSelector:#channelsEditSpec
|
-
dragAndDropEditSpec
-
This resource specification was automatically generated
by the UIPainter of ST/X.
Usage example(s):
UIPainter new openOnClass:UISpecification andSelector:#dragAndDropEditSpec
|
-
dragAndDropSpec
-
returns the drag & drop spec (drag, drop or dragAndDrop spec)
-
dragEditSpec
-
This resource specification was automatically generated
by the UIPainter of ST/X.
Usage example(s):
UIPainter new openOnClass:UISpecification andSelector:#dragEditSpec
|
-
dropEditSpec
-
This resource specification was automatically generated
by the UIPainter of ST/X.
Usage example(s):
UIPainter new openOnClass:UISpecification andSelector:#dropEditSpec
|
-
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
-
colorBGSubSpec
-
This resource specification was automatically generated
by the UIPainter of ST/X.
Usage example(s):
UIPainter new openOnClass:UISpecification andSelector:#colorBGSubSpec
|
-
colorSubSpec
-
This resource specification was automatically generated
by the UIPainter of ST/X.
Usage example(s):
UIPainter new openOnClass:UISpecification andSelector:#colorSubSpec
|
-
detailsInitSubSpec
-
This resource specification was automatically generated
by the UIPainter of ST/X.
Usage example(s):
UIPainter new openOnClass:UISpecification andSelector:#detailsInitSubSpec
|
-
fontColorBorderSubSpec
-
This resource specification was automatically generated
by the UIPainter of ST/X.
Usage example(s):
UIPainter new openOnClass:UISpecification andSelector:#fontColorBorderSubSpec
|
-
fontColorSubSpec
-
This resource specification was automatically generated
by the UIPainter of ST/X.
Usage example(s):
UIPainter new openOnClass:UISpecification andSelector:#fontColorSubSpec
|
-
fontSubSpec
-
This resource specification was automatically generated
by the UIPainter of ST/X.
Usage example(s):
UIPainter new openOnClass:UISpecification andSelector:#fontSubSpec
|
-
menuSubSpec
-
This resource specification was automatically generated
by the UIPainter of ST/X.
Usage example(s):
UIPainter new openOnClass:UISpecification andSelector:#menuSubSpec
|
-
modelListSubSpec
-
This resource specification was automatically generated
by the UIPainter of ST/X.
Usage example(s):
UIPainter new openOnClass:UISpecification andSelector:#modelListSubSpec
|
-
scrollerSubSpec
-
This resource specification was automatically generated
by the UIPainter of ST/X.
Usage example(s):
UIPainter new openOnClass:UISpecification andSelector:#scrollerSubSpec
|
-
subSpecForAcceptCallBack
-
This resource specification was automatically generated
by the UIPainter of ST/X.
Usage example(s):
UIPainter new openOnClass:UISpecification andSelector:#subSpecForAcceptCallBack
|
-
subSpecForAcceptChannel
-
This resource specification was automatically generated
by the UIPainter of ST/X.
Usage example(s):
UIPainter new openOnClass:UISpecification andSelector:#subSpecForAcceptChannel
|
-
subSpecForBGColorChannel
-
This resource specification was automatically generated
by the UIPainter of ST/X.
Usage example(s):
UIPainter new openOnClass:UISpecification andSelector:#subSpecForBGColorChannel
|
-
subSpecForDoubleClickCallBack
-
This resource specification was automatically generated
by the UIPainter of ST/X.
Usage example(s):
UIPainter new openOnClass:UISpecification andSelector:#subSpecForDoubleClickCallBack
|
-
subSpecForDoubleClickChannel
-
This resource specification was automatically generated
by the UIPainter of ST/X.
Usage example(s):
UIPainter new openOnClass:UISpecification andSelector:#subSpecForDoubleClickChannel
|
-
subSpecForEnableChannel
-
This resource specification was automatically generated
by the UIPainter of ST/X.
Usage example(s):
UIPainter new openOnClass:UISpecification andSelector:#subSpecForEnableChannel
|
-
subSpecForEnableDisableColorChannel
-
This resource specification was automatically generated
by the UIPainter of ST/X.
Usage example(s):
UIPainter new openOnClass:UISpecification andSelector:#subSpecForEnableDisableColorChannel
|
-
subSpecForFGColorChannel
-
This resource specification was automatically generated
by the UIPainter of ST/X.
Usage example(s):
UIPainter new openOnClass:UISpecification andSelector:#subSpecForFGColorChannel
|
-
subSpecForID
-
This resource specification was automatically generated
by the UIPainter of ST/X.
Usage example(s):
UIPainter new openOnClass:UISpecification andSelector:#subSpecForID
|
-
subSpecForIDAndModel
-
This resource specification was automatically generated
by the UIPainter of ST/X.
Usage example(s):
UIPainter new openOnClass:UISpecification andSelector:#subSpecForIDAndModel
|
-
subSpecForIDAndModelAndViewClass
-
This resource specification was automatically generated
by the UIPainter of ST/X.
Usage example(s):
UIPainter new openOnClass:UISpecification andSelector:#subSpecForIDAndModelAndViewClass
|
-
subSpecForIDAndViewClass
-
This resource specification was automatically generated
by the UIPainter of ST/X.
Usage example(s):
UIPainter new openOnClass:UISpecification andSelector:#subSpecForIDAndViewClass
|
-
subSpecForLabelChannel
-
This resource specification was automatically generated
by the UIPainter of ST/X.
Usage example(s):
UIPainter new openOnClass:UISpecification andSelector:#subSpecForLabelChannel
|
-
subSpecForMaxChannel
-
This resource specification was automatically generated
by the UIPainter of ST/X.
Usage example(s):
UIPainter new openOnClass:UISpecification andSelector:#subSpecForMaxChannel
|
-
subSpecForMinChannel
-
This resource specification was automatically generated
by the UIPainter of ST/X.
Usage example(s):
UIPainter new openOnClass:UISpecification andSelector:#subSpecForMinChannel
|
-
subSpecForModifiedChannel
-
This resource specification was automatically generated
by the UIPainter of ST/X.
Usage example(s):
UIPainter new openOnClass:UISpecification andSelector:#subSpecForModifiedChannel
|
-
subSpecForPostBuildCallBack
-
This resource specification was automatically generated
by the UIPainter of ST/X.
Usage example(s):
UIPainter new openOnClass:UISpecification andSelector:#subSpecForPostBuildCallBack
|
-
subSpecForSelectConditionCallBack
-
This resource specification was automatically generated
by the UIPainter of ST/X.
Usage example(s):
UIPainter new openOnClass:UISpecification andSelector:#subSpecForSelectConditionCallBack
|
-
subSpecForSelectedValueChangeCallBack
-
This resource specification was automatically generated
by the UIPainter of ST/X.
Usage example(s):
UIPainter new openOnClass:UISpecification andSelector:#subSpecForSelectedValueChangeCallBack
|
-
subSpecForValueChangeCallBack
-
This resource specification was automatically generated
by the UIPainter of ST/X.
Usage example(s):
UIPainter new openOnClass:UISpecification andSelector:#subSpecForValueChangeCallBack
|
-
subSpecForVisibilityChannel
-
This resource specification was automatically generated
by the UIPainter of ST/X.
Usage example(s):
UIPainter new openOnClass:UISpecification andSelector:#subSpecForVisibilityChannel
|
-
visibilityAndBackgroundChannelEditSpec
-
This resource specification was automatically generated
by the UIPainter of ST/X.
Usage example(s):
UIPainter new openOnClass:UISpecification andSelector:#visibilityAndBackgroundChannelEditSpec
|
-
visibilityChannelEditSpec
-
This resource specification was automatically generated
by the UIPainter of ST/X.
Usage example(s):
UIPainter new openOnClass:UISpecification andSelector:#visibilityChannelEditSpec
|
interface-painter
-
adapt: aSpec forAspect: anAspect channel: aChannel
-
generate an aspect adaptor, to access one of
my instance variables
-
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
-
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)
-
addBindingsTo: aDictionary for: anInstance
-
not currently used
-
addBindingsTo: env for: anInstance channel: aChannel
-
add bindings as required to allow the GUI Painter to operate on an instance of me
-
addScrollBarBindingsTo: env for: anInstance channel: aChannel
-
add bindings as required to allow the GUI Painter to operate on an instance of me
-
commonReplacementClasses
-
used by the UIPainter's 'replace-by' function
-
helpSpecClass
-
return the class implementing the help texts of the field attributes
-
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
|
-
possiblePrintConverterTypes
-
-
slices
-
return the slices for the attribute sections in the GUI Painter
misc
-
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.
-
updatedAspectHolderDataList: subAspectHolders forClassNamed: className
-
update subAspectHolders for aClass;
common helper for SubCanvas and ArbitraryComponents
printing support
-
prettyPrintSpecArray: spec on: aStream indent: i
-
just for your convenience: prettyPrint a specArray to aStream - it looks better that way
-
prettyPrintSpecArray: spec on: aStream indent: i isArrayElement: isArrayElement
-
just for your convenience: prettyPrint a specArray to aStream - it looks better that way
-
prettyPrintSpecArray: spec on: aStream tabLevel: i
-
prettyPrint - ST-80 compatible name
queries
-
canResizeSubComponents
-
answer whether included sub components can be resized or are handled by the view itself
-
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.
-
isLayoutContainer
-
answer whether corresponding view instances of the spec class can contain (and arrange) other view
-
resolveName: aName
-
-
resolveName: aName in: aBuilder
-
-
supportsDrag
-
-
supportsDrop
-
-
supportsLabel
-
answer whether corresponding view instances of the spec class can have labels
-
supportsSubComponents
-
answer whether instances of the spec class support sub components
-
uiMajorKeyBindingNameSpaceQuery
-
-
userFriendlyName
-
answer a good noticeable name of the widget for the GUI Painter and the documentation
-
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
-
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
-
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]
accessing
-
activeHelpKey
-
the key used to ask the application for the tooltip text (via helpTextFor:)
-
activeHelpKey: aSymbolicKey
-
the key used to ask the application for the tooltip text (via helpTextFor:)
-
attributes
-
-
attributes: something
-
-
colors
-
-
colors: something
-
-
extent: extentPoint
-
very special - only an extent is specified
-
flags
-
-
flags: something
-
-
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.
-
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.
-
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.
-
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.
-
layout
-
-
layout: aLayout
-
-
name
-
name of the component, by which it can be retrieved from the builder via componentNamed:
-
name: aSymbol
-
name of the component, by which it can be retrieved from the builder via componentNamed:
-
postBuildCallback
-
very special - allow application to hook on component creation
-
postBuildCallback: anActionSelector
-
very special - allow application to hook on component creation
-
style
-
-
style: something
-
-
useDefaultExtent
-
very special - let view use its default extent
-
useDefaultExtent: aBoolean
-
very special - let view use its default extent
-
useDynamicPreferredHeight
-
very special - let view use its dynamic preferred height
-
useDynamicPreferredHeight: aBoolean
-
very special - let view use its dynamic preferred height
-
useDynamicPreferredWidth
-
very special - let view use its dynamic preferred width
-
useDynamicPreferredWidth: aBoolean
-
very special - let view use its dynamic preferred width
-
usePreferredHeight
-
very special - let view use its preferred height
-
usePreferredHeight: aBoolean
-
very special - let view use its preferred height
-
usePreferredWidth
-
very special - let view use its preferred width
-
usePreferredWidth: aBoolean
-
very special - let view use its preferred width
-
usedBackgroundColor
-
-
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)
-
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
-
foregroundChannel
-
return nil here, so every component can be asked for it
accessing-color & font
-
backgroundColor
-
return nil here, so every component can be asked for it
accessing-dummies
-
defaultable
-
-
defaultable: aBoolean
-
-
initiallyInvisible
-
-
initiallyInvisible: aBoolean
-
-
labelSelector
-
-
listSelector
-
-
listSelector: aSelector
-
-
menuSelector
-
-
menuSelector: something
-
-
model
-
many subclasses redefine this to return a real model
-
modelSelector
-
return my model selector
-
tabable
-
-
tabable: something
-
-
translateLabel
-
building
-
addView: aView toMappingOfBuilder: aBuilder
-
-
basicCreateViewFor: aBuilder in: aParentView
-
low level create - no attributes are set.
Can be redefined for special creation (see arbitraryComponentSpec)
-
buildViewFor: aBuilder in: aView
-
create and set attributes.
No need to redefine
-
buildViewWithLayoutFor: aBuilder in: aParentView
-
-
callBackActionFor: aSelector with: aBuilder
-
given a callBack selector, return a corresponding action block
-
channel: aChannelSymbol inBuilder: aBuilder
-
-
createViewFor: aBuilder in: aParentView
-
low level create - no attributes are set.
Can be redefined for special creation (see arbitraryComponentSpec)
-
getBindingIn: aBuilder
-
-
getBindingIn: aBuilder binding: b
-
-
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)
-
layout: aLayout for: aView
-
aView top +
-
modelInBuilder: aBuilder
-
special VW kludge:
-
postBuildView: aView for: aBuilder
-
callback from builder, when a components subComponents
have been built - allows for late fixups ...
-
postCreateView: v for: aBuilder
-
code moved to the builder
-
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)
-
setChannelsIn: aView with: aBuilder
-
set channels in aView
-
setColorAttributesIn: v with: aBuilder
-
-
setKeyboardFocusAttributesIn: aView with: aBuilder
-
-
setLayoutsInLayoutContainer: aLayoutContainer
-
intentionally left blank here
-
setModelAttributeIn: aView with: aBuilder
-
set my model attributes to aView (or its model)
-
setModelIn: aView useIndex: useIndex with: aBuilder
-
special - allow constant list.
-
setViewBackgroundAttribute: backgroundColor in: aView with: aBuilder
-
setup a view's viewBackground
-
setVisibilityAttribute: invisible in: aView
-
attention: we may not unconditionally call beVisible here,
-
setVisibilityChannel: aHolder inView: aView with: aBuilder
-
set my visibility channel in aView
-
setupInitialLayoutFor: aView
-
-
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)
-
validateSelectionInListModel: aModel forView: aView withValue: constantList
-
about to set the model.
If it's a plain valueHolder, change the listMessage
to #value
-
wrappedViewOf: aView
-
redefined in specs, which automatically build a wrapper
(scroller) around a component
converting
-
basicFromLiteralArrayEncoding: aSpecArray
-
read my attributes from aSpecArray.
Similar to Object>>fromLiteralArrayEncoding: ;
however, does NOT decode the arguments.
-
fromLiteralArrayEncoding: aSpecArray
-
read my attributes from aSpecArray
-
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.
-
literalArrayEncodingSlotOrder
-
define the order in which inst-slots are saved when generating a literalArrayEncoding
-
prettyPrintString
-
-
skippedInLiteralEncoding
-
define the inst-slots which are skipped when generating a literalArrayEncoding;
(to skip the ones with default values.)
copying-private
-
postCopy
-
must copy collections as well
drag & drop
-
canDropSelector
-
-
canDropSelector: aSelector
-
-
displayObjectSelector
-
-
displayObjectSelector: aSelector
-
-
dragAndDropArgumentAt: aKey
-
-
dragAndDropArgumentAt: aKey put: anArgument
-
-
dragArgument
-
-
dragArgument: anArgument
-
-
dropArgument
-
-
dropArgument: anArgument
-
-
dropFeedBackSelector
-
-
dropFeedBackSelector: aSelector
-
-
dropObjectSelector
-
-
dropObjectSelector: aSelector
-
-
dropSelector
-
-
dropSelector: aSelector
-
-
enterSelector
-
-
enterSelector: aSelector
-
-
leaveSelector
-
-
leaveSelector: aSelector
-
-
overSelector
-
-
overSelector: aSelector
-
-
startDragSelector
-
-
startDragSelector: aSelector
-
enumerating
-
do: aBlock
-
evaluate aBlock for me and all of my sub-componen-specs.
To be redefined in specs which have children
-
findSpecForWhich: aBlock
-
find a spec
-
findSpecNamed: aName
-
find a spec by name
help specs
-
helpSpec
-
helpers
-
resolveColor: colorOrSymbol ifUnknown: relacementValue with: aBuilder
-
resolve colorOrSymol to a real color
-
resolveColor: colorOrSymbol with: aBuilder
-
resolve colorOrSymbol to a real color
-
sendMessage: selector withOptionalArg: optionalArg to: target
-
initialization
-
initialize
-
inspection
-
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
-
feedBackSelector
-
** This is an obsolete interface - do not use it (it may vanish in future versions) **
-
feedBackSelector: aSelector
-
** This is an obsolete interface - do not use it (it may vanish in future versions) **
-
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) **
-
parseSpecCollectionFrom: argArray
-
** This is an obsolete interface - do not use it (it may vanish in future versions) **
other attributes
-
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.
-
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.
-
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).
-
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).
-
otherAttributeAt: selector
-
-
otherAttributeAt: selector put: args
-
change arguments assigned to a selector; in case of nil arguments,
the selector will be removed from the otherAttributes list.
-
otherAttributesLiteralArrayEncoding: aColl skipping: skipped
-
generate a literalArrayEncoding array for other attributes
-
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.
-
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.
-
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.
-
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.
-
setPropertiesIn: aView with: aBuilder
-
set properties; DragAndDrop
-
viewClassName
-
-
viewClassName: aSymbol
-
-
viewCreationMessage
-
-
viewCreationMessage: aSymbol
-
parsing a view
-
attributesFromView: aView
-
(try to) extract the attributes from the view
-
dragAndDropArgumentsFromView: aView
-
(try to) extract the drag & drop attributes from the view
-
fromView: aView
-
extract attributes from aView
-
fromView: aView callBack: aBlock
-
extract attributes from aView;
if aBlock is non-nil, call it for me and the view I copied from.
-
layoutFromView: aView
-
-
tabableFromView: aView
-
(try to) extract the canTab attribute from the view
printing & storing
-
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
-
documentFileName
-
returns the basename of the file, which contains the html documentation for
the widget (shown in the UI-Painters widget-doc).
-
hasApplication: aBuilder
-
-
hasCharacterOrientedLabel
-
this is true, if my label is not an image
-
hasKeyboardFocusInitially
-
this is true, if will catch the focus initially (there should only be one...)
-
resolveName: className
-
Modified (format): / 30-12-2011 / 11:01:51 / cg
-
resolveName: className in: aBuilder
-
Modified (format): / 30-12-2011 / 11:01:56 / cg
-
usefulReplacementSpecClassNames
-
returns a list of possible replacement UISpec-class names.
-
usefulReplacementSpecClasses
-
returns a list of possible replacement UISpec-classes.
-
userFriendlyName
-
answer a good noticeable name of the widget for the GUI Painter and the documentation
-
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
-
actionSelectors
-
return my action selectors (these generate callBack stub methods in the definer)
-
aspectSelectors
-
return my aspect selectors (these generate aspect methods in the definer)
-
basicAspectSelectors
-
add more aspect selectors (these generate aspect methods in the definer)
-
defaultModelClassFor: someAspect
-
used by the UIPainter's aspectGenerator;
Return the default class for some aspect's value.
-
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.
-
defaultModelValueFor: someAspect
-
used by the UIPainters aspectGenerator;
Return the default value for some aspect.
-
defaultModelValueStringFor: someAspect
-
used by the UIPainters aspectGenerator;
Return the default value-generating string for some aspect.
-
uiParametersForViewClass: classOfView
-
is the class of the view known?
-
valueSelectors
-
return my value selectors (these could generate simple value-returning stub methods in the definer)
queries-UIPainter
-
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.
-
icon
-
-
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.
-
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)
-
realViewClass
-
** This is an obsolete interface - do not use it (it may vanish in future versions) **
-
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
-
setStyle: aStyle in: aView
-
backward compatibility
-
setStyle: aStyle in: aView with: aBuilder
-
set style for a view
testing
-
isWindowSpec
-
visiting
-
acceptUISpecVisitor: aVisitor
-
Double dispatch back to the visitor, passing my type encoded in
the selector (visitor pattern)
UIBindingsIdentityDictionary
UIMajorKeyBindingNameSpaceQuery
|