This is great.. I'm sure custom cursors would be very useful. If your cursor isn't supported in the default list of cursors (for instance for unix (xfree86/xorg), here is a typical list that can be added to the corresponding render windows (vtkXOpenGLRenderWindow etc).<br>
<br> <a href="http://tronche.com/gui/x/xlib/appendix/b/">http://tronche.com/gui/x/xlib/appendix/b/</a><br><br>The niche ones like a Rotate cursor etc aren't available. I took a cursory (laughing) look at how OpenInventor does this.. As you know they have a rotate cursor for the roll action (search for so_xt_roll_bits to get the bitmap). The bitmaps for the cursors (see SoXtCursor) and allow custom bitmaps..<br>
<br>See the OpenInventor chapter "Using cursors for feedback" on how to set these custom bitmaps.. <br><br> <a href="http://docs.sgi.com/library/tpl/cgi-bin/getdoc.cgi/0530/bks/SGI_Developer/books/Inventor_TM/sgi_html/ch10.html#id11605">http://docs.sgi.com/library/tpl/cgi-bin/getdoc.cgi/0530/bks/SGI_Developer/books/Inventor_TM/sgi_html/ch10.html#id11605</a><br>
<br><br><pre class="literallayout">// This routine is used to define cursors..<br>void simpleViewer::defineCursors()<br>{<br> XColor foreground;<br> Pixmap source;<br><br> ...<br> <br> // View plane translate cursor<br>
source = XCreateBitmapFromData(display, d, <br> so_xt_flat_hand_bits, so_xt_flat_hand_width,<br> so_xt_flat_hand_height);<br> vwrCursor = XCreatePixmapCursor(display, source, source, <br> &foreground, &foreground, so_xt_flat_hand_x_hot, <br>
so_xt_flat_hand_y_hot);<br> XFreePixmap(display, source);<br> <br> // Seek cursor<br> source = XCreateBitmapFromData(display, d,<br> so_xt_target_bits, so_xt_target_width,<br> so_xt_target_height);<br>
seekCursor = XCreatePixmapCursor(display, source, source, <br> &foreground, &foreground, so_xt_target_x_hot,<br> so_xt_target_y_hot);<br> XFreePixmap(display, source);<br> <br>
createdCursors = TRUE;<br>}<br></pre><br>It would be great to add this kind of functionality to expand VTK's cursor management.<br><br><br><br><div class="gmail_quote">On Mon, May 3, 2010 at 12:08 PM, Dean Inglis <span dir="ltr"><<a href="mailto:dean.inglis@camris.ca" target="_blank">dean.inglis@camris.ca</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">I have an application in which Id like to have<br>
a cursor to indicate rotation is occuring during widget interaction, however,<br>
VTK is limited to a basic set of cursors which does<br>
not include such a cursor. Im guessing<br>
this is to maintain cross-platform compatibility.<br>
Anyone have any experience coding a custom<br>
cursor they could share (Windows or any other<br>
platform)? <br>
thanks,<br>
Dean<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <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" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
</blockquote></div><br><br clear="all"><br>