diff options
author | Pixel <Pixel> | 2001-12-08 13:57:52 +0000 |
---|---|---|
committer | Pixel <Pixel> | 2001-12-08 13:57:52 +0000 |
commit | a83a43e57be59ed407d98f465d02953af5ae0160 (patch) | |
tree | 91aa1ea4a24e5b85ef26686828054e858cec21aa /src | |
parent | c54dfe9b844f6c5d8969669f5144e721e2af82b0 (diff) |
*hum* some changes...
Diffstat (limited to 'src')
-rw-r--r-- | src/Main.cc | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/src/Main.cc b/src/Main.cc index e624478..2bd0b0a 100644 --- a/src/Main.cc +++ b/src/Main.cc @@ -15,6 +15,8 @@ #include "Confirm.h" #include "Table.h" #include "InPipe.h" +#include "Image.h" +#include "CopyJob.h" InPipe * in; @@ -23,8 +25,8 @@ class ad_t : public Action { ad_t() : Action("menu6") { } virtual ~ad_t() { } virtual String GetTitle() { return "Action dynamique"; } - virtual Task * Do(Variables * v, Handle * h) { - String ut, un; + virtual Task * Do(Variables * v, Variables * hds, Handle * h) { + String ut, un, shds; if (!fork()) { execlp("uptime", "uptime", NULL); @@ -38,11 +40,22 @@ class ad_t : public Action { (*in) >> un; wait(NULL); + for (int i = 0; i < hds->GetNb(); i++) { + shds += (*hds)[i] + "<BR>\n"; + } + Action * m = new Message("Action dynamique", String("Vous avez choisi l'action dynamique. L'uptime de la machine est '") + - ut + "' et sa définition complète est '" + un + "'", ""); + ut + "' et sa définition complète est '" + un + "'<BR><BR><BR>Voici la liste des entêtes:<BR><BR>" + shds, ""); + + Task * t = m->Do(v, hds, h); + + Image * testimg = new Image(100, 100); + testimg->Prepare(); + + Output * testoutput = new Output("TestImg.tga"); - Task * t = m->Do(v, h); + new CopyJob(testimg, testoutput, -1, true, true); delete m; return t; @@ -61,10 +74,10 @@ String Titres[] = {"Titre 1", "Titre 2", "Titre 3"}; String Cells[] = {"L1C1", "L1C2", "L1C3", "L2C1", "L2C2", "L2C3", "L3C1", "L3C2", "L3C3", "L4C1", "L4C2", "L4C3"}; Action * a1 = new Message("Action 1", "Vous avez cliqué sur l'option 1 du menu", "menu1"); Action * a2 = new Table("Petite table", "menu2", Titres, Cells, 3, 4); -Action * a3 = new Message("Schéma EA", +Action * a3 = new Message("Test d'image", "Voici un test d'affichage d'image:" "<center><table border=0><td><tr><img src=\"/image/nobis-logo-small.jpg\"></tr></td></table></center>", -"schemaea"); +"menu3"); Action * a4 = new Form("Test de formulaire...", "menu4", "Rentrez des trucs...", Noms, Invites, Defaults, Lists, Descs, 3); Action * a5 = new Confirm("Confirmation", "Oui ou non?", "menu5", 0, 0); Action * java = new Message("Applet JAVA", |