Re: GnomeMDIChild and their views



On Sep 20, 1999, Jaka Močnik <jaka.mocnik@kiss.uni-lj.si> wrote:
> 
> > Hi Jaka,
> hello!
> 
> sorry for not promptly replying to your previous mail, but I am just soooo busy these days...

I have the same problem.  (c:

> > However, it doesn't seem like GnomeMDI is built to support
> > this, at least without extending the current API.  Was
> > this part of the original intent of GnomeMDI, and if so,
> > how would I make use of it?  Would I have to derive my
> > own Child classes to do so?  Is the limitation just in
> > GnomeMDIGenericChild?
>
> the API makes it awkward to implement indeed. my proposal is to 
> create a single view type that is merely a container widget that 
> contains your actual view, you create different widgets for each 
> view type and put one of them in the "real" view (the container 
> use a function like my_view_change_type(view, view_type) to change 
> it.
> 
> you would do something like this when adding a new view:
> 
> gnome_mdi_add_view(mdi, my_child);
> view = gnome_mdi_get_active_view(mdi);
> set_view_type(view, A_VIEW_TYPE);

So the child would carry a GList of ViewContainer's, rather than
directly carrying a list of the views?  An extra layer of widgets?
Or would the ViewContainer be derived from GtkObject like the 
other MDI components?

Hmm, what would be the namespace of the set_view_type() function?
gnome_mdi_set_view_type()...or would it make sense to create a
GnomeMDIView object now, too?

> where the last call would remove any previous contents from the view 
> and insert the proper widget for the desired type. I hope I wasn't 
> too unclear.

Nope, just the right amount of unclarity.  (c:

> the API should be rethought and modified a bit for 2.0. any of your 
> comments are very welcome. you might say that for now multiple view 
> types may exist, but the MDI does not know anything about it ;).

That's just fine for me.  I'm more interested in targeting 2.0 anyway.
I'd be delighted to help design the improvements to the MDI system
for 2.0.  I'll try to sit down and think about it this week, and let
you know what I come up with.

Do you have any other thoughts about what might go into GnomeMDI 2.0?

> > Another way to put this is, what good is it to have more
> > than one identical view of the same child object?  (c:
>
> not identical views, identical view types, think of a text document 
> with three views of the same type, each showing a different portion 
> of text... ie: the document data is identical for all views but the 
> view parameters may differ between views (like the line in which the 
> cursor of a text editor is).

Ahhhh, okay, that makes a lot more sense now.

Thanks,
John



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]