package documentation
(source)

This module contains the main text editor widget. It includes all classes needed to display and edit a single page as well as related dialogs like the dialogs to insert images, links etc.

The main widget accessed by the rest of the application is the PageView class. This wraps a TextView widget which actually shows the page. The TextBuffer class is the data model used by the TextView.

Unknown Field: todo
for documentation group functions in more logical order
Module editbar No module docstring; 1/2 class documented

From __init__.py:

Class AsciiString Undocumented
Class AttachFileDialog Undocumented
Class ConfigDefinitionConstant Undocumented
Class EditImageDialog Dialog to edit properties of an embedded image
Class FindAndReplaceDialog Dialog for find and replace
Class FindBar Bar to be shown below the TextView for find functions
Class FindWidget Base class for FindBar and FindAndReplaceDialog
Class InsertDateDialog Dialog to insert a date-time in the page
Class InsertedObjectAnchor Undocumented
Class InsertedObjectPageviewManager "Glue" object to manage "insert object" actions for the PageView Creates an action object for each object type and inserts UI elements for the action in the pageview.
Class InsertImageDialog Dialog to insert an image in the page
Class InsertLinkDialog Dialog to insert a new link in the page or edit properties of an existing link
Class InsertTextFromFileDialog Dialog to insert text from an external file into the page
Class LineSeparator Class to create a separation line.
Class LineSeparatorAnchor Undocumented
Class MoveTextDialog This dialog allows moving a selected text to a new page The idea is to allow "refactoring" of pages more easily.
Class NewFileDialog Undocumented
Class PageView Widget to display a single page, consists of a TextView and a FindBar. Also adds menu items and in general integrates the TextView with the rest of the application.
Class PageViewExtension Base class for extensions of the PageView, see PageViewExtensionBase for API documentation.
Class PageViewExtensionBase Base class for extensions that want to interact with the "page view", which is the primary editor view of the application.
Class PluginInsertedObjectAnchor Undocumented
Class PromptExistingFileDialog No summary
Class SaveCursorContext Context manager used by TextBuffer.tmp_cursor()
Class SavePageErrorDialog No summary
Class SavePageHandler Object for handling page saving.
Class TableAnchor Undocumented
Class TextBuffer Data model for the editor widget
Class TextBufferList This class represents a bullet or checkbox list in a TextBuffer. It is used to perform recursive actions on the list.
Class TextFinder This class handles finding text in the TextBuffer
Class TextView Widget to display a TextBuffer with page content. Implements zim specific behavior like additional key bindings, on-mouse-over signals for links, and the custom popup menu.
Class UndoActionGroup Group of actions that should un-done or re-done in a single step
Class UndoStackManager Undo stack implementation for TextBuffer. It records any changes to the buffer and allows undoing and redoing edits.
Class UserActionContext Context manager to wrap actions in proper user-action signals
Class WordCountDialog Dialog showing line, word, and character counts
Function attach_file Undocumented
Function camelcase Undocumented
Function image_file_get_dimensions Replacement for GdkPixbuf.Pixbuf.get_file_info @return (width, height) in pixels or None if file does not exist or failed to load
Function image_file_load_pixels Replacement for GdkPixbuf.Pixbuf.new_from_file_at_size(file.path, w, h) When file does not exist or fails to load, this throws exceptions.
Function increase_list_bullet Like increase_list_iter(), but handles bullet string directly @param bullet: a numbered list bullet, e.g. "1." @returns: the next bullet, e.g. "2." or None
Function is_line Function used for line autoformatting.
Constant BULLETS Undocumented
Constant CHARS_END_OF_WORD Undocumented
Constant CHECKBOXES Undocumented
Constant COPY_FORMATS Undocumented
Constant CURSOR_LINK Undocumented
Constant CURSOR_TEXT Undocumented
Constant CURSOR_WIDGET Undocumented
Constant FIND_CASE_SENSITIVE Undocumented
Constant FIND_REGEX Undocumented
Constant FIND_WHOLE_WORD Undocumented
Constant GRAVITY_LEFT Undocumented
Constant GRAVITY_RIGHT Undocumented
Constant KEYSTATES Undocumented
Constant KEYVAL_ESC Undocumented
Constant KEYVAL_POUND Undocumented
Constant KEYVALS_ASTERISK Undocumented
Constant KEYVALS_BACKSPACE Undocumented
Constant KEYVALS_END_OF_WORD Undocumented
Constant KEYVALS_ENTER Undocumented
Constant KEYVALS_GT Undocumented
Constant KEYVALS_HOME Undocumented
Constant KEYVALS_LEFT_TAB Undocumented
Constant KEYVALS_SLASH Undocumented
Constant KEYVALS_SPACE Undocumented
Constant KEYVALS_TAB Undocumented
Constant MAX_PAGES_UNDO_STACK Undocumented
Constant MENU_ACTIONS Undocumented
Constant NUMBER_BULLET Undocumented
Constant PIXBUF_CHR Undocumented
Constant SCROLL_TO_MARK_MARGIN Undocumented
Constant STOCK_CHECKED_BOX Undocumented
Constant STOCK_MIGRATED_BOX Undocumented
Constant STOCK_TRANSMIGRATED_BOX Undocumented
Constant STOCK_UNCHECKED_BOX Undocumented
Constant STOCK_XCHECKED_BOX Undocumented
Variable anchor_re Undocumented
Variable autoformat_bullets Undocumented
Variable bullet_types Undocumented
Variable bullets Undocumented
Variable file_re Undocumented
Variable heading_re Undocumented
Variable interwiki_re Undocumented
Variable is_numbered_bullet_re Undocumented
Variable link_to_anchor_re Undocumented
Variable link_to_page_re Undocumented
Variable logger Undocumented
Variable markup_re Undocumented
Variable tag_re Undocumented
Variable twoletter_re Undocumented
Variable ui_preferences Undocumented
Function _install_format_actions Undocumented
Variable _is_heading_tag Undocumented
Variable _is_indent_tag Undocumented
Variable _is_inline_nesting_tag Undocumented
Variable _is_line_based_tag Undocumented
Variable _is_link_tag Undocumented
Variable _is_link_tag_without_href Undocumented
Variable _is_non_nesting_tag Undocumented
Variable _is_not_heading_tag Undocumented
Variable _is_not_indent_tag Undocumented
Variable _is_not_line_based_tag Undocumented
Variable _is_not_link_tag Undocumented
Variable _is_not_style_tag Undocumented
Variable _is_not_tag_tag Undocumented
Variable _is_pre_or_code_tag Undocumented
Variable _is_pre_tag Undocumented
Variable _is_style_tag Undocumented
Variable _is_tag_tag Undocumented
Variable _is_zim_tag Undocumented
logger = (source)

