Code

Merge from fe-moved
[inkscape.git] / src / ui / dialog / debug.h
1 /** @file
2  * @brief Dialog for displaying Inkscape messages
3  */
4 /* Authors:
5  *   Bob Jamison
6  *   Other dudes from The Inkscape Organization
7  *
8  * Copyright (C) 2004 The Inkscape Organization
9  *
10  * Released under GNU GPL, read the file 'COPYING' for more information
11  */
13 #ifndef SEEN_UI_DIALOGS_DEBUGDIALOG_H
14 #define SEEN_UI_DIALOGS_DEBUGDIALOG_H
16 namespace Inkscape {
17 namespace UI {
18 namespace Dialog {
21 /**
22  * @brief A very simple dialog for displaying Inkscape messages.
23  *
24  * Messages sent to g_log(), g_warning(), g_message(), ets, are routed here,
25  * in order to avoid messing with the startup console.
26  */
27 class DebugDialog
28 {
29 public:
30     DebugDialog() {};
31     /**
32      * Factory method
33      */
34     static DebugDialog *create();
36     /**
37      * Destructor
38      */
39     virtual ~DebugDialog() {};
42     /**
43      * Show the dialog
44      */
45     virtual void show() = 0;
47     /**
48      * Do not show the dialog
49      */
50     virtual void hide() = 0;
52     /**
53      * @brief Clear all information from the dialog
54          *
55          * Also a public method.  Remove all text from the dialog
56      */
57     virtual void clear() = 0;
59     /**
60      * Display a message
61      */
62     virtual void message(char const *msg) = 0;
64     /**
65      * Redirect g_log() messages to this widget
66      */
67     virtual void captureLogMessages() = 0;
69     /**
70      * Return g_log() messages to normal handling
71      */
72     virtual void releaseLogMessages() = 0;
74     /**
75          * Factory method.  Use this to create a new DebugDialog
76          */
77     static DebugDialog *getInstance();
79     /**
80      * Show the instance above
81      */
82     static void showInstance();
83 };
85 } //namespace Dialogs
86 } //namespace UI
87 } //namespace Inkscape
89 #endif /* __DEBUGDIALOG_H__ */
91 /*
92   Local Variables:
93   mode:c++
94   c-file-style:"stroustrup"
95   c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
96   indent-tabs-mode:nil
97   fill-column:99
98   End:
99 */
100 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :