Changeset 34 in Sophya


Ignore:
Timestamp:
Jan 22, 1997, 4:28:10 PM (29 years ago)
Author:
aubourg
Message:

Version Saclay 210197

Location:
trunk/SophyaPI/PI
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaPI/PI/piapplmac.cc

    r2 r34  
    5555        macAppli = new PIPPApplMac;
    5656        macAppli->AddAttachment(new PISIOUXAttachment);
    57         new PIPPMenuBar();
    5857       
    5958    menubar = new PIMenubar(this, "DefMenubar");
    6059    topcont = new PIWindowMac(this, "TopLevel", PIWindowKind(2), sx, sy, 10, 45);
    6160}
     61
    6262
    6363PIApplicationMac::~PIApplicationMac()
  • trunk/SophyaPI/PI/picmapmac.cc

    r2 r34  
    4949}
    5050
     51/* --Methode-- */
     52PIColor PIColorMapMac::GetColor(int n)
     53{
     54PIColor picr;
     55picr.red = picr.green = picr.blue = 0;
     56
     57if ((n<0) || (n >= NCol()))   
     58  return(picr);
     59
     60ColorSpec& sp = (**mCTab).ctTable[n+2];
     61picr.red   = sp.rgb.red;
     62picr.green = sp.rgb.green;
     63picr.blue  = sp.rgb.blue;
     64
     65return(picr);
     66}
     67
    5168void PIColorMapMac::AllocColor(PIColor const& col, int index)
    5269{
  • trunk/SophyaPI/PI/picmapmac.h

    r2 r34  
    1212  PIColorMapMac(CMapId);
    1313  PIColorMapMac(string const& nom, int nCol);
     14  virtual PIColor GetColor(int n);
    1415  virtual void AllocColor(PIColor const& col, int index);
    1516  virtual void FreeColors();
  • trunk/SophyaPI/PI/piimage.cc

    r23 r34  
    306306void PIImage::Draw(int x0, int y0, int dx, int dy)
    307307{
    308 PIPixmap::Draw(x0, y0, dx, dy);
     308PIPixmapGen::Draw(x0, y0, dx, dy);
    309309winovis = false;    // $CHECK$ Reza A enlever si possible 17/6/96
    310310if (curshow)
     
    637637
    638638if ((xcurs>=0) && (ycurs>=0))
    639   PIPixmap::Draw(xcurs-CURSHSIZE, ycurs-CURSHSIZE, CURSHSIZE*2, CURSHSIZE*2);
     639  PIPixmapGen::Draw(xcurs-CURSHSIZE, ycurs-CURSHSIZE, CURSHSIZE*2, CURSHSIZE*2);
    640640
    641641if ((xc >= 0) && (yc >= 0))
  • trunk/SophyaPI/PI/pimenubarmac.cc

    r2 r34  
    1212PIMenubarMac::AppendMenu(PIPDMenu *pdm)
    1313{
    14   LMenuBar::GetCurrentMenuBar()->InstallMenu(pdm->macMenu, 0);
     14  LMenuBar::GetCurrentMenuBar()->InstallMenu(pdm->macMenu, InstallMenu_AtEnd);
    1515}
  • trunk/SophyaPI/PI/pippapplmac.cc

    r9 r34  
    11#include "pippapplmac.h"
    22#include "piupdattachment.h"
     3#include "pippmenubar.h"
    34
    45PIPPApplMac::PIPPApplMac()
     
    2223}
    2324
     25void
     26PIPPApplMac::MakeMenuBar()
     27{
     28        new PIPPMenuBar();
     29}
     30
     31
    2432
    2533// $CHECK$
  • trunk/SophyaPI/PI/pippapplmac.h

    r2 r34  
    66        virtual                         ~PIPPApplMac();
    77
     8        void MakeMenuBar();
    89        virtual void                    AdjustCursor    (const EventRecord &inMacEvent);
    910};
  • trunk/SophyaPI/PI/pistdwdgmac.cc

    r23 r34  
    7373}
    7474
     75/* --Methode-- */
     76void PITextMac::SetMutiLineMode(bool mlm)
     77{
     78return;
     79}
     80
     81/* --Methode-- */
     82void PITextMac::SetTextEditable(bool te)
     83{
     84if (te)
     85  { mPane->Enable(); }
     86else
     87  { mPane->Disable(); }
     88return;
     89}
     90
    7591/************* PIScaleMac ************/
    7692static ControlActionUPP sSBarAction = nil;
     
    7894
    7995PIScaleMac::PIScaleMac(PIContainerGen* par, char* nom, PIMessage msg,
    80                        int min, int max, int sx, int sy, int px, int py)
    81 : PIScaleGen(par, nom, msg, min, max, sx, sy, px, py)
    82 {
    83   delete mPane;
    84   LStr255 titre(nom);
    85   mPane = new LStdControl(mPaneInfo, msg_Click, min, min, max,
     96                       bool horiz, int sx, int sy, int px, int py)
     97: PIScaleGen(par, nom, msg, horiz, sx, sy, px, py)
     98{
     99  delete mPane;
     100  LStr255 titre(nom);
     101  mPane = new LStdControl(mPaneInfo, msg_Click, 1, 1, 10,
    86102                                                  scrollBarProc, 0, titre, (Int32) this);
    87103  ((LStdControl*)mPane)->AddListener(this);
  • trunk/SophyaPI/PI/pistdwdgmac.h

    r23 r34  
    2121  virtual           ~PIButtonMac();
    2222  virtual void       ListenToMessage(MessageT inMessage, void *ioParam);
     23  virtual void       ActivatePress(bool=false) {}
    2324};
    2425
     
    2930                               int sx=10, int sy=10, int px=0, int py=0);
    3031  virtual           ~PITextMac();
     32
     33  virtual void       SetMutiLineMode(bool mlm=false);
     34  virtual void       SetTextEditable(bool te=true);
     35
    3136  virtual void       SetText(string const&);
    3237  virtual string     GetText() const;
     
    3641{
    3742public:
    38                      PIScaleMac(PIContainerGen* par, char* nom, PIMessage msg=PIMsg_Click,
    39                                 int min=0, int max=10, int sx=100, int sy=10, int px=0, int py=0);
     43                     PIScaleMac(PIContainerGen* par, char* nom,
     44                                PIMessage msg=PIMsg_DataChanged, bool horiz=true,
     45                                int sx=100, int sy=10, int px=0, int py=0);
    4046                    ~PIScaleMac();
    4147
  • trunk/SophyaPI/PI/psdict.cc

    r33 r34  
    4141/F%-2d  {/Times-Bold    findfont} bind def       %% PI_BoldFont\n\
    4242/F%-2d  {/Times-Italic  findfont} bind def       %% PI_ItalicFont\n\
    43 /F%-2d  {}
     43/F%-2d  {}\
    4444                        bind def       %% PI_NotDefFontAtt\n\
    45 /FS {scalefont setfont} bind def
     45/FS {scalefont setfont} bind def\n\
    4646%%/FS%-2d {8  scalefont setfont} bind def          %% PI_SmallSizeFont\n\
    4747%%/FS%-2d {12 scalefont setfont} bind def          %% PI_NormalSizeFont\n\
     
    7272$BlocEnteredState restore} bind def\n\
    7373\
    74 %% Trace
     74%% Trace\
    7575/n  {newpath} bind def    /c  {closepath} bind def\n\
    7676/gs {gsave}  bind def     /gr {grestore} bind def\n\
    7777/m  {moveto} bind def     /l  {lineto} bind def\n\
    7878/s  {stroke} bind def     /f  {fill}   bind def\n\
    79 /sc {scale}  bind def     /S  {gs 1 -1 sc show gr} bind def
     79/sc {scale}  bind def     /S  {gs 1 -1 sc show gr} bind def \n\
    8080/slw {setlinewidth} bind def\n\
    8181/ff {findfont} bind def   /sf {setfont} bind def /scf {scalefont} bind def\n\
    8282/rl {rlineto} bind def    /tr {translate} bind def\n\
    83 %% Tx Ty X0 Y0 box
     83%% Tx Ty X0 Y0 box\n\
    8484/box {tr 0 3 1 roll neg exch 0 0 3 index neg 0 0 m rl rl rl c} bind def\n\
    85 %% R X0 Y0 circle
     85%% R X0 Y0 circle\n\
    8686/circle {tr dup 0 m 0 0 3 -1 roll 0 380 arc} bind def\n\
    8787%% DrawEllipse pompee sur transfig\n\
     
    116116      array cvx dup 3 -1 roll 0 exch putinterval dup 4 2 roll\n\
    117117      putinterval } bind def\n\
    118     /colorimage {
     118    /colorimage {\n\
    119119      pop pop     %% remove 'false 3' operands\n\
    120120      {colortogray} mergeprocs image} bind def\n\
  • trunk/SophyaPI/PI/psfile.cc

    r32 r34  
    2525 *
    2626 */
    27 PSFile::PSFile (char *FileName = NULL, float Tx = 0, float Ty = 0,
    28                 float Dx = 0, float Dy = 0) {
     27PSFile::PSFile (char *FileName = NULL, float Tx, float Ty,
     28                float Dx, float Dy) {
    2929
    3030  //    extern int FileEmpty;
     
    406406
    407407void  PSFile::DrawString  (float x,  float y, char *s,
    408                    PIColors DrawColor  = PI_NotDefColor,
    409                    PIFontAtt FontAtt   = PI_NotDefFontAtt,
    410                    int FontSize        = 8) {
     408                   PIColors DrawColor,
     409                   PIFontAtt FontAtt,
     410                   int FontSize) {
    411411    extern int BlocEmpty;
    412412    extern int PageEmpty;
     
    424424        change = 1;}
    425425    if ( (FontSize != PI_NotDefFontSize) || (FontSize != mFontSize) ) {
    426         mFontSize = FontSize;
     426        mFontSize = (PIFontSize) FontSize;  // $CHECK$ EA ajoute le cast un peu au pif
    427427        change = 1;}
    428428    if (change)
     
    437437
    438438void  PSFile::DrawLine    (float x1, float y1, float x2, float y2,
    439                    PIColors DrawColor  = PI_NotDefColor,
    440                    PILineAtt LineAtt   = PI_NotDefLineAtt) {
     439                   PIColors DrawColor,
     440                   PILineAtt LineAtt) {
    441441    extern int BlocEmpty;
    442442    extern int PageEmpty;
     
    464464
    465465void  PSFile::DrawBox     (float x0, float y0, float Tx, float Ty,
    466                    PIColors  DrawColor = PI_NotDefColor,
    467                    PILineAtt LineAtt   = PI_NotDefLineAtt) {
     466                   PIColors  DrawColor,
     467                   PILineAtt LineAtt) {
    468468    extern int BlocEmpty;
    469469    extern int PageEmpty;
     
    491491
    492492void  PSFile::DrawFBox    (float x0, float y0, float Tx, float Ty,
    493                    PIColors DrawColor  = PI_NotDefColor,
    494                    PIColors FillColor  = PI_NotDefColor,
    495                    PILineAtt LineAtt   = PI_NotDefLineAtt) {
     493                   PIColors DrawColor,
     494                   PIColors FillColor,
     495                   PILineAtt LineAtt) {
    496496    extern int BlocEmpty;
    497497    extern int PageEmpty;
     
    524524
    525525void  PSFile::DrawCircle  (float x0, float y0, float r,
    526                    PIColors DrawColor  = PI_NotDefColor,
    527                    PILineAtt LineAtt   = PI_NotDefLineAtt) {
     526                   PIColors DrawColor,
     527                   PILineAtt LineAtt) {
    528528    extern int BlocEmpty;
    529529    extern int PageEmpty;
     
    550550
    551551void  PSFile::DrawFCircle (float x0, float y0, float r,
    552                    PIColors DrawColor  = PI_NotDefColor,
    553                    PIColors FillColor  = PI_NotDefColor,
    554                    PILineAtt LineAtt   = PI_NotDefLineAtt) {
     552                   PIColors DrawColor,
     553                   PIColors FillColor,
     554                   PILineAtt LineAtt) {
    555555    extern int BlocEmpty;
    556556    extern int PageEmpty;
     
    581581
    582582void  PSFile::DrawPolygon (float *x, float *y, int n,
    583                    PIColors DrawColor  = PI_NotDefColor,
    584                    PILineAtt LineAtt   = PI_NotDefLineAtt) {
     583                   PIColors DrawColor,
     584                   PILineAtt LineAtt) {
    585585    extern int BlocEmpty;
    586586    extern int PageEmpty;
     
    608608
    609609void  PSFile::DrawFPolygon(float *x, float *y, int n,
    610                    PIColors DrawColor  = PI_NotDefColor,
    611                    PIColors FillColor  = PI_NotDefColor,
    612                    PILineAtt LineAtt   = PI_NotDefLineAtt) {
     610                   PIColors DrawColor,
     611                   PIColors FillColor,
     612                   PILineAtt LineAtt) {
    613613
    614614    extern int BlocEmpty;
     
    642642
    643643void  PSFile::DrawMarker  (float x0, float y0,
    644                    PIMarker MrkType    = PI_NotDefMarker,   
    645                    PIColors DrawColor  = PI_NotDefColor) {
     644                   PIMarker MrkType,   
     645                   PIColors DrawColor) {
    646646    extern int BlocEmpty;
    647647    extern int PageEmpty;
     
    667667
    668668void  PSFile::DrawMarkers (float *x0, float *y0, int n,
    669                    PIMarker MrkType    = PI_NotDefMarker,
    670                    PIColors DrawColor  = PI_NotDefColor) {
     669                   PIMarker MrkType,
     670                   PIColors DrawColor) {
    671671    extern int BlocEmpty;
    672672    extern int PageEmpty;
  • trunk/SophyaPI/PI/psfile.h

    r32 r34  
    1717#include <stdio.h>
    1818#include <stdlib.h>
     19#include "defs.h"
     20#ifdef __mac__
     21#include <stat.h>
     22#endif
    1923#include "pisysdep.h"
    2024
     
    5559    int  Tx;     /* En 1/72e de pouce  !!  */
    5660    int  Ty;     /* unite naturelle de ps  */
    57 } Media;
     61} PIMedia;
    5862
    5963
Note: See TracChangeset for help on using the changeset viewer.