home *** CD-ROM | disk | FTP | other *** search
-
- /*****************************************************************
- *
- *
- The following section contains a number of user-definable macros.
- *
- *
- *****************************************************************/
-
-
-
- /*
- * UserTool: The last tool in the left
- * column of the Toolbox is user definable.
- * The UserTool defined below does free hand
- * drawing of a data set by double-clicking.
- */
-
- /* An explanation message will display when the
- * user click the UserTool the first time.
- * Please note that if a new document is opened, the macro will stay but
- * variables will not, so that we need to test the existance of this
- * variable at the begining of the macro.
- * A document carries variables and data, but not macros.
- */
-
- def UserTool {
- doTool 0;/* return to the PointerTool first */
- CheckVar FirstTry 0;
- if(FirstTry==0)
- { /* exist(name) returns 4 if name is a variable */
- type -C This tool is currently defined to use the ScreenReader\
- to "DRAW" data. Move the cursor to the plot and double-click to "Add" new\
- data points. Click any tool to end.;FirstTry=1;
- };
- doc -cs DRAW;Count/=2;/* each draw is two datasets */
- %B=Draw.$(Count+1);
- create %B_B -c 50;
- getpts -new %B_B 50
- (Double-click to add new pt,click any tool to quit);
- def QuitToolBox {if(count==0) (del %B_B)};
- }
-
- /* Autoexec
- *
- * this is executed if new document is not open
- * from a disk file. Otherwise the macro EndOpen
- * is executed.
- */
-
- def autoexec {
- window -T Wks;
- /* create a new data worksheet */
- queue (doc -saved);
- /* turn off the ask to save flag */
- }
-
-
- def NotReady {
- ty -b "This operation is still under development...";
- }
-
-
- /* if a document is specified in the command line
- * it is open automatically, after that document
- * is open, the following macro is executed.
- *
- def EndOpen { }
- *
- */
-
- /* before a document is deleted from memory */
- /* DocEnd */
- def DocEnd { } /* do nothing */
-