Changeset 1640 in Sophya
- Timestamp:
- Aug 16, 2001, 2:16:42 PM (24 years ago)
- Location:
- trunk/SophyaPI/PI
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaPI/PI/picolist.h
r1034 r1640 15 15 PI_Orange = 11, PI_SiennaRed = 12, PI_Purple = 13, 16 16 PI_LimeGreen = 14, PI_Gold = 15, 17 PI_ColorAllBits0 = 16, PI_ColorAllBits1 = 17 }; 17 PI_Violet = 16, PI_VioletRed = 17, 18 PI_BlueViolet = 18, PI_DarkViolet = 19, 19 PI_ColorAllBits0 = 19, PI_ColorAllBits1 = 20 }; 18 20 19 21 #endif -
trunk/SophyaPI/PI/picons.cc
r1264 r1640 461 461 case PIK_Return : 462 462 case PIK_Enter : 463 mCmdStr[mCLC] = '\0'; 464 // printf("Keyb()-Debug- <CR/Enter> CmdStr= %s (L=%d)\n", mCmdStr, strlen(mCmdStr) ); 465 // Gestion de rappel des commandes 466 if (mCLC > 0) { 467 mRStr[mRCindx] = mCmdStr; 468 mRCindx++; mNComm++; 469 if (mRCindx >= NMxRecall) mRCindx = 0; 470 mRindx = mRCindx; 471 } 472 mChangeFg = false; 473 mCmd = mCmdStr; 474 ClrCmd(); 475 Send( Msg(), PIMsg_OK, NULL); 463 SendCmd(); 476 464 break; 477 465 … … 583 571 int i; 584 572 char *pc = (char *)pdata; 585 for(i=0; i<l; i++) CmdAddChar(pc[i]); 573 for(i=0; i<l; i++) { 574 if ((i > 0) && (pc[i] == '\n')) SendCmd(); 575 else CmdAddChar(pc[i]); 576 } 586 577 UpdCmdLine(); 587 578 } … … 831 822 832 823 /* --Methode-- */ 824 void PIConsole::SendCmd() 825 { 826 mCmdStr[mCLC] = '\0'; 827 // printf("Keyb()-Debug- <CR/Enter> CmdStr= %s (L=%d)\n", mCmdStr, strlen(mCmdStr) ); 828 // Gestion de rappel des commandes 829 if (mCLC > 0) { 830 mRStr[mRCindx] = mCmdStr; 831 mRCindx++; mNComm++; 832 if (mRCindx >= NMxRecall) mRCindx = 0; 833 mRindx = mRCindx; 834 } 835 mChangeFg = false; 836 mCmd = mCmdStr; 837 ClrCmd(); 838 Send( Msg(), PIMsg_OK, NULL); 839 return; 840 } 841 842 /* --Methode-- */ 833 843 void PIConsole::CmdAddChar(int key) 834 844 { -
trunk/SophyaPI/PI/picons.h
r329 r1640 71 71 void UpdCmdLine(); 72 72 void ClrCmd(); 73 void SendCmd(); 73 74 void CmdAddChar(int key); 74 75 void SelFgBgCol(PIColors fc=PI_Black, PIColors bc=PI_White); -
trunk/SophyaPI/PI/pidrawer.cc
r1631 r1640 779 779 SelGraAtt(g); // DrawAxes change certains attributs graphiques 780 780 DrawAxes(g); // Trace des axes 781 g->SelFont(PI_NormalSizeFont, mFAtt); 781 782 SelGraAtt(g); // DrawAxes change certains attributs graphiques 782 783 783 if (mFSz == PI_NotDefFontSize) g->SelFont(PI_NormalSizeFont);784 784 // Trace des titres 785 785 if ( (titleT.length() > 0) || (titleB.length() > 0) ) { -
trunk/SophyaPI/PI/pidrwtools.cc
r1592 r1640 134 134 mOpt[0]->AppendItem("LimeGreen", 115); 135 135 mOpt[0]->AppendItem("Gold", 116); 136 mOpt[0]->AppendItem("Violet", 117); 137 mOpt[0]->AppendItem("VioletRed", 118); 138 mOpt[0]->AppendItem("BlueViolet", 119); 139 mOpt[0]->AppendItem("DarkViolet", 120); 136 140 mOpt[0]->SetValue(100); 137 141 mOpt[0]->SetBinding(PIBK_elastic, PIBK_elastic, PIBK_elastic, PIBK_elastic); … … 295 299 296 300 // Declaration des differents attributs graphiques 297 static PIColors cols[17] = { PI_NotDefColor, 301 #define MYNMXCOLORS 21 302 static PIColors cols[MYNMXCOLORS] = { PI_NotDefColor, 298 303 PI_Black, PI_White, PI_Grey, 299 304 PI_Red, PI_Blue, PI_Green, … … 301 306 PI_Cyan , PI_Turquoise, PI_NavyBlue, 302 307 PI_Orange, PI_SiennaRed, PI_Purple, 303 PI_LimeGreen, PI_Gold }; 308 PI_LimeGreen, PI_Gold, PI_Violet, PI_VioletRed, 309 PI_BlueViolet, PI_DarkViolet }; 304 310 305 311 static PIMarker mrk[12] = { PI_NotDefMarker, PI_DotMarker, … … 360 366 int ii,jj,kk; 361 367 PIColors fc = dr->GetFgColAtt(); 362 for(kk=0; kk< 17; kk++)368 for(kk=0; kk<MYNMXCOLORS; kk++) 363 369 if (fc == cols[kk]) { mOpt[0]->SetValue(100+kk); break; } 364 370 CMapId cmi = dr->GetColMapId(); … … 406 412 int k,ii,jj,kk; 407 413 k = mOpt[0]->GetValue()-100; 408 if ( (k < 0) || (k > 16) ) k = 0;414 if ( (k < 0) || (k >= MYNMXCOLORS) ) k = 0; 409 415 drw->SetColAtt(cols[k]); 410 416 k = mOpt[1]->GetValue()-200; -
trunk/SophyaPI/PI/pigraphx.cc
r1034 r1640 13 13 14 14 /* Variables globales pour modifier les GC */ 15 #define NMAXCOL 1815 #define NMAXCOL 24 16 16 static PIXColor colpix[NMAXCOL]; 17 17 … … 699 699 if ( XAllocNamedColor (mdsp, cmap, "gold", &mycol, &exact) ) 700 700 colpix[PI_Gold] = mycol.pixel; 701 if ( XAllocNamedColor (mdsp, cmap, "violet", &mycol, &exact) ) 702 colpix[PI_Violet] = mycol.pixel; 703 if ( XAllocNamedColor (mdsp, cmap, "VioletRed", &mycol, &exact) ) 704 colpix[PI_VioletRed] = mycol.pixel; 705 if ( XAllocNamedColor (mdsp, cmap, "BlueViolet", &mycol, &exact) ) 706 colpix[PI_BlueViolet] = mycol.pixel; 707 if ( XAllocNamedColor (mdsp, cmap, "DarkViolet", &mycol, &exact) ) 708 colpix[PI_DarkViolet] = mycol.pixel; 701 709 702 710 -
trunk/SophyaPI/PI/piimage.h
r1503 r1640 81 81 82 82 inline PIElDrawer* MyElDrawer() { return (mdrw); } 83 inline PIElDrawer* BaseDrawer() { return (mdrw); } 83 84 84 85 // Rafraichissement des widgets auxiliaires (zoom, ...) -
trunk/SophyaPI/PI/psfile.cc
r1592 r1640 54 54 PI_Cyan, PI_Turquoise, PI_NavyBlue,\ 55 55 PI_Orange, PI_SiennaRed, PI_Purple,\ 56 PI_LimeGreen, PI_Gold, \56 PI_LimeGreen, PI_Gold, PI_Violet, PI_VioletRed, PI_BlueViolet, PI_DarkViolet, \ 57 57 \ 58 58 PI_RomanFont, PI_BoldFont, PI_ItalicFont, PI_NotDefFontAtt,\ … … 83 83 /C%-2d {0.195 0.800 0.195 setrgbcolor} bind def %% PI_LimeGreen\n\ 84 84 /C%-2d {0.996 0.840 0.0 setrgbcolor} bind def %% PI_Gold\n\ 85 /C%-2d {0.933 0.510 0.933 setrgbcolor} bind def %% PI_Violet\n\ 86 /C%-2d {0.816 0.125 0.565 setrgbcolor} bind def %% PI_VioletRed\n\ 87 /C%-2d {0.541 0.167 0.886 setrgbcolor} bind def %% PI_BlueViolet\n\ 88 /C%-2d {0.580 0.000 0.827 setrgbcolor} bind def %% PI_DarkViolet\n\ 85 89 /F%-2d {/Courier findfont} bind def %% PI_RomanFont\n\ 86 90 /F%-2d {/Courier-Bold findfont} bind def %% PI_BoldFont\n\
Note:
See TracChangeset
for help on using the changeset viewer.