class HandyToolbox::Ui
Public Class Methods
attr_off(value)
click to toggle source
# File lib/handy_toolbox/ui.rb, line 76 def self.attr_off(value) Curses.attroff(value) end
attr_on(value)
click to toggle source
# File lib/handy_toolbox/ui.rb, line 72 def self.attr_on(value) Curses.attron(value) end
bold(condition = true) { || ... }
click to toggle source
# File lib/handy_toolbox/ui.rb, line 62 def self.bold(condition = true) bold_on if condition yield bold_off if condition end
bold_off()
click to toggle source
# File lib/handy_toolbox/ui.rb, line 58 def self.bold_off attr_off Curses::A_BOLD end
bold_on()
click to toggle source
# File lib/handy_toolbox/ui.rb, line 54 def self.bold_on attr_on Curses::A_BOLD end
dim(condition = true) { || ... }
click to toggle source
# File lib/handy_toolbox/ui.rb, line 48 def self.dim(condition = true) dim_on if condition yield dim_off if condition end
dim_off()
click to toggle source
# File lib/handy_toolbox/ui.rb, line 44 def self.dim_off attr_off Curses::A_DIM end
dim_on()
click to toggle source
# File lib/handy_toolbox/ui.rb, line 40 def self.dim_on attr_on Curses::A_DIM end
hide_cursor()
click to toggle source
# File lib/handy_toolbox/ui.rb, line 68 def self.hide_cursor Curses.curs_set(0) end
highlight(condition = true) { || ... }
click to toggle source
# File lib/handy_toolbox/ui.rb, line 28 def self.highlight(condition = true) highlight_on if condition yield highlight_off if condition end
highlight_off()
click to toggle source
# File lib/handy_toolbox/ui.rb, line 24 def self.highlight_off attr_off Curses::A_STANDOUT end
highlight_on()
click to toggle source
# File lib/handy_toolbox/ui.rb, line 20 def self.highlight_on attr_on Curses::A_STANDOUT end
pos(x, y)
click to toggle source
# File lib/handy_toolbox/ui.rb, line 7 def self.pos(x, y) Curses.setpos(y, x) end
reverse() { || ... }
click to toggle source
# File lib/handy_toolbox/ui.rb, line 34 def self.reverse attr_on Curses::A_REVERSE yield attr_off Curses::A_REVERSE end
scroll_by(val)
click to toggle source
# File lib/handy_toolbox/ui.rb, line 80 def self.scroll_by(val) Curses.scrl(val) end
text(str)
click to toggle source
# File lib/handy_toolbox/ui.rb, line 11 def self.text(str) Curses.addstr(str) end
text_at(x, y, str)
click to toggle source
# File lib/handy_toolbox/ui.rb, line 15 def self.text_at(x, y, str) pos(x, y) text(str) end