return of the MDI



May this mail is more oriented to gnome-gui-list, but I think that it
could be useful to discuss if the following is doable:

When I once asked if GTK supported of should support window-in-window
MDI a la Windows, I received a "No" for response. The only way to make
my application behave MDI style would be to use gnome libraries and the
famous notebook style (or modal style ...).

I simply can't stand any of the MDI approachs taken by the gnome
libraries.
However, the person who answered me, told me that he couldn't stand the
window-in-window MDI style, because it didn't let him to have different
MDI children in different X Desktops.

Although, I could understand having different MDI children in different
X Desktops in some strange situations, I can't understand the gnome
MDI behavior in programs like GIMP.
Having window-in-window MDI could let you:

* Iconify all MDI children when the parent window is iconifed. (Useful).

* Manage MDI children inside the parent without boring the rest of
toplevel windows in the desktop.
* Is someway clearer in word processors, image editors, in general...

But well, window-in-window MDI won't let you dettach a MDI child from
the parent (which could be useful sometimes).

I came to reading in the GNOME Developers Interview:

"We already have plans for a second spec, to include advanced features
that would delay the release of the first spec too much. One possibility
for this is window-in-window MDI (like Microsoft Word). Whilst this type
of MDI is somewhat unpopular with many people, I think that supporting
it would be a very good thing from the point of view of helping people
porting stuff to X, and those developing cross platform apps.

   [WM Spec Coordinator (pdw@ferret.lmh.ox.ac.uk)] "

My petition here is that simple MDI should be transfered to the
GTK level (or even the GDK level is possible) and a more complex (is
needed) GNOME MDI API could be built over the MDI GTK. (Why?. Simply
because one sometimes would like to make a simple GTK program with MDI
support without digging inside GNOME or requiring that the user has
GNOME installed).
The second petition is that GNOME MDI should be completely avoided is
the following is possible (I don't know. Please turn some light to me if
this is not possible):

Following the WM Spec idea, it would be nice to have something like:

gtkmdi=gtk_window_new(GTK_WINDOW_MDI);

(That would set a WM Hint over the X-Window associated to gtkmdi -a
GtkWindow *- so that the WM managed correctly the displayed the MDI
child inside the parent).

And:

  gtk_container_add(GTK_CONTAINER(any_container),w);

So that one can handle the position of the MDI child inside the parent,
putting it inside a container.
Of course, the containers code should change to allow special windows
(MDI windows) to be inserted inside them. Inserting a MDI window inside
a container would simply attach the window geometry to that of the
container.

Even that would allow minimizing the MDI child, and the associated icon
would trespass the container boundaries.

(I don't know if this is possible with current containers, or a special
mdi_container should be created).

For those that can't stand window-in-window MDI style, a call like:

gtk_window_mdi_set_policy(GTK_WINDOW(gtkmdi),gint policy);

policy=GTK_WINDOW_MDI_DETACHED or GTK_WINDOW_MDI_ATTACHED

would say to the WM if the gtkmdi should be drawn outside the toplevel
window or inside it (in the corresponding container).

and
gint gtk_window_mdi_get_policy(GTK_WINDOW(gtkmdi)) would return the
current policy.

That way everybody would be happy.
Even the WM could add a detach/attach button by the window title, to let
the user customize MDI placement.

And with that behavior added to GTK, many GTK programmers could happily
make MDI applications without worrying about GNOME. And GNOME could
build MDI management on top of the GTK one (perhaps adding functions to
cascade or tile the MDI windows, or to attach/detach all MDI windows,
whatever. And that should be let out of GTK, so GTK remains as small as
possible).

All of these are my thoughts, and now the question is: Is it doable?



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]