module Tput::Coordinates

Overview

Collection of methods related to coordinates within the terminal screen.

Included Modules

Direct including types

Defined in:

tput/coordinates.cr

Constant Summary

Log = ::Log.for((self.name.gsub("::", '.')).underscore)

Instance Method Summary

Instance Method Detail

def _adjust_xy_abs(x = 0, y = 0) #

Returns [x,y] adjusted to within screen bounds.


[View source]
def _adjust_xy_rel(x = 0, y = 0) #

Returns [x,y] adjusted so that, added to the cursor's position, the result stays within screen bounds.


[View source]
def _ncoords #

Clamps @cursor to screen bounds.

Typical usage: set cursor position without worrying about bounds, then call #_ncoords to bring it back into the screen if needed.


[View source]
def get_screen_size #

Gets terminal/screen size as number of columns and rows.


[View source]
def reset_screen_size #

Gets terminal/screen size and resets the values in memory to the discovered dimensions.


[View source]