Changeset 111 in Sophya
- Timestamp:
- Jun 18, 1998, 7:46:10 PM (27 years ago)
- Location:
- trunk/SophyaPI/PI
- Files:
-
- 4 added
- 22 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaPI/PI/Makefile
r100 r111 4 4 5 5 all: $(LIB)libPI.a 6 $(LIB)libPI.a : $(OBJ)lut.o $(OBJ)pi applgen.o $(OBJ)piapplx.o $(OBJ)pibwdggen.o $(OBJ)pibwdgx.o $(OBJ)picmap.o $(OBJ)picmapgen.o $(OBJ)picmapx.o $(OBJ)picons.o $(OBJ)picontainergen.o $(OBJ)picontainerx.o $(OBJ)pidrawer.o $(OBJ)pidrawwin.o $(OBJ)pifilechogen.o $(OBJ)pifilechox.o $(OBJ)pigraphgen.o $(OBJ)pigraphps.o $(OBJ)pigraphuc.o $(OBJ)pigraphx.o $(OBJ)pihisto.o $(OBJ)pihisto2d.o $(OBJ)piimage.o $(OBJ)piinit.o $(OBJ)pilistgen.o $(OBJ)pilistx.o $(OBJ)pimenubargen.o $(OBJ)pimenubarx.o $(OBJ)pimenugen.o $(OBJ)pimenux.o $(OBJ)pimsghandler.o $(OBJ)pintuple.o $(OBJ)pioptmenugen.o $(OBJ)pioptmenux.o $(OBJ)piperiodx.o $(OBJ)pipixmapgen.o $(OBJ)pipixmapx.o $(OBJ)piscdrawwdg.o $(OBJ)pistdwdggen.o $(OBJ)pistdwdgx.o $(OBJ)pistlist.o $(OBJ)piup.o $(OBJ)piwdggen.o $(OBJ)piwdgx.o $(OBJ)piwindowgen.o $(OBJ)piwindowx.o $(OBJ)pixtbase.o $(OBJ)psfile.o6 $(LIB)libPI.a : $(OBJ)lut.o $(OBJ)pi3ddrw.o $(OBJ)piapplgen.o $(OBJ)piapplx.o $(OBJ)pibwdggen.o $(OBJ)pibwdgx.o $(OBJ)picmap.o $(OBJ)picmapgen.o $(OBJ)picmapx.o $(OBJ)picons.o $(OBJ)picontainergen.o $(OBJ)picontainerx.o $(OBJ)pidrawer.o $(OBJ)pidrawwin.o $(OBJ)pifilechogen.o $(OBJ)pifilechox.o $(OBJ)pigraph3d.o $(OBJ)pigraphgen.o $(OBJ)pigraphps.o $(OBJ)pigraphuc.o $(OBJ)pigraphx.o $(OBJ)pihisto.o $(OBJ)pihisto2d.o $(OBJ)piimage.o $(OBJ)piimgtools.o $(OBJ)piinit.o $(OBJ)pilistgen.o $(OBJ)pilistx.o $(OBJ)pimenubargen.o $(OBJ)pimenubarx.o $(OBJ)pimenugen.o $(OBJ)pimenux.o $(OBJ)pimsghandler.o $(OBJ)pintuple.o $(OBJ)pioptmenugen.o $(OBJ)pioptmenux.o $(OBJ)piperiodx.o $(OBJ)pipixmapgen.o $(OBJ)pipixmapx.o $(OBJ)piscdrawwdg.o $(OBJ)pistdwdggen.o $(OBJ)pistdwdgx.o $(OBJ)pistlist.o $(OBJ)piup.o $(OBJ)piwdggen.o $(OBJ)piwdgx.o $(OBJ)piwindowgen.o $(OBJ)piwindowx.o $(OBJ)pixtbase.o $(OBJ)psfile.o 7 7 $(AR) $(ARFLAGS) $@ $? 8 8 ifeq ($(CXX),cxx) … … 12 12 13 13 $(OBJ)lut.o: lut.cc $(EROSDEVREP)/Include/defs.h lut.h 14 $(OBJ)pi3ddrw.o: pi3ddrw.cc pi3ddrw.h 14 15 $(OBJ)piapplgen.o: piapplgen.cc piapplgen.h pimsghandler.h pisysdep.h \ 15 16 picontainerx.h picontainergen.h piwdgx.h piwdggen.h pimenubarx.h \ 16 17 pimenubargen.h pimenux.h pimenugen.h picons.h pistdwdgx.h \ 17 18 pistdwdggen.h pibwdgx.h pibwdggen.h picmap.h picmapx.h picmapgen.h \ 18 pigraphx.h pigraphgen.h p sfile.h $(EROSDEVREP)/Include/defs.h \19 pigraphps.h19 pigraphx.h pigraphgen.h pigraphuc.h psfile.h \ 20 $(EROSDEVREP)/Include/defs.h pigraphps.h 20 21 $(OBJ)piapplx.o: piapplx.cc piapplx.h piapplgen.h pimsghandler.h pisysdep.h \ 21 22 picontainerx.h picontainergen.h piwdgx.h piwdggen.h pimenubarx.h \ 22 23 pimenubargen.h pimenux.h pimenugen.h picons.h pistdwdgx.h \ 23 24 pistdwdggen.h pibwdgx.h pibwdggen.h picmap.h picmapx.h picmapgen.h \ 24 pigraphx.h pigraphgen.h p sfile.h $(EROSDEVREP)/Include/defs.h \25 pigraphps.h25 pigraphx.h pigraphgen.h pigraphuc.h psfile.h \ 26 $(EROSDEVREP)/Include/defs.h pigraphps.h 26 27 $(OBJ)pibwdggen.o: pibwdggen.cc pibwdggen.h pisysdep.h piwdgx.h piwdggen.h \ 27 28 pimsghandler.h picmap.h picmapx.h picmapgen.h pigraphx.h pigraphgen.h \ 28 p sfile.h $(EROSDEVREP)/Include/defs.h pidrawer.h pigraphuc.h \29 pigraphuc.h psfile.h $(EROSDEVREP)/Include/defs.h pidrawer.h \ 29 30 pigraphps.h 30 31 $(OBJ)pibwdgx.o: pibwdgx.cc pixtbaseP.h pibwdgx.h pisysdep.h pibwdggen.h \ 31 32 piwdgx.h piwdggen.h pimsghandler.h picmap.h picmapx.h picmapgen.h \ 32 pigraphx.h pigraphgen.h p sfile.h $(EROSDEVREP)/Include/defs.h \33 pigraphps.h pixtbase.h33 pigraphx.h pigraphgen.h pigraphuc.h psfile.h \ 34 $(EROSDEVREP)/Include/defs.h pigraphps.h pixtbase.h 34 35 $(OBJ)picmap.o: picmap.cc picmap.h pisysdep.h picmapx.h picmapgen.h 35 36 $(OBJ)picmapgen.o: picmapgen.cc picmapgen.h pisysdep.h picmapx.h picmap.h … … 39 40 piwdggen.h pimsghandler.h picons.h pistdwdgx.h pistdwdggen.h \ 40 41 picontainerx.h picontainergen.h pibwdgx.h pibwdggen.h picmap.h \ 41 picmapx.h picmapgen.h pigraphx.h pigraphgen.h p sfile.h \42 picmapx.h picmapgen.h pigraphx.h pigraphgen.h pigraphuc.h psfile.h \ 42 43 $(EROSDEVREP)/Include/defs.h pigraphps.h 43 44 $(OBJ)picontainergen.o: picontainergen.cc picontainergen.h pisysdep.h \ … … 47 48 $(OBJ)pidrawer.o: pidrawer.cc pidrawer.h pibwdggen.h pisysdep.h piwdgx.h \ 48 49 piwdggen.h pimsghandler.h picmap.h picmapx.h picmapgen.h pigraphx.h \ 49 pigraphgen.h p sfile.h $(EROSDEVREP)/Include/defs.h pigraphuc.h50 pigraphgen.h pigraphuc.h psfile.h $(EROSDEVREP)/Include/defs.h 50 51 $(OBJ)pidrawwin.o: pidrawwin.cc pidrawwin.h pisysdep.h piwindowx.h \ 51 52 piwindowgen.h picontainerx.h picontainergen.h piwdgx.h piwdggen.h \ 52 53 pimsghandler.h piscdrawwdg.h pibwdgx.h pibwdggen.h picmap.h picmapx.h \ 53 picmapgen.h pigraphx.h pigraphgen.h p sfile.h \54 picmapgen.h pigraphx.h pigraphgen.h pigraphuc.h psfile.h \ 54 55 $(EROSDEVREP)/Include/defs.h pigraphps.h pistdwdgx.h pistdwdggen.h \ 55 pidrawer.h pigraphuc.h56 pidrawer.h 56 57 $(OBJ)pifilechogen.o: pifilechogen.cc pifilechogen.h pisysdep.h piwdgx.h \ 57 58 piwdggen.h pimsghandler.h … … 59 60 piwdgx.h piwdggen.h pimsghandler.h piwindowx.h piwindowgen.h \ 60 61 picontainerx.h picontainergen.h 62 $(OBJ)pigraph3d.o: pigraph3d.cc pigraph3d.h pisysdep.h pigraphuc.h \ 63 pigraphgen.h piwdgx.h piwdggen.h pimsghandler.h picmap.h picmapx.h \ 64 picmapgen.h 61 65 $(OBJ)pigraphgen.o: pigraphgen.cc pigraphgen.h pisysdep.h piwdgx.h \ 62 66 piwdggen.h pimsghandler.h picmap.h picmapx.h picmapgen.h … … 76 80 $(EROSDEVREP)/Include/cvector.h $(EROSDEVREP)/Include/matrix.h \ 77 81 $(EROSDEVREP)/Include/ppersist.h \ 78 $(EROSDEVREP)/Include/pclassids.h piscdrawwdg.h pisysdep.h \ 79 pibwdgx.h pibwdggen.h piwdgx.h piwdggen.h pimsghandler.h picmap.h \ 80 picmapx.h picmapgen.h pigraphx.h pigraphgen.h psfile.h pigraphps.h \ 81 pistdwdgx.h pistdwdggen.h piwindowx.h piwindowgen.h picontainerx.h \ 82 picontainergen.h pidrawer.h pigraphuc.h 82 $(EROSDEVREP)/Include/pclassids.h pidrawer.h pibwdggen.h \ 83 pisysdep.h piwdgx.h piwdggen.h pimsghandler.h picmap.h picmapx.h \ 84 picmapgen.h pigraphx.h pigraphgen.h pigraphuc.h psfile.h 83 85 $(OBJ)pihisto2d.o: pihisto2d.cc pihisto2d.h pisysdep.h pimenux.h pimenugen.h \ 84 86 piwdgx.h piwdggen.h pimsghandler.h pimenubarx.h pimenubargen.h \ 85 pioptmenux.h pioptmenugen.h picontainerx.h picontainergen.h \ 86 pistdwdgx.h pistdwdggen.h $(EROSDEVREP)/Include/histos2.h \ 87 $(EROSDEVREP)/Include/peida.h $(EROSDEVREP)/Include/defs.h \ 88 $(EROSDEVREP)/Include/utils.h $(EROSDEVREP)/Include/machine.h \ 89 $(EROSDEVREP)/Include/perrors.h \ 87 pioptmenux.h pioptmenugen.h pistdwdgx.h pistdwdggen.h \ 88 $(EROSDEVREP)/Include/histos2.h $(EROSDEVREP)/Include/peida.h \ 89 $(EROSDEVREP)/Include/defs.h $(EROSDEVREP)/Include/utils.h \ 90 $(EROSDEVREP)/Include/machine.h $(EROSDEVREP)/Include/perrors.h \ 90 91 $(EROSDEVREP)/Include/exceptions.h \ 91 92 $(EROSDEVREP)/Include/peidainit.h $(EROSDEVREP)/Include/fmath.h \ … … 94 95 $(EROSDEVREP)/Include/pclassids.h piscdrawwdg.h pibwdgx.h \ 95 96 pibwdggen.h picmap.h picmapx.h picmapgen.h pigraphx.h pigraphgen.h \ 96 psfile.h pigraphps.h piwindowx.h piwindowgen.h pidrawer.h pigraphuc.h \ 97 pigraphuc.h psfile.h pigraphps.h piwindowx.h piwindowgen.h \ 98 picontainerx.h picontainergen.h pidrawer.h \ 97 99 $(EROSDEVREP)/Include/nbrandom.h 98 $(OBJ)piimage.o: piimage.cc piimage.h $(EROSDEVREP)/Include/cimage.h \ 99 $(EROSDEVREP)/Include/rzimage.h $(EROSDEVREP)/Include/rzvect.h \ 100 $(EROSDEVREP)/Include/machine.h $(EROSDEVREP)/Include/defs.h \ 100 $(OBJ)piimage.o: piimage.cc piimage.h parradapter.h \ 101 $(EROSDEVREP)/Include/defs.h $(EROSDEVREP)/Include/machine.h \ 102 lut.h pisysdep.h pidrawer.h pibwdggen.h piwdgx.h piwdggen.h \ 103 pimsghandler.h picmap.h picmapx.h picmapgen.h pigraphx.h pigraphgen.h \ 104 pigraphuc.h psfile.h pipixmapx.h pipixmapgen.h pibwdgx.h pigraphps.h \ 105 pistdwdgx.h pistdwdggen.h piwindowx.h piwindowgen.h picontainerx.h \ 106 picontainergen.h $(EROSDEVREP)/Include/imageop.h \ 107 $(EROSDEVREP)/Include/cimage.h $(EROSDEVREP)/Include/rzimage.h \ 108 $(EROSDEVREP)/Include/rzvect.h \ 101 109 $(EROSDEVREP)/Include/exceptions.h \ 102 110 $(EROSDEVREP)/Include/peidainit.h \ … … 106 114 $(EROSDEVREP)/Include/ppersist.h \ 107 115 $(EROSDEVREP)/Include/pclassids.h \ 108 $(EROSDEVREP)/Include/dvlist.h lut.h pisysdep.h pipixmapx.h \ 109 pipixmapgen.h pibwdgx.h pibwdggen.h piwdgx.h piwdggen.h \ 110 pimsghandler.h picmap.h picmapx.h picmapgen.h pigraphx.h pigraphgen.h \ 111 psfile.h pigraphps.h pistdwdgx.h pistdwdggen.h piwindowx.h \ 112 piwindowgen.h picontainerx.h picontainergen.h \ 113 $(EROSDEVREP)/Include/imageop.h \ 116 $(EROSDEVREP)/Include/dvlist.h \ 114 117 $(EROSDEVREP)/Include/fitsimage.h \ 115 118 $(EROSDEVREP)/Include/fitsheader.h \ … … 125 128 $(EROSDEVREP)/Include/xstrstream.h \ 126 129 $(EROSDEVREP)/Include/dates.h $(EROSDEVREP)/Include/tarlib.h 130 $(OBJ)piimgtools.o: piimgtools.cc pisysdep.h pistdwdgx.h pistdwdggen.h \ 131 piwdgx.h piwdggen.h pimsghandler.h pimenux.h pimenugen.h pioptmenux.h \ 132 pioptmenugen.h piapplx.h piapplgen.h picontainerx.h picontainergen.h \ 133 pimenubarx.h pimenubargen.h picons.h pibwdgx.h pibwdggen.h picmap.h \ 134 picmapx.h picmapgen.h pigraphx.h pigraphgen.h pigraphuc.h psfile.h \ 135 $(EROSDEVREP)/Include/defs.h pigraphps.h piimage.h parradapter.h \ 136 $(EROSDEVREP)/Include/machine.h lut.h pidrawer.h pipixmapx.h \ 137 pipixmapgen.h piwindowx.h piwindowgen.h piimgtools.h 127 138 $(OBJ)piinit.o: piinit.cc $(EROSDEVREP)/Include/defs.h piinit.h \ 128 139 $(EROSDEVREP)/Include/strecinit.h \ … … 137 148 picontainerx.h picontainergen.h pimenubarx.h picons.h pistdwdgx.h \ 138 149 pistdwdggen.h pibwdgx.h pibwdggen.h picmap.h picmapx.h picmapgen.h \ 139 pigraphx.h pigraphgen.h p sfile.h $(EROSDEVREP)/Include/defs.h \140 pigraphps.h150 pigraphx.h pigraphgen.h pigraphuc.h psfile.h \ 151 $(EROSDEVREP)/Include/defs.h pigraphps.h 141 152 $(OBJ)pimenubarx.o: pimenubarx.cc pimenubarx.h pimenubargen.h pisysdep.h \ 142 153 pimenux.h pimenugen.h piwdgx.h piwdggen.h pimsghandler.h piapplx.h \ 143 154 piapplgen.h picontainerx.h picontainergen.h picons.h pistdwdgx.h \ 144 155 pistdwdggen.h pibwdgx.h pibwdggen.h picmap.h picmapx.h picmapgen.h \ 145 pigraphx.h pigraphgen.h p sfile.h $(EROSDEVREP)/Include/defs.h \146 pigraphps.h156 pigraphx.h pigraphgen.h pigraphuc.h psfile.h \ 157 $(EROSDEVREP)/Include/defs.h pigraphps.h 147 158 $(OBJ)pimenugen.o: pimenugen.cc pimenugen.h pisysdep.h piwdgx.h piwdggen.h \ 148 159 pimsghandler.h 149 $(OBJ)pimenux.o: pimenux.cc pi menux.h pimenugen.h pisysdep.h piwdgx.h \150 pi wdggen.h pimsghandler.h160 $(OBJ)pimenux.o: pimenux.cc pisysdep.h pimenubarx.h pimenubargen.h pimenux.h \ 161 pimenugen.h piwdgx.h piwdggen.h pimsghandler.h 151 162 $(OBJ)pimsghandler.o: pimsghandler.cc pimsghandler.h 152 163 $(OBJ)pintuple.o: pintuple.cc pintuple.h $(EROSDEVREP)/Include/ntuple.h \ … … 157 168 $(EROSDEVREP)/Include/pclassids.h piscdrawwdg.h pisysdep.h \ 158 169 pibwdgx.h pibwdggen.h piwdgx.h piwdggen.h pimsghandler.h picmap.h \ 159 picmapx.h picmapgen.h pigraphx.h pigraphgen.h psfile.h pigraphps.h \ 160 pistdwdgx.h pistdwdggen.h piwindowx.h piwindowgen.h picontainerx.h \ 161 picontainergen.h pidrawer.h pigraphuc.h 162 $(OBJ)pioptmenugen.o: pioptmenugen.cc pioptmenugen.h pisysdep.h \ 163 picontainerx.h picontainergen.h piwdgx.h piwdggen.h pimsghandler.h \ 164 pimenux.h pimenugen.h 170 picmapx.h picmapgen.h pigraphx.h pigraphgen.h pigraphuc.h psfile.h \ 171 pigraphps.h pistdwdgx.h pistdwdggen.h piwindowx.h piwindowgen.h \ 172 picontainerx.h picontainergen.h pidrawer.h 173 $(OBJ)pioptmenugen.o: pioptmenugen.cc pioptmenugen.h pisysdep.h pimenux.h \ 174 pimenugen.h piwdgx.h piwdggen.h pimsghandler.h 165 175 $(OBJ)pioptmenux.o: pioptmenux.cc pisysdep.h pioptmenux.h pioptmenugen.h \ 166 picontainerx.h picontainergen.h piwdgx.h piwdggen.h pimsghandler.h \ 167 pimenux.h pimenugen.h pistdwdgx.h pistdwdggen.h 176 pimenux.h pimenugen.h piwdgx.h piwdggen.h pimsghandler.h pistdwdgx.h \ 177 pistdwdggen.h piapplx.h piapplgen.h picontainerx.h picontainergen.h \ 178 pimenubarx.h pimenubargen.h picons.h pibwdgx.h pibwdggen.h picmap.h \ 179 picmapx.h picmapgen.h pigraphx.h pigraphgen.h pigraphuc.h psfile.h \ 180 $(EROSDEVREP)/Include/defs.h pigraphps.h 168 181 $(OBJ)piperiodx.o: piperiodx.cc piwdgx.h piwdggen.h pimsghandler.h \ 169 182 piperiodx.h $(EROSDEVREP)/Include/periodic.h \ … … 171 184 $(OBJ)pipixmapgen.o: pipixmapgen.cc pipixmapgen.h pisysdep.h pibwdgx.h \ 172 185 pibwdggen.h piwdgx.h piwdggen.h pimsghandler.h picmap.h picmapx.h \ 173 picmapgen.h pigraphx.h pigraphgen.h p sfile.h \186 picmapgen.h pigraphx.h pigraphgen.h pigraphuc.h psfile.h \ 174 187 $(EROSDEVREP)/Include/defs.h pigraphps.h 175 188 $(OBJ)pipixmapx.o: pipixmapx.cc pipixmapx.h pipixmapgen.h pisysdep.h \ 176 189 pibwdgx.h pibwdggen.h piwdgx.h piwdggen.h pimsghandler.h picmap.h \ 177 picmapx.h picmapgen.h pigraphx.h pigraphgen.h p sfile.h \190 picmapx.h picmapgen.h pigraphx.h pigraphgen.h pigraphuc.h psfile.h \ 178 191 $(EROSDEVREP)/Include/defs.h pigraphps.h 179 192 $(OBJ)piscdrawwdg.o: piscdrawwdg.cc $(EROSDEVREP)/Include/generalfit.h \ … … 187 200 $(EROSDEVREP)/Include/cvector.h piscdrawwdg.h pisysdep.h pibwdgx.h \ 188 201 pibwdggen.h piwdgx.h piwdggen.h pimsghandler.h picmap.h picmapx.h \ 189 picmapgen.h pigraphx.h pigraphgen.h p sfile.h pigraphps.h pistdwdgx.h \190 pistdwdg gen.h piwindowx.h piwindowgen.h picontainerx.h \191 picontainergen.h pidrawer.h pigraphuc.h202 picmapgen.h pigraphx.h pigraphgen.h pigraphuc.h psfile.h pigraphps.h \ 203 pistdwdgx.h pistdwdggen.h piwindowx.h piwindowgen.h picontainerx.h \ 204 picontainergen.h pidrawer.h 192 205 $(OBJ)pistdwdggen.o: pistdwdggen.cc pistdwdggen.h pisysdep.h piwdgx.h \ 193 206 piwdggen.h pimsghandler.h … … 214 227 $(EROSDEVREP)/Include/pixelmap.h \ 215 228 $(EROSDEVREP)/Include/transfo.h $(EROSDEVREP)/Include/poly.h \ 216 $(EROSDEVREP)/Include/zfidu.h piscdrawwdg.h pisysdep.h pibwdgx.h \ 217 pibwdggen.h piwdgx.h piwdggen.h pimsghandler.h picmap.h picmapx.h \ 218 picmapgen.h pigraphx.h pigraphgen.h psfile.h pigraphps.h pistdwdgx.h \ 219 pistdwdggen.h piwindowx.h piwindowgen.h picontainerx.h \ 220 picontainergen.h pidrawer.h pigraphuc.h 229 $(EROSDEVREP)/Include/zfidu.h pidrawer.h pibwdggen.h pisysdep.h \ 230 piwdgx.h piwdggen.h pimsghandler.h picmap.h picmapx.h picmapgen.h \ 231 pigraphx.h pigraphgen.h pigraphuc.h psfile.h 221 232 $(OBJ)piup.o: piup.cc $(EROSDEVREP)/Include/ctimer.h \ 222 233 $(EROSDEVREP)/Include/peida.h $(EROSDEVREP)/Include/defs.h \ … … 258 269 $(OBJ)pixtbase.o: pixtbase.cc pixtbaseP.h pibwdgx.h pisysdep.h pibwdggen.h \ 259 270 piwdgx.h piwdggen.h pimsghandler.h picmap.h picmapx.h picmapgen.h \ 260 pigraphx.h pigraphgen.h p sfile.h $(EROSDEVREP)/Include/defs.h \261 pigraphps.h pixtbase.h271 pigraphx.h pigraphgen.h pigraphuc.h psfile.h \ 272 $(EROSDEVREP)/Include/defs.h pigraphps.h pixtbase.h 262 273 $(OBJ)psfile.o: psfile.cc psfile.h $(EROSDEVREP)/Include/defs.h \ 263 274 pisysdep.h pigraphgen.h piwdgx.h piwdggen.h pimsghandler.h picmap.h \ -
trunk/SophyaPI/PI/parradapter.cc
r106 r111 37 37 void P2DArrayAdapter::XYfromxy(int ix, int iy, float& x, float& y) 38 38 { 39 x = ix +0.5;40 y = iy +0.5;39 x = ix; 40 y = iy; 41 41 } 42 42 … … 44 44 int P2DArrayAdapter::CheckDyn(float& min, float& max, float& moy, float& sig, int& nbnul, int& nbsat, int vit) 45 45 { 46 TIMEF ;46 // TIMEF ; 47 47 double m = 0.; 48 48 double s = 0.; … … 100 100 void P2DArrayAdapter::ComputeLut_PicHisto(float& min, float& max, int nbsig, float fracmax) 101 101 { 102 TIMEF ;102 // TIMEF ; 103 103 int MINNBIN = 64; 104 104 int MAXNBIN = 1024; … … 221 221 int xwsz, int ywsz, unsigned char * opix, int * oxsp, int * oysp) 222 222 { 223 TIMEF ;223 // TIMEF ; 224 224 unsigned char *pix, *pp, ucp; 225 225 int zmm=1; -
trunk/SophyaPI/PI/parradapter.h
r104 r111 23 23 int sx=-1, int sy=-1); 24 24 25 inline void GetAxesConfiguration(bool& invx, bool& invy, bool& exy) 26 { invx = invX; invy = invY; exy = eXY; } 25 27 // Doit etre defini par les classes derivees 26 28 virtual float Value(int ix, int iy) = 0; … … 34 36 { int ix, iy; IJ2xy(i, j, ix, iy); 35 37 XYfromxy(ix, iy, x, y); } 38 inline void Coord(int i, int j, float& x, float& y) 39 { int ix, iy; float f; IJ2xy(i, j, ix, iy); 40 XYfromxy(ix, iy, x, y); if (eXY) {f=x; x=y; y=f; } } 36 41 inline float operator() (int i, int j) 37 42 { int ix, iy; IJ2xy(i, j, ix, iy); -
trunk/SophyaPI/PI/piapplx.cc
r110 r111 17 17 // Voir fichier pimenux.cc , Pour resoudre certains conflits avec les WindowManagers 18 18 void SetTopWdgForMenuX(SysDWdg mtw); 19 20 static PIApplication* cur_piapp = NULL; 21 PIApplication* PIApplicationGetApp() { return cur_piapp; } 19 22 20 23 /* --Methode-- */ … … 65 68 } 66 69 70 cur_piapp = this; 67 71 mState = -1; 68 72 SetReady(); … … 83 87 delete topwdg; 84 88 XtCloseDisplay(mdsp); 89 cur_piapp = NULL; 85 90 return; 86 91 } -
trunk/SophyaPI/PI/piapplx.h
r92 r111 34 34 typedef PIApplicationX PIApplication; 35 35 36 // Pour recuperer un objet PIApplication 37 PIApplication* PIApplicationGetApp(); 36 38 #endif -
trunk/SophyaPI/PI/pibwdggen.cc
r107 r111 198 198 /* --Methode-- */ 199 199 int PIBaseWdgGen::AddDrawer(PIDrawer* drw, PIGrCoord x1, PIGrCoord y1, 200 PIGrCoord x2, PIGrCoord y2, bool psz, bool ad)200 PIGrCoord x2, PIGrCoord y2, bool psz, bool clip, bool ad) 201 201 { 202 202 if (drw == NULL) return(0); … … 205 205 did.x1 = x1; did.y1 = y1; 206 206 did.x2 = x2; did.y2 = y2; 207 did.autoszp = did.autolim = false; did.elastic = psz; 207 did.autoszp = did.autolim = false; 208 did.elastic = psz; did.clip = clip; 208 209 did.id = mDrwId; did.ad = ad; 209 210 did.drw = drw; … … 214 215 215 216 /* --Methode-- */ 216 int PIBaseWdgGen::AddDrawer(PIDrawer* drw, bool autolim, bool ad)217 int PIBaseWdgGen::AddDrawer(PIDrawer* drw, bool autolim, bool clip, bool ad) 217 218 { 218 219 if (drw == NULL) return(0); … … 221 222 did.x1 = 0.; did.y1 = 0.; 222 223 did.x2 = 1.; did.y2 = 1.; 223 did.autoszp = true; did.autolim = autolim; did.elastic = false; 224 did.autoszp = true; did.autolim = autolim; 225 did.elastic = false; did.clip = clip; 224 226 did.id = mDrwId; did.ad = ad; 225 227 did.drw = drw; … … 333 335 // L'ordre des operations ici est importante 334 336 if ( (*it).autolim ) 335 (*it).drw->SetLimits(mDrXmin, mDrXmax, mDrYmin, mDrYmax, mDXdir, mDYdir); 337 (*it).drw->SetLimits(mDrXmin, mDrXmax, mDrYmin, mDrYmax, mDXdir, mDYdir); 336 338 guc = (*it).drw->SetDrwWdg(this, drx0, dry0, drdx, drdy, g); 337 g->SetClipRectangle(drx0, dry0, drdx , drdy);339 if ((*it).clip) { g->SetClipRectangle(drx0, dry0, drdx , drdy); fgc = true; } 338 340 (*it).drw->SelGraAtt(guc); 339 fgc = true;340 341 if (sxy) { 341 342 guc->GrC2UC(x0, y0, xmin, ymin); … … 395 396 } 396 397 // L'ordre des operations ici est importante 397 if ( (*it).autolim ) 398 if ( (*it).autolim ) 398 399 (*it).drw->SetLimits(mDrXmin, mDrXmax, mDrYmin, mDrYmax, mDXdir, mDYdir); 399 400 guc = (*it).drw->SetDrwWdg(this, drx0, dry0, drdx, drdy, g); 400 g->SetClipRectangle(drx0, dry0, drdx , drdy);401 if ((*it).clip) g->SetClipRectangle(drx0, dry0, drdx , drdy); 401 402 (*it).drw->SelGraAtt(guc); 402 403 guc->GrC2UC(0, 0, xmin, ymin); … … 406 407 (*it).drw->Draw(guc, xmin, ymin, xmax, ymax); 407 408 g->RestoreGraphicAtt(); 408 g->ClearClipRectangle();409 if ((*it).clip) g->ClearClipRectangle(); 409 410 break; 410 411 } -
trunk/SophyaPI/PI/pibwdggen.h
r107 r111 87 87 int AddDrawer(PIDrawer* drw, PIGrCoord x1, PIGrCoord y1, 88 88 PIGrCoord x2, PIGrCoord y2, 89 bool psz=true, bool ad=false);90 int AddDrawer(PIDrawer* drw, bool autolim=false, bool ad=false);89 bool psz=true, bool clip=true, bool ad=false); 90 int AddDrawer(PIDrawer* drw, bool autolim=false, bool clip=true, bool ad=false); 91 91 void MoveResizeDrawer(int id, PIGrCoord x1, PIGrCoord y1, 92 92 PIGrCoord x2, PIGrCoord y2, bool psz=true); … … 103 103 104 104 // Devrait etre protected - mis ici a cause de cxx 11/07/97 Reza 105 struct BWDrwId { int id; PIGrCoord x1, y1, x2, y2; bool autoszp, autolim, elastic, ad; PIDrawer* drw; };105 struct BWDrwId { int id; PIGrCoord x1, y1, x2, y2; bool autoszp, autolim, elastic, clip, ad; PIDrawer* drw; }; 106 106 107 107 virtual PIGraphic* WindowGraphic(); -
trunk/SophyaPI/PI/picontainergen.cc
r76 r111 141 141 } 142 142 143 /* --Methode-- */ 144 int PIContainerGen::NbChilds() 145 { 146 return(mNCh); 147 } 148 143 149 144 150 /* --Methode-- */ -
trunk/SophyaPI/PI/picontainergen.h
r32 r111 26 26 virtual void ChildAdd(PIWdgGen * child); 27 27 virtual void ChildDel(PIWdgGen * child); 28 virtual int NbChilds(); 28 29 29 30 void SetAutoDelChilds(bool ad = false); -
trunk/SophyaPI/PI/pidrawer.cc
r107 r111 11 11 SetLimits(-1, 1, -1, 1, kAxeDirLtoR, kAxeDirDownUp); 12 12 limitsFixed = 0; 13 SetAxesFlags( kAxesDflt);13 SetAxesFlags(); // Pas de trace d'axes par defaut 14 14 mDndfg = false; // Pour controle de l'appel de Detach() si delete 15 15 … … 36 36 int axrl, int ayud) 37 37 { 38 if (axrl == kAxeDirAuto) { 39 float ff; 40 if (xmax < xmin) { axrl = kAxeDirRtoL; ff=xmin; xmin=xmax; xmax=ff; } 41 else axrl = kAxeDirLtoR; 42 } 43 if (ayud == kAxeDirAuto) { 44 float ff; 45 if (ymax < ymin) { ayud = kAxeDirUpDown; ff=ymin; ymin=ymax; ymax=ff; } 46 else ayud = kAxeDirDownUp; 47 } 38 48 if (xmax <= xmin || ymax <= ymin) 39 49 return; // $CHECK$ exception ? … … 176 186 177 187 void 178 PIDrawer::SetAxesFlags( int flags)188 PIDrawer::SetAxesFlags(unsigned int flags) 179 189 { 180 190 axesFlags = flags; … … 189 199 190 200 void 191 PIDrawer::DrawAxes(PIGraphicUC* g , int flags)201 PIDrawer::DrawAxes(PIGraphicUC* g) 192 202 { 193 203 g->NoClip(); 194 if (flags == -1) 195 flags = axesFlags; 196 197 204 unsigned int flags = axesFlags; 198 205 if (flags & kStdAxes) { 199 206 … … 358 365 } 359 366 367 368 /* -------------------------------------------------------------- */ 369 /* ------------------- Classe PIElDrawer ------------------------ */ 370 /* -------------------------------------------------------------- */ 371 372 /* --Methode-- */ 373 PIElDrawer::PIElDrawer() 374 { 375 mEn = 0; 376 } 377 378 /* --Methode-- */ 379 PIElDrawer::~PIElDrawer() 380 { 381 } 382 383 /* --Methode-- */ 384 void PIElDrawer::Draw(PIGraphicUC* g, float /*xmin*/, float /*ymin*/, float /*xmax*/, float /*ymax*/) 385 { 386 DrawAxes(g); // Trace des axes 387 388 DrwElList::iterator it; 389 for (it = mElist.begin(); it != mElist.end(); it++) 390 { 391 switch ( (*it).etyp ) 392 { 393 case PIDEL_Line : 394 g->DrawLine((*it).ex, (*it).ey, (*it).edx, (*it).edy ); 395 break; 396 case PIDEL_Text : 397 g->DrawString((*it).ex, (*it).ey, (char*) ((*it).es.c_str()) ); 398 break; 399 case PIDEL_Rect : 400 g->DrawBox((*it).ex, (*it).ey, (*it).edx, (*it).edy ); 401 break; 402 case PIDEL_FRect : 403 g->DrawFBox((*it).ex, (*it).ey, (*it).edx, (*it).edy ); 404 break; 405 case PIDEL_Circ : 406 g->DrawCircle((*it).ex, (*it).ey, (*it).edx ); 407 break; 408 case PIDEL_FCirc : 409 g->DrawFCircle((*it).ex, (*it).ey, (*it).edx ); 410 break; 411 default : 412 break; 413 } 414 } 415 } 416 417 418 /* --Methode-- */ 419 int PIElDrawer::ElAdd(int typ, PIGrCoord x, PIGrCoord y, PIGrCoord dx, PIGrCoord dy, char* s) 420 { 421 DrwEl dre; 422 mEn++; 423 dre.eid = mEn; dre.etyp = typ; 424 dre.ex = x; dre.ey = y; 425 dre.edx = dx; dre.edy = dy; 426 if (s) dre.es = s; 427 mElist.push_back(dre); 428 return(mEn); 429 } 430 431 /* --Methode-- */ 432 void PIElDrawer::ElDel(int id) 433 { 434 DrwElList::iterator it; 435 for (it = mElist.begin(); it != mElist.end(); it++) 436 if ( (*it).eid == id) { mElist.erase(it); break; } 437 return; 438 } 439 440 /* --Methode-- */ 441 void PIElDrawer::ElDelAll() 442 { 443 mElist.erase(mElist.begin(), mElist.end()); 444 return; 445 } 446 -
trunk/SophyaPI/PI/pidrawer.h
r107 r111 15 15 kMinTicks = 0x0080, 16 16 kLabels = 0x1000, 17 kAxesDflt = kStdAxes | kTicks | kLabels 17 kAxesDflt = kStdAxes | kTicks | kLabels, // Axes trace par defaut 18 kAxesNone = 0 // Pas de trace d axe 18 19 }; 19 20 … … 27 28 int axrl=kAxeDirSame, int ayud=kAxeDirSame); 28 29 29 virtual void DrawAxes(PIGraphicUC* g , int flags = -1);30 virtual void SetAxesFlags( int flags=kAxesDflt);30 virtual void DrawAxes(PIGraphicUC* g); 31 virtual void SetAxesFlags(unsigned int flags=kAxesNone); 31 32 32 33 virtual void Draw(PIGraphicUC* g, float xmin, float ymin, float xmax, float ymax); … … 87 88 88 89 int limitsFixed; 89 int axesFlags;90 unsigned int axesFlags; 90 91 91 92 PIBaseWdgGen* mBWdg; … … 106 107 107 108 109 // Classe avec gestion d une liste d elements a tracer 110 111 class PIElDrawer : public PIDrawer 112 { 113 public: 114 enum { PIDEL_Line = 1, PIDEL_Text = 2, 115 PIDEL_Rect = 3, PIDEL_FRect = 4, 116 PIDEL_Circ = 5, PIDEL_FCirc = 6 } ; 117 118 PIElDrawer(); 119 virtual ~PIElDrawer(); 120 121 virtual void Draw(PIGraphicUC* g, float xmin, float ymin, float xmax, float ymax); 122 123 inline int ElAddLine(PIGrCoord x1, PIGrCoord y1, PIGrCoord x2, PIGrCoord y2) 124 { return( ElAdd(PIDEL_Line, x1, y1, x2, y2, NULL) ); } 125 inline int ElAddText(PIGrCoord x, PIGrCoord y, char* s) 126 { return( ElAdd(PIDEL_Text, x, y, 0, 0, s) ); } 127 inline int ElAddRect(PIGrCoord x, PIGrCoord y, PIGrCoord dx, PIGrCoord dy) 128 { return( ElAdd(PIDEL_Rect, x, y, dx, dy, NULL) ); } 129 inline int ElAddFRect(PIGrCoord x, PIGrCoord y, PIGrCoord dx, PIGrCoord dy) 130 { return( ElAdd(PIDEL_FRect, x, y, dx, dy, NULL) ); } 131 inline int ElAddCirc(PIGrCoord x, PIGrCoord y, PIGrCoord r) 132 { return( ElAdd(PIDEL_Circ, x, y, r, r, NULL) ); } 133 inline int ElAddFCirc(PIGrCoord x, PIGrCoord y, PIGrCoord r) 134 { return( ElAdd(PIDEL_FCirc, x, y, r, r, NULL) ); } 135 136 void ElDel(int id); 137 void ElDelAll(); 138 139 protected: 140 int ElAdd(int typ, PIGrCoord x, PIGrCoord y, PIGrCoord dx, PIGrCoord dy, char* s); 141 #ifdef __DECCXX 142 public: 108 143 #endif 144 struct DrwEl{ 145 int eid, etyp; 146 PIGrCoord ex,ey; 147 PIGrCoord edx,edy; 148 string es; 149 }; 150 #ifdef __DECCXX 151 protected: 152 #endif 153 typedef list<DrwEl> DrwElList; 154 155 DrwElList mElist; 156 int mEn; 157 158 }; 159 160 #endif -
trunk/SophyaPI/PI/pigraphuc.cc
r72 r111 44 44 int axrl, int ayud) 45 45 { 46 if (xmax <= xmin || ymax <= ymin) 46 47 if (axrl == kAxeDirAuto) { 48 float ff; 49 if (xmax < xmin) { axrl = kAxeDirRtoL; ff=xmin; xmin=xmax; xmax=ff; } 50 else axrl = kAxeDirLtoR; 51 } 52 if (ayud == kAxeDirAuto) { 53 float ff; 54 if (ymax < ymin) { ayud = kAxeDirUpDown; ff=ymin; ymin=ymax; ymax=ff; } 55 else ayud = kAxeDirDownUp; 56 } 57 58 if (xmax <= xmin || ymax <= ymin) 47 59 return; // $CHECK$ exception ? 48 60 if (axrl == kAxeDirLtoR) aXdir = false; -
trunk/SophyaPI/PI/pigraphuc.h
r71 r111 9 9 kAxeDirLtoR = 1, 10 10 kAxeDirRtoL = 2, 11 kAxeDirDownUp = 3, 12 kAxeDirUpDown = 4 11 kAxeDirDownUp = 4, 12 kAxeDirUpDown = 8, 13 kAxeDirAuto = 255 13 14 }; 14 15 -
trunk/SophyaPI/PI/piimage.cc
r107 r111 10 10 11 11 #include "piimage.h" 12 13 12 #include "imageop.h" 14 13 14 // -------------------------------------------------------------------------------- 15 // ----------------------------- Classe PIImage ----------------------------------- 16 // -------------------------------------------------------------------------------- 17 // Variable globale pour la gestion de l'image courante 18 PIImage* PIImage::cur_piimage = NULL; 19 /* --Methode-- */ 20 PIImage* PIImage::CurrentPIImage() 21 { 22 return(cur_piimage); 23 } 24 25 /* --Methode-- */ 26 void PIImage::SetCurrentPIImage(PIImage* curimg) 27 { 28 cur_piimage = curimg; 29 } 15 30 16 31 /* --Methode-- */ … … 45 60 zmgv = 1; 46 61 62 mdrw = new PIElDrawer(); 63 gvdrw = new PIElDrawer(); 64 AddDrawer(mdrw, true, false, false); 65 47 66 SetColMap(CMAP_COLRJ32); 48 67 49 68 SetBackgroundColor(PI_Black); 50 69 70 ActivateKeyboard(); 51 71 ActivateButton(1); 52 72 ActivateMove(1); … … 56 76 ActivateMove(3); 57 77 78 cur_piimage = this; 58 79 } 59 80 … … 78 99 } 79 100 if (lut) delete lut; 80 if (aisup) delete img; // Suppression automatique d'image 101 delete mdrw; 102 delete gvdrw; 103 if (aisup && img) delete img; // Suppression automatique d'image 81 104 if (trtw) delete trtw; 105 if (this == cur_piimage) cur_piimage = NULL; 82 106 } 83 107 … … 122 146 } 123 147 148 /* --Methode-- */ 149 void PIImage::ChangeAxesConfiguration(bool ix, bool iy, bool xy, bool refr) 150 { 151 if (!img) return; 152 bool invx, invy, exy; 153 img->GetAxesConfiguration(invx, invy, exy); 154 if (ix) invx = !invx; 155 if (iy) invy = !invy; 156 if (xy) exy = !exy; 157 img->ConfigureAxes(invx, invy, exy); 158 ComputeGloVPixmap(); 159 if (refr) Apply(); 160 } 124 161 125 162 /* --Methode-- */ … … 282 319 void PIImage::SetColMap(CMapId cmap, bool refr) 283 320 { 321 if ( (cmap == CMAP_GREY32) || (cmap == CMAP_GREYINV32) ) mdrw->SetColAtt(PI_Red); 322 else mdrw->SetColAtt(PI_White); 284 323 PIPixmap::SetColMap(cmap, refr); 285 324 if (zow) zow->SetColMap(cmap, refr); … … 297 336 ComputePixmap(); 298 337 Send(Msg(), PIMsg_Active); 338 cur_piimage = this; 299 339 } 300 340 if (zow != NULL) ComputeZoomPixmap(); … … 343 383 344 384 /* --Methode-- */ 385 void PIImage::Keyboard(int key, PIKeyModifier kmod) 386 { 387 if (kmod == PIKM_Alt) { 388 if (key == 'V' || key == 'v') RequestSelection(); // Pour coller (copier/coller) 389 if (key == 'Z' || key == 'z') mdrw->ElDelAll(); // Pour supprimer tous les signes 390 } 391 392 else if (kmod == PIKM_Blank) { 393 switch (key) { 394 case PIK_Up : 395 SetPave(xpav, ypav-1, true, false); 396 break; 397 case PIK_Down : 398 SetPave(xpav, ypav+1, true, false); 399 break; 400 case PIK_Left : 401 SetPave(xpav-1, ypav, true, false); 402 break; 403 case PIK_Right : 404 SetPave(xpav+1, ypav, true, false); 405 break; 406 default : 407 break; 408 } 409 } 410 411 } 412 413 414 /* --Methode-- */ 345 415 void PIImage::But1Press(int x, int y) 346 416 { … … 348 418 349 419 Send(Msg(), PIMsg_Active); 420 cur_piimage = this; 350 421 if (img == NULL) return; 351 422 if ( PosW2Img(x, y, &xp, &yp) ) return; … … 386 457 387 458 Send(Msg(), PIMsg_Active); 459 cur_piimage = this; 388 460 if (img == NULL) return; 389 461 if ( PosW2Img(x, y, &xpv0, &ypv0) ) { xmv0 = -1; return; } … … 452 524 453 525 Send(Msg(), PIMsg_Active); 526 cur_piimage = this; 454 527 if (img == NULL) return; 455 528 if ( PosW2Img(x, y, &xp, &yp) ) { xmv0 = -1; return; } … … 505 578 506 579 /* --Methode-- */ 580 void PIImage::PasteSelection(unsigned int typ, void *pdata, unsigned int l) 581 { 582 if (typ != PICP_string) return; 583 int ll = (l<128) ? l+1 : 128; 584 char pc[128]; 585 strncpy(pc, (char*)pdata, ll-1); pc[ll-1] = '\0'; 586 float fx, fy; 587 img->Coord(xpav, ypav, fx, fy); 588 mdrw->ElAddText(fx, fy, pc ); 589 mdrw->Refresh(); 590 } 591 592 /* --Methode-- */ 507 593 void PIImage::ComputePixmap() 508 594 { … … 510 596 511 597 if (img == NULL) return; 512 xwsz = this->XSize();513 ywsz = this->YSize();598 xwsz = XSize(); 599 ywsz = YSize(); 514 600 515 601 pixm = img->ComputePixmap(lut, offx, offy, zoom, xwsz, ywsz, pixm, &xspxm, &yspxm); 516 SetPixmap(pixm, xspxm, yspxm); 602 int xw1, yw1, xw2, yw2; 603 xw1 = (xwsz-xspxm)/2; 604 if (xw1 < 0) xw1 = 0; 605 yw1 = (ywsz-yspxm)/2; 606 if (yw1 < 0) yw1 = 0; 607 xw2 = xspxm+xw1; 608 yw2 = yspxm+yw1; 609 SetDefaultDrawRectangle(xw1, yw1, xw2, yw2, false); 610 printf("--DBG-- ComputePixmap() %d %d $ %d %d :: %d %d , %d %d \n", xwsz, ywsz, xspxm, yspxm, xw1, yw1, xw2, yw2); 611 int x1,y1, x2,y2; 612 ofx = xw1; ofy = yw1; 613 PosW2Img(xw1, yw1, &x1, &y1); 614 PosW2Img(xw2, yw2, &x2, &y2); 615 float fx1,fy1, fx2, fy2; 616 img->Coord(x1,y1, fx1, fy2); // fy1 et fy2 echange expres pour utiliser kAxeDirAuto 617 img->Coord(x2,y2, fx2, fy1); // En effet Image de haut vers bas, Axes de bas vers haut par defaut 618 SetDefaultDrawerLimits(fx1, fx2, fy1, fy2, kAxeDirAuto, kAxeDirAuto); 619 printf("--DBG2-- ComputePixmap() %g %g %g %g \n", fx1, fx2, fy1, fy2); 620 xcurs = ycurs = -1; 621 SetPixmap(pixm, xspxm, yspxm, true, xw1, yw1); 517 622 // Refresh(); 518 623 return; … … 524 629 { 525 630 unsigned int xwsz, ywsz; 526 int ofx,ofy;631 int lofx, lofy; 527 632 int zm; 528 633 … … 537 642 if (zm > 0) 538 643 { 539 ofx = xpav-(xwsz/2/zm);540 ofy = ypav-(ywsz/2/zm);644 lofx = xpav-(xwsz/2/zm); 645 lofy = ypav-(ywsz/2/zm); 541 646 } 542 647 else 543 648 { 544 ofx = xpav+(xwsz*zm/2);545 ofy = ypav+(ywsz*zm/2);546 } 547 if ( ofx < 0)ofx = 0;548 if ( ofy < 0)ofy = 0;549 550 zpixm = img->ComputePixmap(lut, ofx,ofy, zm, xwsz, ywsz, zpixm, &xszpxm, &yszpxm);649 lofx = xpav+(xwsz*zm/2); 650 lofy = ypav+(ywsz*zm/2); 651 } 652 if (lofx < 0) lofx = 0; 653 if (lofy < 0) lofy = 0; 654 655 zpixm = img->ComputePixmap(lut, lofx, lofy, zm, xwsz, ywsz, zpixm, &xszpxm, &yszpxm); 551 656 zow->SetColMap(GetColMapId(), false); 552 657 zow->SetPixmap(zpixm, xszpxm, yszpxm); … … 578 683 if (zmx > 1) zmx = -zmx; 579 684 gpixm = img->ComputePixmap(lut, 0, 0, zmx, xwsz, ywsz, gpixm, &xsgpxm, &ysgpxm); 580 printf("DEBUG-ComputeGloVPixmap() %d-%d , (%d,%d) , %d-%d \n", xwsz, ywsz, zmx, zmy, xsgpxm, ysgpxm);685 // printf("DEBUG-ComputeGloVPixmap() %d-%d , (%d,%d) , %d-%d \n", xwsz, ywsz, zmx, zmy, xsgpxm, ysgpxm); 581 686 return; 582 687 } … … 588 693 int x,y, dx,dy; 589 694 695 int xw1, yw1, xw2, yw2; 696 xw1 = (gvw->XSize()-xsgpxm)/2; 697 if (xw1 < 0) xw1 = 0; 698 yw1 = (gvw->YSize()-ysgpxm)/2; 699 if (yw1 < 0) yw1 = 0; 700 xw2 = xsgpxm+xw1; 701 yw2 = ysgpxm+yw1; 702 590 703 if (zoom > 0) zm = zmgv*zoom; 591 704 else zm = (float)zmgv/(float)(-zoom); 592 x = offx/zmgv+1 ;593 y = offy/zmgv+1 ;705 x = offx/zmgv+1+xw1; 706 y = offy/zmgv+1+yw1; 594 707 dx = (int) ( (float)XSize()/zm-1. ); 595 708 dy = (int) ( (float)YSize()/zm-1. ); 596 709 597 598 gvw->ElDelAll(); 599 gvw->WindowGraphic()->SelForeground(PI_Yellow); 600 gvw->WindowGraphic()->SelLine(PI_NormalLine); 601 gvw->ElAddRect(x,y,dx,dy); 710 gvw->DeleteDrawers(); 711 gvdrw->ElDelAll(); 712 gvdrw->SetLimits(xw1, xw2, yw1, yw2, kAxeDirLtoR, kAxeDirUpDown); 713 gvdrw->SetColAtt(PI_Yellow); 714 gvdrw->SetLineAtt(PI_NormalLine); 715 gvdrw->ElAddRect(x,y,dx,dy); 716 gvw->AddDrawer(gvdrw, xw1, yw1, xw2, yw2, false); 602 717 gvw->SetColMap(GetColMapId(), false); 603 gvw->SetPixmap(gpixm, xsgpxm, ysgpxm );718 gvw->SetPixmap(gpixm, xsgpxm, ysgpxm, true, xw1, yw1); 604 719 gvw->SetUserData((void *)this, 0); 605 720 gvw->SetMsg(Msg()+626); … … 624 739 { 625 740 626 if ((xcurs>=0) && (ycurs>=0)) 627 PIPixmap::Draw(g, xcurs-CURSHSIZE, ycurs-CURSHSIZE, CURSHSIZE*2, CURSHSIZE*2); 628 629 if ((xc >= 0) && (yc >= 0)) 630 { 631 xcurs = xc; ycurs = yc; 632 if (winovis) return; // $CHECK$ Reza A enlever si possible 17/6/96 633 if (zoom < 3) g->SelLine(PI_NormalLine); 634 else g->SelLine(PI_ThickLine); 635 if ( (GetColMapId() == CMAP_GREY32) || (GetColMapId() == CMAP_GREYINV32) ) 636 g->SelForeground(PI_Red); 637 else g->SelForeground(PI_White); 638 g->SelGOMode(PI_GOCopy); 741 if (winovis) return; // $CHECK$ Reza A enlever si possible 17/6/96 742 743 g->SelGOMode(PI_GOXOR); 744 if (GetColMapId() == CMAP_COLRJ32) 745 g->SelForeground(PI_Yellow); 746 else g->SelForeground(PI_Magenta); 747 748 if (zoom < 3) g->SelLine(PI_NormalLine); 749 else g->SelLine(PI_ThickLine); 750 751 if ((xcurs>=0) && (ycurs>=0)) { 752 // PIPixmap::Draw(g, xcurs-CURSHSIZE, ycurs-CURSHSIZE, CURSHSIZE*2, CURSHSIZE*2); 639 753 g->DrawLine(xcurs-CURSHSIZE, ycurs, xcurs-4, ycurs); 640 754 g->DrawLine(xcurs+4, ycurs, xcurs+CURSHSIZE, ycurs); 641 755 g->DrawLine(xcurs, ycurs-CURSHSIZE, xcurs, ycurs-4); 642 756 g->DrawLine(xcurs, ycurs+4, xcurs, ycurs+CURSHSIZE); 757 } 758 if ((xc >= 0) && (yc >= 0)) 759 { 760 xcurs = xc; ycurs = yc; 761 g->DrawLine(xcurs-CURSHSIZE, ycurs, xcurs-4, ycurs); 762 g->DrawLine(xcurs+4, ycurs, xcurs+CURSHSIZE, ycurs); 763 g->DrawLine(xcurs, ycurs-CURSHSIZE, xcurs, ycurs-4); 764 g->DrawLine(xcurs, ycurs+4, xcurs, ycurs+CURSHSIZE); 643 765 } 644 766 else { xcurs = ycurs = -1; } 645 767 768 g->SelGOMode(PI_GOCopy); 769 g->SelLine(PI_NormalLine); 770 g->SelForeground(PI_White); 646 771 return; 647 772 } … … 667 792 int PIImage::PosW2Img(int xiw, int yiw, int * xp, int * yp) 668 793 { 669 794 xiw -= ofx; yiw -= ofy; // Offset d'affichage du pixmap 670 795 if (zoom > 0) 671 796 { … … 699 824 } 700 825 826 *xiw += ofx; *yiw += ofy; // Offset d'affichage du pixmap 701 827 if (*xiw > XSize()) *xiw = -1; 702 828 if (*yiw > YSize()) *yiw = -1; -
trunk/SophyaPI/PI/piimage.h
r107 r111 3 3 // LAL (Orsay) / IN2P3-CNRS DAPNIA/SPP (Saclay) / CEA 4 4 5 #ifndef PIIMAGE BASE_H_SEEN6 #define PIIMAGE BASE_H_SEEN5 #ifndef PIIMAGE_H_SEEN 6 #define PIIMAGE_H_SEEN 7 7 8 8 #include "parradapter.h" … … 10 10 #include "pisysdep.h" 11 11 12 #include "pidrawer.h" 12 13 #include PIPIXMAP_H 13 14 #include PISTDWDG_H … … 27 28 28 29 virtual long kind() {return ClassId; } 29 virtual void Process(PIMessage msg, PIMsgHandler* sender, void* data=NULL);30 30 31 // Tableau des pixels et changement de configuration des axes 31 32 void SetImage(P2DArrayAdapter* pim, bool ad = true, bool refr=true); 33 void ChangeAxesConfiguration(bool ix, bool iy, bool xy, bool refr=true); 34 inline void SetDrawAxesFlags(unsigned int flags=kBoxAxes | kExtTicks | kLabels) 35 { mdrw->SetAxesFlags(flags); mdrw->Refresh(); } 32 36 37 // Fenetre de Zoom, text, ... 33 38 void SetZoomWin(PIPixmap * zw, bool refr=true); 34 39 void SetGloVWin(PIPixmap * zw, bool refr=true); … … 36 41 void ShowCursor(bool sc=true); 37 42 43 // Gestion du choix de LUT, facteur d agrandissement, table de couleur 38 44 void SetLut(float min, float max, int typlut=kLutType_Lin, 39 45 int lauto=0, bool refr=true); … … 44 50 float GetZoomF(); 45 51 52 virtual void SetColMap(CMapId cmap, bool refr=true); 53 46 54 void SetOffset(int ox, int oy, bool refr=true); 47 55 void SetPave(int x, int y, bool refr=true, bool cent=true); 48 49 virtual void SetColMap(CMapId cmap, bool refr=true);50 56 51 57 inline P2DArrayAdapter * Image() { return(img); } … … 62 68 virtual void Draw(PIGraphic* g, int x0, int y0, int dx, int dy); 63 69 70 virtual void Keyboard(int key, PIKeyModifier kmod); 64 71 virtual void But1Press(int x, int y); 65 72 virtual void But1Release(int x, int y); … … 72 79 virtual void Ptr3Move(int x, int y); 73 80 74 private: 75 81 virtual void PasteSelection(unsigned int typ, void *pdata, unsigned int l); 82 83 // Pour acces par les ImgTools (LutWind, ...) 84 static PIImage* CurrentPIImage(); 85 static void SetCurrentPIImage(PIImage* curimg); 86 87 protected: 88 virtual void Process(PIMessage msg, PIMsgHandler* sender, void* data=NULL); 76 89 void ComputePixmap(); 77 90 void ComputeZoomPixmap(); … … 100 113 LUT * lut; 101 114 int offx, offy; 115 PIElDrawer* mdrw; 102 116 // Fenetre de zoom 103 117 int zoom; … … 110 124 unsigned char * gpixm; 111 125 int xsgpxm, ysgpxm; 126 PIElDrawer* gvdrw; 112 127 // Fenetre/champ de texte 113 128 PILabel * txw; … … 122 137 int xszpav, yszpav; 123 138 139 // PIImage courante 140 static PIImage* cur_piimage; 124 141 }; 125 142 -
trunk/SophyaPI/PI/pipixmapgen.cc
r71 r111 21 21 mPpos[0] = mPpos[0] = 0; 22 22 cmap = new PIColorMap(CMAP_GREY32); 23 mEn = 0;24 23 ActivateButton(1); 25 24 } … … 70 69 71 70 72 /* --Methode-- */73 int PIPixmapGen::ElAdd(int typ, int x, int y, int dx, int dy, char* s)74 {75 DrwEl dre;76 mEn++;77 dre.eid = mEn; dre.etyp = typ;78 dre.ex = x; dre.ey = y;79 dre.edx = dx; dre.edy = dy;80 if (s) dre.es = s;81 mElist.push_back(dre);82 return(mEn);83 }84 85 /* --Methode-- */86 void PIPixmapGen::ElDel(int id)87 {88 DrwElList::iterator it;89 for (it = mElist.begin(); it != mElist.end(); it++)90 if ( (*it).eid == id) { mElist.erase(it); break; }91 return;92 }93 94 /* --Methode-- */95 void PIPixmapGen::ElDelAll()96 {97 mElist.erase(mElist.begin(), mElist.end());98 return;99 }100 101 /* --Methode-- */102 void PIPixmapGen::DrawElements(PIGraphicGen* g)103 {104 char* txt;105 DrwElList::iterator it;106 for (it = mElist.begin(); it != mElist.end(); it++)107 {108 switch ( (*it).etyp )109 {110 case PIDEL_Line :111 g->DrawLine((*it).ex, (*it).ey, (*it).edx, (*it).edy );112 break;113 case PIDEL_Text :114 txt = (char*) ((*it).es.c_str());115 g->DrawString((*it).ex, (*it).ey, txt );116 break;117 case PIDEL_Rect :118 g->DrawBox((*it).ex, (*it).ey, (*it).edx, (*it).edy );119 break;120 case PIDEL_FRect :121 g->DrawFBox((*it).ex, (*it).ey, (*it).edx, (*it).edy );122 break;123 case PIDEL_Circ :124 g->DrawCircle((*it).ex, (*it).ey, (*it).edx );125 break;126 case PIDEL_FCirc :127 g->DrawFCircle((*it).ex, (*it).ey, (*it).edx );128 break;129 default :130 break;131 }132 }133 return;134 }135 136 71 137 72 // Fin des methodes de la classe -
trunk/SophyaPI/PI/pipixmapgen.h
r71 r111 16 16 enum {ClassId = 5100}; 17 17 18 enum { PIDEL_Line = 1, PIDEL_Text = 2,19 PIDEL_Rect = 3, PIDEL_FRect = 4,20 PIDEL_Circ = 5, PIDEL_FCirc = 6 } ;21 22 18 PIPixmapGen(PIContainerGen *par, char *nom, 23 19 int sx=10, int sy=10, int px=0, int py=0); … … 36 32 inline int YPPos() { return mPpos[1]; } 37 33 38 inline int ElAddLine(int x1, int y1, int x2, int y2)39 { return( ElAdd(PIDEL_Line, x1, y1, x2, y2, NULL) ); }40 inline int ElAddText(int x, int y, char* s)41 { return( ElAdd(PIDEL_Text, x, y, 0, 0, s) ); }42 inline int ElAddRect(int x, int y, int dx, int dy)43 { return( ElAdd(PIDEL_Rect, x, y, dx, dy, NULL) ); }44 inline int ElAddFRect(int x, int y, int dx, int dy)45 { return( ElAdd(PIDEL_FRect, x, y, dx, dy, NULL) ); }46 inline int ElAddCirc(int x, int y, int r)47 { return( ElAdd(PIDEL_Circ, x, y, r, r, NULL) ); }48 inline int ElAddFCirc(int x, int y, int r)49 { return( ElAdd(PIDEL_FCirc, x, y, r, r, NULL) ); }50 51 void ElDel(int id);52 void ElDelAll();53 54 34 protected: 55 int ElAdd(int typ, int x, int y, int dx, int dy, char* s);56 virtual void DrawElements(PIGraphicGen* g);57 58 35 unsigned char *pixmap; 59 36 int nx, ny; … … 61 38 PIColorMap* cmap; 62 39 63 #ifdef __DECCXX64 public:65 #endif66 struct DrwEl{67 int eid, etyp;68 int ex,ey;69 int edx,edy;70 string es;71 };72 #ifdef __DECCXX73 protected:74 #endif75 typedef list<DrwEl> DrwElList;76 77 DrwElList mElist;78 int mEn;79 40 int mPpos[2]; 80 41 }; -
trunk/SophyaPI/PI/pipixmapx.cc
r71 r111 68 68 g->DrawPixmap(0, 0, pixmap, nx, ny, cmap); 69 69 /* Il faut faire quelque chose Sinon ??! */ 70 DrawElements(g);71 70 } 72 71 else Draw(g, 0, 0, XSize(), YSize()); … … 113 112 114 113 XPutImage(mdsp, xw, mygc, myximg, ox, oy, x0, y0, dx, dy); 115 DrawElements(g);116 114 XFlush(mdsp); 117 115 return; -
trunk/SophyaPI/PI/piscdrawwdg.cc
r107 r111 6 6 :PIBaseWdg(par, nom, sx, sy, px, py) 7 7 { 8 mBDrw = new PI Drawer;8 mBDrw = new PIElDrawer; 9 9 SetLimits(-1.,1.,-1.,1.,kAxeDirLtoR,kAxeDirDownUp); 10 10 SetAxesFlags(kBoxAxes | kExtTicks | kLabels); … … 12 12 xEndDrag = yEndDrag = xBegDrag = yBegDrag = 0; 13 13 SetDefaultDrawRectangle(0.12, 0.12, 0.88, 0.88, true); 14 14 AddDrawer(mBDrw, true, false, false); 15 15 16 mTrlb = mTxw = NULL; 16 17 mTrW = NULL; … … 36 37 if (xmax <= xmin || ymax <= ymin) 37 38 return; // $CHECK$ exception ? 38 mBDrw->SetLimits(xmin, xmax, ymin, ymax, axrl, ayud);39 39 SetDefaultDrawerLimits(xmin, xmax, ymin, ymax, axrl, ayud); 40 40 mPPos[0] = 0.5*(XMin()+XMax()); … … 46 46 yMaxS = ymax; 47 47 } 48 }49 50 void51 PIScDrawWdg::Resize()52 {53 // SetSpan();54 // Refresh(); $CHECK$ Faut-il appeler ? Reza 08/02/9855 }56 57 PIGraphicUC*58 PIScDrawWdg::SetSpan(PIGraphicGen* g)59 {60 int x0, y0, dx, dy;61 x0 = (int)(XSize()*0.12);62 y0 = (int)(YSize()*0.12);63 dx = (int)(XSize()*0.76+0.5);64 dy = (int)(YSize()*0.76+0.5);65 return(mBDrw->SetDrwWdg(this, x0, y0, dx, dy, g));66 }67 68 void69 PIScDrawWdg::DrawAxes(PIGraphicUC* g, int flags)70 {71 mBDrw->DrawAxes(g, flags);72 }73 74 75 void76 PIScDrawWdg::SetAxesFlags(int flags)77 {78 mBDrw->SetAxesFlags(flags);79 48 } 80 49 … … 113 82 EraseWindow(); 114 83 if (! LimitsFixed() ) { // On met a jour les limites a partir du premier Drawer 115 PIDrawer* drw = GetDrawer( 0);84 PIDrawer* drw = GetDrawer(1); 116 85 if (drw != NULL) { 117 86 drw->UpdateSize(); … … 120 89 else SetLimits(0., 1., 0., 1.); 121 90 } 122 PIGraphicUC* guc = SetSpan(g);123 DrawAxes(guc);124 DrawSelf(guc, -9.e19, -9.e19, 9.e19, 9.e19);125 91 } 126 92 … … 128 94 PIScDrawWdg::Draw(PIGraphic* g, int x0, int y0, int dx, int dy) 129 95 { 130 EraseWindow();96 // EraseWindow(); 131 97 if (! LimitsFixed() ) { // On met a jour les limites a partir du premier Drawer 132 PIDrawer* drw = GetDrawer( 0);98 PIDrawer* drw = GetDrawer(1); 133 99 if (drw != NULL) { 134 100 drw->UpdateSize(); … … 137 103 else SetLimits(0., 1., 0., 1.); 138 104 } 139 float xmin,xmax,ymin,ymax;140 PIGraphicUC* guc = SetSpan(g);141 guc->GrC2UC(x0, y0, xmin, ymin);142 guc->GrC2UC(x0+dx, y0+dy, xmax, ymax);143 if (xmin > xmax) swap(xmin,xmax);144 if (ymin > ymax) swap(ymin,ymax);145 DrawAxes(guc);146 DrawSelf(guc, xmin, ymin, xmax, ymax);147 }148 149 150 void151 PIScDrawWdg::DrawSelf(PIGraphicUC*, float /*xmin*/, float /*ymin*/, float /*xmax*/, float /*ymax*/)152 {153 return;154 105 } 155 106 156 107 157 108 // Gestion affichage coordonnees du point 158 159 109 160 110 string PIScDrawWdg::GetClickText(float x, float y) -
trunk/SophyaPI/PI/piscdrawwdg.h
r107 r111 22 22 23 23 virtual long kind() {return ClassId; } 24 25 virtual void Resize();26 24 27 25 virtual void Draw(PIGraphic* g); 28 26 virtual void Draw(PIGraphic* g, int x0, int y0, int dx, int dy); 29 virtual void DrawSelf(PIGraphicUC* g, float xmin, float ymin, float xmax, float ymax);30 27 31 28 void SetLimits(float xmin, float xmax, float ymin, float ymax, 32 29 int axrl=kAxeDirSame, int ayud=kAxeDirSame, bool tmp=false); 33 34 void SetAxesFlags(int flags=kAxesDflt); 35 void DrawAxes(PIGraphicUC* g, int flags = -1); 30 inline void SetAxesFlags(unsigned int flags=kAxesDflt) { mBDrw->SetAxesFlags(flags); } 36 31 37 32 int AddScDrawer(PIDrawer*, bool ad=false); // Ajoute un Drawer en auto 38 39 33 PIDrawer* BaseDrawer() { return mBDrw; }; 40 34 … … 62 56 63 57 protected: 64 PIGraphicUC* SetSpan(PIGraphicGen* g);65 66 58 float xMinS, xMaxS, yMinS, yMaxS; // Sauvegarde pour zoom 67 59 float mPPos[2]; // Position click souris X,Y 68 60 69 PI Drawer* mBDrw;61 PIElDrawer* mBDrw; 70 62 71 63 int xBegDrag, yBegDrag; -
trunk/SophyaPI/PI/pistdwdggen.cc
r106 r111 10 10 // Composant graphique simple permettant d'afficher une étiquette (texte). 11 11 // "PILabelGen" définit l'interface (classe virtuelle pure). Les objets 12 // instanciés doivent être de la classe "PILabel" déclaré dans le fichier12 // instanciés doivent être de la classe "PILabel" déclarée dans le fichier 13 13 // entête "PISTDWDG_H". 14 14 //-- … … 24 24 // PILabel(PIContainerGen* par, char* nom, int sx=10, int sy=10, int px=0, int py=0) 25 25 // Création d'un objet PILabel ayant un contenu (étiquette) identique à "nom". 26 // SetLabel(string const& lab)26 // void SetLabel(string const& lab) 27 27 // Modifie l'étiquette affichée par l'objet 28 28 //-- … … 47 47 // Composant graphique de type bouton . 48 48 // "PIButtonGen" définit l'interface (classe virtuelle pure). Les objets 49 // instanciés doivent être de la classe "PIButton" déclaré dans le fichier49 // instanciés doivent être de la classe "PIButton" déclarée dans le fichier 50 50 // entête "PISTDWDG_H". Lors de l'activation, le message de l'objet complété 51 51 // par le modifier "PIMsg_Click" est envoyé ("Send()"). Le champ "data" … … 61 61 //-- 62 62 //++ 63 // PIButton(PIContainerGen* par, char* nom, PIMessage msg = PIMsg_Click, int sx=10, int sy=10, int px=0, int py=0)63 // PIButton(PIContainerGen* par, char* nom, PIMessage msg, int sx=10, int sy=10, int px=0, int py=0) 64 64 // Création d'un objet PIButton avec une étiquette identique à "nom". 65 // SetLabel(string const& lab)65 // void SetLabel(string const& lab) 66 66 // Modifie l'étiquette affichée par l'objet bouton. 67 67 //-- … … 83 83 84 84 /************* PITextGen ************/ 85 //++ 86 // Class PIText 87 // Lib PI 88 // include pistdwdggen.h 89 // 90 // Composant graphique de type champ texte. 91 // "PITextGen" définit l'interface (classe virtuelle pure). Les objets 92 // instanciés doivent être de la classe "PIText" déclarée dans le fichier 93 // entête "PISTDWDG_H". Si un message non nul a été associé a l'objet 94 // par "PIWdg::SetMsg(PIMessage msg)", le message correspondant complété 95 // par le modifier "PIMsg_DataChanged" est envoyé ("Send()") lors de 96 // de la validation du champ texte (touche Retour-Chariot). Le champ "data" 97 // contient le pointeur "NULL". 98 //-- 99 //++ 100 // Links Parents 101 // PIWdg 102 //-- 103 104 //++ 105 // Titre Constructeur, méthodes 106 //-- 107 //++ 108 // PIText(PIContainerGen* par, char* nom, int sx=10, int sy=10, int px=0, int py=0) 109 // Création d'un objet PIText. 110 // void SetText(string const& txt) 111 // Modifie le contenu du champ texte. 112 // string GetText() const 113 // Renvoie le contenu du champ texte. 114 // void SetMutiLineMode(bool mlm=false) 115 // Active ("mlm=true") ou désactive ("mlm=false") la possibilité d'édition multiligne. 116 // void SetTextEditable(bool te=true) 117 // Permet de rendre le contenu du champ texte non-éditable ("te=false") 118 //-- 85 119 86 120 PITextGen::PITextGen(PIContainerGen *par, char *nom, … … 107 141 {} 108 142 143 //++ 144 // Class PICheckBox 145 // Lib PI 146 // include pistdwdggen.h 147 // 148 // Composant graphique de type CheckBox. 149 // "PICheckBoxGen" définit l'interface (classe virtuelle pure). Les objets 150 // instanciés doivent être de la classe "PICheckBox" déclarée dans le fichier 151 // entête "PISTDWDG_H". Lors du changement d'état, le message de l'objet 152 // complété par le modifier "PIMsg_DataChanged" est envoyé ("Send()"). 153 // Le champ "data" contient un pointeur sur une variable de type "bool" 154 // qui contient l'état de l'objet lors de l'appel à "Send()". 155 //-- 156 //++ 157 // Links Parents 158 // PIWdg 159 //-- 160 161 //++ 162 // Titre Constructeur, méthodes 163 //-- 164 //++ 165 // PICheckBox(PIContainerGen* par, char* nom, PIMessage msg, int sx=10, int sy=10, int px=0, int py=0); 166 // Création d'un objet PICheckBox. 167 // void SetState(bool st=false) 168 // Modifie l'état de l'objet. 169 // bool GetState() 170 // Renvoie l'état de l'objet. 171 //-- 172 109 173 110 174 /************* PIScaleGen ************/ 175 //++ 176 // Class PIScale 177 // Lib PI 178 // include pistdwdggen.h 179 // 180 // Composant graphique de type échelle ou curseur. (La valeur représentée 181 // par l'objet peut être modifiée à l'aide d'un curseur). 182 // "PIScaleGen" définit l'interface (classe virtuelle pure). Les objets 183 // instanciés doivent être de la classe "PIScale" déclarée dans le fichier 184 // entête "PISTDWDG_H". Lors du changement de valeur, le message de l'objet 185 // complété par le modifier "PIMsg_DataChanged" est envoyé ("Send()"). 186 // Le champ "data" contient un pointeur sur une variable de type "int" 187 // qui contient la valeur associée à l'objet lors de l'appel à "Send()". 188 //-- 189 //++ 190 // Links Parents 191 // PIWdg 192 //-- 193 194 //++ 195 // Titre Constructeur, méthodes 196 //-- 197 //++ 198 // PIScale(PIContainerGen* par, char* nom, PIMessage msg, bool horiz=true, int sx=100, int sy=10, int px=0, int py=0) 199 // Création d'un objet PIScale. si "horiz==true", l'objet scale est affiché dans le sens horizontal, 200 // sinon dans le sens vertical. 201 // void SetMinMax(int min, int max) 202 // Modifie les valeurs extrêmes de l'échelle. L'objet est créé avec des bornes par défaut de 1 à 100. 203 // void SetValue(int v) 204 // Modifie la valeur courante de l'échelle. 205 // int GetValue() 206 // Renvoie la valeur courante de l'échelle. 207 //-- 208 111 209 112 210 PIScaleGen::PIScaleGen(PIContainerGen *par, char *nom, PIMessage msg, … … 121 219 122 220 /************* PIScrollBarGen ************/ 221 //++ 222 // Class PIScrollBar 223 // Lib PI 224 // include pistdwdggen.h 225 // 226 // Composant graphique de type ascenseur. 227 // "PIScrollBarGen" définit l'interface (classe virtuelle pure). Les objets 228 // instanciés doivent être de la classe "PIScrollBar" déclarée dans le fichier 229 // entête "PISTDWDG_H". Lors du changement de valeur, le message de l'objet 230 // complété par le modifier "PIMsg_DataChanged" est envoyé ("Send()"). 231 // La méthode "ActivateDrag()" permet d'activer l'envoi de message en 232 // cours de déplacement du curseur. Dans ce cas, le modifier 233 // "PIMsg_Drag" est appliqué. 234 // Le champ "data" contient un pointeur sur une variable de type "int" 235 // qui contient la position courante du curseur. 236 //-- 237 //++ 238 // Links Parents 239 // PIWdg 240 //-- 241 242 //++ 243 // Titre Constructeur, méthodes 244 //-- 245 //++ 246 // PIScrollBar(PIContainerGen* par, char* nom, PIMessage msg, bool vert=true, int sx=10, int sy=100, int px=0, int py=0) 247 // Création d'un objet PIScrollBar. si "vert==true", l'objet est affiché dans le sens vertical, 248 // sinon dans le sens horizontal. 249 // void ActivateDrag(bool acd=false) 250 // Active ("acd=true") ou désactive ("mlm=false") l'envoi de messages lors du mouvement du curseur. 251 // void SetMinMax(int min, int max) 252 // Modifie les valeurs extrêmes de l'ascenseur. L'objet est créé avec des bornes par défaut de 1 à 100. 253 // void SetValue(int v) 254 // Modifie la position courante de l'ascenseur. 255 // int GetValue() 256 // Renvoie la position courante de l'ascenseur. 257 // void SetSlSize(int sz) 258 // Modifie la taille de l'ascenseur. 259 // int GetSlSize() 260 // Renvoie la taille de l'ascenseur. 261 //-- 123 262 124 263 PIScrollBarGen::PIScrollBarGen(PIContainerGen *par, char *nom, PIMessage msg, -
trunk/SophyaPI/PI/pistdwdgx.cc
r110 r111 356 356 357 357 XtSetValues(XtWdg(), warg, n); 358 SetMinMax(1, 10 );358 SetMinMax(1, 100); 359 359 SetValue(1); 360 360 XtAddCallback(XtWdg(), XmNvalueChangedCallback,
Note:
See TracChangeset
for help on using the changeset viewer.