class NCURSES_WINDOW
Summary
One window in the NCURSES world.
The current position of the cursor is given by cursor_x and cursor_y.
Direct parents
Inherit list: NCURSES_WIDGET
Known children
Inherit list: NCURSES_LABEL, NCURSES_PAD, NCURSES_PANELTAB
Class invariant
Overview
Creation features
{ANY}
{NCURSES_WINDOW}
{NCURSES}
Features
Writing:
{ANY}
Cursor:
{ANY}
Size and position:
{ANY}
{ANY}
{NCURSES_WIDGET}
{ANY}
{NCURSES_WINDOW}
{NCURSES_WINDOW, NCURSES_PAD}
{}
Below are plug_in connections to the curses library.
{}
{ANY}
{NCURSES_WIDGET}
{}
{ANY}
{ANY}
{}
{}
{}
put_character_at (character: CHARACTER, x: INTEGER_32, y: INTEGER_32)
effective procedure
{ANY}
Put character at cursor position x, y.
The cursor is left, just after the character.
See also put_character, cursor_x, cursor_y.
require
put_character (character: CHARACTER)
effective procedure
{ANY}
Put character at cursor_x, cursor_y.
The cursor is left, just after the character.
See also put_character_at.
require
put_string_at (string: STRING, x: INTEGER_32, y: INTEGER_32)
effective procedure
{ANY}
Put the string at cursor position x, y.
The cursor is left, just after the string.
See also put_string, cursor_x, cursor_y.
require
put_string (string: STRING)
effective procedure
{ANY}
Put the string at cursor_x, cursor_y.
The cursor is left, just after the string.
See also put_string_at.
require
put_integer_at (integer: INTEGER_64, x: INTEGER_32, y: INTEGER_32)
effective procedure
{ANY}
Put the integer at cursor position x, y.
The cursor is left, just after the integer.
See also put_integer, cursor_x, cursor_y.
require
put_integer (integer: INTEGER_64)
effective procedure
{ANY}
Put the integer at cursor_x, cursor_y.
The cursor is left, just after the integer.
See also put_integer_at.
require
cursor_x: INTEGER_32
effective function
{ANY}
X coordinate of the cursor (left-most column is 0).
See also cursor_y.
require ensure
valid_cursor_x (x: INTEGER_32): BOOLEAN
effective function
{ANY}
Is y a valid line for the cursor position?
ensure
  • definition: Result = x.in_range(0, width - 1)
cursor_y: INTEGER_32
effective function
{ANY}
Y coordinate of the cursor (upper-most line is 0).
See also cursor_x.
require ensure
  • Result >= 0
valid_cursor_y (y: INTEGER_32): BOOLEAN
effective function
{ANY}
Is y a valid line for the cursor position?
ensure
  • definition: Result = y.in_range(0, height - 1)
set_cursor (x: INTEGER_32, y: INTEGER_32)
effective procedure
{ANY}
require ensure
valid_cursor (x: INTEGER_32, y: INTEGER_32): BOOLEAN
effective function
{ANY}
Is x and y a valid cursor position?
ensure
width: INTEGER_32
effective function
{ANY}
The number of columns.
require
  • ncurses.is_enabled
ensure
  • Result > 0
height: INTEGER_32
effective function
{ANY}
The number of lines.
require
  • ncurses.is_enabled
ensure
  • Result > 0
left: INTEGER_32
effective function
{ANY}
???
See also top, move_to.
require
  • ncurses.is_enabled
effective function
{ANY}
???
See also left, move_to.
require
  • ncurses.is_enabled
