Class Index Cross Index Namespace Index

Class Gnome::Dialog

Create popup windows.
Contained in: Gnome
Derived from: Gtk::Window
Derived by: Gnome::About Gnome::MessageBox Gnome::PropertyBox

#include <gtk--/dialog.h>


public function member index:

Dialog();
Dialog(const Gtk::string& title, const Gtk::SArray& buttons);
void append_button(const Gtk::string& name);
void append_button(const Gtk::string& name, const Gtk::string& pixmap);
void cause_close();
void close_hides(gboolean just_hide=true);
void connect(gint number, const Callback& s);
void editable_enters(Gtk::Editable& e);
Gtk::Button* get_button(gint number) const;
static GtkType get_type();
Gtk::VBox* get_vbox() const;
GnomeDialog* gtkobj();
const GnomeDialog* gtkobj() const;
static bool isA(Gtk::Object* checkcast);
gint run();
gint run_and_close();
void set_accelerator(gint button, const guchar accelerator_key, guint8 accelerator_mods);
void set_close(gboolean click_closes);
void set_default(gint button);
void set_parent(Gtk::Window& parent);
void set_sensitive(gint button, gboolean setting);
virtual ~Dialog();
 

protected function member index:

explicit Dialog(GnomeDialog* castitem);
virtual void clicked_impl(gint p0);
virtual gboolean close_impl();
void initialize_class();
 

private function member index:

Dialog(const Dialog&);
Dialog& operator =(const Dialog&);
 

Description:

Unlike GnomeDialog in C, Gnome::Dialog does not self-destruct when run() or run_and_close() returns, so you can use it again. Just delete it later, like any other Window.


Function Member Descriptions:

Gnome::Dialog::append_button - Use a stock button name to get stock features, or just use your own text.

void append_button(const Gtk::string& name);
e.g. GNOME_STOCK_BUTTON_OK: See gnome-stock.h


Gnome::Dialog::cause_close - Close the dialog, either by hiding or destroying

void cause_close();

Gnome::Dialog::close_hides - Whether the dialog does delete_self() or just hide() on close.

void close_hides(gboolean just_hide=true);
For Gnome-- this is set in the constructor. It is very unlikely that you would want to set this to false, because it could free the memory used by member variables, or leave your pointers pointing to freed memory.


Gnome::Dialog::connect - connects a callback to a button.

void connect(gint number, const Callback& s);
This is short for dialog.get_button(number)->clicked.connect(s)


Gnome::Dialog::editable_enters - Whether pushing return in this editable should activate the default button.

void editable_enters(Gtk::Editable& e);

Gnome::Dialog::get_button - returns the button indexed by number.

Gtk::Button* get_button(gint number) const;

Gnome::Dialog::run - Make the dialog modal until a button is clicked.

gint run();
returns button number or -1 for none.


Gnome::Dialog::set_accelerator - Accelerator for a button

void set_accelerator(gint button, const guchar accelerator_key, guint8 accelerator_mods);

Gnome::Dialog::set_close - Whether any button click should trigger a close.

void set_close(gboolean click_closes);

Gnome::Dialog::set_default - Set the default button

void set_default(gint button);

Gnome::Dialog::set_sensitive - Set button sensitivity

void set_sensitive(gint button, gboolean setting);


Variable Member Descriptions: