Index: trunk/SophyaPI/PI/Makefile
===================================================================
--- trunk/SophyaPI/PI/Makefile	(revision 2132)
+++ trunk/SophyaPI/PI/Makefile	(revision 2138)
@@ -1,12 +1,17 @@
+MODULECXXREPNAME := PI
+MODULEDECCXXFLAGS := -msg_quiet
 include ../Mgr/Makefile.h
  
 all: $(LIB)libPI.a
-clean:
-	rm -f $(OBJ)lut.o $(OBJ)parradapter.o $(OBJ)pi3ddrw.o $(OBJ)piapplgen.o $(OBJ)piapplmac.o $(OBJ)piapplx.o $(OBJ)piaxes.o $(OBJ)piaxestools.o $(OBJ)pibwdggen.o $(OBJ)pibwdgmac.o $(OBJ)pibwdgx.o $(OBJ)picmap.o $(OBJ)picmapgen.o $(OBJ)picmapmac.o $(OBJ)picmapview.o $(OBJ)picmapx.o $(OBJ)picons.o $(OBJ)picontainergen.o $(OBJ)picontainermac.o $(OBJ)picontainerx.o $(OBJ)pidrawer.o $(OBJ)pidrawwin.o $(OBJ)pidrwtools.o $(OBJ)pieldrw.o $(OBJ)pierrdisp.o $(OBJ)pievthandler.o $(OBJ)pifilechogen.o $(OBJ)pifilechomac.o $(OBJ)pifilechox.o $(OBJ)pifontgen.o $(OBJ)pifontmac.o $(OBJ)pifontx.o $(OBJ)pigraph3d.o $(OBJ)pigraphgen.o $(OBJ)pigraphmac.o $(OBJ)pigraphps.o $(OBJ)pigraphuc.o $(OBJ)pigraphx.o $(OBJ)pigratt.o $(OBJ)piimage.o $(OBJ)piimgtools.o $(OBJ)pilistgen.o $(OBJ)pilistmac.o $(OBJ)pilistx.o $(OBJ)pimenubargen.o $(OBJ)pimenubarmac.o $(OBJ)pimenubarx.o $(OBJ)pimenugen.o $(OBJ)pimenumac.o $(OBJ)pimenux.o $(OBJ)pimsghandler.o $(OBJ)pioptmenugen.o $(OBJ)pioptmenumac.o $(OBJ)pioptmenux.o $(OBJ)piperiodmac.o $(OBJ)piperiodx.o $(OBJ)pipixmapgen.o $(OBJ)pipixmapmac.o $(OBJ)pipixmapx.o $(OBJ)pippapplmac.o $(OBJ)pipplist.o $(OBJ)pippmenubar.o $(OBJ)pippoptmenu.o $(OBJ)pippviewadapter.o $(OBJ)pippwindowmac.o $(OBJ)piscdrawwdg.o $(OBJ)pistdwdggen.o $(OBJ)pistdwdgmac.o $(OBJ)pistdwdgx.o $(OBJ)pistzwin.o $(OBJ)pisurfdr.o $(OBJ)pitherm.o $(OBJ)piup.o $(OBJ)piup_def.o $(OBJ)piupdattachment.o $(OBJ)piwdggen.o $(OBJ)piwdgmac.o $(OBJ)piwdgx.o $(OBJ)piwindowgen.o $(OBJ)piwindowmac.o $(OBJ)piwindowx.o $(OBJ)pixtbase.o $(OBJ)piyfxdrw.o $(OBJ)psfile.o $(OBJ)xdispim.o
-	rm -f $(LIB)libPI.a
-$(LIB)libPI.a : $(OBJ)lut.o $(OBJ)parradapter.o $(OBJ)pi3ddrw.o $(OBJ)piapplgen.o $(OBJ)piapplx.o $(OBJ)piaxes.o $(OBJ)piaxestools.o $(OBJ)pibwdggen.o $(OBJ)pibwdgx.o $(OBJ)picmap.o $(OBJ)picmapgen.o $(OBJ)picmapview.o $(OBJ)picmapx.o $(OBJ)picons.o $(OBJ)picontainergen.o $(OBJ)picontainerx.o $(OBJ)pidrawer.o $(OBJ)pidrawwin.o $(OBJ)pidrwtools.o $(OBJ)pieldrw.o $(OBJ)pievthandler.o $(OBJ)pifilechogen.o $(OBJ)pifilechox.o $(OBJ)pifontgen.o $(OBJ)pifontx.o $(OBJ)pigraph3d.o $(OBJ)pigraphgen.o $(OBJ)pigraphps.o $(OBJ)pigraphuc.o $(OBJ)pigraphx.o $(OBJ)pigratt.o $(OBJ)piimage.o $(OBJ)piimgtools.o $(OBJ)pilistgen.o $(OBJ)pilistx.o $(OBJ)pimenubargen.o $(OBJ)pimenubarx.o $(OBJ)pimenugen.o $(OBJ)pimenux.o $(OBJ)pimsghandler.o $(OBJ)pioptmenugen.o $(OBJ)pioptmenux.o $(OBJ)piperiodx.o $(OBJ)pipixmapgen.o $(OBJ)pipixmapx.o $(OBJ)piscdrawwdg.o $(OBJ)pistdwdggen.o $(OBJ)pistdwdgx.o $(OBJ)pistzwin.o $(OBJ)pisurfdr.o $(OBJ)pitherm.o $(OBJ)piwdggen.o $(OBJ)piwdgx.o $(OBJ)piwindowgen.o $(OBJ)piwindowx.o $(OBJ)pixtbase.o $(OBJ)piyfxdrw.o $(OBJ)psfile.o
-	$(ARCXX) $(ARCXXFLAGS) $@ $($(ARARGS))
+$(LIB)libPI.a : $(OBJ)lut.o $(OBJ)parradapter.o $(OBJ)pi3ddrw.o $(OBJ)pi3dwdg.o $(OBJ)piapplgen.o $(OBJ)piapplx.o $(OBJ)piaxes.o $(OBJ)piaxestools.o $(OBJ)pibwdggen.o $(OBJ)pibwdgx.o $(OBJ)picmap.o $(OBJ)picmapgen.o $(OBJ)picmapview.o $(OBJ)picmapx.o $(OBJ)picons.o $(OBJ)picontainergen.o $(OBJ)picontainerx.o $(OBJ)pidrawer.o $(OBJ)pidrawwin.o $(OBJ)pidrwtools.o $(OBJ)pieldrw.o $(OBJ)pievthandler.o $(OBJ)pifilechogen.o $(OBJ)pifilechox.o $(OBJ)pifontgen.o $(OBJ)pifontx.o $(OBJ)pigraph3d.o $(OBJ)pigraphgen.o $(OBJ)pigraphps.o $(OBJ)pigraphuc.o $(OBJ)pigraphx.o $(OBJ)pigratt.o $(OBJ)pigrcoord.o $(OBJ)piimage.o $(OBJ)piimgtools.o $(OBJ)pilineatt.o $(OBJ)pilistgen.o $(OBJ)pilistx.o $(OBJ)pimenubargen.o $(OBJ)pimenubarx.o $(OBJ)pimenugen.o $(OBJ)pimenux.o $(OBJ)pimsghandler.o $(OBJ)pioptmenugen.o $(OBJ)pioptmenux.o $(OBJ)piperiodx.o $(OBJ)pipixmapgen.o $(OBJ)pipixmapx.o $(OBJ)piscdrawwdg.o $(OBJ)pistdwdggen.o $(OBJ)pistdwdgx.o $(OBJ)pistzwin.o $(OBJ)pisurfdr.o $(OBJ)pitherm.o $(OBJ)piwdggen.o $(OBJ)piwdgx.o $(OBJ)piwindowgen.o $(OBJ)piwindowx.o $(OBJ)pixtbase.o $(OBJ)piyfxdrw.o $(OBJ)psfile.o
+	$(AR) $(ARFLAGS)  $@ $($(ARARGS)) 
 ifeq ($(CXX),cxx)
 	$(CXX) $? $(CPPFLAGS) $(CXXFLAGS) -o $(OBJ)xx.x -Hf
+endif 
+ 
+clean:
+	rm -f $(OBJ)lut.o $(OBJ)parradapter.o $(OBJ)pi3ddrw.o $(OBJ)pi3dwdg.o $(OBJ)piapplgen.o $(OBJ)piapplx.o $(OBJ)piaxes.o $(OBJ)piaxestools.o $(OBJ)pibwdggen.o $(OBJ)pibwdgx.o $(OBJ)picmap.o $(OBJ)picmapgen.o $(OBJ)picmapview.o $(OBJ)picmapx.o $(OBJ)picons.o $(OBJ)picontainergen.o $(OBJ)picontainerx.o $(OBJ)pidrawer.o $(OBJ)pidrawwin.o $(OBJ)pidrwtools.o $(OBJ)pieldrw.o $(OBJ)pievthandler.o $(OBJ)pifilechogen.o $(OBJ)pifilechox.o $(OBJ)pifontgen.o $(OBJ)pifontx.o $(OBJ)pigraph3d.o $(OBJ)pigraphgen.o $(OBJ)pigraphps.o $(OBJ)pigraphuc.o $(OBJ)pigraphx.o $(OBJ)pigratt.o $(OBJ)pigrcoord.o $(OBJ)piimage.o $(OBJ)piimgtools.o $(OBJ)pilineatt.o $(OBJ)pilistgen.o $(OBJ)pilistx.o $(OBJ)pimenubargen.o $(OBJ)pimenubarx.o $(OBJ)pimenugen.o $(OBJ)pimenux.o $(OBJ)pimsghandler.o $(OBJ)pioptmenugen.o $(OBJ)pioptmenux.o $(OBJ)piperiodx.o $(OBJ)pipixmapgen.o $(OBJ)pipixmapx.o $(OBJ)piscdrawwdg.o $(OBJ)pistdwdggen.o $(OBJ)pistdwdgx.o $(OBJ)pistzwin.o $(OBJ)pisurfdr.o $(OBJ)pitherm.o $(OBJ)piwdggen.o $(OBJ)piwdgx.o $(OBJ)piwindowgen.o $(OBJ)piwindowx.o $(OBJ)pixtbase.o $(OBJ)piyfxdrw.o $(OBJ)psfile.o
+ifeq ($(CXX),cxx)
+	cd $(REPM); rm -f *.o
 endif 
  
@@ -17,10 +22,16 @@
  $(INC)machdefs.h pidrawer.h pibwdggen.h \
  piwdgx.h piwdggen.h pimsghandler.h picolist.h picmap.h picmapx.h \
- picmapgen.h pigraphx.h pigraphgen.h pifontx.h pifontgen.h pigraphuc.h \
- pievthandler.h psfile.h pigratt.h piaxes.h pieldrw.h pigraph3d.h \
- pibwdgx.h pigraphps.h pidrwtools.h pistdwdgx.h pistdwdggen.h \
- pioptmenux.h pioptmenugen.h pimenux.h pimenugen.h piwindowx.h \
- piwindowgen.h picontainerx.h picontainergen.h piapplx.h piapplgen.h \
- pimenubarx.h pimenubargen.h picons.h
+ picmapgen.h pigraphx.h pigraphgen.h pifontx.h pifontgen.h pigrcoord.h \
+ pilineatt.h pigraphuc.h pievthandler.h psfile.h pigratt.h piaxes.h \
+ pieldrw.h pigraph3d.h
+$(OBJ)pi3dwdg.o: pi3dwdg.cc pi3dwdg.h pisysdep.h \
+ $(INC)machdefs.h pi3ddrw.h pidrawer.h \
+ pibwdggen.h piwdgx.h piwdggen.h pimsghandler.h picolist.h picmap.h \
+ picmapx.h picmapgen.h pigraphx.h pigraphgen.h pifontx.h pifontgen.h \
+ pigrcoord.h pilineatt.h pigraphuc.h pievthandler.h psfile.h pigratt.h \
+ piaxes.h pieldrw.h pigraph3d.h pibwdgx.h pigraphps.h pidrwtools.h \
+ pistdwdgx.h pistdwdggen.h pioptmenux.h pioptmenugen.h pimenux.h \
+ pimenugen.h piwindowx.h piwindowgen.h picontainerx.h picontainergen.h \
+ piapplx.h piapplgen.h pimenubarx.h pimenubargen.h picons.h
 $(OBJ)piapplgen.o: piapplgen.cc piapplgen.h pimsghandler.h \
  $(INC)machdefs.h pisysdep.h picontainerx.h \
@@ -28,6 +39,6 @@
  pimenubargen.h pimenux.h pimenugen.h picons.h pistdwdgx.h \
  pistdwdggen.h pibwdgx.h pibwdggen.h picmap.h picmapx.h picmapgen.h \
- pigraphx.h pigraphgen.h pifontx.h pifontgen.h pigraphuc.h \
- pievthandler.h psfile.h pigraphps.h
+ pigraphx.h pigraphgen.h pifontx.h pifontgen.h pigrcoord.h pilineatt.h \
+ pigraphuc.h pievthandler.h psfile.h pigraphps.h
 $(OBJ)piapplx.o: piapplx.cc piapplx.h piapplgen.h pimsghandler.h \
  $(INC)machdefs.h pisysdep.h picontainerx.h \
@@ -35,17 +46,17 @@
  pimenubargen.h pimenux.h pimenugen.h picons.h pistdwdgx.h \
  pistdwdggen.h pibwdgx.h pibwdggen.h picmap.h picmapx.h picmapgen.h \
- pigraphx.h pigraphgen.h pifontx.h pifontgen.h pigraphuc.h \
- pievthandler.h psfile.h pigraphps.h
+ pigraphx.h pigraphgen.h pifontx.h pifontgen.h pigrcoord.h pilineatt.h \
+ pigraphuc.h pievthandler.h psfile.h pigraphps.h
 $(OBJ)piaxes.o: piaxes.cc $(INC)machdefs.h piaxes.h \
  pigraphuc.h pisysdep.h pigraphgen.h piwdgx.h piwdggen.h \
  pimsghandler.h picolist.h picmap.h picmapx.h picmapgen.h pifontx.h \
- pifontgen.h pigratt.h
+ pifontgen.h pigrcoord.h pilineatt.h pigratt.h
 $(OBJ)piaxestools.o: piaxestools.cc piaxes.h pigraphuc.h pisysdep.h \
  $(INC)machdefs.h pigraphgen.h piwdgx.h \
  piwdggen.h pimsghandler.h picolist.h picmap.h picmapx.h picmapgen.h \
- pifontx.h pifontgen.h pigratt.h piaxestools.h pistdwdgx.h \
- pistdwdggen.h pioptmenux.h pioptmenugen.h pimenux.h pimenugen.h \
- piwindowx.h piwindowgen.h picontainerx.h picontainergen.h piapplx.h \
- piapplgen.h pimenubarx.h pimenubargen.h picons.h pibwdgx.h \
+ pifontx.h pifontgen.h pigrcoord.h pilineatt.h pigratt.h piaxestools.h \
+ pistdwdgx.h pistdwdggen.h pioptmenux.h pioptmenugen.h pimenux.h \
+ pimenugen.h piwindowx.h piwindowgen.h picontainerx.h picontainergen.h \
+ piapplx.h piapplgen.h pimenubarx.h pimenubargen.h picons.h pibwdgx.h \
  pibwdggen.h pigraphx.h pievthandler.h psfile.h pigraphps.h \
  piscdrawwdg.h pidrawer.h pieldrw.h
@@ -53,14 +64,15 @@
  $(INC)machdefs.h piwdgx.h piwdggen.h \
  pimsghandler.h picolist.h picmap.h picmapx.h picmapgen.h pigraphx.h \
- pigraphgen.h pifontx.h pifontgen.h pigraphuc.h pievthandler.h \
- psfile.h pidrawer.h pigratt.h piaxes.h pigraphps.h pidrwtools.h \
- pistdwdgx.h pistdwdggen.h pioptmenux.h pioptmenugen.h pimenux.h \
- pimenugen.h piwindowx.h piwindowgen.h picontainerx.h picontainergen.h \
- piapplx.h piapplgen.h pimenubarx.h pimenubargen.h picons.h pibwdgx.h
+ pigraphgen.h pifontx.h pifontgen.h pigrcoord.h pilineatt.h \
+ pigraphuc.h pievthandler.h psfile.h pidrawer.h pigratt.h piaxes.h \
+ pigraphps.h pidrwtools.h pistdwdgx.h pistdwdggen.h pioptmenux.h \
+ pioptmenugen.h pimenux.h pimenugen.h piwindowx.h piwindowgen.h \
+ picontainerx.h picontainergen.h piapplx.h piapplgen.h pimenubarx.h \
+ pimenubargen.h picons.h pibwdgx.h
 $(OBJ)pibwdgx.o: pibwdgx.cc pixtbaseP.h pibwdgx.h pisysdep.h \
  $(INC)machdefs.h pibwdggen.h piwdgx.h \
  piwdggen.h pimsghandler.h picolist.h picmap.h picmapx.h picmapgen.h \
