Index: /trunk/SophyaPI/PI/piapplmac.cc
===================================================================
--- /trunk/SophyaPI/PI/piapplmac.cc	(revision 33)
+++ /trunk/SophyaPI/PI/piapplmac.cc	(revision 34)
@@ -55,9 +55,9 @@
 	macAppli = new PIPPApplMac;
 	macAppli->AddAttachment(new PISIOUXAttachment);
-	new PIPPMenuBar();
 	
     menubar = new PIMenubar(this, "DefMenubar");
     topcont = new PIWindowMac(this, "TopLevel", PIWindowKind(2), sx, sy, 10, 45);
 }
+
 
 PIApplicationMac::~PIApplicationMac()
Index: /trunk/SophyaPI/PI/picmapmac.cc
===================================================================
--- /trunk/SophyaPI/PI/picmapmac.cc	(revision 33)
+++ /trunk/SophyaPI/PI/picmapmac.cc	(revision 34)
@@ -49,4 +49,21 @@
 }
 
+/* --Methode-- */
+PIColor PIColorMapMac::GetColor(int n)
+{
+PIColor picr;
+picr.red = picr.green = picr.blue = 0;
+
+if ((n<0) || (n >= NCol()))   
+  return(picr);
+
+ColorSpec& sp = (**mCTab).ctTable[n+2];
+picr.red   = sp.rgb.red;
+picr.green = sp.rgb.green;
+picr.blue  = sp.rgb.blue;
+
+return(picr);
+}
+
 void PIColorMapMac::AllocColor(PIColor const& col, int index)
 {
Index: /trunk/SophyaPI/PI/picmapmac.h
===================================================================
--- /trunk/SophyaPI/PI/picmapmac.h	(revision 33)
+++ /trunk/SophyaPI/PI/picmapmac.h	(revision 34)
@@ -12,4 +12,5 @@
   PIColorMapMac(CMapId);
   PIColorMapMac(string const& nom, int nCol); 
+  virtual PIColor GetColor(int n);
   virtual void AllocColor(PIColor const& col, int index);
   virtual void FreeColors();
Index: /trunk/SophyaPI/PI/piimage.cc
===================================================================
--- /trunk/SophyaPI/PI/piimage.cc	(revision 33)
+++ /trunk/SophyaPI/PI/piimage.cc	(revision 34)
@@ -306,5 +306,5 @@
 void PIImage::Draw(int x0, int y0, int dx, int dy)
 {
-PIPixmap::Draw(x0, y0, dx, dy);
+PIPixmapGen::Draw(x0, y0, dx, dy);
 winovis = false;    // $CHECK$ Reza A enlever si possible 17/6/96
 if (curshow)
@@ -637,5 +637,5 @@
 
 if ((xcurs>=0) && (ycurs>=0))
-  PIPixmap::Draw(xcurs-CURSHSIZE, ycurs-CURSHSIZE, CURSHSIZE*2, CURSHSIZE*2); 
+  PIPixmapGen::Draw(xcurs-CURSHSIZE, ycurs-CURSHSIZE, CURSHSIZE*2, CURSHSIZE*2); 
 
 if ((xc >= 0) && (yc >= 0)) 
Index: /trunk/SophyaPI/PI/pimenubarmac.cc
===================================================================
--- /trunk/SophyaPI/PI/pimenubarmac.cc	(revision 33)
+++ /trunk/SophyaPI/PI/pimenubarmac.cc	(revision 34)
@@ -12,4 +12,4 @@
 PIMenubarMac::AppendMenu(PIPDMenu *pdm)
 {
-  LMenuBar::GetCurrentMenuBar()->InstallMenu(pdm->macMenu, 0);
+  LMenuBar::GetCurrentMenuBar()->InstallMenu(pdm->macMenu, InstallMenu_AtEnd);
 }
Index: /trunk/SophyaPI/PI/pippapplmac.cc
===================================================================
--- /trunk/SophyaPI/PI/pippapplmac.cc	(revision 33)
+++ /trunk/SophyaPI/PI/pippapplmac.cc	(revision 34)
@@ -1,4 +1,5 @@
 #include "pippapplmac.h"
 #include "piupdattachment.h"
+#include "pippmenubar.h"
 
 PIPPApplMac::PIPPApplMac()
@@ -22,4 +23,11 @@
 }
 
+void
+PIPPApplMac::MakeMenuBar()
+{
+	new PIPPMenuBar();
+}
+
+
 
 // $CHECK$
Index: /trunk/SophyaPI/PI/pippapplmac.h
===================================================================
--- /trunk/SophyaPI/PI/pippapplmac.h	(revision 33)
+++ /trunk/SophyaPI/PI/pippapplmac.h	(revision 34)
@@ -6,4 +6,5 @@
 	virtual				~PIPPApplMac();
 
+	void MakeMenuBar();
 	virtual void			AdjustCursor	(const EventRecord &inMacEvent);
 };
Index: /trunk/SophyaPI/PI/pistdwdgmac.cc
===================================================================
--- /trunk/SophyaPI/PI/pistdwdgmac.cc	(revision 33)
+++ /trunk/SophyaPI/PI/pistdwdgmac.cc	(revision 34)
@@ -73,4 +73,20 @@
 }
 
+/* --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;
@@ -78,10 +94,10 @@
 
 PIScaleMac::PIScaleMac(PIContainerGen* par, char* nom, PIMessage msg,
-                       int min, int max, int sx, int sy, int px, int py)
-: PIScaleGen(par, nom, msg, min, max, sx, sy, px, py)
-{
-  delete mPane;
-  LStr255 titre(nom);
-  mPane = new LStdControl(mPaneInfo, msg_Click, min, min, max,
+                       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, 0, titre, (Int32) this);
   ((LStdControl*)mPane)->AddListener(this);
Index: /trunk/SophyaPI/PI/pistdwdgmac.h
===================================================================
--- /trunk/SophyaPI/PI/pistdwdgmac.h	(revision 33)
+++ /trunk/SophyaPI/PI/pistdwdgmac.h	(revision 34)
@@ -21,4 +21,5 @@
   virtual           ~PIButtonMac();
   virtual void	     ListenToMessage(MessageT inMessage, void *ioParam);
+  virtual void       ActivatePress(bool=false) {}
 };
 
@@ -29,4 +30,8 @@
                                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;
@@ -36,6 +41,7 @@
 {
 public:
-                     PIScaleMac(PIContainerGen* par, char* nom, PIMessage msg=PIMsg_Click,
-                                int min=0, int max=10, int sx=100, int sy=10, int px=0, int py=0);
+                     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();
 
Index: /trunk/SophyaPI/PI/psdict.cc
===================================================================
--- /trunk/SophyaPI/PI/psdict.cc	(revision 33)
+++ /trunk/SophyaPI/PI/psdict.cc	(revision 34)
@@ -41,7 +41,7 @@
 /F%-2d  {/Times-Bold    findfont} bind def       %% PI_BoldFont\n\
 /F%-2d  {/Times-Italic  findfont} bind def       %% PI_ItalicFont\n\
-/F%-2d  {}
+/F%-2d  {}\
                         bind def       %% PI_NotDefFontAtt\n\
-/FS {scalefont setfont} bind def
+/FS {scalefont setfont} bind def\n\
 %%/FS%-2d {8  scalefont setfont} bind def          %% PI_SmallSizeFont\n\
 %%/FS%-2d {12 scalefont setfont} bind def          %% PI_NormalSizeFont\n\
@@ -72,16 +72,16 @@
 $BlocEnteredState restore} bind def\n\
 \
-%% Trace
+%% Trace\
 /n  {newpath} bind def    /c  {closepath} bind def\n\
 /gs {gsave}  bind def     /gr {grestore} bind def\n\
 /m  {moveto} bind def     /l  {lineto} bind def\n\
 /s  {stroke} bind def     /f  {fill}   bind def\n\
-/sc {scale}  bind def     /S  {gs 1 -1 sc show gr} bind def 
+/sc {scale}  bind def     /S  {gs 1 -1 sc show gr} bind def \n\
 /slw {setlinewidth} bind def\n\
 /ff {findfont} bind def   /sf {setfont} bind def /scf {scalefont} bind def\n\
 /rl {rlineto} bind def    /tr {translate} bind def\n\
-%% Tx Ty X0 Y0 box
+%% Tx Ty X0 Y0 box\n\
 /box {tr 0 3 1 roll neg exch 0 0 3 index neg 0 0 m rl rl rl c} bind def\n\
-%% R X0 Y0 circle
+%% R X0 Y0 circle\n\
 /circle {tr dup 0 m 0 0 3 -1 roll 0 380 arc} bind def\n\
 %% DrawEllipse pompee sur transfig\n\
@@ -116,5 +116,5 @@
       array cvx dup 3 -1 roll 0 exch putinterval dup 4 2 roll\n\
       putinterval } bind def\n\
-    /colorimage {
+    /colorimage {\n\
       pop pop     %% remove 'false 3' operands\n\
       {colortogray} mergeprocs image} bind def\n\
Index: /trunk/SophyaPI/PI/psfile.cc
===================================================================
--- /trunk/SophyaPI/PI/psfile.cc	(revision 33)
+++ /trunk/SophyaPI/PI/psfile.cc	(revision 34)
@@ -25,6 +25,6 @@
  *
  */
