2 * msgwindow.h - this file is part of Geany, a fast and lightweight IDE
4 * Copyright 2005-2011 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
5 * Copyright 2006-2011 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
22 #ifndef GEANY_MSGWINDOW_H
23 #define GEANY_MSGWINDOW_H 1
28 * Various colors for use in the compiler and messages treeviews when adding messages.
32 COLOR_RED
, /**< Color red */
33 COLOR_DARK_RED
, /**< Color dark red */
34 COLOR_BLACK
, /**< Color black */
35 COLOR_BLUE
/**< Color blue */
38 /** Indices of the notebooks in the messages window. */
41 /* force it to start at 0 to keep in sync with the notebook page numbers */
42 MSG_STATUS
= 0, /**< Index of the status message tab */
43 MSG_COMPILER
, /**< Index of the compiler tab */
44 MSG_MESSAGE
, /**< Index of the messages tab */
45 MSG_SCRATCH
, /**< Index of the scratch tab */
46 MSG_VTE
/**< Index of the VTE tab */
47 } MessageWindowTabNum
;
53 GtkListStore
*store_status
;
54 GtkListStore
*store_msg
;
55 GtkListStore
*store_compiler
;
56 GtkWidget
*tree_compiler
;
57 GtkWidget
*tree_status
;
60 GtkWidget
*popup_status_menu
;
61 GtkWidget
*popup_msg_menu
;
62 GtkWidget
*popup_compiler_menu
;
67 extern MessageWindow msgwindow
;
70 void msgwin_init(void);
72 void msgwin_finalize(void);
74 void msgwin_show_hide(gboolean show
);
76 void msgwin_switch_tab(gint tabnum
, gboolean show
);
78 void msgwin_clear_tab(gint tabnum
);
80 void msgwin_msg_add(gint msg_color
, gint line
, GeanyDocument
*doc
, const gchar
*format
, ...)
83 void msgwin_msg_add_string(gint msg_color
, gint line
, GeanyDocument
*doc
, const gchar
*string
);
85 void msgwin_compiler_add(gint msg_color
, const gchar
*format
, ...) G_GNUC_PRINTF (2, 3);
87 void msgwin_compiler_add_string(gint msg_color
, const gchar
*msg
);
89 void msgwin_status_add(const gchar
*format
, ...) G_GNUC_PRINTF (1, 2);
91 void msgwin_show_hide_tabs(void);
93 void msgwin_set_messages_dir(const gchar
*messages_dir
);
96 void msgwin_menu_add_common_items(GtkMenu
*menu
);
98 gboolean
msgwin_goto_compiler_file_line(gboolean focus_editor
);
100 void msgwin_parse_compiler_error_line(const gchar
*string
, const gchar
*dir
,
101 gchar
**filename
, gint
*line
);
103 gboolean
msgwin_goto_messages_file_line(gboolean focus_editor
);