📄 hsa_text.doc
字号:
10-Sep-87 Page 16
Hardwood Software Associates
HSA_TEXT - Text Mode Screen Control Library (V3.05)
HSA_TEXT - Text Mode Screen Control Library (V3.05)
W_OPEN - Open a Window
______________________
This module contains the window open function. Before a window may be
accessed it must be openned. Openning the window allocates and
initializes the window data structure to prepare the window for future
manipulation.
NAME: W_OPEN - Open a window
W_OPEN
SYNOPSIS: WIN *w_open (row,column,height,width,attr,
border_attr,border,column_width);
int row; Row of upper left corner
int column; Column of upper left corner
int height; Height of window (# rows)
including border.
int width; Width of window,
including border.
int attr; Attribute used in window
int border_attr; Attribute used in border
int border; Border line type
(see hsa_w.h)
int col_width; Width of columns
(0 if none)
DESCRIPTION: Allocates the window data structure. Saves screen
display area that will be overwritten. Creates
blank window. If col_width is greater than 0 columns
are created within the window.
RETURNS: Pointer to the window data structure.
NULL - Error allocated window data structure.
NAME: W_CLR - Clear a window
W_CLR
SYNOPSIS: void w_clr (win);
WIN *win; Pointer to window
data structure
DESCRIPTION: Clear the specified window to blanks and set cursor
current position to upper left corner.
10-Sep-87 Page 17
Hardwood Software Associates
HSA_TEXT - Text Mode Screen Control Library (V3.05)
HSA_TEXT - Text Mode Screen Control Library (V3.05)
W_BORDER - Manipulate Window Borders
____________________________________
This module contains the border manipulation routines. A window may have
one of many borders , as defined in hsa_w.h, or it may have no border.
The top and bottom border may optionally contain a string that is either
to the left, right, or centered.
NAME: W_USER_BORDER - Specify a user border
W_USER_BORDER
SYNOPSIS: void w_border (ulc,urc,llc,lrc,hor,ver,
top_meet,bot_meet,
left_bound,right_bound);
char ulc; Upper left corner char
char urc; Upper right corner char
char llc; Lower left corner char
char lrc; Lower right corner char
char hor; Horizontal line char
char ver; Vertical line char
char top_meet; Meeting of top line and
vertical when columns drawn
char bot_meet; Meeting of bottom line and
vertical when columns drawn
char left_bound; Character to left of
border message
char right_bound; Character to right of
border message
DESCRIPTION: Define characters used to draw a user border
NAME: W_TOP_MSG - Display a message in top border line
W_TOP_MSG
SYNOPSIS: char *w_top_msg (win,msg,pos);
WIN *win; Pointer to window
data structure
char *msg; Message to display
int pos; Position of message:
MSG_LEFT
MSG_CENTER
MSG_RIGHT
DESCRIPTION: Display the message in the window border at the
indicated position.
RETURNS: Pointer to the message displayed.
NULL - Message too large to display
NAME: W_BOT_MSG - Display a message in bottom border line
W_BOT_MSG
SYNOPSIS: char *w_top_msg (win,msg,pos);
WIN *win; Pointer to window
data structure
char *msg; Message to display
int pos; Position of message:
MSG_LEFT
MSG_CENTER
MSG_RIGHT
DESCRIPTION: Display the message in the window border at the
10-Sep-87 Page 18
Hardwood Software Associates
HSA_TEXT - Text Mode Screen Control Library (V3.05)
HSA_TEXT - Text Mode Screen Control Library (V3.05)
indicated position.
RETURNS: Pointer to the message displayed.
NULL - Message too large to display
W_CLOSE - Close a Window
________________________
NAME: W_CLOSE - Close a window
W_CLOSE
SYNOPSIS: void w_close (win);
WIN *win; Pointer to window
data structure
DESCRIPTION: Erase the window from the screen, restore original
screen contents and cursor location, and free all
memory allocated for window.
CAUTION: Only the "top" window of overlapping windows should
be closed.
10-Sep-87 Page 19
Hardwood Software Associates
HSA_TEXT - Text Mode Screen Control Library (V3.05)
HSA_TEXT - Text Mode Screen Control Library (V3.05)
W_STR - Display Strings in Window
_________________________________
This module contains functions to display strings within windows. If the
starting position specified lies outside the window, nothing is
displayed. If the string is too long to fit in the window, it is
truncated on the right. The current location for the window is always
left to the right of the last character.
NAME: W_STR - Display a string in a window
W_STR
SYNOPSIS: int w_str (win,row,column,string);
WIN *win; Pointer to window
data structure
int row; Row within window to
display string
int column; Column within window to
display string
char *string; String to display
DESCRIPTION: Display the string in the window at the specified
location.
RETURNS: Number of characters displayed
NAME: W_STR_C - Display a string in a window
W_STR_C
SYNOPSIS: int w_str_c (win,string);
WIN *win; Pointer to window
data structure
char *string; String to display
DESCRIPTION: Display the string to the window at the current
location.
RETURNS: Number of characters displayed
NAME: W_STR_A - Display a string in a window
W_STR_A
SYNOPSIS: int w_str_c (win,row,column,string,attr);
WIN *win; Pointer to window
data structure
int row; Row within window to
display string
int column; Column within window to
display string
char *string; String to display
int attr; Attribute for string
DESCRIPTION: Display the string in the window at the specified
location using the specified attribute.
RETURNS: Number of characters displayed
NAME: W_STR_A_C - Display a string in a window
W_STR_A_C
ALIAS: W_STR_C_A
W_STR_C_A
SYNOPSIS: int w_str_a_c (win,row,column,string,attr);
int w_str_c_a (win,row,column,string,attr);
WIN *win; Pointer to window
data structure
int row; Row within window to
10-Sep-87 Page 20
Hardwood Software Associates
HSA_TEXT - Text Mode Screen Control Library (V3.05)
HSA_TEXT - Text Mode Screen Control Library (V3.05)
display string
int column; Column within window to
display string
char *string; String to display
int attr; Attribute for string
DESCRIPTION: Display the string in the window at the specified
location using the specified attribute.
RETURNS: Number of characters displayed
NAME: W_STR_COL - Display a string in a window column
W_STR_COL
SYNOPSIS: int w_str_col (win,string);
WIN *win; Pointer to window
data structure
char *string; String to display
DESCRIPTION: Display the string to the window in the next column.
RETURNS: 1 - Window is full
0 - Still room for more columns
NAME: W_CUR_LOC - Display the screen cursor in the window
W_CUR_LOC
SYNOPSIS: void w_cur_loc (win);
WIN *win; Pointer to window
data structure
DESCRIPTION: Move the screen cursor to the current location for
the specified window.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -