abstract class Works::Cell

Direct Known Subclasses

Defined in:

works/cell.cr

Constant Summary

Dimensions = {x: 1_u8, y: 1_u8}
SelectionLength = 10 * Screen.scale_factor
SelectionThickness = 3 * Screen.scale_factor
Size = 32_u16 * Screen.scale_factor

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(col : UInt16 = 0_u16, row : UInt16 = 0_u16) #

[View source]

Class Method Detail

def self.dimensions : NamedTuple(x: UInt8, y: UInt8) #

[View source]
def self.draw_selection(x, y, width, height, selection_color = nil) #

[View source]
def self.size : UInt16 #

[View source]

Instance Method Detail

def clone #

[View source]
def col : UInt16 #

[View source]
def col=(col : UInt16) #

[View source]
def cols : UInt8 #

[View source]
def dimensions : NamedTuple(x: UInt8, y: UInt8) #

[View source]
abstract def draw(x, y) #

[View source]
def draw_selection(dx, dy, color = nil) #

[View source]
def height #

[View source]
def hover?(mouse_col, mouse_row) #

[View source]
def name #

[View source]
def overlaps?(o_col, o_row) #

[View source]
def overlaps?(cell : Cell) #

[View source]
def print_str #

[View source]
def row : UInt16 #

[View source]
def row=(row : UInt16) #

[View source]
def rows : UInt8 #

[View source]
def size : UInt16 #

[View source]
def width #

[View source]
def x #

[View source]
def y #

[View source]