- pigraphx.h pigraphgen.h pifontx.h pifontgen.h pigraphuc.h \
- pievthandler.h psfile.h pigraphps.h pixtbase.h
+ pigraphx.h pigraphgen.h pifontx.h pifontgen.h pigrcoord.h pilineatt.h \
+ pigraphuc.h pievthandler.h psfile.h pigraphps.h pixtbase.h
 $(OBJ)picmap.o: picmap.cc picmap.h pisysdep.h \
  $(INC)machdefs.h picmapx.h picmapgen.h
@@ -70,6 +82,6 @@
  $(INC)machdefs.h pibwdgx.h pibwdggen.h \
  piwdgx.h piwdggen.h pimsghandler.h picolist.h picmap.h picmapx.h \
- picmapgen.h pigraphx.h pigraphgen.h pifontx.h pifontgen.h pigraphuc.h \
- pievthandler.h psfile.h pigraphps.h
+ picmapgen.h pigraphx.h pigraphgen.h pifontx.h pifontgen.h pigrcoord.h \
+ pilineatt.h pigraphuc.h pievthandler.h psfile.h pigraphps.h
 $(OBJ)picmapx.o: picmapx.cc piwdgx.h piwdggen.h \
  $(INC)machdefs.h pimsghandler.h picolist.h \
@@ -80,5 +92,6 @@
  pistdwdggen.h picontainerx.h picontainergen.h pibwdgx.h pibwdggen.h \
  picmap.h picmapx.h picmapgen.h pigraphx.h pigraphgen.h pifontx.h \
- pifontgen.h pigraphuc.h pievthandler.h psfile.h pigraphps.h
+ pifontgen.h pigrcoord.h pilineatt.h pigraphuc.h pievthandler.h \
+ psfile.h pigraphps.h
 $(OBJ)picontainergen.o: picontainergen.cc picontainergen.h pisysdep.h \
  $(INC)machdefs.h piwdgx.h piwdggen.h \
@@ -90,16 +103,17 @@
  pidrawer.h pibwdggen.h pisysdep.h piwdgx.h piwdggen.h pimsghandler.h \
  picolist.h picmap.h picmapx.h picmapgen.h pigraphx.h pigraphgen.h \
- pifontx.h pifontgen.h pigraphuc.h pievthandler.h psfile.h pigratt.h \
- piaxes.h pidrwtools.h pistdwdgx.h pistdwdggen.h pioptmenux.h \
- pioptmenugen.h pimenux.h pimenugen.h piwindowx.h piwindowgen.h \
- picontainerx.h picontainergen.h piapplx.h piapplgen.h pimenubarx.h \
- pimenubargen.h picons.h pibwdgx.h pigraphps.h ucckprot.h
+ pifontx.h pifontgen.h pigrcoord.h pilineatt.h pigraphuc.h \
+ pievthandler.h psfile.h pigratt.h piaxes.h pidrwtools.h pistdwdgx.h \
+ pistdwdggen.h pioptmenux.h pioptmenugen.h pimenux.h pimenugen.h \
+ piwindowx.h piwindowgen.h picontainerx.h picontainergen.h piapplx.h \
+ piapplgen.h pimenubarx.h pimenubargen.h picons.h pibwdgx.h \
+ pigraphps.h ucckprot.h
 $(OBJ)pidrawwin.o: pidrawwin.cc pidrawwin.h pisysdep.h \
  $(INC)machdefs.h piwindowx.h piwindowgen.h \
  picontainerx.h picontainergen.h piwdgx.h piwdggen.h pimsghandler.h \
  picolist.h piscdrawwdg.h pibwdgx.h pibwdggen.h picmap.h picmapx.h \
- picmapgen.h pigraphx.h pigraphgen.h pifontx.h pifontgen.h pigraphuc.h \
- pievthandler.h psfile.h pigraphps.h pistdwdgx.h pistdwdggen.h \
- pidrawer.h pigratt.h piaxes.h pieldrw.h
+ picmapgen.h pigraphx.h pigraphgen.h pifontx.h pifontgen.h pigrcoord.h \
+ pilineatt.h pigraphuc.h pievthandler.h psfile.h pigraphps.h \
+ pistdwdgx.h pistdwdggen.h pidrawer.h pigratt.h piaxes.h pieldrw.h
 $(OBJ)pidrwtools.o: pidrwtools.cc pidrwtools.h pisysdep.h \
  $(INC)machdefs.h pistdwdgx.h pistdwdggen.h \
@@ -108,16 +122,17 @@
  picontainerx.h picontainergen.h piapplx.h piapplgen.h pimenubarx.h \
  pimenubargen.h picons.h pibwdgx.h pibwdggen.h picmap.h picmapx.h \
- picmapgen.h pigraphx.h pigraphgen.h pifontx.h pifontgen.h pigraphuc.h \
- pievthandler.h psfile.h pigraphps.h piscdrawwdg.h pidrawer.h \
- pigratt.h piaxes.h pieldrw.h pi3ddrw.h pigraph3d.h
+ picmapgen.h pigraphx.h pigraphgen.h pifontx.h pifontgen.h pigrcoord.h \
+ pilineatt.h pigraphuc.h pievthandler.h psfile.h pigraphps.h \
+ piscdrawwdg.h pidrawer.h pigratt.h piaxes.h pieldrw.h pi3dwdg.h \
+ pi3ddrw.h pigraph3d.h
 $(OBJ)pieldrw.o: pieldrw.cc $(INC)machdefs.h \
  pieldrw.h pidrawer.h pibwdggen.h pisysdep.h piwdgx.h piwdggen.h \
  pimsghandler.h picolist.h picmap.h picmapx.h picmapgen.h pigraphx.h \
- pigraphgen.h pifontx.h pifontgen.h pigraphuc.h pievthandler.h \
- psfile.h pigratt.h piaxes.h
+ pigraphgen.h pifontx.h pifontgen.h pigrcoord.h pilineatt.h \
+ pigraphuc.h pievthandler.h psfile.h pigratt.h piaxes.h
 $(OBJ)pievthandler.o: pievthandler.cc pievthandler.h pisysdep.h \
  $(INC)machdefs.h pimsghandler.h piwdgx.h \
  piwdggen.h picolist.h pigraphx.h pigraphgen.h picmap.h picmapx.h \
- picmapgen.h pifontx.h pifontgen.h
+ picmapgen.h pifontx.h pifontgen.h pigrcoord.h pilineatt.h
 $(OBJ)pifilechogen.o: pifilechogen.cc pifilechogen.h pisysdep.h \
  $(INC)machdefs.h piwdgx.h piwdggen.h \
@@ -128,11 +143,11 @@
  picolist.h pimenubarx.h pimenubargen.h pimenux.h pimenugen.h picons.h \
  pistdwdgx.h pistdwdggen.h pibwdgx.h pibwdggen.h picmap.h picmapx.h \
- picmapgen.h pigraphx.h pigraphgen.h pifontx.h pifontgen.h pigraphuc.h \
- pievthandler.h psfile.h pigraphps.h pifilechox.h pifilechogen.h \
- piwindowx.h piwindowgen.h
+ picmapgen.h pigraphx.h pigraphgen.h pifontx.h pifontgen.h pigrcoord.h \
+ pilineatt.h pigraphuc.h pievthandler.h psfile.h pigraphps.h \
+ pifilechox.h pifilechogen.h piwindowx.h piwindowgen.h
 $(OBJ)pifontgen.o: pifontgen.cc pigraphgen.h pisysdep.h \
  $(INC)machdefs.h piwdgx.h piwdggen.h \
  pimsghandler.h picolist.h picmap.h picmapx.h picmapgen.h pifontx.h \
- pifontgen.h
+ pifontgen.h pigrcoord.h pilineatt.h
 $(OBJ)pifontx.o: pifontx.cc pisysdep.h \
  $(INC)machdefs.h pifontx.h pifontgen.h \
@@ -141,36 +156,38 @@
  $(INC)machdefs.h pigraphuc.h pigraphgen.h \
  piwdgx.h piwdggen.h pimsghandler.h picolist.h picmap.h picmapx.h \
- picmapgen.h pifontx.h pifontgen.h
+ picmapgen.h pifontx.h pifontgen.h pigrcoord.h pilineatt.h
 $(OBJ)pigraphgen.o: pigraphgen.cc pigraphgen.h pisysdep.h \
  $(INC)machdefs.h piwdgx.h piwdggen.h \
  pimsghandler.h picolist.h picmap.h picmapx.h picmapgen.h pifontx.h \
- pifontgen.h
+ pifontgen.h pigrcoord.h pilineatt.h
 $(OBJ)pigraphps.o: pigraphps.cc pigraphps.h pisysdep.h \
  $(INC)machdefs.h pigraphgen.h piwdgx.h \
  piwdggen.h pimsghandler.h picolist.h picmap.h picmapx.h picmapgen.h \
- pifontx.h pifontgen.h psfile.h
+ pifontx.h pifontgen.h pigrcoord.h pilineatt.h psfile.h
 $(OBJ)pigraphuc.o: pigraphuc.cc $(INC)machdefs.h \
  pigraphuc.h pisysdep.h pigraphgen.h piwdgx.h piwdggen.h \
  pimsghandler.h picolist.h picmap.h picmapx.h picmapgen.h pifontx.h \
- pifontgen.h ucckprot.h
+ pifontgen.h pigrcoord.h pilineatt.h ucckprot.h
 $(OBJ)pigraphx.o: pigraphx.cc pigraphx.h pisysdep.h \
  $(INC)machdefs.h pigraphgen.h piwdgx.h \
  piwdggen.h pimsghandler.h picolist.h picmap.h picmapx.h picmapgen.h \
- pifontx.h pifontgen.h
+ pifontx.h pifontgen.h pigrcoord.h pilineatt.h
 $(OBJ)pigratt.o: pigratt.cc pigratt.h pisysdep.h \
  $(INC)machdefs.h pigraphgen.h piwdgx.h \
  piwdggen.h pimsghandler.h picolist.h picmap.h picmapx.h picmapgen.h \
- pifontx.h pifontgen.h
+ pifontx.h pifontgen.h pigrcoord.h pilineatt.h
+$(OBJ)pigrcoord.o: pigrcoord.cc pigrcoord.h pisysdep.h \
+ $(INC)machdefs.h
 $(OBJ)piimage.o: piimage.cc piimage.h parradapter.h \
  $(INC)machdefs.h lut.h pisysdep.h pieldrw.h \
  pidrawer.h pibwdggen.h piwdgx.h piwdggen.h pimsghandler.h picolist.h \
  picmap.h picmapx.h picmapgen.h pigraphx.h pigraphgen.h pifontx.h \
- pifontgen.h pigraphuc.h pievthandler.h psfile.h pigratt.h piaxes.h \
- pipixmapx.h pipixmapgen.h pibwdgx.h pigraphps.h pistdwdgx.h \
- pistdwdggen.h piwindowx.h piwindowgen.h picontainerx.h \
- picontainergen.h picmapview.h piimgtools.h pioptmenux.h \
- pioptmenugen.h pimenux.h pimenugen.h piapplx.h piapplgen.h \
- pimenubarx.h pimenubargen.h picons.h pidrwtools.h piscdrawwdg.h \
- piyfxdrw.h
+ pifontgen.h pigrcoord.h pilineatt.h pigraphuc.h pievthandler.h \
+ psfile.h pigratt.h piaxes.h pipixmapx.h pipixmapgen.h pibwdgx.h \
+ pigraphps.h pistdwdgx.h pistdwdggen.h piwindowx.h piwindowgen.h \
+ picontainerx.h picontainergen.h picmapview.h piimgtools.h \
+ pioptmenux.h pioptmenugen.h pimenux.h pimenugen.h piapplx.h \
+ piapplgen.h pimenubarx.h pimenubargen.h picons.h pidrwtools.h \
+ piscdrawwdg.h piyfxdrw.h
 $(OBJ)piimgtools.o: piimgtools.cc piimgtools.h pisysdep.h \
  $(INC)machdefs.h pistdwdgx.h pistdwdggen.h \
@@ -179,8 +196,10 @@
  picontainerx.h picontainergen.h piapplx.h piapplgen.h pimenubarx.h \
  pimenubargen.h picons.h pibwdgx.h pibwdggen.h picmap.h picmapx.h \
- picmapgen.h pigraphx.h pigraphgen.h pifontx.h pifontgen.h pigraphuc.h \
- pievthandler.h psfile.h pigraphps.h piimage.h parradapter.h lut.h \
- pieldrw.h pidrawer.h pigratt.h piaxes.h pipixmapx.h pipixmapgen.h \
- picmapview.h
+ picmapgen.h pigraphx.h pigraphgen.h pifontx.h pifontgen.h pigrcoord.h \
+ pilineatt.h pigraphuc.h pievthandler.h psfile.h pigraphps.h piimage.h \
+ parradapter.h lut.h pieldrw.h pidrawer.h pigratt.h piaxes.h \
+ pipixmapx.h pipixmapgen.h picmapview.h
+$(OBJ)pilineatt.o: pilineatt.cc pilineatt.h pisysdep.h \
+ $(INC)machdefs.h
 $(OBJ)pilistgen.o: pilistgen.cc pilistgen.h pisysdep.h \
  $(INC)machdefs.h piwdgx.h piwdggen.h \
@@ -194,6 +213,6 @@
  picontainerx.h picontainergen.h pimenubarx.h picons.h pistdwdgx.h \
  pistdwdggen.h pibwdgx.h pibwdggen.h picmap.h picmapx.h picmapgen.h \
- pigraphx.h pigraphgen.h pifontx.h pifontgen.h pigraphuc.h \
- pievthandler.h psfile.h pigraphps.h
+ pigraphx.h pigraphgen.h pifontx.h pifontgen.h pigrcoord.h pilineatt.h \
+ pigraphuc.h pievthandler.h psfile.h pigraphps.h
 $(OBJ)pimenubarx.o: pimenubarx.cc pimenubarx.h pimenubargen.h pisysdep.h \
  $(INC)machdefs.h pimenux.h pimenugen.h \
@@ -201,6 +220,6 @@
  picontainerx.h picontainergen.h picons.h pistdwdgx.h pistdwdggen.h \
  pibwdgx.h pibwdggen.h picmap.h picmapx.h picmapgen.h pigraphx.h \
- pigraphgen.h pifontx.h pifontgen.h pigraphuc.h pievthandler.h \
- psfile.h pigraphps.h
+ pigraphgen.h pifontx.h pifontgen.h pigrcoord.h pilineatt.h \
+ pigraphuc.h pievthandler.h psfile.h pigraphps.h
 $(OBJ)pimenugen.o: pimenugen.cc pimenugen.h pisysdep.h \
  $(INC)machdefs.h piwdgx.h piwdggen.h \
@@ -220,5 +239,6 @@
  picontainergen.h pimenubarx.h pimenubargen.h picons.h pibwdgx.h \
  pibwdggen.h picmap.h picmapx.h picmapgen.h pigraphx.h pigraphgen.h \
- pifontx.h pifontgen.h pigraphuc.h pievthandler.h psfile.h pigraphps.h
+ pifontx.h pifontgen.h pigrcoord.h pilineatt.h pigraphuc.h \
+ pievthandler.h psfile.h pigraphps.h
 $(OBJ)piperiodx.o: piperiodx.cc piwdgx.h piwdggen.h \
  $(INC)machdefs.h pimsghandler.h picolist.h \
@@ -227,20 +247,21 @@
  $(INC)machdefs.h pibwdgx.h pibwdggen.h \
  piwdgx.h piwdggen.h pimsghandler.h picolist.h picmap.h picmapx.h \
- picmapgen.h pigraphx.h pigraphgen.h pifontx.h pifontgen.h pigraphuc.h \
- pievthandler.h psfile.h pigraphps.h
+ picmapgen.h pigraphx.h pigraphgen.h pifontx.h pifontgen.h pigrcoord.h \
+ pilineatt.h pigraphuc.h pievthandler.h psfile.h pigraphps.h
 $(OBJ)pipixmapx.o: pipixmapx.cc pipixmapx.h pipixmapgen.h pisysdep.h \
  $(INC)machdefs.h pibwdgx.h pibwdggen.h \
  piwdgx.h piwdggen.h pimsghandler.h picolist.h picmap.h picmapx.h \
- picmapgen.h pigraphx.h pigraphgen.h pifontx.h pifontgen.h pigraphuc.h \
- pievthandler.h psfile.h pigraphps.h
+ picmapgen.h pigraphx.h pigraphgen.h pifontx.h pifontgen.h pigrcoord.h \
+ pilineatt.h pigraphuc.h pievthandler.h psfile.h pigraphps.h
 $(OBJ)piscdrawwdg.o: piscdrawwdg.cc \
  $(INC)machdefs.h piscdrawwdg.h pisysdep.h \
  pibwdgx.h pibwdggen.h piwdgx.h piwdggen.h pimsghandler.h picolist.h \
  picmap.h picmapx.h picmapgen.h pigraphx.h pigraphgen.h pifontx.h \
- pifontgen.h pigraphuc.h pievthandler.h psfile.h pigraphps.h \
- pistdwdgx.h pistdwdggen.h piwindowx.h piwindowgen.h picontainerx.h \
- picontainergen.h pidrawer.h pigratt.h piaxes.h pieldrw.h pidrwtools.h \
- pioptmenux.h pioptmenugen.h pimenux.h pimenugen.h piapplx.h \
- piapplgen.h pimenubarx.h pimenubargen.h picons.h piaxestools.h
+ pifontgen.h pigrcoord.h pilineatt.h pigraphuc.h pievthandler.h \
+ psfile.h pigraphps.h pistdwdgx.h pistdwdggen.h piwindowx.h \
+ piwindowgen.h picontainerx.h picontainergen.h pidrawer.h pigratt.h \
+ piaxes.h pieldrw.h pidrwtools.h pioptmenux.h pioptmenugen.h pimenux.h \
+ pimenugen.h piapplx.h piapplgen.h pimenubarx.h pimenubargen.h \
+ picons.h piaxestools.h
 $(OBJ)pistdwdggen.o: pistdwdggen.cc pistdwdggen.h pisysdep.h \
  $(INC)machdefs.h piwdgx.h piwdggen.h \
@@ -255,30 +276,31 @@
  picolist.h piperiodx.h $(INC)periodic.h \
  psfile.h pifontgen.h pigraphgen.h picmap.h picmapx.h picmapgen.h \
- pifontx.h
+ pifontx.h pigrcoord.h pilineatt.h
 $(OBJ)pisurfdr.o: pisurfdr.cc pisurfdr.h parradapter.h \
  $(INC)machdefs.h lut.h pi3ddrw.h pisysdep.h \
  pidrawer.h pibwdggen.h piwdgx.h piwdggen.h pimsghandler.h picolist.h \
  picmap.h picmapx.h picmapgen.h pigraphx.h pigraphgen.h pifontx.h \
- pifontgen.h pigraphuc.h pievthandler.h psfile.h pigratt.h piaxes.h \
- pieldrw.h pigraph3d.h pibwdgx.h pigraphps.h
+ pifontgen.h pigrcoord.h pilineatt.h pigraphuc.h pievthandler.h \
+ psfile.h pigratt.h piaxes.h pieldrw.h pigraph3d.h
 $(OBJ)pitherm.o: pitherm.cc pitherm.h pisysdep.h \
  $(INC)machdefs.h pibwdgx.h pibwdggen.h \
  piwdgx.h piwdggen.h pimsghandler.h picolist.h picmap.h picmapx.h \
- picmapgen.h pigraphx.h pigraphgen.h pifontx.h pifontgen.h pigraphuc.h \
- pievthandler.h psfile.h pigraphps.h
+ picmapgen.h pigraphx.h pigraphgen.h pifontx.h pifontgen.h pigrcoord.h \
+ pilineatt.h pigraphuc.h pievthandler.h psfile.h pigraphps.h
 $(OBJ)piwdggen.o: piwdggen.cc piwdggen.h \
  $(INC)machdefs.h pimsghandler.h picolist.h \
  picontainergen.h pisysdep.h piwdgx.h pievthandler.h pigraphx.h \
  pigraphgen.h picmap.h picmapx.h picmapgen.h pifontx.h pifontgen.h \
- psfile.h
+ pigrcoord.h pilineatt.h psfile.h
 $(OBJ)piwdgx.o: piwdgx.cc piwdgx.h piwdggen.h \
  $(INC)machdefs.h pimsghandler.h picolist.h \
  picontainerx.h pisysdep.h picontainergen.h pievthandler.h pigraphx.h \
- pigraphgen.h picmap.h picmapx.h picmapgen.h pifontx.h pifontgen.h
+ pigraphgen.h picmap.h picmapx.h picmapgen.h pifontx.h pifontgen.h \
+ pigrcoord.h pilineatt.h
 $(OBJ)piwindowgen.o: piwindowgen.cc piwindowgen.h pisysdep.h \
  $(INC)machdefs.h picontainerx.h \
  picontainergen.h piwdgx.h piwdggen.h pimsghandler.h picolist.h \
  psfile.h pifontgen.h pigraphgen.h picmap.h picmapx.h picmapgen.h \
- pifontx.h
+ pifontx.h pigrcoord.h pilineatt.h
 $(OBJ)piwindowx.o: piwindowx.cc piwindowx.h piwindowgen.h pisysdep.h \
  $(INC)machdefs.h picontainerx.h \
@@ -287,12 +309,13 @@
  $(INC)machdefs.h pibwdggen.h piwdgx.h \
  piwdggen.h pimsghandler.h picolist.h picmap.h picmapx.h picmapgen.h \
- pigraphx.h pigraphgen.h pifontx.h pifontgen.h pigraphuc.h \
- pievthandler.h psfile.h pigraphps.h pixtbase.h
+ pigraphx.h pigraphgen.h pifontx.h pifontgen.h pigrcoord.h pilineatt.h \
+ pigraphuc.h pievthandler.h psfile.h pigraphps.h pixtbase.h
 $(OBJ)piyfxdrw.o: piyfxdrw.cc $(INC)machdefs.h \
  piyfxdrw.h pisysdep.h parradapter.h lut.h pidrawer.h pibwdggen.h \
  piwdgx.h piwdggen.h pimsghandler.h picolist.h picmap.h picmapx.h \
- picmapgen.h pigraphx.h pigraphgen.h pifontx.h pifontgen.h pigraphuc.h \
- pievthandler.h psfile.h pigratt.h piaxes.h
+ picmapgen.h pigraphx.h pigraphgen.h pifontx.h pifontgen.h pigrcoord.h \
+ pilineatt.h pigraphuc.h pievthandler.h psfile.h pigratt.h piaxes.h
 $(OBJ)psfile.o: psfile.cc psfile.h $(INC)machdefs.h \
  pisysdep.h pifontgen.h pigraphgen.h piwdgx.h piwdggen.h \
- pimsghandler.h picolist.h picmap.h picmapx.h picmapgen.h pifontx.h
+ pimsghandler.h picolist.h picmap.h picmapx.h picmapgen.h pifontx.h \
+ pigrcoord.h pilineatt.h
Index: trunk/SophyaPI/PI/Tests/pit1.cc
===================================================================
--- trunk/SophyaPI/PI/Tests/pit1.cc	(revision 2132)
+++ trunk/SophyaPI/PI/Tests/pit1.cc	(revision 2138)
@@ -84,5 +84,5 @@
 {
 PIFontAtt att[4] = { PI_RomanFont, PI_BoldFont, PI_ItalicFont, PI_BoldItalicFont};
-PIFontSize fsz[4] = { PI_TinySizeFont, PI_SmallSizeFont, PI_NormalSizeFont, PI_BigSizeFont};
+PIFontSize fsz[4] = { PI_TinySizeFont, PI_SmallSizeFont, PI_NormalSizeFont, PI_LargeSizeFont};
 PIMarker  pmk[11] = { PI_DotMarker , PI_PlusMarker, PI_CrossMarker,  
                  PI_CircleMarker, PI_FCircleMarker,
Index: trunk/SophyaPI/PI/Tests/pitgr.cc
===================================================================
--- trunk/SophyaPI/PI/Tests/pitgr.cc	(revision 2132)
+++ trunk/SophyaPI/PI/Tests/pitgr.cc	(revision 2138)
@@ -26,4 +26,5 @@
 
 #include "pisurfdr.h"
+#include "pi3dwdg.h"
 
 
Index: trunk/SophyaPI/PI/Tests/xp3.cc
===================================================================
--- trunk/SophyaPI/PI/Tests/xp3.cc	(revision 2132)
+++ trunk/SophyaPI/PI/Tests/xp3.cc	(revision 2138)
@@ -26,4 +26,5 @@
 #include "piyfxdrw.h"
 
+#include "pi3dwdg.h"
 
 //  ---------- classe PITApp -----------------------
Index: trunk/SophyaPI/PI/objlist.list
===================================================================
--- trunk/SophyaPI/PI/objlist.list	(revision 2132)
+++ trunk/SophyaPI/PI/objlist.list	(revision 2138)
@@ -2,4 +2,5 @@
 parradapter.o
 pi3ddrw.o
+pi3dwdg.o
 piapplgen.o
 piapplx.o
@@ -30,6 +31,8 @@
 pigraphx.o
 pigratt.o
+pigrcoord.o
 piimage.o
 piimgtools.o
+pilineatt.o
 pilistgen.o
 pilistx.o
Index: trunk/SophyaPI/PI/pi3ddrw.cc
===================================================================
--- trunk/SophyaPI/PI/pi3ddrw.cc	(revision 2132)
+++ trunk/SophyaPI/PI/pi3ddrw.cc	(revision 2138)
@@ -1,4 +1,4 @@
 // Module PI : Peida Interactive PIDrawer3D PIDraw3DWdg
-// Drawer et DrawWidget 3D       R. Ansari 06/98
+// Drawer  3D                    R. Ansari 06/98
 // LAL (Orsay) / IN2P3-CNRS  DAPNIA/SPP (Saclay) / CEA
 
@@ -8,5 +8,4 @@
 
 #include "pi3ddrw.h"
-#include "pidrwtools.h"
 
 
@@ -37,5 +36,5 @@
 //++
 // PIDrawer3D()
-//	Cosntructeur
+//	Constructeur
 // void Set3DView_Obs(double xo, double yo, double zo, double teta, double phi, double psi, -
 //               double dax, double day, double co, double dco=0.2)
@@ -222,516 +221,2 @@
 }
 
-// ......................................................................
-// .......................  Classe PIDraw3DWdg ..........................
-// ......................................................................
-
-//++
-// Class	PIDraw3DWdg
-// Lib		PI
-// include	pi3ddrw.h
-//
-//   	Classe pour la l'affichage et la manipulation d'un ensemble
-//	de *Drawer3D* avec la gestion de zoom, rotation, déplacement
-//	d'objet.
-//	* Bouton-1 : Envoie le message "PIMsg_Active".
-//	* Bouton-2 : Permet de faire tourner l'observateur (caméra) 
-//	autour de l'objet.
-//	* Shift-Bouton-2 : Permet de tourner l'objet en maintenant 
-//	la caméra fixe. Cette fonction peut-être réalisée sans le shift
-//	à partir du centre de l'objet, en l'ayant préalablement activée
-//	par <Alt>S.
-//	* Bouton-3 : Gestion de zoom (On approche/ éloigne la caméra, ou 
-//	on change l'angle d'ouverture) 
-//
-//	Gestion du clavier :
-//	* <Alt>G : Affichage d'une fenêtre de changement des attributs graphiques
-//	* <Alt>O : Action identique a <Alt>G
-//	* <Alt>V : Copier/*Coller* Ajout du texte du buffer copier/coller
-//	sur l'objet à la position courante de la souris
-//	* <Alt>Z : Supprime les textes et signes ajoutés au dessin.
-//	* <Alt>A : Active/desactive l'affichage des axes
-//	* <Alt>R : Reinitialise la vue 3D (vue par défaut) et rafraichit le dessin.
-//	* <Alt>S : Active/desactive le mode de rotation d'objet sans Shift
-//
-//--
-//++
-// Links	Parents
-// PIBaseWdg
-//--
-//++
-// Links	Voir aussi
-// PIDrawer3D
-//--
-
-//++
-// Titre	Constructeur, méthodes
-//--
-//++
-// PIDraw3DWdg(PIContainerGen *par, const char *nom, int sx=100, int sy=100, int px=0, int py=0)
-//	Constructeur
-// long	 kind()
-//	Renvoie le type de l'objet ("=PIDraw3DWdg::ClassId")
-// int AddDrawer3D(PIDrawer3D*, bool ad=false)
-//	Ajoute un Drawer3D
-//--
-
-/* --Methode-- */
-PIDraw3DWdg::PIDraw3DWdg(PIContainerGen *par, const char *nom, int sx, int sy, int px, int py)
-        : PIBaseWdg(par, nom, sx, sy, px, py)
-{  
-  vfixed = false;
-//  SetDefaultDrawRectangle(0.12, 0.12, 0.88, 0.88, true);
-  SetDefaultDrawRectangle(0., 0., 1., 1., true);
-  mBDrw = new PIElDrawer;
-  mBDrw->SetLimits(0.12,0.88, 0.12,0.88, kAxeDirLtoR,kAxeDirDownUp);
-  AddDrawer(mBDrw, 0.12, 0.12, 0.88, 0.88, true, false, false);
-  mPx = mPy = 0;
-
-  lPx = lPy = 0;
-  lCol = PI_Black;
-  cTeta = cPhi = 0.;  cUlen = 1.;
-
-  ActivateKeyboard();
-  ActivateButton(2);    //  Pour pouvoir tourner la camera
-  ActivateMove(2);      
-  ActivateButton(3);    //  Pour deplacer la camera le long de son axe
-  ActivateMove(3);
-  ActivateButton(1);    
-
-  mGr3d = new PIGraphic3D(mWGrC, 0, 0, sx, sy);
-  rOfg = false;
-  axfg = true;
-  skcfg = false;
-}
-
-/* --Methode-- */
-PIDraw3DWdg::~PIDraw3DWdg()
-{
-  delete mBDrw;
-  delete mGr3d;
-}
-
-/* --Methode-- */
-void PIDraw3DWdg::Set3DView_Obs(double xo, double yo, double zo, double teta, double phi, double psi, 
-                                double dax, double day, double co, double dco)
-{
-  mGr3d->Set3DCS_Obs(xo, yo, zo, teta, phi, psi, dax, day, co, dco);
-  list<int>::iterator it;
-  for(it = m3DrIl.begin(); it != m3DrIl.end(); it++)   
-#if defined(CC_HAS_RTTI_SUPPORT)
-    (dynamic_cast<PIDrawer3D*>(GetDrawerId(*it)))->Set3DView_Obs(xo, yo, zo, teta, phi, psi, dax, day, co, dco);
-#else
-    ((PIDrawer3D*)(GetDrawerId(*it)))->Set3DView_Obs(xo, yo, zo, teta, phi, psi, dax, day, co, dco);
-#endif
-  vfixed = true;
-}
-
-/* --Methode-- */
-void PIDraw3DWdg::Set3DView(double xc, double yc, double zc, double xo, double yo, double zo, 
-                            double dax, double day, double dco, double psi)
-{
-  mGr3d->Set3DCS(xc, yc, zc, xo, yo, zo, dax, day, dco, psi);
-  list<int>::iterator it;
-  for(it = m3DrIl.begin(); it != m3DrIl.end(); it++)   
-#if defined(CC_HAS_RTTI_SUPPORT)
-    (dynamic_cast<PIDrawer3D*>(GetDrawerId(*it)))->Set3DView(xc, yc, zc, xo, yo, zo, dax, day, dco, psi);
-#else
-    ((PIDrawer3D*)(GetDrawerId(*it)))->Set3DView(xc, yc, zc, xo, yo, zo, dax, day, dco, psi);
-#endif
-  vfixed = true;
-}
-
-/* --Methode-- */
-bool PIDraw3DWdg::Get3DView(double& xc, double& yc, double& zc, double& xo, double& yo, double& zo, 
-                            double& teta, double& phi, double& psi, double& dax, double& day, double& co, double& dco)
-{
-  return(mGr3d->Get3DCS(xc, yc, zc, xo, yo, zo, teta, phi, psi, dax, day, co, dco));
-}
-
-
-/* --Methode-- */
-void PIDraw3DWdg::Update3DView()
-{
-  list<int>::iterator it = m3DrIl.begin();
-  if (it == m3DrIl.end())  return;
-#if defined(CC_HAS_RTTI_SUPPORT)
-  PIDrawer3D* dr3 = dynamic_cast<PIDrawer3D*>(GetDrawerId(*it));
-#else
-  PIDrawer3D* dr3 = (PIDrawer3D*)(GetDrawerId(*it));
-#endif
-  if (dr3 == NULL)  return;
-  dr3->UpdateLimits();
-  double xo, yo, zo, xc, yc, zc, teta, phi, psi, dax, day, co, dco;
-  bool vobs;
-  vobs = dr3->Get3DView(xc, yc, zc, xo, yo, zo, teta, phi, psi, dax, day, co, dco);
-  if (vobs) Set3DView_Obs(xo, yo, zo, teta, phi, psi, dax, day, co, dco);
-  else Set3DView(xc, yc, zc, xo, yo, zo, dax, day, dco, psi);
-  Refresh();
-}
-
-/* --Methode-- */
-int PIDraw3DWdg::DecodeOptionString(vector<string> & opt, bool rmdecopt)
-{
-  // AFAIRE - Reza 01/03/2002 
-  return(0);
-}
-
-
-/* --Methode-- */
-void PIDraw3DWdg::SetDrawers3DView()
-{
-  double xc, yc, zc, xo, yo, zo;
-  double teta, phi, psi;
-  double dax, day, co, dco;
-  bool vo;
-  vo = mGr3d->Get3DCS( xc, yc, zc, xo, yo, zo, teta, phi, psi, dax, day, co, dco);
-  list<int>::iterator it;
-
-#if defined(CC_HAS_RTTI_SUPPORT)
-  if (vo)   for(it = m3DrIl.begin(); it != m3DrIl.end(); it++)   
-    (dynamic_cast<PIDrawer3D*>(GetDrawerId(*it)))->Set3DView_Obs(xo, yo, zo, teta, phi, psi, dax, day, co, dco);
-  else   for(it = m3DrIl.begin(); it != m3DrIl.end(); it++)   
-    (dynamic_cast<PIDrawer3D*>(GetDrawerId(*it)))->Set3DView(xc, yc, zc, xo, yo, zo, dax, day, dco, psi);    
-#else
-  if (vo)   for(it = m3DrIl.begin(); it != m3DrIl.end(); it++)   
-    ((PIDrawer3D*)(GetDrawerId(*it)))->Set3DView_Obs(xo, yo, zo, teta, phi, psi, dax, day, co, dco);
-  else   for(it = m3DrIl.begin(); it != m3DrIl.end(); it++)   
-    ((PIDrawer3D*)(GetDrawerId(*it)))->Set3DView(xc, yc, zc, xo, yo, zo, dax, day, dco, psi);    
-#endif
-
-}
-
-/* --Methode-- */
-int PIDraw3DWdg::AddDrawer3D(PIDrawer3D* dr3, bool ad)
-{
-if (!vfixed)  { 
-  dr3->UpdateLimits();
-  double xo, yo, zo, xc, yc, zc, teta, phi, psi, dax, day, co, dco;
-  bool vobs;
-  vobs = dr3->Get3DView(xc, yc, zc, xo, yo, zo, teta, phi, psi, dax, day, co, dco);
-  if (vobs) Set3DView_Obs(xo, yo, zo, teta, phi, psi, dax, day, co, dco);
-  else Set3DView(xc, yc, zc, xo, yo, zo, dax, day, dco, psi);
-  }
-else { 
-  double xc, yc, zc, xo, yo, zo, teta, phi, psi, dax, day, co, dco;
-  if ( Get3DView(xc, yc, zc, xo, yo, zo, teta, phi, psi, dax, day, co, dco) ) 
-      dr3->Set3DView_Obs(xo, yo, zo, teta, phi, psi, dax, day, co, dco);
-  else  dr3->Set3DView(xc, yc, zc, xo, yo, zo, dax, day, co, psi);
-  }
-int id = AddDrawer(dr3, false, false, ad);
-if (m3DrIl.size() == 0)  dr3->SetAxesFlags(kStdAxes);
-else dr3->SetAxesFlags(kAxesNone);
-m3DrIl.push_back(id);
-return(id);
-}
-
-/* --Methode-- */
-void PIDraw3DWdg::RemoveDrawer(int id)
-{
-  list<int>::iterator it;
-  for(it = m3DrIl.begin(); it != m3DrIl.end(); it++)   
-    if ( (*it) == id )  { m3DrIl.erase(it);  break; }
-  PIBaseWdg::RemoveDrawer(id);
-}
-
-/* --Methode-- */
-void PIDraw3DWdg::DeleteDrawers()
-{
-  m3DrIl.erase(m3DrIl.begin(),  m3DrIl.end());
-  PIBaseWdg::DeleteDrawers();
-}
-
-/* --Methode-- */
-void PIDraw3DWdg::Keyboard(int key, PIKeyModifier kmod)
-{
-if (kmod == PIKM_Alt) {
-  if (key == 'V' || key == 'v') RequestSelection();  // Pour coller (copier/coller)  
-  else if (key == 'Z' || key == 'z') { mBDrw->ElDelAll();  Refresh(); } // Pour supprimer tous les signes 
-  else if (key == 'O' || key == 'o') { // fenetre des options de controle du drawer actif
-    PIDrawer* actdrw = GetActiveDrawer();
-    if (actdrw != NULL) actdrw->ShowControlWindow(this);
-  }
-  else if (key == 'G' || key == 'g') // Fenetre des options graphiques de trace
-    PIDrwTools::ShowPIDrwTools(this);   
-
-  else if (key == 'A' || key == 'a')  {    // On affiche ou on enleve les axes
-    axfg = !axfg;
-    list<int>::iterator it;
-    if (axfg) 
-      for(it = m3DrIl.begin(); it != m3DrIl.end(); it++)  
-         GetDrawerId(*it)->SetAxesFlags(kAxesNone);
-    else { 
-      it = m3DrIl.begin(); 
-      if (it != m3DrIl.end())  GetDrawerId(*it)->SetAxesFlags(kStdAxes);
-      }
-    Refresh(); 
-    }
-//  <Alt>S active la sensibilite de la zone centrale pour tourner l'objet
-  else if (key == 'S' || key == 's')  skcfg = !skcfg;  
-  else if (key == 'R' || key == 'r')  Update3DView();
-  }
-}
-
-/* --Methode-- */
-void PIDraw3DWdg::PasteSelection(unsigned int typ, void *pdata, unsigned int l)
-{
-if (typ != PICP_string) return;
-int ll = (l<256) ? l+1 : 256;
-char pc[256];
-strncpy(pc, (char*)pdata, ll-1);  pc[ll-1] = '\0';
-// printf("PIDraw3DWdg::PasteSelection() / Debug  %s - %d %d -> %g %g \n", pc, 
-//        mPx, mPy, (double)mPx/(double)XSize(), 1.-(double)mPy/(double)YSize());
-mBDrw->ElAddText((double)mPx/(double)XSize(), 1.-(double)mPy/(double)YSize(), pc );
-mBDrw->Refresh();
-}
-
-/* --Methode-- */
-void PIDraw3DWdg::But2Press(int x, int y)
-{
-  mGr3d->SetBaseGraphic(mWGrC, 0, 0, XSize(), YSize());
-  double xo, yo, zo;
-  double teta, phi, psi;
-  double dax, day, co, dco;
-  mGr3d->Get3DCS(cXc, cYc, cZc, xo, yo, zo, teta, phi, psi, dax, day, co, dco);
-//   puts("\n PIDraw3DWdg::But2Press() ");
-//   mGr3d->PrintCS();
-  lPx = x;  lPy = y;
-
-// Pour savoir si on se trouve ds la zone centrale   
-  int czx = XSize()/10;
-  int czy = YSize()/10;
-  PIKeyModifier kmod;
-  unsigned long tm;
-  GetLastEventInfo(kmod, tm);
-  rOfg = false;
-  if (kmod ==  PIKM_Shift)  rOfg = true;
-  else if (skcfg) {
-    int dmix = x-XSize()/2;
-    int dmiy = y-YSize()/2;
-    if (dmix < 0) dmix = -dmix;
-    if (dmiy < 0) dmiy = -dmiy;
-    if ((dmix < czx) && (dmiy < czy))  rOfg = true;
-    }
-
-  cUlen = 0.5*(dax+day)*co*0.3;    cDax = dax;   cDay = day;  clCO = co; 
-  cTeta = teta;   cPhi = phi;
-  SelPointerShape(PI_TDLRArrowPointer);
-  lCol = mWGrC->GetForeground();
-  //  mWGrC->SelForeground(GetBackgroundColor());
-  mWGrC->SelForeground(PI_Magenta);
-/*
-  {
-  char buff[256];
-  sprintf(buff, "But2Press() C=%g %g %g  T,P=%g %g   ", xc, yc, zc, cTeta, cPhi); 
-  mWGrC->DrawOpaqueString(0,20,buff);
-  }
-*/
-  DrawXYZAxes();
-  if (rOfg)  { czx /= 2;   czy /= 2;  mWGrC->DrawBox(XSize()/2-czx, YSize()/2-czy, czx*2, czy*2); }
- 
-  Send(Msg(), PIMsg_Active);
-  PIDrwTools::SetCurrentBaseWdg(this);
-}
-
-/* --Methode-- */
-void PIDraw3DWdg::Ptr2Move(int x, int y)
-{
-  DrawXYZAxes();
-  double teta, phi;
-
-  if (rOfg) { 
-    phi = cPhi + (M_PI*0.25*(double)(x-lPx)/XSize());
-    teta = cTeta - (M_PI*0.25*(double)(y-lPy)/YSize());
-    mGr3d->RotateObject(teta, phi, false);
-    }
-  else {
-    phi = cPhi - (M_PI*0.5*(double)(x-lPx)/XSize());
-    teta = cTeta + (M_PI*0.5*(double)(y-lPy)/YSize());
-    mGr3d->RotateObserver(teta, phi, 0., false);
-    }
-/*  {
-  char buff[256];
-  sprintf(buff, "Ptr2Move() T,P=%g %g -> %g %g  ", cTeta, cPhi, teta, phi); 
-  mWGrC->DrawOpaqueString(0,20,buff);
-  }
-*/
-  DrawXYZAxes();
-}
-
-
-/* --Methode-- */
-void PIDraw3DWdg::But2Release(int x, int y)
-{
-  DrawXYZAxes();
-  if (rOfg) {
-    int czx = XSize()/20;
-    int czy = YSize()/20;
-    mWGrC->DrawBox(XSize()/2-czx, YSize()/2-czy, czx*2, czy*2);
-    }
-
-//  puts("\n PIDraw3DWdg::But2Release()");
-//  mGr3d->PrintCS();
-  SelPointerShape(PI_ArrowPointer);
-  mWGrC->SelForeground(lCol);
-  SetDrawers3DView();
-  Refresh();
-}
-
-
-/* --Methode-- */
-void PIDraw3DWdg::But3Press(int x, int y)
-{
-  double xo, yo, zo;
-  double teta, phi, psi;
-  double dax, day, co, dco;
-  mGr3d->Get3DCS(cXc, cYc, cZc, xo, yo, zo, teta, phi, psi, dax, day, co, dco);
-  mGr3d->SetBaseGraphic(mWGrC, 0, 0, XSize(), YSize());
-  lPx = x;  lPy = y;  
-  cUlen = 0.5*(dax+day)*co*0.3;    cDax = dax;   cDay = day;  clCO = co;
-  cTeta = teta;   cPhi = phi;
-  SelPointerShape(PI_TDLRArrowPointer);
-  lCol = mWGrC->GetForeground();
-  //  mWGrC->SelForeground(GetBackgroundColor());
-  mWGrC->SelForeground(PI_Magenta);
-/*
-  {
-  char buff[256];
-  sprintf(buff, "But3Press() C=%g %g %g  O= %g %g %g  L= %g   ", xc, yc, zc, xo, yo, zo, co); 
-  mWGrC->DrawOpaqueString(0,20,buff);
-  }
-*/
-  DrawXYZAxes();
-  Send(Msg(), PIMsg_Active);
-  PIDrwTools::SetCurrentBaseWdg(this);
-}
-
-/* --Methode-- */
-void PIDraw3DWdg::Ptr3Move(int x, int y)
-{
-  DrawXYZAxes();
-  double rapx = (double)(lPx-x)/XSize();
-  if (rapx > 0.) rapx = rapx*2.+1;
-  else rapx += 1.;
-  if (rapx < 0.3)  rapx = 0.3;
-  if (rapx > 3.)  rapx = 3.;
-  double rapy = (double)(y-lPy)/YSize();
-  if (rapy > 0.) rapy = rapy*2.+1;
-  else rapy += 1.;
-  if (rapy < 0.3)  rapy = 0.3;
-  if (rapy > 3.)  rapy = 3.;
-/*
-  {
-  char buff[256];
-  sprintf(buff, "Ptr3Move() Rap=%g %g -> %g %g %g     ", rapx, rapy, rapy*clCO, rapx*cDax, rapx*cDay);
-  mWGrC->DrawOpaqueString(0,20,buff);
-  }
-*/
-  mGr3d->ZoomInOut(rapy*clCO, rapx*cDax, rapx*cDay, false);
-  DrawXYZAxes();
-}
-
-/* --Methode-- */
-void PIDraw3DWdg::But3Release(int x, int y)
-{
-  DrawXYZAxes();
-  SelPointerShape(PI_ArrowPointer);
-  mWGrC->SelForeground(lCol);
-  SetDrawers3DView();
-  Refresh();
-}
-
-
-/* --Methode-- */
-void PIDraw3DWdg::DrawXYZAxes()
-{
-  mWGrC->SelGOMode(PI_GOXOR);
-  PIGrCoord x1,y1,z1,x2,y2,z2;
-  x1 = cXc;  y1 = cYc;  z1 = cZc;
-  x2 = cXc+cUlen;   y2 = cYc;   z2 = cZc; 
-  mGr3d->DrawLine3D(x1, y1, z1, x2, y2, z2);
-  x2 = cXc+cUlen*1.1;
-  mGr3d->DrawString3D(x2, y2, z2, "X");
-  x2 = cXc;   y2 = cYc+cUlen;   z2 = cZc; 
-  mGr3d->DrawLine3D(x1, y1, z1, x2, y2, z2);
-  y2 = cYc+cUlen*1.1;
-  mGr3d->DrawString3D(x2, y2, z2, "Y");   
-  x2 = cXc;   y2 = cYc;   z2 = cZc+cUlen; 
-  mGr3d->DrawLine3D(x1, y1, z1, x2, y2, z2);
-  z2 = cZc+cUlen*1.1;
-  mGr3d->DrawString3D(x2, y2, z2, "Z");   
-//   mGr3d->DrawCircle(0., 0., daxO*0.30);
-  char buff[256];
-  double xc,yc,zc,xo,yo,zo,teta,phi,psi,dax,day,co,dco;
-  mGr3d->Get3DCS(xc,yc,zc,xo,yo,zo,teta,phi,psi,dax,day,co,dco);
-  sprintf(buff, " C: %g %g %g -> O: %g %g %g  (T/P0= %g %g)     ", xc,yc,zc, xo, yo, zo, cTeta, cPhi);
-  mWGrC->DrawString(0,20,buff);
-  sprintf(buff, " T,P= %g %g %g lCO= %g  dax= %g %g UL=%g    ", teta,phi,psi,co,dax,day,cUlen); 
-  mWGrC->DrawString(0,40,buff);
-  mWGrC->SelGOMode(PI_GOCopy);  
-
-}
-
-
-/* --Methode-- */
-void PIDraw3DWdg::But1Press(int x, int y)
-{
-  Send(Msg(), PIMsg_Active);
-  PIDrwTools::SetCurrentBaseWdg(this);
-  mPx = x;  mPy = y;
-  if ( (x > 50) || ( y > 50) ) return; 
-  Update3DView();
-}
-
-/*   Pour debugger sur bouton-3 
-static int isw = 0;
-void PIDraw3DWdg::But3Press(int x, int y)
-x -= XSize()/2;
-y -= YSize()/2;
-
-double fx = (double)x/XSize(); 
-double fy = (double)y/YSize(); 
-if ( (fx<0.2) && (fx>-0.2) && (fy<0.2) && (fy>-0.2) ) {
-  
-  if ((isw%3) == 0) { 
-    Set3DView(0., 0., 0., 0., 0., -3. , 0.3, 0.3, 2); 
-    puts("\n Set3DView(0., 0., 0., 0., 0., -3. , 0.3, 0.3, 2)");
-  }
-  else if ((isw%3) == 1) { 
-    Set3DView(0., 0., 0., 2., 1., 3. , 0.3, 0.3, 2);
-    puts("\n Set3DView(0., 0., 0., 2., 1., 3. , 0.3, 0.3, 2)");
-  }
-  else if ((isw%3) == 2) { 
-    Set3DView_Obs(0.,4.,0.,3.14159/2.,-3.14159/2.,0.,0.25,0.25,4.,2.);
-    puts("\n Set3DView_Obs(0.,4.,0.,3.14159/2.,3.14159/2.,0.,0.25,0.25,4.,2.)");
-  }
-  isw++;
-  mGr3d->PrintCS();
-  double xc,yc,zc,xo,yo,zo,teta,phi,psi,dax,day,co,dco;
-  mGr3d->Get3DCS(xc,yc,zc,xo,yo,zo,teta,phi,psi,dax,day,co,dco);
-  mGr3d->Set3DCS(xc,yc,zc,xo,yo,zo,dax,day,dco,psi);
-  mGr3d->PrintCS();
-  mGr3d->Set3DCS_Obs(xo,yo,zo,teta,phi,psi,dax,day,co,dco);
-  mGr3d->PrintCS();
-  puts(" --------------------- \n");
-  Refresh();
-  return;
-}
-if ((x > 0) && (y > 0) )  { 
-  puts(" But3Press()Set3DView(0., 0., 0., 5., 0., 0. , 0.3, 0.3, 2)");
-  Set3DView(0., 0., 0., 5., 0., 0. , 0.3, 0.3, 2);
-}
-else if ((x < 0) && (y > 0) )  { 
-  puts(" But3Press()Set3DView(0., 0., 0., 0., 5., 1. , 0.3, 0.3, 2) ");
-  Set3DView(0., 0., 0., 0., 5., 1. , 0.3, 0.3, 2);
-}
-else  if ((x < 0) && (y < 0) ) {
-  puts(" But3Press()Set3DView(0., 0., 0., 1., 1., 5. , 0.3, 0.3, 2)");
-  Set3DView(0., 0., 0., 1., 1., 5. , 0.3, 0.3, 2);
-}
-else {
-  puts(" But3Press()Set3DView(0., 0., 0., -3., -3., 3. , 0.3, 0.3, 2)");
-  Set3DView(0., 0., 0., -3., -3., 3. , 0.3, 0.3, 2);
-}
-
-Refresh();
-*/
Index: trunk/SophyaPI/PI/pi3ddrw.h
===================================================================
--- trunk/SophyaPI/PI/pi3ddrw.h	(revision 2132)
+++ trunk/SophyaPI/PI/pi3ddrw.h	(revision 2138)
@@ -1,5 +1,5 @@
 // This may look like C code, but it is really -*- C++ -*-
 // Module PI : Peida Interactive PIDrawer3D PIDraw3DWdg
-// Drawer et DrawWidget 3D       R. Ansari 06/98
+// Drawer  3D                R. Ansari 06/98
 // LAL (Orsay) / IN2P3-CNRS  DAPNIA/SPP (Saclay) / CEA
 
@@ -12,5 +12,4 @@
 #include "pigraph3d.h"
 
-#include PIBWDG_H
 
 
@@ -57,74 +56,4 @@
 
 
-//------------------------------ Classe PIDrawer3D --------------------
-
-class PIDraw3DWdg : public PIBaseWdg {
-public:
-  enum {ClassId = 5500};
-
-			PIDraw3DWdg(PIContainerGen *par, const char *nom,
-                                    int sx=100, int sy=100, int px=0, int py=0);
-  virtual		~PIDraw3DWdg();
-  virtual long		kind() {return ClassId; }
-
-
-  virtual void		Set3DView_Obs(double xo, double yo, double zo, double teta, double phi, double psi, 
-                                      double dax, double day, double co, double dco=0.2);
-  virtual void       	Set3DView(double xc, double yc, double zc, double xo, double yo, double zo, 
-                                  double dax, double day, double dco=0.2, double psi=0.);
-  bool           	Get3DView(double& xc, double& yc, double& zc, double& xo, double& yo, double& zo, 
-                                  double& teta, double& phi, double& psi, double& dax, double& day, double& co, double& dco);
-
-  virtual void          Update3DView();   // Vue 3-D a partir de Drawer No 1
-
-  inline void	     	SetTitles(const char* tt=NULL, const char* tb=NULL)
-                                  { mBDrw->SetTitles(tt, tb); }
-  inline void	     	SetTitles(string const & tt, string const & tb)
-                                  { mBDrw->SetTitles(tt, tb); }
-  inline PIElDrawer*    BaseDrawer() { return mBDrw; };
-
-//   Methode permettant de decoder des options a partir de chaines
-  virtual int           DecodeOptionString(vector<string> & opt, bool rmdecopt=true);
-
-// Ajoute un Drawer 
-  int                   AddDrawer3D(PIDrawer3D*, bool ad=false);   
-
-//  Pour tenir trace des Drawers-3D qui sont detruits 
-  virtual void      	RemoveDrawer(int id);       
-  virtual void       	DeleteDrawers();            
-
-  virtual void		But1Press(int x, int y);
-
-  virtual void		But2Press(int x, int y);
-  virtual void		But2Release(int x, int y);
-  virtual void		Ptr2Move(int x, int y);
-
-  virtual void		But3Press(int x, int y);
-  virtual void		But3Release(int x, int y);
-  virtual void		Ptr3Move(int x, int y);
-
-  virtual void 		Keyboard(int key, PIKeyModifier kmod);
-  virtual void 		PasteSelection(unsigned int typ, void *pdata, unsigned int l);
-
-
-protected :
-  virtual void		SetDrawers3DView();
-  virtual void		DrawXYZAxes();
-
-  PIElDrawer* mBDrw;   // Objet traceur d'elements de fond
-  int mPx, mPy;        // Position pointeur - Bouton-1 
-  
-  bool vfixed;       // SetView fait ou pas
-  list<int> m3DrIl;  // Liste des Id drawers 3D 
-  PIGraphic3D* mGr3d;   // PIGraphic3D courante
-  int lPx, lPy;         // dernier position pointeur
-  PIColors lCol;        // Couleur
-  double cTeta, cPhi, cUlen;    // Pour garder valeurs avant rotation, Unite de longeur
-  double cXc, cYc, cZc;         // Pour garder position du centre de champ 
-  double clCO, cDax, cDay;      // Pour garder les valeurs avant Zoom In/Out
-  bool  rOfg;                  // si Vrai  on fait tourner l'objet et pas la camera
-  bool  axfg;                  // si Vrai on trace les axes
-  bool  skcfg;                 // si Vrai click-2 au centre -> rotation objet
-};
 
 #endif
Index: trunk/SophyaPI/PI/pi3dwdg.cc
===================================================================
--- trunk/SophyaPI/PI/pi3dwdg.cc	(revision 2138)
+++ trunk/SophyaPI/PI/pi3dwdg.cc	(revision 2138)
@@ -0,0 +1,525 @@
+// Module PI : Peida Interactive PIDrawer3D PIDraw3DWdg
+// DrawWidget 3D                R. Ansari 06/98
+// LAL (Orsay) / IN2P3-CNRS  DAPNIA/SPP (Saclay) / CEA
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <math.h>
+
+#include "pi3dwdg.h"
+#include "pidrwtools.h"
+
+// ......................................................................
+// .......................  Classe PIDraw3DWdg ..........................
+// ......................................................................
+
+//++
+// Class	PIDraw3DWdg
+// Lib		PI
+// include	pi3dwdg.h
+//
+//   	Classe pour la l'affichage et la manipulation d'un ensemble
+//	de *Drawer3D* avec la gestion de zoom, rotation, déplacement
+//	d'objet.
+//	* Bouton-1 : Envoie le message "PIMsg_Active".
+//	* Bouton-2 : Permet de faire tourner l'observateur (caméra) 
+//	autour de l'objet.
+//	* Shift-Bouton-2 : Permet de tourner l'objet en maintenant 
+//	la caméra fixe. Cette fonction peut-être réalisée sans le shift
+//	à partir du centre de l'objet, en l'ayant préalablement activée
+//	par <Alt>S.
+//	* Bouton-3 : Gestion de zoom (On approche/ éloigne la caméra, ou 
+//	on change l'angle d'ouverture) 
+//
+//	Gestion du clavier :
+//	* <Alt>G : Affichage d'une fenêtre de changement des attributs graphiques
+//	* <Alt>O : Action identique a <Alt>G
+//	* <Alt>V : Copier/*Coller* Ajout du texte du buffer copier/coller
+//	sur l'objet à la position courante de la souris
+//	* <Alt>Z : Supprime les textes et signes ajoutés au dessin.
+//	* <Alt>A : Active/desactive l'affichage des axes
+//	* <Alt>R : Reinitialise la vue 3D (vue par défaut) et rafraichit le dessin.
+//	* <Alt>S : Active/desactive le mode de rotation d'objet sans Shift
+//
+//--
+//++
+// Links	Parents
+// PIBaseWdg
+//--
+//++
+// Links	Voir aussi
+// PIDrawer3D
+//--
+
+//++
+// Titre	Constructeur, méthodes
+//--
+//++
+// PIDraw3DWdg(PIContainerGen *par, const char *nom, int sx=100, int sy=100, int px=0, int py=0)
+//	Constructeur
+// long	 kind()
+//	Renvoie le type de l'objet ("=PIDraw3DWdg::ClassId")
+// int AddDrawer3D(PIDrawer3D*, bool ad=false)
+//	Ajoute un Drawer3D
+//--
+
+/* --Methode-- */
+PIDraw3DWdg::PIDraw3DWdg(PIContainerGen *par, const char *nom, int sx, int sy, int px, int py)
+        : PIBaseWdg(par, nom, sx, sy, px, py)
+{  
+  vfixed = false;
+//  SetDefaultDrawRectangle(0.12, 0.12, 0.88, 0.88, true);
+  SetDefaultDrawRectangle(0., 0., 1., 1., true);
+  mBDrw = new PIElDrawer;
+  mBDrw->SetLimits(0.12,0.88, 0.12,0.88, kAxeDirLtoR,kAxeDirDownUp);
+  AddDrawer(mBDrw, 0.12, 0.12, 0.88, 0.88, true, false, false);
+  mPx = mPy = 0;
+
+  lPx = lPy = 0;
+  lCol = PI_Black;
+  cTeta = cPhi = 0.;  cUlen = 1.;
+
+  ActivateKeyboard();
+  ActivateButton(2);    //  Pour pouvoir tourner la camera
+  ActivateMove(2);      
+  ActivateButton(3);    //  Pour deplacer la camera le long de son axe
+  ActivateMove(3);
+  ActivateButton(1);    
+
+  mGr3d = new PIGraphic3D(mWGrC, 0, 0, sx, sy);
+  rOfg = false;
+  axfg = true;
+  skcfg = false;
+}
+
+/* --Methode-- */
+PIDraw3DWdg::~PIDraw3DWdg()
+{
+  delete mBDrw;
+  delete mGr3d;
+}
+
+/* --Methode-- */
+void PIDraw3DWdg::Set3DView_Obs(double xo, double yo, double zo, double teta, double phi, double psi, 
+                                double dax, double day, double co, double dco)
+{
+  mGr3d->Set3DCS_Obs(xo, yo, zo, teta, phi, psi, dax, day, co, dco);
+  list<int>::iterator it;
+  for(it = m3DrIl.begin(); it != m3DrIl.end(); it++)   
+#if defined(CC_HAS_RTTI_SUPPORT)
+    (dynamic_cast<PIDrawer3D*>(GetDrawerId(*it)))->Set3DView_Obs(xo, yo, zo, teta, phi, psi, dax, day, co, dco);
+#else
+    ((PIDrawer3D*)(GetDrawerId(*it)))->Set3DView_Obs(xo, yo, zo, teta, phi, psi, dax, day, co, dco);
+#endif
+  vfixed = true;
+}
+
+/* --Methode-- */
+void PIDraw3DWdg::Set3DView(double xc, double yc, double zc, double xo, double yo, double zo, 
+                            double dax, double day, double dco, double psi)
+{
+  mGr3d->Set3DCS(xc, yc, zc, xo, yo, zo, dax, day, dco, psi);
+  list<int>::iterator it;
+  for(it = m3DrIl.begin(); it != m3DrIl.end(); it++)   
+#if defined(CC_HAS_RTTI_SUPPORT)
+    (dynamic_cast<PIDrawer3D*>(GetDrawerId(*it)))->Set3DView(xc, yc, zc, xo, yo, zo, dax, day, dco, psi);
+#else
+    ((PIDrawer3D*)(GetDrawerId(*it)))->Set3DView(xc, yc, zc, xo, yo, zo, dax, day, dco, psi);
+#endif
+  vfixed = true;
+}
+
+/* --Methode-- */
+bool PIDraw3DWdg::Get3DView(double& xc, double& yc, double& zc, double& xo, double& yo, double& zo, 
+                            double& teta, double& phi, double& psi, double& dax, double& day, double& co, double& dco)
+{
+  return(mGr3d->Get3DCS(xc, yc, zc, xo, yo, zo, teta, phi, psi, dax, day, co, dco));
+}
+
+
+/* --Methode-- */
+void PIDraw3DWdg::Update3DView()
+{
+  list<int>::iterator it = m3DrIl.begin();
+  if (it == m3DrIl.end())  return;
+#if defined(CC_HAS_RTTI_SUPPORT)
+  PIDrawer3D* dr3 = dynamic_cast<PIDrawer3D*>(GetDrawerId(*it));
+#else
+  PIDrawer3D* dr3 = (PIDrawer3D*)(GetDrawerId(*it));
+#endif
+  if (dr3 == NULL)  return;
+  dr3->UpdateLimits();
+  double xo, yo, zo, xc, yc, zc, teta, phi, psi, dax, day, co, dco;
+  bool vobs;
+  vobs = dr3->Get3DView(xc, yc, zc, xo, yo, zo, teta, phi, psi, dax, day, co, dco);
+  if (vobs) Set3DView_Obs(xo, yo, zo, teta, phi, psi, dax, day, co, dco);
+  else Set3DView(xc, yc, zc, xo, yo, zo, dax, day, dco, psi);
+  Refresh();
+}
+
+/* --Methode-- */
+int PIDraw3DWdg::DecodeOptionString(vector<string> & opt, bool rmdecopt)
+{
+  // AFAIRE - Reza 01/03/2002 
+  return(0);
+}
+
+
+/* --Methode-- */
+void PIDraw3DWdg::SetDrawers3DView()
+{
+  double xc, yc, zc, xo, yo, zo;
+  double teta, phi, psi;
+  double dax, day, co, dco;
+  bool vo;
+  vo = mGr3d->Get3DCS( xc, yc, zc, xo, yo, zo, teta, phi, psi, dax, day, co, dco);
+  list<int>::iterator it;
+
+#if defined(CC_HAS_RTTI_SUPPORT)
+  if (vo)   for(it = m3DrIl.begin(); it != m3DrIl.end(); it++)   
+    (dynamic_cast<PIDrawer3D*>(GetDrawerId(*it)))->Set3DView_Obs(xo, yo, zo, teta, phi, psi, dax, day, co, dco);
+  else   for(it = m3DrIl.begin(); it != m3DrIl.end(); it++)   
+    (dynamic_cast<PIDrawer3D*>(GetDrawerId(*it)))->Set3DView(xc, yc, zc, xo, yo, zo, dax, day, dco, psi);    
+#else
+  if (vo)   for(it = m3DrIl.begin(); it != m3DrIl.end(); it++)   
+    ((PIDrawer3D*)(GetDrawerId(*it)))->Set3DView_Obs(xo, yo, zo, teta, phi, psi, dax, day, co, dco);
+  else   for(it = m3DrIl.begin(); it != m3DrIl.end(); it++)   
+    ((PIDrawer3D*)(GetDrawerId(*it)))->Set3DView(xc, yc, zc, xo, yo, zo, dax, day, dco, psi);    
+#endif
+
+}
+
+/* --Methode-- */
+int PIDraw3DWdg::AddDrawer3D(PIDrawer3D* dr3, bool ad)
+{
+if (!vfixed)  { 
+  dr3->UpdateLimits();
+  double xo, yo, zo, xc, yc, zc, teta, phi, psi, dax, day, co, dco;
+  bool vobs;
+  vobs = dr3->Get3DView(xc, yc, zc, xo, yo, zo, teta, phi, psi, dax, day, co, dco);
+  if (vobs) Set3DView_Obs(xo, yo, zo, teta, phi, psi, dax, day, co, dco);
+  else Set3DView(xc, yc, zc, xo, yo, zo, dax, day, dco, psi);
+  }
+else { 
+  double xc, yc, zc, xo, yo, zo, teta, phi, psi, dax, day, co, dco;
+  if ( Get3DView(xc, yc, zc, xo, yo, zo, teta, phi, psi, dax, day, co, dco) ) 
+      dr3->Set3DView_Obs(xo, yo, zo, teta, phi, psi, dax, day, co, dco);
+  else  dr3->Set3DView(xc, yc, zc, xo, yo, zo, dax, day, co, psi);
+  }
+int id = AddDrawer(dr3, false, false, ad);
+if (m3DrIl.size() == 0)  dr3->SetAxesFlags(kStdAxes);
+else dr3->SetAxesFlags(kAxesNone);
+m3DrIl.push_back(id);
+return(id);
+}
+
+/* --Methode-- */
+void PIDraw3DWdg::RemoveDrawer(int id)
+{
+  list<int>::iterator it;
+  for(it = m3DrIl.begin(); it != m3DrIl.end(); it++)   
+    if ( (*it) == id )  { m3DrIl.erase(it);  break; }
+  PIBaseWdg::RemoveDrawer(id);
+}
+
+/* --Methode-- */
+void PIDraw3DWdg::DeleteDrawers()
+{
+  m3DrIl.erase(m3DrIl.begin(),  m3DrIl.end());
+  PIBaseWdg::DeleteDrawers();
+}
+
+/* --Methode-- */
+void PIDraw3DWdg::Keyboard(int key, PIKeyModifier kmod)
+{
+if (kmod == PIKM_Alt) {
+  if (key == 'V' || key == 'v') RequestSelection();  // Pour coller (copier/coller)  
+  else if (key == 'Z' || key == 'z') { mBDrw->ElDelAll();  Refresh(); } // Pour supprimer tous les signes 
+  else if (key == 'O' || key == 'o') { // fenetre des options de controle du drawer actif
+    PIDrawer* actdrw = GetActiveDrawer();
+    if (actdrw != NULL) actdrw->ShowControlWindow(this);
+  }
+  else if (key == 'G' || key == 'g') // Fenetre des options graphiques de trace
+    PIDrwTools::ShowPIDrwTools(this);   
+
+  else if (key == 'A' || key == 'a')  {    // On affiche ou on enleve les axes
+    axfg = !axfg;
+    list<int>::iterator it;
+    if (axfg) 
+      for(it = m3DrIl.begin(); it != m3DrIl.end(); it++)  
+         GetDrawerId(*it)->SetAxesFlags(kAxesNone);
+    else { 
+      it = m3DrIl.begin(); 
+      if (it != m3DrIl.end())  GetDrawerId(*it)->SetAxesFlags(kStdAxes);
+      }
+    Refresh(); 
+    }
+//  <Alt>S active la sensibilite de la zone centrale pour tourner l'objet
+  else if (key == 'S' || key == 's')  skcfg = !skcfg;  
+  else if (key == 'R' || key == 'r')  Update3DView();
+  }
+}
+
+/* --Methode-- */
+void PIDraw3DWdg::PasteSelection(unsigned int typ, void *pdata, unsigned int l)
+{
+if (typ != PICP_string) return;
+int ll = (l<256) ? l+1 : 256;
+char pc[256];
+strncpy(pc, (char*)pdata, ll-1);  pc[ll-1] = '\0';
+// printf("PIDraw3DWdg::PasteSelection() / Debug  %s - %d %d -> %g %g \n", pc, 
+//        mPx, mPy, (double)mPx/(double)XSize(), 1.-(double)mPy/(double)YSize());
+mBDrw->ElAddText((double)mPx/(double)XSize(), 1.-(double)mPy/(double)YSize(), pc );
+mBDrw->Refresh();
+}
+
+/* --Methode-- */
+void PIDraw3DWdg::But2Press(int x, int y)
+{
+  mGr3d->SetBaseGraphic(mWGrC, 0, 0, XSize(), YSize());
+  double xo, yo, zo;
+  double teta, phi, psi;
+  double dax, day, co, dco;
+  mGr3d->Get3DCS(cXc, cYc, cZc, xo, yo, zo, teta, phi, psi, dax, day, co, dco);
+//   puts("\n PIDraw3DWdg::But2Press() ");
+//   mGr3d->PrintCS();
+  lPx = x;  lPy = y;
+
+// Pour savoir si on se trouve ds la zone centrale   
+  int czx = XSize()/10;
+  int czy = YSize()/10;
+  PIKeyModifier kmod;
+  unsigned long tm;
+  GetLastEventInfo(kmod, tm);
+  rOfg = false;
+  if (kmod ==  PIKM_Shift)  rOfg = true;
+  else if (skcfg) {
+    int dmix = x-XSize()/2;
+    int dmiy = y-YSize()/2;
+    if (dmix < 0) dmix = -dmix;
+    if (dmiy < 0) dmiy = -dmiy;
+    if ((dmix < czx) && (dmiy < czy))  rOfg = true;
+    }
+
+  cUlen = 0.5*(dax+day)*co*0.3;    cDax = dax;   cDay = day;  clCO = co; 
+  cTeta = teta;   cPhi = phi;
+  SelPointerShape(PI_TDLRArrowPointer);
+  lCol = mWGrC->GetForeground();
+  //  mWGrC->SelForeground(GetBackgroundColor());
+  mWGrC->SelForeground(PI_Magenta);
+/*
+  {
+  char buff[256];
+  sprintf(buff, "But2Press() C=%g %g %g  T,P=%g %g   ", xc, yc, zc, cTeta, cPhi); 
+  mWGrC->DrawOpaqueString(0,20,buff);
+  }
+*/
+  DrawXYZAxes();
+  if (rOfg)  { czx /= 2;   czy /= 2;  mWGrC->DrawBox(XSize()/2-czx, YSize()/2-czy, czx*2, czy*2); }
+ 
+  Send(Msg(), PIMsg_Active);
+  PIDrwTools::SetCurrentBaseWdg(this);
+}
+
+/* --Methode-- */
+void PIDraw3DWdg::Ptr2Move(int x, int y)
+{
+  DrawXYZAxes();
+  double teta, phi;
+
+  if (rOfg) { 
+    phi = cPhi + (M_PI*0.25*(double)(x-lPx)/XSize());
+    teta = cTeta - (M_PI*0.25*(double)(y-lPy)/YSize());
+    mGr3d->RotateObject(teta, phi, false);
+    }
+  else {
+    phi = cPhi - (M_PI*0.5*(double)(x-lPx)/XSize());
+    teta = cTeta + (M_PI*0.5*(double)(y-lPy)/YSize());
+    mGr3d->RotateObserver(teta, phi, 0., false);
+    }
+/*  {
+  char buff[256];
+  sprintf(buff, "Ptr2Move() T,P=%g %g -> %g %g  ", cTeta, cPhi, teta, phi); 
+  mWGrC->DrawOpaqueString(0,20,buff);
+  }
+*/
+  DrawXYZAxes();
+}
+
+
+/* --Methode-- */
+void PIDraw3DWdg::But2Release(int x, int y)
+{
+  DrawXYZAxes();
+  if (rOfg) {
+    int czx = XSize()/20;
+    int czy = YSize()/20;
+    mWGrC->DrawBox(XSize()/2-czx, YSize()/2-czy, czx*2, czy*2);
+    }
+
+//  puts("\n PIDraw3DWdg::But2Release()");
+//  mGr3d->PrintCS();
+  SelPointerShape(PI_ArrowPointer);
+  mWGrC->SelForeground(lCol);
+  SetDrawers3DView();
+  Refresh();
+}
+
+
+/* --Methode-- */
+void PIDraw3DWdg::But3Press(int x, int y)
+{
+  double xo, yo, zo;
+  double teta, phi, psi;
+  double dax, day, co, dco;
+  mGr3d->Get3DCS(cXc, cYc, cZc, xo, yo, zo, teta, phi, psi, dax, day, co, dco);
+  mGr3d->SetBaseGraphic(mWGrC, 0, 0, XSize(), YSize());
+  lPx = x;  lPy = y;  
+  cUlen = 0.5*(dax+day)*co*0.3;    cDax = dax;   cDay = day;  clCO = co;
+  cTeta = teta;   cPhi = phi;
+  SelPointerShape(PI_TDLRArrowPointer);
+  lCol = mWGrC->GetForeground();
+  //  mWGrC->SelForeground(GetBackgroundColor());
+  mWGrC->SelForeground(PI_Magenta);
+/*
+  {
+  char buff[256];
+  sprintf(buff, "But3Press() C=%g %g %g  O= %g %g %g  L= %g   ", xc, yc, zc, xo, yo, zo, co); 
+  mWGrC->DrawOpaqueString(0,20,buff);
+  }
+*/
+  DrawXYZAxes();
+  Send(Msg(), PIMsg_Active);
+  PIDrwTools::SetCurrentBaseWdg(this);
+}
+
+/* --Methode-- */
+void PIDraw3DWdg::Ptr3Move(int x, int y)
+{
+  DrawXYZAxes();
+  double rapx = (double)(lPx-x)/XSize();
+  if (rapx > 0.) rapx = rapx*2.+1;
+  else rapx += 1.;
+  if (rapx < 0.3)  rapx = 0.3;
+  if (rapx > 3.)  rapx = 3.;
+  double rapy = (double)(y-lPy)/YSize();
+  if (rapy > 0.) rapy = rapy*2.+1;
+  else rapy += 1.;
+  if (rapy < 0.3)  rapy = 0.3;
+  if (rapy > 3.)  rapy = 3.;
+/*
+  {
+  char buff[256];
+  sprintf(buff, "Ptr3Move() Rap=%g %g -> %g %g %g     ", rapx, rapy, rapy*clCO, rapx*cDax, rapx*cDay);
+  mWGrC->DrawOpaqueString(0,20,buff);
+  }
+*/
+  mGr3d->ZoomInOut(rapy*clCO, rapx*cDax, rapx*cDay, false);
+  DrawXYZAxes();
+}
+
+/* --Methode-- */
+void PIDraw3DWdg::But3Release(int x, int y)
+{
+  DrawXYZAxes();
+  SelPointerShape(PI_ArrowPointer);
+  mWGrC->SelForeground(lCol);
+  SetDrawers3DView();
+  Refresh();
+}
+
+
+/* --Methode-- */
+void PIDraw3DWdg::DrawXYZAxes()
+{
+  mWGrC->SelGOMode(PI_GOXOR);
+  PIGrCoord x1,y1,z1,x2,y2,z2;
+  x1 = cXc;  y1 = cYc;  z1 = cZc;
+  x2 = cXc+cUlen;   y2 = cYc;   z2 = cZc; 
+  mGr3d->DrawLine3D(x1, y1, z1, x2, y2, z2);
+  x2 = cXc+cUlen*1.1;
+  mGr3d->DrawString3D(x2, y2, z2, "X");
+  x2 = cXc;   y2 = cYc+cUlen;   z2 = cZc; 
+  mGr3d->DrawLine3D(x1, y1, z1, x2, y2, z2);
+  y2 = cYc+cUlen*1.1;
+  mGr3d->DrawString3D(x2, y2, z2, "Y");   
+  x2 = cXc;   y2 = cYc;   z2 = cZc+cUlen; 
+  mGr3d->DrawLine3D(x1, y1, z1, x2, y2, z2);
+  z2 = cZc+cUlen*1.1;
+  mGr3d->DrawString3D(x2, y2, z2, "Z");   
+//   mGr3d->DrawCircle(0., 0., daxO*0.30);
+  char buff[256];
+  double xc,yc,zc,xo,yo,zo,teta,phi,psi,dax,day,co,dco;
+  mGr3d->Get3DCS(xc,yc,zc,xo,yo,zo,teta,phi,psi,dax,day,co,dco);
+  sprintf(buff, " C: %g %g %g -> O: %g %g %g  (T/P0= %g %g)     ", xc,yc,zc, xo, yo, zo, cTeta, cPhi);
+  mWGrC->DrawString(0,20,buff);
+  sprintf(buff, " T,P= %g %g %g lCO= %g  dax= %g %g UL=%g    ", teta,phi,psi,co,dax,day,cUlen); 
+  mWGrC->DrawString(0,40,buff);
+  mWGrC->SelGOMode(PI_GOCopy);  
+
+}
+
+
+/* --Methode-- */
+void PIDraw3DWdg::But1Press(int x, int y)
+{
+  Send(Msg(), PIMsg_Active);
+  PIDrwTools::SetCurrentBaseWdg(this);
+  mPx = x;  mPy = y;
+  if ( (x > 50) || ( y > 50) ) return; 
+  Update3DView();
+}
+
+/*   Pour debugger sur bouton-3 
+static int isw = 0;
+void PIDraw3DWdg::But3Press(int x, int y)
+x -= XSize()/2;
+y -= YSize()/2;
+
+double fx = (double)x/XSize(); 
+double fy = (double)y/YSize(); 
+if ( (fx<0.2) && (fx>-0.2) && (fy<0.2) && (fy>-0.2) ) {
+  
+  if ((isw%3) == 0) { 
+    Set3DView(0., 0., 0., 0., 0., -3. , 0.3, 0.3, 2); 
+    puts("\n Set3DView(0., 0., 0., 0., 0., -3. , 0.3, 0.3, 2)");
+  }
+  else if ((isw%3) == 1) { 
+    Set3DView(0., 0., 0., 2., 1., 3. , 0.3, 0.3, 2);
+    puts("\n Set3DView(0., 0., 0., 2., 1., 3. , 0.3, 0.3, 2)");
+  }
+  else if ((isw%3) == 2) { 
+    Set3DView_Obs(0.,4.,0.,3.14159/2.,-3.14159/2.,0.,0.25,0.25,4.,2.);
+    puts("\n Set3DView_Obs(0.,4.,0.,3.14159/2.,3.14159/2.,0.,0.25,0.25,4.,2.)");
+  }
+  isw++;
+  mGr3d->PrintCS();
+  double xc,yc,zc,xo,yo,zo,teta,phi,psi,dax,day,co,dco;
+  mGr3d->Get3DCS(xc,yc,zc,xo,yo,zo,teta,phi,psi,dax,day,co,dco);
+  mGr3d->Set3DCS(xc,yc,zc,xo,yo,zo,dax,day,dco,psi);
+  mGr3d->PrintCS();
+  mGr3d->Set3DCS_Obs(xo,yo,zo,teta,phi,psi,dax,day,co,dco);
+  mGr3d->PrintCS();
+  puts(" --------------------- \n");
+  Refresh();
+  return;
+}
+if ((x > 0) && (y > 0) )  { 
+  puts(" But3Press()Set3DView(0., 0., 0., 5., 0., 0. , 0.3, 0.3, 2)");
+  Set3DView(0., 0., 0., 5., 0., 0. , 0.3, 0.3, 2);
+}
+else if ((x < 0) && (y > 0) )  { 
+  puts(" But3Press()Set3DView(0., 0., 0., 0., 5., 1. , 0.3, 0.3, 2) ");
+  Set3DView(0., 0., 0., 0., 5., 1. , 0.3, 0.3, 2);
+}
+else  if ((x < 0) && (y < 0) ) {
+  puts(" But3Press()Set3DView(0., 0., 0., 1., 1., 5. , 0.3, 0.3, 2)");
+  Set3DView(0., 0., 0., 1., 1., 5. , 0.3, 0.3, 2);
+}
+else {
+  puts(" But3Press()Set3DView(0., 0., 0., -3., -3., 3. , 0.3, 0.3, 2)");
+  Set3DView(0., 0., 0., -3., -3., 3. , 0.3, 0.3, 2);
+}
+
+Refresh();
+*/
Index: trunk/SophyaPI/PI/pi3dwdg.h
===================================================================
--- trunk/SophyaPI/PI/pi3dwdg.h	(revision 2138)
+++ trunk/SophyaPI/PI/pi3dwdg.h	(revision 2138)
@@ -0,0 +1,88 @@
+// This may look like C code, but it is really -*- C++ -*-
+// Module PI : Peida Interactive PIDrawer3D PIDraw3DWdg
+//      DrawWidget 3D       R. Ansari 06/98
+// LAL (Orsay) / IN2P3-CNRS  DAPNIA/SPP (Saclay) / CEA
+
+#ifndef PIWDG3D_H_SEEN
+#define PIWDG3D_H_SEEN
+
+#include "pisysdep.h"
+#include "pi3ddrw.h"
+
+#include PIBWDG_H
+
+
+
+
+//------------------------------ Classe PIDrawer3D --------------------
+
+class PIDraw3DWdg : public PIBaseWdg {
+public:
+  enum {ClassId = 5500};
+
+			PIDraw3DWdg(PIContainerGen *par, const char *nom,
+                                    int sx=100, int sy=100, int px=0, int py=0);
+  virtual		~PIDraw3DWdg();
+  virtual long		kind() {return ClassId; }
+
+
+  virtual void		Set3DView_Obs(double xo, double yo, double zo, double teta, double phi, double psi, 
+                                      double dax, double day, double co, double dco=0.2);
+  virtual void       	Set3DView(double xc, double yc, double zc, double xo, double yo, double zo, 
+                                  double dax, double day, double dco=0.2, double psi=0.);
+  bool           	Get3DView(double& xc, double& yc, double& zc, double& xo, double& yo, double& zo, 
+                                  double& teta, double& phi, double& psi, double& dax, double& day, double& co, double& dco);
+
+  virtual void          Update3DView();   // Vue 3-D a partir de Drawer No 1
+
+  inline void	     	SetTitles(const char* tt=NULL, const char* tb=NULL)
+                                  { mBDrw->SetTitles(tt, tb); }
+  inline void	     	SetTitles(string const & tt, string const & tb)
+                                  { mBDrw->SetTitles(tt, tb); }
+  inline PIElDrawer*    BaseDrawer() { return mBDrw; };
+
+//   Methode permettant de decoder des options a partir de chaines
+  virtual int           DecodeOptionString(vector<string> & opt, bool rmdecopt=true);
+
+// Ajoute un Drawer 
+  int                   AddDrawer3D(PIDrawer3D*, bool ad=false);   
+
+//  Pour tenir trace des Drawers-3D qui sont detruits 
+  virtual void      	RemoveDrawer(int id);       
+  virtual void       	DeleteDrawers();            
+
+  virtual void		But1Press(int x, int y);
+
+  virtual void		But2Press(int x, int y);
+  virtual void		But2Release(int x, int y);
+  virtual void		Ptr2Move(int x, int y);
+
+  virtual void		But3Press(int x, int y);
+  virtual void		But3Release(int x, int y);
+  virtual void		Ptr3Move(int x, int y);
+
+  virtual void 		Keyboard(int key, PIKeyModifier kmod);
+  virtual void 		PasteSelection(unsigned int typ, void *pdata, unsigned int l);
+
+
+protected :
+  virtual void		SetDrawers3DView();
+  virtual void		DrawXYZAxes();
+
+  PIElDrawer* mBDrw;   // Objet traceur d'elements de fond
+  int mPx, mPy;        // Position pointeur - Bouton-1 
+  
+  bool vfixed;       // SetView fait ou pas
+  list<int> m3DrIl;  // Liste des Id drawers 3D 
+  PIGraphic3D* mGr3d;   // PIGraphic3D courante
+  int lPx, lPy;         // dernier position pointeur
+  PIColors lCol;        // Couleur
+  double cTeta, cPhi, cUlen;    // Pour garder valeurs avant rotation, Unite de longeur
+  double cXc, cYc, cZc;         // Pour garder position du centre de champ 
+  double clCO, cDax, cDay;      // Pour garder les valeurs avant Zoom In/Out
+  bool  rOfg;                  // si Vrai  on fait tourner l'objet et pas la camera
+  bool  axfg;                  // si Vrai on trace les axes
+  bool  skcfg;                 // si Vrai click-2 au centre -> rotation objet
+};
+
+#endif
Index: trunk/SophyaPI/PI/piaxes.cc
===================================================================
--- trunk/SophyaPI/PI/piaxes.cc	(revision 2132)
+++ trunk/SophyaPI/PI/piaxes.cc	(revision 2138)
@@ -11,6 +11,29 @@
 #include "piaxes.h"
 
+//++
+// Class	PIAxes
+// Lib		PI
+// include	piaxes.h
+//
+//	Classe gestionnaire de tracé d'axes. A utiliser dans
+//	un objet PIDrawer.
+//--
+//++
+// Links	Voir
+// PIDrawer
+//--
+
+//++
+// Titre	Constructeurs et méthodes
+//--
+
+
 inline void dble_SWAP(double& a,double& b) {double tmp=a; a=b; b=tmp;}
 
+//++
+// PIAxes()
+//	Constructeur.
+//--
+
 /* --Methode-- */
 PIAxes::PIAxes()
@@ -22,4 +45,20 @@
 {
 }
+
+//++
+// void  DrawXYAxes(PIGraphicUC* g, PIGraphicAtt& gratt, unsigned int flags, bool afsz)
+//	Trace les axes en utilisant les limites de l'objet PIGraphicUC. 
+//	"flags" spécifie les attributs d'axes. Constantes prédéfinies: 
+//|	kStdAxes : Axes passant par le centre
+//|     kBoxAxes : Axes entourant le tracé
+//|	kIntTicks, kExtTicks
+//|	kMajTicks, kMinTicks
+//|	kAxesDflt = kStdAxes | kTicks | kLabels
+//|	kGridOn, kAxesNone
+//	Si "afsz == true", la taille de fonte est choisie automatiquement.
+// void DrawXYAxes(PIGraphicUC* g, PIGraphicAtt& gratt, unsigned int flags, bool afsz, \
+//      double xmin, double xmax, double ymin, double ymax)
+//	Tracé d'axes avec spécification des limites d'axes.
+//--
 
 /* --Methode-- */
Index: trunk/SophyaPI/PI/pidrwtools.cc
===================================================================
--- trunk/SophyaPI/PI/pidrwtools.cc	(revision 2132)
+++ trunk/SophyaPI/PI/pidrwtools.cc	(revision 2138)
@@ -8,5 +8,5 @@
 #include <iostream.h>
 #include "piscdrawwdg.h"
-#include "pi3ddrw.h"
+#include "pi3dwdg.h"
 
 //++
Index: trunk/SophyaPI/PI/pigraphgen.cc
===================================================================
--- trunk/SophyaPI/PI/pigraphgen.cc	(revision 2132)
+++ trunk/SophyaPI/PI/pigraphgen.cc	(revision 2138)
@@ -8,62 +8,4 @@
 #include <math.h>
 
-//++
-// Class	PILineAtt
-// Lib		PI
-// include	pigraphgen.h
-//--
-
-/* --Methode-- */
-PILineAtt::PILineAtt(PILineTypes ltyp)
-{
-  _lwidth = 2*8;
-  _ldash=PI_LineSolid; 
-  _ljoincap = PI_JoinMiter*PI_CapButt*256;
-  switch (ltyp) {
-    case PI_NotDefLineAtt :
-      _lwidth = 0; _ldash=PI_LineSolid; 
-      break;
-    case PI_NormalLine : 
-      _lwidth = 2*8; _ldash=PI_LineSolid; 
-      break;
-    case PI_ThinLine : 
-      _lwidth = 8; _ldash=PI_LineSolid; 
-      break;
-    case PI_ThickLine : 
-      _lwidth = 8*4; _ldash=PI_LineSolid; 
-      break;
-    case PI_DashedLine : 
-      _lwidth = 2*8; _ldash=PI_LineDashed; 
-      break;
-    case PI_ThinDashedLine : 
-      _lwidth = 8; _ldash=PI_LineDashed; 
-      break;
-    case PI_ThickDashedLine : 
-      _lwidth = 8*4; _ldash=PI_LineDashed; 
-      break;
-    case PI_DottedLine : 
-      _lwidth = 2*8; _ldash=PI_LineDotted; 
-      break;
-    case PI_ThinDottedLine : 
-      _lwidth = 8; _ldash=PI_LineDotted; 
-      break;
-    case PI_ThickDottedLine : 
-      _lwidth = 8*4; _ldash=PI_LineDotted; 
-      break;
-    case PI_DashDottedLine : 
-      _lwidth = 2*8; _ldash=PI_LineDashDotted; 
-      break;
-    case PI_ThinDashDottedLine : 
-      _lwidth = 8; _ldash=PI_LineDashDotted; 
-      break;
-    case PI_ThickDashDottedLine : 
-      _lwidth = 8*4; _ldash=PI_LineDashDotted; 
-      break;
-    default :
-      _lwidth = 0; _ldash=PI_LineSolid; 
-      break;
-    
-  }
-}
 
 //++
@@ -84,4 +26,5 @@
 // Links	Voir aussi
 // PIGrCoord
+// PILineAtt
 // PIFont
 // PIColorMap
@@ -473,6 +416,8 @@
 //	Choix de la taille et du type de signe pour "DrawMarker() / DrawMarkers()"
 //|	PI_DotMarker , PI_PlusMarker , PI_CrossMarker
-//|	PI_CircleMarker , PI_FCircleMarker , PI_BoxMarker , PI_FBoxMarker
-//|	PI_TriangleMarker , PI_FTriangleMarker , PI_StarMarker , PI_FStarMarker
+//|	PI_CircleMarker , PI_FCircleMarker
+//|	PI_BoxMarker , PI_FBoxMarker
+//|	PI_TriangleMarker , PI_FTriangleMarker
+//|	PI_StarMarker , PI_FStarMarker
 //	(Les "StarMaker" ne sont pas encore implémentés  11/98) 
 //--
@@ -645,70 +590,2 @@
 
 
-
-//++
-// Class	PIGrCoord
-// Lib		PI
-// include	pigraphgen.h
-//
-//   	Classe utilisé pour la spécifiaction de coordonnées graphique.
-//	Des constructeurs et des méthodes de conversion à partir 
-//	et vers des "int", "float" et "double" sont définis.
-//	La valeur entiere d'un objet PIGrCoord construite à partir 
-//	d'une valeur flottante (ou suite à une affectation) correpond
-//	à l'entier le plus proche.
-// 
-//|	PIGrCoord gco = 3.14;
-//|	int ic = gco;     // ic -> 3
-//|	float fc = gco;   // fc -> 3.14
-//|	gco = 1.1;        // (int)gco -> 1
-//|	gco = 1.6;        // (int)gco -> 2
-//|	gco = -0.4;       // (int)gco -> 0
-//|	gco = -0.7;       // (int)gco -> -1
-//--
-//++
-// Links	Voir aussi
-// PIGraphic
-//--
-
-//++
-// Titre	Constructeurs
-//--
-//++
-// 
-// PIGrCoord() 
-//	Constructeur par défaut ("intVal=floatVal=0")
-// PIGrCoord(int a)
-//	Constructeur à partir de l'entier "a"
-// PIGrCoord(float a) 
-//	Constructeur à partir de la valeur flottante "a"
-// PIGrCoord(double a) 
-//	Constructeur à partir de la valeur flottante double précision "a"
-//--
-//++
-// Titre	Opérateurs de conversion
-//--
-//++
-// operator int() 
-//	Conversion en entier "int"
-// operator short() 
-//	Conversion en entier "short"
-// operator unsigned int() 
-//	Conversion en entier non signé "unsigned int"
-// operator unsigned short() 
-//	Conversion en entier non signé "unsigned short"
-// operator float() 
-//	Conversion en réél "float"
-// operator double() 
-//	Conversion en réél "double"
-//--
-//++
-// Titre	Opérateurs d'affectation
-//--
-//++
-// PIGrCoord& operator= (int a) 
-//	Affectation à partir de valeur entière "int"
-// PIGrCoord& operator= (float a) 
-//	Affectation à partir de valeur réélle "float"
-// PIGrCoord& operator= (double a) 
-//	Affectation à partir de valeur réélle double précision "double"
-//--
Index: trunk/SophyaPI/PI/pigraphgen.h
===================================================================
--- trunk/SophyaPI/PI/pigraphgen.h	(revision 2132)
+++ trunk/SophyaPI/PI/pigraphgen.h	(revision 2138)
@@ -14,16 +14,8 @@
 
 #include "picolist.h"  // enum PIColors
+#include "pigrcoord.h"  // Class PIGrCoord
 
-// Line drawing attributes
-enum PILineJoin { PI_JoinMiter=0, PI_JoinRound=1, PI_JoinBevel=2};
-enum PILineCap  { PI_CapButt=0, PI_CapRound=1, PI_CapProjecting=2};
-enum PILineDash { PI_LineSolid, PI_LineDashed, PI_LineDotted, 
-		  PI_LineDashDotted};
-// Predefined line types
-enum PILineTypes { PI_NotDefLineAtt,
-		   PI_NormalLine, PI_ThinLine, PI_ThickLine,
-		   PI_DashedLine, PI_ThinDashedLine, PI_ThickDashedLine,
-		   PI_DottedLine, PI_ThinDottedLine, PI_ThickDottedLine,
-                   PI_DashDottedLine, PI_ThinDashDottedLine, PI_ThickDashDottedLine};
+#include "pilineatt.h"  // Class PILineAtt
+
 
 // Marker types
@@ -63,77 +55,4 @@
 
 
-//  Classe pour gerer indifferement des coordonnees double ou int 
-class PIGrCoord {
-public:
-  inline PIGrCoord() { iv = 0; dv = 0.;}
-  inline PIGrCoord(int a) { iv = a; dv = (double)a;}
-  inline PIGrCoord(float a) { iv = (a>=0.)?(int)(a+0.5):(int)(a-0.5); dv = (double)a;}
-  inline PIGrCoord(double a) { iv = (a>=0.)?(int)(a+0.5):(int)(a-0.5); dv = a;}
-  inline PIGrCoord(PIGrCoord const & gc) { iv = gc.iv;  dv = gc.dv; }
-  inline operator int() { return(iv); }
-  inline operator short() { return((short)iv); }
-  inline operator unsigned int() { return((unsigned int)iv); }
-  inline operator unsigned short() { return((unsigned short)iv); }
-  inline operator float() { return((float)dv); }
-  inline operator double() { return(dv); }
-  inline PIGrCoord& operator= (int a) { iv = a; dv = (double)a; return(*this); }
-  inline PIGrCoord& operator= (float a) 
-        { iv = (a>=0.)?(int)(a+0.5):(int)(a-0.5); dv = (double)a; return(*this); }
-  inline PIGrCoord& operator= (double a) 
-        { iv = (a>=0.)?(int)(a+0.5):(int)(a-0.5); dv = a; return(*this); }
-  inline PIGrCoord& operator= (PIGrCoord const & gc) { iv = gc.iv; dv = gc.dv;  return(*this); }
-protected:
-  int iv;
-  double dv;
-};
-
-// Classe pour gerer les attributs de lignes
-class PILineAtt {
-public:
-  explicit inline PILineAtt(int width=1, PILineDash dash=PI_LineSolid, 
-			    PILineJoin join=PI_JoinMiter, PILineCap cap=PI_CapButt)
-  {_lwidth = (width>0)?width*8:8; _ldash=dash; _ljoincap=join+cap*256; }
-  explicit inline PILineAtt(double width, PILineDash dash=PI_LineSolid, 
-			    PILineJoin join=PI_JoinMiter, PILineCap cap=PI_CapButt)
-  { _lwidth = (width>0)?(unsigned short)(width*8.):8; _ldash=dash; _ljoincap=join+cap*256; } 
-  inline PILineAtt(PILineAtt const& b)
-  { _lwidth=b._lwidth; _ldash=b._ldash; _ljoincap=b._ljoincap; }
- 
-  PILineAtt(PILineTypes ltyp);
-
-  inline ~PILineAtt() {}
-
-  inline PILineAtt& operator = (PILineAtt const& b)
-  { _lwidth=b._lwidth; _ldash=b._ldash; _ljoincap=b._ljoincap; return(*this); }  
-  inline PILineAtt& operator = (PILineTypes ltyp)
-  { *this=PILineAtt(ltyp);  return(*this); }
-   
-  inline bool operator == (PILineAtt const& b) const
-  { return ((_lwidth==b._lwidth)&&(_ldash==b._ldash)&&(_ljoincap==b._ljoincap)); }
-  inline bool operator == (PILineTypes ltyp) const
-  { return ((*this) == PILineAtt(ltyp)); }
-  inline bool operator != (PILineAtt const& b) const
-  { return ((_lwidth!=b._lwidth)||(_ldash!=b._ldash)||(_ljoincap!=b._ljoincap)); }
-  inline bool operator != (PILineTypes ltyp) const
-  { return ((*this) != PILineAtt(ltyp)); }
-
-  inline int GetLineWidth() const { return ((_lwidth>0)?_lwidth/8:1); }
-  inline int GetLineWidthx8() const { return (_lwidth); }
-  inline double GetLineWidthD() const { return ((_lwidth>0)?(double)_lwidth/8.:1.); }
-  inline PILineDash GetLineDash() const { return _ldash; }
-  inline PILineJoin GetLineJoin() const { return (PILineJoin)(_ljoincap%256); }
-  inline PILineCap  GetLineCap() const { return (PILineCap)(_ljoincap/256); }
-
-  inline void SetLineWidth(int lw) { _lwidth = lw*8; }
-  inline void SetLineWidth(double lw) { _lwidth = (unsigned short)(lw*8.); }
-  inline void SetLineDash(PILineDash ld)  { _ldash = ld; }
-  inline void SetLineJoin(PILineJoin lj)  { _ljoincap = lj+(_ljoincap&0xFF00); }
-  inline void SetLineCap(PILineCap lc)  { _ljoincap = lc*256+(_ljoincap&0x00FF); }
-
-protected:
-  unsigned short _lwidth;  // en 1/8 de pixels (ou points)
-  unsigned short _ljoincap;
-  PILineDash _ldash;  
-};
 
 // Les differents types de classes PIGraphic
Index: trunk/SophyaPI/PI/pigratt.cc
===================================================================
--- trunk/SophyaPI/PI/pigratt.cc	(revision 2132)
+++ trunk/SophyaPI/PI/pigratt.cc	(revision 2138)
@@ -7,4 +7,27 @@
 #include <stdio.h>
 #include <map>
+
+//++
+// Class	PIGraphicAtt
+// Lib		PI
+// include	pigratt.h
+//
+//	Classe gestionnaire des attributs graphiques.
+//	(couleur, marker, lignes, ...)
+//--
+
+//++
+// Titre	Constructeurs
+//--
+//++
+// PIGraphicAtt()
+//	Constructeur - Initialisation de tous les attributs aux valeurs par défaut.
+// PIGraphicAtt(PIGraphicAtt const & att)
+//	Constructeur de copie
+// PIGraphicAtt(vector<string> & att, bool rmdecatt)
+//	Cosntructeur avec décodage des attributs à partir d'un vecteur de string
+//	"att". Si "rmdecatt == true", les attributs décodés sont supprimés du
+//	vecteur de départ.
+//--
 
 PIGraphicAtt::PIGraphicAtt()
@@ -33,4 +56,28 @@
 }
 
+//++
+// Titre	Méthodes
+//--
+//++
+// void CopyFrom(PIGraphicAtt const & att)
+//	Copie les attributs à partir de l'objet "att".
+// bool Compare(PIGraphicAtt const & att)
+//	Comparison de deux objets de type PIGraphicAtt. Renvoie "true"
+//	si attributs identiques.
+// void	SetDefaultAtt()
+//	Initialise les attributs aux valeurs par défaut.
+// PIGraphicAtt& operator = (PIGraphicAtt const & att)
+//	Opérateur d'affectation. Appelle *CopyFrom()*
+// bool operator == (PIGraphicAtt const & att)
+//	Opérateur d'égalité. Appelle *Compare()*
+// bool operator != (PIGraphicAtt const & att)
+//	Opérateur d'inégalité. Appelle *Compare()*
+// void UpdateFrom(PIGraphicAtt const & att)
+//	Met à jour les attributs initialisés à partir de l'objet "att".
+// int  DecodeAttStrings(vector<string> & att, bool rmdecatt=true)
+//	Décode les attributs  à partir du vecteur de string "att".
+//	Si Si "rmdecatt == true", les attributs décodés sont supprimés du
+//	vecteur de départ.
+//--
 
 void PIGraphicAtt::SetDefaultAtt()
Index: trunk/SophyaPI/PI/pigrcoord.cc
===================================================================
--- trunk/SophyaPI/PI/pigrcoord.cc	(revision 2138)
+++ trunk/SophyaPI/PI/pigrcoord.cc	(revision 2138)
@@ -0,0 +1,87 @@
+// This may look like C code, but it is really -*- C++ -*-
+// Module PI : Peida Interactive     PIGrCoord
+// Classe de gestion de coordonnees grpahique   R. Ansari  97
+// LAL (Orsay) / IN2P3-CNRS  DAPNIA/SPP (Saclay) / CEA
+
+#include "pigrcoord.h"
+#include <stdlib.h>
+#include <stdio.h>
+#include <math.h>
+
+
+//++
+// Class	PIGrCoord
+// Lib		PI
+// include	pigrcoord.h
+//
+//   	Classe utilisé pour la spécifiaction de coordonnées graphique.
+//	Des constructeurs et des méthodes de conversion à partir 
+//	et vers des "int", "float" et "double" sont définis.
+//	La valeur entiere d'un objet PIGrCoord construite à partir 
+//	d'une valeur flottante (ou suite à une affectation) correpond
+//	à l'entier le plus proche.
+// 
+//|	PIGrCoord gco = 3.14;
+//|	int ic = gco;     // ic -> 3
+//|	float fc = gco;   // fc -> 3.14
+//|	gco = 1.1;        // (int)gco -> 1
+//|	gco = 1.6;        // (int)gco -> 2
+//|	gco = -0.4;       // (int)gco -> 0
+//|	gco = -0.7;       // (int)gco -> -1
+//--
+//++
+// Links	Voir aussi
+// PIGraphic
+//--
+
+PIGrCoord::PIGrCoord(const char * sv)
+{
+  double a = atof(sv);
+  iv = (a>=0.)?(int)(a+0.5):(int)(a-0.5); dv = a;
+}
+
+//++
+// Titre	Constructeurs
+//--
+//++
+// 
+// PIGrCoord() 
+//	Constructeur par défaut ("intVal=floatVal=0")
+// PIGrCoord(int a)
+//	Constructeur à partir de l'entier "a"
+// PIGrCoord(float a) 
+//	Constructeur à partir de la valeur flottante "a"
+// PIGrCoord(double a) 
+//	Constructeur à partir de la valeur flottante double précision "a"
+// PIGrCoord(const char * sv) 
+//	Constructeur à partir d'une chaine de caracteres "sv".
+//--
+//++
+// Titre	Opérateurs de conversion
+//--
+//++
+// operator int() 
+//	Conversion en entier "int"
+// operator short() 
+//	Conversion en entier "short"
+// operator unsigned int() 
+//	Conversion en entier non signé "unsigned int"
+// operator unsigned short() 
+//	Conversion en entier non signé "unsigned short"
+// operator float() 
+//	Conversion en réél "float"
+// operator double() 
+//	Conversion en réél "double"
+//--
+//++
+// Titre	Opérateurs d'affectation
+//--
+//++
+// PIGrCoord& operator= (int a) 
+//	Affectation à partir de valeur entière "int"
+// PIGrCoord& operator= (float a) 
+//	Affectation à partir de valeur réélle "float"
+// PIGrCoord& operator= (double a) 
+//	Affectation à partir de valeur réélle double précision "double"
+//--
+
Index: trunk/SophyaPI/PI/pigrcoord.h
===================================================================
--- trunk/SophyaPI/PI/pigrcoord.h	(revision 2138)
+++ trunk/SophyaPI/PI/pigrcoord.h	(revision 2138)
@@ -0,0 +1,40 @@
+// This may look like C code, but it is really -*- C++ -*-
+// Module PI : Peida Interactive     PIGrCoord
+// Classe de gestion de coordonnees grpahique   R. Ansari  97
+// LAL (Orsay) / IN2P3-CNRS  DAPNIA/SPP (Saclay) / CEA
+
+#ifndef PIGRCOORD_H_SEEN
+#define PIGRCOORD_H_SEEN
+
+#include "pisysdep.h"
+
+
+//  Classe pour gerer indifferement des coordonnees double ou int 
+class PIGrCoord {
+public:
+  inline PIGrCoord() { iv = 0; dv = 0.;}
+  inline PIGrCoord(int a) { iv = a; dv = (double)a;}
+  inline PIGrCoord(float a) { iv = (a>=0.)?(int)(a+0.5):(int)(a-0.5); dv = (double)a;}
+  inline PIGrCoord(double a) { iv = (a>=0.)?(int)(a+0.5):(int)(a-0.5); dv = a;}
+  inline PIGrCoord(PIGrCoord const & gc) { iv = gc.iv;  dv = gc.dv; }
+  explicit PIGrCoord(const char * sv);
+
+  inline operator int() { return(iv); }
+  inline operator short() { return((short)iv); }
+  inline operator unsigned int() { return((unsigned int)iv); }
+  inline operator unsigned short() { return((unsigned short)iv); }
+  inline operator float() { return((float)dv); }
+  inline operator double() { return(dv); }
+  inline PIGrCoord& operator= (int a) { iv = a; dv = (double)a; return(*this); }
+  inline PIGrCoord& operator= (float a) 
+        { iv = (a>=0.)?(int)(a+0.5):(int)(a-0.5); dv = (double)a; return(*this); }
+  inline PIGrCoord& operator= (double a) 
+        { iv = (a>=0.)?(int)(a+0.5):(int)(a-0.5); dv = a; return(*this); }
+  inline PIGrCoord& operator= (PIGrCoord const & gc) { iv = gc.iv; dv = gc.dv;  return(*this); }
+protected:
+  int iv;
+  double dv;
+};
+
+
+#endif      // PIGRCOORD_H_SEEN
Index: trunk/SophyaPI/PI/pilineatt.cc
===================================================================
--- trunk/SophyaPI/PI/pilineatt.cc	(revision 2138)
+++ trunk/SophyaPI/PI/pilineatt.cc	(revision 2138)
@@ -0,0 +1,99 @@
+// This may look like C code, but it is really -*- C++ -*-
+// Module PI : Peida Interactive     PILineAtt 
+// Gestionnaire d'attributs de ligne   R. Ansari  2002
+// LAL (Orsay) / IN2P3-CNRS  DAPNIA/SPP (Saclay) / CEA
+
+#include "pilineatt.h"
+#include <math.h>
+
+//++
+// Class	PILineAtt
+// Lib		PI
+// include	pilineatt.h
+//--
+//++
+// Titre	Constructeurs
+//--
+//++
+// explicit PILineAtt(int width=1, PILineDash dash=PI_LineSolid, \
+//          PILineJoin join=PI_JoinMiter, PILineCap cap=PI_CapButt)
+//	Constructeur avec possibilité de spécification de tous les 
+//	attributs de ligne.
+//
+//	enum PILineDash :
+//|	PI_LineSolid, PI_LineDashed
+//|	PI_LineDotted, PI_LineDashDotted
+//
+//	enum  PILineJoin :
+//|	PI_JoinMiter, PI_JoinRound, PI_JoinBevel
+//	enum  PILineCap :
+//|	PI_CapButt, PI_CapRound, PI_CapProjecting
+//
+// explicit PILineAtt(double width, PILineDash dash=PI_LineSolid, \
+//          PILineJoin join=PI_JoinMiter, PILineCap cap=PI_CapButt)
+//	Constructeur. 
+//
+// PILineAtt(PILineAtt const& b)
+//	Constructeur de copie.
+//
+// PILineAtt(PILineTypes ltyp)
+//	Constructeur à partir de l'enum *PILineTypes*
+//|	PI_NotDefLineAtt
+//|	PI_NormalLine, PI_ThinLine, PI_ThickLine
+//|	PI_DashedLine, PI_ThinDashedLine, PI_ThickDashedLine
+//|	PI_DottedLine, PI_ThinDottedLine, PI_ThickDottedLine
+//|	PI_DashDottedLine, PI_ThinDashDottedLine, PI_ThickDashDottedLine
+//--
+
+/* --Methode-- */
+PILineAtt::PILineAtt(PILineTypes ltyp)
+{
+  _lwidth = 2*8;
+  _ldash=PI_LineSolid; 
+  _ljoincap = PI_JoinMiter*PI_CapButt*256;
+  switch (ltyp) {
+    case PI_NotDefLineAtt :
+      _lwidth = 0; _ldash=PI_LineSolid; 
+      break;
+    case PI_NormalLine : 
+      _lwidth = 2*8; _ldash=PI_LineSolid; 
+      break;
+    case PI_ThinLine : 
+      _lwidth = 8; _ldash=PI_LineSolid; 
+      break;
+    case PI_ThickLine : 
+      _lwidth = 8*4; _ldash=PI_LineSolid; 
+      break;
+    case PI_DashedLine : 
+      _lwidth = 2*8; _ldash=PI_LineDashed; 
+      break;
+    case PI_ThinDashedLine : 
+      _lwidth = 8; _ldash=PI_LineDashed; 
+      break;
+    case PI_ThickDashedLine : 
+      _lwidth = 8*4; _ldash=PI_LineDashed; 
+      break;
+    case PI_DottedLine : 
+      _lwidth = 2*8; _ldash=PI_LineDotted; 
+      break;
+    case PI_ThinDottedLine : 
+      _lwidth = 8; _ldash=PI_LineDotted; 
+      break;
+    case PI_ThickDottedLine : 
+      _lwidth = 8*4; _ldash=PI_LineDotted; 
+      break;
+    case PI_DashDottedLine : 
+      _lwidth = 2*8; _ldash=PI_LineDashDotted; 
+      break;
+    case PI_ThinDashDottedLine : 
+      _lwidth = 8; _ldash=PI_LineDashDotted; 
+      break;
+    case PI_ThickDashDottedLine : 
+      _lwidth = 8*4; _ldash=PI_LineDashDotted; 
+      break;
+    default :
+      _lwidth = 0; _ldash=PI_LineSolid; 
+      break;
+    
+  }
+}
Index: trunk/SophyaPI/PI/pilineatt.h
===================================================================
--- trunk/SophyaPI/PI/pilineatt.h	(revision 2138)
+++ trunk/SophyaPI/PI/pilineatt.h	(revision 2138)
@@ -0,0 +1,74 @@
+// This may look like C code, but it is really -*- C++ -*-
+// Module PI : Peida Interactive     PILineAtt 
+// Gestionnaire d'attributs de ligne   R. Ansari  2002
+// LAL (Orsay) / IN2P3-CNRS  DAPNIA/SPP (Saclay) / CEA
+
+#ifndef PILINEATT_H_SEEN
+#define PILINEATT_H_SEEN
+
+#include "pisysdep.h"
+
+
+// Line drawing attributes
+enum PILineJoin { PI_JoinMiter=0, PI_JoinRound=1, PI_JoinBevel=2};
+enum PILineCap  { PI_CapButt=0, PI_CapRound=1, PI_CapProjecting=2};
+enum PILineDash { PI_LineSolid, PI_LineDashed, PI_LineDotted, 
+		  PI_LineDashDotted};
+// Predefined line types
+enum PILineTypes { PI_NotDefLineAtt,
+		   PI_NormalLine, PI_ThinLine, PI_ThickLine,
+		   PI_DashedLine, PI_ThinDashedLine, PI_ThickDashedLine,
+		   PI_DottedLine, PI_ThinDottedLine, PI_ThickDottedLine,
+                   PI_DashDottedLine, PI_ThinDashDottedLine, PI_ThickDashDottedLine};
+
+
+// Classe pour gerer les attributs de lignes
+class PILineAtt {
+public:
+  explicit inline PILineAtt(int width=1, PILineDash dash=PI_LineSolid, 
+			    PILineJoin join=PI_JoinMiter, PILineCap cap=PI_CapButt)
+  {_lwidth = (width>0)?width*8:8; _ldash=dash; _ljoincap=join+cap*256; }
+  explicit inline PILineAtt(double width, PILineDash dash=PI_LineSolid, 
+			    PILineJoin join=PI_JoinMiter, PILineCap cap=PI_CapButt)
+  { _lwidth = (width>0)?(unsigned short)(width*8.):8; _ldash=dash; _ljoincap=join+cap*256; } 
+  inline PILineAtt(PILineAtt const& b)
+  { _lwidth=b._lwidth; _ldash=b._ldash; _ljoincap=b._ljoincap; }
+ 
+  PILineAtt(PILineTypes ltyp);
+
+  inline ~PILineAtt() {}
+
+  inline PILineAtt& operator = (PILineAtt const& b)
+  { _lwidth=b._lwidth; _ldash=b._ldash; _ljoincap=b._ljoincap; return(*this); }  
+  inline PILineAtt& operator = (PILineTypes ltyp)
+  { *this=PILineAtt(ltyp);  return(*this); }
+   
+  inline bool operator == (PILineAtt const& b) const
+  { return ((_lwidth==b._lwidth)&&(_ldash==b._ldash)&&(_ljoincap==b._ljoincap)); }
+  inline bool operator == (PILineTypes ltyp) const
+  { return ((*this) == PILineAtt(ltyp)); }
+  inline bool operator != (PILineAtt const& b) const
+  { return ((_lwidth!=b._lwidth)||(_ldash!=b._ldash)||(_ljoincap!=b._ljoincap)); }
+  inline bool operator != (PILineTypes ltyp) const
+  { return ((*this) != PILineAtt(ltyp)); }
+
+  inline int GetLineWidth() const { return ((_lwidth>0)?_lwidth/8:1); }
+  inline int GetLineWidthx8() const { return (_lwidth); }
+  inline double GetLineWidthD() const { return ((_lwidth>0)?(double)_lwidth/8.:1.); }
+  inline PILineDash GetLineDash() const { return _ldash; }
+  inline PILineJoin GetLineJoin() const { return (PILineJoin)(_ljoincap%256); }
+  inline PILineCap  GetLineCap() const { return (PILineCap)(_ljoincap/256); }
+
+  inline void SetLineWidth(int lw) { _lwidth = lw*8; }
+  inline void SetLineWidth(double lw) { _lwidth = (unsigned short)(lw*8.); }
+  inline void SetLineDash(PILineDash ld)  { _ldash = ld; }
+  inline void SetLineJoin(PILineJoin lj)  { _ljoincap = lj+(_ljoincap&0xFF00); }
+  inline void SetLineCap(PILineCap lc)  { _ljoincap = lc*256+(_ljoincap&0x00FF); }
+
+protected:
+  unsigned short _lwidth;  // en 1/8 de pixels (ou points)
+  unsigned short _ljoincap;
+  PILineDash _ldash;  
+};
+
+#endif      // PILINEATT_H_SEEN
Index: trunk/SophyaPI/PI/piversion.h
===================================================================
--- trunk/SophyaPI/PI/piversion.h	(revision 2132)
+++ trunk/SophyaPI/PI/piversion.h	(revision 2138)
@@ -2,5 +2,5 @@
 #define PIVERSION_H_SEEN
 
-#define PI_VERSIONNUMBER  3.75
+#define PI_VERSIONNUMBER  3.80
 
 #endif
