Classes |
| struct | CONSOLE |
| | Internal structure. You should not call it directly, use API instead ! More...
|
Functions |
| | console_clear (csl) |
| | Clear a console.
|
| | console_create (chn, x, y, w, h, flag) |
| | Initialize the console and create the graphical user interface.
|
| | console_destroy (csl) |
| | Destroy a console.
|
| | console_getContent (csl) |
| | Return the content of a console.
|
| | console_getMessageNumber (csl) |
| | Return the total message number.
|
| | console_gotoline (csl, line) |
| | Scroll the graphical interface to a line.
|
| | console_print (csl, msg) |
| | Add (print) a message in the given console.
|
| | console_printtxt (csl) |
| | Try to print (on the default printer) the content of a console This function should NOT be used !
|
| | console_save (csl, w) |
| | Save the content of a console in a file. If the file will be overwritten, if any.
|
| | console_setTitle (csl, title) |
| | Change the title of a console.
|
Detailed Description
This API provides a simple window interface to display any message to the user. This API provides an high level method to easily include a console. Create and manage a simple text window (console) to display any message. Several Console can be used in a same application.
For the application users, a contextual menu is available by right clicking in the bottom of the graphical user interface (below the text field).
Package to load : lib/console/console.pkg
Function Documentation
| console_getContent |
( |
csl |
| ) |
|
Return the content of a console.
Prototype: fun [CONSOLE] I
- Parameters
-
| CONSOLE | : a console. if nil, the last created console is used |
- Returns
- S : the content (can be empty)
| console_gotoline |
( |
csl |
, |
|
|
line |
|
|
) |
| |
Scroll the graphical interface to a line.
Prototype: fun [CONSOLE I] I
- Parameters
-
| CONSOLE | : a console. if nil, the last created console is used |
| I | : line number (the line number is not necessary equal to the message number) |
- Returns
- I : always 0
Save the content of a console in a file. If the file will be overwritten, if any.
Prototype: fun [CONSOLE W] I
- Parameters
-
| CONSOLE | : a console. if nil, the last created console is used |
| W | : a write-reference file |
- Returns
- I : always 0
Try to print (on the default printer) the content of a console This function should NOT be used !
Prototype: fun [CONSOLE] I
- Parameters
-
| CONSOLE | : a console. if nil, the last created console is used |
- Returns
- I : always 0
Destroy a console.
Prototype: fun [CONSOLE] I
- Parameters
-
| CONSOLE | : a console. if nil, the last created console is used |
- Returns
- I : always 0
| console_getMessageNumber |
( |
csl |
| ) |
|
Return the total message number.
Prototype: fun [CONSOLE] I
- Parameters
-
| CONSOLE | : a console. if nil, the last created console is used |
- Returns
- I : always 0
| console_setTitle |
( |
csl |
, |
|
|
title |
|
|
) |
| |
Change the title of a console.
Prototype: fun [CONSOLE S] I
- Parameters
-
| CONSOLE | : a console. if nil, the last created console is used |
| S | : a new title |
- Returns
- I : always 0
Clear a console.
Prototype: fun [CONSOLE] I
- Parameters
-
| CONSOLE | : a console. if nil, the last created console is used |
- Returns
- I : always 0
| console_print |
( |
csl |
, |
|
|
msg |
|
|
) |
| |
Add (print) a message in the given console.
Prototype: fun [CONSOLE S] I
- Parameters
-
| CONSOLE | : a console. if nil, the last created console is used |
| S | : a message |
- Returns
- I : always 0
| console_create |
( |
chn |
, |
|
|
x |
, |
|
|
y |
, |
|
|
w |
, |
|
|
h |
, |
|
|
flag |
|
|
) |
| |
Initialize the console and create the graphical user interface.
Prototype: fun [Chn I I I I I] CONSOLE
- Parameters
-
| Chn | : a channel (typically, the current channel (_channel)) |
| I | : the X position on the screen |
| I | : the Y position on the screen |
| I | : the width |
| I | : the height |
| I | : a flag : CONSOLE_SHOW_LINENUM = Display the number (nth) message CONSOLE_HIDE_LINENUM = Hide the number (nth) message |
- Returns
- CONSOLE : the new CONSOLE object