-PSFile::PSFile (char *FileName = NULL, float Tx = 0, float Ty = 0,
-		float Dx = 0, float Dy = 0) {
+PSFile::PSFile (char *FileName = NULL, float Tx, float Ty,
+		float Dx, float Dy) {
 
   //    extern int FileEmpty;
@@ -406,7 +406,7 @@
 
 void  PSFile::DrawString  (float x,  float y, char *s, 
-		   PIColors DrawColor  = PI_NotDefColor, 
-		   PIFontAtt FontAtt   = PI_NotDefFontAtt, 
-		   int FontSize        = 8) {
+		   PIColors DrawColor, 
+		   PIFontAtt FontAtt, 
+		   int FontSize) {
     extern int BlocEmpty;
     extern int PageEmpty;
@@ -424,5 +424,5 @@
 	change = 1;}
     if ( (FontSize != PI_NotDefFontSize) || (FontSize != mFontSize) ) {
-	mFontSize = FontSize;
+	mFontSize = (PIFontSize) FontSize;  // $CHECK$ EA ajoute le cast un peu au pif
 	change = 1;}
     if (change)
@@ -437,6 +437,6 @@
 
 void  PSFile::DrawLine    (float x1, float y1, float x2, float y2, 
-		   PIColors DrawColor  = PI_NotDefColor,
-		   PILineAtt LineAtt   = PI_NotDefLineAtt) {
+		   PIColors DrawColor,
+		   PILineAtt LineAtt) {
     extern int BlocEmpty;
     extern int PageEmpty;
@@ -464,6 +464,6 @@
 
 void  PSFile::DrawBox     (float x0, float y0, float Tx, float Ty, 
-		   PIColors  DrawColor = PI_NotDefColor,
-		   PILineAtt LineAtt   = PI_NotDefLineAtt) {
+		   PIColors  DrawColor,
+		   PILineAtt LineAtt) {
     extern int BlocEmpty;
     extern int PageEmpty;
@@ -491,7 +491,7 @@
 
 void  PSFile::DrawFBox    (float x0, float y0, float Tx, float Ty, 
-		   PIColors DrawColor  = PI_NotDefColor,
-		   PIColors FillColor  = PI_NotDefColor, 
-		   PILineAtt LineAtt   = PI_NotDefLineAtt) {
+		   PIColors DrawColor,
+		   PIColors FillColor, 
+		   PILineAtt LineAtt) {
     extern int BlocEmpty;
     extern int PageEmpty;
@@ -524,6 +524,6 @@
 
 void  PSFile::DrawCircle  (float x0, float y0, float r, 
-		   PIColors DrawColor  = PI_NotDefColor,
-		   PILineAtt LineAtt   = PI_NotDefLineAtt) {
+		   PIColors DrawColor,
+		   PILineAtt LineAtt) {
     extern int BlocEmpty;
     extern int PageEmpty;
@@ -550,7 +550,7 @@
 
 void  PSFile::DrawFCircle (float x0, float y0, float r,
-		   PIColors DrawColor  = PI_NotDefColor,
-		   PIColors FillColor  = PI_NotDefColor, 
-		   PILineAtt LineAtt   = PI_NotDefLineAtt) {
+		   PIColors DrawColor,
+		   PIColors FillColor, 
+		   PILineAtt LineAtt) {
     extern int BlocEmpty;
     extern int PageEmpty;
@@ -581,6 +581,6 @@
 
 void  PSFile::DrawPolygon (float *x, float *y, int n,
-		   PIColors DrawColor  = PI_NotDefColor, 
-		   PILineAtt LineAtt   = PI_NotDefLineAtt) {
+		   PIColors DrawColor, 
+		   PILineAtt LineAtt) {
     extern int BlocEmpty;
     extern int PageEmpty;
@@ -608,7 +608,7 @@
 
 void  PSFile::DrawFPolygon(float *x, float *y, int n,
-		   PIColors DrawColor  = PI_NotDefColor,
-		   PIColors FillColor  = PI_NotDefColor,
-		   PILineAtt LineAtt   = PI_NotDefLineAtt) {
+		   PIColors DrawColor,
+		   PIColors FillColor,
+		   PILineAtt LineAtt) {
 
     extern int BlocEmpty;
@@ -642,6 +642,6 @@
 
 void  PSFile::DrawMarker  (float x0, float y0,
-		   PIMarker MrkType    = PI_NotDefMarker,   
-		   PIColors DrawColor  = PI_NotDefColor) {
+		   PIMarker MrkType,   
+		   PIColors DrawColor) {
     extern int BlocEmpty;
     extern int PageEmpty;
@@ -667,6 +667,6 @@
 
 void  PSFile::DrawMarkers (float *x0, float *y0, int n,
-		   PIMarker MrkType    = PI_NotDefMarker,
-		   PIColors DrawColor  = PI_NotDefColor) {
+		   PIMarker MrkType,
+		   PIColors DrawColor) {
     extern int BlocEmpty;
     extern int PageEmpty;
Index: /trunk/SophyaPI/PI/psfile.h
===================================================================
--- /trunk/SophyaPI/PI/psfile.h	(revision 33)
+++ /trunk/SophyaPI/PI/psfile.h	(revision 34)
@@ -17,4 +17,8 @@
 #include <stdio.h>
 #include <stdlib.h>
+#include "defs.h"
+#ifdef __mac__
+#include <stat.h>
+#endif
 #include "pisysdep.h"
 
@@ -55,5 +59,5 @@
     int  Tx;     /* En 1/72e de pouce  !!  */
     int  Ty;     /* unite naturelle de ps  */
-} Media;
+} PIMedia;
 
 
