| 1 |
/* |
| 2 |
Copyright (C) 2002 Kai Sterker <[email protected]> |
| 3 |
Part of the Adonthell Project <http://adonthell.nongnu.org> |
| 4 |
|
| 5 |
Dlgedit is free software; you can redistribute it and/or modify |
| 6 |
it under the terms of the GNU General Public License as published by |
| 7 |
the Free Software Foundation; either version 2 of the License, or |
| 8 |
(at your option) any later version. |
| 9 |
|
| 10 |
Dlgedit is distributed in the hope that it will be useful, |
| 11 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 |
GNU General Public License for more details. |
| 14 |
|
| 15 |
You should have received a copy of the GNU General Public License |
| 16 |
along with Dlgedit. If not, see <http://www.gnu.org/licenses/>. |
| 17 |
*/ |
| 18 |
|
| 19 |
/** |
| 20 |
* @file gui_error.h |
| 21 |
* |
| 22 |
* @author Kai Sterker |
| 23 |
* @brief The error console |
| 24 |
*/ |
| 25 |
|
| 26 |
#ifndef GUI_ERROR_H |
| 27 |
#define GUI_ERROR_H |
| 28 |
|
| 29 |
#include <string> |
| 30 |
#include "dlg_node.h" |
| 31 |
|
| 32 |
/** |
| 33 |
* Displays a list of compile errors. Selecting an error message from the |
| 34 |
* list automatically brings up the edit dialog of the faulty node. |
| 35 |
*/ |
| 36 |
class GuiError |
| 37 |
{ |
| 38 |
public: |
| 39 |
GuiError (); |
| 40 |
~GuiError (); |
| 41 |
|
| 42 |
/** |
| 43 |
* Global pointer to the error console, to allow easy access from anywhere. |
| 44 |
*/ |
| 45 |
static GuiError *console; |
| 46 |
|
| 47 |
/** |
| 48 |
* Add an error message to the list of errors. |
| 49 |
* @param error the text to display |
| 50 |
* @param node the node where the error occured |
| 51 |
*/ |
| 52 |
void add (std::string error, DlgNode *node); |
| 53 |
/** |
| 54 |
* Show the error console and display all errors |
| 55 |
*/ |
| 56 |
void display (); |
| 57 |
/** |
| 58 |
* Remove all entries from the error console |
| 59 |
*/ |
| 60 |
void clear (); |
| 61 |
|
| 62 |
private: |
| 63 |
GtkWidget *window; // The dialog window |
| 64 |
GtkWidget *list; // The list widget |
| 65 |
}; |
| 66 |
|
| 67 |
#endif // GUI_ERROR_H |