Changeset 138 in Sophya
- Timestamp:
- Aug 21, 1998, 7:56:08 PM (27 years ago)
- Location:
- trunk/SophyaPI/PI
- Files:
-
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaPI/PI/Makefile
r132 r138 88 88 $(OBJ)pifilechogen.o: pifilechogen.cc pifilechogen.h pisysdep.h piwdgx.h \ 89 89 piwdggen.h pimsghandler.h 90 $(OBJ)pifilechox.o: pifilechox.cc pisysdep.h pifilechox.h pifilechogen.h \ 91 piwdgx.h piwdggen.h pimsghandler.h piwindowx.h piwindowgen.h \ 92 picontainerx.h picontainergen.h 90 $(OBJ)pifilechox.o: pifilechox.cc pisysdep.h piapplx.h piapplgen.h \ 91 pimsghandler.h picontainerx.h picontainergen.h piwdgx.h piwdggen.h \ 92 pimenubarx.h pimenubargen.h pimenux.h pimenugen.h picons.h \ 93 pistdwdgx.h pistdwdggen.h pibwdgx.h pibwdggen.h picmap.h picmapx.h \ 94 picmapgen.h pigraphx.h pigraphgen.h pigraphuc.h psfile.h \ 95 $(EROSDEVREP)/Include/defs.h pigraphps.h pifilechox.h \ 96 pifilechogen.h piwindowx.h piwindowgen.h 93 97 $(OBJ)pigraph3d.o: pigraph3d.cc pigraph3d.h pisysdep.h pigraphuc.h \ 94 98 pigraphgen.h piwdgx.h piwdggen.h pimsghandler.h picmap.h picmapx.h \ … … 270 274 picmap.h picmapx.h picmapgen.h pigraphx.h pigraphgen.h pigraphuc.h \ 271 275 psfile.h 272 $(OBJ)pistzwin.o: pistzwin.cc pistzwin.h pisysdep.h piwindowx.h \ 273 piwindowgen.h picontainerx.h picontainergen.h piwdgx.h piwdggen.h \ 274 pimsghandler.h psfile.h $(EROSDEVREP)/Include/defs.h pigraphgen.h \ 275 picmap.h picmapx.h picmapgen.h 276 $(OBJ)pistzwin.o: pistzwin.cc \ 277 /usr/local/lib/gcc-lib/alphaev56-dec-osf4.0d/2.8.1/include/stdio.h \ 278 pistzwin.h pisysdep.h piwindowx.h piwindowgen.h picontainerx.h \ 279 picontainergen.h piwdgx.h piwdggen.h pimsghandler.h piperiodx.h \ 280 $(EROSDEVREP)/Include/periodic.h $(EROSDEVREP)/Include/defs.h \ 281 psfile.h pigraphgen.h picmap.h picmapx.h picmapgen.h 276 282 $(OBJ)pisurfdr.o: pisurfdr.cc pisurfdr.h parradapter.h \ 277 283 $(EROSDEVREP)/Include/defs.h $(EROSDEVREP)/Include/machine.h \ -
trunk/SophyaPI/PI/parradapter.cc
r129 r138 97 97 } 98 98 99 printf(" -> vit=%d \n", vit);99 // printf(" -> vit=%d \n", vit); 100 100 for(int j=0; j<sY; j++) 101 101 for(int i=0; i<sX; i++) { -
trunk/SophyaPI/PI/piapplgen.h
r128 r138 6 6 #include PICONT_H 7 7 #include PIMENUBAR_H 8 #include "picons.h" 8 9 9 #include "picons.h"10 10 11 11 class PIApplicationGen : public PIMsgHandler { -
trunk/SophyaPI/PI/piapplx.cc
r136 r138 154 154 void PIApplicationX::SetReady() 155 155 { 156 Display * mdsp = XtDisplay (topwdg->XtWdg()); 156 157 if (mState != kReadyState) 157 158 { 158 Display * mdsp;159 159 mState = kReadyState; 160 160 Menubar()->SetSensitive(); 161 mdsp = XtDisplay (topwdg->XtWdg());162 161 XDefineCursor(mdsp, XtWindow(topwdg->XtWdg()), a_curs[0]); 163 XFlush(mdsp);164 } 162 } 163 XFlush(mdsp); 165 164 } 166 165 … … 168 167 void PIApplicationX::SetBusy() 169 168 { 169 Display * mdsp = XtDisplay (topwdg->XtWdg()); 170 170 if (mState != kBusyState) 171 171 { 172 Display * mdsp;173 172 mState = kBusyState; 174 173 Menubar()->SetSensitive(); 175 mdsp = XtDisplay (topwdg->XtWdg());176 174 // if ( XtIsRealized(topwdg->XtWdg()) ) 177 175 XDefineCursor(mdsp, XtWindow(topwdg->XtWdg()), a_curs[2]); 178 XFlush(mdsp); 179 } 180 return; 176 } 177 XFlush(mdsp); 181 178 } 182 179 … … 184 181 void PIApplicationX::SetBlocked() 185 182 { 183 Display * mdsp = XtDisplay (topwdg->XtWdg()); 186 184 if (mState != kBlockedState) 187 185 { 188 Display * mdsp;189 186 mState = kBlockedState; 190 187 Menubar()->SetUnSensitive(); 191 mdsp = XtDisplay (topwdg->XtWdg());192 188 XDefineCursor(mdsp, XtWindow(topwdg->XtWdg()), a_curs[1]); 193 XFlush(mdsp); 194 } 189 } 190 XFlush(mdsp); 191 return; 195 192 } 196 193 -
trunk/SophyaPI/PI/picons.cc
r128 r138 48 48 mOffL = 0; 49 49 mNCmdL = 0; 50 mCmd = ""; 50 51 51 52 // Pile de rappel des commandes … … 125 126 126 127 if (mCurL >= (mNL-mNCmdL) ) { // Il faut scroller 127 ScrollUp(); 128 ScrollUp(); 128 129 mCurL = mNL-mNCmdL-1; 129 130 l1 = mNL-mWSzL-1; 130 }131 } 131 132 if (l2 < mCurL) l2 = mCurL; 132 133 if (ref) DisplayLines(mWGrC, l1, l2); … … 136 137 137 138 /* --Methode-- */ 138 void PIConsole::AddStr(c har* strg, unsigned char va, bool ref)139 void PIConsole::AddStr(const char* strg, unsigned char va, bool ref) 139 140 { 140 141 int l1, l2; … … 152 153 else { mCurL++; mCurC = 0; } 153 154 if (mCurL >= (mNL-mNCmdL) ) { // Il faut scroller 154 ScrollUp(); 155 ScrollUp(); 155 156 mCurL = mNL-mNCmdL-1; 157 l1 = mNL-mWSzL-1; 156 158 } 157 159 strg++; … … 248 250 249 251 /* --Methode-- */ 250 void PIConsole::SetPrompt(c har* prompt)252 void PIConsole::SetPrompt(const char* prompt) 251 253 { 252 254 strncpy(mPrompt, prompt, 31); … … 342 344 } 343 345 mChangeFg = false; 344 Send( Msg(), PIMsg_OK, mCmdStr);346 mCmd = mCmdStr; 345 347 ClrCmd(); 348 Send( Msg(), PIMsg_OK, NULL); 346 349 break; 347 350 -
trunk/SophyaPI/PI/picons.h
r128 r138 35 35 // Interface d utilisation : 36 36 void AddChar(char c, unsigned char va= PIVA_Def, bool ref=true); 37 void AddStr(c har* strg, unsigned char va= PIVA_Def, bool ref=true);37 void AddStr(const char* strg, unsigned char va= PIVA_Def, bool ref=true); 38 38 39 39 void SelectFont(PIFontSize sz=PI_NormalSizeFont); … … 41 41 void PreferedSize(int& sx, int& sy); 42 42 void AcceptCmd(bool acc=true, int nrecmx=20); 43 void SetPrompt(c har* prompt);43 void SetPrompt(const char* prompt); 44 44 45 45 inline int WindNbLines() { return mWSzL; } 46 46 inline int NbLines() { return mNL; } 47 inline string GetCmdString() { mCmdStr[mCLC] = '\0'; return((string)mCmdStr); }47 inline string GetCmdString() { return(mCmd); } 48 48 49 49 // Gestion des evenements input/draw … … 94 94 char* mCmdStr; // La commande 95 95 int mCCP, mCLC; // Position du curseur, longeur de la commande 96 string mCmd; // Le string de la derniere commande validee 96 97 97 98 // Pour le rappel des commandes -
trunk/SophyaPI/PI/pidrwtools.cc
r127 r138 117 117 mOpt[0]->AppendItem("Yellow", 107); 118 118 mOpt[0]->AppendItem("Magenta", 108); 119 mOpt[0]->AppendItem("Cyan", 109); 120 mOpt[0]->AppendItem("Turquoise", 110); 121 mOpt[0]->AppendItem("NavyBlue", 111); 122 mOpt[0]->AppendItem("Orange", 112); 123 mOpt[0]->AppendItem("SiennaRed", 113); 124 mOpt[0]->AppendItem("Purple", 114); 125 mOpt[0]->AppendItem("LimeGreen", 115); 126 mOpt[0]->AppendItem("Gold", 116); 119 127 mOpt[0]->SetValue(100); 120 128 mOpt[0]->SetBinding(PIBK_elastic, PIBK_elastic, PIBK_elastic, PIBK_elastic); … … 276 284 void PIDrwTools::Process(PIMessage msg, PIMsgHandler* /*sender*/, void* /*data*/) 277 285 { 278 PIColors cols[9] = { PI_NotDefColor, PI_Black, PI_White, 279 PI_Grey, PI_Red, PI_Blue, 280 PI_Green, PI_Yellow, PI_Magenta}; 286 PIColors cols[17] = { PI_NotDefColor, 287 PI_Black, PI_White, PI_Grey, 288 PI_Red, PI_Blue, PI_Green, 289 PI_Yellow, PI_Magenta, 290 PI_Cyan , PI_Turquoise, PI_NavyBlue, 291 PI_Orange, PI_SiennaRed, PI_Purple, 292 PI_LimeGreen, PI_Gold }; 281 293 282 294 PIMarker mrk[12] = { PI_NotDefMarker, PI_DotMarker, … … 328 340 if (drw == NULL) return; 329 341 k = mOpt[0]->GetValue()-100; 330 if ( (k < 0) || (k > 8) ) k = 0;342 if ( (k < 0) || (k > 16) ) k = 0; 331 343 drw->SetColAtt(cols[k]); 332 344 k = mOpt[1]->GetValue()-200; -
trunk/SophyaPI/PI/pigraphgen.h
r113 r138 15 15 PI_Black = 0, PI_White = 1, PI_Grey = 2, 16 16 PI_Red = 3, PI_Blue = 4, PI_Green = 5, 17 PI_Yellow = 6, PI_Magenta = 7 }; 17 PI_Yellow = 6, PI_Magenta = 7, 18 PI_Cyan = 8, PI_Turquoise = 9, PI_NavyBlue = 10, 19 PI_Orange = 11, PI_SiennaRed = 12, PI_Purple = 13, 20 PI_LimeGreen = 14, PI_Gold = 15 }; 18 21 19 22 enum PIFontSize { PI_NotDefFontSize = -1, -
trunk/SophyaPI/PI/pigraphx.cc
r117 r138 19 19 static int BigFontIndex = 5; 20 20 static PIFontAtt fntatt[3] = { PI_RomanFont, PI_BoldFont, PI_ItalicFont }; 21 #define NMAXCOL 1 021 #define NMAXCOL 16 22 22 static PIXColor colpix[NMAXCOL]; 23 23 … … 680 680 if ( XAllocNamedColor (mdsp, cmap, "magenta", &mycol, &exact) ) 681 681 colpix[PI_Magenta] = mycol.pixel; 682 if ( XAllocNamedColor (mdsp, cmap, "cyan", &mycol, &exact) ) 683 colpix[PI_Cyan] = mycol.pixel; 684 if ( XAllocNamedColor (mdsp, cmap, "turquoise", &mycol, &exact) ) 685 colpix[PI_Turquoise] = mycol.pixel; 686 if ( XAllocNamedColor (mdsp, cmap, "NavyBlue", &mycol, &exact) ) 687 colpix[PI_NavyBlue] = mycol.pixel; 688 if ( XAllocNamedColor (mdsp, cmap, "orange", &mycol, &exact) ) 689 colpix[PI_Orange] = mycol.pixel; 690 if ( XAllocNamedColor (mdsp, cmap, "sienna", &mycol, &exact) ) 691 colpix[PI_SiennaRed] = mycol.pixel; 692 if ( XAllocNamedColor (mdsp, cmap, "purple", &mycol, &exact) ) 693 colpix[PI_Purple] = mycol.pixel; 694 if ( XAllocNamedColor (mdsp, cmap, "LimeGreen", &mycol, &exact) ) 695 colpix[PI_LimeGreen] = mycol.pixel; 696 if ( XAllocNamedColor (mdsp, cmap, "gold", &mycol, &exact) ) 697 colpix[PI_Gold] = mycol.pixel; 698 682 699 683 700 /* le GC pour DrawPixmap */ -
trunk/SophyaPI/PI/pihisto2d.cc
r131 r138 179 179 if(mTypDisp==3) fracmin=-1.; 180 180 } 181 182 // gestion epaisseur de ligne 183 if (mLAtt == PI_NotDefLineAtt) g->SelLine(PI_ThinLine); 181 184 182 185 // gestion Markers ou plot avec des points. … … 278 281 { 279 282 // Une boite dans le coin superieur droit 283 if (mLAtt == PI_NotDefLineAtt) g->SelLine(PI_ThinLine); 280 284 float cellHeight = (YMax() - YMin()) * 0.05; 281 285 float cellWidth = (XMax() - XMin()) * 0.23; -
trunk/SophyaPI/PI/piimage.cc
r130 r138 77 77 AddDrawer(mdrw, true, false, false); 78 78 79 SetLut(0., 32000., kLutType_Lin, 0, false); 79 80 SetColMapId(CMAP_COLRJ32); 80 81 81 // pour le copier-coller 82 82 cpbuffer = NULL; -
trunk/SophyaPI/PI/pintup3d.cc
r133 r138 90 90 #endif 91 91 92 if (mLAtt == PI_NotDefLineAtt) g3->SelLine(PI_ThinLine); 93 92 94 nok = 0; 93 95 for (int i=0; i<mNT->NEntry(); i++) { -
trunk/SophyaPI/PI/pintuple.cc
r136 r138 70 70 if (!mNT) return; 71 71 if ( (xK < 0) || (yK < 0) ) return; 72 72 if (mLAtt == PI_NotDefLineAtt) g->SelLine(PI_ThinLine); 73 73 nok = 0; 74 74 for (int i=0; i<mNT->NEntry(); i++) { -
trunk/SophyaPI/PI/pistzwin.cc
r137 r138 115 115 void PIZoneWindow::SetZone(int nzx, int nzy) 116 116 { 117 int i; 118 if (mZWdg) { 119 for(i=0; i<mZx*mZy; i++) 120 if (mZWdg[i]) delete mZWdg[i]; 121 delete[] mZWdg; 122 } 123 117 124 if (nzx < 1) nzx = 1; 118 125 if (nzy < 1) nzy = 1; … … 121 128 mZx = nzx; mZy = nzy; mZc = 0; 122 129 123 int i;124 if (mZWdg) {125 for(i=0; i<mZx*mZy; i++)126 if (mZWdg[i]) delete mZWdg[i];127 delete[] mZWdg;128 }129 130 mZWdg = new PIWdgGen*[nzx*nzy]; 130 131 for(i=0; i<mZx*mZy; i++) mZWdg[i] = NULL; … … 136 137 { 137 138 if (!child) return; 138 // printf("-DBG-PIZoneWindow::ChildAdd(%lx) deleteing Wdg %lx \n", (long)child, (long)mZWdg[mZc]);139 139 int nx = mZc%mZx; 140 140 int ny = mZc/mZx; … … 146 146 child->SetSize(sx, sy); 147 147 child->SetBinding(PIBK_elastic,PIBK_elastic,PIBK_elastic, PIBK_elastic); 148 // printf("--DBG-- PIZoneWindow::ChildAdd() %d , Nx,y=%d %d , S= %d %d \n", mZc, nx, ny, sx, sy); 149 // printf("--DBG-- ... Child Pos= %d %d, Size= %d %d \n", child->XPos(), child->YPos(),child->XSize(),child->YSize() ); 148 // Il faut faire le delete a cet endroit, sinon probleme avec widget motif XmForm Reza 18/08/98 150 149 if (mZWdg[mZc]) delete mZWdg[mZc]; 151 150 mZWdg[mZc] = child; … … 178 177 int ny = mZc/mZx; 179 178 px = nx*sx; py = ny*sy; 180 // printf("--DBG-- PIZoneWindow::NextChildPosSize() %d , P=%d %d , S= %d %d \n", mZc, px,py, sx, sy);181 179 } -
trunk/SophyaPI/PI/piwdggen.cc
r132 r138 179 179 PIWdgGen::~PIWdgGen() 180 180 { 181 if (parent) parent->ChildDel(this); // On previent le container parent 181 // ChildDel() doit etre appele par la classe qui implemente le widget 182 // if (parent) parent->ChildDel(this); // On previent le container parent 182 183 } 183 184 -
trunk/SophyaPI/PI/piwdgx.cc
r136 r138 182 182 printf("Debug_PIWdgX::~PIWdgX() %lx %lx \n", (long)this, (long)sdw); 183 183 #endif 184 if (parent) parent->ChildDel(this); 184 185 UnManage(); 185 186 if (curselwdg == this) { SelectionLost(); curselwdg = NULL; }
Note:
See TracChangeset
for help on using the changeset viewer.