📄 textwind.h
字号:
#pragma TextWindow
#include <SYSTEM.h>
typedef void *
TWindow;
void OpenWindow(TWindow &window, int x, int y,
unsigned int width, unsigned int height, char title[]);
/* OpenWindow creates a new window for Input and Output.
The variable returned in window is used to denote which window to use
in all the following commands.
Then the string in the heading variable will be written at the top
of the window. */
void CloseWindow(TWindow &window);
/* removes the window created by OpenWindow */
void ChangeTitle(TWindow window, char title[]);
/* replaces the previous heading with the new string */
boolean GetDone(TWindow window);
/* If any of these commands encounter an error GetDone returns FALSE.
If the commands executes normally GetDone returns TRUE. */
char GetTermCH(TWindow window);
/* The character upon which any of the read functions terminated upon */
void Read(TWindow window, char &ch);
void ReadString(TWindow window, char &s[]);
/* read string, i.e. sequence of characters not containing
blanks nor control characters; leading blanks are ignored.
Input is terminated by any character <= " ";
this character is assigned to termCH.
DEL is used for backspacing when input from terminal */
void ReadInt(TWindow window, int &x);
/* read string and convert to integer. Syntax:
integer = ["+"|"-"] digit {digit}.
Leading blanks are ignored. */
void ReadCard(TWindow window, unsigned int &x);
/* read string and convert to cardinal. Syntax:
cardinal = digit {digit}.
Leading blanks are ignored. */
void ReadWrd(TWindow window, WORD &w);
void Write(TWindow window, char ch);
void WriteLn(TWindow window); /* terminate line */
void WriteString(TWindow window, char s[]);
void WriteInt(TWindow window, int x, unsigned int n);
/* write integer x with (at least) n characters on file "out".
If n is greater than the number of digits needed,
blanks are added preceding the number */
void WriteCard(TWindow window, unsigned int x, unsigned int n);
void WriteOct(TWindow window, unsigned int x, unsigned int n);
void WriteHex(TWindow window, unsigned int x, unsigned int n);
void WriteWrd(TWindow window, WORD w);
void WriteLongInt(TWindow window, long x, unsigned int n);
void WriteLongOct(TWindow window, long x, unsigned int n);
void WriteLongHex(TWindow window, long x, unsigned int n);
void ReadReal(TWindow window, double &x);
/*Read REAL number x from keyboard according to syntax:
["+"|"-"] digit {digit} ["." digit {digit}] ["E"["+"|"-"] digit [digit]]
*/
void WriteReal(TWindow window, double x, unsigned int n);
/* Write x using n characters. If fewer than n characters
are needed, leading blanks are inserted */
void WriteRealOct(TWindow window, double x);
/* Write x in octal form with exponent and mantissa */
boolean Test (TWindow window);
/* returns TRUE if there are characters in the keyboard buffer ready to be
input */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -