Changeset 329 in Sophya for trunk/SophyaPI
- Timestamp:
- Jun 24, 1999, 4:24:58 PM (26 years ago)
- Location:
- trunk/SophyaPI/PI
- Files:
-
- 58 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaPI/PI/pi3ddrw.cc
r325 r329 267 267 //-- 268 268 //++ 269 // PIDraw3DWdg(PIContainerGen *par, c har *nom, int sx=100, int sy=100, int px=0, int py=0)269 // PIDraw3DWdg(PIContainerGen *par, const char *nom, int sx=100, int sy=100, int px=0, int py=0) 270 270 // Constructeur 271 271 // long kind() … … 276 276 277 277 /* --Methode-- */ 278 PIDraw3DWdg::PIDraw3DWdg(PIContainerGen *par, c har *nom, int sx, int sy, int px, int py)278 PIDraw3DWdg::PIDraw3DWdg(PIContainerGen *par, const char *nom, int sx, int sy, int px, int py) 279 279 : PIBaseWdg(par, nom, sx, sy, px, py) 280 280 { -
trunk/SophyaPI/PI/pi3ddrw.h
r204 r329 62 62 enum {ClassId = 5500}; 63 63 64 PIDraw3DWdg(PIContainerGen *par, c har *nom,64 PIDraw3DWdg(PIContainerGen *par, const char *nom, 65 65 int sx=100, int sy=100, int px=0, int py=0); 66 66 virtual ~PIDraw3DWdg(); -
trunk/SophyaPI/PI/pibwdggen.cc
r204 r329 44 44 //-- 45 45 //++ 46 // PIBaseWdgGen(PIContainerGen *par, c har *nom, int sx=10, int sy=10, int px=0, int py=0)46 // PIBaseWdgGen(PIContainerGen *par, const char *nom, int sx=10, int sy=10, int px=0, int py=0) 47 47 // Création d'un objet contenu dans l'objet *PIContainer* "par", de 48 48 // taille "sx,sy", se trouvant à la position "px,py" avec le nom "nom" … … 90 90 91 91 /* --Methode-- */ 92 PIBaseWdgGen::PIBaseWdgGen(PIContainerGen *par, c har *nom,92 PIBaseWdgGen::PIBaseWdgGen(PIContainerGen *par, const char *nom, 93 93 int sx, int sy, int px, int py) : 94 94 PIWdg(par, nom, sx, sy, px, py) -
trunk/SophyaPI/PI/pibwdggen.h
r204 r329 36 36 // Les methodes ... 37 37 38 PIBaseWdgGen(PIContainerGen *par, c har *nom,38 PIBaseWdgGen(PIContainerGen *par, const char *nom, 39 39 int sx=10, int sy=10, int px=0, int py=0); 40 40 virtual ~PIBaseWdgGen(); -
trunk/SophyaPI/PI/pibwdgx.cc
r316 r329 26 26 27 27 /* --Methode-- */ 28 PIBaseWdgX::PIBaseWdgX(PIContainerGen *par, c har *nom,28 PIBaseWdgX::PIBaseWdgX(PIContainerGen *par, const char *nom, 29 29 int sx, int sy, int px, int py) 30 30 : PIBaseWdgGen(par, nom, sx, sy, px, py) -
trunk/SophyaPI/PI/pibwdgx.h
r180 r329 20 20 // Les methodes ... 21 21 22 PIBaseWdgX(PIContainerGen *par, c har *nom,22 PIBaseWdgX(PIContainerGen *par, const char *nom, 23 23 int sx=10, int sy=10, int px=0, int py=0); 24 24 virtual ~PIBaseWdgX(); -
trunk/SophyaPI/PI/picons.cc
r320 r329 23 23 24 24 /* --Methode-- */ 25 PIConsole::PIConsole(PIContainer* par, c har* nom, PIMessage msg,25 PIConsole::PIConsole(PIContainer* par, const char* nom, PIMessage msg, 26 26 int nl, int nc, int sx, int sy, int px, int py, bool scb) : 27 27 PIBaseWdg(par, nom, sx, sy, px, py) … … 531 531 532 532 /* --Methode-- */ 533 void PIConsole::AssocScrollBar(PIContainer* par, c har* nom, bool scb, int sx, int sy, int px, int py)533 void PIConsole::AssocScrollBar(PIContainer* par, const char* nom, bool scb, int sx, int sy, int px, int py) 534 534 { 535 535 if (!scb) { -
trunk/SophyaPI/PI/picons.h
r138 r329 29 29 class PIConsole : public PIBaseWdg { 30 30 public: 31 PIConsole(PIContainer* par, c har* nom, PIMessage msg, int nl, int nc,31 PIConsole(PIContainer* par, const char* nom, PIMessage msg, int nl, int nc, 32 32 int sx=300, int sy=200, int px=0, int py=0, bool scb=true); 33 33 ~PIConsole(); … … 64 64 65 65 protected: 66 void AssocScrollBar(PIContainer* par, c har* nom, bool scb, int sx, int sy, int px, int py);66 void AssocScrollBar(PIContainer* par, const char* nom, bool scb, int sx, int sy, int px, int py); 67 67 void ScrollUp(); 68 68 void SetDispOffset(int ldeb=-1); -
trunk/SophyaPI/PI/picontainergen.cc
r158 r329 42 42 //-- 43 43 //++ 44 // PIContainer(PIContainerGen *par, c har *nom, int sx, int sy, int px, int py)44 // PIContainer(PIContainerGen *par, const char *nom, int sx, int sy, int px, int py) 45 45 // Création d'un objet "PIContainer" dans le conteneur parent "par", de 46 46 // taille "sx,sy", se trouvant à la position "px,py" avec le nom "nom". … … 94 94 95 95 /* --Methode-- */ 96 PIContainerGen::PIContainerGen(PIContainerGen *par, c har *nom,96 PIContainerGen::PIContainerGen(PIContainerGen *par, const char *nom, 97 97 int sx, int sy, int px, int py) 98 98 : PIWdg(par, nom, sx, sy, px, py) -
trunk/SophyaPI/PI/picontainergen.h
r158 r329 42 42 enum {ClassId = 1500}; 43 43 44 PIContainerGen(PIContainerGen *par, c har *nom,44 PIContainerGen(PIContainerGen *par, const char *nom, 45 45 int sx=10, int sy=10, int px=0, int py=0); 46 46 virtual ~PIContainerGen(); -
trunk/SophyaPI/PI/picontainerx.cc
r154 r329 4 4 5 5 /* --Methode-- */ 6 PIContainerX::PIContainerX(PIContainerGen *par, c har *nom,6 PIContainerX::PIContainerX(PIContainerGen *par, const char *nom, 7 7 int sx, int sy, int px, int py) 8 8 : PIContainerGen(par, nom, sx, sy, px, py) … … 15 15 16 16 // constructeur special a utiliser par PIApplicationX ... 17 PIContainerX::PIContainerX(PIMsgHandler *par, PIWdgX *parwdg, c har *nom,17 PIContainerX::PIContainerX(PIMsgHandler *par, PIWdgX *parwdg, const char *nom, 18 18 int sx, int sy, int px, int py) 19 19 : PIContainerGen(NULL, nom, sx, sy, px, py) -
trunk/SophyaPI/PI/picontainerx.h
r154 r329 9 9 { 10 10 public: 11 PIContainerX(PIContainerGen *par, c har *nom,11 PIContainerX(PIContainerGen *par, const char *nom, 12 12 int sx=10, int sy=10, int px=0, int py=0); 13 13 14 14 // Ce constructeur est a utiliser par PIApplicationX ... 15 PIContainerX(PIMsgHandler *par, PIWdgX *parwdg, c har *nom,15 PIContainerX(PIMsgHandler *par, PIWdgX *parwdg, const char *nom, 16 16 int sx=10, int sy=10, int px=0, int py=0); 17 17 -
trunk/SophyaPI/PI/pidrawwin.cc
r107 r329 1 1 #include "pidrawwin.h" 2 2 3 PIDrawWindow::PIDrawWindow(PIMsgHandler* par, c har *nom,3 PIDrawWindow::PIDrawWindow(PIMsgHandler* par, const char *nom, 4 4 PIWindowKind k, int sx, int sy, int px, int py) 5 5 :PIWindow(par, nom, k, sx, sy, px, py) -
trunk/SophyaPI/PI/pidrawwin.h
r107 r329 10 10 class PIDrawWindow : public PIWindow { 11 11 public: 12 PIDrawWindow(PIMsgHandler* par, c har *nom,12 PIDrawWindow(PIMsgHandler* par, const char *nom, 13 13 PIWindowKind k=PIWK_normal, int sx=10, int sy=10, 14 14 int px=0, int py=0); -
trunk/SophyaPI/PI/pifilechogen.cc
r113 r329 32 32 //-- 33 33 //++ 34 // PIFileChooser(PIMsgHandler* par, c har* nom, PIMessage msg)34 // PIFileChooser(PIMsgHandler* par, const char* nom, PIMessage msg) 35 35 // Création d'un objet sélecteur de fichier, avec le message "msg". 36 36 // void Show() … … 50 50 51 51 52 PIFileChooserGen::PIFileChooserGen(PIMsgHandler* par, c har* nom, PIMessage msg)52 PIFileChooserGen::PIFileChooserGen(PIMsgHandler* par, const char* nom, PIMessage msg) 53 53 : PIWdg(NULL, nom) 54 54 { -
trunk/SophyaPI/PI/pifilechogen.h
r163 r329 9 9 enum {ClassId = 2100}; 10 10 11 PIFileChooserGen(PIMsgHandler* par, c har* nom, PIMessage msg);11 PIFileChooserGen(PIMsgHandler* par, const char* nom, PIMessage msg); 12 12 virtual ~PIFileChooserGen(); 13 13 -
trunk/SophyaPI/PI/pifilechox.cc
r137 r329 47 47 static int PIFC_SzX, PIFC_SzY; 48 48 /* --Methode-- */ 49 PIFileChooserX::PIFileChooserX(PIMsgHandler* par, c har* nom, PIMessage msg)49 PIFileChooserX::PIFileChooserX(PIMsgHandler* par, const char* nom, PIMessage msg) 50 50 : PIFileChooserGen(par, nom, msg) 51 51 { -
trunk/SophyaPI/PI/pifilechox.h
r163 r329 10 10 public: 11 11 12 PIFileChooserX(PIMsgHandler* par, c har* nom, PIMessage msg);12 PIFileChooserX(PIMsgHandler* par, const char* nom, PIMessage msg); 13 13 virtual ~PIFileChooserX(); 14 14 -
trunk/SophyaPI/PI/pifontgen.h
r317 r329 8 8 #include "pisysdep.h" 9 9 10 enum PIFontName { PI_DefaultFont = 0, PI_CourierFont = 1, PI_SymbolFont = 2}; 10 enum PIFontName { PI_DefaultFont = 0, PI_CourierFont = 1, PI_HelveticaFont = 2, 11 PI_TimesFont = 3, PI_SymbolFont = 4}; 11 12 12 13 enum PIFontSize { PI_NotDefFontSize = -1, -
trunk/SophyaPI/PI/pifontx.cc
r320 r329 119 119 #define NMAXFONTSZ 7 120 120 #define NMAXFONTATT 3 121 #define NMAXFONTTYP 3121 #define NMAXFONTTYP 5 122 122 123 123 /* Variables globales pour la gestion des fontes */ … … 129 129 static int HugeFontIndex = 6; 130 130 static PIFontAtt fntatt[NMAXFONTATT] = { PI_RomanFont, PI_BoldFont, PI_ItalicFont }; 131 static PIFontName fntname[NMAXFONTTYP] = { PI_DefaultFont, PI_CourierFont, PI_SymbolFont}; 131 static PIFontName fntname[NMAXFONTTYP] = { PI_DefaultFont, PI_CourierFont, PI_HelveticaFont, 132 PI_TimesFont, PI_SymbolFont}; 132 133 static XFontStruct * defnt = NULL; 133 134 … … 196 197 k = 1; 197 198 break; 199 case PI_HelveticaFont : 200 k = 2; 201 break; 202 case PI_TimesFont : 203 k = 3; 204 break; 198 205 case PI_SymbolFont : 199 k = 2;206 k = 4; 200 207 break; 201 208 default : … … 211 218 typedef struct 212 219 { 213 String fntFam[ 3];220 String fntFam[5]; 214 221 } myAppData; 215 222 static myAppData apd; … … 220 227 { "courierfontFamilyName", "CourierfontFamilyName", XtRString, sizeof(String), 221 228 sizeof(String) , XtRString, "*-courier" } , 229 { "helveticafontFamilyName", "HelveticafontFamilyName", XtRString, sizeof(String), 230 2*sizeof(String) , XtRString, "*-helvetica" } , 231 { "timesfontFamilyName", "TimesfontFamilyName", XtRString, sizeof(String), 232 2*sizeof(String) , XtRString, "*-times" } , 222 233 { "symbolfontFamilyName", "SymbolfontFamilyName", XtRString, sizeof(String), 223 2*sizeof(String) , XtRString, "*-symbol" }234 4*sizeof(String) , XtRString, "*-symbol" } 224 235 }; 225 236 -
trunk/SophyaPI/PI/piimage.cc
r316 r329 55 55 //-- 56 56 //++ 57 // PIImage(PIContainerGen *par, c har *nom=NULL, int sx=0, int sy=0, int px=0, int py=0)57 // PIImage(PIContainerGen *par, const char *nom=NULL, int sx=0, int sy=0, int px=0, int py=0) 58 58 // Créateur 59 59 // … … 78 78 79 79 /* --Methode-- */ 80 PIImage::PIImage(PIContainerGen *par, c har *nom,80 PIImage::PIImage(PIContainerGen *par, const char *nom, 81 81 int sx, int sy, int px, int py) : 82 82 PIPixmap(par, nom, sx, sy, px, py) -
trunk/SophyaPI/PI/piimage.h
r292 r329 27 27 // Les methodes 28 28 29 PIImage(PIContainerGen *par, c har *nom=NULL,29 PIImage(PIContainerGen *par, const char *nom=NULL, 30 30 int sx=0, int sy=0, int px=0, int py=0); 31 31 ~PIImage(); -
trunk/SophyaPI/PI/pilistgen.cc
r328 r329 27 27 //-- 28 28 //++ 29 // PIListGen(PIContainerGen* par, c har* nom, int sx=100, int sy=100, int px=0, int py=0)29 // PIListGen(PIContainerGen* par, const char* nom, int sx=100, int sy=100, int px=0, int py=0) 30 30 // Création d'un objet liste (PIList). 31 31 //-- … … 74 74 //-- 75 75 76 PIListGen::PIListGen(PIContainerGen *par, c har *nom,76 PIListGen::PIListGen(PIContainerGen *par, const char *nom, 77 77 int sx, int sy, int px, int py) 78 78 : PIWdg(par, nom, sx, sy, px, py) -
trunk/SophyaPI/PI/pilistgen.h
r328 r329 10 10 enum {ClassId = 1110}; 11 11 12 PIListGen(PIContainerGen* par, c har* nom,12 PIListGen(PIContainerGen* par, const char* nom, 13 13 int sx=100, int sy=100, int px=0, int py=0); 14 14 ~PIListGen(); -
trunk/SophyaPI/PI/pilistx.cc
r328 r329 34 34 35 35 /* --Methode-- */ 36 PIListX::PIListX(PIContainerGen* par, c har* nom,36 PIListX::PIListX(PIContainerGen* par, const char* nom, 37 37 int sx, int sy, int px, int py) 38 38 : PIListGen(par, nom, sx, sy, px, py) … … 48 48 XtSetArg(warg[n], XmNlistSizePolicy, XmCONSTANT); n++; 49 49 XtSetArg(warg[n], XmNscrollBarDisplayPolicy, XmAS_NEEDED); n++; 50 mlist = XmCreateScrolledList(((PIWdgX *)par)->XtWdg(), nom, warg, n);50 mlist = XmCreateScrolledList(((PIWdgX *)par)->XtWdg(), (char *)nom, warg, n); // const_cast 51 51 XtManageChild(mlist); 52 52 XtWdg() = XtParent(mlist); … … 138 138 void PIListX::DeleteAllItems() 139 139 { 140 for(int i=0; i<mNItem; i++) DelItem(i); 140 int nmax = mNItem; 141 for(int i=0; i<nmax; i++) DelItem(0); 141 142 } 142 143 -
trunk/SophyaPI/PI/pilistx.h
r328 r329 6 6 class PIListX : public PIListGen { 7 7 public: 8 PIListX(PIContainerGen* par, c har* nom,8 PIListX(PIContainerGen* par, const char* nom, 9 9 int sx=100, int sy=100, int px=0, int py=0); 10 10 ~PIListX(); -
trunk/SophyaPI/PI/pimenubargen.cc
r113 r329 30 30 //-- 31 31 //++ 32 // PIMenubar(PIApplicationGen* par, c har* nom)32 // PIMenubar(PIApplicationGen* par, const char* nom) 33 33 // Création d'un objet Menubar. 34 34 // void AppendMenu(PIMenu* pdm) … … 43 43 //-- 44 44 45 PIMenubarGen::PIMenubarGen(PIApplicationGen* par, c har* nom)45 PIMenubarGen::PIMenubarGen(PIApplicationGen* par, const char* nom) 46 46 : PIWdg(NULL, nom) 47 47 { -
trunk/SophyaPI/PI/pimenubargen.h
r110 r329 11 11 enum {ClassId = 2600}; 12 12 13 PIMenubarGen(PIApplicationGen* par, c har* nom);13 PIMenubarGen(PIApplicationGen* par, const char* nom); 14 14 ~PIMenubarGen(); 15 15 -
trunk/SophyaPI/PI/pimenubarx.cc
r110 r329 15 15 16 16 /* --Methode-- */ 17 PIMenubarX::PIMenubarX(PIApplicationGen* par, c har* nom)17 PIMenubarX::PIMenubarX(PIApplicationGen* par, const char* nom) 18 18 : PIMenubarGen(par, nom) 19 19 { … … 22 22 23 23 XtWdg() = XmCreateMenuBar( ((PIApplicationX *)par)->MBCont()->XtWdg(), 24 nom, NULL, 0);24 (char *)nom, NULL, 0); // const_cast 25 25 26 26 wmis = k_wmi_normal ; -
trunk/SophyaPI/PI/pimenubarx.h
r110 r329 12 12 class PIMenubarX : public PIMenubarGen { 13 13 public: 14 PIMenubarX(PIApplicationGen* par, c har* nom);14 PIMenubarX(PIApplicationGen* par, const char* nom); 15 15 ~PIMenubarX(); 16 16 -
trunk/SophyaPI/PI/pimenugen.cc
r113 r329 32 32 //-- 33 33 //++ 34 // PIMenu(PIWdg* par, c har* nom, PIMenuType pdpu=k_UTMenu)34 // PIMenu(PIWdg* par, const char* nom, PIMenuType pdpu=k_UTMenu) 35 35 // Création d'un objet Menubar. "pdpu" peut prendre les valeurs 36 36 // "k_UTMenu", "k_PopupMenu", "k_PulldownMenu". Un menu de type … … 48 48 // 49 49 //++ 50 // void AppendItem(c har* nom, PIMessage msg, char* sc=NULL)50 // void AppendItem(const char* nom, PIMessage msg, char* sc=NULL) 51 51 // Permet d'ajouter une option au menu. Un raccourci clavier peut être spécifié 52 52 // par "sc". 53 // void AppendCheckItem(c har* nom, PIMessage msg, char* sc=NULL)53 // void AppendCheckItem(const char* nom, PIMessage msg, char* sc=NULL) 54 54 // Permet d'ajouter une option avec état ON/OFF au menu. 55 55 // void AppendPDMenu(PIMenu* pdm, char* sc=NULL) 56 56 // Ajoute un menu déroulant comme sous-menu. 57 // void DeleteItem(c har* nom)57 // void DeleteItem(const char* nom) 58 58 // Permet de supprimer une option du menu identifiée par le titre ("nom"). 59 59 // Si le nom désigne un menu déroulant, celui-ci n'est pas détruit (par "delete"). … … 67 67 //-- 68 68 //++ 69 // void SetSensitivity(c har* nom, bool sens=true)69 // void SetSensitivity(const char* nom, bool sens=true) 70 70 // Rend sensible ("sens=true") ou insensible l'option du menu identifiée par "nom". 71 71 // Une option insensible est affichée, mais ne peut être sélectionnée. … … 74 74 // void SetSensitivityNum(int n, bool sens=true) 75 75 // Rend sensible ("sens=true") ou insensible l'option numéro "n". 76 // bool IsSensitive(c har* nom)76 // bool IsSensitive(const char* nom) 77 77 // Indique si l'option "nom" est sensible ou pas. 78 78 // bool IsSensitiveMsg(PIMessage msg) … … 89 89 //-- 90 90 //++ 91 // void SetState(c har* nom, bool st=false)91 // void SetState(const char* nom, bool st=false) 92 92 // Change l'état de l'option "nom". 93 93 // void SetStateMsg(PIMessage msg, bool st=false) … … 95 95 // void SetStateNum(int n, bool st=false) 96 96 // Change l'état de l'option numéro "n". 97 // bool GetState(c har* nom)97 // bool GetState(const char* nom) 98 98 // Renvoie l'état de l'option "nom". 99 99 // bool GetStateMsg(PIMessage msg) … … 113 113 //-- 114 114 115 PIMenuGen::PIMenuGen(PIWdg* par, c har* nom, PIMenuType pdpu)115 PIMenuGen::PIMenuGen(PIWdg* par, const char* nom, PIMenuType pdpu) 116 116 : PIWdg(NULL, nom) , mMTyp(pdpu) 117 117 { -
trunk/SophyaPI/PI/pimenugen.h
r110 r329 12 12 enum {ClassId = 2500}; 13 13 14 PIMenuGen(PIWdg* par, c har* nom, PIMenuType pdpu=k_UTMenu);14 PIMenuGen(PIWdg* par, const char* nom, PIMenuType pdpu=k_UTMenu); 15 15 ~PIMenuGen(); 16 16 17 virtual void AppendItem(c har* nom, PIMessage msg, char* sc=NULL)=0;18 virtual void AppendCheckItem(c har* nom, PIMessage msg, char* sc=NULL)=0;17 virtual void AppendItem(const char* nom, PIMessage msg, char* sc=NULL)=0; 18 virtual void AppendCheckItem(const char* nom, PIMessage msg, char* sc=NULL)=0; 19 19 virtual void AppendPDMenu(PIMenuGen *pdm, char* sc=NULL)=0; 20 20 21 virtual void DeleteItem(c har *nom)=0;21 virtual void DeleteItem(const char *nom)=0; 22 22 virtual void DeleteItemMsg(PIMessage msg)=0; 23 23 virtual void DeleteItemNum(int n)=0; 24 24 25 virtual void SetSensitivity(c har *nom, bool sens=true)=0;25 virtual void SetSensitivity(const char *nom, bool sens=true)=0; 26 26 virtual void SetSensitivityMsg(PIMessage msg, bool sens=true)=0; 27 27 virtual void SetSensitivityNum(int n, bool sens=true)=0; 28 28 29 virtual bool IsSensitive(c har *nom)=0;29 virtual bool IsSensitive(const char *nom)=0; 30 30 virtual bool IsSensitiveMsg(PIMessage msg)=0; 31 31 virtual bool IsSensitiveNum(int n)=0; 32 32 33 virtual void SetState(c har *nom, bool st=false)=0;33 virtual void SetState(const char *nom, bool st=false)=0; 34 34 virtual void SetStateMsg(PIMessage msg, bool st=false)=0; 35 35 virtual void SetStateNum(int n, bool st=false)=0; 36 36 37 virtual bool GetState(c har *nom)=0;37 virtual bool GetState(const char *nom)=0; 38 38 virtual bool GetStateMsg(PIMessage msg)=0; 39 39 virtual bool GetStateNum(int n)=0; -
trunk/SophyaPI/PI/pimenux.cc
r204 r329 69 69 70 70 /* --Methode-- */ 71 PIMenuX::PIMenuX(PIWdg* par, c har *nom, PIMenuType pdpu)71 PIMenuX::PIMenuX(PIWdg* par, const char *nom, PIMenuType pdpu) 72 72 : PIMenuGen(par, nom, pdpu) 73 73 { … … 88 88 } 89 89 if (pdpu == k_PopupMenu) 90 XtWdg() = XmCreatePopupMenu( tw, nom, NULL, 0);90 XtWdg() = XmCreatePopupMenu( tw, (char *)nom, NULL, 0); // const_cast 91 91 else 92 XtWdg() = XmCreatePulldownMenu( tw, nom, NULL, 0);92 XtWdg() = XmCreatePulldownMenu( tw, (char *)nom, NULL, 0); // const_cast 93 93 94 94 mMTyp = pdpu; … … 107 107 108 108 /* --Methode-- */ 109 void PIMenuX::AppendItem(c har* nom, PIMessage msg, char* sc)109 void PIMenuX::AppendItem(const char* nom, PIMessage msg, char* sc) 110 110 { 111 111 AddItem(nom, msg, 0, sc, NULL); … … 113 113 114 114 /* --Methode-- */ 115 void PIMenuX::AppendCheckItem(c har* nom, PIMessage msg, char* sc)115 void PIMenuX::AppendCheckItem(const char* nom, PIMessage msg, char* sc) 116 116 { 117 117 AddItem(nom, msg, 1, sc, NULL); … … 129 129 130 130 /* --Methode-- */ 131 void PIMenuX::DeleteItem(c har *nom)131 void PIMenuX::DeleteItem(const char *nom) 132 132 { 133 133 DeleteItemNum(GetNumItem(nom)); … … 141 141 142 142 /* --Methode-- */ 143 void PIMenuX::SetSensitivity(c har *nom, bool sens)143 void PIMenuX::SetSensitivity(const char *nom, bool sens) 144 144 { 145 145 SetSensitivityNum(GetNumItem(nom), sens); … … 153 153 154 154 /* --Methode-- */ 155 bool PIMenuX::IsSensitive(c har *nom)155 bool PIMenuX::IsSensitive(const char *nom) 156 156 { 157 157 return(IsSensitiveNum(GetNumItem(nom)) ); … … 205 205 206 206 /* --Methode-- */ 207 void PIMenuX::SetState(c har *nom, bool st)207 void PIMenuX::SetState(const char *nom, bool st) 208 208 { 209 209 SetStateNum(GetNumItem(nom), st); … … 230 230 231 231 /* --Methode-- */ 232 bool PIMenuX::GetState(c har *nom)232 bool PIMenuX::GetState(const char *nom) 233 233 { 234 234 return( GetStateNum(GetNumItem(nom)) ); … … 289 289 290 290 /* --Methode-- */ 291 int PIMenuX::GetNumItem(c har *nom)291 int PIMenuX::GetNumItem(const char *nom) 292 292 { 293 293 -
trunk/SophyaPI/PI/pimenux.h
r110 r329 20 20 class PIMenuX : public PIMenuGen { 21 21 public: 22 PIMenuX(PIWdg* par, c har* nom, PIMenuType pdpu=k_UTMenu);22 PIMenuX(PIWdg* par, const char* nom, PIMenuType pdpu=k_UTMenu); 23 23 ~PIMenuX(); 24 24 25 virtual void AppendItem(c har* nom, PIMessage msg, char* sc=NULL);26 virtual void AppendCheckItem(c har* nom, PIMessage msg, char* sc=NULL);25 virtual void AppendItem(const char* nom, PIMessage msg, char* sc=NULL); 26 virtual void AppendCheckItem(const char* nom, PIMessage msg, char* sc=NULL); 27 27 virtual void AppendPDMenu(PIMenuGen *pdm, char* sc=NULL); 28 28 29 virtual void DeleteItem(c har *nom);29 virtual void DeleteItem(const char *nom); 30 30 virtual void DeleteItemMsg(PIMessage msg); 31 31 virtual void DeleteItemNum(int n); 32 32 33 virtual void SetSensitivity(c har *nom, bool sens=true);33 virtual void SetSensitivity(const char *nom, bool sens=true); 34 34 virtual void SetSensitivityMsg(PIMessage msg, bool sens=true); 35 35 virtual void SetSensitivityNum(int n, bool sens=true); 36 36 37 virtual bool IsSensitive(c har *nom);37 virtual bool IsSensitive(const char *nom); 38 38 virtual bool IsSensitiveMsg(PIMessage msg); 39 39 virtual bool IsSensitiveNum(int n); 40 40 41 virtual void SetState(c har *nom, bool st=false);41 virtual void SetState(const char *nom, bool st=false); 42 42 virtual void SetStateMsg(PIMessage msg, bool st=false); 43 43 virtual void SetStateNum(int n, bool st=false); 44 44 45 virtual bool GetState(c har *nom);45 virtual bool GetState(const char *nom); 46 46 virtual bool GetStateMsg(PIMessage msg); 47 47 virtual bool GetStateNum(int n); … … 53 53 // Pour usage prive et par OptionMenu, ... 54 54 PIMessage ItemMsg(int n); 55 int GetNumItem(c har *nom);55 int GetNumItem(const char *nom); 56 56 int GetNumItemMsg(PIMessage msg); 57 57 SysDWdg GetItemWdg(int n); -
trunk/SophyaPI/PI/pioptmenugen.cc
r110 r329 2 2 3 3 4 PIOptMenuGen::PIOptMenuGen(PIContainerGen* par, c har* nom, int sx, int sy, int px, int py)4 PIOptMenuGen::PIOptMenuGen(PIContainerGen* par, const char* nom, int sx, int sy, int px, int py) 5 5 : PIWdg(par, nom, sx, sy, px, py) // Attention au const ! 6 6 { -
trunk/SophyaPI/PI/pioptmenugen.h
r163 r329 9 9 enum {ClassId = 1100}; 10 10 11 PIOptMenuGen(PIContainerGen* par, c har* nom, int sx=50, int sy=15, int px=0, int py=0);11 PIOptMenuGen(PIContainerGen* par, const char* nom, int sx=50, int sy=15, int px=0, int py=0); 12 12 ~PIOptMenuGen(); 13 13 … … 15 15 16 16 inline PIMenu* Menu() {return mMen; } // Renvoie un pointeur sur le menu associe 17 inline void AppendItem(c har* nom, PIMessage msg)17 inline void AppendItem(const char* nom, PIMessage msg) 18 18 { mMen->AppendItem(nom, msg); } 19 19 -
trunk/SophyaPI/PI/pioptmenux.cc
r118 r329 32 32 33 33 /* --Methode-- */ 34 PIOptMenuX::PIOptMenuX(PIContainerGen* par, c har* nom, int sx, int sy, int px, int py)34 PIOptMenuX::PIOptMenuX(PIContainerGen* par, const char* nom, int sx, int sy, int px, int py) 35 35 : PIOptMenuGen(par, nom, sx, sy, px, py) 36 36 { … … 125 125 126 126 /* --Methode-- */ 127 void PIOptMenuX::SetLabel(string const& lab) 128 { 129 XmString xmstr; 130 xmstr = XmStringLtoRCreate((char *)lab.c_str(), XmSTRING_DEFAULT_CHARSET); 131 int n=0; 132 Arg warg[2]; 133 134 XtSetArg(warg[n], XmNlabelString, xmstr); n++; 135 XtSetValues(XtWdg(), warg, n); 136 XmStringFree(xmstr); 137 return; 138 } 139 140 /* --Methode-- */ 127 141 void PIOptMenuX::createmygc() 128 142 { -
trunk/SophyaPI/PI/pioptmenux.h
r110 r329 8 8 class PIOptMenuX : public PIOptMenuGen { 9 9 public: 10 PIOptMenuX(PIContainerGen* par, c har* nom, int sx=50, int sy=15, int px=0, int py=0);10 PIOptMenuX(PIContainerGen* par, const char* nom, int sx=50, int sy=15, int px=0, int py=0); 11 11 ~PIOptMenuX(); 12 12 … … 20 20 virtual void SetValue(PIMessage msg); 21 21 22 // Pour utilisation privee dans call-back 22 23 // Pour utilisation privee dans call-back, .... 24 virtual void SetLabel(string const&); 23 25 inline GC myGC() {if (mgc == 0) createmygc(); return(mgc); } 24 26 -
trunk/SophyaPI/PI/pipixmapgen.cc
r292 r329 38 38 //-- 39 39 //++ 40 // PIPixmapGen(PIContainerGen *par, c har *nom, int sx=10, int sy=10, int px=0, int py=0)40 // PIPixmapGen(PIContainerGen *par, const char *nom, int sx=10, int sy=10, int px=0, int py=0) 41 41 // Constructeur - Création d'un "PIPIxmap". 42 42 // long kind() … … 81 81 82 82 /* --Methode-- */ 83 PIPixmapGen::PIPixmapGen(PIContainerGen *par, c har *nom,83 PIPixmapGen::PIPixmapGen(PIContainerGen *par, const char *nom, 84 84 int sx, int sy, int px, int py) : 85 85 PIBaseWdg(par, nom, sx, sy, px, py) -
trunk/SophyaPI/PI/pipixmapgen.h
r163 r329 19 19 enum {ClassId = 5100}; 20 20 21 PIPixmapGen(PIContainerGen *par, c har *nom,21 PIPixmapGen(PIContainerGen *par, const char *nom, 22 22 int sx=10, int sy=10, int px=0, int py=0); 23 23 virtual ~PIPixmapGen(); -
trunk/SophyaPI/PI/pipixmapx.cc
r163 r329 10 10 11 11 /* --Methode-- */ 12 PIPixmapX::PIPixmapX(PIContainerGen *par, c har *nom,12 PIPixmapX::PIPixmapX(PIContainerGen *par, const char *nom, 13 13 int sx, int sy, int px, int py) 14 14 : PIPixmapGen(par,nom,sx,sy,px,py) -
trunk/SophyaPI/PI/pipixmapx.h
r127 r329 7 7 8 8 public: 9 PIPixmapX(PIContainerGen *par, c har *nom,9 PIPixmapX(PIContainerGen *par, const char *nom, 10 10 int sx=10, int sy=10, int px=0, int py=0); 11 11 virtual ~PIPixmapX(); -
trunk/SophyaPI/PI/piscdrawwdg.cc
r292 r329 43 43 //-- 44 44 //++ 45 // PIScDrawWdg(PIContainerGen *par, c har *nom, int sx=100, int sy=100, int px=0, int py=0)45 // PIScDrawWdg(PIContainerGen *par, const char *nom, int sx=100, int sy=100, int px=0, int py=0) 46 46 // Constructeur. Contient uniquement le traceur de base, responsable du tracé 47 47 // des axes et des éléments ajoutés (textes, ...) … … 60 60 61 61 62 PIScDrawWdg::PIScDrawWdg(PIContainerGen *par, c har *nom,62 PIScDrawWdg::PIScDrawWdg(PIContainerGen *par, const char *nom, 63 63 int sx, int sy, int px, int py) 64 64 :PIBaseWdg(par, nom, sx, sy, px, py) -
trunk/SophyaPI/PI/piscdrawwdg.h
r209 r329 20 20 enum {ClassId = 5300}; 21 21 22 PIScDrawWdg(PIContainerGen *par, c har *nom,22 PIScDrawWdg(PIContainerGen *par, const char *nom, 23 23 int sx=100, int sy=100, int px=0, int py=0); 24 24 virtual ~PIScDrawWdg(); -
trunk/SophyaPI/PI/pistdwdggen.cc
r323 r329 22 22 //-- 23 23 //++ 24 // PILabel(PIContainerGen* par, c har* nom, int sx=10, int sy=10, int px=0, int py=0)24 // PILabel(PIContainerGen* par, const char* nom, int sx=10, int sy=10, int px=0, int py=0) 25 25 // Création d'un objet PILabel ayant un contenu (étiquette) identique à "nom". 26 26 // void SetLabel(string const& lab) … … 31 31 32 32 33 PILabelGen::PILabelGen(PIContainerGen *par, c har *nom,33 PILabelGen::PILabelGen(PIContainerGen *par, const char *nom, 34 34 int sx, int sy, int px, int py) 35 35 : PIWdg(par, nom, sx, sy, px, py) … … 61 61 //-- 62 62 //++ 63 // PIButton(PIContainerGen* par, c har* nom, PIMessage msg, int sx=10, int sy=10, int px=0, int py=0)63 // PIButton(PIContainerGen* par, const char* nom, PIMessage msg, int sx=10, int sy=10, int px=0, int py=0) 64 64 // Création d'un objet PIButton avec une étiquette identique à "nom". 65 65 // void SetLabel(string const& lab) … … 69 69 70 70 71 PIButtonGen::PIButtonGen(PIContainerGen *par, c har *nom, PIMessage msg,71 PIButtonGen::PIButtonGen(PIContainerGen *par, const char *nom, PIMessage msg, 72 72 int sx, int sy, int px, int py) 73 73 : PIWdg(par, nom, sx, sy, px, py) … … 105 105 //-- 106 106 //++ 107 // PIText(PIContainerGen* par, c har* nom, int sx=10, int sy=10, int px=0, int py=0)107 // PIText(PIContainerGen* par, const char* nom, int sx=10, int sy=10, int px=0, int py=0) 108 108 // Création d'un objet PIText. 109 // PIText(PIContainerGen* par, c har* nom, bool vsb, bool hsb, -109 // PIText(PIContainerGen* par, const char* nom, bool vsb, bool hsb, - 110 110 // int sx=10, int sy=10, int px=0, int py=0) 111 111 // Création d'un objet PIText multiligne, muni d'ascenseurs … … 121 121 //-- 122 122 123 PITextGen::PITextGen(PIContainerGen *par, c har *nom,124 int sx, int sy, int px, int py) 125 : PIWdg(par, nom, sx, sy, px, py) 126 {} 127 128 PITextGen::PITextGen(PIContainerGen *par, c har *nom, bool vsb, bool hsb,123 PITextGen::PITextGen(PIContainerGen *par, const char *nom, 124 int sx, int sy, int px, int py) 125 : PIWdg(par, nom, sx, sy, px, py) 126 {} 127 128 PITextGen::PITextGen(PIContainerGen *par, const char *nom, bool vsb, bool hsb, 129 129 int sx, int sy, int px, int py) 130 130 : PIWdg(par, nom, sx, sy, px, py) … … 139 139 /************* PICheckBoxGen ************/ 140 140 141 PICheckBoxGen::PICheckBoxGen(PIContainerGen *par, c har *nom, PIMessage msg,141 PICheckBoxGen::PICheckBoxGen(PIContainerGen *par, const char *nom, PIMessage msg, 142 142 int sx, int sy, int px, int py) 143 143 : PIWdg(par, nom, sx, sy, px, py) … … 171 171 //-- 172 172 //++ 173 // PICheckBox(PIContainerGen* par, c har* nom, PIMessage msg, int sx=10, int sy=10, int px=0, int py=0);173 // PICheckBox(PIContainerGen* par, const char* nom, PIMessage msg, int sx=10, int sy=10, int px=0, int py=0); 174 174 // Création d'un objet PICheckBox. 175 175 // void SetState(bool st=false) … … 204 204 //-- 205 205 //++ 206 // PIScale(PIContainerGen* par, c har* nom, PIMessage msg, int dir=kSDirLtoR, int sx=100, int sy=10, int px=0, int py=0)206 // PIScale(PIContainerGen* par, const char* nom, PIMessage msg, int dir=kSDirLtoR, int sx=100, int sy=10, int px=0, int py=0) 207 207 // Création d'un objet PIScale. "dir" indique la direction et le sens d'affichage et peut 208 208 // prendre les valeurs "kSDirLtoR" (gauche à droite), "kSDirRtoL" (droite à gauche), … … 219 219 220 220 221 PIScaleGen::PIScaleGen(PIContainerGen *par, c har *nom, PIMessage msg,221 PIScaleGen::PIScaleGen(PIContainerGen *par, const char *nom, PIMessage msg, 222 222 int /*dir*/, int sx, int sy, int px, int py) 223 223 : PIWdg(par, nom, sx, sy, px, py) … … 255 255 //-- 256 256 //++ 257 // PIScrollBar(PIContainerGen* par, c har* nom, PIMessage msg, int dir=kSDirUpDown, int sx=10, int sy=100, int px=0, int py=0)257 // PIScrollBar(PIContainerGen* par, const char* nom, PIMessage msg, int dir=kSDirUpDown, int sx=10, int sy=100, int px=0, int py=0) 258 258 // Création d'un objet PIScrollBar. "dir" indique la direction et le sens d'affichage et peut 259 259 // prendre les valeurs "kSDirLtoR" (gauche à droite), "kSDirRtoL" (droite à gauche), … … 276 276 //-- 277 277 278 PIScrollBarGen::PIScrollBarGen(PIContainerGen *par, c har *nom, PIMessage msg,278 PIScrollBarGen::PIScrollBarGen(PIContainerGen *par, const char *nom, PIMessage msg, 279 279 int /*dir*/, int sx, int sy, int px, int py) 280 280 : PIWdg(par, nom, sx, sy, px, py) -
trunk/SophyaPI/PI/pistdwdggen.h
r323 r329 10 10 enum {ClassId = 1001}; 11 11 12 PILabelGen(PIContainerGen* par, c har* nom,12 PILabelGen(PIContainerGen* par, const char* nom, 13 13 int sx=10, int sy=10, int px=0, int py=0); 14 14 virtual ~PILabelGen(); 15 15 16 16 virtual long kind() {return ClassId; } 17 virtual void SetLabel(string const&)=0; 17 18 }; 18 19 … … 26 27 enum {ClassId = 1010}; 27 28 28 PIButtonGen(PIContainerGen* par, c har* nom,29 PIButtonGen(PIContainerGen* par, const char* nom, 29 30 PIMessage msg = PIMsg_Click, 30 31 int sx=10, int sy=10, int px=0, int py=0); … … 32 33 33 34 virtual long kind() {return ClassId; } 35 virtual void SetLabel(string const&)=0; 34 36 virtual void ActivatePress(bool acp=false)=0; 35 37 … … 43 45 enum {ClassId = 1020}; 44 46 45 PITextGen(PIContainerGen* par, c har* nom,47 PITextGen(PIContainerGen* par, const char* nom, 46 48 int sx=10, int sy=10, int px=0, int py=0); 47 PITextGen(PIContainerGen* par, c har* nom, bool vsb, bool hsb,49 PITextGen(PIContainerGen* par, const char* nom, bool vsb, bool hsb, 48 50 int sx=100, int sy=100, int px=0, int py=0); 49 51 virtual ~PITextGen(); … … 65 67 enum {ClassId = 1030}; 66 68 67 PICheckBoxGen(PIContainerGen* par, c har* nom,69 PICheckBoxGen(PIContainerGen* par, const char* nom, 68 70 PIMessage msg = PIMsg_Click, 69 71 int sx=10, int sy=10, int px=0, int py=0); … … 91 93 enum {ClassId = 1040}; 92 94 93 PIScaleGen(PIContainerGen* par, c har* nom,95 PIScaleGen(PIContainerGen* par, const char* nom, 94 96 PIMessage msg = PIMsg_DataChanged, int dir=kSDirLtoR, 95 97 int sx=100, int sy=10, int px=0, int py=0); … … 112 114 enum {ClassId = 1050}; 113 115 114 PIScrollBarGen(PIContainerGen* par, c har* nom,116 PIScrollBarGen(PIContainerGen* par, const char* nom, 115 117 PIMessage msg=PIMsg_DataChanged, int dir=kSDirUpDown, 116 118 int sx=10, int sy=100, int px=0, int py=0); -
trunk/SophyaPI/PI/pistdwdgx.cc
r323 r329 25 25 26 26 /* --Methode-- */ 27 PILabelX::PILabelX(PIContainerGen *par, c har *nom,27 PILabelX::PILabelX(PIContainerGen *par, const char *nom, 28 28 int sx, int sy, int px, int py) 29 29 : PILabelGen(par, nom, sx, sy, px, py) … … 44 44 {} 45 45 46 /* --Methode-- */ 47 void PILabelX::SetLabel(string const& lab) 48 { 49 XmString xmstr; 50 xmstr = XmStringLtoRCreate((char *)lab.c_str(), XmSTRING_DEFAULT_CHARSET); 51 int n=0; 52 Arg warg[2]; 53 54 XtSetArg(warg[n], XmNlabelString, xmstr); n++; 55 XtSetValues(XtWdg(), warg, n); 56 XmStringFree(xmstr); 57 return; 58 } 59 46 60 47 61 /************* PIButtonX ************/ … … 78 92 79 93 /* --Methode-- */ 80 PIButtonX::PIButtonX(PIContainerGen *par, c har *nom, PIMessage msg,94 PIButtonX::PIButtonX(PIContainerGen *par, const char *nom, PIMessage msg, 81 95 int sx, int sy, int px, int py) 82 96 : PIButtonGen(par, nom, msg, sx, sy, px, py) … … 129 143 130 144 /* --Methode-- */ 145 void PIButtonX::SetLabel(string const& lab) 146 { 147 XmString xmstr; 148 xmstr = XmStringLtoRCreate((char *)lab.c_str(), XmSTRING_DEFAULT_CHARSET); 149 int n=0; 150 Arg warg[2]; 151 152 XtSetArg(warg[n], XmNlabelString, xmstr); n++; 153 XtSetValues(XtWdg(), warg, n); 154 XmStringFree(xmstr); 155 return; 156 } 157 158 /* --Methode-- */ 131 159 void PIButtonX::ActivatePress(bool acp) 132 160 { … … 143 171 } 144 172 173 145 174 /* --Methode-- */ 146 175 void PIButtonX::ReleaseButton() … … 155 184 156 185 /* --Methode-- */ 157 PITextX::PITextX(PIContainerGen *par, c har *nom,186 PITextX::PITextX(PIContainerGen *par, const char *nom, 158 187 int sx, int sy, int px, int py) 159 188 : PITextGen(par, nom, sx, sy, px, py) … … 172 201 173 202 /* --Methode-- */ 174 PITextX::PITextX(PIContainerGen *par, c har *nom, bool vsb, bool hsb,203 PITextX::PITextX(PIContainerGen *par, const char *nom, bool vsb, bool hsb, 175 204 int sx, int sy, int px, int py) 176 205 : PITextGen(par, nom, vsb, hsb, sx, sy, px, py) … … 185 214 if (hsb) 186 215 XtSetArg(warg[n],XmNscrollVertical, True); n++; 187 mtext = XmCreateScrolledText(((PIWdgX *)par)->XtWdg(), nom, warg, n);216 mtext = XmCreateScrolledText(((PIWdgX *)par)->XtWdg(), (char *)nom, warg, n); // const_cast 188 217 XtManageChild(mtext); 189 218 XtWdg() = XtParent(mtext); … … 297 326 298 327 /* --Methode-- */ 299 PICheckBoxX::PICheckBoxX(PIContainerGen *par, c har *nom, PIMessage msg,328 PICheckBoxX::PICheckBoxX(PIContainerGen *par, const char *nom, PIMessage msg, 300 329 int sx, int sy, int px, int py) 301 330 : PICheckBoxGen(par, nom, msg, sx, sy, px, py) … … 360 389 361 390 /* --Methode-- */ 362 PIScaleX::PIScaleX(PIContainerGen *par, c har *nom, PIMessage msg,391 PIScaleX::PIScaleX(PIContainerGen *par, const char *nom, PIMessage msg, 363 392 int dir, int sx, int sy, int px, int py) 364 393 : PIScaleGen(par, nom, msg, dir, sx, sy, px, py) … … 496 525 497 526 /* --Methode-- */ 498 PIScrollBarX::PIScrollBarX(PIContainerGen *par, c har *nom, PIMessage msg,527 PIScrollBarX::PIScrollBarX(PIContainerGen *par, const char *nom, PIMessage msg, 499 528 int dir, int sx, int sy, int px, int py) 500 529 : PIScrollBarGen(par, nom, msg, dir, sx, sy, px, py) -
trunk/SophyaPI/PI/pistdwdgx.h
r323 r329 8 8 { 9 9 public: 10 PILabelX(PIContainerGen *par, c har *nom,10 PILabelX(PIContainerGen *par, const char *nom, 11 11 int sx=10, int sy=10, int px=0, int py=0); 12 12 virtual ~PILabelX(); 13 virtual void SetLabel(string const&); 13 14 14 15 }; … … 17 18 { 18 19 public: 19 PIButtonX(PIContainerGen *par, c har *nom,20 PIButtonX(PIContainerGen *par, const char *nom, 20 21 PIMessage msg = PIMsg_Click, 21 22 int sx=10, int sy=10, int px=0, int py=0); … … 23 24 24 25 virtual void ActivatePress(bool acp=false); 26 virtual void SetLabel(string const&); 25 27 26 28 void ReleaseButton(); // Fonction a utiliser avec attention … … 36 38 { 37 39 public: 38 PITextX(PIContainerGen *par, c har *nom,40 PITextX(PIContainerGen *par, const char *nom, 39 41 int sx=10, int sy=10, int px=0, int py=0); 40 PITextX(PIContainerGen* par, c har* nom, bool vsb, bool hsb,42 PITextX(PIContainerGen* par, const char* nom, bool vsb, bool hsb, 41 43 int sx=100, int sy=100, int px=0, int py=0); 42 44 virtual ~PITextX(); … … 58 60 { 59 61 public: 60 PICheckBoxX(PIContainerGen *par, c har *nom,62 PICheckBoxX(PIContainerGen *par, const char *nom, 61 63 PIMessage msg=PIMsg_Click, 62 64 int sx=10, int sy=10, int px=0, int py=0); … … 74 76 { 75 77 public: 76 PIScaleX(PIContainerGen* par, c har* nom,78 PIScaleX(PIContainerGen* par, const char* nom, 77 79 PIMessage msg=PIMsg_DataChanged, int dir=kSDirLtoR, 78 80 int sx=100, int sy=10, int px=0, int py=0); … … 94 96 { 95 97 public: 96 PIScrollBarX(PIContainerGen* par, c har* nom,98 PIScrollBarX(PIContainerGen* par, const char* nom, 97 99 PIMessage msg = PIMsg_DataChanged, int dir=kSDirUpDown, 98 100 int sx=10, int sy=100, int px=0, int py=0); -
trunk/SophyaPI/PI/pistzwin.cc
r204 r329 129 129 //-- 130 130 //++ 131 // PIStackWindow(PIMsgHandler* par, c har* nom, PIWindowKind k=PIWK_normal, int sx=100, int sy=100, int px=0, int py=0)131 // PIStackWindow(PIMsgHandler* par, const char* nom, PIWindowKind k=PIWK_normal, int sx=100, int sy=100, int px=0, int py=0) 132 132 // Constructeur - identique à celui de "PIWindow" 133 133 // void DispNext() … … 146 146 147 147 /* --Methode-- */ 148 PIStackWindow::PIStackWindow(PIMsgHandler* par, c har* nom, PIWindowKind k,148 PIStackWindow::PIStackWindow(PIMsgHandler* par, const char* nom, PIWindowKind k, 149 149 int sx, int sy, int px, int py) 150 150 : PIWindow(par, nom, k, sx, sy, px, py) , mPerad(1) … … 338 338 //-- 339 339 //++ 340 // PIZoneWindow(PIMsgHandler* par, c har* nom, PIWindowKind k=PIWK_normal, -340 // PIZoneWindow(PIMsgHandler* par, const char* nom, PIWindowKind k=PIWK_normal, - 341 341 // int nzx=1, int nzy=1, int sx=100, int sy=100, int px=0, int py=0) 342 342 // Constructeur avec spécification de nombre de cellules horizontal "nzx", vertical "nzy". … … 350 350 351 351 /* --Methode-- */ 352 PIZoneWindow::PIZoneWindow(PIMsgHandler* par, c har* nom, PIWindowKind k,352 PIZoneWindow::PIZoneWindow(PIMsgHandler* par, const char* nom, PIWindowKind k, 353 353 int nzx, int nzy, int sx, int sy, int px, int py) 354 354 : PIWindow(par, nom, k, sx, sy, px, py) -
trunk/SophyaPI/PI/pistzwin.h
r190 r329 36 36 class PIStackWindow : public PIWindow { 37 37 public: 38 PIStackWindow(PIMsgHandler* par, c har* nom, PIWindowKind k=PIWK_normal,38 PIStackWindow(PIMsgHandler* par, const char* nom, PIWindowKind k=PIWK_normal, 39 39 int sx=100, int sy=100, int px=0, int py=0); 40 40 virtual ~PIStackWindow(); … … 79 79 class PIZoneWindow : public PIWindow { 80 80 public: 81 PIZoneWindow(PIMsgHandler* par, c har* nom, PIWindowKind k=PIWK_normal,81 PIZoneWindow(PIMsgHandler* par, const char* nom, PIWindowKind k=PIWK_normal, 82 82 int nzx=1, int nzy=1, int sx=100, int sy=100, int px=0, int py=0); 83 83 virtual ~PIZoneWindow(); -
trunk/SophyaPI/PI/piwdggen.cc
r204 r329 43 43 //-- 44 44 //++ 45 // PIWdg(PIContainerGen *par, c har *nom, int sx=10, int sy=10, int px=0, int py=0)45 // PIWdg(PIContainerGen *par, const char *nom, int sx=10, int sy=10, int px=0, int py=0) 46 46 // Création d'un objet contenu dans l'objet *PIContainer* "par", de 47 47 // taille "sx,sy", se trouvant à la position "px,py" avec le nom "nom" … … 190 190 191 191 /* --Methode-- */ 192 PIWdgGen::PIWdgGen(PIContainerGen *par, c har*, int, int, int, int)192 PIWdgGen::PIWdgGen(PIContainerGen *par, const char*, int, int, int, int) 193 193 : PIMsgHandler(par) 194 194 { -
trunk/SophyaPI/PI/piwdggen.h
r190 r329 41 41 enum {ClassId = 100}; 42 42 43 PIWdgGen(PIContainerGen *par, c har *nom,43 PIWdgGen(PIContainerGen *par, const char *nom, 44 44 int sx=10, int sy=10, int px=0, int py=0); 45 45 virtual ~PIWdgGen(); … … 63 63 virtual void SetPos(int px, int py)=0; 64 64 virtual void SetBorderWidth(int bw)=0; 65 virtual void SetLabel(string const&) {}66 65 67 66 // Gestion des accrochages (binding) aux containers -
trunk/SophyaPI/PI/piwdgx.cc
r320 r329 113 113 114 114 /* --Methode-- */ 115 PIWdgX::PIWdgX(PIContainerGen *par, c har *nom,115 PIWdgX::PIWdgX(PIContainerGen *par, const char *nom, 116 116 int sx, int sy, int px, int py) 117 117 :PIWdgGen(par, nom, sx, sy, px, py) … … 123 123 124 124 /* --Methode-- */ 125 int PIWdgX::CreateXtWdg(c har *nom, SysDWdgClass wdgcl, SysDWdg pwdg,125 int PIWdgX::CreateXtWdg(const char *nom, SysDWdgClass wdgcl, SysDWdg pwdg, 126 126 int sx, int sy, int px, int py, Arg* oarg, int na) 127 127 { … … 453 453 } 454 454 455 /* --Methode-- */456 void PIWdgX::SetLabel(string const& lab)457 {458 XmString xmstr;459 xmstr = XmStringLtoRCreate((char *)lab.c_str(), XmSTRING_DEFAULT_CHARSET);460 int n=0;461 Arg warg[2];462 463 XtSetArg(warg[n], XmNlabelString, xmstr); n++;464 XtSetValues(XtWdg(), warg, n);465 XmStringFree(xmstr);466 return;467 }468 469 470 455 471 456 /* --Methode-- */ … … 555 540 556 541 // Ressources X si non definis 557 static const String fallback_res[2 4] = {542 static const String fallback_res[26] = { 558 543 "PeidaInt*default*background: LightGrey" , 559 544 "PeidaInt*background: LightGrey" , … … 577 562 "PeidaInt*fontList: -*-courier-bold-r-normal-*-12-*-*-*-*-*-ISO8859-1", 578 563 "PeidaInt*default*fontList: -*-courier-bold-r-normal-*-12-*-*-*-*-*-ISO8859-1", 579 "PeidaInt*fontFamilyName: *-courier", // Pas de blanc apres le nom de font 580 "PeidaInt*courierfontFamilyName: *-courier", // " " 581 "PeidaInt*symbolfontFamilyName: *-symbol", // " " 564 "PeidaInt*fontFamilyName: *-courier", // Pas de blanc apres le nom de font 565 "PeidaInt*courierfontFamilyName: *-courier", // " " 566 "PeidaInt*helveticafontFamilyName: *-helvetica", // " " 567 "PeidaInt*timesfontFamilyName: *-times", // " " 568 "PeidaInt*symbolfontFamilyName: *-symbol", // " " 582 569 "PeidaInt*XmToggleButton*selectColor: Red", 583 570 NULL -
trunk/SophyaPI/PI/piwdgx.h
r204 r329 21 21 // Les methodes ... 22 22 PIWdgX(int narg=0, char *arg[]=NULL); 23 PIWdgX(PIContainerGen *par, c har *nom,23 PIWdgX(PIContainerGen *par, const char *nom, 24 24 int sx=10, int sy=10, int px=0, int py=0); 25 25 … … 30 30 virtual void SetSize(int sx, int sy); 31 31 virtual void SetPos(int px, int py); 32 virtual void SetLabel(string const & lab);33 34 32 35 33 virtual void SetBinding(PIBindingKind left, PIBindingKind top, … … 84 82 inline SysDWdg XtWdg() const {return(sdw); }; 85 83 inline SysDWdg& XtWdg() {return(sdw); }; 86 int CreateXtWdg(c har *nom, SysDWdgClass wdgcl=NULL, SysDWdg pwdg=NULL,84 int CreateXtWdg(const char *nom, SysDWdgClass wdgcl=NULL, SysDWdg pwdg=NULL, 87 85 int sx=10, int sy=10, int px=0, int py=0, Arg* oarg=NULL, int na=0); 88 86 int BorderWidth(); -
trunk/SophyaPI/PI/piwindowgen.cc
r292 r329 30 30 //-- 31 31 //++ 32 // PIWindowGen(PIMsgHandler* par, c har *nom, PIWindowKind k=PIWK_normal, int sx=10, int sy=10, int px=0, int py=0)32 // PIWindowGen(PIMsgHandler* par, const char *nom, PIWindowKind k=PIWK_normal, int sx=10, int sy=10, int px=0, int py=0) 33 33 // Création d'une fenêtre de haut niveau. La variable "PIWindowKind k" contrôle 34 34 // le comportement de l'objet vis à vis de l'application WindowManager. Le comportement … … 61 61 62 62 /* --Methode-- */ 63 PIWindowGen::PIWindowGen(PIMsgHandler *par, c har *nom, PIWindowKind k,63 PIWindowGen::PIWindowGen(PIMsgHandler *par, const char *nom, PIWindowKind k, 64 64 int sx, int sy, int px, int py) 65 65 : PIContainer(NULL, nom, sx, sy, px, py), mWtyp(k) -
trunk/SophyaPI/PI/piwindowgen.h
r32 r329 16 16 public: 17 17 enum {ClassId = 1550}; 18 PIWindowGen(PIMsgHandler* par, c har *nom, PIWindowKind k=PIWK_normal,18 PIWindowGen(PIMsgHandler* par, const char *nom, PIWindowKind k=PIWK_normal, 19 19 int sx=10, int sy=10, int px=0, int py=0); 20 20 virtual ~PIWindowGen(); -
trunk/SophyaPI/PI/piwindowx.cc
r292 r329 32 32 33 33 /* --Methode-- */ 34 PIWindowX::PIWindowX(PIMsgHandler *par, c har *nom, PIWindowKind k,34 PIWindowX::PIWindowX(PIMsgHandler *par, const char *nom, PIWindowKind k, 35 35 int sx, int sy, int px, int py) 36 36 : PIWindowGen(par, nom, k, -1, -1, 0, 0) -
trunk/SophyaPI/PI/piwindowx.h
r23 r329 8 8 class PIWindowX : public PIWindowGen { 9 9 public: 10 PIWindowX(PIMsgHandler *par, c har *nom, PIWindowKind k=PIWK_normal,10 PIWindowX(PIMsgHandler *par, const char *nom, PIWindowKind k=PIWK_normal, 11 11 int sx=10, int sy=10, int px=0, int py=0); 12 12 virtual ~PIWindowX();
Note:
See TracChangeset
for help on using the changeset viewer.