Re: Gtk containers



Nils Philippsen wrote:
> 
> On Fri, 16 Jul 1999, Sergio A. Kessler wrote:
> 
[...]
> 
> > are you saying me that the position (x, y) of the button doesn't
> > belong to the button ?
> 
> No and yes. No, it's a property of the child and yes, the parent is
> responsible for it.

sorry, but this is confusing...  an object has a property he can't
control..

> Like the General who commands where each unit shall
> be.

what if the button doesn't want to be in a military unit ?
there should be a place for freedom and free speech, 
don't you believe?

> > >For example: How would you make a horizontal/vertical box or a table with
> > >all cells of an equal size (since size and position would be properties of
> > >the widgets)? Should they talk to each other? What if they disagree ("I
> > >want to be the same size as you -- No. I want to be half in width and
> > >double in height as you.")?
> >
> > this can be worked out with positions, alignment and anchors properties
> > on the button and talking with the parent.
> 
> And you'd have bleeding fingers afterwards. It's much shorter to program
> this in a top-down manner.

well, this is another issue, I agree with you that with the current 
aproach is more easy to create an interface by coding it by hand,
but when you come with an interface builder, this complicate all..

And I still have to find a good reason to not use a interface
builder and code the interface by hand.

For example, take glade, put a hbox and then put button A to the
left and then put a button B next to A, now you realize that btn
B must be to the left of A. What you do ?
With the current approach you have to delete both buttons and 
start again (an horrible solution, let me say).
With the property aproach I'm pushing, you just change two properties,
isn't this simpler and more object-oriented-alike ?

(Glade is having a hard time with GtkFixed, for example)

> > >> (btw, this is how the libraries I work behave, from Borland wich
> > >> have a long experience on GUI libraries)
> > >
> > >As you cann easily see at the price tag and the source code you may read,
> > >this is NOT Borland.
> >
> > what's bad on taking good ideas from outside ?
> 
> People can be of different opinion on what's good. Taking this idea now
> into gtk, would -- be it good or not -- break almost the whole layout
> concept of gtk and would and piss off a lot of people who developed
> programs with gtk, as they now had to rewrite almost the whole program
> (with regards to layout, that is).

I'm not saying to remove all current containers, only to add a JAC 
(Just Another Container)(and maybe add GTK_RESIZE_NONE as a new 
GtkResizeMode enum), but this one realy does *nothing* more 
than hold the childrens, this childrens behave like they want inside
the new container (one aligned, another fixed, etc).

btw, I've heard that Tim Janik is doing an interface builder, is this
true ?


Sergio
-- 
  |    Sergio A. Kessler  http://sak.org.ar
-O_O-  You can have it Soon, Cheap, and Working; choose *two*.



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