euporie.core.widgets.minimap

Define a minimap display widget.

Functions

get_app()

Get the current active (running) Application.

render_minimap(reader, hscale, vscale[, ...])

Render a minimap into a single string.

wrap(text[, width])

Wrap a single paragraph of text, returning a list of wrapped lines.

Classes

Box(body[, padding, padding_left, ...])

Add padding around a container.

BufferControl([buffer, input_processors, ...])

Control for visualizing the content of a Buffer.

Button(text, width, align, ...)

A clickable button widget which holds text.

DiBool([top, right, bottom, left])

A tuple of four bools with directions.

Event(sender[, handler])

Simple event to which event handlers can be attached. For instance::.

FastDictCache(get_value[, size])

Fast, lightweight cache which keeps at most size items.

FocusedStyle(body[, style_focus, style_hover])

Apply a style to child containers when focused or hovered.

HSplit(children[, window_too_small, align, ...])

Several layouts, one stacked above/under the other.

Label(text[, style, width, ...])

Widget that displays the given text.

MarginContainer(margin, target)

A container which renders a stand-alone margin.

MiniMap([hscale, vscale])

A minimap widget displaying minimaps of all buffers in the current tab.

MiniMapControl([hscale, vscale])

A control to render minimaps for all buffers in the current tab.

MouseButton(*values)

MouseEventType(*values)

Point(x, y)

ScrollbarMargin([display_arrows, ...])

Margin displaying a scrollbar.

SimpleCache([maxsize])

Very simple cache that discards the oldest item when the cache size is exceeded.

UIContent(get_line, StyleAndTextTuples] = >, ...)

Content generated by a user control.

UIControl()

Base class for all user interface controls.

VSplit(children[, window_too_small, align, ...])

Several layouts, one stacked left/right of the other.

Window(*args, **kwargs)

Container that holds a control.

WindowAlign(*values)

Alignment of the Window content.

class euporie.core.widgets.minimap.MiniMap(hscale: float = 0.25, vscale: float = 0.5)

Bases: object

A minimap widget displaying minimaps of all buffers in the current tab.

MAX_SCALE = 2.0
MIN_SCALE = 0.125
SCALE_STEP = 0.125
zoom(direction: int) None

Zoom the minimap in or out.

Parameters:

direction – Positive to zoom in, negative to zoom out.

class euporie.core.widgets.minimap.MiniMapControl(hscale: float = 0.5, vscale: float = 0.25)

Bases: UIControl

A control to render minimaps for all buffers in the current tab.

create_content(width: int, height: int) UIContent

Generate the content for this user control.

get_invalidate_events() Iterable[Event[object]]

Return a list of Event objects.

get_key_bindings() KeyBindingsBase | None

Key bindings that are specific for this user control.

property hscale: float

The horizontal scaling factor.

is_focusable() bool

Tell whether this user control is focusable.

mouse_handler(mouse_event: MouseEvent) NotImplementedOrNone

Handle mouse events to navigate to the corresponding line.

move_cursor_down() None

Request to move the cursor down.

move_cursor_up() None

Request to move the cursor up.

preferred_height(width: int, max_available_height: int, wrap_lines: bool, get_line_prefix: GetLinePrefixCallable | None) int | None

Use all available height.

preferred_width(max_available_width: int) int | None

Use all available width.

reset() None

Reset the control.

property vscale: float

The vertical scaling factor.