class Cohn

Overview

[ ] self-sufficient cursor


[ ] handle ins/del 1 000 000s of selections and cursors bearably 500 000 cursors do APPLY in: approx 500ms same for selections, really

Included Modules

Defined in:

aspis.cr

Constructors

Instance Method Summary

Instance methods inherited from module EventTarget

attach(handler : EventHandler) attach, ctrl=(ctrl) ctrl=, ctrl? ctrl?, shift=(shift) shift=, shift? shift?

Constructor Detail

def self.new(window : SF::RenderWindow, content, platform : Platform, theme : Theme) #

[View source]

Instance Method Detail

def acquire #

[View source]
def clear_selections_from(start : Int) #

[View source]
def i_touch_selections_or_doc(&) #

use everywhere you touch @selections or @document !!!


[View source]
def mainloop #

[View source]
def on_click(event : SF::Event::MouseButtonPressed) #

[View source]
def on_drag(event : SF::Event::MouseMoved) #

[View source]
def on_input(event : SF::Event::TextEntered, chr : Char) #

[View source]
def on_key_pressed(event : SF::Event::KeyPressed) #

[View source]
def on_scroll(event : SF::Event::MouseWheelScrolled) #

[View source]
def on_with_ctrl_pressed(event : SF::Event::KeyPressed) #

[View source]
def recompute_visible_selections #

just recompute visible, release/acquire rects


[View source]
def release #

[View source]
def selection(cidx : Cursor | Int = 0, aidx : Cursor | Int = cidx, focus = true) #

[View source]
def theme=(theme : Theme) #

[View source]
def uniq_selections #

merge overlaps & recompute visible


[View source]