Undocumented

MAX_PAGES_UNDO_STACK: int = (source)

Undocumented

Value
10
def is_line(line): (source)
Function used for line autoformatting.
STOCK_CHECKED_BOX: str = (source)

Undocumented

Value
'zim-checked-box'
STOCK_UNCHECKED_BOX: str = (source)

Undocumented

Value
'zim-unchecked-box'
STOCK_XCHECKED_BOX: str = (source)

Undocumented

Value
'zim-xchecked-box'
STOCK_MIGRATED_BOX: str = (source)

Undocumented

Value
'zim-migrated-box'
STOCK_TRANSMIGRATED_BOX: str = (source)

Undocumented

Value
'zim-transmigrated-box'
bullet_types = (source)

Undocumented

bullets: dict = (source)

Undocumented

autoformat_bullets = (source)

Undocumented

NUMBER_BULLET: str = (source)

Undocumented

Value
'#.'
is_numbered_bullet_re = (source)

Undocumented

KEYVALS_HOME = (source)

Undocumented

Value
list(map(Gdk.keyval_from_name, ('Home', 'KP_Home')))
KEYVALS_ENTER = (source)

Undocumented

Value
list(map(Gdk.keyval_from_name, ('Return', 'KP_Enter', 'ISO_Enter')))
KEYVALS_BACKSPACE = (source)

Undocumented

Value
list(map(Gdk.keyval_from_name, ('BackSpace')))
KEYVALS_TAB = (source)

Undocumented

Value
list(map(Gdk.keyval_from_name, ('Tab', 'KP_Tab')))
KEYVALS_LEFT_TAB = (source)

Undocumented

Value
list(map(Gdk.keyval_from_name, ('ISO_Left_Tab')))
CHARS_END_OF_WORD: tuple[str, ...] = (source)

Undocumented

Value
('\t', ' ', ')', '>', ';')
KEYVALS_END_OF_WORD = (source)

Undocumented

