| Re: Not Sure about widget hierarchy ?? [message #34842 is a reply to message #34841] |
Wed, 23 April 2003 12:24  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
paul wisehart (wisehart@runbox.com) writes:
> I am trying to learn the object-graphice & widget features
> of IDL. I have given myself a small "assigment" to help
> me learn this stuff.
Hooray! :-)
> Basically I want to display 2 images next to each other
> on the screen. These images are required to have the same
> dimensions. (This is useful)
>
> I am looking for opinions or comments on my widget-hierarchy.
>
> I have:
>
> 2 image-objects('idlgrimage')
> 2 model-objects('idlgrmodel')
> 2 view-objects('idlgrview')
> 1 scene-object('idlgrscene')
>
> 1 window-object('idlgrwindow') who's id is gotten
> from 1 draw_widget
>
> So far this does what I want. I have 2 images displayed next to
> each other.
>
> Is it possible to use 2 draw-widgets but still have 1 window??
Huh!? Draw widgets *are* windows! (Rather, windows are the "values"
of draw widgets, but you knew that.)
> Right now when I do mouse-overs on the draw window there is 1 coordinate
> system for both windows. I would like it if there could be seperate
> coord systems for each window. I want the corresponding areas of the
> widgets to have the same coordinates.
> ( lower-left in _both_ images being [0,0] )
>
> I could do that the way I have it now, but I would have to do some
> coordinate translating. ( i would have to keep track of the dimensions
> of the images so that I know which one i'm in)
>
> I will eventually figure out how to get this all to work, but I would
> like to know if theres an _accepted_ or _standard_ way of doing this?
There is no "accepted or standard" way of doing
anything in object graphics that I have been able
to discover. :-(
Object graphics are infinitely flexible (apparently), but the
good news is that so few people use them you are in a good position
to *develop* the standards!
My advice would be to do whatever makes your life easier.
If I was in your shoes, I'd probably go for two graphics
windows, because it sounds like you want them to be independent
of each other.
> Should I do it both ways and see which works best?
Well, you said you were in the learning stage. This is
how you become an expert, you know, by making all the
stupid mistakes and keeping quiet about it. :-)
> (this is probably the best option, but I don't think I have the time)
Alas, don't let employment get in the way of personal development!
> Its all in on class-file.(I'm not sure how you say that in IDL)
I think the term is "classy", but you probably have to be a little
further along first. :-)
Cheers,
David
--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
|
|
|
|