Opal::UI::CodeView
Inherits Opal::UI::Control < Opal::UI::InputHookable < Opal::UI::Element < Opal::UI::Themable < Reference < Object
Code and disassembly viewing element with line numbers, syntax highlighting, cursor indicator, and vertical scrolling.
Constructors
new(code : String = "", language : Symbol | String = :plain, start_line : Int32 = 1, highlighted_line : Int32 | Nil = nil, scroll_offset : Int32 = 0, show_line_numbers : Bool = true, gutter_fg : Color | Symbol | String | Nil = nil, cursor_fg : Color | Symbol | String | Nil = nil, cursor_indicator : String | Nil = nil, scrollable : Bool = true, auto_scroll : Bool = false, scroll_speed : Float64 = 1.0)
SourceClass methods
Instance methods
auto_scroll?
Sourcecode
Sourcecursor_fg
Sourcecursor_fg=(cursor_fg : Color | Nil)
Sourcecursor_indicator
Sourcegutter_fg
Sourcegutter_fg=(gutter_fg : Color | Nil)
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.
highlighted_line
Sourcelanguage
Sourcelines
SourcePreferred size in print mode: full line count
Render hook for print mode: resets scroll offset
scroll_offset
Sourcescroll_speed
Sourcescrollable?
Sourceshow_line_numbers?
Sourcestart_line
Source