<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div bgcolor="#FFFFFF" text="#000000">I have now a subclassed a TrackballActor interactor which I am
    passing to the widget. <br>
    <br>
    However, the subclassed interactors On*Button() functions are NOT
    called as the widget is visible and clicked on. Those overloaded
    functions are only called if clicking outside the widget.<br></div></blockquote><div><br></div><div>In that case, perhaps you need to subclass vtkBoxWidget and override the same member functions. It is likely processing the mouse button clicks and not passing the event on to your custom interactor. Sorry for sending you down that path.</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div bgcolor="#FFFFFF" text="#000000">
    I have used the slider widget, and for that one, when clicked on,
    the interactors onMouse events are indeed called. The box widget
    seem to behave differently.<br>
    <br>
    In addition, as the widget is activated, and an associated callback
    Execute function is called, only one type of event is detected, even
    though I have added observers for other events. <br>
    E.g.<br>
        mWidget->AddObserver(vtkCommand::RightButtonPressEvent,
    mCallBack);         //These are not passed on to the widgets
    callback??<br>
        mWidget->AddObserver(vtkCommand::RightButtonReleaseEvent,
    mCallBack);<br>
        mWidget->AddObserver(vtkCommand::InteractionEvent,
    mCallBack);                    //Only this one seem to be relevant??<br>
    <br>
    I am certainly getting something wrong?<br>
    <br>
    tk<span class=""><br>
    <br>
    <br>
    <br>
    <blockquote type="cite">
      <div dir="ltr">
        <div>Hope that helps,</div>
        <div>Cory</div>
        <div><span style="color:rgb(0,0,0);font-family:monospace;font-size:12px;white-space:pre-wrap">
</span></div>
        <div><span style="color:rgb(0,0,0);font-family:monospace;font-size:12px;white-space:pre-wrap">
</span></div>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Sun, Aug 9, 2015 at 7:17 PM, Totte
          Karlsson <span dir="ltr"><<a href="mailto:totte@dunescientific.com" target="_blank">totte@dunescientific.com</a>></span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<br>
            When using a boxwidget, pressing the left button and moving
            the mouse allow the user to rotate the widget,<br>
            while pressing the middle button and moving the mouse
            translates the widget.<br>
            <br>
            How can I switch the behavior of those two buttons?<br>
            I.e. having the left button doing the translation and the
            middle button the rotation?<br>
            <br>
            -tk<br>
            _______________________________________________<br>
            Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
            <br>
            Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank"></a><a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
            <br>
            Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" rel="noreferrer" target="_blank"></a><a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
            <br>
            Search the list archives at: <a href="http://markmail.org/search/?q=vtkusers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=vtkusers</a><br>
            <br>
            Follow this link to subscribe/unsubscribe:<br>
            <a href="http://public.kitware.com/mailman/listinfo/vtkusers" rel="noreferrer" target="_blank">http://public.kitware.com/mailman/listinfo/vtkusers</a><br>
          </blockquote>
        </div>
        <br>
        <br clear="all">
        <div><br>
        </div>
        -- <br>
        <div>Cory Quammen<br>
          R&D Engineer<br>
          Kitware, Inc.</div>
      </div>
    </blockquote>
    <br>
    </span><span class="HOEnZb"><font color="#888888"><div>-- <br>
      
      <hr size="1">
      <table border="0" cellpadding="0" cellspacing="0">
        <tbody>
          <tr>
            <td><a href="http://www.dunescientific.com/" target="_blank"><img src="http://www.dunescientific.com/images/email/ds_logo_233x60.png" alt="" border="0" height="40"></a></td>
            <td><img src="http://www.dunescientific.com/images/email/spacer.gif" alt="" border="0" height="1" width="15"></td>
            <td bgcolor="#cccccc"><img src="http://www.dunescientific.com/images/email/spacer.gif" alt="" border="0" height="1" width="1"></td>
            <td><img src="http://www.dunescientific.com/images/email/spacer.gif" alt="" border="0" height="1" width="10"></td>
            <td>
              <div style="font-size:10px;color:#666666"> Totte Karlsson:
                <a href="mailto:totte@dunescientific.com" target="_blank">totte@dunescientific.com</a>
                or <a href="tel:%20425%20%20780-9648" value="+14257809648" target="_blank">(425) 780-9648</a><br>
                <a href="http://www.dunescientific.com/" target="_blank">http://www.dunescientific.com/</a>
                <br>
                © 2015 Dune Scientific, LLC. All rights reserved. </div>
            </td>
          </tr>
        </tbody>
      </table>
    </div>
    <br>
    <br>
  </font></span></div>

<br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" rel="noreferrer" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=vtkusers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=vtkusers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/vtkusers" rel="noreferrer" target="_blank">http://public.kitware.com/mailman/listinfo/vtkusers</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">Cory Quammen<br>R&D Engineer<br>Kitware, Inc.</div>
</div></div>