@ -40,9 +40,14 @@ Public methods:
* void move_to_next_page()
bool open(const string & file_name)
Executes the corresponding file viewer command on the buffer. See program specification for details. The method open returns true if successful.
bool go(int link)
Executes the corresponding file viewer command on the buffer.
See program specification for details. The methods open, go, and back returns true if successful.
* int max_links()
Gives FileViewer access to the amount of links stored.
* void set_window_height(int h)
@ -28,7 +28,7 @@ preface.txt
11 In fact, the creation of large computer programs poses three basic
12 challenges. The overall goal of these notes is to teach you
next previous open quit
next previous open quit go back
@ -47,6 +47,10 @@ previous: The previous page is displayed. Does nothing if the first line of the
open: Asks for a file name (with prompt "file:") and displays that file. If a file named X does not open, the message "ERROR: Could not open X" is displayed just before the file name is redisplayed.
go: Asks for the number of the link the user would like to visit. If the file corresponding to that link does not open, the message "ERROR: ....." is displayed.
back: The last file that was displayed gets re-opened. If there are no files left in the history, the error message "ERROR: ...." is displayed.
quit: Stops the program.