::mdlTempMultiPickCollector
This command creates a widget that allows the user to pick entities from a hard-coded list that is presented in the graphical user interface. This could be used to limit the user’s picks. The widget itself is composed of a collector that is used to set the pick mode (for graphic picking), a list box that contains the available picks, and some convenience buttons to select all/select none/toggle selection.
Syntax
::model::mdlTempMultiPickCollector path variable text type entList args
Application
MotionView Tcl GUI
Description
This command creates a widget that allows the user to pick entities from a hard-coded list that is presented in the graphical user interface. This could be used to limit the user’s picks. The widget itself is composed of a collector that is used to set the pick mode (for graphic picking), a list box that contains the available picks, and some convenience buttons to select all/select none/toggle selection.
Inputs
- path
- The full name of the path that is to be used by the mdlTempMultiPickCollector widget.
- variable
- The Tcl variable that will be used to store and retrieve the selected entity values.
- text
- The text that is to be displayed in the collector. This does not have any effect on the pick mode. It is meant to be more general.
- type
- The actual pick mode that is to be set by the collector.
- entList
- The list of entities that the user wants to be “pickable”. The list is a list of full entity varnames.
- args
- A list of arguments to further configure the mdlTempMultiPickCollector widget.
Example
hwi GetSessionHandle sess1
sess1 GetProjectHandle pro1
sess1 ReleaseHandle
pro1 GetPageHandle pa1 [pro1 GetActivePage]
pro1 ReleaseHandle
pa1 GetWindowHandle win1 [pa1 GetActiveWindow]
pa1 ReleaseHandle
win1 GetClientHandle mcl
win1 ReleaseHandle
mcl GetRootObjectHandle mo
mcl ReleaseHandle
mo InterpretEntity p1 Point p_1 "\"Point 1\""
p1 ReleaseHandle
mo InterpretSet "SetPoint" p_1 10 10 10
mo InterpretEntity p2 Point p_2 "\"Point 2\""
p2 ReleaseHandle
mo InterpretSet "SetPoint" p_2 20 20 20
mo InterpretEntity p3 Point p_3 "\"Point 3\""
p3 ReleaseHandle
mo InterpretSet "SetPoint" p_3 30 30 30
mo ReleaseHandle
namespace eval ::my_ns {
variable my_pick {}
}
set tl [toplevel .top]
wm geometry $tl 450x200
wm title $tl "mdlTempMultiPickCollector Window"
grid rowconfigure $tl 0 -weight 1
grid columnconfigure $tl 0 -weight 1
set w [::model::mdlTempMultiPickCollector $tl.tmpc ::my_ns::my_pick "Points" "Point" {MODEL.p_1 MODEL.p_2}]
grid $w -row 0 -column 0 -sticky nesw
Errors
None.