... | ... | @@ -35,6 +35,48 @@ Note that the parent widget for the item is not included. Instead of the item i |
|
|
|
|
|
What the UI Manager returns is the following:
|
|
|
|
|
|
* The set of widgets to be inserted
|
|
|
* The vector of widgets to be inserted
|
|
|
* A correspondening vector of string labels - this is needed since the View and not the factory places the widgets into the container widget. This isolates the item factory for having to deal with the various types of layouts that could be supported.
|
|
|
* The last widget in the tab/focus chain
|
|
|
|
|
|
## Possible Examples
|
|
|
For an Instanced View, SMTK 1.x has the following format:
|
|
|
|
|
|
```xml
|
|
|
<View Type="Instanced" Title="MyAtt">
|
|
|
<InstancedAttributes>
|
|
|
<Att Name="MyAtt" Type="MyStuff"/>
|
|
|
</InstancedAttributes>
|
|
|
</View>
|
|
|
```
|
|
|
|
|
|
In 2.x lets assume we are designing the following GUI for an Instanced View:
|
|
|
![Screen_Shot_2017-09-12_at_11.44.35_AMEDT](/uploads/f013946e48953c093c16f28eeb0c79f0/Screen_Shot_2017-09-12_at_11.44.35_AMEDT.png)
|
|
|
|
|
|
The proposed View Specification could look like the following:
|
|
|
|
|
|
```xml
|
|
|
<View Type="Instanced" Title="MyAtt">
|
|
|
<InstancedAttributes>
|
|
|
<Att Name="MyAtt" Type="MyStuff">
|
|
|
<Layout Type="Form">
|
|
|
<Item Name="name" Label="Name" Length="10" />
|
|
|
<Item Name="File"/>
|
|
|
<Item Name="Point" Style="Spatial3D" OptionPlacement="Widget" GroupValues="true"/>
|
|
|
<Item Name="Group1" GroupChildren="true">
|
|
|
<Layout Type="Form">
|
|
|
<Item Name="*"/>
|
|
|
</Layout>
|
|
|
</Item>
|
|
|
</Layout>
|
|
|
</Att>
|
|
|
</InstancedAttributes>
|
|
|
</View>
|
|
|
```
|
|
|
|
|
|
### Observations:
|
|
|
* Label information is moved out of the Item Definition and Placed in the Specification which seems to make more sense
|
|
|
* Name="*" is a shortcut to refer to all children
|
|
|
* Style=Spatial3D" refers to a specific Item Widget Factory. In this case this factory creates a Widget that is tied to a 3D Point Widget in the Spatial Views. If Style is nit specified then the Basic Item Widget Factory based on the Item Type is used. For example Name uses DefaultStringItemWdiget - Note that the Factory for generating the GUI for the View could override these defaults when processing its components
|
|
|
* Additional Information can now be specified - for example setting the length for the Name Item
|
|
|
* When an Item has the possibility of generating multiple widgets based on having children items or multiple values, there needs to be an option to control if a single or multiple widgets would be returned. |
|
|
\ No newline at end of file |