module NCurses
Extended Modules
Defined in:
ncurses.crncurses/mouse_event.cr
ncurses/version.cr
ncurses/window.cr
Constant Summary
-
BORDER_DEFAULT =
0.chr
-
ERR =
-1
-
Possible integer result values
-
OK =
0
-
VERSION =
"0.0.7"
Instance Method Summary
-
#add_char(*args, **options)
Output
-
#add_char(*args, **options, &)
Output
-
#attr_get(*args, **options)
Attribute
-
#attr_get(*args, **options, &)
Attribute
-
#attr_off(*args, **options)
Attribute
-
#attr_off(*args, **options, &)
Attribute
- #attr_on(*args, **options)
- #attr_on(*args, **options, &)
-
#attribute_off(*args, **options)
Attribute
-
#attribute_off(*args, **options, &)
Attribute
- #attribute_on(*args, **options)
- #attribute_on(*args, **options, &)
-
#border(*args, **options)
Output
-
#border(*args, **options, &)
Output
-
#box(*args, **options)
Output
-
#box(*args, **options, &)
Output
-
#can_change_color?
Terminal allows setting custom RGB color values Wrapper for
can_change_color()
-
#cbreak
Disable buffering, key input is returned with no delay Wrapper for
#cbreak()
- #change_attribute(*args, **options)
- #change_attribute(*args, **options, &)
-
#change_background(*args, **options)
Background
-
#change_background(*args, **options, &)
Background
-
#change_color(slot, red, green, blue)
Alias for
#init_color
- #clear(*args, **options)
- #clear(*args, **options, &)
-
#clearok(*args, **options)
Output options
-
#clearok(*args, **options, &)
Output options
- #col(*args, **options)
- #col(*args, **options, &)
-
#cols(*args, **options)
General
-
#cols(*args, **options, &)
General
-
#disable_line_buffer
Alias for
#cbreak
-
#draw_bvline(*args, **options)
Output
-
#draw_bvline(*args, **options, &)
Output
-
#draw_hline(*args, **options)
Output
-
#draw_hline(*args, **options, &)
Output
-
#echo(option : Bool)
If echoing back to terminal should be enabled
-
#echo
Re-enable echoing of input back to console Wrapper for
#echo()
-
#enable_line_buffer
Alias for
#nocbreak
-
#end
End curses mode Wrapper for
endwin()
-
#flush_input
Clear (delete contents of) the input buffer Wrapper for
flushinp()
-
#get_attribute(*args, **options)
Attribute
-
#get_attribute(*args, **options, &)
Attribute
-
#get_background(*args, **options)
Background
-
#get_background(*args, **options, &)
Background
- #get_char(*args, **options)
- #get_char(*args, **options, &)
-
#get_mouse
Should only be called if
#get_char
returnedKey::Mouse
-
#has_colors?
Terminal supports colors Wrapper for
has_colors()
-
#has_mouse
If the terminal has mouse support Wrapper for
#has_mouse()
-
#height(*args, **options)
General
-
#height(*args, **options, &)
General
-
#idcok(*args, **options)
Output options
-
#idcok(*args, **options, &)
Output options
-
#idlok(*args, **options)
Output options
-
#idlok(*args, **options, &)
Output options
-
#immedok(*args, **options)
Output options
-
#immedok(*args, **options, &)
Output options
-
#init_color(slot, red, green, blue)
Change the RGB values of the color Between 0 and 1000
crystal change_color Color::Red, 0, 0, 1000 # => Color::Red will now appear blue
-
#init_color_pair(slot, foreground : Color, background : Color)
Create a color pair to use Pass an integer for id of the pair in the slot Pass a
Color
for both the foreground and then backgroundcrystal init_color_pair 5, Color::Red, Color::Blue # => Color pair 5 is not red on black
Wrapper forinit_pair()
-
#keypad(*args, **options)
Input
-
#keypad(*args, **options, &)
Input
-
#leaveok(*args, **options)
Output options
-
#leaveok(*args, **options, &)
Output options
-
#line_buffer(option)
If input should be buffered to new lines Enable if true, disable if false
-
#lines(*args, **options)
General
-
#lines(*args, **options, &)
General
- #max_dimensions(*args, **options)
- #max_dimensions(*args, **options, &)
- #max_dimensions_named(*args, **options)
- #max_dimensions_named(*args, **options, &)
-
#max_x(*args, **options)
General
-
#max_x(*args, **options, &)
General
-
#max_y(*args, **options)
General
-
#max_y(*args, **options, &)
General
-
#mouse_mask(new_mask : Mouse)
Sets the mouse events that should be returned Should be given a
Mouse
enum - #move(*args, **options)
- #move(*args, **options, &)
-
#new_term(terminal, out_io, in_io)
Unknown functionality Wrpper for
newterm()
-
#nl
Wrapper for
#nl()
-
#no_border(*args, **options)
Output
-
#no_border(*args, **options, &)
Output
-
#no_box(*args, **options)
Output
-
#no_box(*args, **options, &)
Output
-
#no_delay(*args, **options)
Input
-
#no_delay(*args, **options, &)
Input
-
#no_echo
Do not echo back to the console Wrapper for
noecho()
-
#no_raw
Re-enable buffering of input and signals Wrapper for
noraw()
-
#no_timeout(*args, **options)
Input
-
#no_timeout(*args, **options, &)
Input
-
#nocbreak
Re-enable buffering until new line Wrapper for
#nocbreak()
-
#nonl
Wrapper for
#nonl()
- #pos(*args, **options)
- #pos(*args, **options, &)
- #pos_named(*args, **options)
- #pos_named(*args, **options, &)
- #position(*args, **options)
- #position(*args, **options, &)
- #position_named(*args, **options)
- #position_named(*args, **options, &)
-
#print(*args, **options)
Output
-
#print(*args, **options, &)
Output
-
#raw(option)
If buffering should be disabled for input and signals
-
#raw
Disable buffering of input and signals
#cbreak
but also passes signals TODO: Implement signals? - #refresh(*args, **options)
- #refresh(*args, **options, &)
- #row(*args, **options)
- #row(*args, **options, &)
-
#scrollok(*args, **options)
Output options
-
#scrollok(*args, **options, &)
Output options
- #set_attr(*args, **options)
- #set_attr(*args, **options, &)
- #set_attribute(*args, **options)
- #set_attribute(*args, **options, &)
-
#set_background(*args, **options)
Background
-
#set_background(*args, **options, &)
Background
-
#set_color(*args, **options)
Attribute
-
#set_color(*args, **options, &)
Attribute
-
#set_cursor(visibility : Cursor)
Set the cursor state Use
Cursor
enum Wrapper forcurs_set()
- #set_pos(*args, **options)
- #set_pos(*args, **options, &)
-
#setscrreg(*args, **options)
Output options
-
#setscrreg(*args, **options, &)
Output options
-
#start
Start curses mode Wrapper for
initscr()
-
#start_color
Start color support Wrapper for
#start_color()
-
#stdscr
Get stdscr May remove due to delegateing
-
#term=(screen)
Unknown functionality Wrapper for
set_term()
-
#timeout(*args, **options)
Input
-
#timeout(*args, **options, &)
Input
-
#width(*args, **options)
General
-
#width(*args, **options, &)
General
- #with_attr(*args, **options)
- #with_attr(*args, **options, &)
- #with_attribute(*args, **options)
- #with_attribute(*args, **options, &)
- #x(*args, **options)
- #x(*args, **options, &)
- #y(*args, **options)
- #y(*args, **options, &)
Instance Method Detail
Terminal allows setting custom RGB color values
Wrapper for can_change_color()
Should only be called if #get_char
returned Key::Mouse
Returns a MouseEvent
containing the mouse state and coordinates
Wrapper for getmouse()
Change the RGB values of the color Between 0 and 1000
change_color Color::Red, 0, 0, 1000 # => Color::Red will now appear blue
Create a color pair to use
Pass an integer for id of the pair in the slot
Pass a Color
for both the foreground and then background
init_color_pair 5, Color::Red, Color::Blue # => Color pair 5 is not red on black
Wrapper for init_pair()
Sets the mouse events that should be returned
Should be given a Mouse
enum
Disable buffering of input and signals
#cbreak
but also passes signals
TODO Implement signals?
Set the cursor state
Use Cursor
enum
Wrapper for curs_set()