Logo Search packages:      
Sourcecode: ardour version File versions  Download package

int Gtk::Dialog::run (  )  [inherited]

Blocks in a recursive main loop until the dialog emits the response signal. It returns the response ID from the "response" signal emission. Before entering the recursive main loop, run() calls Gtk::Widget::show() on the dialog for you. Note that you still need to show any children of the dialog yourself.

If the dialog receives "delete_event", Gtk::Dialog::run() will return Gtk::RESPONSE_DELETE_EVENT. Also, during Gtk::Dialog::run() the dialog will be modal. You can force Gtk::Dialog::run() to return at any time by calling Gtk::Dialog::response() to emit the "response" signal.

After Gtk::Dialog::run() returns, you are responsible for hiding or destroying the dialog if you wish to do so.

Typical usage of this function might be:

 <tt>int</tt> result = dialog.run();
 switch (result)
 {
 case GTK_RESPONSE_ACCEPT:
 do_application_specific_something (&lt;!-- --&gt;);
 break;
 default:
 do_nothing_since_dialog_was_cancelled (&lt;!-- --&gt;);
 break;
 }
Returns:
Response ID.

Definition at line 275 of file dialog.cc.

References Gtk::Dialog::gobj().

{
  return gtk_dialog_run(gobj());
}


Generated by  Doxygen 1.6.0   Back to index