[[PageOutline(1-2)]] [[Image(widgetsbanner.PNG, nolink)]] = Introduction = 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 style="float:right;" ||'''Environment'''|| || || [[Image(media/icons/custom:squeak_16.png, title="Recommended Squeak Version", nolink, right)]] || 4.1, 4.2 Trunk || || [[Image(media/icons/silk:application_home.png, title="Recommended Squeak VM Version", nolink, right)]] || 4.0.2 (win) || || [[Image(media/icons/silk:cog.png, title="Recommended Cog VM Version", nolink, right)]] || ''not tested with cog'' || ||'''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)]] || 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)]] || [wiki:swautil SwaUtil] || ||'''Misc'''|| || || [[Image(media/icons/silk:world.png, title="Website", nolink, right)]] || [http://www.hpi.uni-potsdam.de/hirschfeld/squeaksource/SwaUtilities.html SwaUtilities@SqueakSource] || }}} '''Configuration groups''' {{{default}}} ... just the widgets[[br]] {{{full}}} ... widgets and several CC icon sets (~10000 icons)[[br]] '''System categories''' {{{Widgets-Core}}} ... various widgets (e.g., buttons, lists, line inputs)[[br]] {{{Widgets-Support}}} ... internally used helper classes[[br]] {{{Widgets-Views}}} ... model-based item views (list, table, tree with columns)[[br]] {{{Widgets-Views-Models}}} ... example models also used in default dialogs[[br]] {{{Widgets-Views-Support}}} ... internally used helper classes for item views[[br]] {{{Widgets-Dialogs}}} ... default dialogs, ui files created with [wiki:designer Morphic Designer][[br]] '''Version 1.1 (in development)''' * improved item-based and model-based views * to be used in [wiki:designer Morphic Designer 1.1] '''Version 1.0''' * first release to be used in [wiki:designer Morphic Designer 1.0] * still dependent from [wiki:swautil] due to text formatting functions * will be removed soon as lots of other stuff comes with that package * some example dialogs need the ''Icons'' package {{{ #!div style="clear:both;" }}} = How to Use = == Button Widgets == '''Common Properties''' || '''Selector''' || '''Type''' || '''Description''' || || `autoExclusive` || Boolean || only one of these in the owner is checked at a time || || `checkable` || Boolean || determines whether it can be `checked` or not || || `checked` || Boolean || button remains in a visual down state if true || || `enabled` || Boolean || controls (mouse) input in general || || `icon` || Form || appearance depends on the button type || || `text` || String or Text || text written on the button || '''Push Button''' [[Image(pushbutton.png, nolink)]] A push button is the most known and used button type. It is often used for ''OK'' and ''Cancel'' operations in a dialog. '''Tool Button''' || '''Selector''' || '''Type''' || '''Description''' || || `autoRaise` || Boolean || raises only on mouse hover if true || || `buttonStyle` || Symbol || determines the layout and usage of `icon` and `text` || A tool button can be found in tool bars or other places that want to offer functionality in the GUI without having a too much present push button there as the tool button is smaller in general. '''Check Box ''' A check box is a checkable button by default with a slightly different appearance as a small button-like square is in front of the text/icon. == Containers & Spacers == == Input Widgets == == Display Widgets == == Item Widgets (Item-Based) == == Item Widgets (Model-Based) == = 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