Changeset 111 in Sophya


Ignore:
Timestamp:
Jun 18, 1998, 7:46:10 PM (27 years ago)
Author:
ansari
Message:

Modifs pour les drawers - Utilisation des Drawers ds PIImage,
Introduction des fichiers pour le dessin 3D Reza 18/06/98

Location:
trunk/SophyaPI/PI
Files:
4 added
22 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaPI/PI/Makefile

    r100 r111  
    44 
    55all: $(LIB)libPI.a
    6 $(LIB)libPI.a : $(OBJ)lut.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)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.o
     6$(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
    77        $(AR) $(ARFLAGS)  $@ $?
    88ifeq ($(CXX),cxx)
     
    1212 
    1313$(OBJ)lut.o: lut.cc $(EROSDEVREP)/Include/defs.h lut.h
     14$(OBJ)pi3ddrw.o: pi3ddrw.cc pi3ddrw.h
    1415$(OBJ)piapplgen.o: piapplgen.cc piapplgen.h pimsghandler.h pisysdep.h \
    1516 picontainerx.h picontainergen.h piwdgx.h piwdggen.h pimenubarx.h \
    1617 pimenubargen.h pimenux.h pimenugen.h picons.h pistdwdgx.h \
    1718 pistdwdggen.h pibwdgx.h pibwdggen.h picmap.h picmapx.h picmapgen.h \
    18  pigraphx.h pigraphgen.h psfile.h $(EROSDEVREP)/Include/defs.h \
    19  pigraphps.h
     19 pigraphx.h pigraphgen.h pigraphuc.h psfile.h \
     20 $(EROSDEVREP)/Include/defs.h pigraphps.h
    2021$(OBJ)piapplx.o: piapplx.cc piapplx.h piapplgen.h pimsghandler.h pisysdep.h \
    2122 picontainerx.h picontainergen.h piwdgx.h piwdggen.h pimenubarx.h \
    2223 pimenubargen.h pimenux.h pimenugen.h picons.h pistdwdgx.h \
    2324 pistdwdggen.h pibwdgx.h pibwdggen.h picmap.h picmapx.h picmapgen.h \
    24  pigraphx.h pigraphgen.h psfile.h $(EROSDEVREP)/Include/defs.h \
    25  pigraphps.h
     25 pigraphx.h pigraphgen.h pigraphuc.h psfile.h \
     26 $(EROSDEVREP)/Include/defs.h pigraphps.h
    2627$(OBJ)pibwdggen.o: pibwdggen.cc pibwdggen.h pisysdep.h piwdgx.h piwdggen.h \
    2728 pimsghandler.h picmap.h picmapx.h picmapgen.h pigraphx.h pigraphgen.h \
    28  psfile.h $(EROSDEVREP)/Include/defs.h pidrawer.h pigraphuc.h \
     29 pigraphuc.h psfile.h $(EROSDEVREP)/Include/defs.h pidrawer.h \
    2930 pigraphps.h
    3031$(OBJ)pibwdgx.o: pibwdgx.cc pixtbaseP.h pibwdgx.h pisysdep.h pibwdggen.h \
    3132 piwdgx.h piwdggen.h pimsghandler.h picmap.h picmapx.h picmapgen.h \
    32  pigraphx.h pigraphgen.h psfile.h $(EROSDEVREP)/Include/defs.h \
    33  pigraphps.h pixtbase.h
     33 pigraphx.h pigraphgen.h pigraphuc.h psfile.h \
     34 $(EROSDEVREP)/Include/defs.h pigraphps.h pixtbase.h
    3435$(OBJ)picmap.o: picmap.cc picmap.h pisysdep.h picmapx.h picmapgen.h
    3536$(OBJ)picmapgen.o: picmapgen.cc picmapgen.h pisysdep.h picmapx.h picmap.h
     
    3940 piwdggen.h pimsghandler.h picons.h pistdwdgx.h pistdwdggen.h \
    4041 picontainerx.h picontainergen.h pibwdgx.h pibwdggen.h picmap.h \
    41  picmapx.h picmapgen.h pigraphx.h pigraphgen.h psfile.h \
     42 picmapx.h picmapgen.h pigraphx.h pigraphgen.h pigraphuc.h psfile.h \
    4243 $(EROSDEVREP)/Include/defs.h pigraphps.h
    4344$(OBJ)picontainergen.o: picontainergen.cc picontainergen.h pisysdep.h \
     
    4748$(OBJ)pidrawer.o: pidrawer.cc pidrawer.h pibwdggen.h pisysdep.h piwdgx.h \
    4849 piwdggen.h pimsghandler.h picmap.h picmapx.h picmapgen.h pigraphx.h \
    49  pigraphgen.h psfile.h $(EROSDEVREP)/Include/defs.h pigraphuc.h
     50 pigraphgen.h pigraphuc.h psfile.h $(EROSDEVREP)/Include/defs.h
    5051$(OBJ)pidrawwin.o: pidrawwin.cc pidrawwin.h pisysdep.h piwindowx.h \
    5152 piwindowgen.h picontainerx.h picontainergen.h piwdgx.h piwdggen.h \
    5253 pimsghandler.h piscdrawwdg.h pibwdgx.h pibwdggen.h picmap.h picmapx.h \
    53  picmapgen.h pigraphx.h pigraphgen.h psfile.h \
     54 picmapgen.h pigraphx.h pigraphgen.h pigraphuc.h psfile.h \
    5455 $(EROSDEVREP)/Include/defs.h pigraphps.h pistdwdgx.h pistdwdggen.h \
    55  pidrawer.h pigraphuc.h
     56 pidrawer.h
    5657$(OBJ)pifilechogen.o: pifilechogen.cc pifilechogen.h pisysdep.h piwdgx.h \
    5758 piwdggen.h pimsghandler.h
     
    5960 piwdgx.h piwdggen.h pimsghandler.h piwindowx.h piwindowgen.h \
    6061 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
    6165$(OBJ)pigraphgen.o: pigraphgen.cc pigraphgen.h pisysdep.h piwdgx.h \
    6266 piwdggen.h pimsghandler.h picmap.h picmapx.h picmapgen.h
     
    7680 $(EROSDEVREP)/Include/cvector.h $(EROSDEVREP)/Include/matrix.h \
    7781 $(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
    8385$(OBJ)pihisto2d.o: pihisto2d.cc pihisto2d.h pisysdep.h pimenux.h pimenugen.h \
    8486 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 \
    9091 $(EROSDEVREP)/Include/exceptions.h \
    9192 $(EROSDEVREP)/Include/peidainit.h $(EROSDEVREP)/Include/fmath.h \
     
    9495 $(EROSDEVREP)/Include/pclassids.h piscdrawwdg.h pibwdgx.h \
    9596 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 \
    9799 $(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 \
    101109 $(EROSDEVREP)/Include/exceptions.h \
    102110 $(EROSDEVREP)/Include/peidainit.h \
     
    106114 $(EROSDEVREP)/Include/ppersist.h \
    107115 $(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 \
    114117 $(EROSDEVREP)/Include/fitsimage.h \
    115118 $(EROSDEVREP)/Include/fitsheader.h \
     
    125128 $(EROSDEVREP)/Include/xstrstream.h \
    126129 $(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
    127138$(OBJ)piinit.o: piinit.cc $(EROSDEVREP)/Include/defs.h piinit.h \
    128139 $(EROSDEVREP)/Include/strecinit.h \
     
    137148 picontainerx.h picontainergen.h pimenubarx.h picons.h pistdwdgx.h \
    138149 pistdwdggen.h pibwdgx.h pibwdggen.h picmap.h picmapx.h picmapgen.h \
    139  pigraphx.h pigraphgen.h psfile.h $(EROSDEVREP)/Include/defs.h \
    140  pigraphps.h
     150 pigraphx.h pigraphgen.h pigraphuc.h psfile.h \
     151 $(EROSDEVREP)/Include/defs.h pigraphps.h
    141152$(OBJ)pimenubarx.o: pimenubarx.cc pimenubarx.h pimenubargen.h pisysdep.h \
    142153 pimenux.h pimenugen.h piwdgx.h piwdggen.h pimsghandler.h piapplx.h \
    143154 piapplgen.h picontainerx.h picontainergen.h picons.h pistdwdgx.h \
    144155 pistdwdggen.h pibwdgx.h pibwdggen.h picmap.h picmapx.h picmapgen.h \
    145  pigraphx.h pigraphgen.h psfile.h $(EROSDEVREP)/Include/defs.h \
    146  pigraphps.h
     156 pigraphx.h pigraphgen.h pigraphuc.h psfile.h \
     157 $(EROSDEVREP)/Include/defs.h pigraphps.h
    147158$(OBJ)pimenugen.o: pimenugen.cc pimenugen.h pisysdep.h piwdgx.h piwdggen.h \
    148159 pimsghandler.h
    149 $(OBJ)pimenux.o: pimenux.cc pimenux.h pimenugen.h pisysdep.h piwdgx.h \
    150  piwdggen.h pimsghandler.h
     160$(OBJ)pimenux.o: pimenux.cc pisysdep.h pimenubarx.h pimenubargen.h pimenux.h \
     161 pimenugen.h piwdgx.h piwdggen.h pimsghandler.h
    151162$(OBJ)pimsghandler.o: pimsghandler.cc pimsghandler.h
    152163$(OBJ)pintuple.o: pintuple.cc pintuple.h $(EROSDEVREP)/Include/ntuple.h \
     
    157168 $(EROSDEVREP)/Include/pclassids.h piscdrawwdg.h pisysdep.h \
    158169 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
    165175$(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
    168181$(OBJ)piperiodx.o: piperiodx.cc piwdgx.h piwdggen.h pimsghandler.h \
    169182 piperiodx.h $(EROSDEVREP)/Include/periodic.h \
     
    171184$(OBJ)pipixmapgen.o: pipixmapgen.cc pipixmapgen.h pisysdep.h pibwdgx.h \
    172185 pibwdggen.h piwdgx.h piwdggen.h pimsghandler.h picmap.h picmapx.h \
    173  picmapgen.h pigraphx.h pigraphgen.h psfile.h \
     186 picmapgen.h pigraphx.h pigraphgen.h pigraphuc.h psfile.h \
    174187 $(EROSDEVREP)/Include/defs.h pigraphps.h
    175188$(OBJ)pipixmapx.o: pipixmapx.cc pipixmapx.h pipixmapgen.h pisysdep.h \
    176189 pibwdgx.h pibwdggen.h piwdgx.h piwdggen.h pimsghandler.h picmap.h \
    177  picmapx.h picmapgen.h pigraphx.h pigraphgen.h psfile.h \
     190 picmapx.h picmapgen.h pigraphx.h pigraphgen.h pigraphuc.h psfile.h \
    178191 $(EROSDEVREP)/Include/defs.h pigraphps.h
    179192$(OBJ)piscdrawwdg.o: piscdrawwdg.cc $(EROSDEVREP)/Include/generalfit.h \
     
    187200 $(EROSDEVREP)/Include/cvector.h piscdrawwdg.h pisysdep.h pibwdgx.h \
    188201 pibwdggen.h piwdgx.h piwdggen.h pimsghandler.h picmap.h picmapx.h \
    189  picmapgen.h pigraphx.h pigraphgen.h psfile.h pigraphps.h pistdwdgx.h \
    190  pistdwdggen.h piwindowx.h piwindowgen.h picontainerx.h \
    191  picontainergen.h pidrawer.h pigraphuc.h
     202 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
    192205$(OBJ)pistdwdggen.o: pistdwdggen.cc pistdwdggen.h pisysdep.h piwdgx.h \
    193206 piwdggen.h pimsghandler.h
     
    214227 $(EROSDEVREP)/Include/pixelmap.h \
    215228 $(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
    221232$(OBJ)piup.o: piup.cc $(EROSDEVREP)/Include/ctimer.h \
    222233 $(EROSDEVREP)/Include/peida.h $(EROSDEVREP)/Include/defs.h \
     
    258269$(OBJ)pixtbase.o: pixtbase.cc pixtbaseP.h pibwdgx.h pisysdep.h pibwdggen.h \
    259270 piwdgx.h piwdggen.h pimsghandler.h picmap.h picmapx.h picmapgen.h \
    260  pigraphx.h pigraphgen.h psfile.h $(EROSDEVREP)/Include/defs.h \
    261  pigraphps.h pixtbase.h
     271 pigraphx.h pigraphgen.h pigraphuc.h psfile.h \
     272 $(EROSDEVREP)/Include/defs.h pigraphps.h pixtbase.h
    262273$(OBJ)psfile.o: psfile.cc psfile.h $(EROSDEVREP)/Include/defs.h \
    263274 pisysdep.h pigraphgen.h piwdgx.h piwdggen.h pimsghandler.h picmap.h \
  • trunk/SophyaPI/PI/parradapter.cc

    r106 r111  
    3737void P2DArrayAdapter::XYfromxy(int ix, int iy, float& x, float& y)
    3838{
    39 x = ix+0.5;
    40 y = iy+0.5;
     39x = ix;
     40y = iy;
    4141}
    4242
     
    4444int P2DArrayAdapter::CheckDyn(float& min, float& max, float& moy, float& sig, int& nbnul, int& nbsat, int vit)
    4545{
    46 TIMEF ;
     46// TIMEF ;
    4747double m = 0.;
    4848double s = 0.;
     
    100100void P2DArrayAdapter::ComputeLut_PicHisto(float& min, float& max, int nbsig, float fracmax)
    101101{
    102 TIMEF ;
     102// TIMEF ;
    103103int MINNBIN = 64;
    104104int MAXNBIN = 1024;
     
    221221                int xwsz, int ywsz, unsigned char * opix, int * oxsp, int * oysp)
    222222{
    223 TIMEF ;
     223// TIMEF ;
    224224unsigned char *pix, *pp, ucp;
    225225int zmm=1;
  • trunk/SophyaPI/PI/parradapter.h

    r104 r111  
    2323                                int sx=-1, int sy=-1);
    2424
     25  inline void     GetAxesConfiguration(bool& invx, bool& invy, bool& exy)
     26                               { invx = invX; invy = invY; exy = eXY; }
    2527// Doit etre defini par les classes derivees
    2628  virtual float   Value(int ix, int iy) = 0;   
     
    3436                         { int ix, iy;  IJ2xy(i, j, ix, iy);
    3537                           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; } }
    3641  inline  float   operator() (int i, int j)
    3742                         { int ix, iy;  IJ2xy(i, j, ix, iy);
  • trunk/SophyaPI/PI/piapplx.cc

    r110 r111  
    1717//  Voir fichier pimenux.cc , Pour resoudre certains conflits avec les WindowManagers
    1818void SetTopWdgForMenuX(SysDWdg mtw);
     19
     20static PIApplication* cur_piapp = NULL;
     21PIApplication* PIApplicationGetApp() { return cur_piapp; }
    1922
    2023/* --Methode-- */
     
    6568  }
    6669
     70cur_piapp = this;
    6771mState = -1;
    6872SetReady();
     
    8387delete topwdg;
    8488XtCloseDisplay(mdsp);
     89cur_piapp = NULL;
    8590return;
    8691}
  • trunk/SophyaPI/PI/piapplx.h

    r92 r111  
    3434typedef PIApplicationX PIApplication;
    3535
     36//  Pour recuperer un objet PIApplication
     37PIApplication* PIApplicationGetApp();
    3638#endif
  • trunk/SophyaPI/PI/pibwdggen.cc

    r107 r111  
    198198/* --Methode-- */
    199199int 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)
    201201{
    202202if (drw == NULL)   return(0);
     
    205205did.x1 = x1;  did.y1 = y1;
    206206did.x2 = x2;  did.y2 = y2;
    207 did.autoszp = did.autolim = false;   did.elastic = psz;
     207did.autoszp = did.autolim = false;   
     208did.elastic = psz;  did.clip = clip;
    208209did.id = mDrwId;  did.ad = ad;
    209210did.drw = drw;
     
    214215
    215216/* --Methode-- */
    216 int PIBaseWdgGen::AddDrawer(PIDrawer* drw, bool autolim, bool ad)
     217int PIBaseWdgGen::AddDrawer(PIDrawer* drw, bool autolim, bool clip, bool ad)
    217218{
    218219if (drw == NULL)   return(0);
     
    221222did.x1 = 0.;  did.y1 = 0.;
    222223did.x2 = 1.;  did.y2 = 1.;
    223 did.autoszp = true;   did.autolim = autolim;   did.elastic = false;
     224did.autoszp = true;   did.autolim = autolim;   
     225did.elastic = false;   did.clip = clip;
    224226did.id = mDrwId;  did.ad = ad;
    225227did.drw = drw;
     
    333335// L'ordre des operations ici est importante
    334336  if ( (*it).autolim ) 
    335      (*it).drw->SetLimits(mDrXmin, mDrXmax, mDrYmin, mDrYmax, mDXdir, mDYdir);
     337     (*it).drw->SetLimits(mDrXmin, mDrXmax, mDrYmin, mDrYmax, mDXdir, mDYdir);     
    336338  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; }
    338340  (*it).drw->SelGraAtt(guc);
    339   fgc = true;
    340341  if (sxy) {
    341342    guc->GrC2UC(x0, y0, xmin, ymin);
     
    395396      }
    396397// L'ordre des operations ici est importante
    397     if ( (*it).autolim )  
     398    if ( (*it).autolim )
    398399       (*it).drw->SetLimits(mDrXmin, mDrXmax, mDrYmin, mDrYmax, mDXdir, mDYdir);
    399400    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);
    401402    (*it).drw->SelGraAtt(guc);
    402403    guc->GrC2UC(0, 0, xmin, ymin);
     
    406407    (*it).drw->Draw(guc, xmin, ymin, xmax, ymax);
    407408    g->RestoreGraphicAtt();   
    408     g->ClearClipRectangle();
     409    if ((*it).clip)  g->ClearClipRectangle();
    409410    break;
    410411  }
  • trunk/SophyaPI/PI/pibwdggen.h

    r107 r111  
    8787          int        AddDrawer(PIDrawer* drw, PIGrCoord x1, PIGrCoord y1,
    8888                               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);
    9191          void       MoveResizeDrawer(int id, PIGrCoord x1, PIGrCoord y1,
    9292                                      PIGrCoord x2, PIGrCoord y2, bool psz=true);
     
    103103
    104104// 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; };
    106106
    107107  virtual PIGraphic*  WindowGraphic();
  • trunk/SophyaPI/PI/picontainergen.cc

    r76 r111  
    141141}
    142142
     143/* --Methode-- */
     144int PIContainerGen::NbChilds()
     145{
     146return(mNCh);
     147}
     148
    143149
    144150/* --Methode-- */
  • trunk/SophyaPI/PI/picontainergen.h

    r32 r111  
    2626  virtual void         ChildAdd(PIWdgGen * child);
    2727  virtual void         ChildDel(PIWdgGen * child);
     28  virtual int          NbChilds();
    2829
    2930  void                 SetAutoDelChilds(bool ad = false);
  • trunk/SophyaPI/PI/pidrawer.cc

    r107 r111  
    1111  SetLimits(-1, 1, -1, 1, kAxeDirLtoR, kAxeDirDownUp);
    1212  limitsFixed = 0;
    13   SetAxesFlags(kAxesDflt);
     13  SetAxesFlags();   // Pas de trace d'axes par defaut
    1414  mDndfg = false;  // Pour controle de l'appel de Detach() si delete
    1515
     
    3636                    int axrl, int ayud)
    3737{
     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  }
    3848  if (xmax <= xmin || ymax <= ymin)
    3949    return; // $CHECK$ exception ?
     
    176186
    177187void
    178 PIDrawer::SetAxesFlags(int flags)
     188PIDrawer::SetAxesFlags(unsigned int flags)
    179189{
    180190  axesFlags = flags;
     
    189199
    190200void
    191 PIDrawer::DrawAxes(PIGraphicUC* g, int flags)
     201PIDrawer::DrawAxes(PIGraphicUC* g)
    192202{
    193203  g->NoClip();
    194   if (flags == -1)
    195     flags = axesFlags;
    196    
    197  
     204  unsigned int flags = axesFlags;
    198205  if (flags & kStdAxes) {
    199206 
     
    358365}
    359366
     367
     368/*  --------------------------------------------------------------  */
     369/*  ------------------- Classe PIElDrawer ------------------------  */
     370/*  --------------------------------------------------------------  */
     371
     372/* --Methode-- */
     373PIElDrawer::PIElDrawer()
     374{
     375mEn = 0;
     376}
     377
     378/* --Methode-- */
     379PIElDrawer::~PIElDrawer()
     380{
     381}
     382
     383/* --Methode-- */
     384void  PIElDrawer::Draw(PIGraphicUC* g, float /*xmin*/, float /*ymin*/, float /*xmax*/, float /*ymax*/)
     385{
     386DrawAxes(g);   // Trace des axes
     387
     388DrwElList::iterator it;
     389for (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-- */
     419int PIElDrawer::ElAdd(int typ, PIGrCoord x, PIGrCoord  y, PIGrCoord dx, PIGrCoord dy, char* s)
     420{
     421DrwEl dre;
     422mEn++;
     423dre.eid = mEn;  dre.etyp = typ;
     424dre.ex = x;   dre.ey = y;
     425dre.edx = dx;  dre.edy = dy;
     426if (s)  dre.es = s;
     427mElist.push_back(dre);
     428return(mEn);
     429}
     430
     431/* --Methode-- */
     432void  PIElDrawer::ElDel(int id)
     433{
     434DrwElList::iterator it;
     435for (it = mElist.begin(); it != mElist.end(); it++)
     436  if ( (*it).eid == id) { mElist.erase(it);   break; }
     437return;
     438}
     439
     440/* --Methode-- */
     441void  PIElDrawer::ElDelAll()
     442{
     443mElist.erase(mElist.begin(), mElist.end());
     444return;
     445}
     446
  • trunk/SophyaPI/PI/pidrawer.h

    r107 r111  
    1515  kMinTicks    = 0x0080,
    1616  kLabels      = 0x1000,
    17   kAxesDflt    = kStdAxes | kTicks | kLabels
     17  kAxesDflt    = kStdAxes | kTicks | kLabels,       // Axes trace par defaut
     18  kAxesNone    = 0                                  // Pas de trace d axe 
    1819};
    1920
     
    2728                               int axrl=kAxeDirSame, int ayud=kAxeDirSame);
    2829
    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);
    3132   
    3233  virtual void       Draw(PIGraphicUC* g, float xmin, float ymin, float xmax, float ymax);
     
    8788 
    8889  int limitsFixed;
    89   int axesFlags;
     90  unsigned int axesFlags;
    9091 
    9192  PIBaseWdgGen* mBWdg;
     
    106107
    107108
     109//  Classe avec gestion d une liste d elements a tracer
     110
     111class PIElDrawer : public PIDrawer
     112{
     113public:
     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
     139protected:
     140  int                ElAdd(int typ, PIGrCoord x, PIGrCoord y, PIGrCoord dx, PIGrCoord dy, char* s);
     141#ifdef __DECCXX
     142public:
    108143#endif
     144  struct DrwEl{
     145    int eid, etyp;
     146    PIGrCoord ex,ey;
     147    PIGrCoord edx,edy;
     148    string es;
     149  };
     150#ifdef __DECCXX
     151protected:
     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  
    4444                         int axrl, int ayud)
    4545{
    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)
    4759    return; // $CHECK$ exception ?
    4860  if (axrl == kAxeDirLtoR)  aXdir = false;
  • trunk/SophyaPI/PI/pigraphuc.h

    r71 r111  
    99  kAxeDirLtoR     = 1,
    1010  kAxeDirRtoL     = 2,
    11   kAxeDirDownUp   = 3,
    12   kAxeDirUpDown   = 4
     11  kAxeDirDownUp   = 4,
     12  kAxeDirUpDown   = 8,
     13  kAxeDirAuto     = 255
    1314};
    1415
  • trunk/SophyaPI/PI/piimage.cc

    r107 r111  
    1010
    1111#include "piimage.h"
    12 
    1312#include "imageop.h"
    1413
     14// --------------------------------------------------------------------------------
     15// ----------------------------- Classe PIImage -----------------------------------
     16// --------------------------------------------------------------------------------
     17// Variable globale pour la gestion de l'image courante
     18PIImage* PIImage::cur_piimage = NULL;
     19/* --Methode-- */
     20PIImage* PIImage::CurrentPIImage()
     21{
     22return(cur_piimage);
     23}
     24
     25/* --Methode-- */
     26void PIImage::SetCurrentPIImage(PIImage* curimg)
     27{
     28cur_piimage = curimg;
     29}
    1530
    1631/* --Methode-- */
     
    4560zmgv = 1;
    4661
     62mdrw = new PIElDrawer();
     63gvdrw = new PIElDrawer();
     64AddDrawer(mdrw, true, false, false);
     65
    4766SetColMap(CMAP_COLRJ32);
    4867
    4968SetBackgroundColor(PI_Black);
    5069
     70ActivateKeyboard();
    5171ActivateButton(1);
    5272ActivateMove(1);
     
    5676ActivateMove(3);
    5777
     78cur_piimage = this;
    5879}
    5980
     
    7899  }
    79100if (lut) delete lut;
    80 if (aisup)  delete img;   // Suppression automatique d'image
     101delete mdrw;
     102delete gvdrw;
     103if (aisup && img)  delete img;   // Suppression automatique d'image
    81104if (trtw)  delete trtw;
     105if (this == cur_piimage)  cur_piimage = NULL;
    82106}
    83107
     
    122146}
    123147
     148/* --Methode-- */
     149void PIImage::ChangeAxesConfiguration(bool ix, bool iy, bool xy, bool refr)
     150{
     151if (!img) return;
     152bool invx, invy, exy;
     153img->GetAxesConfiguration(invx, invy, exy);
     154if (ix)  invx = !invx;
     155if (iy)  invy = !invy;
     156if (xy)  exy = !exy;
     157img->ConfigureAxes(invx, invy, exy);
     158ComputeGloVPixmap();
     159if (refr) Apply();
     160}
    124161
    125162/* --Methode-- */
     
    282319void PIImage::SetColMap(CMapId cmap, bool refr)
    283320{
     321if ( (cmap == CMAP_GREY32) || (cmap == CMAP_GREYINV32) )  mdrw->SetColAtt(PI_Red);
     322else mdrw->SetColAtt(PI_White);
    284323PIPixmap::SetColMap(cmap, refr);
    285324if (zow)  zow->SetColMap(cmap, refr);
     
    297336  ComputePixmap();
    298337  Send(Msg(), PIMsg_Active);
     338  cur_piimage = this;
    299339  }
    300340if (zow != NULL)   ComputeZoomPixmap();
     
    343383
    344384/* --Methode-- */
     385void PIImage::Keyboard(int key, PIKeyModifier kmod)
     386{
     387if (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
     392else 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-- */
    345415void PIImage::But1Press(int x, int y)
    346416{
     
    348418
    349419Send(Msg(), PIMsg_Active);
     420cur_piimage = this;
    350421if (img == NULL)  return;
    351422if ( PosW2Img(x, y, &xp, &yp) )  return;
     
    386457
    387458Send(Msg(), PIMsg_Active);
     459cur_piimage = this;
    388460if (img == NULL)  return;
    389461if ( PosW2Img(x, y, &xpv0, &ypv0) )  {  xmv0 = -1;  return; }
     
    452524
    453525Send(Msg(), PIMsg_Active);
     526cur_piimage = this;
    454527if (img == NULL)  return;
    455528if ( PosW2Img(x, y, &xp, &yp) )  { xmv0 = -1;  return; }
     
    505578
    506579/* --Methode-- */
     580void PIImage::PasteSelection(unsigned int typ, void *pdata, unsigned int l)
     581{
     582if (typ != PICP_string) return;
     583int ll = (l<128) ? l+1 : 128;
     584char pc[128];
     585strncpy(pc, (char*)pdata, ll-1);  pc[ll-1] = '\0';
     586float fx, fy;
     587img->Coord(xpav, ypav, fx, fy);
     588mdrw->ElAddText(fx, fy, pc );
     589mdrw->Refresh();
     590}
     591
     592/* --Methode-- */
    507593void PIImage::ComputePixmap()
    508594{
     
    510596
    511597if (img == NULL)  return;
    512 xwsz = this->XSize();
    513 ywsz = this->YSize();
     598xwsz = XSize();
     599ywsz = YSize();
    514600
    515601pixm = img->ComputePixmap(lut, offx, offy, zoom, xwsz, ywsz, pixm, &xspxm, &yspxm);
    516 SetPixmap(pixm, xspxm, yspxm);
     602int xw1, yw1, xw2, yw2;
     603xw1 = (xwsz-xspxm)/2;
     604if (xw1 < 0) xw1 = 0;
     605yw1 = (ywsz-yspxm)/2;
     606if (yw1 < 0) yw1 = 0;
     607xw2 = xspxm+xw1;
     608yw2 = yspxm+yw1;
     609SetDefaultDrawRectangle(xw1, yw1, xw2, yw2, false);
     610printf("--DBG-- ComputePixmap() %d %d $ %d %d :: %d %d , %d %d \n", xwsz, ywsz, xspxm, yspxm, xw1, yw1, xw2, yw2);
     611int x1,y1, x2,y2;
     612ofx = xw1;  ofy = yw1;
     613PosW2Img(xw1, yw1, &x1, &y1);
     614PosW2Img(xw2, yw2, &x2, &y2);
     615float fx1,fy1, fx2, fy2;
     616img->Coord(x1,y1, fx1, fy2);  // fy1 et fy2 echange expres pour utiliser kAxeDirAuto 
     617img->Coord(x2,y2, fx2, fy1);  // En effet Image de haut vers bas, Axes de bas vers haut par defaut
     618SetDefaultDrawerLimits(fx1, fx2, fy1, fy2, kAxeDirAuto, kAxeDirAuto);
     619printf("--DBG2-- ComputePixmap() %g %g  %g %g  \n", fx1, fx2, fy1, fy2);
     620xcurs = ycurs = -1;
     621SetPixmap(pixm, xspxm, yspxm, true, xw1, yw1);
    517622// Refresh();
    518623return;
     
    524629{
    525630unsigned int xwsz, ywsz;
    526 int ofx, ofy;
     631int lofx, lofy;
    527632int zm;
    528633
     
    537642if (zm > 0)
    538643  {
    539   ofx = xpav-(xwsz/2/zm);
    540   ofy = ypav-(ywsz/2/zm);
     644  lofx = xpav-(xwsz/2/zm);
     645  lofy = ypav-(ywsz/2/zm);
    541646  }
    542647else
    543648  {
    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  }
     652if (lofx < 0)  lofx = 0;
     653if (lofy < 0)  lofy = 0;
     654
     655zpixm = img->ComputePixmap(lut, lofx, lofy, zm, xwsz, ywsz, zpixm, &xszpxm, &yszpxm);
    551656zow->SetColMap(GetColMapId(), false);
    552657zow->SetPixmap(zpixm, xszpxm, yszpxm);
     
    578683if (zmx > 1)  zmx = -zmx;
    579684gpixm = 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);
    581686return;
    582687}
     
    588693int x,y, dx,dy;
    589694
     695int xw1, yw1, xw2, yw2;
     696xw1 = (gvw->XSize()-xsgpxm)/2;
     697if (xw1 < 0) xw1 = 0;
     698yw1 = (gvw->YSize()-ysgpxm)/2;
     699if (yw1 < 0) yw1 = 0;
     700xw2 = xsgpxm+xw1;
     701yw2 = ysgpxm+yw1;
     702
    590703if (zoom > 0) zm = zmgv*zoom;
    591704else zm = (float)zmgv/(float)(-zoom);
    592 x = offx/zmgv+1;
    593 y = offy/zmgv+1;
     705x = offx/zmgv+1+xw1;
     706y = offy/zmgv+1+yw1;
    594707dx =  (int) ( (float)XSize()/zm-1. ); 
    595708dy =  (int) ( (float)YSize()/zm-1. ); 
    596709
    597 
    598 gvw->ElDelAll();
    599 gvw->WindowGraphic()->SelForeground(PI_Yellow);
    600 gvw->WindowGraphic()->SelLine(PI_NormalLine);
    601 gvw->ElAddRect(x,y,dx,dy);
     710gvw->DeleteDrawers();
     711gvdrw->ElDelAll();
     712gvdrw->SetLimits(xw1, xw2, yw1, yw2, kAxeDirLtoR, kAxeDirUpDown);
     713gvdrw->SetColAtt(PI_Yellow);
     714gvdrw->SetLineAtt(PI_NormalLine);
     715gvdrw->ElAddRect(x,y,dx,dy);
     716gvw->AddDrawer(gvdrw, xw1, yw1, xw2, yw2, false);
    602717gvw->SetColMap(GetColMapId(), false);
    603 gvw->SetPixmap(gpixm, xsgpxm, ysgpxm);
     718gvw->SetPixmap(gpixm, xsgpxm, ysgpxm, true, xw1, yw1);
    604719gvw->SetUserData((void *)this, 0);
    605720gvw->SetMsg(Msg()+626);
     
    624739{
    625740
    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);
     741if (winovis)  return;      // $CHECK$ Reza A enlever si possible 17/6/96
     742
     743g->SelGOMode(PI_GOXOR);
     744if (GetColMapId() == CMAP_COLRJ32)
     745g->SelForeground(PI_Yellow);
     746else g->SelForeground(PI_Magenta);
     747
     748if (zoom < 3)  g->SelLine(PI_NormalLine);
     749else g->SelLine(PI_ThickLine);
     750
     751if ((xcurs>=0) && (ycurs>=0)) {
     752//  PIPixmap::Draw(g, xcurs-CURSHSIZE, ycurs-CURSHSIZE, CURSHSIZE*2, CURSHSIZE*2);
    639753  g->DrawLine(xcurs-CURSHSIZE, ycurs, xcurs-4, ycurs);
    640754  g->DrawLine(xcurs+4, ycurs, xcurs+CURSHSIZE, ycurs);
    641755  g->DrawLine(xcurs, ycurs-CURSHSIZE, xcurs, ycurs-4);
    642756  g->DrawLine(xcurs, ycurs+4, xcurs, ycurs+CURSHSIZE);
     757}
     758if ((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);
    643765  }
    644766else { xcurs = ycurs = -1; }
    645767
     768g->SelGOMode(PI_GOCopy);
     769g->SelLine(PI_NormalLine);
     770g->SelForeground(PI_White);
    646771return;
    647772}
     
    667792int PIImage::PosW2Img(int xiw, int yiw, int * xp, int * yp)
    668793{
    669 
     794xiw -= ofx;  yiw -= ofy;   // Offset d'affichage du pixmap
    670795if (zoom > 0)
    671796  {
     
    699824  }
    700825
     826*xiw += ofx;  *yiw += ofy;    // Offset d'affichage du pixmap
    701827if (*xiw > XSize())  *xiw = -1;
    702828if (*yiw > YSize())  *yiw = -1;
  • trunk/SophyaPI/PI/piimage.h

    r107 r111  
    33// LAL (Orsay) / IN2P3-CNRS  DAPNIA/SPP (Saclay) / CEA
    44
    5 #ifndef PIIMAGEBASE_H_SEEN
    6 #define PIIMAGEBASE_H_SEEN
     5#ifndef PIIMAGE_H_SEEN
     6#define PIIMAGE_H_SEEN
    77
    88#include "parradapter.h"
     
    1010#include "pisysdep.h"
    1111
     12#include "pidrawer.h"
    1213#include PIPIXMAP_H
    1314#include PISTDWDG_H
     
    2728
    2829  virtual long    kind() {return ClassId; }
    29   virtual void    Process(PIMessage msg, PIMsgHandler* sender, void* data=NULL);
    3030
     31//  Tableau des pixels et changement de configuration des axes
    3132  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(); }
    3236
     37// Fenetre de Zoom, text, ...
    3338  void SetZoomWin(PIPixmap * zw, bool refr=true);
    3439  void SetGloVWin(PIPixmap * zw, bool refr=true);
     
    3641  void ShowCursor(bool sc=true);
    3742
     43//  Gestion du choix de LUT, facteur d agrandissement, table de couleur
    3844  void SetLut(float min, float max, int typlut=kLutType_Lin,
    3945              int lauto=0, bool refr=true);
     
    4450  float GetZoomF();
    4551
     52  virtual void SetColMap(CMapId cmap, bool refr=true);
     53
    4654  void SetOffset(int ox, int oy, bool refr=true);
    4755  void SetPave(int x, int y, bool refr=true, bool cent=true);
    48 
    49   virtual void SetColMap(CMapId cmap, bool refr=true);
    5056
    5157  inline P2DArrayAdapter * Image() { return(img); }
     
    6268  virtual void Draw(PIGraphic* g, int x0, int y0, int dx, int dy);
    6369
     70  virtual void Keyboard(int key, PIKeyModifier kmod);
    6471  virtual void But1Press(int x, int y);
    6572  virtual void But1Release(int x, int y);
     
    7279  virtual void Ptr3Move(int x, int y);
    7380
    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
     87protected:
     88  virtual void    Process(PIMessage msg, PIMsgHandler* sender, void* data=NULL);
    7689  void ComputePixmap();
    7790  void ComputeZoomPixmap();
     
    100113  LUT * lut;
    101114  int offx, offy;
     115  PIElDrawer* mdrw;
    102116// Fenetre de zoom
    103117  int zoom;
     
    110124  unsigned char * gpixm;
    111125  int xsgpxm, ysgpxm;
     126  PIElDrawer* gvdrw;
    112127// Fenetre/champ de texte
    113128  PILabel * txw;
     
    122137  int xszpav, yszpav;
    123138
     139//  PIImage courante
     140  static PIImage* cur_piimage;
    124141};
    125142
  • trunk/SophyaPI/PI/pipixmapgen.cc

    r71 r111  
    2121mPpos[0] = mPpos[0] = 0;
    2222cmap = new PIColorMap(CMAP_GREY32);
    23 mEn = 0;
    2423ActivateButton(1);
    2524}
     
    7069
    7170
    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 
    13671
    13772// Fin des methodes de la classe
  • trunk/SophyaPI/PI/pipixmapgen.h

    r71 r111  
    1616  enum {ClassId = 5100};
    1717
    18   enum { PIDEL_Line = 1, PIDEL_Text = 2,
    19          PIDEL_Rect = 3, PIDEL_FRect = 4,
    20          PIDEL_Circ = 5, PIDEL_FCirc = 6 } ;
    21 
    2218                PIPixmapGen(PIContainerGen *par, char *nom,
    2319                         int sx=10, int sy=10, int px=0, int py=0);
     
    3632  inline  int   YPPos() { return mPpos[1]; }
    3733
    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 
    5434protected:
    55   int           ElAdd(int typ, int x, int y, int dx, int dy, char* s);
    56   virtual void  DrawElements(PIGraphicGen* g);
    57 
    5835  unsigned char *pixmap;
    5936  int nx, ny;
     
    6138  PIColorMap* cmap;
    6239
    63 #ifdef __DECCXX
    64 public:
    65 #endif
    66   struct DrwEl{
    67     int eid, etyp;
    68     int ex,ey;
    69     int edx,edy;
    70     string es;
    71   };
    72 #ifdef __DECCXX
    73 protected:
    74 #endif
    75   typedef list<DrwEl> DrwElList;
    76 
    77   DrwElList mElist;
    78   int mEn;
    7940  int mPpos[2];
    8041}; 
  • trunk/SophyaPI/PI/pipixmapx.cc

    r71 r111  
    6868    g->DrawPixmap(0, 0, pixmap, nx, ny, cmap);
    6969  /*  Il faut faire quelque chose Sinon ??! */
    70     DrawElements(g);
    7170  }
    7271else  Draw(g, 0, 0, XSize(), YSize());
     
    113112 
    114113XPutImage(mdsp, xw, mygc, myximg, ox, oy, x0, y0, dx, dy);
    115 DrawElements(g);
    116114XFlush(mdsp);
    117115return;
  • trunk/SophyaPI/PI/piscdrawwdg.cc

    r107 r111  
    66:PIBaseWdg(par, nom, sx, sy, px, py)
    77{
    8   mBDrw = new PIDrawer;
     8  mBDrw = new PIElDrawer;
    99  SetLimits(-1.,1.,-1.,1.,kAxeDirLtoR,kAxeDirDownUp);
    1010  SetAxesFlags(kBoxAxes | kExtTicks | kLabels); 
     
    1212  xEndDrag = yEndDrag = xBegDrag = yBegDrag = 0;
    1313  SetDefaultDrawRectangle(0.12, 0.12, 0.88, 0.88, true);
    14 
     14  AddDrawer(mBDrw, true, false, false);
     15 
    1516  mTrlb = mTxw = NULL;
    1617  mTrW = NULL;
     
    3637  if (xmax <= xmin || ymax <= ymin)
    3738    return; // $CHECK$ exception ?
    38   mBDrw->SetLimits(xmin, xmax, ymin, ymax, axrl, ayud);
    3939  SetDefaultDrawerLimits(xmin, xmax, ymin, ymax, axrl, ayud);
    4040  mPPos[0] = 0.5*(XMin()+XMax());
     
    4646    yMaxS = ymax;
    4747  }
    48 }
    49 
    50 void
    51 PIScDrawWdg::Resize()
    52 {
    53   //  SetSpan();
    54   //  Refresh();  $CHECK$ Faut-il appeler ? Reza 08/02/98
    55 }
    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 void
    69 PIScDrawWdg::DrawAxes(PIGraphicUC* g, int flags)
    70 {
    71   mBDrw->DrawAxes(g, flags);
    72 }
    73 
    74 
    75 void
    76 PIScDrawWdg::SetAxesFlags(int flags)
    77 {
    78   mBDrw->SetAxesFlags(flags);
    7948}
    8049 
     
    11382  EraseWindow();
    11483  if (! LimitsFixed() ) {  //  On met a jour les limites a partir du premier Drawer
    115     PIDrawer* drw = GetDrawer(0);
     84    PIDrawer* drw = GetDrawer(1);
    11685    if (drw != NULL)   {   
    11786      drw->UpdateSize();
     
    12089    else SetLimits(0., 1., 0., 1.);
    12190    }
    122   PIGraphicUC* guc = SetSpan(g);
    123   DrawAxes(guc);
    124   DrawSelf(guc, -9.e19, -9.e19, 9.e19, 9.e19);
    12591}
    12692
     
    12894PIScDrawWdg::Draw(PIGraphic* g, int x0, int y0, int dx, int dy)
    12995{
    130   EraseWindow();
     96//  EraseWindow();
    13197  if (! LimitsFixed() ) {  //  On met a jour les limites a partir du premier Drawer
    132     PIDrawer* drw = GetDrawer(0);
     98    PIDrawer* drw = GetDrawer(1);
    13399    if (drw != NULL)   {   
    134100      drw->UpdateSize();
     
    137103    else SetLimits(0., 1., 0., 1.);
    138104    }
    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 void
    151 PIScDrawWdg::DrawSelf(PIGraphicUC*, float /*xmin*/, float /*ymin*/, float /*xmax*/, float /*ymax*/)
    152 {
    153 return;
    154105}
    155106
    156107
    157108// Gestion affichage coordonnees du point
    158 
    159109
    160110string   PIScDrawWdg::GetClickText(float x, float y)
  • trunk/SophyaPI/PI/piscdrawwdg.h

    r107 r111  
    2222
    2323  virtual long       kind() {return ClassId; }
    24 
    25   virtual void       Resize();
    2624 
    2725  virtual void       Draw(PIGraphic* g);
    2826  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);
    3027 
    3128  void               SetLimits(float xmin, float xmax, float ymin, float ymax,
    3229                               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); }
    3631
    3732  int                AddScDrawer(PIDrawer*, bool ad=false);   // Ajoute un Drawer en auto
    38 
    3933  PIDrawer*          BaseDrawer() { return mBDrw; };
    4034
     
    6256 
    6357protected:
    64        PIGraphicUC*  SetSpan(PIGraphicGen* g);
    65 
    6658  float xMinS, xMaxS, yMinS, yMaxS; // Sauvegarde pour zoom
    6759  float mPPos[2];               // Position click souris X,Y
    6860
    69   PIDrawer* mBDrw;
     61  PIElDrawer* mBDrw;
    7062 
    7163  int xBegDrag, yBegDrag;
  • trunk/SophyaPI/PI/pistdwdggen.cc

    r106 r111  
    1010//      Composant graphique simple permettant d'afficher une étiquette (texte).
    1111//      "PILabelGen" définit l'interface (classe virtuelle pure). Les objets
    12 //      instanciés doivent être de la classe "PILabel" déclaré dans le fichier
     12//      instanciés doivent être de la classe "PILabel" déclarée dans le fichier
    1313//      entête "PISTDWDG_H".
    1414//--
     
    2424// PILabel(PIContainerGen* par, char* nom, int sx=10, int sy=10, int px=0, int py=0)
    2525//      Création d'un objet PILabel ayant un contenu (étiquette) identique à "nom".
    26 // SetLabel(string const& lab)
     26// void SetLabel(string const& lab)
    2727//      Modifie l'étiquette affichée par l'objet
    2828//--
     
    4747//      Composant graphique de type bouton .
    4848//      "PIButtonGen" définit l'interface (classe virtuelle pure). Les objets
    49 //      instanciés doivent être de la classe "PIButton" déclaré dans le fichier
     49//      instanciés doivent être de la classe "PIButton" déclarée dans le fichier
    5050//      entête "PISTDWDG_H". Lors de l'activation, le message de l'objet complété
    5151//      par le modifier "PIMsg_Click" est envoyé ("Send()"). Le champ "data"
     
    6161//--
    6262//++
    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)
    6464//      Création d'un objet PIButton avec une étiquette identique à "nom".
    65 // SetLabel(string const& lab)
     65// void SetLabel(string const& lab)
    6666//      Modifie l'étiquette affichée par l'objet bouton.
    6767//--
     
    8383
    8484/************* 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//--
    85119
    86120PITextGen::PITextGen(PIContainerGen *par, char *nom,
     
    107141{}
    108142
     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
    109173
    110174/************* 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
    111209
    112210PIScaleGen::PIScaleGen(PIContainerGen *par, char *nom, PIMessage msg,
     
    121219
    122220/************* 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//--
    123262
    124263PIScrollBarGen::PIScrollBarGen(PIContainerGen *par, char *nom, PIMessage msg,
  • trunk/SophyaPI/PI/pistdwdgx.cc

    r110 r111  
    356356
    357357XtSetValues(XtWdg(), warg, n);
    358 SetMinMax(1, 10);
     358SetMinMax(1, 100);
    359359SetValue(1);
    360360XtAddCallback(XtWdg(), XmNvalueChangedCallback,
Note: See TracChangeset for help on using the changeset viewer.