Changeset 34 in Sophya
- Timestamp:
- Jan 22, 1997, 4:28:10 PM (29 years ago)
- Location:
- trunk/SophyaPI/PI
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaPI/PI/piapplmac.cc
r2 r34 55 55 macAppli = new PIPPApplMac; 56 56 macAppli->AddAttachment(new PISIOUXAttachment); 57 new PIPPMenuBar();58 57 59 58 menubar = new PIMenubar(this, "DefMenubar"); 60 59 topcont = new PIWindowMac(this, "TopLevel", PIWindowKind(2), sx, sy, 10, 45); 61 60 } 61 62 62 63 63 PIApplicationMac::~PIApplicationMac() -
trunk/SophyaPI/PI/picmapmac.cc
r2 r34 49 49 } 50 50 51 /* --Methode-- */ 52 PIColor PIColorMapMac::GetColor(int n) 53 { 54 PIColor picr; 55 picr.red = picr.green = picr.blue = 0; 56 57 if ((n<0) || (n >= NCol())) 58 return(picr); 59 60 ColorSpec& sp = (**mCTab).ctTable[n+2]; 61 picr.red = sp.rgb.red; 62 picr.green = sp.rgb.green; 63 picr.blue = sp.rgb.blue; 64 65 return(picr); 66 } 67 51 68 void PIColorMapMac::AllocColor(PIColor const& col, int index) 52 69 { -
trunk/SophyaPI/PI/picmapmac.h
r2 r34 12 12 PIColorMapMac(CMapId); 13 13 PIColorMapMac(string const& nom, int nCol); 14 virtual PIColor GetColor(int n); 14 15 virtual void AllocColor(PIColor const& col, int index); 15 16 virtual void FreeColors(); -
trunk/SophyaPI/PI/piimage.cc
r23 r34 306 306 void PIImage::Draw(int x0, int y0, int dx, int dy) 307 307 { 308 PIPixmap ::Draw(x0, y0, dx, dy);308 PIPixmapGen::Draw(x0, y0, dx, dy); 309 309 winovis = false; // $CHECK$ Reza A enlever si possible 17/6/96 310 310 if (curshow) … … 637 637 638 638 if ((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); 640 640 641 641 if ((xc >= 0) && (yc >= 0)) -
trunk/SophyaPI/PI/pimenubarmac.cc
r2 r34 12 12 PIMenubarMac::AppendMenu(PIPDMenu *pdm) 13 13 { 14 LMenuBar::GetCurrentMenuBar()->InstallMenu(pdm->macMenu, 0);14 LMenuBar::GetCurrentMenuBar()->InstallMenu(pdm->macMenu, InstallMenu_AtEnd); 15 15 } -
trunk/SophyaPI/PI/pippapplmac.cc
r9 r34 1 1 #include "pippapplmac.h" 2 2 #include "piupdattachment.h" 3 #include "pippmenubar.h" 3 4 4 5 PIPPApplMac::PIPPApplMac() … … 22 23 } 23 24 25 void 26 PIPPApplMac::MakeMenuBar() 27 { 28 new PIPPMenuBar(); 29 } 30 31 24 32 25 33 // $CHECK$ -
trunk/SophyaPI/PI/pippapplmac.h
r2 r34 6 6 virtual ~PIPPApplMac(); 7 7 8 void MakeMenuBar(); 8 9 virtual void AdjustCursor (const EventRecord &inMacEvent); 9 10 }; -
trunk/SophyaPI/PI/pistdwdgmac.cc
r23 r34 73 73 } 74 74 75 /* --Methode-- */ 76 void PITextMac::SetMutiLineMode(bool mlm) 77 { 78 return; 79 } 80 81 /* --Methode-- */ 82 void PITextMac::SetTextEditable(bool te) 83 { 84 if (te) 85 { mPane->Enable(); } 86 else 87 { mPane->Disable(); } 88 return; 89 } 90 75 91 /************* PIScaleMac ************/ 76 92 static ControlActionUPP sSBarAction = nil; … … 78 94 79 95 PIScaleMac::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, 86 102 scrollBarProc, 0, titre, (Int32) this); 87 103 ((LStdControl*)mPane)->AddListener(this); -
trunk/SophyaPI/PI/pistdwdgmac.h
r23 r34 21 21 virtual ~PIButtonMac(); 22 22 virtual void ListenToMessage(MessageT inMessage, void *ioParam); 23 virtual void ActivatePress(bool=false) {} 23 24 }; 24 25 … … 29 30 int sx=10, int sy=10, int px=0, int py=0); 30 31 virtual ~PITextMac(); 32 33 virtual void SetMutiLineMode(bool mlm=false); 34 virtual void SetTextEditable(bool te=true); 35 31 36 virtual void SetText(string const&); 32 37 virtual string GetText() const; … … 36 41 { 37 42 public: 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); 40 46 ~PIScaleMac(); 41 47 -
trunk/SophyaPI/PI/psdict.cc
r33 r34 41 41 /F%-2d {/Times-Bold findfont} bind def %% PI_BoldFont\n\ 42 42 /F%-2d {/Times-Italic findfont} bind def %% PI_ItalicFont\n\ 43 /F%-2d {} 43 /F%-2d {}\ 44 44 bind def %% PI_NotDefFontAtt\n\ 45 /FS {scalefont setfont} bind def 45 /FS {scalefont setfont} bind def\n\ 46 46 %%/FS%-2d {8 scalefont setfont} bind def %% PI_SmallSizeFont\n\ 47 47 %%/FS%-2d {12 scalefont setfont} bind def %% PI_NormalSizeFont\n\ … … 72 72 $BlocEnteredState restore} bind def\n\ 73 73 \ 74 %% Trace 74 %% Trace\ 75 75 /n {newpath} bind def /c {closepath} bind def\n\ 76 76 /gs {gsave} bind def /gr {grestore} bind def\n\ 77 77 /m {moveto} bind def /l {lineto} bind def\n\ 78 78 /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\ 80 80 /slw {setlinewidth} bind def\n\ 81 81 /ff {findfont} bind def /sf {setfont} bind def /scf {scalefont} bind def\n\ 82 82 /rl {rlineto} bind def /tr {translate} bind def\n\ 83 %% Tx Ty X0 Y0 box 83 %% Tx Ty X0 Y0 box\n\ 84 84 /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\ 86 86 /circle {tr dup 0 m 0 0 3 -1 roll 0 380 arc} bind def\n\ 87 87 %% DrawEllipse pompee sur transfig\n\ … … 116 116 array cvx dup 3 -1 roll 0 exch putinterval dup 4 2 roll\n\ 117 117 putinterval } bind def\n\ 118 /colorimage { 118 /colorimage {\n\ 119 119 pop pop %% remove 'false 3' operands\n\ 120 120 {colortogray} mergeprocs image} bind def\n\ -
trunk/SophyaPI/PI/psfile.cc
r32 r34 25 25 * 26 26 */ 27 PSFile::PSFile (char *FileName = NULL, float Tx = 0, float Ty = 0,28 float Dx = 0, float Dy = 0) {27 PSFile::PSFile (char *FileName = NULL, float Tx, float Ty, 28 float Dx, float Dy) { 29 29 30 30 // extern int FileEmpty; … … 406 406 407 407 void 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) { 411 411 extern int BlocEmpty; 412 412 extern int PageEmpty; … … 424 424 change = 1;} 425 425 if ( (FontSize != PI_NotDefFontSize) || (FontSize != mFontSize) ) { 426 mFontSize = FontSize;426 mFontSize = (PIFontSize) FontSize; // $CHECK$ EA ajoute le cast un peu au pif 427 427 change = 1;} 428 428 if (change) … … 437 437 438 438 void 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) { 441 441 extern int BlocEmpty; 442 442 extern int PageEmpty; … … 464 464 465 465 void 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) { 468 468 extern int BlocEmpty; 469 469 extern int PageEmpty; … … 491 491 492 492 void 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) { 496 496 extern int BlocEmpty; 497 497 extern int PageEmpty; … … 524 524 525 525 void PSFile::DrawCircle (float x0, float y0, float r, 526 PIColors DrawColor = PI_NotDefColor,527 PILineAtt LineAtt = PI_NotDefLineAtt) {526 PIColors DrawColor, 527 PILineAtt LineAtt) { 528 528 extern int BlocEmpty; 529 529 extern int PageEmpty; … … 550 550 551 551 void 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) { 555 555 extern int BlocEmpty; 556 556 extern int PageEmpty; … … 581 581 582 582 void PSFile::DrawPolygon (float *x, float *y, int n, 583 PIColors DrawColor = PI_NotDefColor,584 PILineAtt LineAtt = PI_NotDefLineAtt) {583 PIColors DrawColor, 584 PILineAtt LineAtt) { 585 585 extern int BlocEmpty; 586 586 extern int PageEmpty; … … 608 608 609 609 void 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) { 613 613 614 614 extern int BlocEmpty; … … 642 642 643 643 void PSFile::DrawMarker (float x0, float y0, 644 PIMarker MrkType = PI_NotDefMarker,645 PIColors DrawColor = PI_NotDefColor) {644 PIMarker MrkType, 645 PIColors DrawColor) { 646 646 extern int BlocEmpty; 647 647 extern int PageEmpty; … … 667 667 668 668 void PSFile::DrawMarkers (float *x0, float *y0, int n, 669 PIMarker MrkType = PI_NotDefMarker,670 PIColors DrawColor = PI_NotDefColor) {669 PIMarker MrkType, 670 PIColors DrawColor) { 671 671 extern int BlocEmpty; 672 672 extern int PageEmpty; -
trunk/SophyaPI/PI/psfile.h
r32 r34 17 17 #include <stdio.h> 18 18 #include <stdlib.h> 19 #include "defs.h" 20 #ifdef __mac__ 21 #include <stat.h> 22 #endif 19 23 #include "pisysdep.h" 20 24 … … 55 59 int Tx; /* En 1/72e de pouce !! */ 56 60 int Ty; /* unite naturelle de ps */ 57 } Media;61 } PIMedia; 58 62 59 63
Note:
See TracChangeset
for help on using the changeset viewer.