move_to_and_resize (x: INTEGER_32, y: INTEGER_32, w: INTEGER_32, h: INTEGER_32)
effective procedure
{ANY}
require ensure
resize (w: INTEGER_32, h: INTEGER_32)
effective procedure
{ANY}
require ensure
move_to (x: INTEGER_32, y: INTEGER_32)
effective procedure
{ANY}
Moves the window relatively to its parent
See also left, top.
require ensure
create_sub_window (x: INTEGER_32, y: INTEGER_32, columns: INTEGER_32, lines: INTEGER_32): NCURSES_WINDOW
effective function
{ANY}
Creates a child window
require
set_attribute (an_attribute: INTEGER_32)
effective procedure
{ANY}
C'EST QUOI UN ATTRIBUTE ??? This attribute will be set for further writes.
require
unset_attribute (an_attribute: INTEGER_32)
effective procedure
{ANY}
This attribute will be unset for further writes.
require
set_background_character (character: INTEGER_32)
effective procedure
{ANY}
require
set_background_attribute (an_attribute: INTEGER_32)
effective procedure
{ANY}
This attribute affects the current background.
require
get_background_character: INTEGER_32
writable attribute
{ANY}
get_background_attribute: INTEGER_32
writable attribute
{ANY}
draw_any_border (left_border: INTEGER_32, right_border: INTEGER_32, top_border: INTEGER_32, bottom_border: INTEGER_32, upper_left_border: INTEGER_32, upper_right_border: INTEGER_32, lower_left_border: INTEGER_32, lower_right_border: INTEGER_32)
effective procedure
{ANY}
Draws any kind of border.
require
draw_border
effective procedure
{ANY}
Draws common single-line border.
draw_horizontal_line (x: INTEGER_32, y: INTEGER_32, character: INTEGER_32, size: INTEGER_32)
effective procedure
{ANY}
require
draw_vertical_line (x: INTEGER_32, y: INTEGER_32, character: INTEGER_32, size: INTEGER_32)
effective procedure
{ANY}
require
clear
effective procedure
{ANY}
Clear the whole window and reset the cursor at 0 0 (upper-left corner).
require
clear_to_bottom
effective procedure
{ANY}
Clears from cursor to the bottom of the window.
require
clear_to_end_of_line
effective procedure
{ANY}
Clears from cursor to the end of the line.
require
delete_character
effective procedure
{ANY}
require
delete_character_at (x: INTEGER_32, y: INTEGER_32)
effective procedure
{ANY}
All characters to the right of the position are moved one position to the left.
require
delete_lines_below (lines: INTEGER_32)
effective procedure
{ANY}
Inserts lines below the cursor's line.
The lines bottom lines are clears.
require
insert_lines_above (lines: INTEGER_32)
effective procedure
{ANY}
Inserts lines above the cursor's line.
The lines bottom lines are lost.
require
wait_keypress_and_echo_at (x: INTEGER_32, y: INTEGER_32): INTEGER_32
effective function
{ANY}
require
wait_keypress: INTEGER_32
effective function
{ANY}
last_keypress: INTEGER_32
writable attribute
{ANY}
poll_keypress_for_and_echo_at (delay: INTEGER_32, x: INTEGER_32, y: INTEGER_32): BOOLEAN
effective function
{ANY}
require
poll_keypress_for (delay: INTEGER_32): BOOLEAN
effective function
{ANY}
poll_keypress: BOOLEAN
effective function
{ANY}
poll_keypress_and_echo_at (x: INTEGER_32, y: INTEGER_32): BOOLEAN
effective function
{ANY}
read_string_and_echo_at (size: INTEGER_32, x: INTEGER_32, y: INTEGER_32): STRING
effective function
{ANY}
Reads size-specific string from keyboard.
require
read_string (size: INTEGER_32): STRING
effective function
{ANY}
Reads size-specific string from keyboard.
auto_refresh (enable: BOOLEAN)
effective procedure
{ANY}
Automatically refreshes the window at every write.
This *really* slows things down.
See also refresh_later, refresh_now.
require
refresh_later
effective procedure
{ANY}
Defers the refreshing until NCURSES.refresh_pending or refresh_now is called.
See also auto_refresh, refresh_now.
require
get_character_at (x: INTEGER_32, y: INTEGER_32): INTEGER_32
effective function
{ANY}
Reads window content.
require
get_character: INTEGER_32
effective function
{ANY}
get_attributes_at (x: INTEGER_32, y: INTEGER_32): INTEGER_32
effective function
{ANY}
Reads window content.
require
get_attributes: INTEGER_32
effective function
{ANY}
get_color_at (x: INTEGER_32, y: INTEGER_32): INTEGER_32
effective function
{ANY}
Reads window content.
require
get_color: INTEGER_32
effective function
{ANY}
change_character_at (ch: INTEGER_32, x: INTEGER_32, y: INTEGER_32)
effective procedure
{ANY}
Change ch at cursor position x, y.
The cursor is left, just after the ch.
See also put_character, cursor_x, cursor_y.
require
change_character (ch: INTEGER_32)
effective procedure
{ANY}
Put ch at cursor_x, cursor_y.
The cursor is left, just after the ch.
See also change_character_at.
require
insert_character_at (ch: INTEGER_32, x: INTEGER_32, y: INTEGER_32)
effective procedure
{ANY}
All characters to the right are moved one position to the right.
The rightmost character is lost.
require
insert_character (ch: INTEGER_32)
effective procedure
{ANY}
insert_string_at (string: STRING, x: INTEGER_32, y: INTEGER_32)
effective procedure
{ANY}
All characters to the right are shifted right.
Rightmost characters are lost.
require
insert_string (string: STRING)
effective procedure
{ANY}
get_string_at (size: INTEGER_32, x: INTEGER_32, y: INTEGER_32): STRING
effective function
{ANY}
Reads string content.
require
get_string (size: INTEGER_32): STRING
effective function
{ANY}
set_autoscroll_policy (enable: BOOLEAN)
effective procedure
{ANY}
Enables/disables automatic scrolling.
require
get_autoscroll_policy: BOOLEAN
writable attribute
{ANY}
scroll_up (lines: INTEGER_32)
effective procedure
{ANY}
require
scroll_down (lines: INTEGER_32)
effective procedure
{ANY}
require
set_scrolling_region (s: INTEGER_32, e: INTEGER_32)
effective procedure
{ANY}
Select the scrolling region.
require
set_synchronize_policy (enable: BOOLEAN)
effective procedure
{ANY}
Enables/disables automatic synchronizing.
require
synchronize_parents_window
effective procedure
{ANY}
Touches all locations in ancestors that are changed in the current window
require
synchronize_parents_cursor
effective procedure
{ANY}
Updates the cursor position of all ancestors to the current cursor position.
require
get_window: NCURSES_WINDOW
effective function
parent_resized
effective procedure
require
  • ncurses.is_enabled
