[Glade-devel] Glade: toplevel widget embedding

Vincent Geddes vgeddes at metroweb.co.za
Sun Oct 8 06:23:28 EDT 2006


On Sat, 2006-10-07 at 12:49 -0400, Tristan Van Berkom wrote:
> Naba Kumar wrote:
> [...]
> 
> >That is a good start. What's more useful would be to create the
> >GladeDesignLayout for each toplevel (notified in some way through the
> >GladeProject object). That way, the user can have any such layouts
> >opened and the IDE can put them in some suitable way (notebook being the
> >very basic one).
> >  
> >
> Maybe we can do both ?
> 
>     GladeDesignLayout - a GtkBin that holds a toplevel
> 
>     GladeProjectLayout - an optional convenience widget
>        that subscribes to a project and always displays the toplevel
>        containing the currently selected widget in that project
> 
> We could use the GladeProjectLayout to simplify the Glade frontend
> and anjuta and other ide's can use it if they so desire.
> 

Yes, we should do that. In the embedding prototype I have a class called
GladeTab which is similar to your description of GladeProjectLayout. It
is a GtkVBox subclass. Each GladeTab parents a GladeDesignLayout, and is
also associated with a specific project. GladeTab is meant to be used in
conjunction with a GtkNotebook, but it most certainly can be used
without one.

Ok, so a GladeProjectLayout/GladeTab object would solve most of our
problems with regard to API and would satisy most use cases. Now what
sane API would we need for client programmer to put an arbitrary
GladeWidget into a GladeDesignLayout? 

How about this:

  /* if widget is NULL, remove current GladeWidget */
  glade_design_layout_put (GladeWidget *widget);

of course this function would only make sense if `widget' refers
to a toplevel or parent-less GtkWidget.

cheers

Vincent



More information about the Glade-devel mailing list