Re: Nesting gtk_main ?



On 1 February 2010 10:37, Martin Vejnár <avakar ratatanek cz> wrote:
>>> In electronics design, it is common to have two independent windows, one
>>> which shows the schematics and the other shows the circuit board. You
>>> don't want dialog boxes pertaining to one window to block the other.

I have a pair of classes I use in my app which implement a window /
dialog tree.

You can have many independent top-level windows, you can freely mix
modal and non-modal dialogs, dialogs can pop up nested child dialogs,
and a modal dialog only blocks windows below it in the tree, leaving
other parts of your app working. It all works with a single
gtk_main().

It is a bit hairy :-( it's all based on continuations and is probably
overkill. But if anyone is curious:

http://vips.svn.sourceforge.net/viewvc/vips/nip2/trunk/src/iwindow.c?view=markup
http://vips.svn.sourceforge.net/viewvc/vips/nip2/trunk/src/idialog.c?view=markup

John


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