No subject


Tue Aug 5 09:47:01 EDT 2008


SetExitMethod method that took a pointer to a function in earlier versions,
but it doesn't seem to exist any more.

Can anyone shed some light on how I might go about this?

I tried safedowncasting my interactor to a vtkWin32renderWindowInteractor
and using its SetClassExitMethod however that seemed to have no effect.

Thanks
Phil.


_______________________________________________
This is the private VTK discussion list.
Please keep messages on-topic. Check the FAQ at:
http://www.vtk.org/Wiki/VTK_FAQ
Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers




------=_NextPart_000_0037_01C8FC79.94BF5A70
Content-Type: text/html;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dus-ascii">
<META content=3D"MSHTML 6.00.6000.16674" name=3DGENERATOR></HEAD>
<BODY>
<DIV dir=3Dltr align=3Dleft><SPAN class=3D500564519-12082008><FONT =
face=3DArial=20
size=3D2>David,</FONT></SPAN></DIV>
<DIV dir=3Dltr align=3Dleft><SPAN class=3D500564519-12082008><FONT =
face=3DArial=20
size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=3Dltr align=3Dleft><SPAN class=3D500564519-12082008><FONT =
face=3DArial=20
size=3D2>thanks.</FONT></SPAN></DIV>
<DIV dir=3Dltr align=3Dleft><SPAN class=3D500564519-12082008><FONT =
face=3DArial size=3D2>I=20
do have this working now by adding an appropriate =
observer.</FONT></SPAN></DIV>
<DIV dir=3Dltr align=3Dleft><SPAN class=3D500564519-12082008><FONT =
face=3DArial=20
size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=3Dltr align=3Dleft><SPAN class=3D500564519-12082008><FONT =
face=3DArial=20
size=3D2>Doing a Start was causing my app to crash and I haven't spent =
the time to=20
figure out why.</FONT></SPAN></DIV>
<DIV dir=3Dltr align=3Dleft><SPAN class=3D500564519-12082008><FONT =
face=3DArial=20
size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=3Dltr align=3Dleft><SPAN class=3D500564519-12082008><FONT =
face=3DArial=20
size=3D2>regards</FONT></SPAN></DIV>
<DIV dir=3Dltr align=3Dleft><SPAN class=3D500564519-12082008><FONT =
face=3DArial=20
size=3D2>Phil</FONT></SPAN></DIV><BR>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px =
solid; MARGIN-RIGHT: 0px">
  <DIV class=3DOutlookMessageHeader lang=3Den-us dir=3Dltr align=3Dleft>
  <HR tabIndex=3D-1>
  <FONT face=3DTahoma size=3D2><B>From:</B> David Cole=20
  [mailto:david.cole at kitware.com] <BR><B>Sent:</B> August 12, 2008 10:25 =

  AM<BR><B>To:</B> Phil Goddard<BR><B>Cc:</B>=20
  vtkusers at vtk.org<BR><B>Subject:</B> Re: [vtkusers] Calling a custom =
function=20
  when terminating vtkRenderWindowInteractor<BR></FONT><BR></DIV>
  <DIV></DIV>
  <DIV dir=3Dltr>If your intent is simply to receive the 'q' or 'e' =
keypress=20
  events, you can simply use AddObserver to listen for KeyPressEvent, =
CharEvent=20
  or KeyReleaseEvent directly from the =
vtkRenderWindowInteractor.<BR><BR>
  <DIV>A Win32 vtkRenderWindowInteractor will only call PostQuitMessage =
and=20
  actually pop out of its own internal message loop if one was started =
by=20
  calling the Start() method.</DIV>
  <DIV><BR></DIV>
  <DIV>If you are running inproc as a dll (as I think you are from your =
other=20
  postings) then you are probably not calling Start() and are probably =
relying=20
  on your containing application's Windows message loop... So you would =
need to=20
  intercept the keystrokes and do whatever is appropriate to quit your=20
  containing app.</DIV>
  <DIV><BR></DIV>
  <DIV>Does this help?</DIV>
  <DIV><BR></DIV>
  <DIV><BR></DIV>
  <DIV>Hope so,</DIV>
  <DIV>David</DIV>
  <DIV><BR>
  <DIV>
  <DIV class=3Dgmail_quote><BR></DIV>
  <DIV class=3Dgmail_quote>On Sat, Aug 9, 2008 at 2:21 AM, Phil Goddard =
<SPAN=20
  dir=3Dltr>&lt;<A=20
  =
href=3D"mailto:philgoddard at telus.net">philgoddard at telus.net</A>&gt;</SPAN=
>=20
  wrote:<BR>
  <BLOCKQUOTE class=3Dgmail_quote=20
  style=3D"PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: =
#ccc 1px solid"><BR><BR>I'm=20
    wondering if someone can explain to me how to call my own =
custom<BR>function=20
    when q or e is pressed on a vtkRenderWindowInteractor.<BR><BR>The =
doc for=20
    vtkRenderWindowInteractor::TerminateApp says<BR>"This function is =
called on=20
    'q','e' keypress if exitmethod is not specified<BR>and should be =
overridden=20
    by platform dependent subclasses to provide a<BR>termination =
procedure if=20
    one is required."<BR><BR>However there is no mention (that I can =
see) of how=20
    to specify an<BR>exitmethod.<BR><BR>From searching old mailing-list =
messages=20
    it seems that there used to be a<BR>SetExitMethod method that took a =
pointer=20
    to a function in earlier versions,<BR>but it doesn't seem to exist =
any=20
    more.<BR><BR>Can anyone shed some light on how I might go about=20
    this?<BR><BR>I tried safedowncasting my interactor to a=20
    vtkWin32renderWindowInteractor<BR>and using its SetClassExitMethod =
however=20
    that seemed to have no=20
    =
effect.<BR><BR>Thanks<BR>Phil.<BR><BR><BR>_______________________________=
________________<BR>This=20
    is the private VTK discussion list.<BR>Please keep messages =
on-topic. Check=20
    the FAQ at: <A href=3D"http://www.vtk.org/Wiki/VTK_FAQ"=20
    target=3D_blank>http://www.vtk.org/Wiki/VTK_FAQ</A><BR>Follow this =
link to=20
    subscribe/unsubscribe:<BR><A=20
    href=3D"http://www.vtk.org/mailman/listinfo/vtkusers"=20
    =
target=3D_blank>http://www.vtk.org/mailman/listinfo/vtkusers</A><BR></BLO=
CKQUOTE></DIV><BR></DIV></DIV></DIV></BLOCKQUOTE></BODY></HTML>

------=_NextPart_000_0037_01C8FC79.94BF5A70--




More information about the vtkusers mailing list