Changeset 484 in Sophya for trunk/SophyaPI


Ignore:
Timestamp:
Oct 21, 1999, 9:59:23 AM (26 years ago)
Author:
ercodmgr
Message:

Ajout help et amelioration Help2TeX , Reza 21/10/99

Location:
trunk/SophyaPI/PIext
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaPI/PIext/basexecut.cc

    r463 r484  
    11111111usage += "\n  Related commands: newwin zone stacknext gratt"; 
    11121112piac->RegisterHelp(kw, usage, grp);
    1113  
    1114 }
     1113
     1114kw = "PIConsole";
     1115usage = "Text output area and command editing window (console) \n";
     1116usage += ">>>> Mouse controls : \n";
     1117usage += "o Button-1: Rectangle selection for copy/paste \n";
     1118usage += "o Button-2: Paste text in the command editing line \n";
     1119usage += "o Button-3: activate display option menu \n";
     1120usage += ">>>> Keyboard controls : \n";
     1121usage += "o <Alt>O : activate display option menu   \n";
     1122usage += "o <Alt>V : Paste text in the command editing line \n";
     1123usage += "o <Alt>A : Selection of the whole window for copy \n";
     1124usage += "o <Alt>L : Command history (List of command history buffer) \n";
     1125usage += "o <Ctl>A : Command editing -> Goto the beginning of line \n";
     1126usage += "o <Ctl>E : Command editing -> Goto the end of line \n";
     1127usage += "o <Ctl>K : Command editing -> Clear to the end of line \n";
     1128usage += "o <Ctl>C : Command editing -> Clear the line \n";
     1129usage += "o Cursor left,right : Command editing -> Move cursor \n";
     1130usage += "o Cursor Up,Down : recall command from history buffer \n";
     1131usage += "o Backspace,Del : Command editing \n";
     1132usage += "o <Return>,<Enter> : Execute command \n";
     1133piac->RegisterHelp(kw, usage, grp);
     1134}
  • trunk/SophyaPI/PIext/piacmd.cc

    r463 r484  
    918918CmdHGroup::iterator it;
    919919for(it = cmdhgrp.begin(); it != cmdhgrp.end(); it++)
    920   fprintf(fip,"\\item {\\bf %s } \n", (*it).first.c_str());
     920  fprintf(fip,"\\item {\\bf %s }  (p. \\pageref{%s}) \n",
     921         (*it).first.c_str(), (*it).first.c_str());
    921922
    922923fputs("\\end{itemize} \n",fip);
     924
     925fputs("\\newpage \n",fip);
     926
     927CmdExmap::iterator ite;
     928fputs("% ----- Liste de toutes les commandes ----- \n",fip);
     929fputs("\\begin{center} \n ", fip);
     930fputs("\\rule{2cm}{1mm} List of {\\bf piapp} Help items \\rule{2cm}{1mm} \n", fip);
     931fputs("\n \n  \\vspace{5mm} \n",fip);
     932fputs("\\begin{tabular}{llllll}  \n", fip);
     933int kt = 0;
     934for(ite = helpexmap.begin(); ite != helpexmap.end(); ite++) {
     935  fprintf(fip,"%s & p. \\pageref{%s} ", (*ite).first.c_str(),  (*ite).first.c_str() );
     936  kt++;
     937  if (kt < 3) fputs(" & ", fip);
     938  else  { fputs(" \\\\  \n", fip);  kt = 0; }
     939  }
     940if (kt == 1) fputs("  &  &  &   \\\\  \n", fip);
     941else if (kt == 2)  fputs("  &   \\\\  \n", fip);
     942fputs("\\end{tabular} \n", fip);
     943fputs("\\end{center} \n", fip);
     944fputs("\n \n \\vspace{1cm} \n",fip);
     945
     946fputs("\\begin{center} \n ", fip);
     947fputs("\\rule{2cm}{1mm} List of {\\bf piapp} Commands \\rule{2cm}{1mm} \n", fip);
     948fputs("\n \n  \\vspace{5mm} \n",fip);
     949fputs("\\begin{tabular}{llllll} \n", fip);
     950kt = 0;
     951for(ite = cmdexmap.begin(); ite != cmdexmap.end(); ite++) {
     952  fprintf(fip,"%s & p. \\pageref{%s} ", (*ite).first.c_str(), (*ite).first.c_str() );
     953  kt++;
     954  if (kt < 3) fputs(" & ", fip);
     955  else  { fputs(" \\\\  \n", fip);  kt = 0; }
     956  }
     957if (kt == 1) fputs("  &  &  &   \\\\  \n", fip);
     958else if (kt == 2)  fputs("  &   \\\\  \n", fip);
     959fputs("\\end{tabular} \n", fip);
     960fputs("\\end{center} \n", fip);
     961// fputs("\\newline \n",fip);
    923962
    924963fputs("% ----- Liste des commandes dans chaque groupe ----- \n",fip);
    925964fputs("\\newpage \n",fip);
    926 CmdExmap::iterator ite;
    927965int gid;
    928966for(it = cmdhgrp.begin(); it != cmdhgrp.end(); it++) {
    929967  gid = (*it).second;
    930968  if (gid == 0)  continue;
    931   fprintf(fip,"\\subsection{%s} \n", (*it).first.c_str());
     969  fprintf(fip,"\\subsection{%s} \\label{%s} \n",
     970          (*it).first.c_str(), (*it).first.c_str());
    932971  for(ite = helpexmap.begin(); ite != helpexmap.end(); ite++) {
    933972    if ((*ite).second.group != gid)  continue;
    934     fprintf(fip,"{ \\Large $ \\star \\star \\star $ }  Help item {\\bf \\Large %s } \n",
    935             (*ite).first.c_str());
     973    fprintf(fip,"{ \\Large $ \\star \\star \\star $ }  Help item {\\bf \\Large %s } \\label{%s} \n",
     974            (*ite).first.c_str(), (*ite).first.c_str());
    936975    fputs("\\begin{verbatim} \n",fip);
    937976    fprintf(fip,"%s\n", (*ite).second.us.c_str());
     
    940979  for(ite = cmdexmap.begin(); ite != cmdexmap.end(); ite++) {
    941980    if ((*ite).second.group != gid)  continue;
    942     fprintf(fip,"{ \\Large $ \\star \\star \\star $ }  Command {\\bf \\Large %s } \n",
    943             (*ite).first.c_str());
     981    fprintf(fip,"{ \\Large $ \\star \\star \\star $ }  Command {\\bf \\Large %s } \\label{%s} \n",
     982            (*ite).first.c_str(), (*ite).first.c_str());
    944983    fputs("\\begin{verbatim} \n",fip);
    945984    fprintf(fip,"%s\n", (*ite).second.us.c_str());
  • trunk/SophyaPI/PIext/piacmd.h

    r463 r484  
    6161
    6262  virtual void          RegisterCommand(string& keyw, string& usage, CmdExecutor * ce,
    63                                         string grp="Command");
     63                                        string grp="Commands");
    6464  virtual void          RegisterHelp(string& keyw, string& usage, string& grp);
    6565  virtual void          LoadModule(string& fnameso, string& name);
Note: See TracChangeset for help on using the changeset viewer.