Custom widget design time support?

403 views Asked by At

The GUI designer for MonoDevelop (Stetic) provides design-time support for widgets, such as the Notebook widget, which has options for Insert Page Before and Insert Page After. It also allows me to drop child widgets onto those separate pages.

Is this implemented directly in Gtk#? Where can I examine the code for this? How can I implement this for my own custom widgets? I want to create a notebook-like navigation control (similar to MS Outlook 2007/2010/2013) that can be designed using drag-and-drop with Stetic.

I have already tried searching through the source for MonoDevelop and Gtk#. It seems to me this may be implemented in a similar manner with additional classes and attributes like in Visual Studio with Attributes and Design-Time Support but I cannot find any evidence of that.

2

There are 2 answers

0
ghaberek On BEST ANSWER

The Stetic designer in MonoDevelop simply does not support the concept of "pluggable" widget design or commands. It's just written the way it is for the controls it supports and anything else has to be added via the Custom Widget widget and manipulated via code.

5
SushiHangover On

In MonoDevelop, Stetic is defined as a member in AddIns. Technically, it is always available/installed, so it is not something you deal with from the Add In Manager.

So you are looking for:

MonoDevelop.GtkCore.dll
libstetic.dll
libsteticui.dll

During a monodevelop build, assuming you have monodevelop code local, those get built and placed in:

monodevelop/main/build/AddIns/MonoDevelop.GtkCore

The source code that you are looking for is at:

monodevelop/main/src/addins/*

I would highly recommend in order to jump-start you:

  • git clone the monodevelop source repo
  • cd into the repo
  • ./configure --help (to figure out what options you need to use)
  • Once you can build monodevelop, you can use that build version or (Xamarin Starter+) to open workspace MonoDevelop.mdw (in root dir of repo)
  • Navigate to:
  • Main / Addins / MonoDevelop.GtkCore / libstetic
  • Main / Addins / MonoDevelop.GtkCore / libsteticui

Have fun storming the castle ;-)