Enabling the UI Tools

Overview of the UI Tools Intent Designs

The UI Tools consist of the following primary components:
  • UIPartMixin
  • UICategory
  • UIProperty
  • UIMessage

UIPartMixin

The UIPartMixin is cornerstone of the UI Tools. This mixin allows parts to be managed by the UI Tools, and any parts which mix in UIPartMixin will be available as UIPart objects in .NET. It contains the rules necessary for maintaining the list of UI properties of a part, its UI actions and children, and any messages that need to be sent to the UI. The absolute minimum that is required for the UI Tools to function is that the Root part must mixin UIPartMixin.

Important Rules in the UIPartMixin

UIName
The display name of the UIPart to use throughout the UI Tools.
Seq
The sequence value used when sorting UIParts.
IconPath
The path to the image to use in the UIPartTree for this UIPart.
UIProperties
The list of UIProperties that are currently active on this UIPart.
UIChildren
The list of UIPart parts that will show up as children of this UIPart in the UIPartTree.
Actions
The list of UIActions that are currently available for this UIPart.
Messages
The list of UIMessages that are currently active on this UIPart.

UICategory

The UICategory design is simply a container for category information for UIProperties. It is used to group UIProperties, as well as sort the various groups. Additionally, it contains rules that can be used to disable groups of UIProperties.

Important Rules in the UICategory

CategoryName
The name of the category that will be displayed when grouping UIProperties.
CategorySeq
The sequence value to use when sorting categories of UIProperties.

UIProperty

The UIProperty is the second most important part of the UI Tools. It is used as the actual interface between the Intent model and the UI. The default value, current value, list of choices, etc. are all stored in the UIProperty. Because the UIProperty design contains quite a few options, we will be focusing on only the most widely used ones in this document.

Important Rules in the UIProperty

CategoryPart
A reference to a UICategory part that provides the category name and category sequence for the UIProperty.
BaseName
This is the base name for this UIProperty. It may be modified further by supplying values to the NamePrefix and NameSuffix parameters, however use of the NamePrefix and NameSuffix is typically restricted to cases where a child list of UIProperties is required.
Seq
The sequence value to use when sorting UIProperties inside of a category.
DefaultValue
The default value to use for the UIProperty.
Value
The current value of the UIPropety.
IsValueModified?
Flags whether or not this UIProperty has been modified by the user via the UI.
IsReadOnly?
Causes the UIProperty to be read only
ChoiceListValues
A list of values the use can select from for this UIProperty.
RestrictToList?
Tells the UIProperty to restrict choices to only those given in the ChoiceListValues.
Formatter
The name or ID of the Formatter to use for the UIProperty. Formatters control how the value is displayed and how input text is parsed.
Converter
The name or ID of the Converter to use for the UIProperty. Converters control how the value is stored in the Intent model since some UI values don't have applicable Intent data types. Dates are an example of these types of values.
Tooltip
The tooltip to display in the UI for this UIProperty.
ForPaintColor
The foreground PaintColor to use for this UIProperty.
BackPaintColor
The background PaintColor to use for this UIProperty.

UIMessage

The UIMessage is used to add messages that will show up in the UI. These are typically error or warning messages, but may also simply be information about the model. All designs that mix in UIPartMixin can have UIMessages on them.

Important Rules in the UIMessage

Severity
The message severity, and can be :Info, :Warning, or :Error.
Message
The actual message text for this UIMessage.
Triggered?
Only messages whose Triggered? parameter evaluates to True are show in the UI.