Sha256: 37178190bcf319920d679c7ebccbf174e2556bf98425fc4c9fcf32dd79f65a96

Contents?: true

Size: 750 Bytes

Versions: 2

Compression:

Stored size: 750 Bytes

Contents

# frozen_string_literal: true

module RubyJard
  ##
  # A screen is a unit of information drawing on the terminal. Each screen is
  # generated based on input layout specifiation, screen data, and top-left
  # corner cordination.
  class Screen
    attr_accessor :layout, :rows, :window, :cursor, :selected

    def initialize(layout, session: nil)
      @session = session || RubyJard::Session
      @layout = layout
      @window = []
      @cursor = nil
      @selected = 0
      @rows = []
    end

    def move_down; end

    def move_up; end

    def page_up; end

    def page_down; end

    def click(relative_x, relative_y); end

    def build
      raise NotImplementedError, "#{self.class} should implement this method."
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ruby_jard-0.3.1 lib/ruby_jard/screen.rb
ruby_jard-0.3.0 lib/ruby_jard/screen.rb