class Crysterm::Widget::Menu

Defined in:

widget/menu.cr

Constructors

Instance Method Summary

Instance methods inherited from class Crysterm::Widget

_align(line, width, align = Tput::AlignFlag::None, align_left_too = false) _align, _clines : Crysterm::Widget::CLines _clines, _clines=(_clines : Crysterm::Widget::CLines) _clines=, _get_coords(get = false, noscroll = false) _get_coords, _is_list : Bool _is_list, _is_list=(_is_list : Bool) _is_list=, _label : Widget | Nil _label, _label! _label!, _label=(_label : Widget | Nil) _label=, _minimal_children_rectangle(xi, xl, yi, yl, get) _minimal_children_rectangle, _minimal_content_rectangle(xi, xl, yi, yl) _minimal_content_rectangle, _minimal_rectangle(xi, xl, yi, yl, get) _minimal_rectangle, _parse_attr(lines : CLines) _parse_attr, _parse_tags(text) _parse_tags, _pcontent : String | Nil _pcontent, _pcontent=(_pcontent : String | Nil) _pcontent=, _recalculate_index _recalculate_index, _render(with_children = true) _render, _scroll_bottom _scroll_bottom, _wrap_content(content, colwidth) _wrap_content, abottom(get = false) abottom, aheight(get = false) aheight, aleft(get = false) aleft, align : Tput::AlignFlag align, align=(align : Tput::AlignFlag) align=, always_scroll=(always_scroll : Bool) always_scroll=, always_scroll? : Bool always_scroll?, aright(get = false) aright, atop(get = false) atop, awidth(get = false) awidth, back! back!, base_limit : Int32 base_limit, base_limit=(base_limit : Int32) base_limit=, border_char(border, x, xi, xl, y, yi, yl, default_attr) border_char, bottom : Int32 | Nil bottom, bottom=(val : Int32 | Nil) bottom=, child_base : Int32 child_base, child_base=(child_base : Int32) child_base=, child_offset : Int32 child_offset, child_offset=(child_offset : Int32) child_offset=, clear_base_line(i) clear_base_line, clear_last_rendered_position(get = false, override = false) clear_last_rendered_position, clear_line(i) clear_line, clickable=(clickable : Bool) clickable=, clickable? : Bool clickable?, content : String content, content=(content) content=, delete_bottom(n) delete_bottom, delete_line(i = nil, n = 1) delete_line, delete_top(n = 1) delete_top, destroy destroy, determine_screen determine_screen, disable_drag disable_drag, draggable=(draggable : Bool)
draggable=(draggable : Bool)
draggable=
, draggable? : Bool? draggable?, enable_drag(x) enable_drag, focus focus, focus_on_click=(focus_on_click : Bool) focus_on_click=, focus_on_click? : Bool focus_on_click?, focused? focused?, front! front!, get_baseline(i) get_baseline, get_content get_content, get_line(i) get_line, get_lines get_lines, get_screen_lines get_screen_lines, get_scroll get_scroll, get_scroll_height get_scroll_height, get_scroll_perc(s) get_scroll_perc, get_text get_text, height : Int32 | String | Nil height, height=(val : Int32 | String | Nil) height=, hide hide, ibottom ibottom, ignore_keys=(ignore_keys : Bool) ignore_keys=, ignore_keys? : Bool ignore_keys?, iheight iheight, ileft ileft, index : Int32 index, index=(index : Int32) index=, input=(input : Bool) input=, input? : Bool input?, insert(element, i = -1) insert, insert_bottom(line) insert_bottom, insert_line(i = nil, line = "") insert_line, insert_top(line) insert_top, interactive=(interactive : Bool) interactive=, interactive? : Bool interactive?, iright iright, items : Array(Crysterm::Widget::Box) items, items=(items : Array(Crysterm::Widget::Box)) items=, itop itop, iwidth iwidth, keyable=(keyable : Bool) keyable=, keyable? : Bool keyable?, keys=(keys : Bool) keys=, keys? : Bool keys?, label=(text : String | Nil) label=, last_rendered_position last_rendered_position, left : Int32 | String | Nil left, left=(val : Int32 | String | Nil) left=, overflow : Crysterm::Overflow overflow, overflow=(overflow : Crysterm::Overflow) overflow=, parent : Widget | Nil parent, parent=(parent : Widget | Nil) parent=, parent_or_screen parent_or_screen, parse_tags=(parse_tags : Bool) parse_tags=, parse_tags? : Bool parse_tags?, pop_line(n) pop_line, process_content(no_tags = false) process_content, push_line(line) push_line, rbottom rbottom, really_scrollable? really_scrollable?, remove(element) remove, remove_from_parent remove_from_parent, remove_hover remove_hover, remove_label remove_label, render(with_children = true) render, reposition_label(event = nil) reposition_label, reset_scroll reset_scroll, resizable=(resizable : Bool) resizable=, resizable? : Bool resizable?, right : Int32 | Nil right, right=(val : Int32 | Nil) right=, rleft rleft, rright rright, rtop rtop, sattr(style, fg = nil, bg = nil) sattr, screen : Crysterm::Screen | Nil screen, screen=(screen : Crysterm::Screen | Nil) screen=, screen? : Crysterm::Screen? screen?, screenshot(xi = nil, xl = nil, yi = nil, yl = nil) screenshot, scroll(offset = 1, always = false) scroll, scroll_to(offset, always = false) scroll_to, scrollable=(scrollable : Bool) scrollable=, scrollable? : Bool scrollable?, scrollbar=(scrollbar : Bool) scrollbar=, scrollbar? : Bool scrollbar?, set_baseline(i, line) set_baseline, set_content(content : String = "", no_clear = false, no_tags = false) set_content, set_hover(hover_text) set_hover, set_index(index : Int) set_index, set_label(text : String, side = "left") set_label, set_line(i, line) set_line, set_scroll_perc(i) set_scroll_perc, set_text(content = "", no_clear = false) set_text, shift_line(n) shift_line, show show, snapshot(include_decorations = true, dxi = 0, dxl = 0, dyi = 0, dyl = 0) snapshot, str_width(text) str_width, toggle_visibility toggle_visibility, top : Int32 | String | Nil top, top=(val : Int32 | String | Nil) top=, track=(track : Bool) track=, track? : Bool track?, unshift_line(line) unshift_line, vi=(vi : Bool) vi=, vi? : Bool vi?, visible? visible?, width : Int32 | String | Nil width, width=(val : Int32 | String | Nil) width=, wrap_content=(wrap_content : Bool) wrap_content=, wrap_content? : Bool wrap_content?