delete
effective procedure
set_default_colors
effective procedure
{ANY}
set_both_colors (fg: INTEGER_32, bg: INTEGER_32)
effective procedure
{ANY}
set_fg_color (fg: INTEGER_32)
effective procedure
{ANY}
set_bg_color (bg: INTEGER_32)
effective procedure
{ANY}
get_fg_color: INTEGER_32
writable attribute
{ANY}
get_bg_color: INTEGER_32
writable attribute
{ANY}
set_widget (w: POINTER)
effective procedure
require
  • w.is_not_null
ensure
widget: POINTER
writable attribute
disposed: BOOLEAN
writable attribute
{}
make (x: INTEGER_32, y: INTEGER_32, columns: INTEGER_32, lines: INTEGER_32)
effective procedure
{}
require
make_sub_window (w: NCURSES_WINDOW, x: INTEGER_32, y: INTEGER_32, columns: INTEGER_32, lines: INTEGER_32)
effective procedure
{}
require
make_root_window (w: POINTER)
effective procedure
{}
This constructor is meant to be called once by NCURSE.start_ncurses.
require
init
effective procedure
{}
set_keypad
effective procedure
{}
Activates special "function" keys detection.
require
cursor_can_move: BOOLEAN
is False
constant attribute
{}
will be True for text entry widgets
newwin (lines: INTEGER_32, columns: INTEGER_32, y: INTEGER_32, x: INTEGER_32): POINTER
{}
delwin (win: POINTER): INTEGER_32
{}
mvwin (win: POINTER, y: INTEGER_32, x: INTEGER_32): INTEGER_32
{}
mvderwin (win: POINTER, y: INTEGER_32, x: INTEGER_32): INTEGER_32
{}
derwin (win: POINTER, lines: INTEGER_32, columns: INTEGER_32, y: INTEGER_32, x: INTEGER_32): POINTER
{}
touchwin (win: POINTER)
{}
mvwaddch (win: POINTER, y: INTEGER_32, x: INTEGER_32, ch: INTEGER_32): INTEGER_32
{}
mvwaddstr (win: POINTER, y: INTEGER_32, x: INTEGER_32, str: POINTER): INTEGER_32
{}
wattron (win: POINTER, attrs: INTEGER_32): INTEGER_32
{}
wattroff (win: POINTER, attrs: INTEGER_32): INTEGER_32
{}
wbkgd (win: POINTER, ch: INTEGER_32): INTEGER_32
{}
wgetwidth (win: POINTER): INTEGER_32
{}
wgetheight (win: POINTER): INTEGER_32
{}
wclear (win: POINTER): INTEGER_32
{}
wclrtobot (win: POINTER): INTEGER_32
{}
wclrtoeol (win: POINTER): INTEGER_32
{}
wdelch (win: POINTER): INTEGER_32
{}
mvwdelch (win: POINTER, y: INTEGER_32, x: INTEGER_32): INTEGER_32
{}
winsdelln (win: POINTER, n: INTEGER_32): INTEGER_32
{}
wgetleft (win: POINTER): INTEGER_32
{}
wgettop (win: POINTER): INTEGER_32
{}
wtimeout (win: POINTER, delay: INTEGER_32)
{}
mvwgetch (win: POINTER, y: INTEGER_32, x: INTEGER_32): INTEGER_32
{}
keypad (win: POINTER, bf: INTEGER_32): INTEGER_32
{}
mvwreadstring (win: POINTER, size: INTEGER_32, x: INTEGER_32, y: INTEGER_32): POINTER
{}
wgetcursorx (win: POINTER): INTEGER_32
{}
wgetcursory (win: POINTER): INTEGER_32
{}
immedok (win: POINTER, bf: INTEGER_32)
{}
wnoutrefresh (win: POINTER): INTEGER_32
{}
mvwinch (win: POINTER, y: INTEGER_32, x: INTEGER_32): INTEGER_32
{}
mvwinsch (win: POINTER, y: INTEGER_32, x: INTEGER_32, ch: INTEGER_32): INTEGER_32
{}
mvwinsstr (win: POINTER, y: INTEGER_32, x: INTEGER_32, str: POINTER): INTEGER_32
{}
mvwgetstring (win: POINTER, size: INTEGER_32, x: INTEGER_32, y: INTEGER_32): POINTER
{}
wmove (win: POINTER, y: INTEGER_32, x: INTEGER_32): INTEGER_32
{}
idlok (win: POINTER, bf: INTEGER_32): INTEGER_32
{}
scrollok (win: POINTER, bf: INTEGER_32): INTEGER_32
{}
leaveok (win: POINTER, bf: BOOLEAN): INTEGER_32
{}
wscrl (win: POINTER, n: INTEGER_32): INTEGER_32
{}
wsetscrreg (win: POINTER, t: INTEGER_32, b: INTEGER_32): INTEGER_32
{}
wsyncup (win: POINTER)
{}
wcursyncup (win: POINTER)
{}
syncok (win: POINTER, bf: INTEGER_32): INTEGER_32
{}
wresize (win: POINTER, lines: INTEGER_32, columns: INTEGER_32): INTEGER_32
{}
wborder (win: POINTER, ls: INTEGER_32, rs: INTEGER_32, ts: INTEGER_32, bs: INTEGER_32, tl: INTEGER_32, tr: INTEGER_32, bl: INTEGER_32, br: INTEGER_32): INTEGER_32
{}
mvwhline (win: POINTER, y: INTEGER_32, x: INTEGER_32, ch: INTEGER_32, n: INTEGER_32): INTEGER_32
{}
mvwvline (win: POINTER, y: INTEGER_32, x: INTEGER_32, ch: INTEGER_32, n: INTEGER_32): INTEGER_32
{}
redraw_later
effective procedure
{ANY}
redraw_now
effective procedure
{ANY}
hidden: BOOLEAN
writable attribute
{ANY}
show
effective procedure
{ANY}
hide
effective procedure
{ANY}
is_children_drawing_disable: BOOLEAN
writable attribute
{ANY}
draw_children (b: BOOLEAN)
effective procedure
{ANY}
set_foreground_color (color: INTEGER_32)
effective procedure
{ANY}
set_background_color (color: INTEGER_32)
effective procedure
{ANY}
set_colors (foreground: INTEGER_32, background: INTEGER_32)
effective procedure
{ANY}
get_foreground_color: INTEGER_32
effective function
{ANY}
get_background_color: INTEGER_32
effective function
{ANY}
set_parent (p: NCURSES_WIDGET)
effective procedure
add_child (child: NCURSES_WIDGET)
effective procedure
propagate_resize
effective procedure
require
screen_left: INTEGER_32
effective function
screen_top: INTEGER_32
effective function
writable attribute
writable attribute
dispose
effective procedure
{}
Action to be executed just before garbage collection reclaims an object.
dispose_children
effective procedure
{}
ncurses: NCURSES
once function
{ANY}
Access to the ncurses singleton.
invisible_cursor_mode: INTEGER_32
is 0
constant attribute
{ANY}
In this mode the cursor is invisible.
default_visible_cursor_mode: INTEGER_32
is 1
constant attribute
{ANY}
The default visible cursor mode.
special_visible_cursor_mode: INTEGER_32
is 2
constant attribute
{ANY}
In this mode cursor may blink in a more special or in a more visible way.
valid_cursor_visibility (code: INTEGER_32): BOOLEAN
effective function
{ANY}
ensure
key_escape: INTEGER_32
is 27
constant attribute
{}
key_return: INTEGER_32
is 10
constant attribute
{}
Below are integer equivalent for special "function" keys.
Is it necessary to keep all of them ?
key_min: INTEGER_32
{}
key_break: INTEGER_32
{}
key_sreset: INTEGER_32
{}
key_reset: INTEGER_32
{}
key_down: INTEGER_32
{}
The Down arrow of the keyboard.
key_up: INTEGER_32
{}
The Up arrow of the keyboard.
key_left: INTEGER_32
{}
The Left arrow of the keyboard.
key_right: INTEGER_32
{}
The Right arrow of the keyboard.
key_home: INTEGER_32
{}
key_backspace: INTEGER_32
{}
key_dl: INTEGER_32
{}
key_il: INTEGER_32
{}
key_dc: INTEGER_32
{}
key_ic: INTEGER_32
{}
key_eic: INTEGER_32
{}
key_clear: INTEGER_32
{}
key_eos: INTEGER_32
{}
key_eol: INTEGER_32
{}
key_sf: INTEGER_32
{}
key_sr: INTEGER_32
{}
key_next_page: INTEGER_32
{}
Also labeled "Page Down" on some keyboards.
key_previous_page: INTEGER_32
{}
Also labeled "Page Up" on some keyboards.
key_stab: INTEGER_32
{}
key_ctab: INTEGER_32
{}
key_catab: INTEGER_32
{}
key_enter: INTEGER_32
{}
key_print: INTEGER_32
{}
key_ll: INTEGER_32
{}
key_a1: INTEGER_32
{}
key_a3: INTEGER_32
{}
key_b2: INTEGER_32
{}
key_c1: INTEGER_32
{}
key_c3: INTEGER_32
{}
key_btab: INTEGER_32
{}
key_beg: INTEGER_32
{}
key_cancel: INTEGER_32
{}
key_close: INTEGER_32
{}
key_command: INTEGER_32
{}
key_copy: INTEGER_32
{}
key_create: INTEGER_32
{}
key_end: INTEGER_32
{}
key_exit: INTEGER_32
{}
key_find: INTEGER_32
{}
key_help: INTEGER_32
{}
key_mark: INTEGER_32
{}
key_message: INTEGER_32
{}
key_move: INTEGER_32
{}
key_next: INTEGER_32
{}
key_open: INTEGER_32
{}
key_options: INTEGER_32
{}
key_previous: INTEGER_32
{}
key_redo: INTEGER_32
{}
key_reference: INTEGER_32
{}
key_refresh: INTEGER_32
{}
key_replace: INTEGER_32
{}
key_restart: INTEGER_32
{}
key_resume: INTEGER_32
{}
key_save: INTEGER_32
{}
key_sbeg: INTEGER_32
{}
key_scancel: INTEGER_32
{}
key_scommand: INTEGER_32
{}
key_scopy: INTEGER_32
{}
key_screate: INTEGER_32
{}
key_sdc: INTEGER_32
{}
key_sdl: INTEGER_32
{}
key_select: INTEGER_32
{}
key_send: INTEGER_32
{}
key_seol: INTEGER_32
{}
key_sexit: INTEGER_32
{}
key_sfind: INTEGER_32
{}
key_shelp: INTEGER_32
{}
key_shome: INTEGER_32
{}
key_sic: INTEGER_32
{}
key_sleft: INTEGER_32
{}
key_smessage: INTEGER_32
{}
key_smove: INTEGER_32
{}
key_snext: INTEGER_32
{}
key_soptions: INTEGER_32
{}
key_sprevious: INTEGER_32
{}
key_sprint: INTEGER_32
{}
key_sredo: INTEGER_32
{}
key_sreplace: INTEGER_32
{}
key_sright: INTEGER_32
{}
key_srsume: INTEGER_32
{}
key_ssave: INTEGER_32
{}
key_ssuspend: INTEGER_32
{}
key_sundo: INTEGER_32
{}
key_suspend: INTEGER_32
{}
key_undo: INTEGER_32
{}
key_mouse: INTEGER_32
{}
key_resize: INTEGER_32
{}
key_event: INTEGER_32
{}
key_max: INTEGER_32
{}
key_f0: INTEGER_32
{}
key_f1: INTEGER_32
{}
key_f2: INTEGER_32
{}
key_f3: INTEGER_32
{}
key_f4: INTEGER_32
{}
key_f5: INTEGER_32
{}
key_f6: INTEGER_32
{}
key_f7: INTEGER_32
{}
key_f8: INTEGER_32
{}
key_f9: INTEGER_32
{}
key_f10: INTEGER_32
{}
key_f11: INTEGER_32
{}
key_f12: INTEGER_32
{}
key_function (num: INTEGER_32): INTEGER_32
{}
black_color: INTEGER_32
{}
red_color: INTEGER_32
{}
green_color: INTEGER_32
{}
yellow_color: INTEGER_32
{}
blue_color: INTEGER_32
{}
magenta_color: INTEGER_32
{}
cyan_color: INTEGER_32
{}
white_color: INTEGER_32
{}
space: INTEGER_32
once function
{}
return: INTEGER_32
once function
{}
upper_left_corner: INTEGER_32
{}
lower_left_corner: INTEGER_32
{}
upper_right_corner: INTEGER_32
{}
lower_right_corner: INTEGER_32
{}
left_tee: INTEGER_32
{}
right_tee: INTEGER_32
{}
bottom_tee: INTEGER_32
{}
top_tee: INTEGER_32
{}
horizontal_line: INTEGER_32
{}
vertical_line: INTEGER_32
{}
plus: INTEGER_32
{}
scanline1: INTEGER_32
{}
scanline9: INTEGER_32
{}
diamond: INTEGER_32
{}
checker_board: INTEGER_32
{}
degree: INTEGER_32
{}
plus_minus: INTEGER_32
{}
bullet: INTEGER_32
{}
left_arrow: INTEGER_32
{}
right_arrow: INTEGER_32
{}
down_arrow: INTEGER_32
{}
up_arrow: INTEGER_32
{}
board: INTEGER_32
{}
lantern: INTEGER_32
{}
block: INTEGER_32
{}
scanline3: INTEGER_32
{}
scanline7: INTEGER_32
{}
less_or_equal: INTEGER_32
{}
greater_or_equal: INTEGER_32
{}
{}
not_equal: INTEGER_32
{}
sterling: INTEGER_32
{}