Class: IQFrame
core/frame.IQFrame
IQFrame - Windowed content area
Table of contents
Constructors
Methods
- blank
- center
- clear
- close
- cycle
- draw
- getContentArea
- gotoxy
- input
- inputPassword
- open
- popup
- say
- sayMCI
- separator
- waitKey
Constructors
constructor
• new IQFrame(options, output)
Parameters
| Name | Type |
|---|---|
options |
IQFrameOptions |
output |
IQOutput |
Defined in
Methods
blank
▸ blank(): IQFrame
Add a blank line
Returns
Defined in
center
▸ center(text): IQFrame
Center text within the frame
Parameters
| Name | Type |
|---|---|
text |
string |
Returns
Defined in
clear
▸ clear(): IQFrame
Clear the frame content (but keep frame open)
Returns
Defined in
close
▸ close(): void
Close the frame and restore the background If screen buffer management is active, redraws the saved region
Returns
void
Defined in
cycle
▸ cycle(): void
Cycle through content (for animation effects)
Returns
void
Defined in
draw
▸ draw(): void
Draw the buffered content inside the frame
Returns
void
Defined in
getContentArea
▸ getContentArea(): Object
Get the interior content area dimensions
Returns
Object
| Name | Type |
|---|---|
height |
number |
width |
number |
x |
number |
y |
number |
Defined in
gotoxy
▸ gotoxy(relX, relY): IQFrame
Position cursor inside the frame at relative coordinates
Parameters
| Name | Type |
|---|---|
relX |
number |
relY |
number |
Returns
Defined in
input
▸ input(prompt?, maxLength?): Promise<string>
Get text input within the frame at current content position
Parameters
| Name | Type | Description |
|---|---|---|
prompt? |
string |
Optional prompt text to display before input |
maxLength? |
number |
Maximum input length (defaults to content width) |
Returns
Promise<string>
The user’s input
Defined in
inputPassword
▸ inputPassword(prompt?, maxLength?): Promise<string>
Get password input (masked with asterisks)
Parameters
| Name | Type | Description |
|---|---|---|
prompt? |
string |
Optional prompt text |
maxLength? |
number |
Maximum input length |
Returns
Promise<string>
The user’s input
Defined in
open
▸ open(): void
Open the frame (draw border) Automatically saves the background region if screen buffer is available
Returns
void
Defined in
popup
▸ popup(): Promise<string>
Show a popup message and wait for key press Convenience method for quick modal dialogs
Returns
Promise<string>
Defined in
say
▸ say(text): IQFrame
Add content to the frame buffer
Parameters
| Name | Type |
|---|---|
text |
string |
Returns
Defined in
sayMCI
▸ sayMCI(text): IQFrame
Add content with MCI processing
Parameters
| Name | Type |
|---|---|
text |
string |
Returns
Defined in
separator
▸ separator(char?, color?): IQFrame
Add a horizontal separator line
Parameters
| Name | Type | Default value |
|---|---|---|
char |
string |
"\xC4" |
color? |
string |
undefined |
Returns
Defined in
waitKey
▸ waitKey(): Promise<string>
Wait for a key press (convenience method)
Returns
Promise<string>