Wrapper functions for the Scintilla editor widget SCI_* messages.
More...
Functions | |
| void | sci_delete_marker_at_line (ScintillaObject *sci, gint line_number, gint marker) |
| Deletes a line marker. | |
| void | sci_end_undo_action (ScintillaObject *sci) |
| Ends grouping a set of edits together as one Undo action. | |
| void | sci_ensure_line_is_visible (ScintillaObject *sci, gint line) |
| Makes line visible (folding may have hidden it). | |
| gint | sci_find_matching_brace (ScintillaObject *sci, gint pos) |
| Finds a matching brace at pos. | |
| gint | sci_find_text (ScintillaObject *sci, gint flags, struct Sci_TextToFind *ttf) |
| Finds text in the document. | |
| gchar | sci_get_char_at (ScintillaObject *sci, gint pos) |
| Gets a character. | |
| gint | sci_get_col_from_position (ScintillaObject *sci, gint position) |
| Gets the column number relative to the start of the line that position is on. | |
| gchar * | sci_get_contents (ScintillaObject *sci, gint buffer_len) |
| Allocates and fills a buffer with text from the start of the document. | |
| gchar * | sci_get_contents_range (ScintillaObject *sci, gint start, gint end) |
| Gets text between start and end. | |
| gint | sci_get_current_line (ScintillaObject *sci) |
| Gets current line number. | |
| gint | sci_get_current_position (ScintillaObject *sci) |
| Gets the cursor position. | |
| gint | sci_get_length (ScintillaObject *sci) |
| Gets the length of all text. | |
| gint | sci_get_lexer (ScintillaObject *sci) |
| Gets the currently used lexer. | |
| gchar * | sci_get_line (ScintillaObject *sci, gint line_num) |
| Gets line contents. | |
| gint | sci_get_line_count (ScintillaObject *sci) |
| Gets the total number of lines. | |
| gint | sci_get_line_end_position (ScintillaObject *sci, gint line) |
| Gets the position at the end of a line. | |
| gint | sci_get_line_from_position (ScintillaObject *sci, gint position) |
| Gets the line number from position. | |
| gint | sci_get_line_indentation (ScintillaObject *sci, gint line) |
| Gets the indentation width of a line. | |
| gboolean | sci_get_line_is_visible (ScintillaObject *sci, gint line) |
| Checks if a line is visible (folding may have hidden it). | |
| gint | sci_get_line_length (ScintillaObject *sci, gint line) |
| Gets line length. | |
| gint | sci_get_position_from_line (ScintillaObject *sci, gint line) |
| Gets the position for the start of line. | |
| void | sci_get_selected_text (ScintillaObject *sci, gchar *text) |
| Gets selected text. | |
| gint | sci_get_selected_text_length (ScintillaObject *sci) |
| Gets selected text length. | |
| gchar * | sci_get_selection_contents (ScintillaObject *sci) |
| Gets selected text. | |
| gint | sci_get_selection_end (ScintillaObject *sci) |
| Gets the selection end position. | |
| gint | sci_get_selection_mode (ScintillaObject *sci) |
| Gets selection mode. | |
| gint | sci_get_selection_start (ScintillaObject *sci) |
| Gets the selection start position. | |
| gint | sci_get_style_at (ScintillaObject *sci, gint position) |
| Gets style ID at position. | |
| gint | sci_get_tab_width (ScintillaObject *sci) |
| Gets display tab width (this is not indent width, see GeanyIndentPrefs). | |
| void | sci_get_text (ScintillaObject *sci, gint len, gchar *text) |
| Gets all text. | |
| void | sci_get_text_range (ScintillaObject *sci, gint start, gint end, gchar *text) |
| Gets text between start and end. | |
| void | sci_goto_line (ScintillaObject *sci, gint line, gboolean unfold) |
| Jumps to the specified line in the document. | |
| gboolean | sci_has_selection (ScintillaObject *sci) |
| Checks if there's a selection. | |
| void | sci_indicator_clear (ScintillaObject *sci, gint pos, gint len) |
| Clears the currently set indicator from a range of text. | |
| void | sci_indicator_set (ScintillaObject *sci, gint indic) |
| Sets the current indicator. | |
| void | sci_insert_text (ScintillaObject *sci, gint pos, const gchar *text) |
| Inserts text. | |
| gboolean | sci_is_marker_set_at_line (ScintillaObject *sci, gint line, gint marker) |
| Checks if a line has a marker set. | |
| void | sci_replace_sel (ScintillaObject *sci, const gchar *text) |
| Replaces selection. | |
| void | sci_scroll_caret (ScintillaObject *sci) |
| Scrolls the cursor in view. | |
| void | sci_send_command (ScintillaObject *sci, gint cmd) |
| Sends Scintilla commands without any parameters. | |
| void | sci_set_current_position (ScintillaObject *sci, gint position, gboolean scroll_to_caret) |
| Sets the cursor position. | |
| void | sci_set_font (ScintillaObject *sci, gint style, const gchar *font, gint size) |
| Sets the font for a particular style. | |
| void | sci_set_line_indentation (ScintillaObject *sci, gint line, gint indent) |
| Sets the indentation of a line. | |
| void | sci_set_marker_at_line (ScintillaObject *sci, gint line_number, gint marker) |
| Sets a line marker. | |
| void | sci_set_selection_end (ScintillaObject *sci, gint position) |
| Sets the selection end position. | |
| void | sci_set_selection_mode (ScintillaObject *sci, gint mode) |
| Sets selection mode. | |
| void | sci_set_selection_start (ScintillaObject *sci, gint position) |
| Sets the selection start position. | |
| void | sci_set_text (ScintillaObject *sci, const gchar *text) |
| Sets all text. | |
| void | sci_start_undo_action (ScintillaObject *sci) |
| Begins grouping a set of edits together as one Undo action. | |
Wrapper functions for the Scintilla editor widget SCI_* messages.
You should also check the http://scintilla.org documentation, as it is more detailed.
To get Scintilla notifications, use the "editor-notify" signal .
| void sci_delete_marker_at_line | ( | ScintillaObject * | sci, | |
| gint | line_number, | |||
| gint | marker | |||
| ) |
Deletes a line marker.
| sci | Scintilla widget. | |
| line_number | Line number. | |
| marker | Marker number. |
| void sci_end_undo_action | ( | ScintillaObject * | sci | ) |
Ends grouping a set of edits together as one Undo action.
| sci | Scintilla GtkWidget. |
| void sci_ensure_line_is_visible | ( | ScintillaObject * | sci, | |
| gint | line | |||
| ) |
Makes line visible (folding may have hidden it).
| sci | Scintilla widget. | |
| line | Line number. |
| gint sci_find_matching_brace | ( | ScintillaObject * | sci, | |
| gint | pos | |||
| ) |
Finds a matching brace at pos.
| sci | Scintilla widget. | |
| pos | Position. |
| gint sci_find_text | ( | ScintillaObject * | sci, | |
| gint | flags, | |||
| struct Sci_TextToFind * | ttf | |||
| ) |
Finds text in the document.
The ttf argument should be a pointer to a Sci_TextToFind structure which contains the text to find and the range in which the text should be searched.
Please refer to the Scintilla documentation for a more detailed description.
| sci | Scintilla widget. | |
| flags | Bitmask of Scintilla search flags (SCFIND_*, see Scintilla documentation). | |
| ttf | Pointer to a TextToFind structure which contains the text to find and the range. |
-1. The chrgText.cpMin and chrgText.cpMax members of TextToFind are filled in with the start and end positions of the found text. | gchar sci_get_char_at | ( | ScintillaObject * | sci, | |
| gint | pos | |||
| ) |
Gets a character.
| sci | Scintilla widget. | |
| pos | Position. |
| gint sci_get_col_from_position | ( | ScintillaObject * | sci, | |
| gint | position | |||
| ) |
Gets the column number relative to the start of the line that position is on.
| sci | Scintilla widget. | |
| position | Position. |
| gchar* sci_get_contents | ( | ScintillaObject * | sci, | |
| gint | buffer_len | |||
| ) |
Allocates and fills a buffer with text from the start of the document.
| sci | Scintilla widget. | |
| buffer_len | Buffer length to allocate, including the terminating null char, e.g. sci_get_length() + 1. Alternatively use -1 to get all text (since Geany 1.23). |
| gchar* sci_get_contents_range | ( | ScintillaObject * | sci, | |
| gint | start, | |||
| gint | end | |||
| ) |
Gets text between start and end.
| sci | Scintilla widget. | |
| start | Start position. | |
| end | End position. |
| gint sci_get_current_line | ( | ScintillaObject * | sci | ) |
Gets current line number.
| sci | Scintilla widget. |
| gint sci_get_current_position | ( | ScintillaObject * | sci | ) |
Gets the cursor position.
| sci | Scintilla widget. |
| gint sci_get_length | ( | ScintillaObject * | sci | ) |
Gets the length of all text.
| sci | Scintilla widget. |
| gint sci_get_lexer | ( | ScintillaObject * | sci | ) |
Gets the currently used lexer.
| sci | Scintilla widget. |
| gchar* sci_get_line | ( | ScintillaObject * | sci, | |
| gint | line_num | |||
| ) |
Gets line contents.
| sci | Scintilla widget. | |
| line_num | Line number. |
NULL-terminated copy of the line text. | gint sci_get_line_count | ( | ScintillaObject * | sci | ) |
Gets the total number of lines.
| sci | Scintilla widget. |
| gint sci_get_line_end_position | ( | ScintillaObject * | sci, | |
| gint | line | |||
| ) |
Gets the position at the end of a line.
| sci | Scintilla widget. | |
| line | Line. |
| gint sci_get_line_from_position | ( | ScintillaObject * | sci, | |
| gint | position | |||
| ) |
Gets the line number from position.
| sci | Scintilla widget. | |
| position | Position. |
| gint sci_get_line_indentation | ( | ScintillaObject * | sci, | |
| gint | line | |||
| ) |
Gets the indentation width of a line.
| sci | Scintilla widget. | |
| line | Line to get the indentation from. |
| gboolean sci_get_line_is_visible | ( | ScintillaObject * | sci, | |
| gint | line | |||
| ) |
Checks if a line is visible (folding may have hidden it).
| sci | Scintilla widget. | |
| line | Line number. |
| gint sci_get_line_length | ( | ScintillaObject * | sci, | |
| gint | line | |||
| ) |
Gets line length.
| sci | Scintilla widget. | |
| line | Line number. |
| gint sci_get_position_from_line | ( | ScintillaObject * | sci, | |
| gint | line | |||
| ) |
Gets the position for the start of line.
| sci | Scintilla widget. | |
| line | Line. |
| void sci_get_selected_text | ( | ScintillaObject * | sci, | |
| gchar * | text | |||
| ) |
Gets selected text.
| sci | Scintilla widget. | |
| text | Text buffer; must be allocated sci_get_selected_text_length() + 1 bytes for null-termination. |
| gint sci_get_selected_text_length | ( | ScintillaObject * | sci | ) |
Gets selected text length.
| sci | Scintilla widget. |
| gchar* sci_get_selection_contents | ( | ScintillaObject * | sci | ) |
Gets selected text.
| sci | Scintilla widget. |
| gint sci_get_selection_end | ( | ScintillaObject * | sci | ) |
Gets the selection end position.
| sci | Scintilla widget. |
| gint sci_get_selection_mode | ( | ScintillaObject * | sci | ) |
Gets selection mode.
| sci | Scintilla widget. |
| gint sci_get_selection_start | ( | ScintillaObject * | sci | ) |
Gets the selection start position.
| sci | Scintilla widget. |
| gint sci_get_style_at | ( | ScintillaObject * | sci, | |
| gint | position | |||
| ) |
Gets style ID at position.
| sci | Scintilla widget. | |
| position | Position. |
| gint sci_get_tab_width | ( | ScintillaObject * | sci | ) |
Gets display tab width (this is not indent width, see GeanyIndentPrefs).
| sci | Scintilla widget. |
| void sci_get_text | ( | ScintillaObject * | sci, | |
| gint | len, | |||
| gchar * | text | |||
| ) |
Gets all text.
| sci | Scintilla widget. | |
| len | Length of text buffer, usually sci_get_length() + 1. | |
| text | Text buffer; must be allocated len + 1 bytes for null-termination. |
| void sci_get_text_range | ( | ScintillaObject * | sci, | |
| gint | start, | |||
| gint | end, | |||
| gchar * | text | |||
| ) |
Gets text between start and end.
| sci | Scintilla widget. | |
| start | Start. | |
| end | End. | |
| text | Text will be zero terminated and must be allocated (end - start + 1) bytes. |
| void sci_goto_line | ( | ScintillaObject * | sci, | |
| gint | line, | |||
| gboolean | unfold | |||
| ) |
Jumps to the specified line in the document.
If unfold is set and line is hidden by a fold, it is unfolded first to ensure it is visible.
| sci | Scintilla widget. | |
| line | Line. | |
| unfold | Whether to unfold first. |
| gboolean sci_has_selection | ( | ScintillaObject * | sci | ) |
Checks if there's a selection.
| sci | Scintilla widget. |
| void sci_indicator_clear | ( | ScintillaObject * | sci, | |
| gint | pos, | |||
| gint | len | |||
| ) |
Clears the currently set indicator from a range of text.
Starting at pos, len characters long. In order to make this function properly, you need to set the current indicator before with sci_indicator_set().
| sci | Scintilla widget. | |
| pos | Starting position. | |
| len | Length. |
| void sci_indicator_set | ( | ScintillaObject * | sci, | |
| gint | indic | |||
| ) |
Sets the current indicator.
This is necessary to define an indicator for a range of text or clearing indicators for a range of text.
| sci | Scintilla widget. | |
| indic | The indicator number to set. |
| void sci_insert_text | ( | ScintillaObject * | sci, | |
| gint | pos, | |||
| const gchar * | text | |||
| ) |
Inserts text.
| sci | Scintilla widget. | |
| pos | Position, or -1 for current. | |
| text | Text. |
| gboolean sci_is_marker_set_at_line | ( | ScintillaObject * | sci, | |
| gint | line, | |||
| gint | marker | |||
| ) |
Checks if a line has a marker set.
| sci | Scintilla widget. | |
| line | Line number. | |
| marker | Marker number. |
| void sci_replace_sel | ( | ScintillaObject * | sci, | |
| const gchar * | text | |||
| ) |
Replaces selection.
| sci | Scintilla widget. | |
| text | Text. |
| void sci_scroll_caret | ( | ScintillaObject * | sci | ) |
Scrolls the cursor in view.
| sci | Scintilla widget. |
| void sci_send_command | ( | ScintillaObject * | sci, | |
| gint | cmd | |||
| ) |
Sends Scintilla commands without any parameters.
| sci | The Scintilla GtkWidget. | |
| cmd | SCI_COMMAND. |
| void sci_set_current_position | ( | ScintillaObject * | sci, | |
| gint | position, | |||
| gboolean | scroll_to_caret | |||
| ) |
Sets the cursor position.
| sci | Scintilla widget. | |
| position | Position. | |
| scroll_to_caret | Whether to scroll the cursor in view. |
| void sci_set_font | ( | ScintillaObject * | sci, | |
| gint | style, | |||
| const gchar * | font, | |||
| gint | size | |||
| ) |
Sets the font for a particular style.
| sci | Scintilla widget. | |
| style | The style. | |
| font | The font name. | |
| size | The font size. |
| void sci_set_line_indentation | ( | ScintillaObject * | sci, | |
| gint | line, | |||
| gint | indent | |||
| ) |
Sets the indentation of a line.
| sci | Scintilla widget. | |
| line | Line to indent. | |
| indent | Indentation width. |
| void sci_set_marker_at_line | ( | ScintillaObject * | sci, | |
| gint | line_number, | |||
| gint | marker | |||
| ) |
Sets a line marker.
| sci | Scintilla widget. | |
| line_number | Line number. | |
| marker | Marker number. |
| void sci_set_selection_end | ( | ScintillaObject * | sci, | |
| gint | position | |||
| ) |
Sets the selection end position.
| sci | Scintilla widget. | |
| position | Position. |
| void sci_set_selection_mode | ( | ScintillaObject * | sci, | |
| gint | mode | |||
| ) |
Sets selection mode.
| sci | Scintilla widget. | |
| mode | Mode. |
| void sci_set_selection_start | ( | ScintillaObject * | sci, | |
| gint | position | |||
| ) |
Sets the selection start position.
| sci | Scintilla widget. | |
| position | Position. |
| void sci_set_text | ( | ScintillaObject * | sci, | |
| const gchar * | text | |||
| ) |
Sets all text.
| sci | Scintilla widget. | |
| text | Text. |
| void sci_start_undo_action | ( | ScintillaObject * | sci | ) |
Begins grouping a set of edits together as one Undo action.
You must call sci_end_undo_action() after making your edits.
| sci | Scintilla GtkWidget. |
1.7.1