Text retrieval and modification
-
gtkscintilla.Scintilla.get_text()
- Retrieves all the text in the buffer.
-
gtkscintilla.Scintilla.set_text(text)
- This replaces all the text in the document with the text string you pass in.
-
gtkscintilla.Scintilla.set_save_point()
- This message tells Scintilla that the current state of the document is unmodified. This is usually done when the file is saved or loaded, hence the name “save point”. As Scintilla performs undo and redo operations, it notifies the container that it has entered or left the save point with save-point-reached and save-point-left notification messages, allowing the container to know if the file should be considered dirty or not.
-
gtkscintilla.Scintilla.get_line(line)
Returns: | the text contained in the line number line. |
See also
gtkscintilla.Scintilla.get_cur_line, gtkscintilla.Scintilla.get_sel_text, gtkscintilla.Scintilla.get_text_range, gtkscintilla.Scintilla.get_styled_text, gtkscintilla.Scintilla.get_text
-
gtkscintilla.Scintilla.replace_sel(text)
- The currently selected text between the anchor and the current position is replaced by the text string.
-
gtkscintilla.Scintilla.set_read_only(bool readOnly)
-
gtkscintilla.Scintilla.get_read_only()
- These messages set and get the read-only flag for the document. If you mark a document as read only, attempts to modify the text cause the modify-attempt-ro notification.
-
gtkscintilla.Scintilla.get_text_range(start, end)
- This collects the text between the positions start and end. If end is -1, text is returned to the end of the document.
-
gtkscintilla.Scintilla.get_styled_text(start, end)
Returns: | a StyledText instance containing the text and the style contained in the range start, end |
-
gtkscintilla.Scintilla.allocate(num)
- Allocate a document buffer large enough to store a given number of chars. The document will not be made smaller than its current contents.
-
gtkscintilla.Scintilla.add_text(text)
- This inserts the string text in the current position. The current position is set at the end of the inserted text, but it is not scrolled into view.
-
gtkscintilla.Scintilla.add_styled_text(s_text)
- This behaves just like add_text(), but inserts styled text.
-
gtkscintilla.Scintilla.append_text(text)
- Inserts the string text to the end of the document. The current selection is not changed and the new text is not scrolled into view.
-
gtkscintilla.Scintilla.insert_text(pos, text)
- This inserts text string at position pos or at the current position if pos is -1. If the current position is after the insertion point then it is moved along with its surrounding text but no scrolling is performed.
-
gtkscintilla.Scintilla.clear_all()
- Unless the document is read-only, this deletes all the text.
-
gtkscintilla.Scintilla.clear_document_style()
- When wanting to completely restyle the document, for example after choosing a lexer, the clear_document_style() can be used to clear all styling information and reset the folding state.
-
gtkscintilla.Scintilla.get_char_at(pos)
- This returns the character at pos in the document.
-
gtkscintilla.Scintilla.get_style_at(pos)
- This returns the style at pos in the document.