Changeset 714 in Sophya
- Timestamp:
- Feb 4, 2000, 7:39:48 PM (26 years ago)
- Location:
- trunk/SophyaPI/PI/Tests
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaPI/PI/Tests/xp1.cc
r536 r714 37 37 38 38 39 40 39 /* ........................................................... */ 41 40 /* Classe ArgsWindow (methodes) */ 42 41 /* ........................................................... */ 43 44 42 45 43 /* --Methode-- */ … … 61 59 mText[0] = new PIText(this, "UsArg1", bsx*2, bsy, bsx+(bsx*2/3), bsy/4); 62 60 mText[0]->SetText("Hello "); 63 mText[1] = new PIText(this, "UsArg2", bsx*2, bsy, bsx+(bsx*2/3), bsy/4 + (bsy/4+bsy) ); 61 mText[1] = new PIText(this, "UsArg2", bsx*2, bsy, bsx+(bsx*2/3), 62 bsy/4 + (bsy/4+bsy) ); 64 63 mText[1]->SetText("1. -1."); 65 64 … … 71 70 // Taille et position proportionnelles a la taille de la fenetre pour les elements 72 71 for(int i=0; i<2; i++) { 73 mLab[i]->SetBinding(PIBK_elastic , PIBK_elastic , PIBK_elastic, PIBK_elastic);74 mText[i]->SetBinding(PIBK_elastic , PIBK_elastic , PIBK_elastic, PIBK_elastic);72 mLab[i]->SetBinding(PIBK_elastic, PIBK_elastic, PIBK_elastic, PIBK_elastic); 73 mText[i]->SetBinding(PIBK_elastic, PIBK_elastic, PIBK_elastic, PIBK_elastic); 75 74 } 76 for(int ii=0; ii<2; ii++) mBut[ii]->SetBinding(PIBK_elastic , PIBK_elastic , PIBK_elastic , PIBK_elastic);77 75 for(int ii=0; ii<2; ii++) 76 mBut[ii]->SetBinding(PIBK_elastic, PIBK_elastic, PIBK_elastic, PIBK_elastic); 78 77 } 79 78 … … 113 112 } 114 113 115 116 114 /* ........................................................... */ 117 115 /* Classe PITApp (methodes) */ … … 136 134 // On accroche le menu au Menubar 137 135 AppendMenu(m[1]); 138 139 136 140 137 // Creation d' un label … … 163 160 mAW->Show(); 164 161 break; 165 166 162 case 10102 : // Apparition de la fenetre de dialogue 167 163 mAW->Hide(); 168 164 break; 169 170 165 case 10105: // Sortie d'application 171 166 Stop(); … … 175 170 cout << "PITApp::Process() Msg= " << msg << " UserMsg= " 176 171 << UserMsg(msg) << " ModMsg= " << ModMsg(msg) << endl; 177 break; 178 172 break; 179 173 } 180 174 return; 181 175 } 182 183 184 176 // ................................................................ 185 177 // programme principal … … 200 192 exit(0); 201 193 } 202 203 -
trunk/SophyaPI/PI/Tests/xp2.cc
r549 r714 13 13 14 14 15 /* Exemple d'utilisation PIBaseWdg - Creation d'une nouvelle composante graphique */ 15 /* Exemple d'utilisation PIBaseWdg - 16 Creation d'une nouvelle composante graphique */ 16 17 17 18 // ---- Declaration de la classe ExBWdg -------- -
trunk/SophyaPI/PI/Tests/xp3.cc
r688 r714 47 47 // First menu 48 48 m[0] = new PIMenu(Menubar(),"Fichier"); 49 m[0]->AppendItem("ShowImageTools", 10101); // Show Image Tools window 50 m[0]->AppendItem("ShowDrawerTools", 10102); // Show drawer Tools (Graphic Att.) window 51 m[0]->AppendItem("PostScript (EPS)", 10105); // Creating eps file from a graphic / image 49 // Show Image Tools window 50 m[0]->AppendItem("ShowImageTools", 10101); 51 // Show drawer Tools (Graphic Att.) window 52 m[0]->AppendItem("ShowDrawerTools", 10102); 53 // Creating eps file from a graphic / image 54 m[0]->AppendItem("PostScript (EPS)", 10105); 52 55 m[0]->AppendItem("Exit", 10150); 53 56 // Appending menu to menu bar … … 56 59 // 2nd Menu 57 60 m[1] = new PIMenu(Menubar(),"Graphics"); 58 m[1]->AppendItem("2-Drawers", 10201); // 2x2D drawer superposition59 m[1]->AppendItem("Surf-3D", 10202); 60 m[1]->AppendItem("Image", 10203); 61 m[1]->AppendItem("2-Drawers", 10201); // 2D drawer superposition 62 m[1]->AppendItem("Surf-3D", 10202); // Surface (3D) drawer 63 m[1]->AppendItem("Image", 10203); // Image view object 61 64 // Appending menu to menu bar 62 65 AppendMenu(m[1]); … … 83 86 static double fsinc(double x) 84 87 { if ( (x>-1.e-8) && (x<1.e-8) ) return(0.); else return (sin(x)/x); } 85 static float * surf_fill_matx(); // fill 50x50 array 86 static float * img_fill_array(int sx, int sy); // fill sx * sy array with random stars 88 // fill 50x50 array 89 static float * surf_fill_matx(); 90 // fill sx * sy array with random stars 91 static float * img_fill_array(int sx, int sy); 87 92 88 93 /* --Methode-- */ … … 136 141 137 142 // Using PIYfXDrawer and P1DAdapter<T> 138 PIYfXDrawer* mxyd = new PIYfXDrawer(new P1DAdapter<float>(vpx, 30, true),139 143 PIYfXDrawer* mxyd = new PIYfXDrawer(new P1DAdapter<float>(vpx, 30, true), 144 new P1DAdapter<float>(vpy, 30, true), true); 140 145 // Changing graphic attributes for the drawer 141 146 mxyd->SetColAtt(PI_Magenta);
Note:
See TracChangeset
for help on using the changeset viewer.