Inspector views
Every object can be shown multiple ways in the Inspector. This ability is made possible through views.
Consider the following object:
The inspector offers multiple views, each of which is defined in a method in either the class of the object, or in one of the superclasses.
Views are defined using Phlow.
List view
The list view is a basic view that shows the items of a collection or a stream. An example can be seen in GtABAddressBook>>#gtViewContactsListOn:
which defines the Contacts list view.
Columned list view
The columned list is, like the name says, a list that can display multiple columns. An example is showin the Contacts with details view implemented in GtABAddressBook>>#gtViewContactsOn:
.
Tree view
The tree is similar to the list view. It still allows you to define the items of the roots, but it also allows you to specify the children in a block executed for each item. An example can be seen here: GtRecentChanges>>#gtTreeFor:
.
Columned tree view
The columned tree is similar to the columned list only it's not just a list, but a tree that allows to define children for each item. An example in GtPrefixTree>>#gtViewChildrenFor:
Mondrian view
Views can also host visualizations. For example, the Circular view defined in GtABAddressBook>>#gtViewContactsIconsCircularOn:
shows a basic visualization of the avatars of the contacts arranged in a circular layout. This specific visualization is implemented in the Mondrian engine for which we have a dedicated view.
Text editor view
The Print view is defined in Object>>#gtPrintFor:
. Note how this is a superclass. In fact, this view is available for all objects because every object knows how to print itself.
Explicit view
Another view that is available for all objects is the Meta view which is defined in ProtoObject>>#gtMetaFor:
. This view embeds a complicated widget (a Coder) in the inspector by means of a so call explicit view.