Index: trunk/IPs/systemC/processor/Morpheo/Tools/Viewer/Graphics/include/window.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Tools/Viewer/Graphics/include/window.h	(revision 20)
+++ trunk/IPs/systemC/processor/Morpheo/Tools/Viewer/Graphics/include/window.h	(revision 30)
@@ -14,4 +14,6 @@
 
 #include <iostream>
+#include <cmath>
+#include <sstream>
 #include <qstring.h>
 #include <qapplication.h>
@@ -36,4 +38,7 @@
 #include <qtreeview.h>
 #include <qdirmodel.h>
+#include <qevent.h>
+#include <qfiledialog.h>
+
 
 #include "Tools/Viewer/Parser/include/parser.h"
@@ -44,4 +49,7 @@
 #define EAST 2
 #define WEST 3
+
+#define MARGEX 50
+#define MARGEY 70
 
 using namespace morpheo::tools::viewer::parser;
@@ -62,35 +70,49 @@
 
   Window(QString name);
-  void _setParse(Parse *p);  
-  void _init_file();    
+  void _setParse(Parse *p);  //parse the base
+  void _init_file();    //search component and port before drawing
  private slots:
     
-  void _open();
-  void _open_end();
-  void _open_error();
+  void _open(); //open a file
+ void _open_error();
 
-  void _save();
+  void _save(); //save a file
   void _saveAs();
   void _saveAsOk();
-  void _close();
-  void _quit();
+
+  void _close(); //close a file
+
+  void _quit(); //quit a file
   void _quit2();
-  void _zoomIn();
+
+  void _zoomIn(); //zoom for the architecture view
   void _zoomOut();
   void _defautZoom();
-  void _level();
-  void _informations();
-  void _parameters();
-  void _about();
 
- private:
+  void _level();  
+  void _informations(); //show or hide informations window
+  void _parameters(); //show or hide parameters window
+  void _about(); //about the programm
+  void _component_name(); //show or hide the components name
+  void _signal_name(); //show or hide the signals name
 
-  void wparameters();
-  void winformations();
-  void paintEvent( QPaintEvent * );
-  void repaint();
-  void drawPort(int x,int y,int pos,string dir);
+  void _back();//return to the previous view
+  void _cancel_selection();
+  void _apply();
 
-  QList <Port> port_east;
+ protected :
+  void mousePressEvent (QMouseEvent *); //mouse handler when mouse pressed
+  void mouseMoveEvent (QMouseEvent *); //mouse handler in other case
+ private :
+  void wparameters(); // parameters window builder
+  void winformations(); //informations window builder
+  void paintEvent( QPaintEvent * ); //drawing panel
+  void repaint(); //repaint the panel with current parameters
+  void drawPort(int x,int y,int pos,string dir); //draw the components ports
+  void write_name(string name); //write the name of the component clicked name in the informations window
+  void write_comment(string comment);
+  void write_type(string t);
+
+  QList <Port> port_east; //ports lists
   QList <Port> port_west;
   QList <Port> port_north;
@@ -98,16 +120,20 @@
   QList <Component> *compo;
 
-  QWidget *wparam;
+  QWidget *wparam;//windows widget (informations, parameters, open, save ...)
   QWidget *winfo;
   QWidget *ws;
   QWidget *wq;
-  QWidget *wo;
   QWidget *wa;
 
-  Parse *parse;
-  BaseV *base;
-  BaseP p;
-  Entity *entity;
-  Coord *c;
+  QWidget *mess_charg;
+  QWidget *mess;
+  QBoxLayout *informations; //informations box
+  QBoxLayout *parameters; //parameters box
+
+  Parse *parse; //the parser
+  BaseV *base; //the current BaseV
+  BaseP p; //the current BaseP
+  Entity *entity; //entity of current base
+  Coord *c; 
  
   QPainter painter;
@@ -115,14 +141,23 @@
   QStatusBar *status;
 
-  QLineEdit *file_name;
-  QString current_name;
+  QLineEdit *file_name; //retrieve the name user wants to open from the open window
+  QString current_name; //name of the current file opened
 
-  int window_height;
+  /*items of the informations window*/
+  QLabel *lname;//name of the component clicked
+  QLabel *ln;
+  QLineEdit *comment;//comment associated with the component clicked
+  QLabel *lt;
+  QLabel *ltype;//type of the component
+  
+  int level; //level of architecture
+  int mouseX; //mouse position
+  int mouseY;
+
+  int window_height; //main window size
   int window_width;
-  int panel_heigth;
-  int panel_width;
-  int margeX;
+  int margeX;//size of the marge
   int margeY;
-  int portX;
+  int portX;//port size, position and size of components, used when drawing the architecture
   int portY;
   int posX;
@@ -131,17 +166,27 @@
   int tailleY;
 
-  bool save_as;
+  int cpt_level;
+  QString tab[50];
+
+  QString father;//father name
+  QString current;//name of the current architecture visible
+
+  bool save_as; 
   bool first_save;
-  bool info_open;
-  bool param_open;
-  bool is_save;
-  bool paint;
-  bool wq_open;
-  bool wo_open;
-  bool ws_open;
+  bool info_open; //know if the informations window opened or not
+  bool param_open; //know if the parameters window opened or not
+  bool is_save; //know if the file has been saved
+  bool paint; //(re)paint or not
+  bool wq_open; //know if Quit/Open ( 2 windows possible)/Save window is open
   bool wa_open;
-  bool quit_demand;
-  bool file_open;
-  bool is_parse;
+  bool quit_demand;//know if user clicked on "quit" (used for saving file before quit)
+  bool file_open;//know if a file is still open (used if user wants to open another file)
+  bool signalName;//show or hide signals name
+  bool componentName;//show or hide components name
+  bool charg_open;//back chargement message box opened or not
+  bool mess_open;//chargment message box opened or not
+  bool component_clicked;//if user clicked on a component to modify its parameters
+
+
 };
       };
