[Mono-dev] Some questions in regards to the GTK# API

Mike Kestner mkestner at gmail.com
Mon Nov 30 13:41:15 EST 2009

On Sun, 2009-11-29 at 19:27 +0100, Claus Jørgensen wrote:

> I made a example of what I think could be nice to have here:
> http://windcapes.pastebin.com/m7f2f591b , but I'm wondering if there
> is there a reason for them not being there, seeing that a number of
> other properties are available, but not these.

There is already a DefaultSize property.  If you want to add the others,
feel free to open a bug and attach a patch.  The file you want to modify
is gtk/Window.custom.

We can only add convenience API like this in unstable versions, though,
which means it will only be available in 3.0 and beyond when development
begins on that.

> Plus, I find it very strange that there is no parameter-less
> constructor for Gtk.Window class. After all, it's rather ugly having
> to call the base constructor when making a derived Window, which is
> rather typical for GUI development. 

I don't know how ugly it is.  It would be extremely unusual to create a
toplevel window without setting the title of the window, which is one
available overloads.  I'm not opposed to adding default constructors for
everything.  It would make things simpler MD's designer if all the
widgets had default constructors for example.  I'm not sure how feasible
that is given the use of construct-only properties in gtk+.

Mike Kestner <mkestner at gmail.com>

More information about the Mono-devel-list mailing list