geany  1.38
About: Geany is a text editor (using GTK2) with basic features of an integrated development environment (syntax highlighting, code folding, symbol name auto-completion, ...). F: office T: editor programming GTK+ IDE
  Fossies Dox: geany-1.38.tar.bz2  ("unofficial" and yet experimental doxygen-generated source code documentation)  

msgwindow.h
Go to the documentation of this file.
1/*
2 * msgwindow.h - this file is part of Geany, a fast and lightweight IDE
3 *
4 * Copyright 2005 The Geany contributors
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 */
20
21#ifndef GEANY_MSGWINDOW_H
22#define GEANY_MSGWINDOW_H 1
23
24#include "document.h"
25
26#include "gtkcompat.h"
27
28
29G_BEGIN_DECLS
30
31/**
32 * Various colors for use in the compiler and messages treeviews when adding messages.
33 **/
35{
36 COLOR_RED, /**< Color red */
37 COLOR_DARK_RED, /**< Color dark red */
38 COLOR_BLACK, /**< Color black */
39 COLOR_BLUE /**< Color blue */
40};
41
42/** Indices of the notebooks in the messages window. */
43typedef enum
44{
45 /* force it to start at 0 to keep in sync with the notebook page numbers */
46 MSG_STATUS = 0, /**< Index of the status message tab */
47 MSG_COMPILER, /**< Index of the compiler tab */
48 MSG_MESSAGE, /**< Index of the messages tab */
49 MSG_SCRATCH, /**< Index of the scratch tab */
50 MSG_VTE /**< Index of the VTE tab */
52
53
54void msgwin_status_add(const gchar *format, ...) G_GNUC_PRINTF (1, 2);
55void msgwin_status_add_string(const gchar *msg);
56
57void msgwin_compiler_add(gint msg_color, const gchar *format, ...) G_GNUC_PRINTF (2, 3);
58void msgwin_compiler_add_string(gint msg_color, const gchar *msg);
59
60void msgwin_msg_add(gint msg_color, gint line, GeanyDocument *doc, const gchar *format, ...)
61 G_GNUC_PRINTF (4, 5);
62void msgwin_msg_add_string(gint msg_color, gint line, GeanyDocument *doc, const char *msg);
63
64void msgwin_clear_tab(gint tabnum);
65
66void msgwin_switch_tab(gint tabnum, gboolean show);
67
68void msgwin_set_messages_dir(const gchar *messages_dir);
69
70
71#ifdef GEANY_PRIVATE
72
73typedef struct
74{
75 GtkListStore *store_status;
76 GtkListStore *store_msg;
77 GtkListStore *store_compiler;
78 GtkWidget *tree_compiler;
79 GtkWidget *tree_status;
80 GtkWidget *tree_msg;
81 GtkWidget *scribble;
82 GtkWidget *popup_status_menu;
83 GtkWidget *popup_msg_menu;
84 GtkWidget *popup_compiler_menu;
85 GtkWidget *notebook;
86 gchar *messages_dir;
87} MessageWindow;
88
89extern MessageWindow msgwindow;
90
91
92void msgwin_init(void);
93
94void msgwin_finalize(void);
95
96void msgwin_show_hide(gboolean show);
97
98void msgwin_show_hide_tabs(void);
99
100
101void msgwin_menu_add_common_items(GtkMenu *menu);
102
103gboolean msgwin_goto_compiler_file_line(gboolean focus_editor);
104
105void msgwin_parse_compiler_error_line(const gchar *string, const gchar *dir,
106 gchar **filename, gint *line);
107
108gboolean msgwin_goto_messages_file_line(gboolean focus_editor);
109
110#endif /* GEANY_PRIVATE */
111
112G_END_DECLS
113
114#endif /* GEANY_MSGWINDOW_H */
Document related actions: new, save, open, etc.
vString * line
Definition: geany_cobol.c:133
CobolFormat format
Definition: geany_cobol.c:137
gboolean msgwin_goto_messages_file_line(gboolean focus_editor)
Definition: msgwindow.c:1170
void msgwin_parse_compiler_error_line(const gchar *string, const gchar *dir, gchar **filename, gint *line)
Definition: msgwindow.c:1090
void msgwin_show_hide_tabs(void)
Definition: msgwindow.c:99
void msgwin_show_hide(gboolean show)
Definition: msgwindow.c:372
void msgwin_finalize(void)
Definition: msgwindow.c:167
MessageWindow msgwindow
Definition: msgwindow.c:66
void msgwin_init(void)
Definition: msgwindow.c:142
gboolean msgwin_goto_compiler_file_line(gboolean focus_editor)
Definition: msgwindow.c:796
void msgwin_menu_add_common_items(GtkMenu *menu)
Definition: msgwindow.c:689
void msgwin_switch_tab(gint tabnum, gboolean show)
Switches to the given notebook tab of the messages window.
Definition: msgwindow.c:1293
void msgwin_clear_tab(gint tabnum)
Removes all messages from a tab specified by tabnum in the messages window.
Definition: msgwindow.c:1328
void msgwin_set_messages_dir(const gchar *messages_dir)
Sets the Messages path for opening any parsed filenames without absolute path from message lines.
Definition: msgwindow.c:114
void msgwin_msg_add_string(gint msg_color, gint line, GeanyDocument *doc, const char *msg)
void msgwin_compiler_add_string(gint msg_color, const gchar *msg)
Adds a new message in the compiler tab treeview in the messages window.
Definition: msgwindow.c:343
void msgwin_msg_add(gint msg_color, gint line, GeanyDocument *doc, const gchar *format,...)
Adds a formatted message in the messages tab treeview in the messages window.
Definition: msgwindow.c:403
void msgwin_status_add(const gchar *format,...)
Logs a formatted status message without setting the status bar.
Definition: msgwindow.c:520
MessageWindowTabNum
Indices of the notebooks in the messages window.
Definition: msgwindow.h:44
@ MSG_COMPILER
Index of the compiler tab.
Definition: msgwindow.h:47
@ MSG_VTE
Index of the VTE tab.
Definition: msgwindow.h:50
@ MSG_STATUS
Index of the status message tab.
Definition: msgwindow.h:46
@ MSG_MESSAGE
Index of the messages tab.
Definition: msgwindow.h:48
@ MSG_SCRATCH
Index of the scratch tab.
Definition: msgwindow.h:49
MsgColors
Various colors for use in the compiler and messages treeviews when adding messages.
Definition: msgwindow.h:35
@ COLOR_BLUE
Color blue.
Definition: msgwindow.h:39
@ COLOR_BLACK
Color black.
Definition: msgwindow.h:38
@ COLOR_DARK_RED
Color dark red.
Definition: msgwindow.h:37
@ COLOR_RED
Color red.
Definition: msgwindow.h:36
void msgwin_status_add_string(const gchar *msg)
Logs a new status message without setting the status bar.
Definition: msgwindow.c:481
void msgwin_compiler_add(gint msg_color, const gchar *format,...)
Adds a formatted message in the compiler tab treeview in the messages window.
Definition: msgwindow.c:320
const gchar filename[]
Definition: stash-example.c:4
Structure for representing an open tab with all its properties.
Definition: document.h:81