Code

Merge from trunk
[inkscape.git] / src / dialogs / debugdialog.h
1 #ifndef __DEBUGDIALOG_H__
2 #define __DEBUGDIALOG_H__
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 The Inkscape Organization
13  *
14  * Released under GNU GPL, read the file 'COPYING' for more information
15  */
19 namespace Inkscape {
20 namespace UI {
21 namespace Dialogs {
24 /**
25  * A dialog that displays log messages
26  */
27 class DebugDialog
28 {
30     public:
31     
33     /**
34      * Constructor
35      */
36     DebugDialog() {};
39     /**
40      * Factory method
41      */
42     static DebugDialog *create();
44     /**
45      * Destructor
46      */
47     virtual ~DebugDialog() {};
50     /**
51      * Show the dialog
52      */
53     virtual void show() = 0;
55     /**
56      * Do not show the dialog
57      */
58     virtual void hide() = 0;
60     /**
61      * Clear all information from the dialog
62      */
63     virtual void clear() = 0;
65     /**
66      * Display a message
67      */
68     virtual void message(char const *msg) = 0;
70     /**
71      * Redirect g_log() messages to this widget
72      */
73     virtual void captureLogMessages() = 0;
75     /**
76      * Return g_log() messages to normal handling
77      */
78     virtual void releaseLogMessages() = 0;
80     /**
81      * Get a shared singleton instance
82      */
83     static DebugDialog *getInstance();
85     /**
86      * Show the instance above
87      */
88     static void showInstance();
91     
93 };
96 } //namespace Dialogs
97 } //namespace UI
98 } //namespace Inkscape
103 #endif /* __DEBUGDIALOG_H__ */