## IAnjutaMessageView IAnjutaMessageView — A view where messages of different kind can be shown |

## Stability Level

Unstable, unless otherwise indicated

## Synopsis

    #include <libanjuta/interfaces/ianjuta-message-view.h>

    #define             IANJUTA_TYPE_MESSAGE_VIEW_TYPE
    #define             IANJUTA_MESSAGE_VIEW_ERROR
                        IAnjutaMessageView;
                        IAnjutaMessageViewIface;
    enum                IAnjutaMessageViewType;
    GQuark              ianjuta_message_view_error_quark    (void);
    GType               ianjuta_message_view_get_type       (void);
    void                ianjuta_message_view_append         (IAnjutaMessageView *obj,
                                                             IAnjutaMessageViewType type,
                                                             const gchar *summary,
                                                             const gchar *details,
                                                             GError **err);
    void                ianjuta_message_view_buffer_append  (IAnjutaMessageView *obj,
                                                             const gchar *text,
                                                             GError **err);
    void                ianjuta_message_view_clear          (IAnjutaMessageView *obj,
                                                             GError **err);
    GList*              ianjuta_message_view_get_all_messages
                                                            (IAnjutaMessageView *obj,
                                                             GError **err);
    const gchar*        ianjuta_message_view_get_current_message
                                                            (IAnjutaMessageView *obj,
                                                             GError **err);
    void                ianjuta_message_view_select_next    (IAnjutaMessageView *obj,
                                                             GError **err);
    void                ianjuta_message_view_select_previous
                                                            (IAnjutaMessageView *obj,
                                                             GError **err);

## Object Hierarchy

      GInterface
       +----IAnjutaMessageView

## Prerequisites

IAnjutaMessageView requires GObject.

## Signals

      "buffer-flushed"                                 : Run Last
      "message-clicked"                                : Run Last

## Description

## Details

### IANJUTA_TYPE_MESSAGE_VIEW_TYPE

    #define IANJUTA_TYPE_MESSAGE_VIEW_TYPE (ianjuta_message_view_type_get_type())

### IANJUTA_MESSAGE_VIEW_ERROR

    #define IANJUTA_MESSAGE_VIEW_ERROR ianjuta_message_view_error_quark()

### IAnjutaMessageView

    typedef struct _IAnjutaMessageView IAnjutaMessageView;

### IAnjutaMessageViewIface

    typedef struct {
    	GTypeInterface g_iface;

    	/* Signal */
    	void (*buffer_flushed) (IAnjutaMessageView *obj, const gchar *line);
    	/* Signal */
    	void (*message_clicked) (IAnjutaMessageView *obj, const gchar *message);

    	void (*append) (IAnjutaMessageView *obj, IAnjutaMessageViewType type,  const gchar *summary,  const gchar *details, GError **err);
    	void (*buffer_append) (IAnjutaMessageView *obj, const gchar *text, GError **err);
    	void (*clear) (IAnjutaMessageView *obj, GError **err);
    	GList* (*get_all_messages) (IAnjutaMessageView *obj, GError **err);
    	const gchar* (*get_current_message) (IAnjutaMessageView *obj, GError **err);
    	void (*select_next) (IAnjutaMessageView *obj, GError **err);
    	void (*select_previous) (IAnjutaMessageView *obj, GError **err);
    } IAnjutaMessageViewIface;

### enum IAnjutaMessageViewType

    typedef enum {
    	IANJUTA_MESSAGE_VIEW_TYPE_NORMAL,
    	IANJUTA_MESSAGE_VIEW_TYPE_INFO,
    	IANJUTA_MESSAGE_VIEW_TYPE_WARNING,
    	IANJUTA_MESSAGE_VIEW_TYPE_ERROR
    } IAnjutaMessageViewType;

Speficy the type ot the message added to the message view

`IANJUTA_MESSAGE_VIEW_TYPE_NORMAL` | Normal message
`IANJUTA_MESSAGE_VIEW_TYPE_INFO` | Info message (highlighed)
`IANJUTA_MESSAGE_VIEW_TYPE_WARNING` | Warning message
`IANJUTA_MESSAGE_VIEW_TYPE_ERROR` | Error message

### ianjuta_message_view_error_quark ()

    GQuark              ianjuta_message_view_error_quark    (void);

Returns : |

### ianjuta_message_view_get_type ()

    GType               ianjuta_message_view_get_type       (void);

Returns : |

### ianjuta_message_view_append ()

    void                ianjuta_message_view_append         (IAnjutaMessageView *obj,
                                                             IAnjutaMessageViewType type,
                                                             const gchar *summary,
                                                             const gchar *details,
                                                             GError **err);

Append the message with summary displayed and details displayed as tooltip

`obj` : | Self
`type` : | type of the message
`summary` : | summary of the message
`details` : | details of the message
`err` : | Error propagation and reporting.

### ianjuta_message_view_buffer_append ()

    void                ianjuta_message_view_buffer_append  (IAnjutaMessageView *obj,
                                                             const gchar *text,
                                                             GError **err);

Appends the text in buffer. Flushes the buffer where a newline is found. by emiiting buffer_flushed signal. The string is expected to be utf8.

`obj` : | Self
`text` : | text to show as message
`err` : | Error propagation and reporting.

### ianjuta_message_view_clear ()

    void                ianjuta_message_view_clear          (IAnjutaMessageView *obj,
                                                             GError **err);

Clear all messages in buffer

`obj` : | Self
`err` : | Error propagation and reporting.

### ianjuta_message_view_get_all_messages ()

    GList*              ianjuta_message_view_get_all_messages
                                                            (IAnjutaMessageView *obj,
                                                             GError **err);

Get a list of all messages. The list has to be freed

`obj` : | Self
`err` : | Error propagation and reporting.
Returns : |

### ianjuta_message_view_get_current_message ()

    const gchar*        ianjuta_message_view_get_current_message
                                                            (IAnjutaMessageView *obj,
                                                             GError **err);

Get the currently selected message

`obj` : | Self
`err` : | Error propagation and reporting.
Returns : |

### ianjuta_message_view_select_next ()

    void                ianjuta_message_view_select_next    (IAnjutaMessageView *obj,
                                                             GError **err);

Select next message (of type INFO, WARNING or ERROR)

`obj` : | Self
`err` : | Error propagation and reporting.

### ianjuta_message_view_select_previous ()

    void                ianjuta_message_view_select_previous
                                                            (IAnjutaMessageView *obj,
                                                             GError **err);

Select previous message

`obj` : | Self
`err` : | Error propagation and reporting.

## Signal Details

### The `"buffer-flushed"` signal

    void                user_function                      (IAnjutaMessageView *obj,
                                                            gchar              *line,
                                                            gpointer            user_data)      : Run Last

Emitted when ianjuta_message_view_buffer_append found a newline

`obj` : | Self
`line` : | the current line
`user_data` : | user data set when the signal handler was connected.

### The `"message-clicked"` signal

    void                user_function                      (IAnjutaMessageView *obj,
                                                            gchar              *message,
                                                            gpointer            user_data)      : Run Last

Emitted when the user clicks on a message

`obj` : | Self
`message` : | text of the clicked message
`user_data` : | user data set when the signal handler was connected.