enaml.scintilla.scintilla

Classes

Scintilla

A Scintilla text editing control.

ScintillaDocument

An opaque class which represents a Scintilla text document.

class enaml.scintilla.scintilla.Scintilla(parent=None, **kwargs)[source]

Bases: enaml.widgets.control.Control

A Scintilla text editing control.

Notes

The ‘background’, ‘foreground’, and ‘font’ attributes have no effect on this widget. All styling is supplied via the ‘theme’ attribute.

autocomplete

Enable autocompletion

autocompletions

Autocompletion values and call signatures. Images can be used by appending “?<image_no>” to the completion value. The images are defined by passing a list of image paths as the “autocompletion_images” settings key.

cursor_position

Position of the cursor within the editor in the format (line, column) This is needed for autocompletion engines to determine the current text

document

The scintilla document buffer to use in the editor. A default document will be created automatically for each editor. This value only needs to be supplied when swapping buffers or when using a single buffer in multiple editors.

syntax

The language syntax to apply to the document.

theme

The theme to apply to the widget. See the ‘./THEMES’ document for how to create a theme dict for the widget.

settings

The settings to apply to the widget. See the ‘./SETTINGS’ document for how to create a settings dict for the widget.

zoom

The zoom factor for the editor. The value is internally clamped to the range -10 to 20, inclusive.

text_changed

An event emitted when the text is changed.

hug_width

Text Editors expand freely in height and width by default.

markers

Markers to display.

indicators

Indicators to display.

proxy

A reference to the ProxyScintilla object.

get_text()[source]

Get the text in the current document.

Returns

result – The text in the current document.

Return type

unicode

set_text(text)[source]

Set the text in the current document.

Parameters

text (unicode) – The text to apply to the current document.

class enaml.scintilla.scintilla.ScintillaDocument[source]

Bases: atom.atom.Atom

An opaque class which represents a Scintilla text document.

An instance of this class can be shared with multiple Scintilla widgets to enable multiple editor views on the same buffer, or to use multiple buffers with the same view.

uuid

A uuid which can be used as a handle by the toolkit backend.