![]() |
![]() |
![]() |
Anjuta Developers Reference Manual | ![]() |
---|---|---|---|---|
#include <libanjuta/interfaces/ianjuta-document-manager.h> #define IANJUTA_TYPE_DOCUMENT_MANAGER_ERROR enum IAnjutaDocumentManagerError; #define IANJUTA_DOCUMENT_MANAGER_ERROR IAnjutaDocumentManager; IAnjutaDocumentManagerIface; GQuark ianjuta_document_manager_error_quark (void); GType ianjuta_document_manager_get_type (void); IAnjutaEditor* ianjuta_document_manager_add_buffer (IAnjutaDocumentManager *obj, const gchar *name, const gchar *content, GError **err); void ianjuta_document_manager_add_document (IAnjutaDocumentManager *obj, IAnjutaDocument *document, GError **err); IAnjutaDocument* ianjuta_document_manager_get_current_document (IAnjutaDocumentManager *obj, GError **err); GList* ianjuta_document_manager_get_doc_widgets (IAnjutaDocumentManager *obj, GError **err); gboolean ianjuta_document_manager_remove_document (IAnjutaDocumentManager *obj, IAnjutaDocument *document, gboolean save_before, GError **err); void ianjuta_document_manager_set_current_document (IAnjutaDocumentManager *obj, IAnjutaDocument *document, GError **err);
#define IANJUTA_TYPE_DOCUMENT_MANAGER_ERROR (ianjuta_document_manager_error_get_type())
typedef enum { IANJUTA_DOCUMENT_MANAGER_DOESNT_EXIST } IAnjutaDocumentManagerError;
#define IANJUTA_DOCUMENT_MANAGER_ERROR ianjuta_document_manager_error_quark()
typedef struct { GTypeInterface g_iface; IAnjutaEditor* (*add_buffer) (IAnjutaDocumentManager *obj, const gchar *name, const gchar* content, GError **err); void (*add_document) (IAnjutaDocumentManager *obj, IAnjutaDocument* document, GError **err); IAnjutaDocument* (*find_document_with_uri) (IAnjutaDocumentManager *obj, const gchar *uri, GError **err); IAnjutaDocument* (*get_current_document) (IAnjutaDocumentManager *obj, GError **err); GList* (*get_doc_widgets) (IAnjutaDocumentManager *obj, GError **err); gchar* (*get_uri) (IAnjutaDocumentManager *obj, const gchar *file, GError **err); IAnjutaEditor* (*goto_uri_line) (IAnjutaDocumentManager *obj, const gchar *uri, gint lineno, GError **err); IAnjutaEditor* (*goto_uri_line_mark) (IAnjutaDocumentManager *obj, const gchar *uri, gint lineno, gboolean mark, GError **err); gboolean (*remove_document) (IAnjutaDocumentManager *obj, IAnjutaDocument *document, gboolean save_before, GError **err); void (*set_current_document) (IAnjutaDocumentManager *obj, IAnjutaDocument *document, GError **err); } IAnjutaDocumentManagerIface;
GQuark ianjuta_document_manager_error_quark (void);
Returns : |
IAnjutaEditor* ianjuta_document_manager_add_buffer (IAnjutaDocumentManager *obj, const gchar *name, const gchar *content, GError **err);
Creates a new editor buffer of the given name and sets the given content as its initial content.
obj : |
Self |
name : |
Name of the editor buffer. |
content : |
Initial content of the buffer. |
err : |
Error propagation and reporting. |
Returns : | the IAnjutaEditor instance that has been added. |
void ianjuta_document_manager_add_document (IAnjutaDocumentManager *obj, IAnjutaDocument *document, GError **err);
Adds a document to the document manager. This will open a new Notebook tab and show the document there
obj : |
Self |
document : |
the document to add |
err : |
Error propagation and reporting. |
IAnjutaDocument* ianjuta_document_manager_get_current_document (IAnjutaDocumentManager *obj, GError **err);
Gets the current document.
obj : |
Self |
err : |
Error propagation and reporting. |
Returns : | the currently active document. NULL if none is there. |
GList* ianjuta_document_manager_get_doc_widgets (IAnjutaDocumentManager *obj, GError **err);
Gets a list of widgets for open documents. Each widget is a GTK_WIDGET(InjutaDocument*)
obj : |
Self |
err : |
Error propagation and reporting. |
Returns : | a list of widgets for all open documents The returned list (but not the data in the list) must be freed after use. |
gboolean ianjuta_document_manager_remove_document (IAnjutaDocumentManager *obj, IAnjutaDocument *document, gboolean save_before, GError **err);
Closes and removes the given document. If save_before
is TRUE, also
saves the document before closing.
obj : |
Self |
document : |
Document to close. |
save_before : |
If true, saves the document before closing. |
err : |
Error propagation and reporting. |
Returns : | TRUE if the document was removed, else FALSE. |
void ianjuta_document_manager_set_current_document (IAnjutaDocumentManager *obj, IAnjutaDocument *document, GError **err);
Sets the given document as current document.
obj : |
Self |
document : |
the document to set as current. |
err : |
Error propagation and reporting. |