summaryrefslogtreecommitdiff
path: root/src/Main.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/Main.cc')
-rw-r--r--src/Main.cc33
1 files changed, 10 insertions, 23 deletions
diff --git a/src/Main.cc b/src/Main.cc
index c9a7147..e624478 100644
--- a/src/Main.cc
+++ b/src/Main.cc
@@ -14,18 +14,9 @@
#include "Form.h"
#include "Confirm.h"
#include "Table.h"
+#include "InPipe.h"
-class InPipe : public Handle {
- public:
- InPipe(int in, int out) : Handle(in), m_out(out) { };
- virtual ~InPipe() {}
- int GetOut(void) { return m_out; }
- virtual bool CanWrite(void) { return false; }
- virtual bool CanRead(void) { return true; }
- virtual String GetName(void) { return "Input pipe"; }
- private:
- int m_out;
-} * in;
+InPipe * in;
class ad_t : public Action {
public:
@@ -71,16 +62,17 @@ String Cells[] = {"L1C1", "L1C2", "L1C3", "L2C1", "L2C2", "L2C3", "L3C1", "L3C2"
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",
-"Voici le Schéma EA de cette application."
-"<center><table border=0><td><tr><img src=\"/image/schemaea.png\"></tr></td></table></center>",
+"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");
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",
"
-<APPLET CODE = \"/image/HelloSwingApplet.class\" WIDTH = 400 HEIGHT = 50>
-
+<center>
+<APPLET CODE = \"TestApplet.class\" CODEBASE =\"/image\" WIDTH = 400 HEIGHT = 50>
</APPLET>
+</center>
", "java");
Action * Liste[] = {a1, a2, a3, a4, a5, ad, java};
@@ -91,20 +83,15 @@ Action * buildmenu(void) {
}
int main(int argc, char ** argv) {
- int p[2], c;
+ int c;
String port = "1500";
list<String> testlist;
testlist.push_front("poide");
- if (pipe(p)) {
- cerr << "Error creating pipe.\n";
- exit(-1);
- }
+ in = new InPipe();
- close(1);
- dup(p[1]);
- in = new InPipe(p[0], p[1]);
+ in->Hook();
String test = "poide\n", r;
cout << test;