Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- ClipOn 3.0 Reference - c_wview() http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 C_WVIEW()

 DESCRIPTION

 C_WVIEW() allows a text string to be viewed inside a ClipOn window.
 The text string may be scrolled up, down, left, and right.  All
 navigational keys are automatically controlled by C_WVIEW().  The
 starting position in the text string may be optionally specified.
 (Refer to Chapter 3 for a complete discussion about ClipOn windows.)

 NOTES

 C_WVIEW() will display a text string up to 64Kb in total size.  The
 width of a single line can be up to 1024 characters.  The length
 downward, of the string, is limited only by the 64Kb total.

 C_WVIEW() uses the current window color for the display and checks
 whether a box has been defined for the outer region of the window.
 If a box is defined, the display area is set inside of the box
 area.  If a box is not defined, the display area is the entire
 window.

 The numeric reference for the ClipOn window is a pointer to the
 window in memory.  Be careful not to change the value of this
 pointer, or the window will be unaccessible.

 SYNTAX

 C_WVIEW(window, text [,line] [,exit_keys])

 PARAMETERS

 window (N) is the numeric reference variable for the ClipOn window.

 text (C) is the text string to display inside of the window.

 line (N) is the line number in the text string to begin the
 display.  A line number greater than zero will begin the display at
 that specified line number.  A negative one (-1) will begin the
 display at the line number where a previous call to C_WVIEW()
 exited.  A zero (0) will begin the display at the top of the text
 string, which is the default, if line is not specified.  Note that
 a negative one (-1) parameter allows C_WVIEW() to continue
 displaying the same string at the line where it left off in a
 previous call to C_WVIEW().

 exit_keys (C) is a string containing the INKEY() codes that will
 allow C_WVIEW() to exit.  Each key code in the string must use
 three spaces and be divided by a comma.  For example, the exit_keys
 string " 27, 13,286,  1" would allow the keys escape, enter, alt+a,
 and home to exit C_WVIEW().  If exit_keys is not specified, the
 default of the escape key (27) is used to exit.

 KEY DEFINITIONS AND ACTIONS

 KEY PRESSED    ACTION TAKEN
 -----------    ------------
 ESC            Exit C_WVIEW()
 HOME           Display first page of text
 END            Display last page of text
 PGUP           Display previous page of text
 PGDN           Display next page of text
 UP-ARROW       Scroll text up one line
 DN-ARROW       Scroll text down one line
 RT-ARROW       Pan right 5 characters
 LT-ARROW       Pan left 5 characters
 CTRL-RT-ARROW  Pan right, all the way (last character)
 CTRL-LT-ARROW  Pan left, all the way (first character)

 RETURNS

 There is no return value.

 EXAMPLES

 f1 = fopen("TEST.TXT")       && Open text file

 fsize = c_filesize(f1)       && Get file size
 buffer = space(fsize)        && Get space (assume < 64Kb)
 fread(f1,@buffer,fsize)      && Read file into buffer
 fclose(f1)

 && Define ClipOn window
 w1 = c_window(0,10,10,69,"W/B",2,"W+/R","TEST.TXT")

 c_wview(w1,buffer)           && View text in window
 ...
 ...
 c_wview(w1,buffer,-1)        && Call again at same line
 ...
 ...
 c_wview(w1,buffer,50," 27, 13, 32")    && Start at line 50 and allow
                                        && escape, enter, and space-bar
                                        && to exit.


See Also: C_VIEWSTR() C_WINDOW() C_WSAVE() C_WRESTORE() C_WSAY()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson