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/textview.h>
22 #include <gtkmm/button.h>
23 #include <gtkmm/menubar.h>
24 #include <gtkmm/menu.h>
25 #include <gtkmm/scrolledwindow.h>
27 #include <glibmm/i18n.h>
29 #include "ui/widget/panel.h"
31 namespace Inkscape {
32 namespace UI {
33 namespace Dialog {
35 class Messages : public UI::Widget::Panel {
36 public:
37 Messages();
38 virtual ~Messages();
40 static Messages &getInstance() { return *new Messages(); }
42 /**
43 * Clear all information from the dialog
44 */
45 void clear();
47 /**
48 * Display a message
49 */
50 void message(char *msg);
52 /**
53 * Redirect g_log() messages to this widget
54 */
55 void captureLogMessages();
57 /**
58 * Return g_log() messages to normal handling
59 */
60 void releaseLogMessages();
62 protected:
63 Gtk::MenuBar menuBar;
64 Gtk::Menu fileMenu;
65 Gtk::ScrolledWindow textScroll;
66 Gtk::TextView messageText;
68 //Handler ID's
69 guint handlerDefault;
70 guint handlerGlibmm;
71 guint handlerAtkmm;
72 guint handlerPangomm;
73 guint handlerGdkmm;
74 guint handlerGtkmm;
76 private:
77 Messages(Messages const &d);
78 Messages operator=(Messages const &d);
79 };
82 } //namespace Dialog
83 } //namespace UI
84 } //namespace Inkscape
86 #endif // INKSCAPE_UI_DIALOG_MESSAGES_H
88 /*
89 Local Variables:
90 mode:c++
91 c-file-style:"stroustrup"
92 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
93 indent-tabs-mode:nil
94 fill-column:99
95 End:
96 */
97 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :