[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: Keeping Track of More Than One Window in an App
- From: Chris Wareham <chrisw uk yahoo-inc com>
- To: gtk-app-devel-list redhat com
- Subject: Re: Keeping Track of More Than One Window in an App
- Date: Thu, 24 Jun 1999 12:14:04 +0100
Sean Nichols wrote:
>
> I have an app that I'm developing that consists of a number of windows
> spun off a main window (which contains little more than a menubar and
> toolbar). Unfortunately, I am having a bit of trouble getting the various
> windows to talk to one another. As an example of what I'm talking about,
> consider the following situation, which is one of the ones I've run up
> against.
>
My answer to this problem is to use a linked list of structs, each of which
contains a pointer to a single window. The best thing about this
is that no one window has to be the 'base' window, and I can happily close
windows at random without the risk of closing the whole application. I've
used this principle successfully with a 'file manager' like utility (it's
actually a port of moxfm - the Motif version of xfm - to GTK+).
If I needed a parent window, which had menu items referring to each child
window, I would dynamically add a menuitem for each child window as it
is created.
Hope this helps,
Chris
--
Yahoo! UK
email: chrisw@uk.yahoo-inc.com
phone: +44 (0)171 664 0447
pager: chris_wareham
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]