Annotation of researchv9/jtools/src/pads/host/help.c, revision 1.1.1.1

1.1       root        1: #include <pads.pub>
                      2: SRCFILE("help.c")
                      3: 
                      4: char *HelpFile[] = {
                      5: "The generic behavior of Pads:",
                      6: " ",
                      7: "Mouse:",
                      8: "LEFT:   select window; select line; move scroll bar",
                      9: "MIDDLE: line menu; sweep window",
                     10: "RIGHT:  window menu; move, sweep, select, window",
                     11: " ",
                     12: "         MIDDLE          RIGHT",
                     13: " ",
                     14: "          line          window",
                     15: "        specific       specific",
                     16: "       operations     operations",
                     17: "       ~~~~~~~~~~     ~~~~~~~~~~",
                     18: "          line          window",
                     19: "        generics       generics",
                     20: " ",
                     21: "'sever' removes the selected line and those above it.",
                     22: "'fold' and 'truncate' toggle right-hand wrap of lines",
                     23: "wider than the window.  Move cursor over the arrow in",
                     24: "'top ->' for a sub-menu of all windows.",
                     25: " ",
                     26: "Keyboard:",
                     27: "Characters from the keyboard accumulate at the bottom",
                     28: "of the layer. The window or line currently associated",
                     29: "with the keyboard, if any, flashes at each keystroke.",
                     30: "At carriage return, the text is sent to the window or",
                     31: "line. Each window or line that accepts keyboard input",
                     32: "displays help in response to '?'. ESCAPE key gets mux",
                     33: "snarf buffer. '<shell cmd' gets each line of standard",
                     34: "output. '>shell cmd' sends selected line or window as",
                     35: "standard input.",
                     36: 0 };
                     37: 
                     38: class Help : public PadRcv {
                     39:        Pad     *pad;
                     40:        int     lines;
                     41:        void    linereq(long,Attrib=0);
                     42: public:
                     43:                Help();
                     44: };
                     45: 
                     46: Help::Help()
                     47: {
                     48:        trace( "%d.Help()", this );
                     49:        for( lines = 1; HelpFile[lines]; ++lines ) {}
                     50:        pad = new Pad( (PadRcv*) this );
                     51:        pad->lines(lines);
                     52:        pad->options(TRUNCATE);
                     53:        pad->banner( "Help:" );
                     54:        pad->name( "help" );
                     55: }
                     56: 
                     57: void Help::linereq(long l, Attrib)
                     58: {
                     59:        trace( "%d.linereq(%d)", this, l );
                     60:        if( l>=1 && l<=lines )
                     61:                pad->insert( l, HelpFile[l-1] );
                     62: }
                     63: 
                     64: void NewHelp()
                     65: {
                     66:        new Help;
                     67: }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.