Changeset 61 in Sophya


Ignore:
Timestamp:
Nov 26, 1997, 7:30:27 PM (28 years ago)
Author:
ansari
Message:

J'ai remis les fonctions d'Activation d'evts (ActivateButton(), ...) ds

PIBaseWdgGen - et correction petit pb ds pixtbase.cc (Leave etait appele
au moment de Close !) Reza 26/11/97

Location:
trunk/SophyaPI/PI
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaPI/PI/ex_dessin.cc

    r60 r61  
    1717str[20] = '\0';
    1818
     19ActivateKeyboard();
     20ActivateButton(1);
     21ActivateButton(2);
     22ActivateButton(3);
    1923}
    2024
  • trunk/SophyaPI/PI/pibwdggen.h

    r60 r61  
    6262
    6363  virtual long       kind() {return ClassId; }
     64
     65//  Activation des evenements
     66  virtual void       ActivatePtrCross()        = 0;
     67  virtual void       ActivateButton(int bid)   = 0;
     68  virtual void       ActivateMove(int bid)     = 0;
     69  virtual void       ActivateKeyboard()        = 0;
    6470
    6571//  Trace graphiques
  • trunk/SophyaPI/PI/pibwdgmac.cc

    r60 r61  
    2424}
    2525
     26/* --Methode-- */
     27void PIBaseWdgMac::ActivatePtrCross()
     28{
     29// toujours actif pour le moment
     30}
     31
     32/* --Methode-- */
     33void PIBaseWdgMac::ActivateButton(int /*bid*/)
     34{
     35}
     36
     37/* --Methode-- */
     38void PIBaseWdgMac::ActivateMove(int /*bid*/)
     39{
     40}
     41
     42/* --Methode-- */
     43void PIBaseWdgMac::ActivateKeyboard()
     44{
     45}
    2646
    2747/* --Methode-- */
  • trunk/SophyaPI/PI/pibwdgmac.h

    r60 r61  
    1717                                   int sx=10, int sy=10, int px=0, int py=0);
    1818  virtual           ~PIBaseWdgMac();
     19
     20//  Activation des evenements
     21  virtual void       ActivatePtrCross();
     22  virtual void       ActivateButton(int bid);
     23  virtual void       ActivateMove(int bid);
     24  virtual void       ActivateKeyboard();
    1925
    2026//  Trace graphiques
  • trunk/SophyaPI/PI/pibwdgx.cc

    r60 r61  
    6565SelMarker(1, PI_DotMarker);
    6666
    67 // On active tous les evenements ...
    68 ActivatePtrCross();
    69 ActivateKeyboard();
    70 int i;
    71 for(i=1; i<=3; i++) {
    72   ActivateButton(i);
    73   ActivateMove(i);
    74 }
    7567Manage();
    7668}
     
    8072PIBaseWdgX::~PIBaseWdgX()
    8173{
    82 
     74#ifdef DEBUG_PIBWDGX
     75printf("PIBaseWdgX::~PIBaseWdgX()_Debug: Object= %lx (%lx) Wdg= %lx \n",
     76(long)this, (long)(((PIXtBaseWidget)XtWdg())->pixtbase.objet), (long)XtWdg() ); 
     77#endif
     78Arg  wargs[2];
     79XtSetArg(wargs[0],PIXNobject,NULL);
     80XtSetValues(XtWdg(), wargs, 1);
    8381}
    8482
  • trunk/SophyaPI/PI/pibwdgx.h

    r60 r61  
    1717
    1818  virtual void    FinishCreate(); // appele par la fenetre mere, apres XtRealize()
     19
     20//  Activation des evenements   
     21  virtual void   ActivatePtrCross();
     22  virtual void   ActivateButton(int bid);
     23  virtual void   ActivateMove(int bid);
     24  virtual void   ActivateKeyboard();
    1925
    2026//  Trace graphiques
     
    9298  void           Init();
    9399  void           SelectFont(int isz, int jat);
    94 //  Activation des evenements   
    95   void   ActivatePtrCross();
    96   void   ActivateButton(int bid);
    97   void   ActivateMove(int bid);
    98   void   ActivateKeyboard();
    99100
    100101  GC mDefGC;
  • trunk/SophyaPI/PI/piimage.cc

    r60 r61  
    5252SelForeground(PI_White);
    5353SelBackground(PI_Black);
     54
     55ActivateButton(1);
     56ActivateMove(1);
     57ActivateButton(2);
     58ActivateMove(2);
     59ActivateButton(3);
     60ActivateMove(3);
    5461
    5562}
  • trunk/SophyaPI/PI/pipixmapgen.cc

    r60 r61  
    2222cmap = new PIColorMap(CMAP_GREY32);
    2323mEn = 0;
     24ActivateButton(1);
    2425}
    2526
  • trunk/SophyaPI/PI/piscdrawwdg.cc

    r60 r61  
    1818  mTrW = NULL;
    1919  SetTextWin(NULL);
     20  ActivateButton(1);    // Pour pouvoir activer la fenetre et coordonnees
     21  ActivateMove(1);      //    "         "         "        "
     22  ActivateButton(2);
     23  ActivateMove(2);
    2024
    2125}
  • trunk/SophyaPI/PI/pixtbase.cc

    r60 r61  
    1212#include "pixtbase.h"
    1313
     14// #define DEBUG_PIXTB
    1415
    1516/*  Construction du widget Xt PIXtBase   */
     
    138139// get_GCs (wdgp);
    139140#ifdef DEBUG_PIXTB
    140 printf("Debug_init_pixtbase: Object= %ld  narg=%d \n",
    141 (long)(wdgp->pixtbase.objet), (int)(*narg));
     141printf("Debug_init_pixtbase: Wdg=%lx Object= %lx  narg=%d \n",
     142(long)wdgp, (long)(wdgp->pixtbase.objet), (int)(*narg));
    142143#endif
    143144return;
     
    148149{
    149150#ifdef DEBUG_PIXTB
    150 puts("Debug_destroy_pixtbase");
     151printf("Debug_destroy_pixtbase: Wdg= %lx Object= %lx \n", (long)wdgp,
     152(long)(((PIXtBaseWidget)wdgp)->pixtbase.objet) );
    151153#endif
    152154// free_GCs((PIXtBaseWidget)wdgp);
     155//    $CHECK$ Reza  21/11/97
     156// J'ai l'impression que cette fonction n'est pas appellee au moment
     157// de destruction du Widget - Par contre la fonction leave est appelee
     158// si l'action correspondante a ete enregistree ?!
    153159}
    154160
     
    157163static void resize_pixtbase (Widget wdgp)
    158164{
     165#ifdef DEBUG_PIXTB
     166printf("Debug_resize_pixtbase: Wdg=%lx Object= %lx \n", (long)wdgp,
     167(long)(((PIXtBaseWidget)wdgp)->pixtbase.objet) );
     168#endif
    159169if (((PIXtBaseWidget)wdgp)->pixtbase.objet)
    160170  (((PIXtBaseWidget)wdgp)->pixtbase.objet)->Resize();
     
    166176{
    167177#ifdef DEBUG_PIXTB
    168 printf ("debug:expose %ld\n",(long)((PIXtBaseWidget)wdgp)->pixtbase.objet);
     178printf("Debug_expose_pixtbase: Wdg=%lx Object= %lx \n", (long)wdgp,
     179(long)(((PIXtBaseWidget)wdgp)->pixtbase.objet) );
    169180#endif
    170181
     
    185196                            String* /*args*/, Cardinal* /*narg*/)
    186197{
     198#ifdef DEBUG_PIXTB
     199printf("Debug_enter_pixtbase: Wdg=%lx Object= %lx \n", (long)wdgp,
     200(long)(((PIXtBaseWidget)wdgp)->pixtbase.objet) );
     201#endif
    187202last_time_xevt = evt->xcrossing.time;
    188203last_serial_xevt = evt->xcrossing.serial;
     
    196211                            String* /*args*/, Cardinal* /*narg*/)
    197212{
     213#ifdef DEBUG_PIXTB
     214printf("Debug_leave_pixtbase: Wdg=%lx Object= %lx \n", (long)wdgp,
     215(long)(((PIXtBaseWidget)wdgp)->pixtbase.objet) );
     216#endif
    198217last_time_xevt = evt->xcrossing.time;
    199218last_serial_xevt = evt->xcrossing.serial;
Note: See TracChangeset for help on using the changeset viewer.