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

Home » Public Forums » archive » Re: Not Sure about widget hierarchy ??
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
Re: Not Sure about widget hierarchy ?? [message #34831] Thu, 24 April 2003 11:12
paul wisehart is currently offline  paul wisehart
Messages: 28
Registered: December 2002
Junior Member
Thanks for the input.
It was very helpful.

I was still confused about draw_widgets & windows.

What I ended up doing was to have 2 window/draw_widgets
contained in one top-level-base. I think that was suggested
to me, but I was still confused about windows & draw-widgets,
so I didn't understand.

Thanks for the help!

Now I need to come up with some _real_ assigments for myself
so my employers will let me keep doing this stuff ! :)

--
paul \ /
wisehart >/
<//////$>
|\|\|\
Re: Not Sure about widget hierarchy ?? [message #34837 is a reply to message #34831] Wed, 23 April 2003 14:27 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
JD Smith (jdsmith@as.arizona.edu) writes:

> I don't regard a draw widget as a window. It's a canvas, embedded in a
> base, which may be a top level base defining a window (i.e. that which
> has a title bar). How about:
>
> IDL> b=widget_base(/ROW,SPACE=1)
> IDL> d1=widget_draw(b,xsize=100,ysize=100)
> IDL> d2=widget_draw(b,xsize=100,ysize=100)
> IDL> widget_control, b,/realize

Talk about namespace clashes! How about we talk
about "application windows" which are those things
with the nice menu bars on them and correspond to
a top-level base widgets, and "graphics windows",
which are those things you traditionally draw
graphics in. When those things are objects, we could
call them.... Oh, on second thought, just forget about
the whole thing. :-(

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
Re: Not Sure about widget hierarchy ?? [message #34838 is a reply to message #34837] Wed, 23 April 2003 14:09 Go to previous message
JD Smith is currently offline  JD Smith
Messages: 850
Registered: December 1999
Senior Member
On Wed, 23 Apr 2003 13:20:17 -0700, Rick Towler wrote:


> "paul wisehart" wrote in message
>
>> 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)
>>
>>
>> Is it possible to use 2 draw-widgets but still have 1 window??
>
> No. A draw widget is a window. You probably can put two draw widgets
> right next to each other and set their FRAME properties so that there is
> no (or a very small) border making it look like one big window.

I don't regard a draw widget as a window. It's a canvas, embedded in a
base, which may be a top level base defining a window (i.e. that which
has a title bar). How about:

IDL> b=widget_base(/ROW,SPACE=1)
IDL> d1=widget_draw(b,xsize=100,ysize=100)
IDL> d2=widget_draw(b,xsize=100,ysize=100)
IDL> widget_control, b,/realize

JD
Re: Not Sure about widget hierarchy ?? [message #34839 is a reply to message #34838] Wed, 23 April 2003 13:20 Go to previous message
Rick Towler is currently offline  Rick Towler
Messages: 821
Registered: August 1998
Senior Member
"paul wisehart" wrote in message

> 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)
>

> Is it possible to use 2 draw-widgets but still have 1 window??

No. A draw widget is a window. You probably can put two draw widgets right
next to each other and set their FRAME properties so that there is no (or a
very small) border making it look like one big window.

I think either approach would work and I don't think there is a "standard
way" but David may have something to say about that :) Personally I would
probably take the two draw widgets really close to one another approach
because I think it would be simpiler in the end.

-Rick
Re: Not Sure about widget hierarchy ?? [message #34840 is a reply to message #34839] Wed, 23 April 2003 13:21 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
paul wisehart (wisehart@runbox.com) writes:

> I am beginning to see how you can organize your widgets by having
> more than one base to which the widgets can belong.
> (So far my little programs have only had the top-level-base base-widgets)
> It was helpful for me to put a widget in a base-widget that didn't actually
> add anything.

Absolutely. You can't use too many base widgets,
and I mean this sincerely. If you use base widgets
to organize your interface, the chance of your
program actually running on some other platform
is immeasurably increased. :-)

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
Re: Not Sure about widget hierarchy ?? [message #34841 is a reply to message #34839] Wed, 23 April 2003 13:05 Go to previous message
paul wisehart is currently offline  paul wisehart
Messages: 28
Registered: December 2002
Junior Member
On Wed, 23 Apr 2003 13:24:30 -0600, David Fanning <david@dfanning.com> wrote:
> Huh!? Draw widgets *are* windows! (Rather, windows are the "values"
> of draw widgets, but you knew that.)
Actually, I was a little unclear about the relationship
between draw-widgets and window-objects. Your statement
helps a lot.

> 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.
I want there to be one "window" to the user so I think I'll use
one window. I actually just solved a part of my problem. I was
having trouble placing 2 draw widgets in one window. I solved it
be making a "draw" widget_base to specify that the draw-windows
should be next to each other.

I am beginning to see how you can organize your widgets by having
more than one base to which the widgets can belong.
(So far my little programs have only had the top-level-base base-widgets)
It was helpful for me to put a widget in a base-widget that didn't actually
add anything.

Anyways, thanks for the input!


--
paul \ /
wisehart >/
<//////$>
|\|\|\
Re: Not Sure about widget hierarchy ?? [message #34842 is a reply to message #34841] Wed, 23 April 2003 12:24 Go to previous message
David Fanning is currently offline  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
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Convert IDL code to HTML with color chromacoding for webpage / printing
Next Topic: Re: problem with hidden lines in SURFACE in IDL version 5.5 and 5.6

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

Current Time: Fri Nov 28 09:42:18 PST 2025

Total time taken to generate the page: 0.01580 seconds