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 File Reference

Message window functions (status, compiler, messages windows). More...

#include "document.h"
#include "gtkcompat.h"
Include dependency graph for msgwindow.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Enumerations

enum  MsgColors { COLOR_RED , COLOR_DARK_RED , COLOR_BLACK , COLOR_BLUE }
 Various colors for use in the compiler and messages treeviews when adding messages. More...
 
enum  MessageWindowTabNum {
  MSG_STATUS = 0 , MSG_COMPILER , MSG_MESSAGE , MSG_SCRATCH ,
  MSG_VTE
}
 Indices of the notebooks in the messages window. More...
 

Functions

void msgwin_status_add (const gchar *format,...)
 Logs a formatted status message without setting the status bar. More...
 
void msgwin_status_add_string (const gchar *msg)
 Logs a new status message without setting the status bar. More...
 
void msgwin_compiler_add (gint msg_color, const gchar *format,...)
 Adds a formatted message in the compiler tab treeview in the messages window. More...
 
void msgwin_compiler_add_string (gint msg_color, const gchar *msg)
 Adds a new message in the compiler tab treeview in the messages window. More...
 
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. More...
 
void msgwin_msg_add_string (gint msg_color, gint line, GeanyDocument *doc, const char *msg)
 
void msgwin_clear_tab (gint tabnum)
 Removes all messages from a tab specified by tabnum in the messages window. More...
 
void msgwin_switch_tab (gint tabnum, gboolean show)
 Switches to the given notebook tab of the messages window. More...
 
void msgwin_set_messages_dir (const gchar *messages_dir)
 Sets the Messages path for opening any parsed filenames without absolute path from message lines. More...
 

Detailed Description

Message window functions (status, compiler, messages windows).

Also compiler error message parsing and grep file and line parsing.

See also
GeanyMainWidgets::message_window_notebook to append a new notebook page.

Definition in file msgwindow.h.

Enumeration Type Documentation

◆ MessageWindowTabNum

Indices of the notebooks in the messages window.

Enumerator
MSG_STATUS 

Index of the status message tab.

MSG_COMPILER 

Index of the compiler tab.

MSG_MESSAGE 

Index of the messages tab.

MSG_SCRATCH 

Index of the scratch tab.

MSG_VTE 

Index of the VTE tab.

Definition at line 43 of file msgwindow.h.

◆ MsgColors

enum MsgColors

Various colors for use in the compiler and messages treeviews when adding messages.

Enumerator
COLOR_RED 

Color red.

COLOR_DARK_RED 

Color dark red.

COLOR_BLACK 

Color black.

COLOR_BLUE 

Color blue.

Definition at line 34 of file msgwindow.h.

Function Documentation

◆ msgwin_clear_tab()

void msgwin_clear_tab ( gint  tabnum)

Removes all messages from a tab specified by tabnum in the messages window.

Parameters
tabnumAn index of a tab in the messages window which should be cleared. Valid values are MSG_STATUS, MSG_COMPILER and MSG_MESSAGE.
Since
0.15

Definition at line 1328 of file msgwindow.c.

References build_menu_update(), MSG_COMPILER, MSG_MESSAGE, MSG_STATUS, msgwindow, and NULL.

Referenced by on_message_treeview_clear_activate().

◆ msgwin_compiler_add()

void msgwin_compiler_add ( gint  msg_color,
const gchar *  format,
  ... 
)

Adds a formatted message in the compiler tab treeview in the messages window.

Parameters
msg_colorA color to be used for the text. It must be an element of MsgColors.
formatprintf()-style format string.
...Arguments for the format string.
See also
msgwin_compiler_add_string()
Since
0.16

Definition at line 320 of file msgwindow.c.

References format, and msgwin_compiler_add_string().

Referenced by build_spawn_cmd().

◆ msgwin_compiler_add_string()

void msgwin_compiler_add_string ( gint  msg_color,
const gchar *  msg 
)

Adds a new message in the compiler tab treeview in the messages window.

Parameters
msg_colorA color to be used for the text. It must be an element of MsgColors.
msgCompiler message to be added.
See also
msgwin_compiler_add()
Since
1.34 (API 236)

Definition at line 343 of file msgwindow.c.

References color, COMPILER_COL_COLOR, COMPILER_COL_STRING, GeanyInterfacePrefs::compiler_tab_autoscroll, get_color(), interface_prefs, msgwindow, NULL, ui_prefs, and utils_get_utf8_from_locale().

Referenced by msgwin_compiler_add(), process_build_output_line(), and show_build_result_message().

◆ msgwin_msg_add()

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.

If line and doc are set, clicking on this line jumps into the file which is specified by doc into the line specified with line.

Parameters
msg_colorA color to be used for the text. It must be an element of MsgColors.
lineThe document's line where the message belongs to. Set to -1 to ignore.
doc The document. Set to NULL to ignore.
formatprintf()-style format string.
...Arguments for the format string.
See also
msgwin_msg_add_string()
Since
0.16

Definition at line 403 of file msgwindow.c.

References format, line, and msgwin_msg_add_string().

Referenced by find_document_usage(), search_find_usage(), and search_finished().

◆ msgwin_msg_add_string()

void msgwin_msg_add_string ( gint  msg_color,
gint  line,
GeanyDocument doc,
const char *  msg 
)

◆ msgwin_set_messages_dir()

void msgwin_set_messages_dir ( const gchar *  messages_dir)

Sets the Messages path for opening any parsed filenames without absolute path from message lines.

Parameters
messages_dirThe directory.

Definition at line 114 of file msgwindow.c.

References msgwindow.

Referenced by search_find_in_files().

◆ msgwin_status_add()

void msgwin_status_add ( const gchar *  format,
  ... 
)

Logs a formatted status message without setting the status bar.

Use ui_set_statusbar() to display text on the statusbar.

Parameters
formatprintf()-style format string.
...Arguments for the format string.
See also
msgwin_status_add_string()
Since
0.12

Definition at line 520 of file msgwindow.c.

References format, and msgwin_status_add_string().

Referenced by document_new_file(), document_open_file_full(), document_save_file(), plugin_check_version(), print_external(), remove_page(), status_changed(), and ui_set_statusbar().

◆ msgwin_status_add_string()

void msgwin_status_add_string ( const gchar *  string)

Logs a new status message without setting the status bar.

Use ui_set_statusbar() to display text on the statusbar.

Parameters
stringStatus message to be logged.
See also
msgwin_status_add()
Since
1.34 (API 236)

Definition at line 481 of file msgwindow.c.

References main_status, MSG_STATUS, msgwindow, NULL, prefs, GeanyPrefs::switch_to_status, and utils_get_current_time_string().

Referenced by msgwin_status_add().

◆ msgwin_switch_tab()

void msgwin_switch_tab ( gint  tabnum,
gboolean  show 
)

Switches to the given notebook tab of the messages window.

The messages window is shown if it was previously hidden and show is set to TRUE.

Parameters
tabnumAn index of a tab in the messages window. Valid values are all elements of MessageWindowTabNum.
showWhether to show the messages window at all if it was hidden before.
Since
0.15

Definition at line 1293 of file msgwindow.c.

References MSG_COMPILER, MSG_MESSAGE, MSG_SCRATCH, MSG_STATUS, MSG_VTE, msgwin_show_hide(), msgwindow, and NULL.

Referenced by cb_func_switch_action().