Opal::UI::CharacterGrid
Inherits Opal::UI::Control < Opal::UI::InputHookable < Opal::UI::Element < Opal::UI::Themable < Reference < Object
Interactive, highly configurable 2D character grid control. Renders regular horizontal and vertical grid lines with customizable intervals, glyph styles (solid, heavy, double, dashed, dotted, crosses, etc.), major/minor lines, panning offsets, interval scaling (zoom), mouse dragging, and coordinate rulers.
Constructors
new(interval_x : Int32 = 8, interval_y : Int32 = 4, offset_x : Int32 = 0, offset_y : Int32 = 0, style : Symbol | Graphics::GridStylePreset | Graphics::GridGlyphs = :solid, fg : Color = Color.hex("#6272A4"), bg : Color = Color.none, intersection_fg : Color | Nil = Color.hex("#8BE9FD"), major_interval_x : Int32 | Nil = nil, major_interval_y : Int32 | Nil = nil, major_fg : Color | Nil = Color.hex("#BD93F9"), show_horizontal : Bool = true, show_vertical : Bool = true, show_coordinates : Bool = false, show_border : Bool = true, border_color : Color = Color.hex("#6272A4"), border_style : Symbol = :rounded, title : String | Nil = "Character Grid", width : Int32 | Nil = 30, height : Int32 | Nil = 12)
SourceInstance methods
bg
Sourcebg=(bg : Color)
Sourceborder_color
Sourceborder_color=(border_color : Color)
Sourceborder_style
Sourcecurrent_style
Sourcecurrent_style=(current_style : Graphics::GridStylePreset)
Sourcefg
Sourcefg=(fg : Color)
Sourceglyphs
Sourceglyphs=(glyphs : Graphics::GridGlyphs)
SourceDefault key event handler. Override in subclasses if not using @default_input_proc.
Default mouse event handler. Override in subclasses if not using @default_input_proc.
height
Sourceinitial_interval_x
Sourceinitial_interval_y
Sourceintersection_fg
Sourceintersection_fg=(intersection_fg : Color | Nil)
Sourceinterval_x
Sourceinterval_y
Sourcelast_h
Sourcelast_w
Sourcelast_x
Sourcelast_y
Sourcemajor_fg
Sourcemajor_fg=(major_fg : Color | Nil)
Sourcemajor_interval_x
Sourcemajor_interval_y
Sourceoffset_x
Sourceoffset_y
Sourceon_interval_change
Sourceon_style_change
Sourcerender(buffer : Buffer) : Nil
SourceChanges the active grid style preset
show_border?
Sourceshow_coordinates?
Sourceshow_horizontal?
Sourceshow_vertical?
Sourcetitle
Sourcewidth
Source