Caret, selection, and hotspot styles ==================================== The selection is shown by changing the foreground and/or background colours. If one of these is not set then that attribute is not changed for the selection. The default is to show the selection by changing the background to light gray and leaving the foreground the same as when it was not selected. When there is no selection, the current insertion point is marked by the text caret. This is a vertical line that is normally blinking on and off to attract the users attention. Selection style --------------- .. method:: gtkscintilla.Scintilla.set_sel_style( [setting = None | **props ]) This method sets the style of the selection. You can pass a :class:`gtkscintilla.style.SelStyle` instance or *props* keyword arguments. Available properties are: :param color: The foreground color of the selected text :param background: The background color :param alpha: The translucency :type alpha: [0-255] int value. :param eolfilled: End of line filled with background color? :type eolfilled: bool .. method:: gtkscintilla.Scintilla.get_sel_style() :returns: A :class:`gtkscintilla.style.SelStyle` instance representing the current style settings. Caret Style ----------- .. method:: gtkscintilla.Scintilla.set_caret_style( [setting = None | **props ]) Sets the caret appearance, the synopsis is like :meth:`~gtkscintilla.Scintilla.set_sel_style`, the *style* instance should be a :class:`gtkscintilla.style.CaretStyle` instance. Available properties are: :param color: The color of the caret :param period: Blinking period in milliseconds :param type: line caret (CARETSTYLE_LINE=1), a block caret (CARETSTYLE_BLOCK=2) or to not draw at all (CARETSTYLE_INVISIBLE=0). :param width: 0, 1, 2 or 3 pixels. .. method:: gtkscintilla.Scintilla.get_caret_style() :returns: The relative :class:`gtkscintilla.style.CaretStyle` instance. Caret Line style ---------------- .. method:: gtkscintilla.Scintilla.set_caret_line_style( [setting = None | **props ]) Sets the line containing the caret appearance, the synopsis is like :meth:`~gtkscintilla.Scintilla.set_sel_style`, the *style* instance should be a :class:`gtkscintilla.style.CaretLineStyle` instance. Available properties are: :param visible: Applies or not the background settings. :param background: Background color :param background_alpha: Background alpha .. method:: gtkscintilla.Scintilla.get_caret_line_style() :returns: The relative :class:`gtkscintilla.style.CaretLineStyle` instance. .. method:: gtkscintilla.Scintilla.set_caret_sticky(caretSticky) .. method:: gtkscintilla.Scintilla.get_caret_sticky .. method:: gtkscintilla.Scintilla.toggle_caret_sticky These messages set, get or toggle the *caretSticky* flag which controls when the last position of the caret on the line is saved. When set to *True*, the position is not saved when you type a character, a tab, paste the clipboard content or press backspace. Hotspot Style ------------- .. method:: gtkscintilla.Scintilla.set_hotspot_active_style( [setting = None | **props ]) Sets the hotspot "active" appearance, the synopsis is like :meth:`~gtkscintilla.Scintilla.set_sel_style`, the *style* instance should be a :class:`gtkscintilla.style.HotSpotActiveStyle` instance. Available properties are: :param color: Foreground color :param background: Background color :param underline: Is underlined? .. method:: gtkscintilla.Scintilla.get_hotspot_active_style() :returns: The relative :class:`gtkscintilla.style.HotSpotActiveStyle` instance. Style Classes ------------- .. class:: gtkscintilla.style.SelStyle .. class:: gtkscintilla.style.CaretStyle .. class:: gtkscintilla.style.CaretLineStyle .. class:: gtkscintilla.style.HotSpotActiveStyle These classes are containers of the style information, they have the respective set of properties defined in the setter methods ( :meth:`~gtkscintilla.Scintilla.set_sel_style` etc...) The constructor takes keyword argumets like the setter methods: >>> st = SelStyle(color="red", background="black") You can retrieve/modify the properties in this way: >>> col = st.color >>> st.background = "gray"