Re: [gtk-list] Re: Resizing widgets with a mouse [OT]
- From: "Emmanuel DELOGET" <logout free fr>
- To: <gtk-list redhat com>
- Subject: Re: [gtk-list] Re: Resizing widgets with a mouse [OT]
- Date: Sat, 26 Feb 2000 13:14:49 +0100
From: Trog <trog@gtk.org>
>
> I guess you're asking 'is there a Windows like MDI interface for GTK+'.
>
> The short answer is no. MDI (the MS way) is considered evil UI design.
>
> There are alternatives within GTK:
> o Multiple top-level windows
> o GtkNotebook
> o GtkPaned
>
> -tony
>
Hi Tony.
Well... There are some cases where such an Evil Design may offer
good services (for ex., cut/copy/paste is easier for the user since
he can see both MDI windows at the same type).
And you can find drawbacks in your proposed alternatives :
* Multiple toplevel windows : since the WM uses the same acclerator
key to run through the list of all your windows, you can't really
switch from a window to the other by using the keybord. If the
WM proposes a Windows-like taskbar, you'll have to deal with
a *lot* of window representation.
* GtkNotebook : you only see a single view at one time
* GtkPaned : all the windows lies on the same plane - they don't
overlapp, so the more you add views, the smaller they will be
while I actually like the GtkNotebook implementation of MDI, it could
be interesting to have a module-based WiW MDI implemetation.
> On Wed, Feb 23, 2000 at 11:07:15PM -0500, Steven M. Campbell wrote:
> > How does one go about resizing widgets with the mouse?
> >
> > I have a window with a fixed-layout widget (I'm assuming this is a good start) with several
> > framed widgets each containing a scrolled window. I'd like the user to be able to treat
> > these frame widgets (or whatever widget I need wrap the whole thing in) to work same way
> > windows do, that is, drag a corner to resize, drag the title to move (or whatever close
> > equivalent there may be). I've 'manually' resized them using gtk_container_set_usize and all
> > works well but I'm starting starting to feel like Rube Goldberg thinking through ways to get
> > the mouse interaction working. Is there an easy way to do this or had I start rereading the
> > "Writing a GTK Widget" chapter? ;-)
> >
The better way to do this is probably to write a small WM outline (a
GtkWiWContainer) that will be able to handle any number of GtkWiWWindow.
When you add a child window in the parent container, the parent of the newly
created X Window is the X Window of the container. Since the
GtkWiWWindow is a container too (well... it really looks lie a GtkWindow in
fact) it will gracefully handle evey added any kind of widgets.
If you add a title bar and a resize zone that is able to send signals to
the the GtkWiWContainer, you should be able to support resize, move and
overlapping of the windows without needing a fixed layout container.
I agree that this solution requires more work (you'll need to write
two widgets, and one of them is really complex) but this is (I think)
the better solution.
Yours,
Emmanuel
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]