Code

Handle the case of gnome_vfs_init failing. (Fixes Debian bug http://bugs.debian...
[inkscape.git] / src / ui / dialog / dialog.h
1 /**
2  * \brief Base class for dialogs in Inkscape.  This class provides certain
3  *        common behaviors and styles wanted of all dialogs in the application.
4  *
5  * Author:
6  *   Bryce W. Harrington <bryce@bryceharrington.org>
7  *
8  * Copyright (C) 2004, 2005 Authors
9  *
10  * Released under GNU GPL.  Read the file 'COPYING' for more information.
11  */
13 #ifndef INKSCAPE_DIALOG_H
14 #define INKSCAPE_DIALOG_H
16 #include <gtkmm/dialog.h>
17 #include <gtkmm/tooltips.h>
19 namespace Inkscape { class Selection; }
20 class SPDesktop;
22 namespace Inkscape {
23 namespace UI {
24 namespace Dialog {
26 class Dialog : public Gtk::Dialog {
27 public:
28     Dialog(BaseObjectType *gobj); // fixme: remove this
30     Dialog(const char *prefs_path, int verb_num = 0, const char *apply_label = NULL);
32     virtual ~Dialog();
34     virtual void onDesktopActivated (SPDesktop*);
35     virtual void onShutdown();
37     virtual void present();
39     /** Hide and show dialogs */
40     virtual void   onHideF12();
41     virtual void   onShowF12();
43     bool           _hiddenF12;
44     bool           _user_hidden; // when it is closed by the user, to prevent repopping on f12
46     void           read_geometry();
47     void           save_geometry();
49     const char           *_prefs_path;
51     bool retransientize_suppress; // when true, do not retransientize (prevents races when switching new windows too fast)
53 protected:
55     /**
56      * Tooltips object for all descendants to use
57      */
58     Gtk::Tooltips tooltips;
60     virtual void   on_response(int response_id);
61     virtual bool   on_delete_event (GdkEventAny*);
62     virtual void   _apply();
63     virtual void   _close();
65     static bool windowKeyPress( GtkWidget *widget, GdkEventKey *event );
67     Inkscape::Selection*   _getSelection();
69     sigc::connection _desktop_activated_connection;
70     sigc::connection _dialogs_hidden_connection;
71     sigc::connection _dialogs_unhidden_connection;
72     sigc::connection _shutdown_connection;
74 private:
75     Dialog(); // no constructor without params
77     Dialog(Dialog const &d);            // no copy
78     Dialog& operator=(Dialog const &d); // no assign
79 };
81 } // namespace Dialog
82 } // namespace UI
83 } // namespace Inkscape
85 #endif //INKSCAPE_DIALOG_H
87 /*
88   Local Variables:
89   mode:c++
90   c-file-style:"stroustrup"
91   c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
92   indent-tabs-mode:nil
93   fill-column:99
94   End:
95 */
96 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :