<html>
<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 10 (filtered)">
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:"Monotype Corsiva";
        panose-1:3 1 1 1 1 2 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
p
        {margin-right:0in;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman";}
span.EmailStyle17
        {font-family:Arial;
        color:windowtext;
        font-weight:normal;
        font-style:normal;
        text-decoration:none none;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
/* List Definitions */
ol
        {margin-bottom:0in;}
ul
        {margin-bottom:0in;}
-->
</style>
</head>
<body lang=EN-US link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:11.0pt;
font-family:Arial'>Hi folks-</span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:11.0pt;
font-family:Arial'> I’ve got a few questions related to event
processing using Vtk with Tcl/Tk that I was hoping someone could clear up. Basically,
what I’d like to do is allow the user to manipulate the contents of the
render window, but have some script code execute when the user releases one of
the mouse buttons. E.g., user presses left button, spins the camera around a
bit, releases left button, and some action is triggered by the release. </span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:11.0pt;
font-family:Arial'> At first, I looked at the docs for vtkRenderWindowInteractor,
but there didn’t seem to be a way to “plug into” that, so to
speak. I’ve seen lots of references to vtkCommand and different event
types and such, but it seems that this whole command/observer architecture is available
only at the C++ level, not at the script level. (Am I correct about that?)</span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:11.0pt;
font-family:Arial'> So, in the absence of any elegant way to do:</span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:11.0pt;
font-family:Arial'> proc ReleaseAction
{} {yadda yadda yadda}</span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:11.0pt;
font-family:Arial'> iren SetLeftButtonReleaseMagicTCLCallback
ReleaseAction</span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:11.0pt;
font-family:Arial'>I imagine that I need to use vtkTkRenderWidget and set
up the Tk bindings manually. No problem. The example GUI script MaceTk.tcl
shows how to set this up, but I have a couple questions:</span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:11.0pt;
font-family:Arial'> </span></font></p>
<p class=MsoNormal style='margin-left:.5in;text-indent:-.25in'><font size=2
face=Arial><span style='font-size:11.0pt;font-family:Arial'>1)<font size=1
face="Times New Roman"><span style='font:7.0pt "Times New Roman"'>
</span></font></span></font><font size=2 face=Arial><span style='font-size:
11.0pt;font-family:Arial'>There’s a line in that script that looks like
this: “::vtk::bind_tk_render_widget $vtkw”. I wasn’t
previously familiar with this command, and tcl shell command completion seems
to indicate that there are a bunch of commands beginning with “::vtk::”.
Is there some documentation on their purpose and use.</span></font></p>
<p class=MsoNormal style='margin-left:.5in;text-indent:-.25in'><font size=2
face=Arial><span style='font-size:11.0pt;font-family:Arial'>2)<font size=1
face="Times New Roman"><span style='font:7.0pt "Times New Roman"'>
</span></font></span></font><font size=2 face=Arial><span style='font-size:
11.0pt;font-family:Arial'>If the vtkRenderWindowInteractor is operating on a vtkTkRenderWidget’s
window, is there going to be any any conflict or contention between vtkRenderWindowInteractor
processing events and Tk processing events? (Or is that what the magic in
question #1 above takes care of?)</span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:11.0pt;
font-family:Arial'> </span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:11.0pt;
font-family:Arial'>Thanks,</span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:11.0pt;
font-family:Arial'> </span></font></p>
<p style='margin:0in;margin-bottom:.0001pt'><strong><b><font size=6
face="Monotype Corsiva"><span style='font-size:24.0pt;font-family:"Monotype Corsiva";
font-weight:normal'>Chris</span></font></b></strong></p>
<p><font size=2 face="Times New Roman"><span style='font-size:10.0pt'>--<br>
Christopher R. Volpe,
Ph.D. <br>
Senior
Scientist
Email: <a href="mailto:cvolpe@ara.com">cvolpe@ara.com</a><br>
Applied Research Associates,
Inc.
Voice: </span></font><font
size=2><span style='font-size:10.0pt'>919-582-3380<br>
</span></font><font size=2><span style='font-size:10.0pt'>8540 Colonnade
Center Dr., Ste 301</span></font><font size=2><span style='font-size:10.0pt'>
Fax: 919-878-3672<br>
</span></font><font size=2><span style='font-size:10.0pt'>Raleigh</span></font><font
size=2><span style='font-size:10.0pt'>, </span></font><font size=2><span
style='font-size:10.0pt'>NC</span></font><font size=2><span style='font-size:
10.0pt'> </span></font><font size=2><span style='font-size:10.0pt'>27615</span></font><font
size=2><span style='font-size:10.0pt'>
Web: <a href="http://www.ara.com/">www.ara.com</a></span></font></p>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'> </span></font></p>
</div>
</body>
</html>