view2.rb

Path: curses/view2.rb
Last Update: Sun Jun 01 17:53:16 -0500 2008

Required files

curses  

Methods

Public Instance methods

[Source]

# File curses/view2.rb, line 57
def scroll_down
  if( $top + $screen.maxy < $data_lines.length )
    $screen.scrl(1)
    $top += 1
    str = $data_lines[$top + $screen.maxy - 1]
    if( str )
      $screen.setpos($screen.maxy - 1, 0)
      $screen.addstr(str)
    end
    return true
  else
    return false
  end
end

[Source]

# File curses/view2.rb, line 42
def scroll_up
  if( $top > 0 )
    $screen.scrl(-1)
    $top -= 1
    str = $data_lines[$top]
    if( str )
      $screen.setpos(0, 0)
      $screen.addstr(str)
    end
    return true
  else
    return false
  end
end

[Validate]

ruby-doc.org is a service of James Britt and Happy Camper Studios, a Ruby application development company in Phoenix, AZ.

Documentation content on ruby-doc.org is provided by remarkable members of the Ruby community.

For more information on the Ruby programming language, visit ruby-lang.org.

Want to help improve Ruby's API docs? See Ruby Documentation Guidelines.