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 so that the values are within screen bounds.


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

Returns [x,y] adjusted so that when added to the cursor's current position, the values are within screen bounds.


[View source]
def _ncoords #

Makes sure that the cursor position is within screen size by adjusting it if/when necessary.

The usual way to use this function is to set cursor position without any particular considerations for the boundaries, and then call #_ncoords to make sure the cursor is brought back into the screen if it was out of it.


[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]