Value
list(map(Gdk.unicode_to_keyval, list(map(ord, CHARS_END_OF_WORD))))+KEYVALS_TAB
KEYVALS_ASTERISK = (source)

Undocumented

Value
(Gdk.unicode_to_keyval(ord('*')), Gdk.keyval_from_name('KP_Multiply'))
KEYVALS_SLASH = (source)

Undocumented

Value
(Gdk.unicode_to_keyval(ord('/')), Gdk.keyval_from_name('KP_Divide'))
KEYVALS_GT = (source)

Undocumented

Value
(Gdk.unicode_to_keyval(ord('>')))
KEYVALS_SPACE = (source)

Undocumented

Value
(Gdk.unicode_to_keyval(ord(' ')))
KEYVAL_ESC = (source)

Undocumented

Value
Gdk.keyval_from_name('Escape')
KEYVAL_POUND = (source)

Undocumented

Value
Gdk.unicode_to_keyval(ord('#'))
KEYSTATES = (source)

Undocumented

Value
((Gdk.ModifierType.CONTROL_MASK|Gdk.ModifierType.META_MASK)|Gdk.ModifierType.SHIFT_MASK)|Gdk.ModifierType.MOD1_MASK
MENU_ACTIONS = (source)

Undocumented

Value
(('insert_new_file_menu', None, _('New _Attachment')))
ui_preferences = (source)

Undocumented

_is_zim_tag = (source)

Undocumented

_is_indent_tag = (source)

Undocumented

_is_not_indent_tag = (source)

Undocumented

_is_heading_tag = (source)

Undocumented

_is_not_heading_tag = (source)

Undocumented

_is_pre_tag = (source)

Undocumented

_is_pre_or_code_tag = (source)

Undocumented

_is_line_based_tag = (source)

Undocumented

_is_not_line_based_tag = (source)

Undocumented

_is_style_tag = (source)

Undocumented

_is_not_style_tag = (source)

Undocumented

_is_link_tag = (source)

Undocumented

_is_not_link_tag = (source)

Undocumented

_is_tag_tag = (source)

Undocumented

_is_not_tag_tag = (source)

Undocumented

_is_inline_nesting_tag = (source)

Undocumented

_is_non_nesting_tag = (source)

Undocumented

_is_link_tag_without_href = (source)

Undocumented

PIXBUF_CHR: str = (source)

Undocumented

Value
''
SCROLL_TO_MARK_MARGIN: float = (source)

Undocumented

Value
0.2
heading_re = (source)

Undocumented

link_to_page_re = (source)

Undocumented

interwiki_re = (source)

Undocumented

file_re = (source)

Undocumented

markup_re = (source)

Undocumented

link_to_anchor_re = (source)

Undocumented

anchor_re = (source)

Undocumented

tag_re = (source)

Undocumented

twoletter_re = (source)

Undocumented

def camelcase(word): (source)

Undocumented

def increase_list_bullet(bullet): (source)
Like increase_list_iter(), but handles bullet string directly
Parameters
bulleta numbered list bullet, e.g. "1."
Returns
the next bullet, e.g. "2." or None
GRAVITY_RIGHT: str = (source)

Undocumented

Value
'right'
GRAVITY_LEFT: str = (source)

Undocumented

Value
'left'
def image_file_get_dimensions(file_path): (source)
def image_file_load_pixels(file, width_override=-1, height_override=-1): (source)
Replacement for GdkPixbuf.Pixbuf.new_from_file_at_size(file.path, w, h) When file does not exist or fails to load, this throws exceptions.
FIND_CASE_SENSITIVE: int = (source)

Undocumented

Value
1
FIND_WHOLE_WORD: int = (source)

Undocumented

Value
2
FIND_REGEX: int = (source)

Undocumented

Value
4
CURSOR_TEXT = (source)

Undocumented

Value
Gdk.Cursor.new_from_name(Gdk.Display.get_default(), 'text')
CURSOR_LINK = (source)

Undocumented

Value
Gdk.Cursor.new_from_name(Gdk.Display.get_default(), 'pointer')
CURSOR_WIDGET = (source)

Undocumented

Value
Gdk.Cursor.new_from_name(Gdk.Display.get_default(), 'default')
def _install_format_actions(klass): (source)

Undocumented

def attach_file(widget, notebook, path, file, force_overwrite=False): (source)

Undocumented