Browse Source

my design and specifications

stew
Sarah Inzerillo 3 years ago
parent
commit
03f0c73803
  1. 9
      docs/design.txt
  2. 6
      docs/specification.txt

9
docs/design.txt

@ -40,9 +40,14 @@ Public methods:
* void move_to_next_page()
void move_to_previous_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)
bool back()
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)
Self-explanatory.

6
docs/specification.txt

@ -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
-------
command: o
file: introduction.txt
@ -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.

Loading…
Cancel
Save