[[PageOutline(1-2)]] = Widgets = [[Image(allwidgets.PNG, nolink)]] Adds nice looking Morphic controls, e.g., lists, dropdown lists, push buttons, check boxes. It uses the [wiki:signals] mechanism for callbacks. = How to Install = {{{ #!div class="wiki_infotable" style="float:right;" ||'''Environment'''|| || || [[Image(media/icons/custom:squeak_16.png, title="Recommended Squeak Version", nolink, right)]] || 4.3 || || [[Image(media/icons/silk:application_home.png, title="Recommended Squeak VM Version", nolink, right)]] || 4.1.1 (win) || || [[Image(media/icons/silk:cog.png, title="Recommended Cog VM Version", nolink, right)]] || r2559 or newer || ||'''Sources'''|| || || [[Image(media/icons/silk:script_gear.png, title="Metacello Configuration", nolink, right)]] || [http://www.hpi.uni-potsdam.de/hirschfeld/squeaksource/MetacelloRepository/ ConfigurationOfWidgets] || || [[Image(media/icons/silk:database.png, title="Repository", nolink, right)]] || [http://www.hpi.uni-potsdam.de/hirschfeld/squeaksource/SwaUtilities/ SwaUtilities] || || [[Image(media/icons/silk:package.png, title="Needed Packages from the Repository", nolink, right)]] || Widgets || || [[Image(media/icons/silk:package.png, title="Needed Packages from the Repository", nolink, right)]] || WidgetTests (optional) || || [[Image(media/icons/silk:package.png, title="Needed Packages from the Repository", nolink, right)]] || WidgetTools (optional) || || [[Image(media/icons/silk:package.png, title="Needed Packages from the Repository", nolink, right)]] || Icons (optional) || || [[Image(media/icons/silk:bullet_go.png, title="Dependents", nolink, right)]] || [wiki:signals Signals] || || [[Image(media/icons/silk:bullet_go.png, title="Dependents", nolink, right)]] || [wiki:animations Animations] || || [[Image(media/icons/silk:bullet_go.png, title="Dependents", nolink, right)]] || [http://www.squeaksource.com/Regex VB-Regex] || ||'''Misc'''|| || || [[Image(media/icons/silk:world.png, title="Website", nolink, right)]] || [http://www.hpi.uni-potsdam.de/hirschfeld/squeaksource/SwaUtilities.html SwaUtilities@SqueakSource] || }}} Using Metacello, just run the following code in your workspace: {{{ (Installer mc http: 'http://www.hpi.uni-potsdam.de/hirschfeld/squeaksource/') project: 'MetacelloRepository'; install: 'ConfigurationOfWidgets'. (Smalltalk at: #ConfigurationOfWidgets) load. }}} If you want to try the latest snapshot (may be unstable), run this: {{{ ConfigurationOfWidgets loadSnapshot. }}} If you want to update to the latest development version, run this: {{{ ConfigurationOfWidgets loadDevelopment. }}} '''Configuration groups''' {{{core}}} ... just the widgets[[br]] {{{tools}}} ... widgets, useful example tools, icon sets[[br]] {{{tests}}} ... widgets and their tests[[br]] {{{full}}} ... everything above[[br]] '''Version 1.1 Highlights''' * useful basic controls (buttons, check boxes, lists, ...) * powerful item-view framework * extensible paint engine * 167 tests {{{ #!div style="clear:both;" }}} [[Image(itemview.PNG, nolink, title="Examples of the item view framework.")]] = How to Use = Explore all examples in the `WidgetTools` package to learn more about the item-view framework and how to connect widgets to user input. Try to design your graphical front-ends with the [wiki:designer Morphic Designer] to avoid writing verbose user interface code. = How to Extend = Most of the widgets are written from scratch. If you want to extend or add new ones, here are some hints: * layouting of morphs in combination with embedded text morphs can be problematic in the first place as the dimensions are not correct * see optimizations and fixes in `UiComboBox` * put all [wiki:signals signals] of a widget class into the ''signals'' protocol * for each signal, explain with a comment when it will generally be sent, e.g., ''"This signal is emitted whenever the user clicks with the left mouse button."'' * try to write as compact classes as possible, i.e., avoid having several classes for buttons, buttons with icons, buttons with icons and text, but write exactly one class and make these features configurable * consider the [wiki:designer Morphic Designer] and implement on the class-side of your widget class: * `#isWidgetClass` ... used by the designer as a widget * `#widgetCategory` ... as grouped in the designer's widget tree * `#widgetProperties` ... appended to the end of the designer's property table * `#widgetPropertiesToIgnore` ... hidden in the designer's property table * `#widgetClassIcon` ... icon in the designer's widget tree * `#widgetClassName` ... text in the designer's widget tree