[MonoDevelop] Task Class Wizard

Michael Hutchinson m.j.hutchinson at gmail.com
Sun Sep 21 18:38:55 EDT 2008

On Sun, Sep 21, 2008 at 7:36 AM, dave <knottnhupfer at gmail.com> wrote:
> I created now a similar GUI:
> http://www.student.tugraz.at/monichi/mono/form_version_4.png
> The upper part is identically.

It's looking good!

> I distinguish between interface and base class because I think that's much
> easier for the user to search so for both.
> Since I don't understand what "explicit" in this context means I
> didn't add it ;)

Interface members can be implemented "explicitly", which means e.g.
for IDisposable the class could declare

IDisposable.Dispose ()

and this would mean that the members in only accessible when the class
is casted to IDisposable.

This means that classes can hide interface memebers from their won
API, and can implement different interfaces that have members of the
same name that need to function differently.

Of course, the "explicit" toggle should be hidden for the base class,
since it's not valid for that.

>> The "TreeView" would behave like the existing override/implement dialog
>> "Inherits" would track the class/interface selection in the treeview
>> so that it's clear what the "Remove" button applies to.
>> "Namespace" and "Inherits" would autocomplete
>> "Name" would validate for conflicts and invalid characters.
> My objective is to create a Gui where I can go trough with the keyboard
> Base Class and Interface are autocompletition fields
> namespace and name have the behaviour listed by Michael
> The "Remove" button belongs to the treeview to delete a focused base
> class or a interface
> If the user tries to add a BaseClass and still a BaseClass was already
> added I tought to open a dialog which asks if the user want to
> override the BaseClass already added.
> At last I have a question about TreeView.
> In http://www.student.tugraz.at/monichi/mono/form_version_4_5.png
> I marked the toggleBoxes in row 1 and row 3. Is it possible to hide
> the marked ToggleBoxes and let visible the other boxes?

Why hide those? They could instead be used to toggle /all/ the the
members for that class/interface.

> My code for the toggle boxes is:
> ---------------------------------------%<---------------------------------------------------
>     // create column
>     TreeViewColumn col_3 = new TreeViewColumn();
>     col_3.Title = "implement";
>     CellRendererToggle renderer_3 = new CellRendererToggle();
>     renderer_3.Xalign = 0.0f;
>     renderer_3.Xpad = 5;
>     renderer_3.Activatable = true;
>     renderer_3.Toggled +=new ToggledHandler(rendererToggle_Toggled);
>     renderer_3.Mode = CellRendererMode.Activatable;
>     col_3.PackStart(renderer_3, true);
>     treeview.AppendColumn(col_3);
>     col_3.AddAttribute (renderer_3, "active", 2);
> ---------------------------------------%<---------------------------------------------------
> maybe someone knows how to do this

Add a mapping for the the "visible" property too.

A few other points:

* You can pack the image and the name into the same column.
* The class name entry should probably be the whole width
* The "base class" box probably doesn't need an "add" button, or it
should change to "change" when a base class is already set.
* The scrollbar should be "auto" so it hides when not needed.

Having throught about it, and the "public"  modifier should probably
be a dropdown with "internal", since other langauges might not default
to "internal". Maybe put this on its own line with a "visibility"
label? Also, I forgot the "sealed" modifier (which is implied by

Take a look at

Maybe you could refactor that into a widget that the class wizard could re-use.

Michael Hutchinson

More information about the Monodevelop-list mailing list