ToolBuilder-Kernel

PluggableActionButtonSpec
PluggableActionButtonSpec is intentded as a HINT for the builder that this widget will be used as push (action) button. Unless explicitly supported it will be automatically substituted by PluggableButton.
buildWith:
PluggableButtonSpec
A button, both for firing as well as used in radio-button style (e.g., carrying a selection).
Instance variables:
action <Symbol> The action to perform when the button is fired.
label <Symbol|String> The selector for retrieving the button's label or label directly.
state <Symbol> The selector for retrieving the button's selection state.
enabled <Symbo> The selector for retrieving the button's enabled state.
color <Symbo> The selector for retrieving the button color.
help <String> The balloon help for the button.
action
Answer the action to be performed by the receiver
action:
Indicate the action to be performed by the receiver
buildWith:
color
Answer the selector for retrieving the button's color
color:
Indicate the selector for retrieving the button's color
enabled
Answer the selector for retrieving the button's enablement
enabled:
Indicate the selector for retrieving the button's enablement
help
Answer the help text for this button
help:
Indicate the help text for this button
label
Answer the label (or the selector for retrieving the label)
label:
Indicate the selector for retrieving the label
state
Answer the selector for retrieving the button's state
state:
Indicate the selector for retrieving the button's state
PluggableCheckBoxSpec
PluggableCheckBox is intended as a HINT for the builder that this widget will be used as check box. Unless explicitly supported it will be automatically substituted by PluggableButton.
buildWith:
PluggableCompositeSpec
A composite user interface element.
Instance variables:
children <Symbol|Collection> Symbol to retrieve children or children directly
layout <Symbol> The layout for this composite.
children
Answer the selector to retrieve this panel's children
children:
Indicate the selector to retrieve this panel's children
layout
Answer the symbol indicating the layout of the composite:
#proportional (default): Use frames as appropriate.
#horizontal: Arrange the elements horizontally
#vertical: Arrange the elements vertically.
layout:
Answer the symbol indicating the layout of the composite:
#proportional (default): Use frames as appropriate.
#horizontal: Arrange the elements horizontally
#vertical: Arrange the elements vertically.
PluggableInputFieldSpec
PluggableInputField is intended as a HINT for the builder that this widget will be used as a single line input field. Unless explicitly supported it will be automatically substituted by PluggableText.
buildWith:
PluggableListSpec
A single selection list element.
Instance variables:
list <Symbol> The selector to retrieve the list elements.
getIndex <Symbol> The selector to retrieve the list selection index.
setIndex <Symbol> The selector to set the list selection index.
getSelected <Symbol> The selector to retrieve the list selection.
setSelected <Symbol> The selector to set the list selection.
menu <Symbol> The selector to offer (to retrieve?) the context menu.
keyPress <Symbol> The selector to invoke for handling keyboard shortcuts.
autoDeselect <Boolean> Whether the list should allow automatic deselection or not.
dragItem <Symbol> Selector to initiate a drag action on an item
dropItem <Symbol> Selector to initiate a drop action of an item
dropAccept <Symbol> Selector to determine whether a drop would be accepted
autoDeselect
Answer whether this tree can be automatically deselected
autoDeselect:
Indicate whether this tree can be automatically deselected
buildWith:
dragItem
Answer the selector for dragging an item
dragItem:
Set the selector for dragging an item
dropAccept
Answer the selector to determine whether a drop would be accepted
dropAccept:
Answer the selector to determine whether a drop would be accepted
dropItem
Answer the selector for dropping an item
dropItem:
Set the selector for dropping an item
getIndex
Answer the selector for retrieving the list's selection index
getIndex:
Indicate the selector for retrieving the list's selection index
getSelected
Answer the selector for retrieving the list selection
getSelected:
Indicate the selector for retrieving the list selection
keyPress
Answer the selector for invoking the list's keyPress handler
keyPress:
Indicate the selector for invoking the list's keyPress handler
list
Answer the selector for retrieving the list contents
list:
Indicate the selector for retrieving the list contents
menu
Answer the selector for retrieving the list's menu
menu:
Indicate the selector for retrieving the list's menu
setIndex
Answer the selector for setting the list's selection index
setIndex:
Answer the selector for setting the list's selection index
setSelected
Answer the selector for setting the list selection
setSelected:
Indicate the selector for setting the list selection
PluggableMenuItemSpec
A PluggableMenuItemSpec is xxxxxxxxx.
Instance Variables
action: <Object>
checked: <Object>
enabled: <Object>
help: <Object>
label: <Object>
separator: <Object>
subMenu: <Object>
action
- xxxxx
checked
- xxxxx
enabled
- xxxxx
help
- xxxxx
label
- xxxxx
separator
- xxxxx
subMenu
- xxxxx
action
Answer the action associated with the receiver
action:
Answer the action associated with the receiver
buildWith:
checked
Answer whether the receiver is checked
checked:
Indicate whether the receiver is checked
enabled
Answer whether the receiver is enabled
enabled:
Indicate whether the receiver is enabled
help
Answer the help text associated with the receiver
help:
Answer the help text associated with the receiver
label
Answer the receiver's label
label:
Set the receiver's label
separator
Answer whether the receiver should be followed by a separator
separator:
Indicate whether the receiver should be followed by a separator
subMenu
Answer the receiver's subMenu
subMenu:
Answer the receiver's subMenu
PluggableMenuSpec
A PluggableMenuSpec is xxxxxxxxx.
Instance Variables
items: <Object>
label: <Object>
model: <Object>
items
- xxxxx
label
- xxxxx
model
- xxxxx
add:action:
add:target:selector:argumentList:
addMenuItem
addSeparator
buildWith:
items
label
label:
model
model:
newMenuItem
withModel:
PluggableMultiSelectionListSpec
PluggableMultiSelectionListSpec specifies a list with multiple selection behavior.
Instance variables:
getSelectionList <Symbol> The message to retrieve the multiple selections.
setSelectionList <Symbol> The message to indicate multiple selections.
buildWith:
getSelectionList
Answer the message to retrieve the multiple selections
getSelectionList:
Indicate the message to retrieve the multiple selections
setSelectionList
Answer the message to indicate multiple selections
setSelectionList:
Indicate the message to indicate multiple selections
PluggablePanelSpec
A panel with a (possibly changing) set of child elements. Expects to see change/update notifications when the childrens change.
buildWith:
PluggableRadioButtonSpec
PluggableRadioButton is intended as a HINT for the builder that this widget will be used as radio button. Unless explicitly supported it will be automatically substituted by PluggableButton.
buildWith:
PluggableTextSpec
A text editor.
Instance variables:
getText <Symbol> The selector to retrieve the text.
setText <Symbol> The selector to set the text.
selection <Symbol> The selector to retrieve the text selection.
menu <Symbol> The selector to offer (to retrieve?) the context menu.
color <Symbol> The selector to retrieve the background color.
buildWith:
color
Answer the selector for retrieving the background color
color:
Indicate the selector for retrieving the background color
getText
Answer the selector for retrieving the text
getText:
Answer the selector for retrieving the text
menu
Answer the selector for retrieving the text's menu
menu:
Indicate the selector for retrieving the text's menu
selection
Answer the selector for retrieving the text selection
selection:
Indicate the selector for retrieving the text selection
setText
Answer the selector for setting the text
setText:
Answer the selector for setting the text
PluggableTreeSpec
A pluggable tree widget. PluggableTrees are slightly different from lists in such that they ALWAYS store the actual objects and use the label selector to query for the label of the item. PluggableTrees also behave somewhat differently in such that they do not have a "getSelected" message but only a getSelectedPath message. The difference is that getSelectedPath is used to indicate by the model that the tree should select the appropriate path. This allows disambiguation of items. Because of this, implementations of PluggableTrees must always set their internal selection directly, e.g., rather than sending the model a setSelected message and wait for an update of the #getSelected the implementation must set the selection before sending the #setSelected message. If a client doesn't want this, it can always just signal a change of getSelectedPath to revert to whatever is needed.
Instance variables:
roots <Symbol> The message to retrieve the roots of the tree.
getSelectedPath <Symbol> The message to retrieve the selected path in the tree.
setSelected <Symbol> The message to set the selected item in the tree.
getChildren <Symbol> The message to retrieve the children of an item
hasChildren <Symbol> The message to query for children of an item
label <Symbol> The message to query for the label of an item.
icon <Symbol> The message to query for the icon of an item.
help <Symbol> The message to query for the help of an item.
menu <Symbol> The message to query for the tree's menu
keyPress <Symbol> The message to process a keystroke.
wantsDrop <Symbol> The message to query whether a drop might be accepted.
dropItem <Symbol> The message to drop an item.
autoDeselect <Boolean> Whether the tree should allow automatic deselection or not.
autoDeselect
Answer whether this tree can be automatically deselected
autoDeselect:
Indicate whether this tree can be automatically deselected
buildWith:
dropAccept
Answer the selector for querying the receiver about accepting drops
dropAccept:
Set the selector for querying the receiver about accepting drops
dropItem
Answer the selector for invoking the tree's dragDrop handler
dropItem:
Indicate the selector for invoking the tree's dragDrop handler
getChildren
Answer the message to get the children of this tree
getChildren:
Indicate the message to retrieve the children of this tree
getSelectedPath
Answer the message to retrieve the selection of this tree
getSelectedPath:
Indicate the message to retrieve the selection of this tree
hasChildren
Answer the message to get the existence of children in this tree
hasChildren:
Indicate the message to retrieve the existence children in this tree
help
Answer the message to get the help texts of this tree
help:
Indicate the message to retrieve the help texts of this tree
icon
Answer the message to get the icons of this tree
icon:
Indicate the message to retrieve the icon of this tree
keyPress
Answer the selector for invoking the tree's keyPress handler
keyPress:
Indicate the selector for invoking the tree's keyPress handler
label
Answer the message to get the labels of this tree
label:
Indicate the message to retrieve the labels of this tree
menu
Answer the message to get the menus of this tree
menu:
Indicate the message to retrieve the menus of this tree
roots
Answer the message to retrieve the roots of this tree
roots:
Indicate the message to retrieve the roots of this tree
setSelected
Answer the message to set the selection of this tree
setSelected:
Indicate the message to set the selection of this tree
wantsDrop
Answer the selector for invoking the tree's wantsDrop handler
wantsDrop:
Indicate the selector for invoking the tree's wantsDrop handler
PluggableWidgetSpec
The abstract superclass for all widgets.
Instance variables:
model <Object> The object the various requests should be directed to.
frame <Rectangle> The associated layout frame for this object (if any).
frame
Answer the receiver's layout frame
frame:
Indicate the receiver's layout frame
model
Answer the model for which this widget should be built
model:
Indicate the model for which this widget should be built
PluggableWindowSpec
A common window. Expects to see change/update notifications when the label should change.
Instance variables:
label <String|Symbol> The selector under which to retrieve the label or the label directly
extent <Point> The (initial) extent of the window.
closeAction <Symbol> The action to perform when the window is closed.
buildWith:
closeAction
Answer the receiver's closeAction
closeAction:
Answer the receiver's closeAction
extent
Answer the window's (initial) extent
extent:
Indicate the window's (initial) extent
label
Answer the selector for retrieving the window's label
label:
Indicate the selector for retrieving the window's label
ToolBuilder
I am a tool builder, that is an object which knows how to create concrete widgets from abstract specifications. Those specifications are used by tools which want to be able to function in diverse user interface paradigms, such as MVC, Morphic, Tweak, wxWidgets etc.
The following five specs must be supported by all implementations:
* PluggableButton
* PluggableList
* PluggableText
* PluggablePanel
* PluggableWindow
The following specs are optional:
* PluggableTree: If not supported, the tool builder must answer nil when asked for a pluggableTreeSpec. Substitution will require client support so clients must be aware that some tool builders may not support trees (MVC for example, or Seaside). See examples in FileListPlus or TestRunnerPlus.
* PluggableMultiSelectionList: If multi-selection lists are not supported, tool builder will silently support regular single selection lists.
* PluggableInputField: Intended as a HINT for the builder that this widget will be used as a single line input field. Unless explicitly supported it will be automatically substituted by PluggableText.
* PluggableActionButton: Intended as a HINT for the builder that this widget will be used as push (action) button. Unless explicitly supported it will be automatically substituted by PluggableButton.
* PluggableRadioButton: Intended as a HINT for the builder that this widget will be used as radio button. Unless explicitly supported it will be automatically substituted by PluggableButton.
* PluggableCheckBox: Intended as a HINT for the builder that this widget will be used as check box. Unless explicitly supported it will be automatically substituted by PluggableButton.
build:
Build the given object using this tool builder
buildAll:in:
Build the given set of widgets in the new parent
buildPluggableActionButton:
buildPluggableButton:
buildPluggableCheckBox:
buildPluggableInputField:
buildPluggableList:
buildPluggableMultiSelectionList:
buildPluggablePanel:
buildPluggableRadioButton:
buildPluggableText:
buildPluggableTree:
buildPluggableWindow:
close:
Close a previously opened widget
default
default:
isActiveBuilder
open:
Build and open the object. Answer the widget opened.
open:label:
Build an open the object, labeling it appropriately. Answer the widget opened.
parent
parent:
pluggableActionButtonSpec
pluggableButtonSpec
pluggableCheckBoxSpec
pluggableInputFieldSpec
pluggableListSpec
pluggableMenuSpec
pluggableMultiSelectionListSpec
pluggablePanelSpec
pluggableRadioButtonSpec
pluggableTextSpec
pluggableTreeSpec
pluggableWindowSpec
runModal:
Run the (previously opened) widget modally, e.g.,
do not return control to the sender before the user has responded.
widgetAt:
Answer the widget with the given ID
widgetAt:ifAbsent:
Answer the widget with the given ID
ToolBuilderSpec
I am an abstract widget specification. I can be rendered using many different UI frameworks.
buildWith:
name
Answer a name for the receiver. This is used generically in the title of certain inspectors, such as the referred-to inspector, and specificially by various subsystems. By default, we let the object just print itself out..
name:
UIManager
UIManager is a dispatcher for various UI requests.
checkForNewDisplaySize
chooseDirectory
Let the user choose a directory
chooseDirectory:
Let the user choose a directory
chooseDirectory:from:
Let the user choose a directory
chooseDirectoryFrom:
Let the user choose a directory
chooseFileMatching:
Let the user choose a file matching the given patterns
chooseFileMatching:label:
Let the user choose a file matching the given patterns
chooseFrom:
Choose an item from the given list. Answer the index of the selected item.
chooseFrom:lines:
Choose an item from the given list. Answer the index of the selected item.
chooseFrom:lines:message:
Choose an item from the given list. Answer the index of the selected item.
chooseFrom:lines:message:title:
Choose an item from the given list. Answer the selected item.
chooseFrom:lines:title:
Choose an item from the given list. Answer the index of the selected item.
chooseFrom:message:
Choose an item from the given list. Answer the index of the selected item.
chooseFrom:message:title:
Choose an item from the given list. Answer the index of the selected item.
chooseFrom:title:
Choose an item from the given list. Answer the index of the selected item.
chooseFrom:values:
Choose an item from the given list. Answer the selected item.
chooseFrom:values:lines:
Choose an item from the given list. Answer the selected item.
chooseFrom:values:lines:message:
Choose an item from the given list. Answer the index of the selected item.
chooseFrom:values:lines:message:title:
Choose an item from the given list. Answer the selected item.
chooseFrom:values:lines:title:
Choose an item from the given list. Answer the selected item.
chooseFrom:values:message:
Choose an item from the given list. Answer the index of the selected item.
chooseFrom:values:message:title:
Choose an item from the given list. Answer the index of the selected item.
chooseFrom:values:title:
Choose an item from the given list. Answer the selected item.
composeFormFor:
confirm:
Put up a yes/no menu with caption queryString. Answer true if the
response is yes, false if no. This is a modal question--the user must
respond yes or no.
confirm:orCancel:
Put up a yes/no/cancel menu with caption aString. Answer true if
the response is yes, false if no. If cancel is chosen, evaluate
cancelBlock. This is a modal question--the user must respond yes or no.
createPageTestWorkspace
default
default:
displayProgress:at:from:to:during:
Display titleString as a caption over a progress bar while workBlock is evaluated.
edit:
Open an editor on the given string/text
edit:label:
Open an editor on the given string/text
edit:label:accept:
Open an editor on the given string/text
fontFromUser:
grafPort
inform:
Display a message for the user to read and then dismiss
informUser:during:
Display a message above (or below if insufficient room) the cursor
during execution of the given block.
UIManager default informUser: 'Just a sec!' during: [(Delay forSeconds: 1) wait].
informUserDuring:
Display a message above (or below if insufficient room) the cursor
during execution of the given block.
UIManager default informUserDuring:[:bar|
#(one two three) do:[:info|
bar value: info.
(Delay forSeconds: 1) wait]]
interactiveParserFor:
isActiveManager
multiLineRequest:centerAt:initialAnswer:answerHeight:
Create a multi-line instance of me whose question is queryString with
the given initial answer. Invoke it centered at the given point, and
answer the string the user accepts. Answer nil if the user cancels. An
empty string returned means that the ussr cleared the editing area and
then hit 'accept'. Because multiple lines are invited, we ask that the user
use the ENTER key, or (in morphic anyway) hit the 'accept' button, to
submit; that way, the return key can be typed to move to the next line.
newDisplayDepthNoRestore:
onDebug:context:title:full:
onEventSensorStartup:
onPrimitiveError:
onSnapshot
request:
Create an instance of me whose question is queryString. Invoke it
centered at the cursor, and answer the string the user accepts. Answer
the empty string if the user cancels.
request:initialAnswer:
Create an instance of me whose question is queryString with the given
initial answer. Invoke it centered at the given point, and answer the
string the user accepts. Answer the empty string if the user cancels.
requestPassword:
Create an instance of me whose question is queryString. Invoke it centered
at the cursor, and answer the string the user accepts. Answer the empty
string if the user cancels.
restoreDisplay
restoreDisplayAfter: