struct SynFrag

Defined in:

aspis/document.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(document : Document, range : Range(Int32, Int32), origin : SF::Vector2f, inset : SF::Vector2f, hi : Hi = NoHi.new(@document)) #

[View source]

Instance Method Detail

def begin #

Returns the index where this fragment begins.


[View source]
def bot #

Returns the bottom line in this fragment.


[View source]
def each_char_with_index(&) #

[View source]
def end #

Returns the index where this fragment ends.


[View source]
def hi : Hi #

[View source]
def includes?(index : Int) #

[View source]
def index_to_coords(index : Int) #

[View source]
def index_to_extent(index : Int) #

[View source]
def index_to_frag_index(index : Int) #

Localizes document index to this fragment.


[View source]
def index_to_text_object(index : Int, &) #

Yields text object and document index localized to that text object (i.e., indexing into that text object).


[View source]
def present(window) #

[View source]
def string #

[View source]
def sync(range : Range(Int32, Int32)) #

Updates this fragment's displayed content according to range. Returns an updated copy of SynText. This copy must be used instead of self after #sync.


[View source]
def top #

Returns the top line in this fragment.


[View source]