[Reality] Faucet API & class, round 1

Michael Dartt mad96@hampshire.edu
Thu, 16 Mar 2000 04:21:51 -0500 (EST)


I'm working on writing:

Faucet class (faucet.py): contains structures, functions, etc. common to
all Faucets, regardless of front-end, excepting networking/protocol stuff,
which will go in protocol.py

Faucet GUI API: function and variable names and construction, so that
it'll be easier to write, read, and debug Faucet front-ends (assuming
programmers follow this :-j)

The inheritance structure would go: FaucetProtocol -> Faucet -> GUIFaucet
(e.g. GtkFaucet, TkFaucet, NcursesFaucet, etc.)

Below are my lists for what I think should go into the two things I've
mentioned above.  Let me know what needs changing.  (Or if there are any
suggestions....)

Functions are denoted with a dollar sign ($).  The other symbols have no
significance.  (It's all indentation.  :-)


--Mike

------

* Common stuff (Faucet.py)
	- history
	  $ history up
	  $ history down
	  $ save history
	- keys
	  - shortcuts (keypad #s for moving, other user-defined, etc) dict
	  - expansions ("u" for "go up", etc.) dict
	  - etc. (Return, Up, Down, et al) dict
	  $ load shortcuts, etc.
	  $ change shortcuts
	  $ key functions (what Return, et al do)
	- items dictionary
	  $ refresh
	  $ add items
	  $ remove items
	  $ clear	  
	- description dictionary
	  $ refresh
	  $ add key
	  $ remove key
	  $ clear
	- exits list
	  $ add exits to desc
* UI pieces (API)
	- Login window
	  @ window title
	  @ character name text entry field (drop-down)
	    - label
	  @ password text entry field
	    - label
	  @ server text entry field (drop-down?)
	    - label
	  @ progress bar
	  @ login button
	    - label
	  @ program name and version label
	  @ cancel/quit button
	    - label
	  @ "save password" check box
	    - label
	  @ "auto-login" check box
	    - label
	  $ save fields & prefs
	- Game window
	  @ window title
	  @ description box
	    - description scrollbar
	    $ refresh
	  @ item box
	    $ refresh
	  @ item tree
	  @ message box
	    - msg box scrollbar
	    $ display message
	  @ command line
	    $ clear
	    $ focus
	    $ get/send text
	- Authoring window
	  @ window title
	  @ OK button
	    - button label
	  @ Cancel button
	    - button label
	  @ Clear button
	    - button label
	  @ text field 
	  $ get text from box
	$ Quit
	$ change theme

* Save following in Faucet dir (one file, XML?):
	- keyboard macros
	- command history (save on quit)
	- login info