Main Page
Widgets
Namespaces
Book
Gtk::Dialog Class Reference
[Dialogs]
Create popup windows.
More...
Inheritance diagram for Gtk::Dialog:
[legend]List of all members.
|
Public Member Functions |
| virtual | ~Dialog () |
| GtkDialog* | gobj () |
| | Provides access to the underlying C GtkObject.
|
| const GtkDialog* | gobj () const |
| | Provides access to the underlying C GtkObject.
|
| | Dialog () |
| | Dialog (const Glib::ustring& title, bool modal=false, bool use_separator=false) |
| | Dialog (const Glib::ustring& title, Gtk::Window& parent, bool modal=false, bool use_separator=false) |
| void | add_action_widget (Widget& child, int response_id) |
| Button* | add_button (const Glib::ustring& button_text, int response_id) |
| Button* | add_button (const Gtk::StockID& stock_id, int response_id) |
| void | set_response_sensitive (int response_id, bool setting=true) |
| void | set_default_response (int response_id) |
| void | set_has_separator (bool setting=true) |
| bool | get_has_separator () const |
| void | response (int response_id) |
| int | run () |
| VBox* | get_vbox () |
| const VBox* | get_vbox () const |
| HButtonBox* | get_action_area () |
| const HButtonBox* | get_action_area () const |
| Glib::PropertyProxy<bool> | property_has_separator () |
| | You rarely need to use properties because there are get_ and set_ methods for almost all of them.
|
Glib::SignalProxy1< void,
int > | signal_response () |
Protected Member Functions |
| virtual void | on_response (int response_id) |
| void | construct_ (bool modal, bool use_separator) |
Related Functions |
(Note that these are not member functions.)
|
| Gtk::Dialog* | wrap (GtkDialog* object, bool take_copy=false) |
Detailed Description
Create popup windows.
Dialog boxes are a convenient way to prompt the user for a small amount of input, eg. to display a message, ask a question, or anything else that does not require extensive effort on the user's part.
gtkmm treats a dialog as a window split vertically. The top section is a Gtk::VBox, and is where widgets such as a Gtk::Label or a Gtk::Entry should be packed. The bottom area is known as the action_area. This is generally used for packing buttons into the dialog which may perform functions such as cancel, ok, or apply. The two areas are separated by a Gtk::HSeparator.
The dialog can be 'modal' (that is, one which freezes the rest of the application from user input) - this can be specified in the Gtk::Dialog constructor.
When adding buttons using add_button(), clicking the button will emit signal_response() with a "response id" you specified. You are encouraged to use the Gtk::ResponseType enum. If a dialog receives a delete event, the "response" signal will be emitted with a response id of Gtk::RESPONSE_NONE.
If you want to block waiting for a dialog to return before returning control flow to your code, you can call run(). This function enters a recursive main loop and waits for the user to respond to the dialog, returning the response ID corresponding to the button the user clicked.
Constructor & Destructor Documentation
| virtual Gtk::Dialog::~Dialog |
( |
|
) |
[virtual] |
|
| Gtk::Dialog::Dialog |
( |
const Glib::ustring& |
title, |
|
|
bool |
modal = false, |
|
|
bool |
use_separator = false |
|
) |
[explicit] |
|
Member Function Documentation
| void Gtk::Dialog::add_action_widget |
( |
Widget& |
child, |
|
|
int |
response_id |
|
) |
|
|
| void Gtk::Dialog::construct_ |
( |
bool |
modal, |
|
|
bool |
use_separator |
|
) |
[protected] |
|
| const HButtonBox* Gtk::Dialog::get_action_area |
( |
|
) |
const |
|
| bool Gtk::Dialog::get_has_separator |
( |
|
) |
const |
|
| const VBox* Gtk::Dialog::get_vbox |
( |
|
) |
const |
|
| VBox* Gtk::Dialog::get_vbox |
( |
|
) |
|
|
| const GtkDialog* Gtk::Dialog::gobj |
( |
|
) |
const [inline] |
|
| GtkDialog* Gtk::Dialog::gobj |
( |
|
) |
[inline] |
|
| virtual void Gtk::Dialog::on_response |
( |
int |
response_id |
) |
[protected, virtual] |
|
|
|
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
- Returns:
- A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.
|
| void Gtk::Dialog::response |
( |
int |
response_id |
) |
|
|
| void Gtk::Dialog::set_default_response |
( |
int |
response_id |
) |
|
|
| void Gtk::Dialog::set_has_separator |
( |
bool |
setting = true |
) |
|
|
| void Gtk::Dialog::set_response_sensitive |
( |
int |
response_id, |
|
|
bool |
setting = true |
|
) |
|
|
|
|
- Prototype:
void response(int response_id)
|
Friends And Related Function Documentation
| Gtk::Dialog* wrap |
( |
GtkDialog* |
object, |
|
|
bool |
take_copy = false |
|
) |
[related] |
|
The documentation for this class was generated from the following file:
Generated for gtkmm 2.2 by
Doxygen 1.3.4 © 1997-2001