UIManager
Last updated at 7:06 am UTC on 28 October 2020
The UIManager class has been part of Squeak since version 3.9.
The framework allows for cross-UI-framework requests to be made from Squeak code. It is accessible as: UIManager default
Such requests are for example
chooseDirectory: label from: dir
chooseFromDictionary: aDictionary title: aString
confirm: queryString trueChoice: trueChoice falseChoice: falseChoice
edit: aText label: labelString
inform: aMessage title: aTitle
request: queryString initialAnswer: defaultAnswer
or a picklist
chooseFrom: aList lines: linesArray title: aString
"Choose an item from the given list. Answer the index of the selected item."
Class comment:
UIManager is a dispatcher for various user interface requests, such as menu and dialog interactions. An instance of UIManager is associated with each Project to implement the appropriate functions for Morphic (MorphicUIManager), MVC or other user interfaces.
builderClass
"Answer the kind of tool builder to use, possibly influenced by project preferences"
^ builderClass ifNil: [ builderClass := ToolBuilder findDefault ]