extends Object
Signature
Return Type
Description
init( source:Bitmap , &dither )
display()
size()
XY
to<<TextCanvas>>( [bg=CharacterStyle.BG_DEFAULT:Int ] )
TextCanvas
class ANSIColor [compound]
incorporates CommonCompoundMethods
Name
Type
Description
color
Color
index
Int
class ANSIColorLookup [singleton]
extends Byte[]
Name
Type
Description
@native1
RogueCNativeProperty
capacity
Int
color_mode
ANSIColorMode
count
Int
element_size
Int
element_type
Byte
Used by native code to determine sizeof($DataType)
is_borrowed
Logical
is_ref_array
Logical
Signature
Return Type
Description
init()
init( color_mode:ANSIColorMode )
color_mode COLOR_240, COLOR_16, GRAY_24, or GRAY_4
configure( color_mode:ANSIColorMode )
class ANSIColorLookupColor16 [singleton]
extends ANSIColorLookup
Name
Type
Description
@native1
RogueCNativeProperty
capacity
Int
color_mode
ANSIColorMode
count
Int
element_size
Int
element_type
Byte
Used by native code to determine sizeof($DataType)
is_borrowed
Logical
is_ref_array
Logical
Signature
Return Type
Description
init()
class ANSIColorLookupColor240 [singleton]
extends ANSIColorLookup
Name
Type
Description
@native1
RogueCNativeProperty
capacity
Int
color_mode
ANSIColorMode
count
Int
element_size
Int
element_type
Byte
Used by native code to determine sizeof($DataType)
is_borrowed
Logical
is_ref_array
Logical
Signature
Return Type
Description
init()
class ANSIColorLookupGray24 [singleton]
extends ANSIColorLookup
Name
Type
Description
@native1
RogueCNativeProperty
capacity
Int
color_mode
ANSIColorMode
count
Int
element_size
Int
element_type
Byte
Used by native code to determine sizeof($DataType)
is_borrowed
Logical
is_ref_array
Logical
Signature
Return Type
Description
init()
class ANSIColorLookupGray4 [singleton]
extends ANSIColorLookup
Name
Type
Description
@native1
RogueCNativeProperty
capacity
Int
color_mode
ANSIColorMode
count
Int
element_size
Int
element_type
Byte
Used by native code to determine sizeof($DataType)
is_borrowed
Logical
is_ref_array
Logical
Signature
Return Type
Description
init()
incorporates CommonCompoundMethods
Category
Value
Description
UNDEFINED
-1
COLOR_240
0
COLOR_16
1
GRAY_24
2
GRAY_4
3
Name
Type
Description
value
Int
class ANSIColors [singleton]
extends ANSIColor[]
Signature
Return Type
Description
init()
incorporates CommonCompoundMethods
extends Object
Signature
Return Type
Description
init()
alias( from_name:String , to_name:String , &require_value )
group( new_group_option:String , [new_group_name=null:String ] )
Changes the group that subsequent args are collected under
on_unknown( unknown_handler:Function(CommandLineParser) )
on_unknown( usage_callback:Function() )
option( name:String , &require_value, &optional, &multi, [default=null:Variant ], &alias=null, &aliases=null )
option( name:String , handler:Function(CommandLineParser), &alias=null, &aliases=null, &require_value )
parse( args:String[] )
Variant
class UnexpectedValueError
extends Error
Signature
Return Type
Description
init( name:String )
class UnrecognizedOptionError
extends Error
Signature
Return Type
Description
init( name:String )
extends Error
Signature
Return Type
Description
init( name:String )
class Console [singleton]
extends Object
incorporates Reader<<$DataType>> , PrintWriter , BufferedPrintWriter<<$buffer>>
Name
Type
Description
@native34
RogueCNativeProperty
cursor
ConsoleCursor
decode_utf8
Logical
error
PrintWriter
force_input_blocking
Logical
Set to true to force input blocking in Immediate Mode (can set to false after input). In Standard Mode input blocking is always used.
immediate_mode
Logical
Set to 'true' to turn off echo and line buffering and to turn on mouse events
input_buffer
Byte[]
is_end_of_input
Logical
Can be set after has_another() returns false in standard line-buffered input mode. Call reset_input to re-enable input.
mode
ConsoleMode
StandardConsoleMode || ImmediateConsoleMode
next_input_character
Int?
output_buffer
String
position
Int
windows_in_quick_edit_mode
Logical
class ConsoleCursor [compound]
incorporates CommonCompoundMethods
API Console.cursor = (x,y) # Defined in Console.set_cursor(), (0,0) is top-left Console.cursor->XY # (0,0) is top-left Console.cursor.position->XY # Same as above Console.cursor += (delta_x,delta_y) Console.cursor.save_position Console.cursor.restore_position Console.cursor.hide Console.cursor.show
Name
Type
Description
cursor_hidden
Logical
ConsoleErrorPrinter.rogue
class ConsoleErrorPrinter
extends Object
incorporates PrintWriter , BufferedPrintWriter<<$buffer>>
Name
Type
Description
output_buffer
String
class ConsoleEvent [compound]
incorporates CommonCompoundMethods
incorporates CommonCompoundMethods
Category
Value
Description
CHARACTER
0
POINTER_PRESS_LEFT
1
POINTER_PRESS_RIGHT
2
POINTER_RELEASE
3
POINTER_MOVE
4
SCROLL_UP
5
SCROLL_DOWN
6
Name
Type
Description
value
Int
enum UnixConsoleMouseEventType
incorporates CommonCompoundMethods
Category
Value
Description
PRESS_LEFT
32
PRESS_RIGHT
34
RELEASE
35
DRAG_LEFT
64
DRAG_RIGHT
66
MOVE
67
SCROLL_UP
96
SCROLL_DOWN
97
Name
Type
Description
value
Int
extends Object
Name
Type
Description
configured_on_exit
Logical
class ImmediateConsoleMode
extends ConsoleMode
Name
Type
Description
decode_utf8
Logical
events
ConsoleEvent[]
All keyboard and mouse events get turned into ConsoleEvents and queued here
windows_button_state
Int
windows_last_press_type
ConsoleEventType
Signature
Return Type
Description
init()
Turn off blocking and line buffering
has_another()
Logical
Only reports on character input events, ignoring pointer events. Use has_another_event() instead to check for either kind of event.
has_another_event()
Logical
peek()
Character
peek_event()
ConsoleEvent
read()
Character
read_event()
ConsoleEvent
class StandardConsoleMode
extends ConsoleMode
Name
Type
Description
next_input_character
Int?
class WindowsInputRecord [compound]
incorporates CommonCompoundMethods
Name
Type
Description
@native54
RogueCNativeProperty
@native55
RogueCNativeProperty
@native56
RogueCNativeProperty
@native57
RogueCNativeProperty
@native58
RogueCNativeProperty
class ConsoleStyle [singleton]
extends Object
USAGE ConsoleStyle.set<<FG_WHITE>> ConsoleStyle.set<<BG_RED>> println "Hello World!" ConsoleStyle.set<<RESET>> OR ConsoleStyle.set( ConsoleStyle.FG_WHITE ) ...
Name
Type
Description
BG_BLACK
Int
BG_BLUE
Int
BG_CYAN
Int
BG_DARK_GRAY
Int
BG_DEFAULT
Int
BG_GREEN
Int
BG_LIGHT_BLUE
Int
BG_LIGHT_CYAN
Int
BG_LIGHT_GRAY
Int
BG_LIGHT_GREEN
Int
BG_LIGHT_MAGENTA
Int
BG_LIGHT_RED
Int
BG_LIGHT_YELLOW
Int
BG_MAGENTA
Int
BG_RED
Int
BG_WHITE
Int
BG_YELLOW
Int
BLINK
Int
BLINK_OFF
Int
BOLD
Int
BOLD_OFF
Int
DIM
Int
DIM_OFF
Int
FG_BLACK
Int
FG_BLUE
Int
FG_CYAN
Int
FG_DARK_GRAY
Int
FG_DEFAULT
Int
FG_GREEN
Int
FG_LIGHT_BLUE
Int
FG_LIGHT_CYAN
Int
FG_LIGHT_GRAY
Int
FG_LIGHT_GREEN
Int
FG_LIGHT_MAGENTA
Int
FG_LIGHT_RED
Int
FG_LIGHT_YELLOW
Int
FG_MAGENTA
Int
FG_RED
Int
FG_WHITE
Int
FG_YELLOW
Int
HIDDEN
Int
HIDDEN_OFF
Int
INVERSE
Int
INVERSE_OFF
Int
RESET
Int
UNDERLINE
Int
UNDERLINE_OFF
Int
Signature
Return Type
Description
bg_color( bg:Color , [output=Global:PrintWriter ] )
24-bit truecolor mode
bg_color( index:Int , [output=Global:PrintWriter ] )
256 color mode; index is 0..255
colors( fg:Color , bg:Color , [output=Global:PrintWriter ] )
fg_color( fg:Color , [output=Global:PrintWriter ] )
24-bit truecolor mode
fg_color( index:Int , [output=Global:PrintWriter ] )
256 color mode; index is 0..255
flush()
reset( [output=Global:PrintWriter ] )
set( code:Int , [output=Global:PrintWriter ] )
set<<$CODE>>( [output=Global:PrintWriter ] )
string( code:Int )
String
Returns the full escape sequence activating the given code. Example: println ConsoleStyle.string(ConsoleStyle.BG_BLUE)
extends UI
bold_font : ConsoleUIFont inverse_font : ConsoleUIFont underline_font : ConsoleUIFont
class ConsoleUICanvas [singleton]
extends TextCanvas
All console UI drawing commands should draw characters to this singleon.
class ConsoleUIFont [singleton]
extends Font
class CharacterStyle [compound]
incorporates CommonCompoundMethods
class CurrentCharacterStyle
extends Object
Signature
Return Type
Description
bg_black()
bg_blue()
bg_cyan()
bg_dark_gray()
bg_default()
bg_green()
bg_light_blue()
bg_light_cyan()
bg_light_gray()
bg_light_green()
bg_light_magenta()
bg_light_red()
bg_light_yellow()
bg_magenta()
bg_red()
bg_white()
bg_yellow()
bg( color:ANSIColor )
bg( color:Color )
bg( color:Int )
blink()
blink_off()
bold()
bold_off()
clear()
colors( fg:Color , bg:Color )
dim()
dim_off()
fg_black()
fg_blue()
fg_cyan()
fg_dark_gray()
fg_default()
fg_green()
fg_light_blue()
fg_light_cyan()
fg_light_gray()
fg_light_green()
fg_light_magenta()
fg_light_red()
fg_light_yellow()
fg_magenta()
fg_red()
fg_white()
fg_yellow()
fg( color:ANSIColor )
fg( color:Color )
fg( color:Int )
hidden()
hidden_off()
inverse()
inverse_off()
reset()
underline()
underline_off()
class StyledCharacter [compound]
incorporates CommonCompoundMethods
extends Object
incorporates PrintWriter , BufferedPrintWriter<<$buffer>>
Signature
Return Type
Description
init( content:String , width:Int )
init( lines:String[] )
init( width:Int , height:Int , [fill=' ':Character ] )
init( width:Int , height:Int , buffer:StyledCharacter[] )
init( width:Int , height:Int , content:String )
init( width:Int , height:Int , fill:StyledCharacter )
clear( [fill=' ':Character ] )
clear( fill:StyledCharacter )
cloned()
TextCanvas
close()
crop( left:Int , top:Int , right:Int , bottom:Int )
crop( n:Int )
display( [output=Global:PrintWriter ] )
Prints to the standard output or a specified PrintWriter.
display( x:Int , y:Int )
(0,0) is the top-left corner of the console
display( xy:XY )
draw( bounds:Box , ch:Character )
draw( bounds:Box , ch:StyledCharacter )
draw( bounds:Box , pattern:String )
Pattern: "ABCDEFGHI" where: ABC D F GHI Example: ABBBBC D F D F GHHHHI
draw( characters:StyledCharacter[] , width:Int , [position=XY.zero:XY ] )
draw( pattern:String )
draw( src:TextCanvas , x:Int , y:Int )
draw( src:TextCanvas , xy:XY )
draw( text_image:String , width:Int , [position=XY.zero:XY ] )
draw_frame( bounds:Box , &thick )
Draws a box-character frame, e.g.: βββββββββ ββββββββ βDefaultβ β&thickβ β(thin) β ββββββββ βββββββββ
expand( left:Int , top:Int , right:Int , bottom:Int )
expand( n:Int )
fill( bounds:Box , ch:Character )
fill( bounds:Box , ch:StyledCharacter )
fill( bounds:Box , pattern:String )
Pattern: "ABCDEFGHI" where: ABC DEF GHI Example: ABBBBC DEEEEF DEEEEF GHHHHI
fill( ch:Character )
fill( ch:StyledCharacter )
fill( pattern:String )
flipped( &h, &v )
TextCanvas
flush()
flush( buffer:String )
get( i:Int , j:Int )
StyledCharacter
get( xy:XY )
StyledCharacter
indent()
Int
invalidate()
invalidate( bounds:Box )
pixellated( [style=CharacterStyle.NONE:CharacterStyle ] )
TextCanvas
"Pixellates" non-space characters in this TextCanvas into quarter block characters. The height of the resulting TextCanvas is half what it originally was. See also: Console/ANSIBitmap.rogue Example: uses Console/TextCanvas local st = @|###### |# # #### #### # # ###### |# # # # # # # # # |###### # # # # # ##### |# # # # # ### # # # |# # # # # # # # # |# # #### #### #### ###### println TextCanvas( st.split('\n') ).pixellated Output: βββββββ ββββ ββββ β β ββββββ βββββββ β β β β β β βββββ β ββ β β β βββ β β β β β ββββ ββββ ββββ ββββββ
print( value:Byte )
print( value:Character )
print( value:Int32 )
print( value:Int64 )
print( value:Logical )
print( value:Object )
print( value:Real64 )
print( value:Real64 , decimal_places:Int32 )
print( value:String )
println()
println( value:Byte )
println( value:Character )
println( value:Int32 )
println( value:Int64 )
println( value:Logical )
println( value:Object )
println( value:Real64 )
println( value:Real64 , decimal_places:Int32 )
println( value:String )
resize( new_size:XY )
resize( new_width:Int , new_height:Int )
rotated_180()
TextCanvas
rotated_90( &cw, &ccw )
TextCanvas
set( i:Int , j:Int , ch:Character )
set( i:Int , j:Int , ch:StyledCharacter )
set( xy:XY , ch:Character )
set( xy:XY , ch:StyledCharacter )
set_clip( new_clip:Box? )
set_cursor( new_pos:XY )
set_indent( new_indent:Int )
shift( dx:Int , dy:Int , [fill_ch=' ':Character ] )
size()
XY
style()
CurrentCharacterStyle
to<<String>>()
String