summaryrefslogtreecommitdiffstats
path: root/src/dialogs/debugdialog.h
blob: 1a4a036fdbf27fb44c0dcfa4f880b1bfcbbd65e1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
#ifndef __DEBUGDIALOG_H__
#define __DEBUGDIALOG_H__
/*
 * 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 The Inkscape Organization
 *
 * Released under GNU GPL, read the file 'COPYING' for more information
 */



namespace Inkscape {
namespace UI {
namespace Dialogs {


/**
 * A dialog that displays log messages
 */
class DebugDialog
{

    public:
    

    /**
     * Constructor
     */
    DebugDialog() {};


    /**
     * Factory method
     */
    static DebugDialog *create();

    /**
     * Destructor
     */
    virtual ~DebugDialog() {};


    /**
     * Show the dialog
     */
    virtual void show() = 0;

    /**
     * Do not show the dialog
     */
    virtual void hide() = 0;

    /**
     * Clear all information from the dialog
     */
    virtual void clear() = 0;

    /**
     * Display a message
     */
    virtual void message(char const *msg) = 0;

    /**
     * Redirect g_log() messages to this widget
     */
    virtual void captureLogMessages() = 0;

    /**
     * Return g_log() messages to normal handling
     */
    virtual void releaseLogMessages() = 0;

    /**
     * Get a shared singleton instance
     */
    static DebugDialog *getInstance();

    /**
     * Show the instance above
     */
    static void showInstance();


    

};


} //namespace Dialogs
} //namespace UI
} //namespace Inkscape




#endif /* __DEBUGDIALOG_H__ */