Modal dialogs



  Good day again,

I wonder, how modal dialogs are implemented.

What I need is a function, which doesn't return until
a modal dialog is destroyed again. This does not seem
to be possible right now. Is there any chance, that an
idle function might get implemented in future versions
of the GTK. What I have to do is something like this:

bool  done = FALSE;

void callback_called_by_OK_button_in_modal_dia(...)
{
  done = TRUE;
};

void foo(...)
{
  // create new modal dialog here
  // connect OK-button signal to callback above

  while (!done) gtk_idle();   // continue main message iteration

  // destroy dialog again

}


As you may guess, all this is required for porting GTK to
wxWindows.

      Thanks and regards

                 Robert Roebling




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