Changeset 133 in Sophya for trunk/SophyaPI/PI/pistzwin.cc
- Timestamp:
- Aug 11, 1998, 7:19:56 PM (27 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaPI/PI/pistzwin.cc
r132 r133 7 7 #include "psfile.h" 8 8 9 // Fonction de l'objet PIPeriodic de PIStackWindow 10 static void myadperpact(void* a); 11 12 void myadperpact(void* a) 13 { 14 ((PIStackWindow*)a)->DispNext(); 15 } 9 16 /* --Methode-- */ 10 17 PIStackWindow::PIStackWindow(PIMsgHandler* par, char* nom, PIWindowKind k, 11 18 int sx, int sy, int px, int py) 12 : PIWindow(par, nom, k, sx, sy, px, py) 19 : PIWindow(par, nom, k, sx, sy, px, py) , mPerad(1) 13 20 { 14 curdisp = -1; 21 mCurdisp = -1; 22 mPerad.SetAction(myadperpact, this); 15 23 } 16 24 … … 19 27 PIStackWindow::~PIStackWindow() 20 28 { 29 mPerad.Stop(); 30 Hide(); 21 31 } 22 32 … … 28 38 PIWindow::ChildAdd(child); 29 39 child->Manage(); 30 curdisp = NbChilds()-1;40 mCurdisp = NbChilds()-1; 31 41 return; 32 42 } … … 39 49 PIWindow::ChildDel(child); 40 50 if (NbChilds() > 0) { 41 curdisp--;42 if ( curdisp < 0) curdisp = 0;43 if ( curdisp > NbChilds()) curdisp = NbChilds()-1;44 GetChild( curdisp)->Manage();51 mCurdisp--; 52 if (mCurdisp < 0) mCurdisp = 0; 53 if (mCurdisp > NbChilds()) mCurdisp = NbChilds()-1; 54 GetChild(mCurdisp)->Manage(); 45 55 } 46 else curdisp = -1;56 else mCurdisp = -1; 47 57 return; 48 58 } … … 65 75 int k; 66 76 for(k=0; k<NbChilds(); k++) GetChild(k)->UnManage(); 67 curdisp = (curdisp+1)%NbChilds();68 GetChild( curdisp)->Manage();77 mCurdisp = (mCurdisp+1)%NbChilds(); 78 GetChild(mCurdisp)->Manage(); 69 79 return; 70 80 } 81 82 /* --Methode-- */ 83 void PIStackWindow::StartAutoDisp(int dt) 84 { 85 mPerad.Start(dt); 86 } 87 88 /* --Methode-- */ 89 void PIStackWindow::StopAutoDisp() 90 { 91 mPerad.Stop(); 92 } 93 94 //------------------------------------------------------------------------------- 71 95 72 96 /* --Methode-- */
Note:
See TracChangeset
for help on using the changeset viewer.