1 /** @file
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 * Released under GNU GPL, read the file 'COPYING' for more information
14 */
16 #ifndef INKSCAPE_UI_DIALOG_MESSAGES_H
17 #define INKSCAPE_UI_DIALOG_MESSAGES_H
19 #include <gtkmm/box.h>
20 #include <gtkmm/textview.h>
21 #include <gtkmm/button.h>
22 #include <gtkmm/menubar.h>
23 #include <gtkmm/menu.h>
24 #include <gtkmm/scrolledwindow.h>
26 #include <glibmm/i18n.h>
28 #include "ui/widget/panel.h"
30 namespace Inkscape {
31 namespace UI {
32 namespace Dialog {
34 class Messages : public UI::Widget::Panel {
35 public:
36 Messages();
37 virtual ~Messages();
39 static Messages &getInstance() { return *new Messages(); }
41 /**
42 * Clear all information from the dialog
43 */
44 void clear();
46 /**
47 * Display a message
48 */
49 void message(char *msg);
51 /**
52 * Redirect g_log() messages to this widget
53 */
54 void captureLogMessages();
56 /**
57 * Return g_log() messages to normal handling
58 */
59 void releaseLogMessages();
61 protected:
62 Gtk::MenuBar menuBar;
63 Gtk::Menu fileMenu;
64 Gtk::ScrolledWindow textScroll;
65 Gtk::TextView messageText;
67 //Handler ID's
68 guint handlerDefault;
69 guint handlerGlibmm;
70 guint handlerAtkmm;
71 guint handlerPangomm;
72 guint handlerGdkmm;
73 guint handlerGtkmm;
75 private:
76 Messages(Messages const &d);
77 Messages operator=(Messages const &d);
78 };
81 } //namespace Dialog
82 } //namespace UI
83 } //namespace Inkscape
85 #endif // INKSCAPE_UI_DIALOG_MESSAGES_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 :