Re: Hourglass on menu widget
- From: Havoc Pennington <hp redhat com>
- To: Chris Garrett <garrett91 hotmail com>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: Hourglass on menu widget
- Date: Wed, 13 Nov 2002 13:40:20 -0500
On Wed, Nov 13, 2002 at 03:36:32PM +0000, Chris Garrett wrote:
Is there any way that I can create a toolbar that floats alongside the main
window in my application? The idea is that it will hug the left hand side
of the window, even when the window is moved.
Moving the toolbar away from the window, and then subsequently moving the
window, would also move the toolbar (relative to the window).
So, upon startup, it would look something like this:
XXXo===========================0
XXX| |
XXX| |
XXX| |
| |
| |
0===========================0
The "X" characters represent the toolbar.
I hope someone can help me with this, or say why it is not possible (if it
isnt).
It is not possible to do 100% nicely without extending the window
manager specification (http://www.freedesktop.org) and getting the
window manager to do it for you. All you can do is move the toolbar
when you get a GdkEventConfigure on the main window. But there are
cases where this will screw up, and it will have an annoying "lag" to
it (user will see the main window move, then the toolbar). Also,
you'll have to rely on the somewhat unreliable
gdk_window_get_frame_extents().
If the toolbar has a frame, you need to use window gravity to align it
properly. i.e. for a toolbar on the left as in your diagram, you would
set WestGravity. See gtk_window_move() documentation.
Havoc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]