Forum: wxRuby layers

Posted by Don Wilde (Guest)
on 2010-12-13 20:30
(Received via mailing list)
Is there a way to stack windows in Z dimension? I find that quite useful 
in
Android, and it would be useful here. I don't see it in the docs or the 
C++
book, so perhaps it's a wish list item.

For example, I have a gauge to display with a moving dial pointer. Due 
to
the fact that the pointer crosses several colors, simply "un-writing" 
the
pointer before moving it will not work, so I need to redraw the 
underlying
gauge which often hiccups even on my 4-core Ubuntu system.

If sizers could stack in Z, the top pane would be transparent except for 
the
dial pointer and it would be the only thing redrawn.
Posted by Chauk-Mean Proum (chauk-mean)
on 2010-12-18 13:11
(Received via mailing list)
Hi,

2010/12/13 Don Wilde <dwilde1@gmail.com>:
>
> Is there a way to stack windows in Z dimension?

I haven't used them yet , but there are two methods that control the
z-hierarchy of a window.
Window#bring_to_front and Window#send_to_back.

Cheers,
Chauk-Mean.
Posted by Don Wilde (Guest)
on 2010-12-18 19:50
(Received via mailing list)
On Sat, Dec 18, 2010 at 3:07 AM, Chauk-Mean Proum 
<chauk.mean@gmail.com>wrote:

> Hi, Chauk-Mean -
I suspect that that refers to the window / frame relative to the window
manager hierarchy, the OS.  What I want to do is to stack panels  inside 
a
sizer such that they overlap. I haven't seen anything on that.
Posted by Chauk-Mean Proum (chauk-mean)
on 2010-12-20 16:06
(Received via mailing list)
Hi Don,

2010/12/18 Don Wilde <dwilde1@gmail.com>:
> -- Don Wilde
It seems that you're right.
Window#bring_to_front and Window#send_to_back correspond respectively
to wxWidgets Window#raise and Window#lower. The methods have been
renamed for consistency and to avoid name conflict with Kernel#raise.
And raise and lower work only for top level windows (see
http://trac.wxwidgets.org/ticket/4717).
According to the ticket, overlapping windows/controls are not advised.
Unfortunately the wxWidgets documentation has not been updated
accordingly 
(http://docs.wxwidgets.org/stable/wx_wxwindow.html#wxwindow).
Regarding wxRuby, I'll fix the documentation to clarify this point.

Cheers,
Chauk-Mean.
Posted by Don Wilde (Guest)
on 2010-12-20 18:32
(Received via mailing list)
On Sun, Dec 19, 2010 at 2:00 PM, Chauk-Mean Proum 
<chauk.mean@gmail.com>wrote:

> > manager hierarchy, the OS.  What I want to do is to stack panels  inside
> http://trac.wxwidgets.org/ticket/4717).
> According to the ticket, overlapping windows/controls are not advised.
> Unfortunately the wxWidgets documentation has not been updated
> accordingly (http://docs.wxwidgets.org/stable/wx_wxwindow.html#wxwindow).
> Regarding wxRuby, I'll fix the documentation to clarify this point.
>
>
Yes, it does appear to be a design decision. Very useful 'would be 
nice',
though! :D

Thanks, Chauk-Mean.
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.