module Tput::Coordinates
Overview
Collection of methods related to coordinates within the terminal screen.
Included Modules
- Crystallabs::Helpers::Logging
Direct including types
Defined in:
tput/coordinates.crConstant Summary
-
Log =
::Log.for((self.name.gsub("::", '.')).underscore)
Instance Method Summary
-
#_adjust_xy_abs(x = 0, y = 0)
Returns [x,y] adjusted so that the values are within screen bounds.
-
#_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.
-
#_ncoords
Makes sure that the cursor position is within screen size by adjusting it if/when necessary.
-
#get_screen_size
Gets terminal/screen size as number of columns and rows.
-
#reset_screen_size
Gets terminal/screen size and resets the values in memory to the discovered dimensions.
Instance Method Detail
Returns [x,y] adjusted so that the values are within screen bounds.
Returns [x,y] adjusted so that when added to the cursor's current position, the values are within screen bounds.
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.
Gets terminal/screen size and resets the values in memory to the discovered dimensions.