Re: [gtk-list] Re: Suggestion for Perl/GTk packing
- From: Tim Janik <timj gtk org>
- To: gtk-list redhat com
- cc: dov Orbotech Co IL, kjahds kjahds com
- Subject: Re: [gtk-list] Re: Suggestion for Perl/GTk packing
- Date: Sun, 19 Apr 1998 12:23:13 +0200 (CEST)
On Sun, 19 Apr 1998, Andreas Kostyrka wrote:
> On Sun, 19 Apr 1998 dov@Orbotech.Co.IL wrote:
> > Reading through the tutorial I really had a feeling that it is a shame
> > that the underlying C-Code wasn't build around varargs and named
> > parameters. There are lots of strange functions like
> If you want this, go for Tcl/Tk. Gtk was ALSO designed to be lowlevel and
> fast. With your proposal, every function call would start by comparing
> strings. Not a very fast approach.
not really, one simple hash lookup would do the trick ;)
actually "dov" (is that a name?) is kind of right with his idea/proposal.
the reason for not having a generic mechanism to specify linkage upon
adding a child to a container is that this hasn't been an issue when
gtk+ was initially designed. e.g. the object::any-argument mechanism
has been added to gtk+ quite latly as well (actually, this was done when
the issue of a GUI builder was raised) and isn't still consequently
implemented (though, i'm working on it as soon as i have a free second).
> > gtk_table_attach() vs. gtk_table_attach_with_defaults(),
> > gtk_box_pack_start() vs. gtk_box_pack_end() that would be unnecessary
> > had this be done. Not to speak about the consequences of adding a new
> > parameter in the future to the latter pack functions... E.g. an
> > -anchor parameter. There is no room for it without changing all the
> > existing code. But this critique obviously doesn't belong to the
> Nope, just add a new method, and emulate the older ones internally with
> the new one. No code change.
yep, it shouldn't be too hard to add two new members/signals to the
GtkContainer class,
1. to query the named arguments featured at linkage time
(as well as free child slots e.g. GtkBin has 0 or 1, whereas a GtkBox
always has infinite slots) and
2. a new add_child member to feature named linkage arguments.
and it can peacfully coexist besides the normal gtk_container_add()
fucntionality.
i'll probably do this once i get more time to work on GLE.
>
> Andreas
>
>
---
ciaoTJ
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]