define the Graphics Display Kit view selector
group GDview_entry {
GDview_templ &view;
UIrenderView &renderView;
int active => view.pick_ctrl.event;
};
group GDview_sel_notify_templ {
GDview_templ+IPort2 *views[];
imlink+IPort2 rvs;
GDview_entry entries[array_size(views)] {
view => views[index_of(entries)];
renderView => rvs[index_of(entries)];
};
method+notify_val update = "select_entry";
};
GDview_sel_templ
GDview_sel_notify_templ GDview_sel_templ {
int nentries => array_size(views);
GDview_entry &selected {
view+OPort3;
renderView+OPort3;
};
};
GDview_sel
The view selector allows you to select a current view from a list of views. One possible use is to share the Graphics Display Kit editors among multiple views in a single UI shell.
These templates define the Graphics Display Kit view selector. GDview_entry defines a view entry. An entry consists of a reference to a Graphics Display Kit view, a reference to a UIrenderView, and and active flag. The view and the UIrenderView are two of the inputs required by many of the Graphics Display Kit editors. GDview_sel_notify_templ defines the elements that cause the view selector's update method to execute. When the update method executes, it checks the active flag in each view entry against the update method's sequence number and chooses the most recently changed entry. The GDview_entry template connects the Graphics Display Kit's pick control information to the active flag. This means that a pick in any view causes the current view to change. Note that by changing the connection to the active subobject, the reason for the current view to change can be altered. GDview_sel_templ adds some additional elements to the notification template. GDview_sel is the version that you instance.
An array of Graphics Display Kit views. These are all the views that are to be considered in the current view calculation.
An array of UIrenderViews that correspond to the views.
The current view. This is normally connected to the Graphics Display Kit editors.
The current UIrenderView. This is normally connected to any interactors that are present in the Graphics Display Kit editors.
Libraries.Examples.Graphics_Display.TwoView