![]() |
![]() |
![]() |
Anjuta Developers Reference Manual | ![]() |
---|---|---|---|---|
Top | Description |
#include <libanjuta/interfaces/ianjuta-editor-selection.h> #define IANJUTA_EDITOR_SELECTION_ERROR struct IAnjutaEditorSelectionIface; GQuark ianjuta_editor_selection_error_quark (void
); gchar * ianjuta_editor_selection_get (IAnjutaEditorSelection *obj
,GError **err
); IAnjutaIterable * ianjuta_editor_selection_get_end (IAnjutaEditorSelection *obj
,GError **err
); IAnjutaIterable * ianjuta_editor_selection_get_start (IAnjutaEditorSelection *obj
,GError **err
); gboolean ianjuta_editor_selection_has_selection (IAnjutaEditorSelection *obj
,GError **err
); void ianjuta_editor_selection_replace (IAnjutaEditorSelection *obj
,const gchar *text
,gint length
,GError **err
); void ianjuta_editor_selection_select_all (IAnjutaEditorSelection *obj
,GError **err
); void ianjuta_editor_selection_select_block (IAnjutaEditorSelection *obj
,GError **err
); void ianjuta_editor_selection_select_function (IAnjutaEditorSelection *obj
,GError **err
); void ianjuta_editor_selection_set (IAnjutaEditorSelection *obj
,IAnjutaIterable *start
,IAnjutaIterable *end
,gboolean scroll
,GError **err
);
#define IANJUTA_EDITOR_SELECTION_ERROR ianjuta_editor_selection_error_quark()
struct IAnjutaEditorSelectionIface { IAnjutaEditorIface g_iface; gchar* (*get) (IAnjutaEditorSelection *obj, GError **err); IAnjutaIterable* (*get_end) (IAnjutaEditorSelection *obj, GError **err); IAnjutaIterable* (*get_start) (IAnjutaEditorSelection *obj, GError **err); gboolean (*has_selection) (IAnjutaEditorSelection *obj, GError **err); void (*replace) (IAnjutaEditorSelection *obj, const gchar *text, gint length, GError **err); void (*select_all) (IAnjutaEditorSelection *obj, GError **err); void (*select_block) (IAnjutaEditorSelection *obj, GError **err); void (*select_function) (IAnjutaEditorSelection *obj, GError **err); void (*set) (IAnjutaEditorSelection *obj, IAnjutaIterable* start, IAnjutaIterable* end, gboolean scroll, GError **err); };
gchar * ianjuta_editor_selection_get (IAnjutaEditorSelection *obj
,GError **err
);
Gets curerntly selected text in editor.
|
Self |
|
Error propagation and reporting |
Returns : |
A newly allocated buffer of currently selected characters. NULL if there is no selection. The returned buffer must be freed after use. |
IAnjutaIterable * ianjuta_editor_selection_get_end (IAnjutaEditorSelection *obj
,GError **err
);
Get end position of selection. If there is no selection, returns NULL.
|
Self |
|
Error propagation and reporting |
Returns : |
End of selection or NULL if there is no selection. |
IAnjutaIterable * ianjuta_editor_selection_get_start (IAnjutaEditorSelection *obj
,GError **err
);
Gets start position of selection text.
Return: Start of selection or NULL if there is no selection.
|
Self |
|
Error propagation and reporting |
gboolean ianjuta_editor_selection_has_selection (IAnjutaEditorSelection *obj
,GError **err
);
Returns TRUE if editor has any text selected. The selection
positions can be retrieved with ianjuta_editor_selection_get_start()
and ianjuta_editor_selection_get_end()
.
|
Self |
|
Error propagation and reporting |
Returns : |
TRUE if there is text selected else FALSE. |
void ianjuta_editor_selection_replace (IAnjutaEditorSelection *obj
,const gchar *text
,gint length
,GError **err
);
Replaces currently selected text with the text
. Only length
amount
of characters are used from text
buffer to replace.
|
Self |
|
Replacement text. |
|
Length of the text to used in text . |
|
Error propagation and reporting |
void ianjuta_editor_selection_select_all (IAnjutaEditorSelection *obj
,GError **err
);
void ianjuta_editor_selection_select_block (IAnjutaEditorSelection *obj
,GError **err
);
Selects current block of code. The definition of block of code depends on highlight mode used (programming language). Some highlight mode does not have block concept, in that case this method does not do anything.
|
Self |
|
Error propagation and reporting |
void ianjuta_editor_selection_select_function (IAnjutaEditorSelection *obj
,GError **err
);
Select current function block. The definition of function block depends on highlight mode used (programming language). Some highlight mode does not have function concept, in that case this method does not do anything.
|
Self |
|
Error propagation and reporting |
void ianjuta_editor_selection_set (IAnjutaEditorSelection *obj
,IAnjutaIterable *start
,IAnjutaIterable *end
,gboolean scroll
,GError **err
);
Select characters between start and end. Start and end don't have to be ordered.
|
Self |
|
Begin of selection |
|
End of selection |
|
Scroll selection onscreen |
|
Error propagation and reporting |