Changeset 365 in Sophya for trunk/SophyaPI
- Timestamp:
- Aug 9, 1999, 1:50:45 PM (26 years ago)
- Location:
- trunk/SophyaPI/PI
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaPI/PI/Tests/pit0.cc
r181 r365 84 84 // Taille et position proportionnelles a la taille de la fenetre pour les elements 85 85 for(int i=0; i<3; i++) { 86 mLab[i]->SetBinding(PIBK_elastic , PIBK_elastic , PIBK_elastic , PIBK_elastic); 87 mText[i]->SetBinding(PIBK_elastic , PIBK_elastic , PIBK_elastic , PIBK_elastic); 86 // mLab[i]->SetBinding(PIBK_elastic , PIBK_elastic , PIBK_elastic , PIBK_elastic); 87 mLab[i]->SetBinding(PIBK_fixed , PIBK_fixed , PIBK_free , PIBK_free); 88 // mText[i]->SetBinding(PIBK_elastic , PIBK_elastic , PIBK_elastic , PIBK_elastic); 89 mText[i]->SetBinding(PIBK_free , PIBK_fixed , PIBK_fixed , PIBK_free); 88 90 } 89 91 for(int ii=0; ii<2; ii++) mBut[ii]->SetBinding(PIBK_elastic , PIBK_elastic , PIBK_elastic , PIBK_elastic); -
trunk/SophyaPI/PI/Tests/pitcons.cc
r181 r365 72 72 // XtWindow(but[0]->XtWdg()), XtWindow(but[1]->XtWdg()) ); 73 73 74 scons = new PIConsole(MainWin(), "PIConsole", 4540, 120, 70, 600, 250, 0, 50 );74 scons = new PIConsole(MainWin(), "PIConsole", 4540, 120, 70, 600, 250, 0, 50, true ); 75 75 76 76 // printf("---DBG-2=== %lx %lx % \n", XtWindow(PIXtTopWdg()), … … 145 145 case 4540: 146 146 if (ModMsg(msg) == PIMsg_OK) 147 printf("Cmd from Console L=%d [%s] \n", strlen((char*)data), (char*)data ); 147 // printf("Cmd from Console L=%d [%s] \n", strlen((char*)data), (char*)data ); 148 printf("Cmd from Console \n"); 148 149 else 149 150 printf("Console Msg= %d Mod = %d \n",UserMsg(msg), ModMsg(msg)); -
trunk/SophyaPI/PI/Tests/pitgr.cc
r194 r365 75 75 MainWin()->SetSize(360,130); 76 76 zoom = new PIPixmap(MainWin(), "Zoom", 90, 90, 5, 5); 77 // zoom->SetBinding(PIBK_elastic,PIBK_elastic,PIBK_elastic,PIBK_elastic); 77 zoom->SetBinding(PIBK_elastic,PIBK_elastic,PIBK_elastic,PIBK_elastic); 78 // zoom->SetBinding(PIBK_fixed,PIBK_fixed,PIBK_elastic,PIBK_fixed); 78 79 cmapv = new PICMapView(MainWin(), "CMapView", 350, 25, 5, 100); 79 // cmapv->SetBinding(PIBK_elastic,PIBK_elastic,PIBK_elastic,PIBK_elastic); 80 cmapv->SetBinding(PIBK_elastic,PIBK_elastic,PIBK_elastic,PIBK_elastic); 81 // cmapv->SetBinding(PIBK_fixed,PIBK_free,PIBK_fixed,PIBK_free); 80 82 // Creation d' zone texte multiligne 81 83 txt = new PIText(MainWin(), "mltext", 250, 90, 105, 5); 82 // txt->SetBinding(PIBK_elastic,PIBK_elastic,PIBK_elastic,PIBK_elastic); 84 txt->SetBinding(PIBK_elastic,PIBK_elastic,PIBK_elastic,PIBK_elastic); 85 // txt->SetBinding(PIBK_fixed,PIBK_fixed,PIBK_fixed,PIBK_free); 83 86 txt->SetMutiLineMode(true); 84 87 txt->SetTextEditable(false); -
trunk/SophyaPI/PI/piapplx.cc
r163 r365 4 4 #include "picontainerx.h" 5 5 6 // $CHECK$ - Reza Aout 99 7 // Il y a un probleme sur la gestion de la taille de la fenetre principale 8 // SetBinding(elastic) ne marche correctement pas sur la fenetre principale 9 // et Des SetSize intempestive peuvent generer des comportements bizarres ! 6 10 7 11 // Pour rediriger stdout … … 38 42 /* --Methode-- */ 39 43 PITopContAppX::PITopContAppX(PIContainer *par, char *nom, int sx, int sy, int px, int py) 40 : PIContainer(par, nom, sx, sy, px, py)41 { 42 SetBinding(PIBK_fixed, PIBK_fixed, PIBK_fixed, PIBK_fixed);44 : PIContainer(par, nom, (sx>10)?sx:10, (sy>10)?sy:10, px, py) 45 { 46 SetBinding(PIBK_fixed, PIBK_fixed, PIBK_fixed, PIBK_fixed); 43 47 } 44 48 … … 51 55 void PITopContAppX::SetSize(int sx, int sy) 52 56 { 57 if ((sx <10) || (sy < 10) ) return; 53 58 Parent()->SetSize(sx+XPos(), sy+YPos()); 54 PIContainer::SetSize(sx, sy); 55 } 59 // PIContainer::SetSize(sx, sy); Probleme sur Sun - Reza 9/08/99 60 } 61 56 62 57 63 /* --Methode-- */ … … 70 76 #endif 71 77 mStop = true; 78 79 72 80 topwdg = new PIWdgX(narg, arg); 73 81 82 int msx,msy; 83 PrefCompSz(msx, msy); 84 msy+=5; 85 topwdg->SetSize(sx, sy+msy); 86 //DBG printf("PIApplicationX-DBG:: Size=%d %d \n", topwdg->XSize(), topwdg->YSize()); 87 74 88 intcont = new PIContainerX((PIMsgHandler *)this, topwdg, "MBCont", 75 10, 10, 0, 0);89 sx, sy+msy, 0, 0); 76 90 // Pb avec les Popup MenuX et certains Window Manager , voir pimenux.cc 77 91 SetTopWdgForMenuX(intcont->XtWdg()); … … 80 94 Menubar()->SetBinding(PIBK_fixed, PIBK_fixed, PIBK_fixed, PIBK_free); 81 95 sxt = ( sx > Menubar()->XSize() ) ? sx : Menubar()->XSize(); 82 syt = ( sy > 0 ) ? sy : 0; 83 int msx,msy; 84 PrefCompSz(msx, msy); 85 //syt += Menubar()->YSize(); 86 syt += msy; 87 MBCont()->SetSize(sxt, syt); 96 syt = ( sy > 10 ) ? sy : 10; 97 // syt += Menubar()->YSize(); 98 // syt += msy; 99 // topwdg->SetSize(sxt, syt); 100 // MBCont()->SetSize(sxt, syt); 88 101 if (sx < sxt) sx = sxt; 89 102 if (sy < 10) sy = 10; 90 103 topcont = new PITopContAppX(MBCont(), "TopLevelCont", 91 104 sx, sy, 0, msy); 105 MBCont()->Show(); 106 //DBG printf("PIApplicationX-DBG2:: MBContSize=%d %d \n", MBCont()->XSize(), MBCont()->YSize()); 107 //DBG printf("PIApplicationX-DBG2:: topcontSize=%d %d \n", MainWin()->XSize(), MainWin()->YSize()); 108 92 109 topcont->Show(); 93 MBCont()->Show(); 94 95 topwdg->Manage(); 110 96 111 97 112 if (!a_fgcur) … … 104 119 } 105 120 121 topwdg->Manage(); 106 122 cur_piapp = this; 107 123 mState = -1; … … 135 151 #endif 136 152 137 topwdg->SetSize(MBCont()->XSize(), MBCont()->YSize());138 153 139 154 int szx, szy, szf; … … 141 156 142 157 // Pour appeler FinishCreate() des objets dans la fenetre principale 143 if (mStop) MBCont()->FinishCreate(); // C'est la premiere fois 158 if (mStop) { // C'est la premiere fois 159 topwdg->SetSize(MBCont()->XSize(), MBCont()->YSize()); 160 MBCont()->FinishCreate(); 161 } 144 162 else mStop = true; // On rerentre apres un stop 145 163 while (mStop) … … 258 276 fcntl(p[0], F_SETFL, O_NONBLOCK); 259 277 260 #if (!defined(__GNUG__) && !defined( __aCC__))278 #if (!defined(__GNUG__) && !defined(HPUX)) 261 279 setlinebuf(stdout); 262 280 #endif … … 292 310 fcntl(p[0], F_SETFL, O_NONBLOCK); 293 311 294 #if (!defined(__GNUG__) && !defined( __aCC__))312 #if (!defined(__GNUG__) && !defined(HPUX)) 295 313 setlinebuf(stderr); 296 314 #endif -
trunk/SophyaPI/PI/picons.cc
r329 r365 22 22 static int PIVA_Select = 1 << 3; 23 23 24 // Gestion du scroll-bar 25 static int Scb_Width = 14; 26 24 27 /* --Methode-- */ 25 28 PIConsole::PIConsole(PIContainer* par, const char* nom, PIMessage msg, 26 29 int nl, int nc, int sx, int sy, int px, int py, bool scb) : 27 PIBaseWdg(par, nom, sx, sy, px, py)30 PIBaseWdg(par, nom, ((scb)?sx-Scb_Width:sx), sy, px, py) 28 31 { 29 32 mNL = (nl > 10) ? nl : 10; … … 527 530 */ 528 531 529 // Gestion du scroll-bar530 static int Scb_Width = 14;531 532 532 533 /* --Methode-- */ … … 541 542 542 543 sx -= Scb_Width; 543 SetSize(sx, sy);544 // SetSize(sx, sy); 544 545 SetBinding(PIBK_fixed, PIBK_fixed, PIBK_fixed, PIBK_fixed); 545 546 char name[128];
Note:
See TracChangeset
for help on using the changeset viewer.