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: 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 width by default.

hug_height

Text Editors expand freely in height 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.

activated

An event fired when an object’s proxy is activated. It is triggered once during the object lifetime, at the end of the activate_proxy method.

background

The background color of the widget.

destroyed

An event fired when an object has been destroyed. It is triggered once during the object lifetime, just before the object is removed from the tree structure.

enabled

Whether or not the widget is enabled.

initialized

An event fired when an object is initialized. It is triggered once during the object lifetime, at the end of the initialize method.

name

Export the ‘name’ attribute as a declarative member.

style_class

The style class to which this item belongs. Multiple classes can be separated with whitespace. An empty string indicates the widget does not belong to any style class.

class enaml.scintilla.scintilla.ScintillaDocument[source]

Bases: 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.