Re: [Glade-devel] [question] Glade box model

Date view Thread view Subject view Author view

From: Andrae Muys (amuys@shortech.com.au)
Date: Mon Mar 12 2001 - 18:49:21 EST


Nelson Correa de Toledo Ferraz wrote:
> Now, how come that, when the label is in the first cell (0,0), the source
> code has the properties of listing 1, and when it is in the second column
> (0,1) it has the properties of listing 2?
>
> Listing 1: A label in cell (0,0)
>
> <left_attach>0</left_attach>
> <right_attach>1</right_attach>
> <top_attach>0</top_attach>
> <bottom_attach>1</bottom_attach>
>
> Listing 2: A label in cell (0,1)
>
> <left_attach>1</left_attach>
> <right_attach>2</right_attach>
> <top_attach>0</top_attach>
> <bottom_attach>1</bottom_attach>
>
> What is the logic behind these numbers??? I know that it must be something
> simple, but I'm really lost.
>

Well the simple answer to your question is "This has nothing to do with
Glade". However a slightly longer answer might be appropriate.

Specifically I suggest you take a look at
http://developer.gnome.org/doc/API/gtk/gtktable.html#GTK-TABLE-ATTACH
and I think you might understand the logic behind the GladeXML format.

Column/Row span is very common in dialog boxes, far more common then in
markup tables in websites. The other thing to understand is that
GladeXML isn't currently intended to be human readable/editable,
although some of us do regularly make small manual edits. This may
eventually change (or it may not), but for now there are more important
things to deal with, and it is not immediately obvious that that hand
editing (as opposed to tool or script based editing) is a particularly
useful feature. (at least it isn't obvious to me, feel free to correct
me if I'm wrong :)

> Is it possible that, someday, you'll adopt the same box model proposed by
> W3C? I know, it's more difficult to parse and render, but it has a number
> of advantages, starting by the fact that you don't have to declare how
> many rows and columns your tables will have!

Possible? Yes it's possible, but with Gtk+2.0 GtkTable API unchanged it
is highly unlikely that any API change would be accepted. If you see a
need for this then you would need to fork off a new container and
publish it as an extension widget. Understand however that I personally
don't think all that highly of the W3C, in my opinion they have lost
their focus to the detriment of their standards as they have tried to
accomidate Document Markup, Document Typesetting, and Data
Serialisation/Interchange communities. GladeXML is strictly focused on
being a serialisation of Gtk GUI layout data.

However as far as an enhanced GtkTable widget is concerned, adding
autoresizing, and the ability to obtain Gtk[HV]Box views of Table
Columns and Rows might be useful. Although probably not so useful that
I would devote any of my scarce coding time to developing one :)

Regardless of the above, I'm curious as to why you were specifically
interested in the GladeXML format?

Andrae

_______________________________________________
Glade-devel maillist - Glade-devel@helixcode.com
http://lists.helixcode.com/mailman/listinfo/glade-devel


Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Mon Mar 12 2001 - 20:52:28 EST