diff options
| author | MenTaLguY <mental@rydia.net> | 2006-01-16 02:36:01 +0000 |
|---|---|---|
| committer | mental <mental@users.sourceforge.net> | 2006-01-16 02:36:01 +0000 |
| commit | 179fa413b047bede6e32109e2ce82437c5fb8d34 (patch) | |
| tree | a5a6ac2c1708bd02288fbd8edb2ff500ff2e0916 /src/ui/dialog/messages.h | |
| download | inkscape-179fa413b047bede6e32109e2ce82437c5fb8d34.tar.gz inkscape-179fa413b047bede6e32109e2ce82437c5fb8d34.zip | |
moving trunk for module inkscape
(bzr r1)
Diffstat (limited to 'src/ui/dialog/messages.h')
| -rw-r--r-- | src/ui/dialog/messages.h | 98 |
1 files changed, 98 insertions, 0 deletions
diff --git a/src/ui/dialog/messages.h b/src/ui/dialog/messages.h new file mode 100644 index 000000000..3ce7b5a87 --- /dev/null +++ b/src/ui/dialog/messages.h @@ -0,0 +1,98 @@ +/* + * \brief Messages Dialog + * + * A very simple dialog for displaying Inkscape messages. Messages + * sent to g_log(), g_warning(), g_message(), ets, are routed here, + * in order to avoid messing with the startup console. + * + * Authors: + * Bob Jamison + * Other dudes from The Inkscape Organization + * + * Copyright (C) 2004, 2005 Authors + * + * Released under GNU GPL, read the file 'COPYING' for more information + */ + +#ifndef INKSCAPE_UI_DIALOG_MESSAGES_H +#define INKSCAPE_UI_DIALOG_MESSAGES_H + +#include <gtkmm/box.h> +#include <gtkmm/dialog.h> +#include <gtkmm/textview.h> +#include <gtkmm/button.h> +#include <gtkmm/menubar.h> +#include <gtkmm/menu.h> +#include <gtkmm/scrolledwindow.h> + +#include <glibmm/i18n.h> + +#include "dialog.h" + +namespace Inkscape { +namespace UI { +namespace Dialog { + +class Messages : public Dialog { +public: + Messages(); + virtual ~Messages(); + + static Messages *create() { return new Messages(); } + + /** + * Clear all information from the dialog + */ + void clear(); + + /** + * Display a message + */ + void message(char *msg); + + /** + * Redirect g_log() messages to this widget + */ + void captureLogMessages(); + + /** + * Return g_log() messages to normal handling + */ + void releaseLogMessages(); + +protected: + Gtk::MenuBar menuBar; + Gtk::Menu fileMenu; + Gtk::ScrolledWindow textScroll; + Gtk::TextView messageText; + + //Handler ID's + guint handlerDefault; + guint handlerGlibmm; + guint handlerAtkmm; + guint handlerPangomm; + guint handlerGdkmm; + guint handlerGtkmm; + +private: + Messages(Messages const &d); + Messages operator=(Messages const &d); +}; + + +} //namespace Dialog +} //namespace UI +} //namespace Inkscape + +#endif // INKSCAPE_UI_DIALOG_MESSAGES_H + +/* + Local Variables: + mode:c++ + c-file-style:"stroustrup" + c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +)) + indent-tabs-mode:nil + fill-column:99 + End: +*/ +// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 : |
