Changeset 9 in Sophya


Ignore:
Timestamp:
Mar 6, 1996, 11:52:37 PM (30 years ago)
Author:
eros
Message:

Version debuggee avec SharedLibraries, et gestion correcte de fontes ds
pibwdgx.cc, Version MAc ramene de Saclay (6/3/96) - link dynamique ds
pidemo.cc (Reza)

Location:
trunk/SophyaPI/PI
Files:
2 added
34 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaPI/PI/Makefile

    r8 r9  
    7777#------------------------------------------------- End of Makefile.h -------
    7878 
    79 all: $(LIB)libPI.a $(SLB)libPI.so
    80 $(LIB)libPI.a : $(OBJ)ex_dessin.o $(OBJ)piapplgen.o $(OBJ)piapplx.o $(OBJ)pibwdggen.o $(OBJ)pibwdgx.o $(OBJ)picmap.o $(OBJ)picmapgen.o $(OBJ)picmapx.o $(OBJ)picontainergen.o $(OBJ)picontainerx.o $(OBJ)pidrawwin.o $(OBJ)pifilechogen.o $(OBJ)pifilechox.o $(OBJ)pihisto.o $(OBJ)piimage.o $(OBJ)pimenubargen.o $(OBJ)pimenubarx.o $(OBJ)pimenugen.o $(OBJ)pimenux.o $(OBJ)pimsghandler.o $(OBJ)pioptmenugen.o $(OBJ)pioptmenux.o $(OBJ)pipixmapgen.o $(OBJ)pipixmapx.o $(OBJ)piscdrawwdg.o $(OBJ)pistdwdggen.o $(OBJ)pistdwdgx.o $(OBJ)piwdggen.o $(OBJ)piwdgx.o $(OBJ)piwdgxt.o $(OBJ)piwindowgen.o $(OBJ)piwindowx.o $(OBJ)pixtbase.o $(OBJ)sc_sample.o
     79all: $(LIB)libPI.a
     80$(LIB)libPI.a : $(OBJ)ex_dessin.o $(OBJ)piapplgen.o $(OBJ)piapplx.o $(OBJ)pibwdggen.o $(OBJ)pibwdgx.o $(OBJ)picmap.o $(OBJ)picmapgen.o $(OBJ)picmapx.o $(OBJ)picontainergen.o $(OBJ)picontainerx.o $(OBJ)pidrawwin.o $(OBJ)pifilechogen.o $(OBJ)pifilechox.o $(OBJ)pihisto.o $(OBJ)piimage.o $(OBJ)pimenubargen.o $(OBJ)pimenubarx.o $(OBJ)pimenugen.o $(OBJ)pimenux.o $(OBJ)pimsghandler.o $(OBJ)pioptmenugen.o $(OBJ)pioptmenux.o $(OBJ)pipixmapgen.o $(OBJ)pipixmapx.o $(OBJ)piscdrawwdg.o $(OBJ)pistdwdggen.o $(OBJ)pistdwdgx.o $(OBJ)piwdggen.o $(OBJ)piwdgx.o $(OBJ)piwindowgen.o $(OBJ)piwindowx.o $(OBJ)pixtbase.o
    8181        ar -rs $@ $?
    82  
    83 $(SLB)libPI.so : $(LIB)libPI.a
    84         ld -S -shared -o $(SLB)libPI.so -all -L$(LIB) $(LIB)libPI.a 2>/dev/null
     82
    8583$(OBJ)ex_dessin.o: ex_dessin.cc ex_dessin.h pisysdep.h pibwdgx.h pibwdggen.h \
    8684 piwdgx.h piwdggen.h pimsghandler.h
     
    170168$(OBJ)piwdgx.o: piwdgx.cc piwdgx.h piwdggen.h pimsghandler.h picontainerx.h \
    171169 pisysdep.h picontainergen.h
    172 $(OBJ)piwdgxt.o: piwdgxt.cc piwdggen.h pimsghandler.h picontainergen.h \
    173  pisysdep.h piwdgx.h
    174170$(OBJ)piwindowgen.o: piwindowgen.cc piwindowgen.h pisysdep.h picontainerx.h \
    175171 picontainergen.h piwdgx.h piwdggen.h pimsghandler.h
     
    213209 $(INC)fitskeys.h \
    214210 $(INC)utils.h $(INC)peida.h
     211
    215212piapp : $(EXE)piapp
    216213       
    217 $(EXE)piapp  : $(OBJ)pidemo.o $(OBJ)pidemoup.o $(LIB)libPI.a
    218         g++ -o $(EXE)piapp $(OBJ)pidemo.o $(OBJ)pidemoup.o -L$(LIB) -lPI -lImages -lOutils -lmath -lXm -lXt -lX11 -lm
     214$(EXE)piapp  : $(OBJ)pidemo.o $(OBJ)pidemoup.o \
     215                $(SLB)libPI.so $(SLB)libpeida.so $(SLB)liberosc.so
     216        cc -o $(EXE)piapp $(OBJ)pidemo.o $(OBJ)pidemoup.o \
     217              -L$(SLB) -lPI -lpeida -lerosc -lgcxx -lXm -lXt -lX11 -lm 
    219218
    220219$(OBJ)pitestapp.o: pitestapp.cc pisysdep.h piapplx.h piapplgen.h \
     
    235234       
    236235$(EXE)pitest  : $(OBJ)pitestapp.o $(LIB)libPI.a
    237         g++ -o $(EXE)pitest $(OBJ)pitestapp.o -L$(LIB) -lPI -lImages -lOutils -lmath -lXm -lXt -lX11 -lm
     236        g++ -v -o $(EXE)pitest $(OBJ)pitestapp.o -L$(LIB) -lPI -lImages -lOutils -lmath -lXm -lXt -lX11 -lm
  • trunk/SophyaPI/PI/ex_dessin.cc

    r2 r9  
    6464SelLine(PI_ThickLine);
    6565DrawLine(70, 120, 100, 120);
     66
     67SelForeground(PI_Magenta);
     68DrawFCircle(120, 30, 15);
     69SelForeground(PI_Grey);
     70DrawFCircle(120, 60, 15);
    6671
    6772return;
  • trunk/SophyaPI/PI/pi.rsc

    r7 r9  
    1 PeidaInt*activeBackground:                   LightBlue
    2 PeidaInt*default*activeBackground:           LightBlue
    3 PeidaInt*activeBottomShadowColor:            Black
    4 PeidaInt*default*activeBottomShadowColor:    Black
    5 PeidaInt*activeForeground:                   LightBlue
    6 PeidaInt*default*activeForeground:           LightBlue
    7 PeidaInt*default*highlightColor:             LightBlue
    8 PeidaInt*activeTopShadowColor:               White
    9 PeidaInt*default*activeTopShadowColor:       White
    101PeidaInt*background:                         LightGrey
    112PeidaInt*default*background:                 LightGrey
     
    3122PeidaInt*fontList:           -*-helvetica-bold-r-normal-*-12-*-*-*-*-*-ISO8859-1
    3223PeidaInt*default*fontList:    -*-helvetica-bold-r-normal-*-12-*-*-*-*-*-ISO8859-1
    33 PidaInt*fontList:           -*-*-Bold-*-*-*-12-*-*-*-*-*-*-*
    34 PidaInt*default*fontList:   -*-*-Bold-*-*-*-12-*-*-*-*-*-*-*
     24
     25# Attention, ne pas mettre de blanc a la fin du nom de fonte
     26PeidaInt*fontFamilyName:   *-helvetica
    3527
    3628PeidaInt*XmToggleButton*selectColor:                  Red
  • trunk/SophyaPI/PI/pibwdggen.h

    r8 r9  
    99enum PIKeyModifier { PIKM_Blank = 0, PIKM_Shift = 1, PIKM_Alt = 2, PIKM_Cntl = 4 } ;
    1010
    11 enum PIColors { PI_Black = 0, PI_White = 1,
    12                 PI_Red = 2, PI_Blue = 3, PI_Green = 4
    13                 PI_Yellow = 5 } ;
     11enum PIColors { PI_Black = 0, PI_White = 1,  PI_Grey = 2,
     12                PI_Red = 3, PI_Blue = 4, PI_Green = 5
     13                PI_Yellow = 5, PI_Magenta =6} ;
    1414enum PIFontSize {PI_SmallSizeFont = 1, PI_NormalSizeFont = 2, PI_BigSizeFont = 3 };
    1515enum PIFontAtt {PI_RomanFont = 1, PI_BoldFont = 2, PI_ItalicFont = 4 };
     
    4747  virtual void       DrawFCircle(int x0, int y0, int r)                    = 0;
    4848
     49  virtual int        CalcStringWidth(char const* s)                        = 0;
     50
    4951  virtual void       SelForeground(PIColors col=PI_Black)                  = 0;
    5052  virtual void       SelBackground(PIColors col=PI_White)                  = 0;
  • trunk/SophyaPI/PI/pibwdgmac.cc

    r2 r9  
    44#include "pibwdgmac.h"
    55#include "piupdattachment.h"
     6#include <algobase.h>
     7#include <string.h>
    68
    79// Les methodes de la classe  PIBWdgGen
     
    6365    ::MoveTo(pt.h, pt.v);
    6466    LStr255 ps = s;
     67    ::TextFont(applFont);
    6568    ::DrawString(ps);
    6669  }
    6770}
     71
     72
     73/* --Methode-- */
     74int PIBaseWdgMac::CalcStringWidth(char const* s)
     75{
     76  if (mPane->FocusDraw())
     77    ::TextFont(applFont);
     78  return ::TextWidth(s,0,strlen(s));
     79}
     80
    6881
    6982/* --Methode-- */
     
    87100    mPane->LocalToPortPoint(pt);
    88101    Rect r = {pt.v, pt.h, pt.v+dy, pt.h+dx};
     102    if (r.top  > r.bottom) swap(r.top,  r.bottom);
     103    if (r.left > r.right)  swap(r.left, r.right);
     104    r.right++; r.bottom++;
    89105    ::FrameRect(&r);
    90106  }
     
    99115    mPane->LocalToPortPoint(pt);
    100116    Rect r = {pt.v, pt.h, pt.v+dy, pt.h+dx};
     117    if (r.top  > r.bottom) swap(r.top,  r.bottom);
     118    if (r.left > r.right)  swap(r.left, r.right);
     119    r.right++; r.bottom++;
    101120    ::PaintRect(&r);
    102121  }
     
    110129    mPane->LocalToPortPoint(pt);
    111130    Rect rr = {pt.v-r, pt.h-r, pt.v+r, pt.h+r};
     131    if (rr.top  > rr.bottom) swap(rr.top,  rr.bottom);
     132    if (rr.left > rr.right)  swap(rr.left, rr.right);
    112133    ::FrameOval(&rr);
    113134  }
     
    121142    mPane->LocalToPortPoint(pt);
    122143    Rect rr = {pt.v-r, pt.h-r, pt.v+r, pt.h+r};
     144    if (rr.top  > rr.bottom) swap(rr.top,  rr.bottom);
     145    if (rr.left > rr.right)  swap(rr.left, rr.right);
    123146    ::PaintOval(&rr);
    124147  }
     
    191214{
    192215  if (mPane->FocusDraw()) {
     216    ::TextFont(applFont);
    193217    switch(sz) {
    194218      case PI_SmallSizeFont:
     
    202226        break;
    203227    }
     228    switch(att) {
     229      case PI_RomanFont:
     230        ::TextFace(0);
     231        break;
     232      case PI_BoldFont:
     233        ::TextFace(bold);
     234        break;
     235      case PI_ItalicFont:
     236        ::TextFace(italic);
     237        break;
     238    }
     239  }
     240}
     241
     242/* --Methode-- */
     243void PIBaseWdgMac::SelFontSzPt(int npt, PIFontAtt att)
     244{
     245  if (mPane->FocusDraw()) {
     246    ::TextFont(applFont);
     247    ::TextSize(npt);
    204248    switch(att) {
    205249      case PI_RomanFont:
  • trunk/SophyaPI/PI/pibwdgmac.h

    r2 r9  
    3232  virtual void       DrawCircle(int x0, int y0, int r);
    3333  virtual void       DrawFCircle(int x0, int y0, int r);
     34  virtual int        CalcStringWidth(char const* s); 
    3435 
    3536  virtual void       SelForeground(PIColors col=PI_White);
     
    3738  virtual void       SelFont(PIFontSize sz=PI_NormalSizeFont,
    3839                             PIFontAtt att=PI_RomanFont);
     40  virtual void       SelFontSzPt(int npt=12, PIFontAtt att=PI_RomanFont);
    3941  virtual void       SelLine(PILineAtt att=PI_NormalLine);
    4042  virtual void       SelPointerShape(PIPointer ptr);
  • trunk/SophyaPI/PI/pibwdgx.cc

    r8 r9  
    1616/*  Variables globales pour modifier les GC  */
    1717#define NMAXFONTSZ  5
    18 static Font fnt[NMAXFONTSZ][3];
    19 static int fntsz[NMAXFONTSZ] = {9,10,12,14,16};
     18static XFontStruct * fntst[NMAXFONTSZ][3];
     19static int fntsz[NMAXFONTSZ] = {7,10,12,14,16};
    2020static  PIFontAtt fntatt[3] = { PI_RomanFont, PI_BoldFont, PI_ItalicFont };
    2121#define NMAXCOL  10
     
    182182}
    183183
     184/* --Methode-- */
     185int PIBaseWdgX::CalcStringWidth(char const* s)
     186{
     187return(XTextWidth(mFSt, s, strlen(s)));
     188}
    184189
    185190/* --Methode-- */
     
    254259mFAtt = fntatt[jat];
    255260mFSize = fntsz[isz];
    256 XSetFont(XtDisplay(XtWdg()), DefGC(), fnt[isz][jat]);
     261mFSt = fntst[isz][jat];
     262XSetFont(XtDisplay(XtWdg()), DefGC(), fntst[isz][jat]->fid);
    257263return;
    258264}
     
    319325
    320326/* --Methode-- */
    321 void PIBaseWdgX::Draw(int x0, int y0, int dx, int dy)
     327void PIBaseWdgX::Draw(int /*x0*/, int /*y0*/, int /*dx*/, int /*dy*/)
    322328{
    323329this->Draw();
     
    374380
    375381/* --Methode-- */
    376 void PIBaseWdgX::But2Press(int x, int y)
    377 {
    378 return;
    379 }
    380 
    381 /* --Methode-- */
    382 void PIBaseWdgX::But2Release(int x, int y)
    383 {
    384 return;
    385 }
    386 
    387 /* --Methode-- */
    388 void PIBaseWdgX::But3Press(int x, int y)
    389 {
    390 return;
    391 }
    392 
    393 /* --Methode-- */
    394 void PIBaseWdgX::But3Release(int x, int y)
    395 {
    396 return;
    397 }
    398 
    399 
    400 /* --Methode-- */
    401 void PIBaseWdgX::Ptr1Move(int x, int y)
     382void PIBaseWdgX::But2Press(int /* x */, int /* y */)
     383{
     384return;
     385}
     386
     387/* --Methode-- */
     388void PIBaseWdgX::But2Release(int /* x */, int /* y */)
     389{
     390return;
     391}
     392
     393/* --Methode-- */
     394void PIBaseWdgX::But3Press(int /* x */, int /* y */)
     395{
     396return;
     397}
     398
     399/* --Methode-- */
     400void PIBaseWdgX::But3Release(int /* x */, int /* y */)
     401{
     402return;
     403}
     404
     405
     406/* --Methode-- */
     407void PIBaseWdgX::Ptr1Move(int  x, int  y )
    402408{
    403409#ifdef DEBUG_PIBWDGX
     
    408414
    409415/* --Methode-- */
    410 void PIBaseWdgX::Ptr2Move(int x, int y)
    411 {
    412 return;
    413 }
    414 
    415 
    416 /* --Methode-- */
    417 void PIBaseWdgX::Ptr3Move(int x, int y)
     416void PIBaseWdgX::Ptr2Move(int /* x */, int /* y */) 
     417{
     418return;
     419}
     420
     421
     422/* --Methode-- */
     423void PIBaseWdgX::Ptr3Move(int /* x */, int /* y */) 
    418424{
    419425return;
     
    434440static bool fgbwdg = false ;
    435441
     442// Le bazar pour recuperer des resources de .Xdefault et autres
     443typedef struct
     444  {
     445  String fntFam;
     446  } myAppData;
     447static myAppData  apd;
     448
     449static XtResource resources[] = {
     450  { "fontFamilyName", "FontFamilyName", XtRString, sizeof(String),
     451    /*XtOffset(apdp, fntFam)*/ 0, XtRString, "*-helvetica" }
     452};
     453 
     454static char * fnbi_b[4] = { "medium-r-normal", "bold-r-normal",
     455                          "medium-o-normal", "medium-i-normal" };
     456
    436457/* --Methode-- */
    437458void PIBaseWdgX::Init()
    438459{
    439 char buff[200];
    440 int i,j;
     460char buff[256];
     461int i,j,jj,k, count;
     462char **list;
     463XFontStruct * defnt;
     464char * fnbi[3];
    441465
    442466if (fgbwdg)  return;
     
    447471XColor exact,mycol;
    448472Colormap  cmap;
    449 Status rc;
    450473
    451474mdsp = PIXDisplay();
    452475scr = XDefaultScreen(mdsp);
    453476
     477XtGetApplicationResources(PIXtTopWdg(), &apd, resources,
     478                          XtNumber(resources), NULL, 0);
     479sprintf(buff,"-%s-*-*-*-*-*-*-*-*-*-*-*-*", apd.fntFam);
     480list = XListFonts(mdsp, buff, 15, &count);
     481XFreeFontNames(list);
     482if (count < 5)
     483  {
     484  printf("PIBaseWdgX::Init %d fonts found for %s , switching to helvetica\n",
     485         count, apd.fntFam);
     486  apd.fntFam = "*-helvetica";
     487  }
     488sprintf(buff,"-%s-%s-*-*-*-*-*-*-*-*-*", apd.fntFam, fnbi_b[0]);
     489list = XListFonts(mdsp, buff, 10, &count);
     490XFreeFontNames(list);
     491if (count < 2) fnbi[0] = "*-*-*";
     492else  fnbi[0] = fnbi_b[0];
     493sprintf(buff,"-%s-%s-*-*-*-*-*-*-*-*-*", apd.fntFam, fnbi_b[1]);
     494list = XListFonts(mdsp, buff, 10, &count);
     495XFreeFontNames(list);
     496if (count < 2) fnbi[1] = "*-*-*";
     497else  fnbi[1] = fnbi_b[1];
     498sprintf(buff,"-%s-%s-*-*-*-*-*-*-*-*-*", apd.fntFam, fnbi_b[2]);
     499list = XListFonts(mdsp, buff, 10, &count);
     500XFreeFontNames(list);
     501fnbi[2] = fnbi_b[2];
     502if (count < 2)
     503  {
     504  sprintf(buff,"-%s-%s-*-*-*-*-*-*-*-*-*", apd.fntFam, fnbi_b[3]);
     505  list = XListFonts(mdsp, buff, 10, &count);
     506  XFreeFontNames(list);
     507  fnbi[2] = fnbi_b[3];
     508  }
     509if (count < 2) fnbi[2] = "*-*-*";
     510
     511sprintf(buff,"-*-fixed-*-*-*-*-14-*-*-*-*-*-*-*");
     512list = XListFonts(mdsp, buff, 10, &count);
     513XFreeFontNames(list);
     514if (count < 1)
     515  { 
     516  sprintf(buff,"fixed");
     517  list = XListFonts(mdsp, buff, 10, &count);
     518  XFreeFontNames(list);
     519  }
     520if (count < 1)
     521  { 
     522  strcpy(buff,"");
     523  list = XListFonts(mdsp, buff, 10, &count);
     524  XFreeFontNames(list);
     525  printf("PIBaseWdgX::Init/ Erreur, no font found ... \n");
     526  defnt = NULL;
     527  }
     528else defnt = XLoadQueryFont(mdsp, buff);
     529
    454530/* Allocation des fonts */
    455531for (i=0; i<NMAXFONTSZ; i++)
     532  for (j=0; j<3; j++)
    456533  {
    457   sprintf(buff,"-*-helvetica-medium-r-normal-*-%d-*-*-*-*-*-ISO8859-1", fntsz[i]);
    458   fnt[i][0] = XLoadFont(mdsp, buff);
    459   if (fnt[i][0] == 0)  printf("PIBaseWdgX::Init: Pb font %s \n", buff);
    460   sprintf(buff,"-*-helvetica-bold-r-normal-*-%d-*-*-*-*-*-ISO8859-1", fntsz[i]);
    461   fnt[i][1] = XLoadFont(mdsp, buff);
    462   if (fnt[i][0] == 0)  printf("PIBaseWdgX::Init: Pb font %s \n", buff);
    463   sprintf(buff,"-*-helvetica-medium-o-normal-*-%d-*-*-*-*-*-ISO8859-1", fntsz[i]);
    464   fnt[i][2] = XLoadFont(mdsp, buff);
    465   if (fnt[i][0] == 0)  printf("PIBaseWdgX::Init: Pb font %s \n", buff);
    466   }
    467 
    468 for(i=0; i<NMAXFONTSZ; i++)
    469   for(j=0; j<3; j++)
    470     if (fnt[i][j] == 0) XLoadFont(mdsp, "fixed");
     534  for (k=0; k<5; k++)
     535    {
     536    sprintf(buff,"-%s-%s-*-%d-*-*-*-*-*-*-*", apd.fntFam, fnbi[j], fntsz[i]+k);
     537    list = XListFonts(mdsp, buff, 10, &count);
     538    XFreeFontNames(list);
     539    if (count > 0)  break;
     540    }
     541  if (count > 0)
     542    { 
     543    fntst[i][j] = XLoadQueryFont(mdsp, buff);
     544//    printf("PIBaseWdgX::Init:  font %s loaded \n", buff);
     545    }
     546  else
     547    {   
     548    printf("PIBaseWdgX::Init: Pb font %s \n", buff);   
     549    fntst[i][j] = defnt;
     550    }
     551  }
    471552
    472553 
     
    477558colpix[PI_Black] = XBlackPixel(mdsp, scr);
    478559colpix[PI_White] = XWhitePixel(mdsp, scr);
    479 
    480 if ( XAllocNamedColor (mdsp, cmap, "Red", &mycol, &exact) )
     560if ( XAllocNamedColor (mdsp, cmap, "LightGray", &mycol, &exact) )
     561  colpix[PI_Grey] = mycol.pixel;
     562if ( XAllocNamedColor (mdsp, cmap, "red", &mycol, &exact) )
    481563  colpix[PI_Red] = mycol.pixel;
    482 if ( XAllocNamedColor (mdsp, cmap, "Blue", &mycol, &exact) )
     564if ( XAllocNamedColor (mdsp, cmap, "blue", &mycol, &exact) )
    483565  colpix[PI_Blue] = mycol.pixel;
    484 if ( XAllocNamedColor (mdsp, cmap, "Green", &mycol, &exact) )
     566if ( XAllocNamedColor (mdsp, cmap, "green", &mycol, &exact) )
    485567  colpix[PI_Green] = mycol.pixel;
    486 if ( XAllocNamedColor (mdsp, cmap, "Yellow", &mycol, &exact) )
     568if ( XAllocNamedColor (mdsp, cmap, "yellow", &mycol, &exact) )
    487569  colpix[PI_Yellow] = mycol.pixel;
     570if ( XAllocNamedColor (mdsp, cmap, "magenta", &mycol, &exact) )
     571  colpix[PI_Magenta] = mycol.pixel;
    488572
    489573curs[0] = XCreateFontCursor(mdsp, XC_X_cursor);
  • trunk/SophyaPI/PI/pibwdgx.h

    r8 r9  
    3131  virtual void   DrawCircle(int x0, int y0, int r);
    3232  virtual void   DrawFCircle(int x0, int y0, int r);
     33
     34  virtual int    CalcStringWidth(char const* s);
    3335
    3436  virtual void   SelForeground(PIColors col=PI_Black);
     
    7173  PIFontAtt mFAtt;
    7274  int mFSize;
     75  XFontStruct *mFSt;
    7376};
    7477
  • trunk/SophyaPI/PI/pidemo.cc

    r8 r9  
    11#include <stdlib.h>
    22#include <stdio.h>
     3#include <string.h>
     4#include <dlfcn.h>
    35
    46#include "perrors.h"
     
    68
    79#include "pidemo.h"
    8 #include "pidemoup.h"
    9 
    10 
    11 
     10#include "piup.h"
     11
     12
     13/*  Pour le link dynamique  */
     14typedef FitsImageR4 * (* UsPrFunc) (FitsImageR4 * myimg, int xp, int yp,
     15                                    char * arg1, char * arg2);
     16static UsPrFunc  userFunc[3] = { NULL, NULL, NULL };
     17static void *dlhandle = NULL;
     18
     19static char userlibname[256];
     20
     21static int DynLink(char *usln);
     22
     23int DynLink(char *usln)
     24{
     25UsPrFunc uf;
     26int i, rc;
     27
     28if (usln != NULL)  strncpy(userlibname, usln, 255);  userlibname[255] = '\0';
     29
     30printf("PIDemo_DynLink(): Relinking from %s \n", userlibname);
     31if (dlhandle != NULL)  dlclose(dlhandle);
     32for(i=0; i<3; i++)  userFunc[i] = NULL;
     33dlhandle =  dlopen(userlibname, RTLD_NOW);
     34if (dlhandle == NULL) 
     35  { printf("PIDemo_DynLink(), Erreur d'ouverture UserShLib %s \n", userlibname);
     36  return(100); }
     37rc = 0;
     38printf("PIDemo_DynLink(): Searching for PIUserProc_1 (Rc=%d) \n", rc);
     39uf = dlsym(dlhandle, "PIUserProc_1__FPt9FitsImage1ZfiiPcT3");
     40if (uf != NULL)  userFunc[0] = uf;
     41else rc += 2;
     42printf("PIDemo_DynLink(): Searching for PIUserProc_3 (Rc=%d) \n", rc);
     43uf = dlsym(dlhandle, "PIUserProc_2__FPt9FitsImage1ZfiiPcT3");
     44if (uf != NULL)  userFunc[1] = uf;
     45else rc += 4;
     46printf("PIDemo_DynLink(): Searching for PIUserProc_3 (Rc=%d) \n", rc);
     47uf = dlsym(dlhandle, "PIUserProc_3__FPt9FitsImage1ZfiiPcT3");
     48if (uf != NULL)  userFunc[2] = uf;
     49else rc += 8;
     50
     51if (rc != 0)  printf("PIDemo_DynLink() / Erreur, Rc = %d \n", rc);
     52return(rc);
     53}
    1254
    1355/* ........................................................... */
     
    2870m[0]->AppendItem("Close", 10102);
    2971m[0]->AppendItem("Save", 10103);
    30 m[0]->AppendItem("Exit", 10104);
     72m[0]->AppendItem("Relink", 10104);
     73m[0]->AppendItem("Exit", 10105);
    3174
    3275m[1] = new PIPDMenu((PIMsgHandler *)Menubar(),"Image");
     
    188231
    189232    case 10104:
     233      SetBusy();
     234      DynLink(NULL);
     235      SetReady();
     236      break;
     237
     238    case 10105:
    190239      Stop();
    191240      break;
     
    407456int n;
    408457if ((n=GetNumCurrent()) < 0)  return;
     458zoom->SetPixmap(NULL,0,0);
     459zoom->EraseWindow();
     460labimg->SetLabel("");
    409461wpii[n]->Hide();
    410462delete pii[n];
    411463delete img[n];
    412464delete wpii[n];
    413 zoom->EraseWindow();
    414 labimg->SetLabel("");
    415 pii[n] = pii[mNimg];
    416 wpii[n] = wpii[mNimg];
    417 img[n] = img[mNimg];
     465pii[n] = pii[mNimg-1];
     466wpii[n] = wpii[mNimg-1];
     467img[n] = img[mNimg-1];
    418468mNimg--;
    419469mCur = NULL;
     
    648698      {
    649699      case 1 :
    650         oimg = PIUserProc_1(mimg, xp, yp,
     700      case 2 :
     701      case 3 :
     702        oimg = userFunc[mUpr-1] (mimg, xp, yp,
    651703                            (char *) (mText[1]->GetText().c_str()),
    652704                            (char *) (mText[2]->GetText().c_str()));
    653705        break;
    654 
     706/*
    655707      case 2 :
    656708        oimg = PIUserProc_2(mimg, xp, yp,
     
    664716                            (char *) (mText[2]->GetText().c_str()));
    665717        break;
    666 
     718*/
    667719      }   
    668720    if (oimg)  dap->AddImage(oimg,mText[0]->GetText());
     
    680732
    681733char *path;
     734int rc;
    682735 
    683736if (narg > 1)  path = arg[1];
    684737else path = NULL;
    685738
     739if (narg > 2)  rc = DynLink(arg[2]);
     740else rc = DynLink("piup.so");
     741if (rc != 0)
     742  {
     743  printf("PIApp:: Erreur d'ouverture UserProcFunc Shared-Object ... \n");
     744  exit(0);
     745  }
     746
    686747PIDemoApp app(path);
    687748
    688749app.Run();
    689750
     751dlclose(dlhandle);
    690752exit(0);
    691753}
  • trunk/SophyaPI/PI/pidrawwin.cc

    r8 r9  
    2222
    2323void
    24 PIDrawWindow::SetAxesKind(int axesKind, int tickLevel, int markLevel)
     24PIDrawWindow::SetAxesFlags(int flags)
    2525{
    26   mDrawWdg->SetAxesKind(axesKind, tickLevel, markLevel);
     26  mDrawWdg->SetAxesFlags(flags);
    2727}
    2828
  • trunk/SophyaPI/PI/pidrawwin.h

    r8 r9  
    1616               
    1717 virtual void    AddDrawer(PIScDrawer*);               
    18  virtual void    SetAxesKind(int axesChoice=1, int tickLevel=1, int markLevel=1);
     18 virtual void    SetAxesFlags(int flags=-1);
    1919private:
    2020  PIScDrawWdg*   mDrawWdg;
     
    2222
    2323
     24#endif
    2425
    25 #endif
  • trunk/SophyaPI/PI/pifilechomac.cc

    r2 r9  
    1010 
    1111  string fName;
    12   int i = dir.rfind('/');
     12  int i = dir.rfind(':');
    1313  if (i == NPOS)
    1414    fName = dir;
     
    2727  p2cstr(reply.sfFile.name);
    2828 
    29   return directory + '/' + (char*)reply.sfFile.name;
     29//  return directory + '/' + (char*)reply.sfFile.name;
     30  return directory + ':' + (char*)reply.sfFile.name;
    3031}
    3132
     
    4243  p2cstr(reply.sfFile.name);
    4344 
    44   return directory + '/' + (char*)reply.sfFile.name;
     45//  return directory + '/' + (char*)reply.sfFile.name;
     46  return directory + ':' + (char*)reply.sfFile.name;
    4547}
    4648
     
    6264                        err = PBGetCatInfoSync(CInfoPBPtr(&block));
    6365                        p2cstr(directoryName);
    64                         fullPathName = '/' + ((char*)directoryName + fullPathName);
     66                        if (fullPathName != "") fullPathName = ':' + fullPathName;
     67                        fullPathName =  ((char*)directoryName + fullPathName);
     68//                      fullPathName = '/' + ((char*)directoryName + fullPathName);
    6569        } while (block.ioDrDirID != 2);
    6670        return fullPathName;
  • trunk/SophyaPI/PI/pifilechomac.h

    r2 r9  
    2828typedef PIFileChooserMac     PIFileChooser ;
    2929
     30#define FILESEP ':'
     31
    3032#endif
    3133
  • trunk/SophyaPI/PI/pihisto.cc

    r8 r9  
     1#include <stdio.h>
    12#include "pihisto.h"
    23
     
    2627 
    2728  double xmin = mHisto->XMin();
    28   double xmax = (mHisto->XMax())*1.2;
    29   double margeH = (xmax-xmin)/10;
    30   xmin -= margeH;
    31   xmax += margeH;
     29  double xmax = (mHisto->XMax());
    3230
    33   double ymax = (*mHisto)(mHisto->IMax());
    34   double margeV = ymax / 10;
    35   double ymin = -margeV;
    36   ymax += margeV;
     31  double ymax = (*mHisto)(mHisto->IMax())*1.2;
     32  double ymin = 0;
    3733 
    3834  mDrawWdg->SetLimits(xmin, xmax, ymin, ymax);
    39   mDrawWdg->SetBBoxMargin(margeH, margeV);
     35  mDrawWdg->SetAxesFlags(kBoxAxes | kExtTicks | kLabels);
    4036}
    4137
     
    4541{
    4642  if (!mDrawWdg) return;
    47   mDrawWdg->DrawBBox(1,2,1);
    4843  for (int i=0; i<mHisto->NBins(); i++) {
    4944                double left   = mHisto->BinLowEdge(i);
     
    5247                double height = (*mHisto)(i);
    5348                mDrawWdg->ScDrawFBox(left,bottom,width,height);
    54 //              mDrawWdg->ScDrawLine(left, bottom, left, bottom + height);
     49                mDrawWdg->ScDrawLine(left, bottom, left, bottom + height); // Au moins une ligne...
    5550        }
     51  DrawStats();
     52}
     53
     54void
     55PIHisto::DrawStats()
     56{
     57  // Une boite dans le coin superieur droit
     58  if (!mDrawWdg) return;
     59  double cellHeight = (mDrawWdg->YMax() - mDrawWdg->YMin()) * 0.05;
     60  double cellWidth  = (mDrawWdg->XMax() - mDrawWdg->XMin()) * 0.23;
     61  mDrawWdg->ScDrawLine(mDrawWdg->XMax() - cellWidth, mDrawWdg->YMax(),
     62                       mDrawWdg->XMax() - cellWidth, mDrawWdg->YMax() - cellHeight);
     63  mDrawWdg->ScDrawLine(mDrawWdg->XMax() - cellWidth, mDrawWdg->YMax() - cellHeight,
     64                       mDrawWdg->XMax()            , mDrawWdg->YMax() - cellHeight);
     65  char label[50];
     66  sprintf(label, "N = %.6g", mHisto->NData());
     67  mDrawWdg->ScSelFontSz((mDrawWdg->YMax() - mDrawWdg->YMin())/30);
     68  mDrawWdg->ScDrawString(mDrawWdg->XMax() - cellWidth*0.9, mDrawWdg->YMax() - cellHeight*0.8, label);
     69                       
    5670}
    5771
  • trunk/SophyaPI/PI/pihisto.h

    r8 r9  
    1111  virtual           ~PIHisto();
    1212  virtual void       Draw();
     13  virtual void       DrawStats();
    1314  virtual void       Refresh();  // Recalcule les limites, et reaffiche
    1415protected:
  • trunk/SophyaPI/PI/piimage.cc

    r8 r9  
    173173{
    174174// printf("PIImage::Resize\n");
     175PIPixmapX::Resize();
    175176SetPave();
    176177Apply();
     
    393394  ofy = ypav+(ywsz*zm/2);
    394395  }
     396if (ofx < 0)  ofx = 0;
     397if (ofy < 0)  ofy = 0;
    395398
    396399zpixm = ComputePixmap(ofx, ofy, zm, xwsz, ywsz, zpixm, &xszpxm, &yszpxm);
  • trunk/SophyaPI/PI/pimenumac.cc

    r2 r9  
    2626PIMenuMac::FindItemByMsg(long msg)
    2727{
     28  if (mMsgs.size() == 0) return -1;
    2829  int i = find(mMsgs.begin(), mMsgs.end(), msg) - mMsgs.begin();
    2930  return (i>=mMsgs.size()) ? -1 : i;
     
    5354PIMenuMac::CheckItemNum(int n, bool st)
    5455{
     56  if (n<0 || n >= mMsgs.size()) return; // $CHECK$ exception ?
    5557  ::CheckItem(macMenu->GetMacMenuH(), n, st);
    5658}
     
    7577PIMenuMac::DeleteItemNum(int n)
    7678{
     79  if (n<0 || n >= mMsgs.size()) return; // $CHECK$ exception ?
    7780  macMenu->RemoveItem(n+1);
    7881  mMsgs.erase(mMsgs.begin()+n);
     
    100103PIMenuMac::ItemSelected(int item)
    101104{
     105  if (item<0 || item >= mMsgs.size()) return; // $CHECK$ exception ?
    102106  Send(mMsgs[item], (void*) GetMenuItemText(item).c_str());
    103107}
     
    106110void
    107111PIMenuMac::Show()
     112{}
     113
     114void
     115PIMenuMac::Show(PIWdg *w, int px, int py)
    108116{}
    109117
     
    141149PIMenuMac::GetMenuItemText(int item)
    142150{
     151  if (item<0 || item >= mMsgs.size()) return ""; // $CHECK$ exception ?
    143152  MenuHandle h = GetMacMenuHandle();
    144153  Str255 txt;
     
    147156  return (char*) txt;
    148157}
     158
     159PIMenuMac::GetMenuItemMsg(int item)
     160{
     161  if (item<0 || item >= mMsgs.size()) return -1; // $CHECK$ exception ?
     162  return mMsgs[item];
     163}
     164
    149165
    150166
  • trunk/SophyaPI/PI/pimenumac.h

    r2 r9  
    2424       
    2525    virtual void    Show();
     26    virtual void    Show(PIWdg *w, int px, int py);
     27
    2628    virtual void    Hide();
    2729   
     
    2931    void            ItemSelected(int item);
    3032   
    31         static PIMenuMac* findMenu(int id);
    32         MenuHandle      GetMacMenuHandle();
    33         ResIDT          GetMacMenuID();
    3433        string          GetMenuItemText(int item);
     34        int             GetMenuItemMsg(int item);
     35        int             FindItemByMsg(long msg);
     36        int             FindItemByName(string const& nom);
    3537       
    3638protected:
     39        static PIMenuMac* findMenu(int id);
    3740        LMenu*          macMenu;
    3841        int             mMenuId;
     
    4245       
    4346        friend class    PIMenubarMac;
     47        friend class    PIOptMenuMac;
     48        friend class    PIPPMenuBar;
     49        MenuHandle      GetMacMenuHandle();
     50        ResIDT          GetMacMenuID();
    4451       
    45         int             FindItemByMsg(long msg);
    46         int             FindItemByName(string const& nom);
    4752   
    4853};
  • trunk/SophyaPI/PI/pioptmenumac.cc

    r2 r9  
    22
    33/* --Methode-- */
    4 PIOptMenuMac::PIOptMenuMac(PIContainerGen* par, PIPDMenu *pdm,
     4PIOptMenuMac::PIOptMenuMac(PIContainerGen* par, PIPUMenu *pdm,
    55                     int sx, int sy, int px, int py)
    6 : PIOptMenuGen(par, pdm, sx, sy, px, py), mPDMenu(pdm)
     6: PIOptMenuGen(par, pdm, sx, sy, px, py), mPUMenu(pdm)
    77{
    88  delete mPane;
     
    4141
    4242void
    43 PIOptMenuMac::ListenToMessage(MessageT inMessage, void *)
     43PIOptMenuMac::ListenToMessage(MessageT /*inMessage*/, void *)
    4444{
    4545//  if (inMessage == msg_Click)
    46     mPDMenu->ItemSelected(((LStdPopupMenu*)mPane)->GetValue()-1);
     46    mPUMenu->ItemSelected(((LStdPopupMenu*)mPane)->GetValue()-1);
    4747}
    4848
     
    5252mStext = txt;  mSmsg = msg;
    5353}
     54
     55/* --Methode-- */
     56void PIOptMenuMac::SetValueStr(string & s)
     57{
     58int n;
     59n=mPUMenu->FindItemByName((char *)s.c_str());
     60if (n < 0)  return; 
     61
     62((LStdPopupMenu*)mPane)->SetValue(n+1);
     63mStext = s;
     64mSmsg  = mPUMenu->GetMenuItemMsg(n);
     65
     66return;
     67}
     68
     69/* --Methode-- */
     70void PIOptMenuMac::SetValue(long msg)
     71{
     72int n;
     73n=mPUMenu->FindItemByMsg(msg);
     74if (n < 0)  return;
     75 
     76((LStdPopupMenu*)mPane)->SetValue(n+1);
     77mStext = mPUMenu->GetMenuItemText(n);
     78mSmsg  = msg;
     79
     80return;
     81}
     82
  • trunk/SophyaPI/PI/pioptmenumac.h

    r2 r9  
    66class PIOptMenuMac : public PIOptMenuGen {
    77public:
    8                         PIOptMenuMac(PIContainerGen* par, PIPDMenu *pdm, 
     8                        PIOptMenuMac(PIContainerGen* par, PIPUMenu *pdm, 
    99                               int sx=10, int sy=10, int px=0, int py=0);
    1010                       ~PIOptMenuMac();
     
    1515  virtual string    GetValueStr() { return(mStext); }
    1616  virtual long      GetValue()    { return(mSmsg); }
     17  virtual void      SetValueStr(string & s);
     18  virtual void      SetValue(long msg);
    1719 
    1820  inline void       Select(char *txt, long msg); // public ou protege ???
     
    2325  long      mSmsg;
    2426  //MenuHandle macMenu;
    25   PIPDMenu* mPDMenu;
     27  PIPUMenu* mPUMenu;
    2628};
    2729
  • trunk/SophyaPI/PI/pipixmapx.cc

    r6 r9  
    1515{
    1616Init();
     17AllocXImg();
    1718}
    1819
     
    2021/* --Methode-- */
    2122PIPixmapX::~PIPixmapX()
    22 {}
     23{
     24delete[] myximg->data;
     25XFree(myximg);
     26}
    2327
     28/* --Methode-- */
     29void PIPixmapX::Refresh()
     30{
     31int i,j;
     32unsigned char *pp;
     33
     34for(j=0; j<ny; j++)
     35  {
     36  pp = pixmap+j*nx;
     37  for(i=0; i<nx; i++)
     38    { XPutPixel(myximg, i, j, cmap->Color(*pp) );  pp++; }
     39  }
     40
     41for(j=ny; j<YSize(); j++)
     42  for(i=nx; i<XSize(); i++)
     43    XPutPixel(myximg, i, j, 0 );
     44
     45PIBaseWdgX::Refresh();
     46}
    2447
    2548
    2649/* --Methode-- */
     50void PIPixmapX::Resize()
     51{
     52delete[] myximg->data;
     53XFree(myximg);
     54AllocXImg();
     55}
     56/* --Methode-- */
    2757void PIPixmapX::Draw()
    2858{
    29 Window xw;
    30 Display * mdsp;
    31 xw = XtWindow(XtWdg());
    32 mdsp = PIXDisplay();
    33 if (nx < XSize())  XClearArea(mdsp, xw, nx, 0, XSize()-nx, YSize(), False);
    34 if (ny < YSize())  XClearArea(mdsp, xw, 0, ny, XSize(), YSize()-ny, False);
    35 Draw(0,0,XSize(),YSize());
     59Draw(0, 0, XSize(), YSize());
    3660}
    3761
     
    3963void PIPixmapX::Draw(int x0, int y0, int dx, int dy)
    4064{
    41 int depth;
    42 XImage * ximg;
    4365Window xw;
    4466Display * mdsp;
    45 int scr;
    46 
    47 int i,j;
    48 unsigned char *pp;
    49 
    50 
    51 if ((pixmap == NULL) || (cmap == NULL)) return;
     67if ((myximg == NULL) || (cmap == NULL)) return;
    5268
    5369xw = XtWindow(XtWdg());
    5470mdsp = PIXDisplay();
    55 scr = PIXScreen();
    5671
    5772if (x0 < 0)  x0 = 0;
    5873if (y0 < 0)  y0 = 0;
    5974
    60 if (dx > (nx-x0)) dx = nx-x0;
    61 if (dy > (ny-y0)) dy = ny-y0;
     75if (dx > (XSize()-x0)) dx = XSize()-x0;
     76if (dy > (YSize()-y0)) dy = YSize()-y0;
    6277if ((dx <= 0) || (dy <= 0))  return;
    6378
    64 depth = DefaultDepth(mdsp,scr);
    65 ximg = XCreateImage (mdsp,DefaultVisual(mdsp,scr),
    66        depth,ZPixmap,0,NULL,dx,dy,8,0);
    67 if (ximg == NULL)  return;
    68 ximg->data = new char [dy*ximg->bytes_per_line];
    69 if (ximg->data == NULL)  { XFree(ximg); return; }
     79if ( (nx < x0 ) || (ny < y0) )
     80  { XClearArea(mdsp, xw, x0, y0, dx, dy, False);  return; }
    7081
    71 for(j=0; j<dy; j++)
    72   {
    73   pp = pixmap+(j+y0)*nx+x0;
    74   for(i=0; i<dx; i++)
    75     { XPutPixel(ximg, i, j, cmap->Color(*pp) );  pp++; }
    76   }
    77 XPutImage(mdsp, xw, mygc, ximg, 0,0, x0, y0, nx, ny);
     82if (nx < (x0+dx))
     83  { XClearArea(mdsp, xw, nx, y0, x0+dx-nx, dy, False);  dx = nx-x0; }
     84if (ny < (y0+dy))
     85  { XClearArea(mdsp, xw, x0, ny, dx, y0+dy-ny, False);  dy = ny-y0; }
     86 
     87XPutImage(mdsp, xw, mygc, myximg, x0, y0, x0, y0, dx, dy);
    7888XSync(mdsp, 0);
    7989
    80 delete[] ximg->data;
    81 XFree(ximg);
    8290return;
    8391 
     
    111119return;
    112120}
     121
     122
     123/* --Methode-- */
     124void PIPixmapX::AllocXImg()
     125{
     126Window xw;
     127Display * mdsp;
     128int scr;
     129int depth;
     130int pad;
     131
     132xw = XtWindow(XtWdg());
     133mdsp = PIXDisplay();
     134scr = PIXScreen();
     135
     136depth = DefaultDepth(mdsp,scr);
     137pad = (depth > 8) ? 32 : 8;
     138myximg = XCreateImage (mdsp,DefaultVisual(mdsp,scr),
     139           depth,ZPixmap,0,NULL, XSize(), YSize(), pad,0);
     140if (myximg == NULL)  return;
     141myximg->data = new char [YSize()*myximg->bytes_per_line];
     142if (myximg->data == NULL)  XFree(myximg);
     143return;
     144}
  • trunk/SophyaPI/PI/pipixmapx.h

    r2 r9  
    1111  virtual      ~PIPixmapX();
    1212
     13  virtual void  Refresh();
     14  virtual void  Resize();
    1315  virtual void  Draw();
    1416  virtual void  Draw(int x0, int y0, int dx, int dy);
     
    1719protected:
    1820  void          Init();
     21  void          AllocXImg();
     22  XImage * myximg; 
    1923};
    2024
  • trunk/SophyaPI/PI/pippapplmac.cc

    r2 r9  
    2121  }   
    2222}
     23
     24
     25// $CHECK$
     26// Gerer AllowSubRemoval, qui envoie un evenement a l'application PI.
     27// Eventuellement avoir des fenetres qui se cachent lors d'un close et d'autres
     28// qui se detruisent ??
  • trunk/SophyaPI/PI/piscdrawwdg.cc

    r8 r9  
    33#include <algo.h>
    44
    5 
    65PIScDrawWdg::PIScDrawWdg(PIContainerGen *par, char *nom,
    76                         int sx, int sy, int px, int py)
     
    1110  limitsFixed = 0;
    1211  xEndDrag = yEndDrag = xBegDrag = yBegDrag = 0;
     12  SetAxesFlags(kAxesDflt);
     13  clip = true;
    1314}
    1415
     
    5152PIScDrawWdg::CalcScale()
    5253{
    53   xScale = XSize() / (xMax-xMin);
    54   yScale = -YSize() / (yMax-yMin);
    55   xOrg   = -xMin * xScale + XPos();
    56   yOrg   = -yMax * yScale + YPos();
     54  double margeH = (xMax-xMin)*0.2;
     55  double margeV = (yMax-yMin)*0.2;
     56  xScale = XSize() / (xMax-xMin + 2*margeH);
     57  yScale = -YSize() / (yMax-yMin + 2*margeV);
     58  xOrg   = (-xMin + margeH) * xScale + XPos();
     59  yOrg   = (-yMax - margeV) * yScale + YPos();
    5760}
    5861
     
    8184    if (yFirstMinTick < yMin) yFirstMinTick += yMinTickStep;
    8285   
    83     xMajTickLen = -2/yScale;
    84     xMinTickLen = -1/yScale;
    85     yMajTickLen = 2/xScale;
    86     yMinTickLen = 1/xScale;
     86//    xMajTickLen = -2/yScale;
     87//    xMinTickLen = -1/yScale;
     88//    yMajTickLen = 2/xScale;
     89//    yMinTickLen = 1/xScale;
     90
     91    yMajTickLen = (xMax-xMin)/100;
     92    yMinTickLen = (xMax-xMin)/250;
     93    xMajTickLen = (yMax-yMin)/100;
     94    xMinTickLen = (yMax-yMin)/250;
     95
    8796}
    8897
     
    108117  dypix = int(dy*yScale + .5);
    109118}
     119
     120double
     121PIScDrawWdg::ScStringWidth(char const* s)
     122{
     123  return CalcStringWidth(s) / xScale;
     124}
     125
     126void
     127PIScDrawWdg::ScSelFontSz(double size, PIFontAtt att)
     128{
     129  int npt = int(fabs(size * yScale)+.5);
     130  if (npt < 8) npt = 8;
     131  if (npt > 127) npt = 127;
     132  SelFontSzPt(npt, att);
     133}
     134
    110135
    111136void
     
    120145PIScDrawWdg::ScDrawLine(double x1, double y1, double x2, double y2)
    121146{
     147 
     148  if (clip) {
     149    if (x2 < xMin && x1 < xMin) return;
     150    if (x2 > xMax && x1 > xMax) return;
     151    if (y1 < yMin && y2 < yMin) return;
     152    if (y2 > yMax && y2 > yMax) return;
     153    if (x2 < x1) {
     154      swap(x1,x2);
     155      swap(y1,y2);
     156    }
     157    if (x2>xMax) {
     158      y2 = y1 + (y2-y1)/(x2-x1)*(xMax-x1);
     159      x2 = xMax;
     160    }
     161    if (x1<xMin) {
     162      y1 = y2 + (y1-y2)/(x1-x2)*(xMin-x2);
     163      x1 = xMin;
     164    }
     165    if (y2 < y1) {
     166      swap(x1,x2);
     167      swap(y1,y2);
     168    }
     169    if (y2>yMax) {
     170      x2 = x1 + (x2-x1)/(y2-y1)*(yMax-y1);
     171      y2 = yMax;
     172    }
     173    if (y1<yMin) {
     174      x1 = x2 + (x1-x2)/(y1-y2)*(yMin-y2);
     175      y1 = yMin;
     176    }
     177  }
    122178  int x1Pix, y1Pix, x2Pix, y2Pix;
    123179  Sc2Local(x1, y1, x1Pix, y1Pix);
     
    129185PIScDrawWdg::ScDrawBox(double x, double y, double dx, double dy)
    130186{
     187  if (clip) {
     188    if (dx < 0) {
     189      x = x+dx;
     190      dx = -dx;
     191    }
     192    if (dy < 0) {
     193      y = y+dy;
     194      dy = -dy;
     195    }
     196    if (x > xMax || x+dx < xMin || y > yMax || y+dy < yMin) return;
     197    if (x < xMin) {
     198      dx -= (xMin-x);
     199      x = xMin;
     200    }
     201    if (y < yMin) {
     202      dy -= (yMin-y);
     203      y = yMin;
     204    }
     205    if (x+dx > xMax)
     206      dx = (xMax-x);
     207    if (y+dy > yMax)
     208      dy = (yMax-y);
     209  }
    131210  int xPix, yPix, x2Pix, y2Pix;
    132211  Sc2Local(x, y, xPix, yPix);
     
    138217PIScDrawWdg::ScDrawFBox(double x, double y, double dx, double dy)
    139218{
     219  if (clip) {
     220    if (dx < 0) {
     221      x = x+dx;
     222      dx = -dx;
     223    }
     224    if (dy < 0) {
     225      y = y+dy;
     226      dy = -dy;
     227    }
     228    if (x > xMax || x+dx < xMin || y > yMax || y+dy < yMin) return;
     229    if (x < xMin) {
     230      dx -= (xMin-x);
     231      x = xMin;
     232    }
     233    if (y < yMin) {
     234      dy -= (yMin-y);
     235      y = yMin;
     236    }
     237    if (x+dx > xMax)
     238      dx = (xMax-x);
     239    if (y+dy > yMax)
     240      dy = (yMax-y);
     241  }
    140242  int xPix, yPix, x2Pix, y2Pix;
    141243  Sc2Local(x, y, xPix, yPix);
     
    163265
    164266void
    165 PIScDrawWdg::DrawAxes(int tickLevel, int markLevel)
    166 {
    167   // Les axes
    168  
    169   ScDrawLine(xMin, 0, xMax, 0);
    170   ScDrawLine(0, yMin, 0, yMax);
    171  
    172   // Les ticks majeurs
    173  
    174   if (tickLevel > 0) {
    175     for (double x=xFirstMajTick; x<=xMax; x += xMajTickStep)
    176       ScDrawLine(x, -xMajTickLen, x, xMajTickLen);
    177     for (double y=yFirstMajTick; y<=yMax; y += yMajTickStep)
    178       ScDrawLine(-yMajTickLen, y, yMajTickLen, y);
    179   }
    180 
    181   // Les ticks mineurs
    182  
    183   if (tickLevel > 1) {
    184     for (double x=xFirstMinTick; x<=xMax; x += xMinTickStep)
    185       ScDrawLine(x, -xMinTickLen, x, xMinTickLen);
    186     for (double y=yFirstMinTick; y<=yMax; y += yMinTickStep)
    187       ScDrawLine(-yMinTickLen, y, yMinTickLen, y);
    188   }
    189 
    190 
    191 }
    192 
    193 void
    194 PIScDrawWdg::SetBBoxMargin(double h, double v)
    195 {
    196   bbmargeh = h;
    197   bbmargev = v;
    198 }
    199 
    200 void
    201 PIScDrawWdg::DrawBBox(int tickLevel, int tickFlags, int markLevel)
    202 {
    203 
    204   double xLow = xMin + bbmargeh;
    205   double xHig = xMax - bbmargeh;
    206   double yLow = yMin + bbmargev;
    207   double yHig = yMax - bbmargev;
    208  
    209   double extXMajTickLen = tickFlags&2 ? xMajTickLen : 0;
    210   double intXMajTickLen = tickFlags&1 ? xMajTickLen : 0;
    211   double extXMinTickLen = tickFlags&2 ? xMinTickLen : 0;
    212   double intXMinTickLen = tickFlags&1 ? xMinTickLen : 0;
    213   double extYMajTickLen = tickFlags&2 ? yMajTickLen : 0;
    214   double intYMajTickLen = tickFlags&1 ? yMajTickLen : 0;
    215   double extYMinTickLen = tickFlags&2 ? yMinTickLen : 0;
    216   double intYMinTickLen = tickFlags&1 ? yMinTickLen : 0;
    217  
    218  
    219   // Les bordures
    220  
    221   ScDrawLine(xLow, yLow, xHig, yLow);
    222   ScDrawLine(xHig, yLow, xHig, yHig);
    223   ScDrawLine(xHig, yHig, xLow, yHig);
    224   ScDrawLine(xLow, yHig, xLow, yLow);
    225  
    226   // Les ticks majeurs
    227  
    228   if (tickLevel > 0) {
    229     for (double x=xFirstMajTick; x<=xHig; x += xMajTickStep) {
    230       ScDrawLine(x, yLow - extXMajTickLen, x, yLow + intXMajTickLen);
    231       ScDrawLine(x, yHig + extXMajTickLen, x, yHig + intXMajTickLen);
    232     }
    233     for (double y=yFirstMajTick; y<=yHig; y += yMajTickStep) {
    234       ScDrawLine(xLow - extYMajTickLen, y, xLow + intYMajTickLen, y);
    235       ScDrawLine(xHig + extYMajTickLen, y, xHig - intYMajTickLen, y);
    236     }
    237   }
    238  
    239 
    240   // Les ticks mineurs
    241  
    242   if (tickLevel > 1) {
    243     for (double x=xFirstMinTick; x<=xHig; x += xMinTickStep) {
    244       ScDrawLine(x, yLow - extXMinTickLen, x, yLow + intXMinTickLen);
    245       ScDrawLine(x, yHig + extXMinTickLen, x, yHig + intXMinTickLen);
    246     }
    247     for (double y=yFirstMinTick; y<=yHig; y += yMinTickStep) {
    248       ScDrawLine(xLow - extYMinTickLen, y, xLow + intYMinTickLen, y);
    249       ScDrawLine(xHig + extYMinTickLen, y, xHig - intYMinTickLen, y);
    250     }
    251   }
    252  
    253   // Les labels
    254   if (markLevel > 0) {
    255     for (double x=xFirstMajTick; x<=xHig; x += xMajTickStep) {
     267PIScDrawWdg::DrawHTicks(double y, double tickUp, double tickDown, double xBeg, double xStep)
     268{
     269  for (double x=xBeg; x<=xMax; x += xStep)
     270    ScDrawLine(x, y-tickDown, x, y+tickUp);
     271}
     272
     273void
     274PIScDrawWdg::DrawVTicks(double x, double tickLeft, double tickRight, double yBeg, double yStep)
     275{
     276  for (double y=yBeg; y<=yMax; y += yStep)
     277    ScDrawLine(x-tickLeft, y, x+tickRight, y);
     278}
     279
     280void
     281PIScDrawWdg::DrawHLabels(double y, double xBeg, double xStep, int just)
     282{
     283  double xOffset = 0;
     284 
     285  ScSelFontSz(xMajTickLen*4);
     286  for (double x=xBeg; x<=xMax; x += xStep) {
    256287      char label[20]; sprintf(label, "%-6g", x);
    257       ScDrawString(x, yLow - 8 * xMajTickLen, label);
    258       ScDrawString(x, yHig + 2 * xMajTickLen, label);
    259     }
    260     for (double y=yFirstMajTick; y<=yHig; y += yMajTickStep) {
     288      double largeur = ScStringWidth(label);
     289      if (just == 1)
     290        xOffset = -largeur;
     291      else if (just == 0)
     292        xOffset = -largeur/2;
     293      else
     294        xOffset = 0;
     295      ScDrawString(x+xOffset, y, label);
     296  }
     297}
     298
     299void
     300PIScDrawWdg::DrawVLabels(double x, double yBeg, double yStep, int just)
     301{
     302  double xOffset = 0;
     303  ScSelFontSz(xMajTickLen*4);
     304  for (double y=yBeg; y<=yMax; y += yStep) {
    261305      char label[20]; sprintf(label, "%-6g", y);
    262       ScDrawString(xLow - 8 * yMajTickLen, y, label);
    263       ScDrawString(xHig + 2 * yMajTickLen, y, label);
    264     }
    265   }
    266 }
     306      double largeur = ScStringWidth(label);
     307      if (just == 1)
     308        xOffset = -largeur;
     309      else if (just == 0)
     310        xOffset = -largeur/2;
     311      else
     312        xOffset = 0;
     313      ScDrawString(x+xOffset, y, label);
     314  }
     315}
     316
     317
     318void
     319PIScDrawWdg::DrawAxes(int flags)
     320{
     321  NoClip();
     322  if (flags == -1)
     323    flags = axesFlags;
     324   
     325 
     326  if (flags & kStdAxes) {
     327 
     328    // Les axes
     329   
     330    ScDrawLine(xMin, 0, xMax, 0);
     331    ScDrawLine(0, yMin, 0, yMax);
     332 
     333    // Les ticks majeurs
     334 
     335    if (flags & kMajTicks) {
     336        DrawHTicks(0, xMajTickLen, xMajTickLen, xFirstMajTick, xMajTickStep);
     337        DrawVTicks(0, yMajTickLen, yMajTickLen, yFirstMajTick, yMajTickStep);
     338    }
     339   
     340    // Les ticks mineurs
     341 
     342    if (flags & kMinTicks) {
     343        DrawHTicks(0, xMinTickLen, xMinTickLen, xFirstMinTick, xMinTickStep);
     344        DrawVTicks(0, yMinTickLen, yMinTickLen, yFirstMinTick, yMinTickStep);
     345    }
     346   
     347    // Les labels
     348   
     349    if (flags & kLabels) {
     350        DrawHLabels(-xMajTickLen*8, xFirstMajTick, xMajTickStep,0);
     351        DrawVLabels(-yMajTickLen*2, yFirstMajTick, yMajTickStep,1);
     352    }
     353   
     354  }
     355 
     356  if (flags & kBoxAxes) {
     357 
     358    // La boite
     359   
     360    ScDrawLine(xMin, yMin, xMax, yMin);
     361    ScDrawLine(xMax, yMin, xMax, yMax);
     362    ScDrawLine(xMax, yMax, xMin, yMax);
     363    ScDrawLine(xMin, yMax, xMin, yMin);
     364
     365    // Longueur des ticks
     366   
     367    double extXMajTickLen = flags&kExtTicks ? xMajTickLen : 0;
     368    double intXMajTickLen = flags&kIntTicks ? xMajTickLen : 0;
     369    double extXMinTickLen = flags&kExtTicks ? xMinTickLen : 0;
     370    double intXMinTickLen = flags&kIntTicks ? xMinTickLen : 0;
     371    double extYMajTickLen = flags&kExtTicks ? yMajTickLen : 0;
     372    double intYMajTickLen = flags&kIntTicks ? yMajTickLen : 0;
     373    double extYMinTickLen = flags&kExtTicks ? yMinTickLen : 0;
     374    double intYMinTickLen = flags&kIntTicks ? yMinTickLen : 0;
     375
     376    // Les ticks majeurs
     377 
     378    if (flags & kMajTicks) {
     379        DrawHTicks(yMin, intXMajTickLen, extXMajTickLen, xFirstMajTick, xMajTickStep);
     380        DrawHTicks(yMax, extXMajTickLen, intXMajTickLen, xFirstMajTick, xMajTickStep);
     381        DrawVTicks(xMin, extYMajTickLen, intYMajTickLen, yFirstMajTick, yMajTickStep);
     382        DrawVTicks(xMax, intYMajTickLen, extYMajTickLen, yFirstMajTick, yMajTickStep);
     383    }
     384   
     385    // Les ticks mineurs
     386 
     387    if (flags & kMinTicks) {
     388        DrawHTicks(yMin, intXMinTickLen, extXMinTickLen, xFirstMinTick, xMinTickStep);
     389        DrawHTicks(yMax, extXMinTickLen, intXMinTickLen, xFirstMinTick, xMinTickStep);
     390        DrawVTicks(xMin, extYMinTickLen, intYMinTickLen, yFirstMinTick, yMinTickStep);
     391        DrawVTicks(xMax, intYMinTickLen, extYMinTickLen, yFirstMinTick, yMinTickStep);
     392    }
     393
     394
     395    // Les labels
     396   
     397    if (flags & kLabels) {
     398        DrawHLabels(yMin-xMajTickLen*8, xFirstMajTick, xMajTickStep,0);
     399        DrawHLabels(yMax+xMajTickLen*2, xFirstMajTick, xMajTickStep,0);
     400        DrawVLabels(xMin-yMajTickLen*2, yFirstMajTick, yMajTickStep,1);
     401        DrawVLabels(xMax+yMajTickLen*2, yFirstMajTick, yMajTickStep,-1);
     402    }
     403  }
     404  Clip();
     405}
     406
     407 
    267408
    268409void
     
    302443
    303444void
    304 PIScDrawWdg::SetAxesKind(int axesKind, int tickLevel, int markLevel)
    305 {
    306   axesChoice  = axesKind;
    307   tickChoice  = tickLevel;
    308   labelChoice = markLevel;
     445PIScDrawWdg::SetAxesFlags(int flags)
     446{
     447  axesFlags = flags;
     448  if (axesFlags & (kIntTicks | kExtTicks | kMajTicks | kMinTicks))
     449    axesFlags |= kTicks;
     450  if ((axesFlags & (kTicks | kIntTicks | kExtTicks)) == kTicks)
     451    axesFlags |= kIntTicks | kExtTicks;
     452  if ((axesFlags & (kTicks | kMajTicks | kMinTicks)) == kTicks)
     453    axesFlags |= kMajTicks;
    309454}
    310455
     
    313458{
    314459  EraseWindow();
    315   if (axesChoice == 1)
    316     DrawAxes(tickChoice, labelChoice);
    317   else if (axesChoice == 2)
    318     DrawBBox(tickChoice, labelChoice);
     460  DrawAxes();
    319461  CallDrawers();
     462  DrawSelf();
    320463}
    321464
     
    329472  xEndDrag = xBegDrag = x;
    330473  yEndDrag = yBegDrag = y;
    331   PIBeep();
    332474}
    333475
     
    429571PIScGFFDrawer::PIScGFFDrawer(GeneralFitFunction* f)
    430572: mFunc(f), mNParms(f->NPar()), mParms(new double[mNParms])
    431 {}
     573{
     574  ASSERT(f->NVar() == 1);
     575}
    432576
    433577PIScGFFDrawer::~PIScGFFDrawer()
     
    437581
    438582void
    439 PIScGFFDrawer::SetParms(double const*)
    440 {}
     583PIScGFFDrawer::SetParms(double const* p)
     584{
     585  for (int i=0; i<mNParms; i++)
     586    mParms[i] = p[i];
     587}
    441588
    442589
     
    444591PIScGFFDrawer::Draw()
    445592{
    446 }
    447 
     593  if (!mDrawWdg) return;
     594  double xMax = mDrawWdg->XMax();
     595  double xMin = mDrawWdg->XMin();
     596  double yMax = mDrawWdg->YMax();
     597  double yMin = mDrawWdg->YMin();
     598  double xStep = (xMax - xMin)/100;
     599  double xOld = xMin;
     600  double yOld = 0;
     601//  double yOld = f->Value(&xMin, mParms);
     602  for (double x = xMin+xStep; x<xMax; x+=xStep) {
     603   double y = 0; // $CHECK$
     604//    double y = f->Value(&x, mParms);
     605    if (y>yMin && yOld>yMin &&
     606        y<yMax && yOld<yMax)
     607           mDrawWdg->ScDrawLine(xOld, yOld, x, y);
     608    xOld = x;
     609    yOld = y;
     610  }
     611}
     612
  • trunk/SophyaPI/PI/piscdrawwdg.h

    r8 r9  
    77
    88#include <list.h>
     9
     10  enum {
     11    kStdAxes     = 0x0001,
     12    kBoxAxes     = 0x0002,
     13    kTicks       = 0x0004,
     14    kIntTicks    = 0x0010,
     15    kExtTicks    = 0x0020,
     16    kMajTicks    = 0x0040,
     17    kMinTicks    = 0x0080,
     18    kLabels      = 0x1000,
     19    kAxesDflt    = kStdAxes | kTicks | kLabels
     20  };
     21
    922
    1023class PIScDrawWdg : public PIBaseWdg {
     
    2235  virtual void       ScDrawCircle(double x0, double y0, double r);
    2336  virtual void       ScDrawFCircle(double x0, double y0, double r);
     37  virtual double     ScStringWidth(char const*);
     38  virtual void       ScSelFontSz(double size, PIFontAtt att=PI_RomanFont);
    2439
    25   virtual void       DrawAxes(int tickLevel=1, int markLevel=1);
    26   virtual void       DrawBBox(int tickLevel=1, int tickFlags=3, int markLevel=1);
    27   virtual void       SetBBoxMargin(double h, double v);
     40  virtual void       DrawAxes(int flags = -1);
     41  virtual void       DrawSelf() {}
    2842 
    2943  virtual void       Resize();
     
    4458  static  void       CallDrawer(PIScDrawer*);
    4559  virtual void       CallDrawers();
    46   virtual void       SetAxesKind(int axesChoice=1, int tickLevel=1, int markLevel=1);
     60  virtual void       SetAxesFlags(int flags=kAxesDflt);
    4761 
    4862  double XMin() const {return xMin;}
     
    5266  int    LimitsFixed() const {return limitsFixed;}
    5367  void   FreeLimits() {limitsFixed = 0;}
     68  void   NoClip() {clip = false;}
     69  void   Clip() {clip = true;}
    5470 
    5571 
     
    7187 
    7288  int limitsFixed;
    73   int axesChoice, tickChoice, labelChoice;
    74   double bbmargeh, bbmargev;
     89  int axesFlags;
    7590  list<PIScDrawer*>   mDrawers;
    7691 
    7792  int xBegDrag, yBegDrag;
    7893  int xEndDrag, yEndDrag;
     94 
     95  bool clip;
     96 
     97private:
     98  void DrawHTicks(double y, double tickUp, double tickDown, double xBeg, double xStep);
     99  void DrawVTicks(double x, double tickLeft, double tickRight, double yBeg, double yStep);
     100  void DrawHLabels(double y, double xBeg, double xStep, int just=0);
     101  void DrawVLabels(double x, double yBeg, double yStep, int just=0);
    79102};
    80103
  • trunk/SophyaPI/PI/pistdwdgmac.cc

    r2 r9  
    2323
    2424PIButtonMac::PIButtonMac(PIContainerGen *par, char *nom, long msg,
    25                          int sx, int sy, int px, int py)
    26 : PIButtonGen(par, nom, msg, sx, sy, px, py)
     25                         int sx, int sy, int px, int py, PIBtnSign bsgn)
     26: PIButtonGen(par, nom, msg, sx, sy, px, py, bsgn)
    2727{
    2828  delete mPane;
  • trunk/SophyaPI/PI/pistdwdgmac.h

    r2 r9  
    1717public:
    1818                     PIButtonMac(PIContainerGen *par, char *nom, long msg = PIMsg_Click,
    19                                   int sx=10, int sy=10, int px=0, int py=0);
     19                                 int sx=10, int sy=10, int px=0, int py=0,
     20                                 PIBtnSign bsgn = PIBtn_Label);
    2021  virtual           ~PIButtonMac();
    2122  virtual void       ListenToMessage(MessageT inMessage, void *ioParam);
  • trunk/SophyaPI/PI/piupdattachment.cc

    r2 r9  
    66PIUpdAttachment* PIUpdAttachment::lastCursPane = NULL;
    77bool PIUpdAttachment::hit = false;
    8 bool PIUpdAttachment::down = false;
     8int PIUpdAttachment::down = 0;
    99
    1010PIUpdAttachment::PIUpdAttachment(PIBaseWdgMac* wdg)
     
    1212{
    1313
     14}
     15
     16PIUpdAttachment::~PIUpdAttachment()
     17{
     18  SysBeep(1);
    1419}
    1520
     
    2833        break;
    2934      case msg_Click: {
    30         down = true;
    3135        SMouseDownEvent* evt = (SMouseDownEvent*) data;
    3236        EventModifiers mod = evt->macEvent.modifiers;
    3337        if ((mod & cmdKey) && (mod & optionKey))
    34           myWdg->But3Press(evt->whereLocal.h,evt->whereLocal.v);
     38          { myWdg->But3Press(evt->whereLocal.h,evt->whereLocal.v); down = 3;}
    3539        else if (mod & cmdKey)
    36           myWdg->But2Press(evt->whereLocal.h,evt->whereLocal.v);
     40          { myWdg->But2Press(evt->whereLocal.h,evt->whereLocal.v); down = 2;}
    3741        else
    38           myWdg->But1Press(evt->whereLocal.h,evt->whereLocal.v);
     42          { myWdg->But1Press(evt->whereLocal.h,evt->whereLocal.v); down = 1;}
    3943                break;
    4044                }
     
    6367            SetExecuteHost(!myWdg->AdjustCursor());
    6468            // Est-ce un move, i.e. le bouton est-il toujours appuye depuis le dernier MouseDown ?
    65             if (::StillDown()) {
    66               down = true;
     69            if (::StillDown() && down) {
    6770              Point pt = evt->where;
    6871              myWdg->mPane->GlobalToPortPoint(pt);
     
    7982          }
    8083            } else if (down) {  // A changer le jour ou les attachements recoivent les mouseup.
    81               down = false;
    8284              Point pt = evt->where;
    8385              myWdg->mPane->GlobalToPortPoint(pt);
    8486              myWdg->mPane->PortToLocalPoint(pt);
    8587          EventModifiers mod = evt->modifiers;
    86           if ((mod & cmdKey) && (mod & optionKey))
     88          //if ((mod & cmdKey) && (mod & optionKey))
     89          if (down == 3)
    8790            myWdg->But3Release(pt.h,pt.v);
    88           else if (mod & cmdKey)
     91          //else if (mod & cmdKey)
     92          else if (down == 2)
    8993            myWdg->But2Release(pt.h,pt.v);
    9094          else
    9195            myWdg->But1Release(pt.h,pt.v);
     96              down = 0;
    9297        }
    9398            break;
  • trunk/SophyaPI/PI/piupdattachment.h

    r2 r9  
    77public:
    88  PIUpdAttachment(PIBaseWdgMac* wdg);
     9  ~PIUpdAttachment();
    910 
    1011protected:
     
    1819 static PIUpdAttachment* lastCursPane;
    1920 static bool hit;
    20  static bool down;
     21 static int down;
    2122 Point lastPt;
    2223};
     24
  • trunk/SophyaPI/PI/piwdgmac.cc

    r2 r9  
    77#include <LString.h>
    88
    9 
     9void PIBeep()
     10{
     11  ::SysBeep(1);
     12}
    1013
    1114
  • trunk/SophyaPI/PI/piwdgmac.h

    r2 r9  
    1919  virtual void           SetSize(int sx, int sy);
    2020  virtual void           SetPos(int px, int py);
     21  virtual void           SetBorderWidth(int /*bw*/) {}
    2122  virtual void           SetBinding(bool left, bool top, bool right, bool bottom);
    2223  virtual int            XSize();
  • trunk/SophyaPI/PI/piwindowmac.cc

    r2 r9  
    1414                                    windAttr_TitleBar |
    1515                                    windAttr_SizeBox |
     16                                    windAttr_CloseBox |
    1617                                    windAttr_Resizable;
    1718          mWindowInfo.layer = windLayer_Regular;
  • trunk/SophyaPI/PI/sc_sample.cc

    r8 r9  
    1818ScSample::Draw()
    1919{
    20   DrawAxes(1,0);
     20  DrawAxes();
    2121  PlotFunc(f);
    2222}
  • trunk/SophyaPI/PI/so_locations

    r8 r9  
    1 libPeidaInter.so \
    2                 :st = .text 0x000003ffbffe0000, 0x0000000000020000:\
     1piup.so \
     2                :st = .text 0x000003ffbfff0000, 0x0000000000010000:\
    33                :st = .data 0x000003ffffff0000, 0x0000000000010000:\
    44
    5 libPI.so \
    6                 :st = .text 0x000003ffbffb0000, 0x0000000000030000:\
     5piup_def.so \
     6                :st = .text 0x000003ffbffe0000, 0x0000000000010000:\
    77                :st = .data 0x000003fffffe0000, 0x0000000000010000:\
    88
     9user.so \
     10                :st = .text 0x000003ffbffd0000, 0x0000000000010000:\
     11                :st = .data 0x000003fffffd0000, 0x0000000000010000:\
     12
Note: See TracChangeset for help on using the changeset viewer.