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

Home » Public Forums » archive » Re: Coyote graphics and resizeable draw widgets
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Coyote graphics and resizeable draw widgets [message #79674 is a reply to message #79673] Fri, 23 March 2012 09:34 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Wayne Landsman writes:

> Enlightenment comes slowly, Sensei.

Of course, my son. Life is messy. But imagine
if you had to learn the iTools framework. It would
take more than one lifetime! ;-)

> I assume that I still need to compute the new size
> of the graphics window, i.e. if there are other buttons
> on the widget, I need to get their sizes and subtract
> them from the new size reported by TLB_GET_SIZE
> keyword for the resizing event.

Yes, you will have to do this.

> I currently use a single giant event handler, that
> distributes to the method name and object reference
> stored in a UVALUE. Its not yet clear to me how to
> store a UVALUE (that can be fetched with a GET_UVALUE)
> or even how to get the widget draw ID with the
> cgcmdwindow object, though there are things I can try.

Well, I cobbled this together a little bit, so there
isn't a UVALUE, per se. Although there is a "storage"
pointer that can be used in the same way. Access it with
the STORAGE keyword to the Get/Set property methods.

> Another thing that cgcmdwindow might help with are
> graphics overlays. For example, I want a circle to
> appear (only) at the position where the user has
> clicked with his cursor. Currently, I keep a separate
> pixmap window of the plot which gets copied back (to erase
> any old circles), and then a circle drawn at the cursor
> position. (The pixmap window also needs to be resized
> when the widget is resized.) But now I could use a
> DeleteCommand method for the old circle, and an AddCommand
> method for the new circle. (This might be slower since
> the plot would be redrawn rather than copied.)

I think I would try the cgPixmapWindow object first. This
is a subclassed cgCmdWindow object that can be used as
a pixmap window. Methods allow fast copying between windows
and so forth.

Cheers,

David


--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Coyote graphics and resizeable draw widgets
Next Topic: Re: Modifying Arrays and Structures in HASH's (hint: you can't)

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

Current Time: Sat Oct 11 09:48:44 PDT 2025

Total time taken to generate the page: 1.84744 seconds