Changeset 367 in Sophya for trunk


Ignore:
Timestamp:
Aug 9, 1999, 1:55:37 PM (26 years ago)
Author:
ercodmgr
Message:

Modifs ds FinisCreate et logique SetBinding Reza 9/8/99

Location:
trunk/SophyaPI/PI
Files:
8 edited

Legend:

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

    r329 r367  
    7171void PIBaseWdgX::FinishCreate()
    7272{
     73// appele par la fenetre mere, apres XtRealize()
    7374if (finishDone) {
    7475  fprintf(stderr, "BUG/PIBaseWdgX::FinishCreate() multiple call \n");
    7576  return;
    7677  }
    77 // appele par la fenetre mere, apres XtRealize()
     78PIWdgX::FinishCreate();
     79
    7880// J'active le backing store pour la fenetre X
    7981XSetWindowAttributes xswa;
     
    9698if (!mWGrC) mWGrC = new PIGraphicX(this);   
    9799mWGrC->TerminateInit();
    98 finishDone = true;     // FinishCreate() fait
    99100}
    100101
  • trunk/SophyaPI/PI/pibwdgx.h

    r329 r367  
    5656  PIPointer mPtrS;
    5757  PIColors mBCol;
    58   bool finishDone;       // Si FinsihCreate appele
    5958};
    6059
  • trunk/SophyaPI/PI/picontainergen.cc

    r329 r367  
    196196{
    197197if (stfcr)  return;
     198PIWdg::FinishCreate();   
    198199int k;
    199200for(k=0; k<NbChilds(); k++)  GetChild(k)->FinishCreate();
  • trunk/SophyaPI/PI/pioptmenux.cc

    r329 r367  
    7474void PIOptMenuX::FinishCreate()
    7575{
     76PIWdgX::FinishCreate();
    7677// printf("PIOptMenuX::FinishCreate()/DBG  %s \n", Nom().c_str());
    7778if (mSmsg == 0)  SetValue(mMen->ItemMsg(0));
  • trunk/SophyaPI/PI/piwdgx.cc

    r329 r367  
    104104wmis =  k_wmi_appshell;
    105105stmng = false;
     106finishDone = false;
    106107mBKleft =  mBKright =  mBKtop =  mBKbottom = PIBK_free;
    107108#ifdef DEBUG_PIWdgX
     
    119120sdw = NULL;
    120121wmis = k_wmi_unknown;
     122finishDone = false;
    121123mBKleft =  mBKright =  mBKtop =  mBKbottom = PIBK_free;
    122124}
     
    210212void PIWdgX::FinishCreate()
    211213{
    212 #ifdef DEBUG_PIWdgX
    213 printf("Debug_PIWdgX::FinishCreate() ne fait rien ! \n");
    214 #endif
     214// appele par la fenetre mere, apres XtRealize()
     215if (finishDone) {
     216  fprintf(stderr, "BUG/PIWdgX::FinishCreate() multiple call \n");
     217  return;
     218  }
     219finishDone = true;
    215220return;
    216221}
     
    321326                        PIBindingKind right, PIBindingKind bottom)
    322327{
     328if (bindingLock) return;
     329mBKleft = left;  mBKright = right;
     330mBKtop = top;  mBKbottom = bottom;
     331BindWdgtoParent();
     332}
     333
     334
     335/* --Methode-- */
     336void PIWdgX::BindWdgtoParent()
     337{
    323338Arg  wargs[9];
    324339int n=0;
     
    334349XtSetArg(wargs[n],XmNfractionBase, fbase);  n++;
    335350XtSetValues(parent->XtWdg(), wargs, n);
     351
     352PIBindingKind left, top, right, bottom;
     353left = mBKleft;  right = mBKright;
     354top = mBKtop;  bottom = mBKbottom;
    336355
    337356// printf(" DEBUG_SetBinding: C-Sz= %d %d - Sz=%d %d , Pos= %d %d \n",  parent->XSize(),
     
    423442
    424443XtSetValues(this->sdw, wargs, n);
    425 mBKleft = left;  mBKright = right;
    426 mBKtop = top;  mBKbottom = bottom;
    427444// printf(" Out_SetBinding: C-Sz= %d %d - Sz=%d %d , Pos= %d %d \n",  parent->XSize(),
    428445// parent->YSize(), XSize(), YSize(), XPos(), YPos());
  • trunk/SophyaPI/PI/piwdgx.h

    r329 r367  
    8888
    8989protected:
     90// Attache effectivement le widget au container
     91// Parent - Doit etre appele ds FinishCreate 
     92  virtual void          BindWdgtoParent(); 
     93
    9094// Definit le type de Widget, en particulier pour la gestion des feneteres de haut niveau
    9195// k_wmi_cascade : Widget cree en cascade d'un autre (Exemple pour PIWIndowX)
     
    100104  WmIntState wmis;
    101105  bool stmng;
     106  bool finishDone;  // FinishCreate appele
    102107  PIBindingKind mBKleft, mBKright, mBKtop, mBKbottom;
    103108};
  • trunk/SophyaPI/PI/piwindowx.cc

    r329 r367  
    103103
    104104/* --Methode-- */
    105 void PIWindowX::SetBinding(PIBindingKind /*left*/, PIBindingKind /*top*/,
    106                            PIBindingKind /*right*/, PIBindingKind /*bottom*/)
     105void PIWindowX::BindWdgtoParent()
    107106{
    108107// On ne doit rien faire pour les fenetres
  • trunk/SophyaPI/PI/piwindowx.h

    r329 r367  
    1212  virtual                ~PIWindowX();
    1313 
    14   virtual void           SetBinding(PIBindingKind left, PIBindingKind top,
    15                                     PIBindingKind right, PIBindingKind bottom);
    1614  virtual void           SetSize(int sx, int sy);
    1715  virtual void           SetPos(int px, int py); 
     
    2119
    2220protected:
     21  virtual void           BindWdgtoParent(); 
    2322  PIWdgX   *pwm;
    2423
Note: See TracChangeset for help on using the changeset viewer.