comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » creating white cursors
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
creating white cursors [message #26313] Thu, 16 August 2001 10:07 Go to next message
Rick Baer is currently offline  Rick Baer
Messages: 6
Registered: November 1999
Junior Member
I understand how to use the "cursor_image" and "cursor_mask" keywords
of the device command to create a new black cursor pattern. What can I
do to create a white cursor, like the default "cursor_crosshair"?

Rick Baer
Agilent Technologies
rick_baer@agilent.com
Re: creating white cursors [message #26372 is a reply to message #26313] Mon, 20 August 2001 12:39 Go to previous message
btt is currently offline  btt
Messages: 345
Registered: December 2000
Senior Member
Hi,

I don't know much about managing the system cursor, but there is simple
(and pretty fast) way of plotting a pseudo-cursor on the display. I use
this when I have multiple images displayed in a widget and the user
wants to know how they correspond pixel-to-pixel. It's only for direct
graphics.

I would copy the graphic window into a pixmap. When ever a motion event
occurs, copy the pixmap into the graphic window, then follow with a
PLOTS command to draw the cursor symbol you want.


PRO MyDrawEvent, event

;I assumed that you have the necessary information stored in the top
level base's uValue
Widget_Control, event.top, Get_Uvalue = Info, /No_copy

If event.type EQ 2 then begin
;copy the graphic from the pixmap to the window
Wset, Info.DrawWin
Device, Copy = [0,0, winXsize,winYsize,0,0, Info.PixMap]
;plot your pseudo-cursor; the only time I notice a lag
;is when the cursor is moved really quickly.
PlotS, event.X, event.Y, psym = 1, color = mycolor, /Device

EndIf

Widget_Control, event.top, Set_Uvalue = Info, /No_copy

End


I would be interested in knowing how to fiddle with the system cursor
more adeptly. I have often wished for a crosshair cursor with the
middle of it missing (so it won't hide the covered pixel.)

Ben

Rick Baer wrote:
>
> I understand how to use the "cursor_image" and "cursor_mask" keywords
> of the device command to create a new black cursor pattern. What can I
> do to create a white cursor, like the default "cursor_crosshair"?
>
> Rick Baer
> Agilent Technologies
> rick_baer@agilent.com

--
Ben Tupper
Bigelow Laboratory for Ocean Sciences
180 McKown Point Rd.
W. Boothbay Harbor, ME 04575
btupper@bigelow.org
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: on-screen slider
Next Topic: processing widget events from multiple hierarchies

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 17:08:37 PDT 2025

Total time taken to generate the page: 0.01356 seconds