Changeset 92 in Sophya


Ignore:
Timestamp:
Mar 16, 1998, 6:55:45 PM (28 years ago)
Author:
ansari
Message:

MAJ doc et fonction PIApplicationScreenSize() Reza 16/03/98

Location:
trunk/SophyaPI/PI
Files:
4 edited

Legend:

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

    r90 r92  
    9595}
    9696
     97//++
     98// Titre        Redirection StdOut, StdErr
     99//      Il est possible de rediriger les flots de sortie
     100//      standard et d'erreur vers un objet PIConsol.
     101//--
     102
     103//++
     104// void  RedirectOutStream(PIConsole* cons, unsigned char va= PIVA_Def)
     105//      Redirige le flot de sortie ("stdout" sous Unix) vers l'objet
     106//      PIConsole "cons". 
     107//
     108// void  RedirectErrStream(PIConsole* cons, unsigned char va= PIVA_Def)
     109//      Redirige le flot des messages d'erreur ("stderr" sous Unix)
     110//      vers l'objet PIConsole "cons". 
     111//--
     112
     113//++
     114// Titre        Informations globales
     115//      Les méthodes suivantes permettent d'acceder aux informations 
     116//      concernant l'écran (tailles, ...). Des fonctions globales sont
     117//      prévues ( "PIApplicationPrefCompSize()" et "PIApplicationScreenSize()" )
     118//      afin d'obtenir ces informations sans avoir besoin d'une instance de la
     119//      classes application.
     120//--
     121//++
     122// void  PIApplicationPrefCompSize(int& szx, int& szy)
     123//      Fonction globale
     124// void  PrefCompSz(int& szx, int& szy)
     125//      Renvoie la taille préférée pour les composantes standard. "szx,szy"
     126//      est la taille (en pixels) pour un champ texte, ou un bouton "(PIText, PIButton)"
     127//      avec l'étiquette ou un contenu de 6 caractères (Ex: Cancel).
     128//
     129// void  PIApplicationScreenSize()
     130//      Fonction globale
     131// void  ScreenSz(int& szx, int& szy)
     132//      Renvoie la taille en pixels de l'écran
     133// 
     134//--
    97135
    98136void     PIApplicationPrefCompSize(int& szx, int& szy)
     
    102140return;
    103141}
     142void     PIApplicationScreenSize(int& szx, int& szy)
     143{
     144szx = szy = 500;
     145if (curapp)  curapp->ScreenSz(szx, szy);
     146return;
     147}
  • trunk/SophyaPI/PI/piapplgen.h

    r90 r92  
    3131
    3232        virtual void              PrefCompSz(int& szx, int& szy) = 0;
     33        virtual void              ScreenSz(int& szx, int& szy) = 0;
    3334
    3435        virtual void              RedirectOutStream(PIConsole* cons, unsigned char va= PIVA_Def)  = 0;
     
    4344//   Fonction globale pour recuperer la taille standard des composants (taille x,y)
    4445void     PIApplicationPrefCompSize(int& szx, int& szy); 
     46void     PIApplicationScreenSize(int& szx, int& szy); 
    4547
    4648#endif
  • trunk/SophyaPI/PI/piapplx.cc

    r90 r92  
    3939sxt = ( sx > Menubar()->XSize() ) ? sx : Menubar()->XSize();
    4040syt = ( sy > 0 ) ? sy : 0;
     41int msx,msy;
     42PrefCompSz(msx, msy);
    4143//syt += Menubar()->YSize();
    42 syt += 40;
     44syt += msy;
    4345MBCont()->SetSize(sxt, syt);
    4446if ( (sx > 0) && (sy > 0) )
    4547  {
    4648  topcont = new PIContainerX(MBCont(), "TopLevelCont",
    47                              sx, sy, 0, 40);
     49                             sx, sy, 0, msy);
    4850  topcont->SetBinding(PIBK_fixed, PIBK_fixed, PIBK_fixed, PIBK_fixed);
    4951  topcont->Show();
     
    155157}
    156158
     159/* --Methode-- */
     160void PIApplicationX::ScreenSz(int& szx, int& szy)
     161{
     162Display * dsp = PIXDisplay();
     163szx = DisplayWidth(dsp, DefaultScreen(dsp));
     164szy = DisplayHeight(dsp, DefaultScreen(dsp));
     165}
     166
     167
    157168
    158169/* Call-Back - Fonction privee de ce fichier */
  • trunk/SophyaPI/PI/piapplx.h

    r90 r92  
    2020
    2121  virtual void              PrefCompSz(int& szx, int& szy);
     22  virtual void              ScreenSz(int& szx, int& szy);
    2223
    2324  virtual void              RedirectOutStream(PIConsole* cons, unsigned char va= PIVA_Def);
Note: See TracChangeset for help on using the changeset viewer.