Changeset 365 in Sophya


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

Pb avec Fenetre ppale sur Sun - Reza 9/8/99

Location:
trunk/SophyaPI/PI
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaPI/PI/Tests/pit0.cc

    r181 r365  
    8484//  Taille et position proportionnelles a la taille de la fenetre pour les elements
    8585for(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);
    8890  }
    8991for(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  
    7272//       XtWindow(but[0]->XtWdg()), XtWindow(but[1]->XtWdg()) );
    7373
    74 scons = new PIConsole(MainWin(), "PIConsole", 4540, 120, 70, 600, 250, 0, 50 );
     74scons = new PIConsole(MainWin(), "PIConsole", 4540, 120, 70, 600, 250, 0, 50, true );
    7575
    7676// printf("---DBG-2=== %lx %lx % \n", XtWindow(PIXtTopWdg()),
     
    145145    case 4540:
    146146      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");
    148149      else
    149150        printf("Console Msg= %d Mod = %d \n",UserMsg(msg), ModMsg(msg));
  • trunk/SophyaPI/PI/Tests/pitgr.cc

    r194 r365  
    7575MainWin()->SetSize(360,130);
    7676zoom = new PIPixmap(MainWin(), "Zoom", 90, 90, 5, 5);
    77 // zoom->SetBinding(PIBK_elastic,PIBK_elastic,PIBK_elastic,PIBK_elastic);
     77zoom->SetBinding(PIBK_elastic,PIBK_elastic,PIBK_elastic,PIBK_elastic);
     78// zoom->SetBinding(PIBK_fixed,PIBK_fixed,PIBK_elastic,PIBK_fixed);
    7879cmapv = new PICMapView(MainWin(), "CMapView", 350, 25, 5, 100);
    79 // cmapv->SetBinding(PIBK_elastic,PIBK_elastic,PIBK_elastic,PIBK_elastic);
     80cmapv->SetBinding(PIBK_elastic,PIBK_elastic,PIBK_elastic,PIBK_elastic);
     81// cmapv->SetBinding(PIBK_fixed,PIBK_free,PIBK_fixed,PIBK_free);
    8082// Creation d' zone texte multiligne
    8183txt = new PIText(MainWin(), "mltext", 250, 90, 105, 5);
    82 // txt->SetBinding(PIBK_elastic,PIBK_elastic,PIBK_elastic,PIBK_elastic);
     84txt->SetBinding(PIBK_elastic,PIBK_elastic,PIBK_elastic,PIBK_elastic);
     85// txt->SetBinding(PIBK_fixed,PIBK_fixed,PIBK_fixed,PIBK_free);
    8386txt->SetMutiLineMode(true);
    8487txt->SetTextEditable(false);
  • trunk/SophyaPI/PI/piapplx.cc

    r163 r365  
    44#include "picontainerx.h"
    55
     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 !
    610
    711// Pour rediriger stdout
     
    3842/* --Methode-- */
    3943PITopContAppX::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); 
    4347}
    4448
     
    5155void PITopContAppX::SetSize(int sx, int sy)
    5256{
     57if ((sx <10) || (sy < 10) ) return;
    5358Parent()->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
    5662
    5763/* --Methode-- */
     
    7076#endif
    7177mStop = true;
     78
     79
    7280topwdg = new PIWdgX(narg, arg);
    7381
     82int msx,msy;
     83PrefCompSz(msx, msy);
     84msy+=5;
     85topwdg->SetSize(sx, sy+msy);
     86//DBG printf("PIApplicationX-DBG:: Size=%d %d \n", topwdg->XSize(), topwdg->YSize());
     87
    7488intcont = new PIContainerX((PIMsgHandler *)this, topwdg, "MBCont",
    75                             10, 10, 0, 0);
     89                            sx, sy+msy, 0, 0);
    7690// Pb avec les Popup MenuX et certains Window Manager , voir pimenux.cc
    7791SetTopWdgForMenuX(intcont->XtWdg());
     
    8094Menubar()->SetBinding(PIBK_fixed, PIBK_fixed, PIBK_fixed, PIBK_free);
    8195sxt = ( 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);
     96syt = ( sy > 10 ) ? sy : 10;
     97// syt += Menubar()->YSize();
     98// syt += msy;
     99// topwdg->SetSize(sxt, syt);
     100// MBCont()->SetSize(sxt, syt);
    88101if (sx < sxt)  sx = sxt;
    89102if (sy < 10) sy = 10;
    90103topcont = new PITopContAppX(MBCont(), "TopLevelCont",
    91104                            sx, sy, 0, msy);
     105MBCont()->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
    92109topcont->Show();
    93 MBCont()->Show();
    94 
    95 topwdg->Manage();
     110
    96111
    97112if (!a_fgcur)
     
    104119  }
    105120
     121topwdg->Manage();
    106122cur_piapp = this;
    107123mState = -1;
     
    135151#endif
    136152
    137 topwdg->SetSize(MBCont()->XSize(), MBCont()->YSize());
    138153
    139154int szx, szy, szf;
     
    141156
    142157// Pour appeler FinishCreate() des objets dans la fenetre principale
    143 if (mStop) MBCont()->FinishCreate();   // C'est la premiere fois
     158if (mStop) { // C'est la premiere fois
     159  topwdg->SetSize(MBCont()->XSize(), MBCont()->YSize());
     160  MBCont()->FinishCreate();   
     161  }
    144162else mStop = true;   // On rerentre apres un stop
    145163while (mStop)
     
    258276fcntl(p[0], F_SETFL, O_NONBLOCK);
    259277
    260 #if (!defined(__GNUG__) && !defined(__aCC__))
     278#if (!defined(__GNUG__) && !defined(HPUX))
    261279setlinebuf(stdout);
    262280#endif
     
    292310fcntl(p[0], F_SETFL, O_NONBLOCK);
    293311
    294 #if (!defined(__GNUG__) && !defined(__aCC__))
     312#if (!defined(__GNUG__) && !defined(HPUX))
    295313setlinebuf(stderr);
    296314#endif
  • trunk/SophyaPI/PI/picons.cc

    r329 r365  
    2222static int PIVA_Select = 1 << 3;
    2323
     24//  Gestion du scroll-bar
     25static int Scb_Width = 14;
     26
    2427/* --Methode-- */
    2528PIConsole::PIConsole(PIContainer* par, const char* nom, PIMessage msg,
    2629                     int nl, int nc, int sx, int sy, int px, int py, bool scb) :
    27 PIBaseWdg(par, nom, sx, sy, px, py)
     30PIBaseWdg(par, nom, ((scb)?sx-Scb_Width:sx), sy, px, py)
    2831{
    2932mNL = (nl > 10) ? nl : 10;
     
    527530*/
    528531
    529 //  Gestion du scroll-bar
    530 static int Scb_Width = 14;
    531532
    532533/* --Methode-- */
     
    541542
    542543sx -= Scb_Width;
    543 SetSize(sx, sy);
     544// SetSize(sx, sy);
    544545SetBinding(PIBK_fixed, PIBK_fixed, PIBK_fixed, PIBK_fixed);
    545546char name[128];
Note: See TracChangeset for help on using the changeset viewer.