Function:s2help

From S2PLOT

(Difference between revisions)
Jump to: navigation, search
Revision as of 22:34, 6 January 2009
S2plot admin (Talk | contribs)

← Previous diff
Current revision
S2plot admin (Talk | contribs)

Line 16: Line 16:
<code><pre> <code><pre>
-</pre></code>+#include <stdio.h>
 +#include <stdlib.h>
 +#include "s2plot.h"
-[[S2PLOT:Function List | Back]] to S2PLOT function list.+int main(int argc, char *argv[])
 +{
 + s2opend("/?", argc, argv); /* Prompt for display type */
 + s2swin(-1.,1., -1.,1., -1.,1.); /* Set the window coordinates */
 + s2box("BCDET",0,0,"BCDET",0,0,"BCDET",0,0); /* Draw coordinate box */
 + s2textxy(-1.0, 0.0, 0.0, "Press F1 twice to see custom help");
 + s2help("This is a custom help message - press F1 again to toggle off!");
-__NOTOC__+ s2show(1); /* Open the s2plot window */
-__NOEDITSECTION__+
 + return 1;
 +}
-Back to [[Function:Template | template]] page.+</pre></code>
 + 
 +[[S2PLOT:Function List | Back]] to S2PLOT function list.
 + 
 +__NOTOC__
 +__NOEDITSECTION__

Current revision

s2help

Set the custom help string.

Prototype

void s2help(char *helpstr);

Description

Set the custom help string.This is shown on the 2nd press of the F1 key for S2PLOT programs, if it is set.

See Also

Code Example

#include <stdio.h>
#include <stdlib.h>
#include "s2plot.h"

int main(int argc, char *argv[])
{
   s2opend("/?", argc, argv);                   /* Prompt for display type */
   s2swin(-1.,1., -1.,1., -1.,1.);              /* Set the window coordinates */
   s2box("BCDET",0,0,"BCDET",0,0,"BCDET",0,0);  /* Draw coordinate box */

   s2textxy(-1.0, 0.0, 0.0, "Press F1 twice to see custom help");

   s2help("This is a custom help message - press F1 again to toggle off!");

   s2show(1);                                   /* Open the s2plot window */

   return 1;
}

Back to S2PLOT function list.


Personal tools