Changeset 92 in Sophya
- Timestamp:
- Mar 16, 1998, 6:55:45 PM (28 years ago)
- Location:
- trunk/SophyaPI/PI
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaPI/PI/piapplgen.cc
r90 r92 95 95 } 96 96 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 //-- 97 135 98 136 void PIApplicationPrefCompSize(int& szx, int& szy) … … 102 140 return; 103 141 } 142 void PIApplicationScreenSize(int& szx, int& szy) 143 { 144 szx = szy = 500; 145 if (curapp) curapp->ScreenSz(szx, szy); 146 return; 147 } -
trunk/SophyaPI/PI/piapplgen.h
r90 r92 31 31 32 32 virtual void PrefCompSz(int& szx, int& szy) = 0; 33 virtual void ScreenSz(int& szx, int& szy) = 0; 33 34 34 35 virtual void RedirectOutStream(PIConsole* cons, unsigned char va= PIVA_Def) = 0; … … 43 44 // Fonction globale pour recuperer la taille standard des composants (taille x,y) 44 45 void PIApplicationPrefCompSize(int& szx, int& szy); 46 void PIApplicationScreenSize(int& szx, int& szy); 45 47 46 48 #endif -
trunk/SophyaPI/PI/piapplx.cc
r90 r92 39 39 sxt = ( sx > Menubar()->XSize() ) ? sx : Menubar()->XSize(); 40 40 syt = ( sy > 0 ) ? sy : 0; 41 int msx,msy; 42 PrefCompSz(msx, msy); 41 43 //syt += Menubar()->YSize(); 42 syt += 40;44 syt += msy; 43 45 MBCont()->SetSize(sxt, syt); 44 46 if ( (sx > 0) && (sy > 0) ) 45 47 { 46 48 topcont = new PIContainerX(MBCont(), "TopLevelCont", 47 sx, sy, 0, 40);49 sx, sy, 0, msy); 48 50 topcont->SetBinding(PIBK_fixed, PIBK_fixed, PIBK_fixed, PIBK_fixed); 49 51 topcont->Show(); … … 155 157 } 156 158 159 /* --Methode-- */ 160 void PIApplicationX::ScreenSz(int& szx, int& szy) 161 { 162 Display * dsp = PIXDisplay(); 163 szx = DisplayWidth(dsp, DefaultScreen(dsp)); 164 szy = DisplayHeight(dsp, DefaultScreen(dsp)); 165 } 166 167 157 168 158 169 /* Call-Back - Fonction privee de ce fichier */ -
trunk/SophyaPI/PI/piapplx.h
r90 r92 20 20 21 21 virtual void PrefCompSz(int& szx, int& szy); 22 virtual void ScreenSz(int& szx, int& szy); 22 23 23 24 virtual void RedirectOutStream(PIConsole* cons, unsigned char va= PIVA_Def);
Note:
See TracChangeset
for help on using the changeset viewer.