Constructor methods inherited from class Crysterm::Widget

new(parent = nil, *, name : Nil | String = @name, screen : Nil | Crysterm::Screen = @screen, left : Int32 | String | Nil = @left, top : Int32 | String | Nil = @top, right : Int32 | Nil = @right, bottom : Int32 | Nil = @bottom, width : Int32 | String | Nil = @width, height : Int32 | String | Nil = @height, resizable : Bool = @resizable, visible = nil, fixed : Bool = @fixed, align : Tput::Namespace::AlignFlag = @align, overflow : Crysterm::Overflow = @overflow, scrollbar : Bool = @scrollbar, track : Bool = @track, content = "", parse_tags : Bool = @parse_tags, wrap_content : Bool = @wrap_content, label = nil, hover_text = nil, scrollable = nil, always_scroll : Bool = @always_scroll, draggable : Bool = @draggable, focused = false, focus_on_click : Bool = @focus_on_click, keys : Bool = @keys, vi : Bool = @vi, input = nil, style = nil, styles : Crysterm::Styles = @styles, index : Int32 = -1, children = [] of Widget) new

Class methods inherited from class Crysterm::Widget

sattr(style, fg = nil, bg = nil) sattr

Instance methods inherited from module Crysterm::Mixin::Data

data : YAML::Any | Nil data, data=(data : YAML::Any | Nil) data=

Instance methods inherited from module Crysterm::Mixin::Style

state state, state=(state) state=, style : Crysterm::Style style, style=(style : Crysterm::Style | Nil) style=, styles : Crysterm::Styles styles, styles=(styles : Crysterm::Styles) styles=

Instance methods inherited from module Crysterm::Mixin::Pos

abottom : Int32 | Nil abottom, abottom=(abottom : Int32 | Nil) abottom=, aleft : Int32 | Nil aleft, aleft=(aleft : Int32 | Nil) aleft=, aright : Int32 | Nil aright, aright=(aright : Int32 | Nil) aright=, atop : Int32 | Nil atop, atop=(atop : Int32 | Nil) atop=, lpos : LPos | Nil lpos, lpos=(lpos : LPos | Nil) lpos=, renders renders, renders=(renders) renders=, scrollable=(scrollable) scrollable=, scrollable? scrollable?

Instance methods inherited from module Crysterm::Mixin::Uid

uid : Int32 uid, uid=(uid : Int32) uid=

Class methods inherited from module Crysterm::Mixin::Uid

next_uid : Int32 next_uid

Instance methods inherited from module Crysterm::Mixin::Name

name : String | Nil name, name=(name : String | Nil) name=

Macros inherited from module Crysterm::Macros

alias_method(new_method, old_method) alias_method, alias_previous(*new_methods) alias_previous, handle(event, handler = nil) handle

Instance methods inherited from module Crysterm::Helpers

asort(obj) asort, clean_tags(text) clean_tags, drop_unicode(text) drop_unicode, escape(text) escape, find_file(start, target) find_file, hsort(obj) hsort, strip_tags(text : String) strip_tags

Instance methods inherited from module Crysterm::Mixin::Children

<<(widget : Widget) <<, >>(widget : Widget) >>, append(element)
append(*elements)
append
, children children, collect_ancestors(el : Widget) : Array(Widget) collect_ancestors, collect_descendants(el : Widget) : Array(Widget) collect_descendants, each_ancestor(&block : Proc(Widget, Nil)) : Nil each_ancestor, each_descendant(&block : Proc(Widget, Nil)) : Nil each_descendant, emit_ancestors(ev : EventHandler::Event | EventHandler::Event.class) : Nil emit_ancestors, emit_descendants(ev : EventHandler::Event | EventHandler::Event.class) : Nil emit_descendants, has_ancestor?(obj) has_ancestor?, has_descendant?(obj) has_descendant?, insert(element, i = -1) insert, insert_after(element, other) insert_after, insert_before(element, other) insert_before, prepend(element) prepend, remove(element) remove, self_and_each_ancestor(&block : Proc(Widget, Nil)) : Nil self_and_each_ancestor, self_and_each_descendant(&block : Proc(Widget, Nil)) : Nil self_and_each_descendant

Constructor Detail

def self.new(title : String, **widget) #

[View source]
def self.new(**widget) #

[View source]

Instance Method Detail

def <<(action : Action) #

[View source]
def >>(action : Action) #

[View source]
def actions : Array(Crysterm::Action) #

[View source]
def actions=(actions : Array(Crysterm::Action)) #

[View source]
def title : String #

[View source]
def title=(title : String) #

[View source]