<html>
<head>
<style>
P
{
margin:0px;
padding:0px
}
body
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body><P >You can create a global variable of type <FONT class="">CSdiogl2View</FONT>*,&nbsp;and whenever you create a dialog&nbsp;object of the type, change the global variable to point to the object.&nbsp; Of course, you can only use one dialog at a time.</P>
<P >&nbsp;</P>
<P >If you think doing it this way&nbsp;is ugly, then&nbsp;it's time to&nbsp;change your design.</P>
<P >&nbsp;</P>
<P ><FONT class="">xz</FONT></P>
<P ><A href="http://www.xzing.org">http://www.xzing.org</A><BR ><BR ></P>
<P>
<HR id=stopSpelling>
</P>
<P>&gt; From: suspended@gmail.com<BR>&gt; To: vtkusers@vtk.org<BR>&gt; Date: Wed, 22 Mar 2006 10:45:05 -0600<BR>&gt; Subject: [vtkusers] Question for C++ Gurus!<BR>&gt; <BR>&gt; I&nbsp;am&nbsp;capturing&nbsp;left&nbsp;mouse&nbsp;click&nbsp;events&nbsp;in&nbsp;my&nbsp;vtk&nbsp;scene.&nbsp;Whenever&nbsp;the&nbsp;left<BR>&gt; mouse&nbsp;button&nbsp;is&nbsp;released&nbsp;I&nbsp;want&nbsp;to&nbsp;change&nbsp;the&nbsp;vtk&nbsp;scene&nbsp;somehow.&nbsp;My&nbsp;event<BR>&gt; handler&nbsp;method&nbsp;(myKeyPressCallback)&nbsp;is&nbsp;a&nbsp;static&nbsp;method&nbsp;and&nbsp;therefor&nbsp;it&nbsp;does<BR>&gt; not&nbsp;have&nbsp;access&nbsp;to&nbsp;the&nbsp;variables&nbsp;of&nbsp;the&nbsp;class&nbsp;it&nbsp;belongs&nbsp;to.&nbsp;I&nbsp;would&nbsp;like&nbsp;to<BR>&gt; have&nbsp;a&nbsp;pointer&nbsp;to&nbsp;the&nbsp;parent&nbsp;class&nbsp;(CSdiogl2View)&nbsp;inside&nbsp;the&nbsp;event&nbsp;handler<BR>&gt; which&nbsp;has&nbsp;all&nbsp;the&nbsp;actors.&nbsp;How&nbsp;can&nbsp;this&nbsp;be&nbsp;done?&nbsp;I&nbsp;have&nbsp;written&nbsp;my&nbsp;code&nbsp;like<BR>&gt; this:<BR>&gt; <BR>&gt; <BR>&gt; vtkCallbackCommand&nbsp;*&nbsp;keypressCB&nbsp;=&nbsp;vtkCallbackCommand::New();<BR>&gt; &nbsp;keypressCB-&gt;SetCallback(&amp;CSdiogl2View::myKeyPressCallback);<BR>&gt; <BR>&gt; style&nbsp;=&nbsp;vtkInteractorStyleTrackballActor::New();<BR>&gt; style-&gt;AddObserver(vtkCommand::LeftButtonReleaseEvent,keypressCB);<BR>&gt; iren-&gt;SetInteractorStyle(style);<BR>&gt; <BR>&gt; Thanks.<BR>&gt; Jess<BR>&gt; <BR>&gt; _______________________________________________<BR>&gt; This&nbsp;is&nbsp;the&nbsp;private&nbsp;VTK&nbsp;discussion&nbsp;list.&nbsp;<BR>&gt; Please&nbsp;keep&nbsp;messages&nbsp;on-topic.&nbsp;Check&nbsp;the&nbsp;FAQ&nbsp;at:&nbsp;http://www.vtk.org/Wiki/VTK_FAQ<BR>&gt; Follow&nbsp;this&nbsp;link&nbsp;to&nbsp;subscribe/unsubscribe:<BR>&gt; http://www.vtk.org/mailman/listinfo/vtkusers<BR></P><br /><hr /> <a href='' target='_new'></a></body>
</html>