Module: WindowBlessing

Extended by:
Tools
Defined in:
lib/window_blessing/buffer.rb,
lib/window_blessing.rb,
lib/window_blessing/color.rb,
lib/window_blessing/tools.rb,
lib/window_blessing/window.rb,
lib/window_blessing/evented.rb,
lib/window_blessing/version.rb,
lib/window_blessing/constants.rb,
lib/window_blessing/xterm_log.rb,
lib/window_blessing/event_queue.rb,
lib/window_blessing/xterm_input.rb,
lib/window_blessing/xterm_state.rb,
lib/window_blessing/xterm_output.rb,
lib/window_blessing/xterm_screen.rb,
lib/window_blessing/event_manager.rb,
lib/window_blessing/widgets/label.rb,
lib/window_blessing/widgets/slider.rb,
lib/window_blessing/buffered_screen.rb,
lib/window_blessing/windowed_screen.rb,
lib/window_blessing/evented_variable.rb,
lib/window_blessing/widgets/text_field.rb,
lib/window_blessing/xterm_event_parser.rb,
lib/window_blessing/window_redraw_areas.rb,
lib/window_blessing/widgets/draggable_background.rb,
lib/window_blessing/debug_tools/log_request_redraw_internal.rb

Overview

Defined Under Namespace

Modules: DebugTools, Evented, Tools, Widgets Classes: Buffer, BufferedScreen, Color, EventManager, EventQueue, EventedVariable, Window, WindowRedrawAreas, WindowedScreen, XtermEventParser, XtermInput, XtermLog, XtermOutput, XtermScreen, XtermState

Constant Summary collapse

VERSION =
"0.0.4"
SMALLEST_FLOAT_DELTA =
0.000000001

Class Method Summary collapse

Methods included from Tools

buffer, clone_value, color, fill_line, gen_array2d, gray_screen_color, log, overlapping_span, overlay2d, overlay_span, range_length, resize2d, rgb_screen_color, subarray2d, window

Class Method Details

.main(&block) ⇒ Object



43
44
45
46
47
48
49
50
51
52
# File 'lib/window_blessing.rb', line 43

def main(&block)
  main_window = Window.new
  Screen.new.open do
    instance_exec(main_window, &block)
    on_tick do
      main_window.area = rect(screen_buffer.size)
      main_window.draw screen_buffer
    end
  end
end