define the Graphics Display Kit object selector
group GDobj_sel_view_templ
{
int list_update;
GDobject_templ *picked_obj;
};
group GDobj_sel_notify_templ
{
GDobj_sel_view_templ+IPort2 &view {
int+OPort2 sdims;
string+OPort2 curobj_name;
method+notify_inst+notify_val upd_func = "GDobj_sel_update";
method+notify_deinst del_func = "GDobj_sel_delete";
};
GDobj_sel_notify_templ GDobj_sel_templ
{
string+OPort2 strings[sdims];
GDobject_templ+OPort2+nonotify &cur_obj;
};
GDobj_sel_templ GDobj_sel {
ptr+nonotify local_ptr;
sdims = 0;
curobj_name = "";
int+write obj_list_changed = 0;
};
These templates define the Graphics Display Kit object selector.
GDobj_sel_view_templ defines a template that allows a view to be connected to the object selector. It restricts activations caused by a view to the following cases:
The object's name changes. This is the name that is displayed in the object selector.
The picked object in the view changes.
GDobj_sel_notify_templ defines the elements that cause the object selector's update method to execute. GDobj_sel_templ adds some additional elements to the initial template. GDobj_sel is the version you instance.
As an alternative to using GDobj_sel and having to define your own user interface for the editor, you can use ObjectSelector, an application component. ObjectSelector contains GDobj_selt and defines a user interface.
The view containing the objects. GDobj_sel builds a list of objects using the view and the currently picked camera.
The number of objects in the view. sdims is computed by the object selector every time it executes.
An array of object names. strings is computed by the object selector every time it executes. It contains the names of the objects in the view's picked camera. The strings are either the name parameter in the Graphics Display Kit object(s) if it is set or they are the full pathname of the object(s) in the Network Editor. This output is normally connected to the strings slement of a UI selection box.
The name of the current object. You can set this output in two ways. If the user selects an entry from the list of strings that string becomes the current object name. If the user directly picks an object, that object's name becomes the current object name. This output is normally connected to the text element of a UI selection box.
The current object. You can set this output in two ways. If the user selects an entry from the list of strings, that object becomes the current object. If the user directly picks an object, that object becomes the current object. This output is normally connected to any of the Graphics Display Kit editors that need a GDobject_templ as input.
Libraries.Graphics_Display.Editors.UI_Editors.ObjectSelector