Version 24 (modified by 12 years ago) ( diff ) | ,
---|
Widgets
Adds nice looking Morphic controls, e.g., lists, dropdown lists, push buttons, check boxes. It uses the signals mechanism for callbacks.
How to Install
Environment | |
4.3 | |
4.1.1 (win) | |
r2559 or newer | |
Sources | |
ConfigurationOfWidgets | |
SwaUtilities | |
Widgets | |
WidgetTests (optional) | |
WidgetTools (optional) | |
Icons (optional) | |
Signals | |
Animations | |
VB-Regex | |
Misc | |
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
tools
... widgets, useful example tools, icon sets
tests
... widgets and their tests
full
... everything above
Version 1.1 Highlights
- useful basic controls (buttons, check boxes, lists, ...)
- powerful item-view framework
- extensible paint engine
- 167 tests
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 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
- see optimizations and fixes in
- put all 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 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
Attachments (12)
- widgetsbanner.PNG (10.7 KB ) - added by 13 years ago.
- pushbutton.png (1.3 KB ) - added by 13 years ago.
- checkbox.png (754 bytes ) - added by 13 years ago.
- toolbutton.png (819 bytes ) - added by 13 years ago.
- buttongroup2.png (1.4 KB ) - added by 13 years ago.
- container.png (864 bytes ) - added by 13 years ago.
- spacer.png (562 bytes ) - added by 13 years ago.
- textedit.png (3.2 KB ) - added by 13 years ago.
- lineedit.png (541 bytes ) - added by 13 years ago.
- combobox.png (6.8 KB ) - added by 13 years ago.
- itemview.PNG (130.3 KB ) - added by 12 years ago.
- allwidgets.PNG (19.0 KB ) - added by 12 years ago.
Download all attachments as: .zip