Code

85a7c4f0ffa08b03aae49c30bd98da45b5779797
[inkscape.git] / src / ui / dialog / messages.h
1 /*
2  * \brief Messages Dialog
3  *
4  * A very simple dialog for displaying Inkscape messages. Messages
5  * sent to g_log(), g_warning(), g_message(), ets, are routed here,
6  * in order to avoid messing with the startup console.
7  *
8  * Authors:
9  *   Bob Jamison
10  *   Other dudes from The Inkscape Organization
11  *
12  * Copyright (C) 2004, 2005 Authors
13  *
14  * Released under GNU GPL, read the file 'COPYING' for more information
15  */
17 #ifndef INKSCAPE_UI_DIALOG_MESSAGES_H
18 #define INKSCAPE_UI_DIALOG_MESSAGES_H
20 #include <gtkmm/box.h>
21 #include <gtkmm/dialog.h>
22 #include <gtkmm/textview.h>
23 #include <gtkmm/button.h>
24 #include <gtkmm/menubar.h>
25 #include <gtkmm/menu.h>
26 #include <gtkmm/scrolledwindow.h>
28 #include <glibmm/i18n.h>
30 #include "dialog.h"
32 namespace Inkscape {
33 namespace UI {
34 namespace Dialog {
36 class Messages : public Dialog {
37 public:
38     Messages(Behavior::BehaviorFactory behavior_factory);
39     virtual ~Messages();
41     static Messages *create(Behavior::BehaviorFactory behavior_factory) 
42     { return new Messages(behavior_factory); }
44     /**
45      * Clear all information from the dialog
46      */
47     void clear();
49     /**
50      * Display a message
51      */
52     void message(char *msg);
54     /**
55      * Redirect g_log() messages to this widget
56      */
57     void captureLogMessages();
59     /**
60      * Return g_log() messages to normal handling
61      */
62     void releaseLogMessages();
64 protected:
65     Gtk::MenuBar        menuBar;
66     Gtk::Menu           fileMenu;
67     Gtk::ScrolledWindow textScroll;
68     Gtk::TextView       messageText;
70     //Handler ID's
71     guint handlerDefault;
72     guint handlerGlibmm;
73     guint handlerAtkmm;
74     guint handlerPangomm;
75     guint handlerGdkmm;
76     guint handlerGtkmm;
78 private:
79     Messages(Messages const &d);
80     Messages operator=(Messages const &d);
81 };
84 } //namespace Dialog
85 } //namespace UI
86 } //namespace Inkscape
88 #endif // INKSCAPE_UI_DIALOG_MESSAGES_H
90 /*
91   Local Variables:
92   mode:c++
93   c-file-style:"stroustrup"
94   c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
95   indent-tabs-mode:nil
96   fill-column:99
97   End:
98 */
99 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :