Index: /trunk/SophyaPI/PI/Tests/pitst.cc
===================================================================
--- /trunk/SophyaPI/PI/Tests/pitst.cc	(revision 3327)
+++ /trunk/SophyaPI/PI/Tests/pitst.cc	(revision 3328)
@@ -117,5 +117,5 @@
 
   int psx, psy;
-  PrefCompSz(psx, psy);
+  PrefCompSize(psx, psy);
   cout << " Creation bouton 11 -14 avec Sx,Sy= " << psx << " , " << psy << endl;
 
Index: unk/SophyaPI/PI/piapplmac.cc
===================================================================
--- /trunk/SophyaPI/PI/piapplmac.cc	(revision 3327)
+++ 	(revision )
@@ -1,121 +1,0 @@
-
-#include "sopnamsp.h"
-#include "piapplmac.h"
-#include "pippmenubar.h"
-#include "pippapplmac.h"
-#include "piwindowmac.h"
-
-#include <LApplication.h>
-#include <LGrowZone.h>
-#include <UDrawingState.h>
-#include <UMemoryMgr.h>
-#include <SIOUX.h>
-#include <LAttachment.h>
-
-class PIInit {
-public:
-  PIInit() {
-    SIOUXSettings.initializeTB = false;
-    SIOUXSettings.standalone = false;
-    SIOUXSettings.setupmenus = false;
-    SIOUXSettings.showstatusline = true;
-  }
-};
-
-PIInit piInit;
-
-static PIApplication* cur_piapp = NULL;
-PIApplication* PIApplicationGetApp() { return cur_piapp; }
-
-
-class PISIOUXAttachment : public LAttachment {
-public:
-  PISIOUXAttachment();
-protected:
- virtual void	ExecuteSelf(
-							MessageT		inMessage,
-							void			*ioParam);
-};
-
-PISIOUXAttachment::PISIOUXAttachment()
-: LAttachment()
-{}
-
-void PISIOUXAttachment::ExecuteSelf(MessageT msg, void* p)
-{
-  if (msg == msg_Event)
-    mExecuteHost = !SIOUXHandleOneEvent((EventRecord*)p);
-  if (!mExecuteHost)
-    UDesktop::NormalizeWindowOrder();
-}
-
-PIApplicationMac::PIApplicationMac(int sx, int sy, int /*narg*/, char** /*arg*/)
-{
-  SIOUXSettings.initializeTB = false;
-  SIOUXSettings.standalone = false;
-  SIOUXSettings.setupmenus = false;
-  SIOUXSettings.showstatusline = true;
-									// Set Debugging options
-	SetDebugThrow_(debugAction_Alert);
-	SetDebugSignal_(debugAction_Alert);
-
-	InitializeHeap(3);				// Initialize Memory Manager
-									// Parameter is number of Master Pointer
-									//   blocks to allocate
-	
-									// Initialize standard Toolbox managers
-	UQDGlobals::InitializeToolbox(&qd);
-	
-	new LGrowZone(20000);			// Install a GrowZone function to catch
-									//    low memory situations.
-									
-		// Register functions to create core PowerPlant classes
-	
-	RegisterAllPPClasses();
-
-	macAppli = new PIPPApplMac;
-	macAppli->AddAttachment(new PISIOUXAttachment);
-	
-    menubar = new PIMenubar(this, "DefMenubar");
-    topcont = new PIWindowMac(this, "TopLevel", PIWK_floating, sx, sy, 10, 45);
-
-  cur_piapp = this;
-}
-
-
-PIApplicationMac::~PIApplicationMac()
-{
-	delete macAppli;
-}
-
-void
-PIApplicationMac::Run()
-{
-    topcont->Show();
-	macAppli->Run();
-}
-
-void
-PIApplicationMac::Stop()
-{
-	macAppli->DoQuit();
-}
-
-/* --Methode-- */
-void PIApplicationMac::PrefCompSz(int& szx, int& szy)
-{
-  szx = 10;
-  szy = 10;
-}
-
-/* --Methode-- */
-void PIApplicationMac::ScreenSz(int& szx, int& szy)
-{
-  szx = 800;
-  szy = 600;
-}
-
-void PIApplicationMac::RedirectOutStream(PIConsole* cons, unsigned char va)
-{}
-void PIApplicationMac::RedirectErrStream(PIConsole* cons, unsigned char va)
-{}
Index: unk/SophyaPI/PI/piapplmac.h
===================================================================
--- /trunk/SophyaPI/PI/piapplmac.h	(revision 3327)
+++ 	(revision )
@@ -1,28 +1,0 @@
-#ifndef PIAPPLMAC_H_SEEN
-#define PIAPPLMAC_H_SEEN
-
-#include "piapplgen.h"
-
-class LApplication;
-class PIApplicationMac : public PIApplicationGen {
-public:
-					PIApplicationMac(int sx=200, int sy=30, int narg=0, char *arg[]=NULL);
-	virtual		   ~PIApplicationMac();
-	
-	virtual void    Run();
-	virtual void    Stop();
-	
-        virtual void              PrefCompSz(int& szx, int& szy);
-        virtual void              ScreenSz(int& szx, int& szy);
-
-        virtual void              RedirectOutStream(PIConsole* cons, unsigned char va= PIVA_Def);
-        virtual void              RedirectErrStream(PIConsole* cons, unsigned char va= PIVA_Ital);
-//protected:
-	LApplication* macAppli;
-};
-
-typedef PIApplicationMac PIApplication;
-
-//  Pour recuperer un objet PIApplication 
-PIApplication* PIApplicationGetApp();
-#endif
Index: unk/SophyaPI/PI/pibwdgmac.cc
===================================================================
--- /trunk/SophyaPI/PI/pibwdgmac.cc	(revision 3327)
+++ 	(revision )
@@ -1,158 +1,0 @@
-#include <stdio.h>
-
-#include <LString.h>
-#include "sopnamsp.h"
-#include "pibwdgmac.h"
-#include "piupdattachment.h"
-#include <algobase.h>
-#include <string.h>
-
-#define mGraphic mWGrC  
-
-// Les methodes de la classe  PIBWdgGen
- 
-/* --Methode-- */
-PIBaseWdgMac::PIBaseWdgMac(PIContainerGen *par, char *nom,
-                       int sx, int sy, int px, int py) :
-PIBaseWdgGen(par, nom, sx, sy, px, py) 
-{
-    mGraphic = new PIGraphicMac(this);
-
-    mAdapter->AddAttachment(new PIUpdAttachment(this));
-    mPane->AddAttachment(new PIUpdAttachment(this));
-    cursor = NULL;
-    
-
-}
-
-
-/* --Methode-- */
-PIBaseWdgMac::~PIBaseWdgMac()
-{
-}
-
-/* --Methode-- */
-void PIBaseWdgMac::ActivatePtrCross()
-{
-// toujours actif pour le moment
-}
-
-/* --Methode-- */
-void PIBaseWdgMac::ActivateButton(int /*bid*/)
-{
-}
-
-/* --Methode-- */
-void PIBaseWdgMac::ActivateMove(int /*bid*/)
-{
-}
-
-/* --Methode-- */
-void PIBaseWdgMac::ActivateKeyboard()
-{
-}
-
-/* --Methode-- */
-void PIBaseWdgMac::EraseWindow(int x0, int y0, int dx, int dy)
-{
-  if (mPane->FocusDraw()) {
-     GrafPtr p = mPane->GetMacPort();
-     if (p) EraseRgn(p->visRgn);
-//	   Rect r;
-//	   mPane->CalcPortFrameRect(r);
-//       EraseRect(&r);
-  }
-}
-
-
-
-/* --Methode-- */
-void PIBaseWdgMac::SelPointerShape(PIPointer ptr)
-{
-  CursHandle c;
-  if (mPane->FocusDraw()) {
-    switch(ptr) {
-      case PI_ArrowPointer:
-        cursor = &qd.arrow;
-        break;
-      case PI_CrossPointer:
-        c = GetCursor(crossCursor);
-        HLock((Handle)c);
-        cursor = c ? *c : NULL;
-        break;
-      case PI_HandPointer:
-        c = GetCursor(128);
-        HLock((Handle)c);
-        cursor = c ? *c : NULL;
-        break;
-    }
-  }
-  mPtrS = ptr;
-}
-
-
-
-/* --Methode-- */
-PIPointer  PIBaseWdgMac::GetPointerShape()
-{
-return (mPtrS);
-}
-
-
-
-/* --Methode-- */
-bool PIBaseWdgMac::AdjustCursor()
-{
-  if (cursor) {
-    ::SetCursor(cursor);
-    return true;
-  }
-  return false;
-}
-
-/* --Methode-- 
-void PIBaseWdgMac::Refresh()
-{
-if (mPane->IsVisible())
-  Draw();
-}
-   J'ai mis cette fonction ds PIWdgMac::IsVisible()    Reza $CHECK$  01/12/97 
-*/
-
-
-
-void PIBaseWdgMac::SetBackgroundColor(PIColors col)
-{
-  if (mPane->FocusDraw()) {
-    long color;
-    switch (col) {
-      case PI_Black:
-        color = blackColor;
-        break;
-      case PI_White:
-        color = whiteColor;
-        break;
-      case PI_Red:
-        color = redColor;
-        break;
-      case PI_Blue:
-        color = blueColor;
-        break;
-      case PI_Green:
-        color = greenColor;
-        break;
-      case PI_Yellow:
-        color = yellowColor;
-        break;
-      default:
-        color = blackColor;
-    }
-    mBCol = col;
-    ::BackColor(color);
-  }
-}
-
-PIColors  PIBaseWdgMac::GetBackgroundColor() 
-{
-return (mBCol);
-}
Index: unk/SophyaPI/PI/pibwdgmac.h
===================================================================
--- /trunk/SophyaPI/PI/pibwdgmac.h	(revision 3327)
+++ 	(revision )
@@ -1,49 +1,0 @@
-/* Widget Xt pour affichage d'image  Interface Public    */
-/*                                    Reza 10/95         */
-
-#ifndef PIBWDGMAC_H_SEEN
-#define PIBWDGMAC_H_SEEN
-
-#include "pisysdep.h"
-#include "pibwdggen.h"
-
-
-class PIBaseWdgMac : public PIBaseWdgGen
-{
-public:
-// Les methodes ...
-
-                     PIBaseWdgMac(PIContainerGen *par, char *nom,
-                                   int sx=10, int sy=10, int px=0, int py=0);
-  virtual           ~PIBaseWdgMac();
-
-//  Activation des evenements
-  virtual void       ActivatePtrCross();
-  virtual void       ActivateButton(int bid);
-  virtual void       ActivateMove(int bid);
-  virtual void       ActivateKeyboard();
-
-//  Divers : couleur de fond, Effacement fenetre,  forme de la souris
-  virtual void       SetBackgroundColor(PIColors col=PI_White);
-  virtual void       EraseWindow(int x0=0, int y0=0, int dx=0, int dy=0);
-  virtual void       SelPointerShape(PIPointer ptr=PI_ArrowPointer);
-  virtual PIColors   GetBackgroundColor();
-  virtual PIPointer  GetPointerShape();
-  virtual void       AssignKeyboard() {}
-
-// Acces aux caracteristiques du dernier evenement 
-  virtual void       GetLastEventInfo(PIKeyModifier& kmod, unsigned long& tm);
-
-protected:
-  friend class       PIUpdAttachment;
-  virtual bool       AdjustCursor();
-  CursPtr            cursor;
-  
-
-  PIPointer mPtrS;
-  PIColors  mBCol;
-};
-
-typedef PIBaseWdgMac PIBaseWdg;
-
-#endif /* RZXBASE_H_SEEN */
Index: unk/SophyaPI/PI/picmapmac.cc
===================================================================
--- /trunk/SophyaPI/PI/picmapmac.cc	(revision 3327)
+++ 	(revision )
@@ -1,115 +1,0 @@
-#include "sopnamsp.h"
-#include "picmapmac.h"
-#include <UDebugging.h>
-
-static int NTotAllocCol;
-
-
-PIColorMapMac::PIColorMapMac()
-: PIColorMapGen(), mPalette(NULL), mCTab(NULL)
-{
-}
-
-PIColorMapMac::PIColorMapMac(int id, int nc, string const& nom) 
-: PIColorMapGen(id, nc, nom)
-{
-    int n = nc+2;
-	mCTab = (CTabHandle) ::NewHandle(sizeof(long) + 
-				sizeof(short) + sizeof(short) + 
-				n*sizeof(ColorSpec));
-	(**mCTab).ctFlags = 0;
-	(**mCTab).ctSeed = GetCTSeed();
-	(**mCTab).ctSize = n;
-    ColorSpec* sp = (**mCTab).ctTable;
-    sp[0].rgb.red   = 0;
-    sp[0].rgb.green = 0;
-    sp[0].rgb.blue  = 0;
-    sp[0].value     = 0;
-    sp[1].rgb.red   = 65535;
-    sp[1].rgb.green = 65535;
-    sp[1].rgb.blue  = 65535;
-    sp[1].value     = 1;
-    for (int i=2; i<n; i++) {
-      sp[i].rgb.red   = 0;
-      sp[i].rgb.green = 0;
-      sp[i].rgb.blue  = 0;
-      sp[i].value     = i;
-    }
-  mPalette = NewPalette(mNCol,mCTab,pmTolerant,0);
-}
-
-PIColorMapMac::~PIColorMapMac()
-{
-  DisposePalette(mPalette);
-  DisposeHandle((Handle)mCTab);
-}
-
-/* --Methode-- */
-PIColor PIColorMapMac::GetColor(int n)
-{
-PIColor picr;
-picr.red = picr.green = picr.blue = 0;
-
-if ((n<0) || (n >= NCol()))   
-  return(picr);
-
-RGBColor qdCol;
-GetEntryColor(mPalette,n+2,&qdCol);
-
-picr.red   = qdCol.red;
-picr.green = qdCol.green;
-picr.blue  = qdCol.blue;
-
-return(picr);
-}
-
-
-bool PIColorMapMac::AllocColor(PIColor const& col, int index)
-{
-  if (!mPalette) return false;
-  if ((index < 0) || (index > mNCol))  return(false);
-  
-  RGBColor srcRGB;
-  srcRGB.red   = col.red;
-  srcRGB.green = col.green;
-  srcRGB.blue  = col.blue;
-  
-  SetEntryColor(mPalette,index+2,&srcRGB);
-  ((**mCTab).ctTable)[index+2].rgb = srcRGB;
-  NTotAllocCol++;
-  return true;    //  $CHECK$  retourne true si OK - Reza 01/12/97
-}
-
-long PIColorMapMac::TotNbColors()
-{
-   PixMapHandle pmh = ((CGrafPort*)qd.thePort)->portPixMap;
-   int depth = (**pmh).cmpSize * (**pmh).cmpCount;
-   long nbcol = 1;
-   for (int i=0; i<depth; i++)
-     nbcol *= 2;
-   return nbcol;
-}
-
-void PIColorMapMac::FreeColors()
-{
-  Assert_(mPalette);
-  DisposePalette(mPalette);
-  DisposeCTable(mCTab);
-}
-
-int PIColorMapMac::NbAllocColors()
-{
-return(NTotAllocCol);
-}
-
-
-void PIColorMapMac::CopyFrom(PIColorMapGen* x)
-{
-  CopyFromGen(x);
-  PIColorMapMac* y = (PIColorMapMac*) x;
-  mPalette = y->mPalette;
-  mCTab = y->mCTab;
-  HandToHand(&(Handle)mCTab);
-  HandToHand(&(Handle)mPalette);
-  Assert_(mPalette);
-}
Index: unk/SophyaPI/PI/picmapmac.h
===================================================================
--- /trunk/SophyaPI/PI/picmapmac.h	(revision 3327)
+++ 	(revision )
@@ -1,34 +1,0 @@
-#ifndef PICMAPMAC_H_SEEN
-#define PICMAPMAC_H_SEEN
-
-#include "picmapgen.h"
-#include <Palettes.h>
-
-
-class PIColorMapMac : public PIColorMapGen {
-public:
-  PIColorMapMac();
-  PIColorMapMac(int id, int nc, string const& nom);  
-  ~PIColorMapMac();
-  
-  virtual PIColor GetColor(int n);
-  virtual bool AllocColor(PIColor const& col, int index);   // $CHECK$  Reza 01/12/97(Modif)
-  virtual void FreeColors();
-
-  virtual long  TotNbColors();
-  virtual int   NbAllocColors();
-  
-  CTabHandle    GetCTab() {return mCTab;}
-protected:
-  void CopyFrom(PIColorMapGen*);
-  
-  CTabHandle    mCTab;
-  PaletteHandle mPalette;
-
-  friend class PIColorMapGen;
-  friend class PIPixmapMac;
-};
-
-typedef PIColorMapMac PIColorMapNative;
-
-#endif
Index: unk/SophyaPI/PI/picontainermac.cc
===================================================================
--- /trunk/SophyaPI/PI/picontainermac.cc	(revision 3327)
+++ 	(revision )
@@ -1,14 +1,0 @@
-#include "sopnamsp.h"
-#include "picontainermac.h"
-
-PIContainerMac::PIContainerMac(PIContainerGen *par, char *nom,
-                         int sx, int sy, int px, int py)
-: PIContainerGen(par, nom, sx, sy, px, py)
-{
-  // Par dfaut, un container est invisible.
-  UnManage();
-}
-
-PIContainerMac::~PIContainerMac()
-{}
-
Index: unk/SophyaPI/PI/picontainermac.h
===================================================================
--- /trunk/SophyaPI/PI/picontainermac.h	(revision 3327)
+++ 	(revision )
@@ -1,20 +1,0 @@
-#ifndef PICONTAINERMAC_SEEN
-#define PICONTAINERMAC_SEEN
-
-#include "picontainergen.h"
-#include "pisysdep.h"
-#include <LView.h>
-
-class PIContainerMac : public PIContainerGen {
-public:
-                         PIContainerMac(PIContainerGen *par, char *nom,
-                                   int sx=10, int sy=10, int px=0, int py=0);
-  virtual                ~PIContainerMac();
-  
-protected:
-
-};
-
-typedef PIContainerMac PIContainer;
-
-#endif
Index: unk/SophyaPI/PI/pifilechomac.cc
===================================================================
--- /trunk/SophyaPI/PI/pifilechomac.cc	(revision 3327)
+++ 	(revision )
@@ -1,124 +1,0 @@
-#include "sopnamsp.h"
-#include "pifilechomac.h"
-
-string PathNameFromDirID(long dirID, short vRefNum);
-
-string PIGetFileName(string dir);
-string PIGetExistingFileName(string dir);
-
-string PIGetFileName(string dir)
-{
-  StandardFileReply reply;
-  
-  
-  string fName;
-  int i = dir.rfind(':');
-  if (i == string::npos)
-    fName = dir;
-  else if (i == dir.length())
-    fName = "";
-  else
-    fName = dir.substr(i+1);
-    
-  LStr255 defaultName(fName.c_str());
-  
-  StandardPutFile("\pSave as:",defaultName,&reply);
-  
-  if (!reply.sfGood) return "";
-  
-  string directory = PathNameFromDirID(reply.sfFile.parID,reply.sfFile.vRefNum);
-  p2cstr(reply.sfFile.name);
-  
-//  return directory + '/' + (char*)reply.sfFile.name;
-  return directory + ':' + (char*)reply.sfFile.name;
-}
-
-string PIGetExistingFileName(string /*dir*/)
-{
-  StandardFileReply reply;
-  SFTypeList typeList;
-  
-  StandardGetFile(NULL,-1,typeList,&reply);
-  
-  if (!reply.sfGood) return "";
-  
-  string directory = PathNameFromDirID(reply.sfFile.parID,reply.sfFile.vRefNum);
-  p2cstr(reply.sfFile.name);
-  
-//  return directory + '/' + (char*)reply.sfFile.name;
-  return directory + ':' + (char*)reply.sfFile.name;
-}
-
-
-string PathNameFromDirID(long dirID, short vRefNum)
-{
-	DirInfo 	block;
-	Str255		directoryName;
-	OSErr		err;
-
-	string fullPathName = "";
-
-	block.ioDrParID = dirID;
-	block.ioNamePtr = directoryName;
-	do {
-			block.ioVRefNum = vRefNum;
-			block.ioFDirIndex = -1;
-			block.ioDrDirID = block.ioDrParID;
-			err = PBGetCatInfoSync(CInfoPBPtr(&block));
-			p2cstr(directoryName);
-			if (fullPathName != "") fullPathName = ':' + fullPathName;
-			fullPathName =  ((char*)directoryName + fullPathName);
-//			fullPathName = '/' + ((char*)directoryName + fullPathName);
-	} while (block.ioDrDirID != 2);
-	return fullPathName;
-}
-
-
-PIFileChooserMac::PIFileChooserMac(PIMsgHandler* par, char* nom, PIMessage msg)
-: PIFileChooserGen(par, nom, msg)
-{
-  mAccNew = false;
-  mFileName = "";
-}
-
-PIFileChooserMac::~PIFileChooserMac()
-{}
-
-void
-PIFileChooserMac::Show()
-{
-  if (mAccNew)
-    mFileName = PIGetFileName("");
-  else
-    mFileName = PIGetExistingFileName("");
-
-// Envoyer un message....
-  if (mFileName == "")
-    Send(Msg(), PIMsg_Cancel, NULL);
-  else
-    Send(Msg(), PIMsg_OK, (void *) (GetFileName().c_str()));
-}
-
-void
-PIFileChooserMac::AcceptNewFile(bool acc)
-{
-  mAccNew = acc;
-}
-
-void
-PIFileChooserMac::SetPath(string const& /*path*/) {}
-void
-PIFileChooserMac::SetFileName(string const& /*fname*/) {}
-
-string
-PIFileChooserMac::GetPath()
-{
-  return "";
-}
-
-string
-PIFileChooserMac::GetFileName()
-{
-  return mFileName;
-}
-
Index: unk/SophyaPI/PI/pifilechomac.h
===================================================================
--- /trunk/SophyaPI/PI/pifilechomac.h	(revision 3327)
+++ 	(revision )
@@ -1,33 +1,0 @@
-#ifndef PIFILECHOMAC_H_SEEN
-#define PIFILECHOMAC_H_SEEN
-
-#include <string>
-#include "pisysdep.h"
-#include "pifilechogen.h"
-
-class PIFileChooserMac : public PIFileChooserGen {
-public:
-
-                   PIFileChooserMac(PIMsgHandler* par, char* nom, PIMessage msg);
-  virtual          ~PIFileChooserMac();
-
-  virtual void     Show();
-
-  virtual void     AcceptNewFile(bool acc);
-  virtual void     SetPath(string const& path);
-  virtual void     SetFileName(string const& fname);
-
-  virtual string   GetPath();
-  virtual string   GetFileName();
-
-protected:
-  bool             mAccNew;
-  string           mFileName;
-};
-
-typedef PIFileChooserMac     PIFileChooser ;
-
-#define FILESEP ':'
-
-#endif
-
Index: unk/SophyaPI/PI/pifontmac.cc
===================================================================
--- /trunk/SophyaPI/PI/pifontmac.cc	(revision 3327)
+++ 	(revision )
@@ -1,186 +1,0 @@
-// Module PI : Peida Interactive     PIFontMac
-// Gestion de fontes - Implementation Mac    
-// DAPNIA/SPP     E. Aubourg 1999
-
-#include <stdio.h>
-
-#include "sopnamsp.h"
-#include "pisysdep.h"
-#include "pifontmac.h"
-#include PIWDG_H
-
-#include "UDrawingState.h"
-
-/* --Methode-- */
-PIFontMac::PIFontMac(PIFontName fn)
-  : PIFontGen(fn)
-{
-  SelectFont(fn, PI_RomanFont, PI_NormalSizeFont);
-}
-
-/* --Methode-- */
-PIFontMac::PIFontMac(int npt, PIFontName fn, PIFontAtt fa)
-  : PIFontGen(npt, fn, fa)
-{
-  SelectFontPt(fn, fa, npt);
-}
-
-/* --Methode-- */
-PIFontMac::PIFontMac(PIFontMac const & fnt)
-  : PIFontGen(fnt.mFName)
-{
-  SelectFontPt(fnt.mFName, fnt.mFAtt, fnt.mFSize);
-}
-
-/* --Methode-- */
-PIFontMac::~PIFontMac()
-{
-}
-
-/* --Methode-- */
-PIFontMac & PIFontMac::operator = (PIFontMac const & fnt)
-{
-  SelectFontPt(fnt.mFName, fnt.mFAtt, fnt.mFSize);
-  return(*this);
-}
-
-/* --Methode-- */
-bool PIFontMac::operator == (PIFontMac const & fnt)
-{
-  if ((fnt.mFName == mFName) && (fnt.mFAtt == mFAtt) && (fnt.mFSize == mFSize)) 
-    return(true);
-  else 
-    return(false);
-}
-
-/* --Methode-- */
-void PIFontMac::SetFont(PIFontName fn)
-{
-  SelectFontPt(fn, mFAtt, mFSize);
-}
-
-/* --Methode-- */
-void PIFontMac::SetFontAtt(PIFontAtt fa)
-{
-  SelectFontPt(mFName, fa, mFSize);
-}
-
-/* --Methode-- */
-void PIFontMac::SetFontSz(PIFontSize fs)
-{
-  SelectFont(mFName, mFAtt, fs);
-}
-
-/* --Methode-- */
-void PIFontMac::SetFontSzPt(int npt)
-{
-  SelectFontPt(mFName, mFAtt, npt);
-}
-
-/* --Methode-- */
-PIFontName PIFontMac::GetFontName()
-{
-  return(mFName);
-}
-
-/* --Methode-- */
-PIFontAtt PIFontMac::GetFontAtt()
-{
-  return(mFAtt);
-}
-
-/* --Methode-- */
-int PIFontMac::GetFontSize()
-{
-  return(mFSize);
-}
-
-/* --Methode-- */
-void PIFontMac::Apply()
-{
-  ::TextFont(mFNum);
-  ::TextSize(mFSize);
-  ::TextFace(mFStyle);
-}
-
-/* --Methode-- */
-int PIFontMac::GetFontHeight(int& asc, int& desc)
-{
-  StTextState saver;
-  Apply();
-  ::FontInfo finfo;
-  GetFontInfo(&finfo);
-  asc = finfo.ascent;
-  desc = finfo.descent;
-  return(asc+desc);
-}
-
-/* --Methode-- */
-int PIFontMac::GetStringWidth(char const* s)
-{
-  StTextState saver;
-  Apply();
-  return(::TextWidth(s, 0, strlen(s)));
-}
-
-
-#define NMAXFONTSZ    7
-#define NMAXFONTATT   3
-#define NMAXFONTTYP   5
-
-/*  Variables globales pour la gestion des fontes  */
-static const int fontSizes[4] = {8,12,18,24};
-
-/* --Methode-- */
-void PIFontMac::SelectFont(PIFontName fn, PIFontAtt fa, PIFontSize fs)
-{
-  if (fs < 0 || fs >=4) fs = PI_NormalSizeFont;
-  int isz = fontSizes[fs];
-  SelectFontPt(fn, fa, isz);
-}
-
-/* --Methode-- */
-void PIFontMac::SelectFontPt(PIFontName fn, PIFontAtt fa, int npt)
-{
-  if ((fn == mFName) && (fa == mFAtt) && (npt == mFSize)) return;
-  mFName = fn;
-  mFAtt  = fa;
-  mFSize = npt;
-  
-  switch (fa) {
-    case PI_RomanFont :
-      mFStyle = 0;
-      break;
-    case PI_BoldFont :
-      mFStyle = bold;
-      break;
-    case PI_ItalicFont :
-      mFStyle = italic;
-      break;
-    default :
-      mFStyle = 0;
-      break;
-  }
-
-  switch (fn) {
-	  case PI_DefaultFont :
-	    mFNum = 0;
-	    break;
-	  case PI_CourierFont :
-	    GetFNum("\pCourier", &mFNum);
-	    break;
-	  case PI_HelveticaFont :
-	    GetFNum("\pHelvetica", &mFNum);
-	    break;
-	  case PI_TimesFont :
-	    GetFNum("\pTimes", &mFNum);
-	    break;
-	  case PI_SymbolFont :
-	    GetFNum("\pSymbol", &mFNum);
-	    break;
-	  default :
-	    mFNum = 0;
-	    break;
-  }
-}
-
Index: unk/SophyaPI/PI/pifontmac.h
===================================================================
--- /trunk/SophyaPI/PI/pifontmac.h	(revision 3327)
+++ 	(revision )
@@ -1,51 +1,0 @@
-// This may look like C code, but it is really -*- C++ -*-
-// Module PI : Peida Interactive     PIFontMac
-// DAPNIA/SPP          E. Aubourg  99
-
-#ifndef PIFONTMAC_H_SEEN
-#define PIFONTMAC_H_SEEN
-
-#include "pisysdep.h"
-#include "pifontgen.h"
-
-
-class PIFontMac : public PIFontGen 
-{
-public :
-		PIFontMac(PIFontName fn = PI_DefaultFont);
-		PIFontMac(int npt, PIFontName fn = PI_DefaultFont, 
-                        PIFontAtt fa = PI_RomanFont);
-		PIFontMac(PIFontMac const & fnt);
-  virtual	~PIFontMac();
-
-  virtual PIFontMac & operator = (PIFontMac const & fnt);
-  virtual bool operator == (PIFontMac const & fnt);
-
-  virtual void		SetFont(PIFontName fn);
-  virtual void		SetFontAtt(PIFontAtt fa);
-  virtual void		SetFontSz(PIFontSize fs);
-  virtual void		SetFontSzPt(int npt);
-
-  virtual PIFontName    GetFontName();
-  virtual PIFontAtt     GetFontAtt();
-  virtual int		GetFontSize();
-
-  virtual int		GetFontHeight(int& asc, int& desc);
-  virtual int		GetStringWidth(char const* s);
-  
-  virtual void      Apply();
-
-protected:
-  void           SelectFont(PIFontName fn, PIFontAtt fa, PIFontSize fs);
-  void           SelectFontPt(PIFontName fn, PIFontAtt fa, int npt);
-
-  PIFontName mFName;
-  PIFontAtt  mFAtt;
-  int        mFSize;
-  short      mFNum;
-  int        mFStyle;
-};
-
-typedef PIFontMac PIFont;
-
-#endif      // PIFONTMAC_H_SEEN
Index: unk/SophyaPI/PI/pigraphmac.cc
===================================================================
--- /trunk/SophyaPI/PI/pigraphmac.cc	(revision 3327)
+++ 	(revision )
@@ -1,526 +1,0 @@
-#include <stdio.h>
-
-#include "sopnamsp.h"
-#include "pigraphmac.h"
-#include "UDrawingState.h"
-
-
-
-// #define DEBUG_PIBWDGX     Flag pour impression de debug etc ...
-
-/* --Methode-- */
-PIGraphicMac::PIGraphicMac(PIWdg* wdg)
-: PIGraphicGen(wdg)
-{
-  mPane = wdg->mPane;
-}
-
-/* --Methode-- */
-PIGraphicMac::~PIGraphicMac()
-{
-}
-
-/* --Methode-- */
-void PIGraphicMac::Erase(PIGrCoord x0, PIGrCoord y0, PIGrCoord dx, PIGrCoord dy)
-{
-  if (mPane->FocusDraw()) {
-    Rect theRect = {(int)y0, (int)x0, (int)y0+(int)dy, (int)x0+(int)dx};
-    ::EraseRect(&theRect);
-  }
-}
-
-/* --Methode-- */
-void PIGraphicMac::DrawString(PIGrCoord x, PIGrCoord y, char const* s, int /*pos*/)
-{
-  if (!mPane->FocusDraw()) {
-    ::MoveTo(x, y);
-    LStr255 ps = s;
-    StTextState saver;
-    myFont.Apply();
-    ::DrawString(ps);
-  }
-}
-
-/* --Methode-- */
-void PIGraphicMac::DrawOpaqueString(PIGrCoord x, PIGrCoord y, char const* s, int /*pos*/)
-{
-  if (mPane->FocusDraw()) {
-    ::MoveTo(x, y);
-    LStr255 ps = s;
-    StTextState saver;
-    myFont.Apply();
-	Rect box;
-	box.left = x;
-	box.bottom = y;
-	int iWidth = TextWidth(s,0,strlen(s));
-	box.right = box.left + iWidth;
-	int z;
-	box.top = box.bottom + myFont.GetFontHeight(z,z);
-    ::TETextBox(s,strlen(s),&box,teForceLeft);
-  }
-}
-
- 
-/* --Methode-- */
-void PIGraphicMac::DrawLine(PIGrCoord x1, PIGrCoord y1, PIGrCoord x2, PIGrCoord y2)
-{
-  if (mPane->FocusDraw()) {
-    ::MoveTo(x1,y1);
-    ::LineTo(x2,y2);
-  }
-}
-
-
-/* --Methode-- */
-void PIGraphicMac::DrawBox(PIGrCoord x0, PIGrCoord y0, PIGrCoord dx, PIGrCoord dy)
-{
-  if (mPane->FocusDraw()) {
-    Rect r = {y0, x0, (int)y0+(int)dy, (int)x0+(int)dx};
-    if (r.top  > r.bottom) swap(r.top,  r.bottom);
-    if (r.left > r.right)  swap(r.left, r.right);
-    r.right++; r.bottom++;
-    ::FrameRect(&r);
-  }
-}
-
-/* --Methode-- */
-void PIGraphicMac::DrawFBox(PIGrCoord x0, PIGrCoord y0, PIGrCoord dx, PIGrCoord dy)
-{
-  if (mPane->FocusDraw()) {
-    Rect r = {y0, x0, (int)y0+(int)dy, (int)x0+(int)dx};
-    if (r.top  > r.bottom) swap(r.top,  r.bottom);
-    if (r.left > r.right)  swap(r.left, r.right);
-    r.right++; r.bottom++;
-    ::PaintRect(&r);
-  }
-}
-
-/* --Methode-- */
-void PIGraphicMac::DrawCircle(PIGrCoord x0, PIGrCoord y0, PIGrCoord r)
-{
-  if (mPane->FocusDraw()) {
-    Rect rr = {(int)y0-(int)r, (int)x0-(int)r, (int)y0+(int)r, (int)x0+(int)r};
-    if (rr.top  > rr.bottom) swap(rr.top,  rr.bottom);
-    if (rr.left > rr.right)  swap(rr.left, rr.right);
-    ::FrameOval(&rr);
-  }
-}
-
-/* --Methode-- */
-void PIGraphicMac::DrawFCircle(PIGrCoord x0, PIGrCoord y0, PIGrCoord r)
-{
-  if (mPane->FocusDraw()) {
-    Rect rr = {(int)y0-(int)r, (int)x0-(int)r, (int)y0+(int)r, (int)x0+(int)r};
-    if (rr.top  > rr.bottom) swap(rr.top,  rr.bottom);
-    if (rr.left > rr.right)  swap(rr.left, rr.right);
-    ::PaintOval(&rr);
-  }
-}
-
-/* --Methode-- */
-void PIGraphicMac::DrawOval(PIGrCoord x0, PIGrCoord y0, PIGrCoord dx, PIGrCoord dy)
-{
-  if (mPane->FocusDraw()) {
-    Rect rr = {(int)y0-(int)dy, (int)x0-(int)dx, (int)y0+(int)dy, (int)x0+(int)dx};
-    if (rr.top  > rr.bottom) swap(rr.top,  rr.bottom);
-    if (rr.left > rr.right)  swap(rr.left, rr.right);
-    ::FrameOval(&rr);
-  }
-}
-
-/* --Methode-- */
-void PIGraphicMac::DrawFOval(PIGrCoord x0, PIGrCoord y0, PIGrCoord dx, PIGrCoord dy)
-{
-  if (mPane->FocusDraw()) {
-    Rect rr = {(int)y0-(int)dy, (int)x0-(int)dx, (int)y0+(int)dy, (int)x0+(int)dx};
-    if (rr.top  > rr.bottom) swap(rr.top,  rr.bottom);
-    if (rr.left > rr.right)  swap(rr.left, rr.right);
-    ::PaintOval(&rr);
-  }
-}
-
-
-/* --Methode-- */
-void PIGraphicMac::DrawPolygon(PIGrCoord *x, PIGrCoord *y, int n, bool cinc)
-{
-  PolyHandle h = MakePoly(x,y,n);
-  if (h) {
-    ::FramePoly(h);
-    ::KillPoly(h);
-  }
-  
-}
-
-/* --Methode-- */
-void PIGraphicMac::DrawFPolygon(PIGrCoord *x, PIGrCoord *y, int n, bool cinc)
-{
-  PolyHandle h = MakePoly(x,y,n);
-  if (h) {
-    ::PaintPoly(h);
-    ::KillPoly(h);
-  }
-}
-
-
-/* --Methode-- */
-void PIGraphicMac::DrawArc(PIGrCoord x0, PIGrCoord y0, PIGrCoord dx, PIGrCoord dy, 
-                         double degdeb, double deltadeg)
-{
-  if (mPane->FocusDraw()) {
-    Rect rr = {(int)y0-(int)dy, (int)x0-(int)dx, (int)y0+(int)dy, (int)x0+(int)dx};
-    if (rr.top  > rr.bottom) swap(rr.top,  rr.bottom);
-    if (rr.left > rr.right)  swap(rr.left, rr.right);
-    ::FrameArc(&rr, degdeb, deltadeg);
-  }
-}
-
-/* --Methode-- */
-void PIGraphicMac::DrawFArc(PIGrCoord x0, PIGrCoord y0, PIGrCoord dx, PIGrCoord dy, 
-                         double degdeb, double deltadeg)
-{
-  if (mPane->FocusDraw()) {
-    Rect rr = {(int)y0-(int)dy, (int)x0-(int)dx, (int)y0+(int)dy, (int)x0+(int)dx};
-    if (rr.top  > rr.bottom) swap(rr.top,  rr.bottom);
-    if (rr.left > rr.right)  swap(rr.left, rr.right);
-    ::PaintArc(&rr, degdeb, deltadeg);
-  }
-}
-
-
-/* --Methode-- */
-PolyHandle PIGraphicMac::MakePoly(PIGrCoord *x, PIGrCoord *y, int n)
-{
-  if (mPane->FocusDraw()) {
-    PolyHandle h = ::OpenPoly();
-    ::MoveTo(x[0], y[0]);
-    for (int i=1; i<n; i++) {
-      ::LineTo(x[i], y[i]);
-    }
-    ::MoveTo(x[0], y[0]);
-    ClosePoly();
-    return h;
-  }
-  return NULL;
-}
-
-
-/* --Methode-- */
-void PIGraphicMac::DrawMarker(PIGrCoord x0, PIGrCoord y0)
-{
-int hmsz = mMrkSz/2;
-int dmsz = mMrkSz-hmsz;
-PIGrCoord x[4],y[4];
-PILineAtt clatt;
-
-if (mMrk == PI_DotMarker) {
-  ::MoveTo( x0, y0);
-  ::Line(0,0);
-}
-
-else
-  {
-  clatt = mLAtt;
-  SelLine(PI_ThinLine);
-  switch (mMrk)
-    {
-    case  PI_PlusMarker :
-      DrawLine((int)x0-hmsz, y0, (int)x0+dmsz, y0);
-      DrawLine(x0, (int)y0-hmsz, x0, (int)y0+dmsz);
-      break;
-    case  PI_CrossMarker :
-      DrawLine((int)x0-hmsz, (int)y0-hmsz, (int)x0+dmsz, (int)y0+dmsz);
-      DrawLine((int)x0-hmsz, (int)y0+dmsz, (int)x0+dmsz, (int)y0-hmsz);
-      break;  
-    case PI_CircleMarker :
-      DrawCircle(x0, y0, hmsz);
-      break;
-    case PI_FCircleMarker :
-      DrawFCircle(x0, y0, hmsz);
-      break;
-    case PI_BoxMarker :
-      DrawBox((int)x0-hmsz, (int)y0-hmsz, mMrkSz, mMrkSz);
-      break;
-    case PI_FBoxMarker :
-      DrawFBox((int)x0-hmsz, (int)y0-hmsz, mMrkSz, mMrkSz);
-      break;
-    case  PI_TriangleMarker :
-      x[1] = mMrkSz; y[1] = 0; x[2] = -hmsz; y[2] = -mMrkSz; 
-      x[3] = -dmsz; y[3] = +mMrkSz; x[0] = (int)x0-hmsz; y[0] = (int)y0+hmsz;  
-      DrawPolygon(x, y, 4);
-      break;
-    case  PI_FTriangleMarker :
-      x[1] = mMrkSz; y[1] = 0; x[2] = -hmsz; y[2] = -mMrkSz; 
-      x[3] = -dmsz; y[3] = +mMrkSz; x[0] = (int)x0-hmsz; y[0] = (int)y0+hmsz;  
-      DrawFPolygon(x, y, 4);
-      break;
-    default :
-      ::MoveTo( x0, y0);
-      ::Line(0,0);
-      break;
-    }
-  SelLine(clatt);
-  }
-return;
-}
-
-/* --Methode-- */
-void PIGraphicMac::DrawMarkers(PIGrCoord *x, PIGrCoord *y, int n)
-{
-int i;
-
-if (n <= 0)  return;
-for(i=0; i<n; i++) DrawMarker(x[i], y[i]);
-}
-
-
-/* --Methode-- */
-void PIGraphicMac::DrawPixmap(PIGrCoord x, PIGrCoord y, unsigned char *pix, 
-                            int sx, int sy, PIColorMap* cmap)
-{
-  Rect	frame;
-  SetRect(&frame, 0, 0, sx, sy);
-  Rect dstFrame;
-  SetRect(&dstFrame, x, y, sx, sy);
-  GWorldPtr gWorld;
-  ThrowIfOSErr_(NewGWorld(&gWorld, 8, &frame, cmap->GetCTab(), nil, 0));
-  PixMapHandle pmh = GetGWorldPixMap(gWorld);
-  ::LockPixels (pmh);
-  Ptr pmap = GetPixBaseAddr(pmh);
-  memcpy(pmap, pix, sx*sy);
-  ::ForeColor (blackColor);
-  ::BackColor (whiteColor);
-  ::CopyBits((BitMap *) (*pmh),
-				&mPane->GetMacPort()->portBits,
-				&frame, &dstFrame, srcCopy, nil);
-  ::UnlockPixels (pmh);
-  DisposeGWorld(gWorld);
-}
-
-
-
-/* --Methode-- */
-void PIGraphicMac::SelForeground(PIColors col)
-{
-  if (mPane->FocusDraw()) {
-    long color;
-    switch (col) {
-      case PI_Black:
-        color = blackColor;
-        break;
-      case PI_White:
-        color = whiteColor;
-        break;
-      case PI_Red:
-        color = redColor;
-        break;
-      case PI_Blue:
-        color = blueColor;
-        break;
-      case PI_Green:
-        color = greenColor;
-        break;
-      case PI_Yellow:
-        color = yellowColor;
-        break;
-      default:
-        color = blackColor;
-    }
-    ::ForeColor(color);
-    mFCol = col;
-  }
-}
-
-/* --Methode-- */
-void PIGraphicMac::SelBackground(PIColors col)
-{
-  if (mPane->FocusDraw()) {
-    long color;
-    switch (col) {
-      case PI_Black:
-        color = blackColor;
-        break;
-      case PI_White:
-        color = whiteColor;
-        break;
-      case PI_Red:
-        color = redColor;
-        break;
-      case PI_Blue:
-        color = blueColor;
-        break;
-      case PI_Green:
-        color = greenColor;
-        break;
-      case PI_Yellow:
-        color = yellowColor;
-        break;
-      default:
-        color = blackColor;
-    }
-    mBCol = col;
-    ::BackColor(color);
-  }
-}
-
-/* --Methode-- */
-void PIGraphicMac::SelForeground(PIColorMap& cmap, int cid)
-{
-  if (mPane->FocusDraw()) {
-    PIColor picol = cmap.GetColor(cid);
-    RGBColor qdCol;
- 
-    qdCol.red   = picol.red;
-    qdCol.green = picol.green;
-    qdCol.blue  = picol.blue;
-
-    ::RGBForeColor(&qdCol);
-  }
-}
-
-/* --Methode-- */
-void PIGraphicMac::SelBackground(PIColorMap& cmap, int cid)
-{
-  if (mPane->FocusDraw()) {
-    PIColor picol = cmap.GetColor(cid);
-    RGBColor qdCol;
- 
-    qdCol.red   = picol.red;
-    qdCol.green = picol.green;
-    qdCol.blue  = picol.blue;
-
-    ::RGBBackColor(&qdCol);
-  }
-}
-
-/* --Methode-- */
-void PIGraphicMac::SelGOMode(PIGOMode mod)
-{
-if (mod == mGOm)  return;
-  if (mPane->FocusDraw())
-    switch (mod)
-    {
-      case PI_GOCopy :
-        ::PenMode(patCopy);
-        mGOm = mod;
-        break;
-      case PI_GOXOR :
-        ::PenMode(patXor);
-        mGOm = mod;
-        break;
-    }
-return;
-}
-
-
-/* --Methode-- */
-void PIGraphicMac::SelFontSzPt(int npt, PIFontAtt att)
-{
-  myFont.SetFontSzPt(npt);
-  myFont.SetFontAtt(att);
-}
-
-/* --Methode-- */
-void PIGraphicMac::SelFont(PIFontSize sz, PIFontAtt att)
-{
-  myFont.SetFontSz(sz);
-  myFont.SetFontAtt(att);
-}
-
-/* --Methode-- */
-void PIGraphicMac::SelFont(PIFont & fnt)
-{
-  myFont = fnt;
-}
-
-
-/* --Methode-- */
-void PIGraphicMac::SelLine(PILineAtt const & att)
-{
-  if (mPane->FocusDraw()) {
-    switch(att) {
-      case PI_NormalLine:
-        ::PenSize(1,1);
-        break;
-      case PI_ThinLine:
-        ::PenSize(1,1);  // Mettre en pointille, ou bien commentaire pour Laser ?
-        break;
-      case PI_ThickLine:
-        ::PenSize(2,2);
-        break;
-    }
-  }
-  mLAtt = att;
-}
-
-
-/* --Methode-- */
-void PIGraphicMac::SelMarker(int msz, PIMarker mrk)
-{
-if (msz > 1)  { mMrk = mrk;  mMrkSz = msz; }
-else  { mMrk = PI_DotMarker;  mMrkSz = 1; }
-return;
-}
-
-
-/* --Methode-- */
-void PIGraphicMac::SetClipRectangle(PIGrCoord x0, PIGrCoord y0, PIGrCoord dx, PIGrCoord dy)
-{
-//$CHECK
-}
-
-/* --Methode-- */
-void PIGraphicMac::ClearClipRectangle()
-{ 
-//$CHECK
-}
-
-/* --Methode-- */
-PIColors  PIGraphicMac::GetForeground() 
-{
-return (mFCol);
-}
-
-/* --Methode-- */
-PIColors  PIGraphicMac::GetBackground() 
-{
-return (mBCol);
-}
-
-
-/* --Methode-- */
-PIGOMode   PIGraphicMac::GetGOMode()
-{
-return (mGOm);
-}
-
-/* --Methode-- */
-PIFontAtt  PIGraphicMac::GetFontAtt()
-{
-return (myFont.GetFontAtt());
-}
-
-/* --Methode-- */
-int        PIGraphicMac::GetFontSize()
-{
-return (myFont.GetFontSize());
-}
-
-/* --Methode-- */
-PILineAtt  PIGraphicMac::GetLineAtt()
-{
-return (mLAtt);
-}
-
-/* --Methode-- */
-PIMarker   PIGraphicMac::GetMarker()
-{
-return (mMrk);
-}
-
-/* --Methode-- */
-int        PIGraphicMac::GetMarkerSize()
-{
-return (mMrkSz);
-}
-
-
Index: unk/SophyaPI/PI/pigraphmac.h
===================================================================
--- /trunk/SophyaPI/PI/pigraphmac.h	(revision 3327)
+++ 	(revision )
@@ -1,89 +1,0 @@
-// This may look like C code, but it is really -*- C++ -*-
-// Module PI : Peida Interactive     PIGraphicMac
-// Trace graphiques- Implementation Mac  E. Aubourg 99
-// LAL (Orsay) / IN2P3-CNRS  DAPNIA/SPP (Saclay) / CEA
-
-#ifndef PIGRAPHICMAC_H_SEEN
-#define PIGRAPHICMAC_H_SEEN
-
-#include "pisysdep.h"
-#include "pigraphgen.h"
-
-class PIGraphicMac : public PIGraphicGen
-{
-public:
-                     PIGraphicMac(PIWdg* wdg);
-  virtual           ~PIGraphicMac();
-
-//  Trace graphiques
-  virtual void       Erase(PIGrCoord x0, PIGrCoord y0, PIGrCoord dx, PIGrCoord dy);
-  virtual void       DrawString(PIGrCoord x, PIGrCoord y, const char* s, int pos = 0);
-  virtual void       DrawOpaqueString(PIGrCoord x, PIGrCoord y, const char* s, int pos = 0);
-  virtual void       DrawLine(PIGrCoord x1, PIGrCoord y1, PIGrCoord x2, PIGrCoord y2);
-  virtual void       DrawBox(PIGrCoord x0, PIGrCoord y0, PIGrCoord dx, PIGrCoord dy);
-  virtual void       DrawFBox(PIGrCoord x0, PIGrCoord y0, PIGrCoord dx, PIGrCoord dy);
-  virtual void       DrawCircle(PIGrCoord x0, PIGrCoord y0, PIGrCoord r);
-  virtual void       DrawFCircle(PIGrCoord x0, PIGrCoord y0, PIGrCoord r);
-  virtual void       DrawOval(PIGrCoord x0, PIGrCoord y0, PIGrCoord dx, PIGrCoord dy);
-  virtual void       DrawFOval(PIGrCoord x0, PIGrCoord y0, PIGrCoord dx, PIGrCoord dy);
-  virtual void       DrawPolygon(PIGrCoord *x, PIGrCoord *y, int n, bool cinc=true);  
-  virtual void       DrawFPolygon(PIGrCoord *x, PIGrCoord *y, int n, bool cinc=true);  
-  virtual void       DrawArc(PIGrCoord x0, PIGrCoord y0, PIGrCoord dx, PIGrCoord dy,
-                             double degdeb, double deltadeg);
-  virtual void       DrawFArc(PIGrCoord x0, PIGrCoord y0, PIGrCoord dx, PIGrCoord dy, 
-                              double degdeb, double deltadeg);
-  virtual void       DrawMarker(PIGrCoord x0, PIGrCoord y0);
-  virtual void       DrawMarkers(PIGrCoord *x, PIGrCoord *y, int n);
-  virtual void       DrawPixmap(PIGrCoord x, PIGrCoord y, unsigned char *pix, 
-                                int sx, int sy, PIColorMap* cmap);
-
-// Modifications attributs graphiques
-  virtual void       SelForeground(PIColors col=PI_Black);
-  virtual void       SelBackground(PIColors col=PI_White);
-  virtual void       SelForeground(PIColorMap& cmap, int cid);
-  virtual void       SelBackground(PIColorMap& cmap, int cid);
-  virtual void       SelGOMode(PIGOMode mod=PI_GOCopy);
-  virtual void	     SelFont(PIFont & fnt);
-  virtual void       SelFont(PIFontSize sz=PI_NormalSizeFont, 
-                             PIFontAtt att=PI_RomanFont);
-  virtual void       SelFontSzPt(int npt=12, PIFontAtt att=PI_RomanFont);
-  virtual void       SelLine(PILineAtt const& att);
-  virtual void       SelMarker(int msz=3, PIMarker mrk=PI_DotMarker);
-
-// Selection de zone de trace (clip)
-  virtual void       SetClipRectangle(PIGrCoord x0, PIGrCoord y0, PIGrCoord dx, PIGrCoord dy);
-  virtual void       ClearClipRectangle();
-
-// Acces aux attributs graphiques 
-  virtual PIColors   GetForeground();
-  virtual PIColors   GetBackground();
-  virtual PIGOMode   GetGOMode();
-  virtual PIFontAtt  GetFontAtt();
-  virtual int        GetFontSize();
-  virtual PILineAtt  GetLineAtt();
-  virtual PIMarker   GetMarker();
-  virtual int        GetMarkerSize();
-
-  //virtual int        GetFontHeight(int& asc, int& desc);
-  //virtual PIGrCoord  CalcStringWidth(char const* s);
-
-// Sauvegarde des attributs graphiques 
- // virtual void       SaveGraphicAtt();
- // virtual void       RestoreGraphicAtt();
-
-protected:
-  LPane* mPane;
-  
-  PolyHandle         MakePoly(PIGrCoord *x, PIGrCoord *y, int n);
-
-  PIColors  mFCol, mBCol;
-  PIGOMode  mGOm;
-  PILineAtt mLAtt;
-  PIMarker  mMrk;
-  int       mMrkSz;
-
-};
-
-typedef PIGraphicMac PIGraphicWin;
-
-#endif
Index: unk/SophyaPI/PI/pilistmac.cc
===================================================================
--- /trunk/SophyaPI/PI/pilistmac.cc	(revision 3327)
+++ 	(revision )
@@ -1,93 +1,0 @@
-#include<stdio.h>
-
-#include "sopnamsp.h"
-#include "pilistmac.h"
-
-
-
-
-/* --Methode-- */
-PIListMac::PIListMac(PIContainerGen* par, char* nom,
-                 int sx, int sy, int px, int py)
-: PIListGen(par, nom, sx, sy, px, py)
-{
-  delete mPane;
-  mPane = mPIPPList = new PIPPList(mPaneInfo, mViewInfo, this);
-  Manage();
-}
-
-/* --Methode-- */
-PIListMac::~PIListMac()
-{
-}
-
-
-/* --Methode-- */
-void PIListMac::AppendItem(const char * item, PIMessage msg)
-{
-  mPIPPList->AppendItem(item, msg);
-}
-
-/* --Methode-- */
-void PIListMac::DeleteItem(const char * item)
-{
-  mPIPPList->DeleteItem(item);
-}
-
-/* --Methode-- */
-void PIListMac::DeleteItemMsg(PIMessage msg)
-{
-  mPIPPList->DeleteItem(msg);
-}
-
-
-/* --Methode-- */
-void PIListMac::SetMultipleSelect(bool ms)
-{
-  mPIPPList->SetMultipleSelect(ms);
-}
-
-/* --Methode-- */
-int PIListMac::GetNbSelection()
-{
-  return mPIPPList->GetNbSel();
-}
-
-/* --Methode-- */
-PIMessage PIListMac::GetSelection(int num)
-{
-  return mPIPPList->GetSelMsg(num);
-}
-
-/* --Methode-- */
-string PIListMac::GetSelectionStr(int num)
-{
-  return mPIPPList->GetSelStr(num);
-}
-
-/* --Methode-- */
-void PIListMac::SelectItem(const char * item)
-{
-  mPIPPList->SelectItem(item);
-}
-
-/* --Methode-- */
-void PIListMac::SelectItemMsg(PIMessage msg)
-{
-  mPIPPList->SelectItem(msg);
-}
-
-
-/* --Methode-- */
-void PIListMac::ClearSelItem(const char * item)
-{
-  mPIPPList->ClearSelItem(item);
-}
-
-/* --Methode-- */
-void PIListMac::ClearSelItemMsg(PIMessage msg)
-{
-  mPIPPList->ClearSelItem(msg);
-}
-
-
Index: unk/SophyaPI/PI/pilistmac.h
===================================================================
--- /trunk/SophyaPI/PI/pilistmac.h	(revision 3327)
+++ 	(revision )
@@ -1,40 +1,0 @@
-#ifndef PILISTMAC_H_SEEN
-#define PILISTMAC_H_SEEN
-
-#include "pilistgen.h"
-#include "pipplist.h"
-
-class PIListMac : public PIListGen {
-public:
-	             PIListMac(PIContainerGen* par, char* nom,
-                             int sx=100, int sy=100, int px=0, int py=0);
-	             ~PIListMac();
-				   
-  virtual void	     AppendItem(const char * item, PIMessage msg);
-  virtual void       DeleteItem(const char *item);
-  virtual void       DeleteItemMsg(PIMessage msg);
-  virtual void	     DeleteAllItems();
-
-  virtual int	       GetNbItems();
-  virtual PIMessage  GetItemMsg(int n);
-  virtual string     GetItem(int n);
-
-  virtual void       SetMultipleSelect(bool ms=false);
-
-  virtual int        GetNbSelection();
-  virtual PIMessage  GetSelection(int num=0);
-  virtual string     GetSelectionStr(int num=0);
-
-  virtual void       SelectItem(const char * item);
-  virtual void       SelectItemMsg(PIMessage msg);
-  virtual void       ClearSelItem(const char * item);
-  virtual void       ClearSelItemMsg(PIMessage msg);
-
-
-protected:
-  PIPPList* mPIPPList;
-};
-
-typedef PIListMac        PIList;
-
-#endif
Index: unk/SophyaPI/PI/pimenubarmac.cc
===================================================================
--- /trunk/SophyaPI/PI/pimenubarmac.cc	(revision 3327)
+++ 	(revision )
@@ -1,37 +1,0 @@
-#include "sopnamsp.h"
-#include "pimenubarmac.h"
-#include "pippmenubar.h"
-#include <LMenuBar.h>
-
-PIMenubarMac::PIMenubarMac(PIApplicationGen* par, char* nom)
-:PIMenubarGen(par, nom)
-{
-	new PIPPMenuBar();
-}
-
-PIMenubarMac::~PIMenubarMac()
-{}
-
-void
-PIMenubarMac::AppendMenu(PIMenu *pdm)
-{
-  LMenuBar::GetCurrentMenuBar()->InstallMenu(pdm->macMenu, InstallMenu_AtEnd);
-}
-
-void
-PIMenubarMac::RemoveMenu(PIMenu *pdm)
-{
-  LMenuBar::GetCurrentMenuBar()->RemoveMenu(pdm->macMenu);
-}
-
-void
-PIMenubarMac::SetSensitivity(PIMenu *pdm, bool sens)
-{
-
-}
-
-bool
-PIMenubarMac::IsSensitive(PIMenu *pdm)
-{
-  return true;
-}
Index: unk/SophyaPI/PI/pimenubarmac.h
===================================================================
--- /trunk/SophyaPI/PI/pimenubarmac.h	(revision 3327)
+++ 	(revision )
@@ -1,20 +1,0 @@
-#ifndef PIMBARMAC_H_SEEN
-#define PIMBARMAC_H_SEEN
-
-#include "pimenubargen.h"
-
-class PIMenubarMac : public PIMenubarGen {
- public:
-	            PIMenubarMac(PIApplicationGen* par, char* nom);
-	           ~PIMenubarMac();
-	           
-  virtual void      AppendMenu(PIMenu *pdm);
-  virtual void      RemoveMenu(PIMenu *pdm);
-  virtual void      SetSensitivity(PIMenu *pdm, bool sens=true);
-  virtual bool      IsSensitive(PIMenu *pdm);
-
-};
-
-typedef PIMenubarMac   PIMenubar;
-
-#endif
Index: unk/SophyaPI/PI/pimenumac.cc
===================================================================
--- /trunk/SophyaPI/PI/pimenumac.cc	(revision 3327)
+++ 	(revision )
@@ -1,216 +1,0 @@
-#include <LString.h>
-#include "sopnamsp.h"
-#include "pimenumac.h"
-#include <algorithm>
-#include <iostream>
-
-int PIMenuMac::lastId = 1024;
-vector<PIMenuMac::menuInfo> mMenuInfos;
-
-/* --Methode-- */
-PIMenuMac::PIMenuMac(PIWdg* par, const char *nom, PIMenuType pdpu) 
-: PIMenuGen(par, nom, pdpu)
-{
-   macMenu = new LMenu(lastId, LStr255(nom));
-   menuInfo info;
-   info.mId = lastId;
-   info.pimenu = this;
-   mMenuInfos.push_back(info);
-   lastId++;
-}
-
-
-/* --Methode-- */
-PIMenuMac::~PIMenuMac()
-{
-  LMenuBar::GetCurrentMenuBar()->RemoveMenu(macMenu);
-  mMenuInfos.erase(mMenuInfos.begin() + GetMenuNum());
-  delete macMenu;
-}
-
-/* --Methode-- */
-void PIMenuMac::AppendItem(const char* nom, PIMessage msg, char* sc)
-{
-  AddItem(nom, msg, 0, sc, NULL);
-}
-
-/* --Methode-- */
-void PIMenuMac::AppendCheckItem(const char* nom, PIMessage msg, char* sc)
-{
-  AddItem(nom, msg, 1, sc, NULL);
-}
-
-/* --Methode-- */
-void PIMenuMac::AppendPDMenu(PIMenuGen *pdm, char* sc)
-{
-  if (pdm->MType() !=  k_PulldownMenu) {
-    cerr << "PIMenuX::AppendPDMenu()/Erreur: PullDownMenu seulement ... " << endl;
-    return;
-  }
-  AddItem(NULL, pdm->Msg(), 2, sc, (PIMenuMac*)pdm);
-}
-
-/* --Methode-- */
-void PIMenuMac::AddItem(const char* nom, PIMessage msg, int tog, char* sc, PIMenuMac *pdm)
-{
-  macMenu->InsertCommand("\ptemp", -2000, 1000);
-  MenuHandle mh = GetMacMenuHandle();
-  short i = ::CountMenuItems(mh);
-  LStr255 titre(nom);
-  ::SetMenuItemText(mh, i, titre);
-
-  // Gestion menus hiérarchiques
-  if (tog == 2 && pdm != NULL) {
-    ::SetItemCmd(mh, i, hMenuCmd);
-    ::SetItemMark(mh, i, pdm->GetMacMenuID());
-  }
-  // Le menu hierarchique sera "insere" au moment de l'insertion dans la
-  // menubar...
-  
-  itemInfo info;
-  info.pimsg  = msg;
-  info.name   = nom;
-  mItemInfos.push_back(info);
-}
-
-/* --Methode-- */
-int PIMenuMac::GetItemNum(const char *nom)
-{
-  int j=0;
-  for (vector<itemInfo>::iterator i = mItemInfos.begin(); i != mItemInfos.end(); i++,j++)
-    if ((*i).name == nom) return j;
-  return(-1);
-}
-
-/* --Methode-- */
-int PIMenuMac::GetItemNumMsg(PIMessage msg)
-{
-  int j=0;
-  for (vector<itemInfo>::iterator i = mItemInfos.begin(); i != mItemInfos.end(); i++,j++)
-    if ((*i).pimsg == msg) return j;
-  return(-1);
-}
-
-/* --Methode-- */
-int PIMenuMac::GetMenuNum()
-{
-  int j=0;
-  for (vector<menuInfo>::iterator i = mMenuInfos.begin(); i != mMenuInfos.end(); i++,j++)
-    if ((*i).pimenu == this) return j;
-  return(-1);
-}
-
-/* --Methode-- */
-int PIMenuMac::GetMenuNum(short menuId)
-{
-  int j=0;
-  for (vector<menuInfo>::iterator i = mMenuInfos.begin(); i != mMenuInfos.end(); i++,j++)
-    if ((*i).mId == menuId) return j;
-  return(-1);
-}
-
-/* --Methode-- */
-PIMenu* PIMenuMac::GetMenu(short menuId)
-{
-  int j=0;
-  for (vector<menuInfo>::iterator i = mMenuInfos.begin(); i != mMenuInfos.end(); i++,j++)
-    if ((*i).mId == menuId) return (*i).pimenu;
-  return(NULL);
-}
-
-
-/* --Methode-- */
-void
-PIMenuMac::SetStateNum(int n, bool st)
-{
-  if (n<0 || n >= mItemInfos.size()) return; // $CHECK$ exception ?
-  ::CheckItem(macMenu->GetMacMenuH(), n, st);
-}
-
-/* --Methode-- */
-void
-PIMenuMac::SetStateMsg(PIMessage msg, bool st)
-{
-  int i = GetItemNumMsg(msg);
-  if (i>=0)
-    SetStateNum(i, st);
-}
-
-/* --Methode-- */
-void
-PIMenuMac::SetState(const char* nom, bool st)
-{
-  int i = GetItemNum(nom);
-  if (i>=0)
-    SetStateNum(i, st);
-}
-
-void
-PIMenuMac::DeleteItemNum(int n)
-{
-  if (n<0 || n >= mItemInfos.size()) return; // $CHECK$ exception ?
-  macMenu->RemoveItem(n+1);
-  mItemInfos.erase(mItemInfos.begin()+n);
-}
-
-void
-PIMenuMac::DeleteItemMsg(PIMessage msg)
-{
-  int i = GetItemNumMsg(msg);
-  if (i>=0)
-    DeleteItemNum(i);
-}
-
-void
-PIMenuMac::DeleteItem(const char* nom)
-{
-  int i = GetItemNum(nom);
-  if (i>=0)
-    DeleteItemNum(i);
-}
-
-void
-PIMenuMac::ItemSelected(int item)
-{
-  if (item<0 || item >= mItemInfos.size()) return; // $CHECK$ exception ?
-  Send(mItemInfos[item].pimsg, PIMsg_Click, (void*) mItemInfos[item].name.c_str());
-}
-
-string
-PIMenuMac::GetMenuItemText(int item)
-{
-  if (item<0 || item >= mItemInfos.size()) return ""; // $CHECK$ exception ?
-  return mItemInfos[item].name;
-}
-
-PIMessage
-PIMenuMac::GetMenuItemMsg(int item)
-{
-  if (item<0 || item >= mItemInfos.size()) return -1; // $CHECK$ exception ?
-  return mItemInfos[item].pimsg;
-}
-
-
-
-void
-PIMenuMac::Show()
-{}
-
-void
-PIMenuMac::Show(PIWdg *w, int px, int py)
-{}
-
-
-MenuHandle
-PIMenuMac::GetMacMenuHandle()
-{
-  return macMenu->GetMacMenuH();
-}
-
-ResIDT
-PIMenuMac::GetMacMenuID()
-{
-  return macMenu->GetMenuID();
-}
-
-
Index: unk/SophyaPI/PI/pimenumac.h
===================================================================
--- /trunk/SophyaPI/PI/pimenumac.h	(revision 3327)
+++ 	(revision )
@@ -1,78 +1,0 @@
-#ifndef PIMENUMAC_H_SEEN
-#define PIMENUMAC_H_SEEN
-
-#include "pimenugen.h"
-#include <LMenu.h>
-#include <vector>
-#include <list>
-
-// Menu general
-class PIMenuMac : public PIMenuGen {
-public:
-					PIMenuMac(PIWdg* par, const char* nom, PIMenuType pdpu=k_UTMenu);
-				   ~PIMenuMac();
-				   
-  virtual void	  AppendItem(const char* nom, PIMessage msg, char* sc=NULL);
-  virtual void	  AppendCheckItem(const char* nom, PIMessage msg, char* sc=NULL);
-  virtual void	  AppendPDMenu(PIMenuGen *pdm, char* sc=NULL);
-
-  virtual void    DeleteItem(const char *nom);
-  virtual void    DeleteItemMsg(PIMessage msg);
-  virtual void    DeleteItemNum(int n);
-
-  virtual void    SetSensitivity(const char *nom, bool sens=true); 
-  virtual void    SetSensitivityMsg(PIMessage msg, bool sens=true); 
-  virtual void    SetSensitivityNum(int n, bool sens=true);
-
-  virtual bool    IsSensitive(const char *nom);
-  virtual bool    IsSensitiveMsg(PIMessage msg);
-  virtual bool    IsSensitiveNum(int n);
-
-  virtual void    SetState(const char *nom, bool st=false); 
-  virtual void    SetStateMsg(PIMessage msg, bool st=false); 
-  virtual void    SetStateNum(int n, bool st=false);
- 
-  virtual bool    GetState(const char *nom); 
-  virtual bool    GetStateMsg(PIMessage msg); 
-  virtual bool    GetStateNum(int n); 
-
-  virtual void    Show();
-  virtual void    Show(PIWdg *w, int px, int py);
-
-  LMenu*          GetPPMenu() {return macMenu;}
-  void            ItemSelected(int item);
-  string          GetMenuItemText(int item);
-  PIMessage       GetMenuItemMsg(int item);	
-protected:
-	LMenu*          macMenu;
-	struct menuInfo {
-	  short      mId;
-	  PIMenuMac* pimenu;
-	};
-	struct itemInfo {
-	  PIMessage  pimsg;
-	  string     name;
-	};
-	static vector<menuInfo> mMenuInfos;
-	vector<itemInfo> mItemInfos;
-	static int      lastId;
-	
-	friend class    PIMenubarMac;
-	friend class    PIOptMenuMac;
-	friend class    PIPPOptMenu;
-	friend class    PIPPMenuBar;
-	MenuHandle      GetMacMenuHandle();
-	ResIDT          GetMacMenuID();
-	
-    int             GetItemNum(const char* nom);
-	int             GetItemNumMsg(PIMessage msg);
-	int             GetMenuNum();
-	static int      GetMenuNum(short menuId);
-	static PIMenuMac*  GetMenu(short menuId);
-    void            AddItem(const char* nom, PIMessage msg, int tog, char* sc, PIMenuMac *pdm);
-};
-
-
-typedef PIMenuMac      PIMenu;
-
-#endif
Index: unk/SophyaPI/PI/pimsgmac.h
===================================================================
--- /trunk/SophyaPI/PI/pimsgmac.h	(revision 3327)
+++ 	(revision )
@@ -1,8 +1,0 @@
-#include <PP_Types.h>
-
-const MessageT msg_Btn1    msg_Click;
-const MessageT msg_Btn2    10001;
-const MessageT msg_Btn3    10002;
-const MessageT msg_Move1   10003;
-const MessageT msg_Move2   10004;
-const MessageT msg_Move3   10005;
Index: unk/SophyaPI/PI/pioptmenumac.cc
===================================================================
--- /trunk/SophyaPI/PI/pioptmenumac.cc	(revision 3327)
+++ 	(revision )
@@ -1,86 +1,0 @@
-#include "sopnamsp.h"
-#include "pioptmenumac.h"
-#include "pippoptmenu.h"
-
-/* --Methode-- */
-PIOptMenuMac::PIOptMenuMac(PIContainerGen* par, char const* nom,
-                     int sx, int sy, int px, int py)
-: PIOptMenuGen(par, nom, sx, sy, px, py)
-{
-  delete mPane;
-  
-  char buff[128];
-  strncpy(buff, nom, 64);
-  strcat(buff,"_Menu");
-  mMen = new PIMenu((PIWdg*)par, buff, k_PopupMenu);
-  mMen->SetMsgParent(this);
-  LStr255 titre("");
-  
-  StTextState textState;
-  ::TextFont(systemFont);
-  ::TextSize(12);
-  ::TextFace(0);
-  int titleWidth = ::StringWidth(titre);
-  
-  mPane = new PIPPOptMenu(mPaneInfo, msg_Click, 0, 200, titleWidth+5, popupMenuProc/*+popupVariableWidth*/, 130, titre, 0, 1);
-  
-  ((PIPPOptMenu*)mPane)->SetMenu(mMen);
-  ((LStdPopupMenu*)mPane)->AddListener(this);
-  
-  Manage();
-}
-
-/* --Methode-- */
-PIOptMenuMac::~PIOptMenuMac()
-{
-  delete mMen;
-}
-
-/* --Methode-- */
-void PIOptMenuMac::Process(PIMessage msg, PIMsgHandler* sender, void* data)
-{
-if (sender == mMen)   {
-  SetValue(UserMsg(msg));
-  ReSend(msg, this, NULL);
-}
-return;
-}
-
-void
-PIOptMenuMac::ListenToMessage(MessageT /*inMessage*/, void *)
-{
-//  if (inMessage == msg_Click)
-  int n = ((LStdPopupMenu*)mPane)->GetValue()-1;
-  mMen->ItemSelected(n);
-  mStext = mMen->GetMenuItemText(n);
-  mSmsg  = mMen->GetMenuItemMsg(n);
-}
-
-/* --Methode-- */
-void PIOptMenuMac::SetValueStr(string & s)
-{
-  int n;
-  n=mMen->GetItemNum((char *)s.c_str());
-  if (n < 0)  return;  
-
-  StopListening();
-  ((LStdPopupMenu*)mPane)->SetValue(n+1);
-  StartListening();
-  mStext = s;
-  mSmsg  = mMen->GetMenuItemMsg(n);
-}
-
-/* --Methode-- */
-void PIOptMenuMac::SetValue(PIMessage msg)
-{
-  int n;
-  n=mMen->GetItemNumMsg(msg);
-  if (n < 0)  return;
-  
-  StopListening();
-  ((LStdPopupMenu*)mPane)->SetValue(n+1);
-  StartListening();
-  mStext = mMen->GetMenuItemText(n);
-  mSmsg  = msg;
-}
-
Index: unk/SophyaPI/PI/pioptmenumac.h
===================================================================
--- /trunk/SophyaPI/PI/pioptmenumac.h	(revision 3327)
+++ 	(revision )
@@ -1,29 +1,0 @@
-#ifndef PIOPTMENMAC_H_SEEN
-#define PIOPTMENMAC_H_SEEN
-
-#include "pioptmenugen.h"
-
-class PIOptMenuMac : public PIOptMenuGen {
-public:
-	                PIOptMenuMac(PIContainerGen* par, const char* nom,  
-                               int sx=10, int sy=10, int px=0, int py=0);
-	               ~PIOptMenuMac();
-
-  virtual void      Process(PIMessage msg, PIMsgHandler* sender, void* data=NULL);
-				   
-  virtual void	    ListenToMessage(MessageT inMessage, void *ioParam);
-  virtual string    GetValueStr() { return(mStext); }
-  virtual PIMessage GetValue()    { return(mSmsg); } 
-  virtual void      SetValueStr(string & s);
-  virtual void      SetValue(PIMessage msg);
-  
-
-protected:
-  string    mStext;
-  PIMessage mSmsg;
-};
-
-
-typedef PIOptMenuMac  PIOptMenu ;
-
-#endif
Index: unk/SophyaPI/PI/piperiodmac.cc
===================================================================
--- /trunk/SophyaPI/PI/piperiodmac.cc	(revision 3327)
+++ 	(revision )
@@ -1,37 +1,0 @@
-#include "sopnamsp.h"
-#include "piperiodmac.h"
-
-
-
-/* --Methode-- */
-PIPeriodMac::PIPeriodMac(int dt, UsPeriodicAction act, void * usp)
-: Periodic(dt, act, usp), mLastTick(-1)
-{
-}
-
-/* --Methode-- */
-PIPeriodMac::~PIPeriodMac()
-{
-}
-
-/* --Methode-- */
-void PIPeriodMac::Start(int dt)
-{
-  StartRepeating();
-  if (dt > 0)  { mDt = dt; mDtms = 1000*dt;}
-}
-
-/* --Methode-- */
-void PIPeriodMac::Stop()
-{
-  StopRepeating();
-}
-
-/* --Methode-- */
-void PIPeriodMac::SpendTime(const EventRecord&)
-{
-  long ticks = ::TickCount();
-  if ((ticks - mLastTick) * 1000. / 60. < mDtms) return;
-  mLastTick = ticks;
-  DoPeriodic();
-}
Index: unk/SophyaPI/PI/piperiodmac.h
===================================================================
--- /trunk/SophyaPI/PI/piperiodmac.h	(revision 3327)
+++ 	(revision )
@@ -1,22 +1,0 @@
-// This may look like C code, but it is really -*- C++ -*-
-#ifndef PIPERIODMAC_H
-#define PIPERIODMAC_H
-
-#include "periodic.h"
-#include "LPeriodical.h"
-
-class PIPeriodMac : public Periodic, public LPeriodical {
-public:
-  PIPeriodMac(int dt, UsPeriodicAction act=NULL, void * usp=NULL);
-  ~PIPeriodMac();
-
-  virtual void Start(int dt=-1);
-  virtual void Stop();
-  virtual void SpendTime(const EventRecord&);
-protected:
-  long mLastTick;
-};
-
-typedef PIPeriodMac PIPeriodic;
-
-#endif
Index: unk/SophyaPI/PI/pipixmapmac.cc
===================================================================
--- /trunk/SophyaPI/PI/pipixmapmac.cc	(revision 3327)
+++ 	(revision )
@@ -1,103 +1,0 @@
-#include "sopnamsp.h"
-#include "pipixmapmac.h"
-
-PIPixmapMac::PIPixmapMac(PIContainerGen *par, char *nom,
-                         int sx, int sy, int px, int py)
-: PIPixmapGen(par,nom,sx,sy,px,py), mGWorld(NULL)
-{}
-
-
-PIPixmapMac::~PIPixmapMac()
-{}
-
-
-/* --Methode-- */
-void PIPixmapMac::SetPixmap(unsigned char *pix, int sx, int sy, bool refr, int ox, int oy)
-{
-  if (nx != sx || ny != sy)
-    if (mGWorld) {
-      DisposeGWorld(mGWorld);
-      mGWorld = NULL;
-    }
-  PIPixmapGen::SetPixmap(pix, sx, sy, refr);
-}
-
-void
-PIPixmapMac::Resize()
-{
-  Refresh();
-}
-
-void
-PIPixmapMac::Refresh()
-{
-	PIPixmapGen::Refresh();
-}
-
-void
-PIPixmapMac::DrawOff()
-{
-  if (mGWorld) {
-    DisposeGWorld(mGWorld);
-    mGWorld = NULL;
-  }
-  
-  if (!cmap) return;
-  if (!pixmap) return;
-  if (nx == 0 || ny == 0) return;
-  
-  Rect	frame;
-  SetRect(&frame, 0, 0, XSize(), YSize());
-
-  
-  ThrowIfOSErr_(NewGWorld(&mGWorld, 8, &frame, cmap->mCTab, nil, 0));
-
-    // Lock down Pixels that we are drawing to so that memory will not
-	// move
-	::LockPixels (mGWorld->portPixMap);
-
- 	// Draw
-	PixMapHandle	pMap;
-	unsigned char	*pixP;
-	
-	pMap = GetGWorldPixMap(mGWorld);
-	for (int y=frame.top; y<frame.bottom; y++) {
-		pixP = (unsigned char *) GetPixBaseAddr(pMap) + y * ((**pMap).rowBytes & 0x7FFF);
-		for(int x = frame.left ; x < frame.right ; x++)
-			pixP[x] = (x<nx && y<ny) ? pixmap[x + y*nx]+2 : 0;
-	}
-			
-	// Now unlock Pixels.
-	::UnlockPixels (mGWorld->portPixMap);
-	
-	mPane->FocusDraw();
-//	SetPalette(mPane->GetMacPort(),cmap->mPalette, true);
-//	PIPixmapGen::Refresh();
-}
-
-void
-PIPixmapMac::Draw(PIGraphic* g,int,int,int,int)
-{
-  Draw(g);
-}
-
-void
-PIPixmapMac::Draw(PIGraphic* g)
-{
-  DrawOff();
-  if (!mGWorld) return;
-  mPane->FocusDraw();
-  Rect	paneFrame;
-  mPane-> CalcLocalFrameRect(paneFrame);
-  Rect	offsFrame;
-  SetRect(&offsFrame, 0, 0, paneFrame.right-paneFrame.left, paneFrame.bottom-paneFrame.top);
-  ::LockPixels (mGWorld->portPixMap);
-  ::ForeColor (blackColor);
-  ::BackColor (whiteColor);
-  ::CopyBits((BitMap *) (*(GetGWorldPixMap(mGWorld))),
-				&mPane->GetMacPort()->portBits,
-				&offsFrame, &paneFrame, srcCopy, nil);
-  ::UnlockPixels (mGWorld->portPixMap);
-  DisposeGWorld(mGWorld);
-  mGWorld = 0;
-}
Index: unk/SophyaPI/PI/pipixmapmac.h
===================================================================
--- /trunk/SophyaPI/PI/pipixmapmac.h	(revision 3327)
+++ 	(revision )
@@ -1,26 +1,0 @@
-#ifndef PIPIXMAPMAC_H_SEEN
-#define PIPIXMAPMAC_H_SEEN
-
-#include "pipixmapgen.h"
-
-class PIPixmapMac : public PIPixmapGen {
-
-public:
-                PIPixmapMac(PIContainerGen *par, char *nom,
-                         int sx=10, int sy=10, int px=0, int py=0);
-  virtual      ~PIPixmapMac();
-
-  virtual void  SetPixmap(unsigned char *pix, int sx, int sy, bool refr=true, int ox=0, int oy=0);
-  virtual void  Draw(PIGraphic* g);
-  virtual void  Draw(PIGraphic* g, int x0, int y0, int dx, int dy);
-  virtual void	Refresh();
-  virtual void	DrawOff();
-  virtual void  Resize();
-protected:
-  GWorldPtr 	mGWorld;
-};
-
-typedef PIPixmapMac PIPixmap;
-
-
-#endif
Index: unk/SophyaPI/PI/pippapplmac.cc
===================================================================
--- /trunk/SophyaPI/PI/pippapplmac.cc	(revision 3327)
+++ 	(revision )
@@ -1,42 +1,0 @@
-#include "sopnamsp.h"
-#include "pippapplmac.h"
-#include "piupdattachment.h"
-#include "pippmenubar.h"
-#include "pippwindowmac.h"
-#include <LClipboard.h>
-
-PIPPApplMac::PIPPApplMac()
-:LApplication()
-{
-  RegisterClass_(PIPPWindowMac);
-  AddAttachment(new LClipboard);
-}
-
-
-PIPPApplMac::~PIPPApplMac()
-{}
-
-void
-PIPPApplMac::AdjustCursor(const EventRecord &inMacEvent)
-{
-  PIUpdAttachment::hit = false;
-  LApplication::AdjustCursor(inMacEvent);
-  if (!PIUpdAttachment::hit) {
-    if (PIUpdAttachment::lastCursPane)
-       PIUpdAttachment::lastCursPane->myWdg->Leave();
-    PIUpdAttachment::lastCursPane = NULL;
-  }   
-}
-
-void
-PIPPApplMac::MakeMenuBar()
-{
-	//new PIPPMenuBar();
-}
-
-
-
-// $CHECK$
-// Gerer AllowSubRemoval, qui envoie un evenement a l'application PI.
-// Eventuellement avoir des fenetres qui se cachent lors d'un close et d'autres
-// qui se detruisent ??
Index: unk/SophyaPI/PI/pippapplmac.h
===================================================================
--- /trunk/SophyaPI/PI/pippapplmac.h	(revision 3327)
+++ 	(revision )
@@ -1,11 +1,0 @@
-#include <LApplication.h>
-
-class PIPPApplMac : public LApplication {
-public:
-						PIPPApplMac();
-	virtual				~PIPPApplMac();
-
-	void MakeMenuBar();
-	virtual void			AdjustCursor	(const EventRecord &inMacEvent);
-};
-
Index: unk/SophyaPI/PI/pippwindowmac.cc
===================================================================
--- /trunk/SophyaPI/PI/pippwindowmac.cc	(revision 3327)
+++ 	(revision )
@@ -1,108 +1,0 @@
-#include "sopnamsp.h"
-#include "pippwindowmac.h"
-
-
-// ---------------------------------------------------------------------------
-//		¥ PIPPWindowMac
-// ---------------------------------------------------------------------------
-//	Default Constructor
-
-PIPPWindowMac::PIPPWindowMac()
-{
-  myPIWindow = NULL;
-}
-
-
-// ---------------------------------------------------------------------------
-//		¥ PIPPWindowMac(SWindowInfo&)
-// ---------------------------------------------------------------------------
-//	Construct Window from the data in a struct
-
-PIPPWindowMac::PIPPWindowMac(
-	const SWindowInfo	&inWindowInfo)
-:LWindow(inWindowInfo)
-{
-  myPIWindow = NULL;
-}
-
-
-// ---------------------------------------------------------------------------
-//		¥ PIPPWindowMac(ResIDT, Uint32, LCommander*)
-// ---------------------------------------------------------------------------
-//	Construct a Window from a WIND Resource with the specified attributes
-//	and SuperCommander
-
-PIPPWindowMac::PIPPWindowMac(
-	ResIDT		inWINDid,
-	Uint32		inAttributes,
-	LCommander	*inSuperCommander)
-:LWindow(inWINDid, inAttributes, inSuperCommander)
-{
-  myPIWindow = NULL;
-}
-
-
-// ---------------------------------------------------------------------------
-//		¥ PIPPWindowMac
-// ---------------------------------------------------------------------------
-//	Construct a Window from input parameters
-
-PIPPWindowMac::PIPPWindowMac(
-	LCommander		*inSuperCommander,
-	const Rect		&inGlobalBounds,
-	ConstStringPtr	inTitle,
-	Int16			inProcID,
-	Uint32			inAttributes,
-	WindowPtr		inBehind,
-	void			*inStorage)
-:LWindow(inSuperCommander, inGlobalBounds, inTitle,
-inProcID, inAttributes, inBehind, inStorage)
-{
-  myPIWindow = NULL;
-}
-
-
-// ---------------------------------------------------------------------------
-//		¥ PIPPWindowMac(LStream*)
-// ---------------------------------------------------------------------------
-//	Construct Window from the data in a stream
-
-PIPPWindowMac::PIPPWindowMac(
-	LStream	*inStream)
-:LWindow(inStream)
-{
-  myPIWindow = NULL;
-}
-
-
-// ---------------------------------------------------------------------------
-//		¥ ~PIPPWindowMac
-// ---------------------------------------------------------------------------
-//	Destructor
-
-PIPPWindowMac::~PIPPWindowMac()
-{
-}
-
-void
-PIPPWindowMac::AttemptClose()
-{
-  myPIWindow->Process(myPIWindow->BuildMsg(myPIWindow->Msg(),PIMsg_Close), myPIWindow, NULL) ;
-}
-
-
-const MessageT	msg_Resize			= 817;
-const MessageT	msg_Move			= 818;
-
-void PIPPWindowMac::DoSetPosition(Point inPosition)
-{
-    ExecuteAttachments(msg_Move, NULL);
-    LWindow::DoSetPosition(inPosition);
-}
-
-void PIPPWindowMac::DoSetBounds(const Rect &inBounds)
-{
-    ExecuteAttachments(msg_Resize, NULL);
-    LWindow::DoSetBounds(inBounds);
-}
-
Index: unk/SophyaPI/PI/pippwindowmac.h
===================================================================
--- /trunk/SophyaPI/PI/pippwindowmac.h	(revision 3327)
+++ 	(revision )
@@ -1,37 +1,0 @@
-#include <LWindow.h>
-#include "piwindowmac.h"
-
-class PIPPWindowMac : public LWindow {
-public:
-	enum { class_ID = 'pwin' };
-	
-						PIPPWindowMac();
-						PIPPWindowMac(
-								const SWindowInfo	&inWindowInfo);
-						PIPPWindowMac(
-								ResIDT				inWINDid,
-								Uint32				inAttributes,
-								LCommander			*inSuperCommander);
-								
-						PIPPWindowMac(
-								LCommander			*inSuperCommander,
-								const Rect			&inGlobalBounds,
-								ConstStringPtr		inTitle,
-								Int16				inProcID,
-								Uint32				inAttributes,
-								WindowPtr			inBehind,
-								void				*inStorage = nil);
-								
-						PIPPWindowMac(
-								LStream				*inStream);
-	virtual				~PIPPWindowMac();
-
-	virtual void		DoSetPosition(
-								Point				inPosition);
-	virtual void		DoSetBounds(
-								const Rect			&inBounds);
-								
-	virtual void		AttemptClose();
-								
-	PIWindow* myPIWindow;
-};
Index: unk/SophyaPI/PI/pistdwdgmac.cc
===================================================================
--- /trunk/SophyaPI/PI/pistdwdgmac.cc	(revision 3327)
+++ 	(revision )
@@ -1,345 +1,0 @@
-#include "sopnamsp.h"
-#include "pistdwdgmac.h"
-#include <LString.h>
-#include <PP_Messages.h>
-
-/************* PILabelMac ************/
-#include <LCaption.h>
-
-PILabelMac::PILabelMac(PIContainerGen *par, char *nom,
-                         int sx, int sy, int px, int py)
-: PILabelGen(par, nom, sx, sy, px, py)
-{
-  delete mPane;
-  LStr255 titre(nom);
-  mPane = new LCaption(mPaneInfo, titre, 130);
-}
-
-PILabelMac::~PILabelMac()
-{}
-
-
-/************* PIButtonMac ************/
-#include <LStdControl.h>
-
-PIButtonMac::PIButtonMac(PIContainerGen *par, char *nom, PIMessage msg,
-                         int sx, int sy, int px, int py)
-: PIButtonGen(par, nom, msg, sx, sy, px, py)
-{
-  delete mPane;
-  LStr255 titre(nom);
-  mPane = new LStdButton(mPaneInfo, msg_Click, 130, titre);
-  ((LStdButton*)mPane)->AddListener(this);
-}
-
-PIButtonMac::~PIButtonMac()
-{}
-
-void
-PIButtonMac::SetLabel(string const& str)
-{
-  LStr255 sstr(str.c_str());
-  ((LStdButton*)mPane)->SetDescriptor(sstr);
-}
-
-
-void
-PIButtonMac::ListenToMessage(MessageT inMessage, void *)
-{
-  if (inMessage == msg_Click)
-    Send(myMsg, PIMsg_Press);
-}
-
-
-/************* PITextMac ************/
-#include <LEditField.h>
-
-PITextMac::PITextMac(PIContainerGen *par, const char *nom,
-                         int sx, int sy, int px, int py)
-: PITextGen(par, nom, sx, sy, px, py)
-{
-  delete mPane;
-  LStr255 titre(nom);
-  mPane = new LEditField(mPaneInfo, titre, 130, 255, true, true, NULL, LCommander::GetTopCommander());
-}
-
-PITextMac::PITextMac(PIContainerGen *par, const char *nom,
-                     bool vsb, bool hsb,
-                     int sx, int sy, int px, int py)
-: PITextGen(par, nom, vsb, hsb, sx, sy, px, py)
-{
-  delete mPane;
-  LStr255 titre(nom);
-  mPane = new LEditField(mPaneInfo, titre, 130, 255, true, true, NULL, LCommander::GetTopCommander());
-}
-
-
-PITextMac::~PITextMac()
-{}
-
-void
-PITextMac::SetText(string const& s)
-{
-  SetLabel(s);
-}
-
-string
-PITextMac::GetText() const
-{
-  Str255 desc;
-  mPane->GetDescriptor(desc);
-  p2cstr(desc);
-  return (char*) desc;
-}
-
-/* --Methode-- */
-void PITextMac::SetMutiLineMode(bool /*mlm*/)
-{
-return;
-}
-
-/* --Methode-- */
-void PITextMac::SetTextEditable(bool te)
-{
-if (te)
-  { mPane->Enable(); }
-else
-  { mPane->Disable(); }
-return;
-}
-
-/************* PIScaleMac ************/
-static ControlActionUPP	sSBarAction = nil;
-
-
-PIScaleMac::PIScaleMac(PIContainerGen* par, char* nom, PIMessage msg,
-                       bool horiz, int sx, int sy, int px, int py)
-: PIScaleGen(par, nom, msg, horiz, sx, sy, px, py)
-{
-  delete mPane;
-  LStr255 titre(nom);
-  mPane = new LStdControl(mPaneInfo, msg_Click, 1, 1, 10,
-						  scrollBarProc, 130, titre, (Int32) this);
-  ((LStdControl*)mPane)->AddListener(this);
-  
-  if (sSBarAction == nil) {	// Allocate UPP if necessary
-	sSBarAction = NewControlActionProc((ProcPtr) SBarAction);
-  }
-  ((LStdControl*)mPane)->SetActionProc(sSBarAction);
-}
-
-PIScaleMac::~PIScaleMac()
-{}
-
-void
-PIScaleMac::ListenToMessage(MessageT inMessage, void *)
-{
-  if (inMessage == msg_ThumbDragged)
-    Send(myMsg, PIMsg_DataChanged);
-}
-
-void
-PIScaleMac::SetMinMax(int min, int max)
-{
-  ((LStdControl*)mPane)->SetMinValue(min);
-  ((LStdControl*)mPane)->SetMaxValue(max);
-}
-
-void
-PIScaleMac::GetMinMax(int &min, int &max)
-{
-  min = ((LStdControl*)mPane)->GetMinValue();
-  max = ((LStdControl*)mPane)->GetMaxValue();
-}
-
-void
-PIScaleMac::SetValue(int val)
-{
-  StopListening();
-  ((LStdControl*)mPane)->SetValue(val);
-  StartListening();
-}
-
-int
-PIScaleMac::GetValue()
-{
-  return ((LStdControl*)mPane)->GetValue();
-}
-
-pascal void
-PIScaleMac::SBarAction(
-	ControlHandle	inMacControl,
-	Int16			inPart)
-{
-	PIScaleMac		*theScroller =
-							(PIScaleMac *) GetControlReference(inMacControl);
-	theScroller->HandleScroll(inPart);
-}
-
-void
-PIScaleMac::HandleScroll(
-	const Int16		inPart)
-{
-    int delta;
-	switch (inPart) {				// Determine how much to scroll
-	
-		case kControlUpButtonPart:	// Scroll left one unit
-			delta = -1;
-			break;
-			
-		case kControlDownButtonPart:	// Scroll right one unit
-			delta = 1;
-			break;
-			
-		case kControlPageUpPart:		// Scroll left by Frame width
-										//   less one unit of overlap
-			delta = -10;
-			break;
-			
-		case kControlPageDownPart:		// Scroll right by Frame width
-										//   less one unit of overlap
-			delta = 10;
-			break;
-	}
-	
-	if (delta != 0) {
-	    SetValue(GetValue()+delta);
-	}
-}
-
-/************* PIScrollBarMac ************/
-static ControlActionUPP	sSBarAction2 = nil;
-
-
-PIScrollBarMac::PIScrollBarMac(PIContainerGen* par, char* nom, PIMessage msg,
-                       bool vert, int sx, int sy, int px, int py)
-: PIScrollBarGen(par, nom, msg, vert, sx, sy, px, py)
-{
-  delete mPane;
-  LStr255 titre(nom);
-  mPane = new LStdControl(mPaneInfo, msg_Click, 1, 1, 10,
-						  scrollBarProc, 130, titre, (Int32) this);
-  ((LStdControl*)mPane)->AddListener(this);
-  
-  if (sSBarAction2 == nil) {	// Allocate UPP if necessary
-	sSBarAction2 = NewControlActionProc((ProcPtr) SBarAction);
-  }
-  ((LStdControl*)mPane)->SetActionProc(sSBarAction2);
-}
-
-PIScrollBarMac::~PIScrollBarMac()
-{}
-
-void
-PIScrollBarMac::ListenToMessage(MessageT inMessage, void *)
-{
-  if (inMessage == msg_ThumbDragged)
-    Send(myMsg, PIMsg_DataChanged);
-}
-
-void
-PIScrollBarMac::SetMinMax(int min, int max)
-{
-  ((LStdControl*)mPane)->SetMinValue(min);
-  ((LStdControl*)mPane)->SetMaxValue(max);
-}
-
-void
-PIScrollBarMac::GetMinMax(int &min, int &max)
-{
-  min = ((LStdControl*)mPane)->GetMinValue();
-  max = ((LStdControl*)mPane)->GetMaxValue();
-}
-
-
-void
-PIScrollBarMac::SetValue(int val)
-{
-  StopListening();
-  ((LStdControl*)mPane)->SetValue(val);
-  StartListening();
-}
-
-int
-PIScrollBarMac::GetValue()
-{
-  return ((LStdControl*)mPane)->GetValue();
-}
-
-pascal void
-PIScrollBarMac::SBarAction(
-	ControlHandle	inMacControl,
-	Int16			inPart)
-{
-	PIScrollBarMac		*theScroller =
-							(PIScrollBarMac *) GetControlReference(inMacControl);
-	theScroller->HandleScroll(inPart);
-}
-
-void
-PIScrollBarMac::HandleScroll(
-	const Int16		inPart)
-{
-    int delta;
-	switch (inPart) {				// Determine how much to scroll
-	
-		case kControlUpButtonPart:	// Scroll left one unit
-			delta = -1;
-			break;
-			
-		case kControlDownButtonPart:	// Scroll right one unit
-			delta = 1;
-			break;
-			
-		case kControlPageUpPart:		// Scroll left by Frame width
-										//   less one unit of overlap
-			delta = -10;
-			break;
-			
-		case kControlPageDownPart:		// Scroll right by Frame width
-										//   less one unit of overlap
-			delta = 10;
-			break;
-	}
-	
-	if (delta != 0) {
-	    SetValue(GetValue()+delta);
-	}
-}
-
-/************* PICheckBoxMac ************/
-#include <LStdControl.h>
-
-PICheckBoxMac::PICheckBoxMac(PIContainerGen *par, char *nom, PIMessage msg,
-                         int sx, int sy, int px, int py)
-: PICheckBoxGen(par, nom, msg, sx, sy, px, py)
-{
-  delete mPane;
-  LStr255 titre(nom);
-  mPane = new LStdCheckBox(mPaneInfo, msg_Click, 0, 130, titre);
-  ((LStdCheckBox*)mPane)->AddListener(this);
-}
-
-PICheckBoxMac::~PICheckBoxMac()
-{}
-
-void
-PICheckBoxMac::ListenToMessage(MessageT inMessage, void *)
-{
-  if (inMessage == msg_Click)
-    Send(myMsg, PIMsg_DataChanged);
-}
-
-void
-PICheckBoxMac::SetState(bool st)
-{
-  StopListening();
-  ((LStdCheckBox*)mPane)->SetValue(st ? 1 : 0);
-  StartListening();
-}
- 
-bool
-PICheckBoxMac::GetState()
-{
-  return ((LStdCheckBox*)mPane)->GetValue();
-}
Index: unk/SophyaPI/PI/pistdwdgmac.h
===================================================================
--- /trunk/SophyaPI/PI/pistdwdgmac.h	(revision 3327)
+++ 	(revision )
@@ -1,109 +1,0 @@
-#ifndef PISTDWDGMAC_H_SEEN
-#define PISTDWDGMAC_H_SEEN
-
-#include "pistdwdggen.h"
-
-
-class PILabelMac : public PILabelGen
-{
-public:
-                     PILabelMac(PIContainerGen *par, char *nom,
-                                 int sx=10, int sy=10, int px=0, int py=0);
-  virtual           ~PILabelMac();
-  virtual void       SetLabel(string const&);
-};
-
-class PIButtonMac : public PIButtonGen
-{
-public:
-                     PIButtonMac(PIContainerGen *par, char *nom, PIMessage msg = PIMsg_Click,
-                                 int sx=10, int sy=10, int px=0, int py=0);
-  virtual           ~PIButtonMac();
-  virtual void       SetLabel(string const&);
-  virtual void	     ListenToMessage(MessageT inMessage, void *ioParam);
-  virtual void       ActivatePress(bool=false) {}
-};
-
-class PITextMac : public PITextGen
-{
-public:
-                     PITextMac(PIContainerGen *par, const char *nom,
-                               int sx=10, int sy=10, int px=0, int py=0);
-                     PITextMac(PIContainerGen *par, const char *nom,
-                               bool vsb, bool hsb,
-                               int sx=10, int sy=10, int px=0, int py=0);
-  virtual           ~PITextMac();
-
-  virtual void       SetMutiLineMode(bool mlm=false);
-  virtual void       SetTextEditable(bool te=true);
-
-  virtual void       SetText(string const&);
-  virtual string     GetText() const;
-};
-
-class PIScaleMac : public PIScaleGen
-{
-public:
-                     PIScaleMac(PIContainerGen* par, char* nom, 
-                                PIMessage msg=PIMsg_DataChanged, bool horiz=true,
-                                int sx=100, int sy=10, int px=0, int py=0);
-                    ~PIScaleMac();
-
-  virtual void       SetMinMax(int min, int max);
-  virtual void       GetMinMax(int& min, int& max);
-  virtual void       SetValue(int val);
-  virtual int        GetValue(); 
-  virtual void	     ListenToMessage(MessageT inMessage, void *ioParam);
-  virtual void	     HandleScroll(const Int16 inPart);
-  
-protected:
-  static pascal void SBarAction(ControlHandle inMacControl,
-								Int16 inPart);
-};
-
-class PIScrollBarMac : public PIScrollBarGen
-{
-public:
-                     PIScrollBarMac(PIContainerGen* par, char* nom, 
-                                PIMessage msg=PIMsg_DataChanged, bool vert=true,
-                                int sx=100, int sy=10, int px=0, int py=0);
-                    ~PIScrollBarMac();
-
-  virtual void       ActivateDrag(bool /*acd*/=false) {};
-  virtual void       SetMinMax(int min, int max);
-  virtual void       GetMinMax(int& min, int& max);
-  virtual void       SetValue(int val);
-  virtual int        GetValue(); 
-  virtual void	     ListenToMessage(MessageT inMessage, void *ioParam);
-  virtual void	     HandleScroll(const Int16 inPart);
-  virtual void       SetSlSize(int sz) {msz = sz;}
-  virtual int        GetSlSize() {return msz;}
-protected:
-  static pascal void SBarAction(ControlHandle inMacControl,
-								Int16 inPart);
-  int msz;
-};
-
-
-class PICheckBoxMac : public PICheckBoxGen
-{
-public:
-                     PICheckBoxMac(PIContainerGen* par, char* nom, 
-                                   PIMessage msg = PIMsg_Click,
-                                   int sx=10, int sy=10, int px=0, int py=0);
-  virtual           ~PICheckBoxMac();
-  virtual void	     ListenToMessage(MessageT inMessage, void *ioParam);
-  virtual void       SetState(bool st=false);
-  virtual bool       GetState();
-};
-
-
- 
-typedef PILabelMac   PILabel;
-typedef PIButtonMac  PIButton;
-typedef PITextMac    PIText;
-typedef PIScaleMac   PIScale;
-typedef PIScrollBarMac PIScrollBar;
-typedef PICheckBoxMac PICheckBox;
-
-#endif
Index: unk/SophyaPI/PI/piwdgmac.cc
===================================================================
--- /trunk/SophyaPI/PI/piwdgmac.cc	(revision 3327)
+++ 	(revision )
@@ -1,333 +1,0 @@
-#include "sopnamsp.h"
-#include "piwdgmac.h"
-#include "pisysdep.h"
-
-#include PICONT_H
-
-#include <LView.h>
-#include <LString.h>
-
-void PIBeep()
-{
-  ::SysBeep(1);
-}
-
-
-PIWdgMac::PIWdgMac(PIContainerGen *par, char *nom,
-                   int sx, int sy, int px, int py)
-:PIWdgGen(par, nom, sx, sy, px, py), mNom(nom)
-{
-  mAdapterPaneInfo.paneID    = 0;
-  mAdapterPaneInfo.width     = sx;
-  mAdapterPaneInfo.height    = sy;
-  mAdapterPaneInfo.visible   = true;
-  mAdapterPaneInfo.enabled   = true;
-  mAdapterPaneInfo.bindings.left =
-    mAdapterPaneInfo.bindings.top =
-    mAdapterPaneInfo.bindings.right =
-    mAdapterPaneInfo.bindings.bottom = false;
-  mAdapterPaneInfo.left      = px;
-  mAdapterPaneInfo.top       = py;
-  mAdapterPaneInfo.userCon   = 0;
-  mAdapterPaneInfo.superView = par ? (LView*) (((PIContainerMac*)(par))->mPane) : NULL;
-
-  mAdapterViewInfo.imageSize.width = sx;
-  mAdapterViewInfo.imageSize.height = sy;
-  mAdapterViewInfo.scrollPos.h = 
-    mAdapterViewInfo.scrollPos.v = 
-    mAdapterViewInfo.scrollUnit.h = 
-    mAdapterViewInfo.scrollUnit.v = 0;
-  mAdapterViewInfo.reconcileOverhang = 0;
-
-  mAdapter = new PIPPViewAdapter(mAdapterPaneInfo, mAdapterViewInfo);
-
-  mPaneInfo.paneID    = 'PIWD';
-  mPaneInfo.width     = sx;
-  mPaneInfo.height    = sy;
-  mPaneInfo.visible   = true;
-  mPaneInfo.enabled   = true;
-  mPaneInfo.bindings.left =
-    mPaneInfo.bindings.top =
-    mPaneInfo.bindings.right =
-    mPaneInfo.bindings.bottom = true;
-  mPaneInfo.left      = 0;
-  mPaneInfo.top       = 0;
-  mPaneInfo.userCon   = 'PIWD';
-  mPaneInfo.superView = mAdapter;
-
-  mViewInfo.imageSize.width = sx;
-  mViewInfo.imageSize.height = sy;
-  mViewInfo.scrollPos.h = 
-    mViewInfo.scrollPos.v = 
-    mViewInfo.scrollUnit.h = 
-    mViewInfo.scrollUnit.v = 0;
-  mViewInfo.reconcileOverhang = 0;
-  
-  mPane = new LView(mPaneInfo, mViewInfo);
-  ((LView*)mAdapter)->CalcPortOrigin();
-  ((LView*)mPane)->CalcPortOrigin();
-}
-
-
-PIWdgMac::~PIWdgMac()
-{
-  delete mPane;
-  delete mAdapter;
-}
-
-void
-PIWdgMac::FinishCreate()
-{
-  mPane->FinishCreate();
-}
-
-void
-PIWdgMac::ListenToMessage(MessageT /*inMessage*/, void */*ioParam*/)
-{
-
-}
-
-void
-PIWdgMac::SetLabel(string const& lab)
-{
-  LStr255 titre(lab.c_str());
-  mPane->SetDescriptor(titre);
-}
-
-void
-PIWdgMac::SetSize(int sx, int sy)
-{
-  if (mAdapter)
-   mAdapter->ResizeFrameTo(sx, sy, true);
-  else
-   mPane->ResizeFrameTo(sx, sy, true);
-}
-
-void
-PIWdgMac::SetPos(int px, int py)
-{
-  if (mAdapter)
-   mAdapter->MoveBy(px-XPos(), py-YPos(), false);
-  else
-   mPane->MoveBy(px-XPos(), py-YPos(), false);
-}
-
-void
-PIWdgMac::SetBinding(PIBindingKind left, PIBindingKind top, 
-                     PIBindingKind right, PIBindingKind bottom)
-{
-  if (mAdapter)  
-    mAdapter->SetBinding(left, top, right, bottom);
-  //else
-  //  mPane->SetBinding(left, top, right, bottom);
-}
-
-bool
-PIWdgMac::GetBinding(PIBindingKind& left, PIBindingKind& top, 
-                     PIBindingKind& right, PIBindingKind& bottom)
-{
-  if (mAdapter)  
-    mAdapter->GetBinding(left, top, right, bottom);
-  //else
-  //  mPane->SetBinding(left, top, right, bottom);
-  return false;
-}
-
-void PIWdgMac::Refresh()
-{
-  if (mPane) mPane->Refresh();
-  if (mAdapter) mAdapter->Refresh();
-}
-
-
-int
-PIWdgMac::XSize()
-{ 
-  SDimension16 outSize;
-  mPane->GetFrameSize(outSize);
-  return outSize.width;
-}
-
-int
-PIWdgMac::YSize()
-{ 
-  SDimension16 outSize;
-  mPane->GetFrameSize(outSize);
-  return outSize.height;
-}
-
-int
-PIWdgMac::XPos()
-{
-  SPoint32 p;
-  mPane->GetFrameLocation(p);
-  return p.h;
-}
-
-int
-PIWdgMac::YPos()
-{
-  SPoint32 p;
-  mPane->GetFrameLocation(p);
-  return p.v;
-}
-
-
-bool 
-PIWdgMac::IsVisible()    // $CHECK$  REZA a verifier  01/12/97
-{
-if (mPane->IsVisible())  return(true);
-else return(false);
-}
-
-
-// Gestion de Copier/Coller
-#include <LClipboard.h>
-/* --Methode-- */
-// COPY
-bool PIWdgMac::ClaimSelection(unsigned int)
-{
-  unsigned int l;
-  char* txt = SelectionString(l);
-  LClipboard::GetClipboard()->SetData('TEXT',txt,l,true);
-  delete[] txt;
-  return (true);
-}
-
-/* --Methode-- */
-void PIWdgMac::SelectionLost()
-{
-}
-
-/* --Methode-- */
-// PASTE
-unsigned int PIWdgMac::RequestSelection(unsigned int)
-{
-  Handle h = NewHandle(0);
-  Int32 l = LClipboard::GetClipboard()->GetData('TEXT', h);
-  if (l) {
-    CopyFromSelection(*h, l);
-  }
-  return 1;
-}
-
-/* --Methode-- */
-void PIWdgMac::CopyFromSelection(char * sv, int l)
-{
-char* buff = new char[l+2];
-strncpy(buff, sv, l);
-buff[l] = '\0';
-printf("PIWdgMac::RequestSelection() L=%d [%s] \n", l, buff);
-delete buff;
-return;
-}
-
-/* --Methode-- */
-void PIWdgMac::PasteSelection(unsigned int, void *buff, unsigned int l)
-{
-  CopyFromSelection((char*) buff, l);
-}
-
-/* --Methode-- */
-char* PIWdgMac::SelectionString(unsigned int& len)
-{
-char *rs = new char[60];
-strcpy(rs, "Test-of-PIWdgMac::SelectionString()");
-len = strlen(rs);
-return(rs);
-}
-
-
-/* --Methode-- */
-void* PIWdgMac::ProvideSelection(unsigned int&, unsigned int& len)
-{
-  return SelectionString(len);
-}
-
-/* --Methode-- */
-void PIWdgMac::SelectionTransferEnd()
-{
-}
-
-/* --Methode-- */
-void PIWdgMac::Manage()
-{
-  if (mAdapter) mAdapter->Show();
-  mPane->Show();
-}
-
-/* --Methode-- */
-void PIWdgMac::UnManage()
-{
-  mPane->Hide();
-  if (mAdapter) mAdapter->Hide();
-}
-
-/* --Methode-- */
-bool PIWdgMac::IfManaged()
-{
-  return(mPane->IsVisible());
-}
-
-
-// -------- La classe PIScreenBuffer ----------
-/* --Methode-- */
-PIScreenBuffer::PIScreenBuffer(int sx, int sy)
-{
-  if (sx < 1) sx = 1;
-  if (sy < 1) sy = 1;
-  Rect bounds = {0,0,sy,sx};
-  mGWorld = new LGWorld(bounds);
-}
-/* --Methode-- */
-PIScreenBuffer::~PIScreenBuffer()
-{
-  delete mGWorld; 
-}
-
-/* --Methode-- */
-int PIScreenBuffer::XSize()
-{
-  Rect bounds;
-  mGWorld->GetBounds(bounds);
-  return bounds.right - bounds.left;
-}
-
-/* --Methode-- */
-int PIScreenBuffer::YSize()
-{
-  Rect bounds;
-  mGWorld->GetBounds(bounds);
-  return bounds.bottom - bounds.top;
-}
-
-/* --Methode-- */
-void PIScreenBuffer::CopyFromWdg(PIWdg* wdg, int ox, int oy, int dx, int dy, int x, int y)
-{
-  mGWorld->BeginDrawing();
-  LPane* pane = wdg->GetPane();
-  Rect srcRect = {oy, ox, oy+dy, ox+dx};
-  Rect destRect = {y, x, y+dy, x+dx};
-  CopyBits(&pane->GetMacPort()->portBits,&GrafPtr(mGWorld->GetMacGWorld())->portBits,&srcRect,&destRect,srcCopy,NULL);
-  mGWorld->EndDrawing();
-}
-
-/* --Methode-- */
-void PIScreenBuffer::CopyToWdg(PIWdg* wdg, int ox, int oy, int dx, int dy, int x, int y)
-{
-  LPane* pane = wdg->GetPane();
-  Rect srcRect = {oy, ox, oy+dy, ox+dx};
-  Rect destRect = {y, x, y+dy, x+dx};
-  CopyBits(&GrafPtr(mGWorld->GetMacGWorld())->portBits,&pane->GetMacPort()->portBits,&srcRect,&destRect,srcCopy,NULL);
-}
-
-/* --Methode-- */
-void PIScreenBuffer::CopyFrom(PIScreenBuffer* grb, int ox, int oy, int dx, int dy, int x, int y)
-{
-
-  mGWorld->BeginDrawing();
-  Rect srcRect = {oy, ox, oy+dy, ox+dx};
-  Rect destRect = {y, x, y+dy, x+dx};
-  CopyBits(&GrafPtr(grb->mGWorld->GetMacGWorld())->portBits,&GrafPtr(mGWorld->GetMacGWorld())->portBits,&srcRect,&destRect,srcCopy,NULL);
-  mGWorld->EndDrawing();
-}
Index: unk/SophyaPI/PI/piwdgmac.h
===================================================================
--- /trunk/SophyaPI/PI/piwdgmac.h	(revision 3327)
+++ 	(revision )
@@ -1,106 +1,0 @@
-#ifndef PIWDG_MAC_SEEN
-#define PIWDG_MAC_SEEN
-
-#include "piwdggen.h"
-#include "pippviewadapter.h"
-#include <LPane.h>
-#include <LListener.h>
-
-class PIWdgMac : public PIWdgGen, public LListener {
-public:
-  
-                         PIWdgMac(PIContainerGen *par, char *nom,
-                                   int sx=10, int sy=10, int px=0, int py=0);
-  virtual                ~PIWdgMac();
-  virtual void			 FinishCreate(); // apres avoir installe les sous-vues
-                                       
-  virtual void	         ListenToMessage(MessageT inMessage, void *ioParam);
-  virtual void           SetLabel(string const&);
-
-  virtual void           SetSize(int sx, int sy);
-  virtual void           SetPos(int px, int py);
-  virtual void           SetBorderWidth(int /*bw*/) {}
-  
-  virtual void           SetBinding(PIBindingKind left, PIBindingKind top, 
-                                    PIBindingKind right, PIBindingKind bottom);
-  virtual bool           GetBinding(PIBindingKind& left, PIBindingKind& top, 
-                                    PIBindingKind& right, PIBindingKind& bottom);
-  virtual int            XSize();
-  virtual int            YSize();
-  virtual int            XPos();
-  virtual int            YPos();
-  virtual string         Nom()  { return mNom; }
-
-// Pour activer, desactiver un composant graphique (PIWdg)
-  virtual void           Manage();
-  virtual void           UnManage();
-  virtual bool           IfManaged();
-  virtual bool           IsVisible();
-  
-//  Fonction qui doit etre appelee pour rafraichir la fenetre 
-  virtual void       	 Refresh();
-  
-//  Pour rendre un composant graphique (PIWdg) sensible/insensible 
-//  aux actions utilisateur (souris, clavier, ...)
-  virtual void           SetSensitive();
-  virtual void           SetUnSensitive();
-  virtual bool           IfSensitive();
-
-//  Gestion de copier-coller
-  virtual bool           ClaimSelection(unsigned int typ=PICP_string);
-  virtual void           SelectionLost();
-  virtual unsigned int   RequestSelection(unsigned int typ=PICP_string);
-  virtual void*          ProvideSelection(unsigned int& typ, unsigned int& len);
-  virtual void           PasteSelection(unsigned int typ, void *, unsigned int l);
-  virtual void           CopyFromSelection(char *, int l);
-  virtual char*          SelectionString(unsigned int& len);
-  virtual void           SelectionTransferEnd();
-
-//  Copie depuis un PIWdgGen
-  virtual void		 CopyFrom(PIWdgGen* wdg, int ox, int oy, int dx, int dy, int x, int y);
-
-//  Gestion des EventHandler
-  virtual void		 AddDrawHandler(PIEventHandler* drwh, bool ad=false);
-  virtual void		 RemoveDrawHandler(PIEventHandler* drwh);
-  virtual void		 AddEventHandler(PIEventHandler* evh, unsigned long evtmask, bool ad=false);
-  virtual void		 RemoveEventHandler(PIEventHandler* evh);
-
-
-  LPane*                 GetPane() {return mPane;}
-  
-protected:
-  LPane*				 mPane;
-  PIPPViewAdapter*       mAdapter;
-  SPaneInfo				 mAdapterPaneInfo;
-  SViewInfo				 mAdapterViewInfo;
-  SPaneInfo				 mPaneInfo;
-  SViewInfo				 mViewInfo;
-  string                 mNom;
-  
-  friend class PIGraphicMac;
-};
-
-typedef PIWdgMac PIWdg;
-
-// -------- La classe PIScreenBuffer ----------
-
-#include <UGWorld.h>
-
-class PIScreenBuffer {
-public :
-                 PIScreenBuffer(int sx, int sy);
-  virtual       ~PIScreenBuffer();
-
-  virtual int       XSize();
-  virtual int       YSize();
-  virtual void      CopyFromWdg(PIWdg* wdg, int ox, int oy, int dx, int dy, int x, int y);
-  virtual void      CopyToWdg(PIWdg* wdg, int ox, int oy, int dx, int dy, int x, int y);
-  virtual void      CopyFrom(PIScreenBuffer* grb, int ox, int oy, int dx, int dy, int x, int y);
-
-protected :
-  LGWorld* mGWorld;
-};
-
-
-
-#endif
Index: unk/SophyaPI/PI/piwindowmac.cc
===================================================================
--- /trunk/SophyaPI/PI/piwindowmac.cc	(revision 3327)
+++ 	(revision )
@@ -1,92 +1,0 @@
-#include "sopnamsp.h"
-#include "piwindowmac.h"
-#include "pippwindowmac.h"
-
-PIWindowMac::PIWindowMac(PIMsgHandler *par, char *nom, PIWindowKind k, int sx, int sy, int px, int py)
-: PIWindowGen(par, nom, k, sx, sy, px, py), finalized(false)
-{
-	delete mPane;
-	delete mAdapter;
-	mAdapter = NULL;
-	mWindowInfo.WINDid = 1000+k;
-	mWindowInfo.attributes = windAttr_EraseOnUpdate |
-	                         windAttr_Targetable |
-	                         windAttr_Enabled;
-	switch (k) {
-	 case PIWK_normal:
-	  mWindowInfo.attributes |= windAttr_Regular | 
-	                            windAttr_TitleBar |
-	                            windAttr_SizeBox |
-	                            windAttr_CloseBox |
-	                            windAttr_Resizable;
-	  mWindowInfo.layer = windLayer_Regular;
-	  break;
-	 case PIWK_dialog:
-	  mWindowInfo.attributes |= windAttr_Modal;
-	  mWindowInfo.layer = windLayer_Modal;
-	  break;
-	 case PIWK_floating:
-	  mWindowInfo.attributes |= windAttr_Floating |
-	                            windAttr_HideOnSuspend;
-	  mWindowInfo.layer = windLayer_Floating;
-	  break;
-	}
-	mWindowInfo.minimumWidth = 30;
-	mWindowInfo.minimumHeight = 30;
-	mWindowInfo.maximumWidth = 32000;
-	mWindowInfo.maximumHeight = 32000;
-	mWindowInfo.standardSize.width = sx;
-	mWindowInfo.standardSize.height = sy;
-	mWindowInfo.userCon = 0;
-	
-	//mPane = new LWindow(mWindowInfo);
-	mPane = LWindow::CreateWindow(1000+k,LCommander::GetTopCommander());
-    ((PIPPWindowMac*)mPane)->myPIWindow = this; 
-	Rect r = {py, px, py+sy, px+sx};
-    ((LWindow*) mPane)->DoSetBounds(r);
-    SetLabel(nom);
-    //((LWindow*) mPane)->SetSuperCommander(LCommander::GetTopCommander());
-}
-
-
-PIWindowMac::~PIWindowMac()
-{}
-
-
-void PIWindowMac::Show()
-{
-  if (!finalized) {
-    FinishCreate();
-    finalized = true;
-  }
-  PIWindowGen::Show();
-}
-
-void
-PIWindowMac::SetSize(int sx, int sy)
-{
-   ((LWindow*) mPane)->ResizeWindowTo(sx, sy);
-}
-
-void
-PIWindowMac::SetPos(int px, int py)
-{
-   ((LWindow*) mPane)->MoveWindowBy(px-XPos(), py-YPos());
-}
-
-int
-PIWindowMac::XPos()
-{
-	Rect	theBounds;
-	((LWindow*) mPane)->GetGlobalBounds(theBounds);
-    return theBounds.left;
-}
-
-int
-PIWindowMac::YPos()
-{
-	Rect	theBounds;
-	((LWindow*) mPane)->GetGlobalBounds(theBounds);
-    return theBounds.top;
-}
-
Index: unk/SophyaPI/PI/piwindowmac.h
===================================================================
--- /trunk/SophyaPI/PI/piwindowmac.h	(revision 3327)
+++ 	(revision )
@@ -1,26 +1,0 @@
-#ifndef PIWINDOWMAC_H_SEEN
-#define PIWINDOWMAC_H_SEEN
-
-#include "piwindowgen.h"
-#include "pisysdep.h"
-#include <LWindow.h>
-
-class PIWindowMac : public PIWindowGen {
-public:
-                         PIWindowMac(PIMsgHandler *par, char *nom, PIWindowKind k=PIWK_normal,
-                                   int sx=10, int sy=10, int px=0, int py=0);
-  virtual                ~PIWindowMac();
-  virtual void           Show();
-  virtual void           SetSize(int sx, int sy);
-  virtual void           SetPos(int px, int py);
-  virtual int            XPos();
-  virtual int            YPos();
-
-protected:
-  SWindowInfo			  mWindowInfo;
-  Boolean				  finalized;
-};
-
-typedef PIWindowMac PIWindow;
-
-#endif
