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();
39 virtual ~Messages();
41 static Messages *create() { return new Messages(); }
43 /**
44 * Clear all information from the dialog
45 */
46 void clear();
48 /**
49 * Display a message
50 */
51 void message(char *msg);
53 /**
54 * Redirect g_log() messages to this widget
55 */
56 void captureLogMessages();
58 /**
59 * Return g_log() messages to normal handling
60 */
61 void releaseLogMessages();
63 protected:
64 Gtk::MenuBar menuBar;
65 Gtk::Menu fileMenu;
66 Gtk::ScrolledWindow textScroll;
67 Gtk::TextView messageText;
69 //Handler ID's
70 guint handlerDefault;
71 guint handlerGlibmm;
72 guint handlerAtkmm;
73 guint handlerPangomm;
74 guint handlerGdkmm;
75 guint handlerGtkmm;
77 private:
78 Messages(Messages const &d);
79 Messages operator=(Messages const &d);
80 };
83 } //namespace Dialog
84 } //namespace UI
85 } //namespace Inkscape
87 #endif // INKSCAPE_UI_DIALOG_MESSAGES_H
89 /*
90 Local Variables:
91 mode:c++
92 c-file-style:"stroustrup"
93 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
94 indent-tabs-mode:nil
95 fill-column:99
96 End:
97 */
98 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :