source: Sophya/trunk/SophyaPI/PIext/pisiadw.h@ 3375

Last change on this file since 3375 was 3366, checked in by ansari, 18 years ago

Tentative pour regler le probleme de blocage de piapp suite a affichage de la fefenetre de gestion d'objets.

1/ Protection dans NamedObjMgr() pour eviter deadlock de mutex (ds NamedObjMgr::UpdateObjMgrWindow() en particulier)
2/ Introduction de la classe SOpExObj (fichier piacmd.h .cc) pour execution d'operations sur objets, initiees depuis la boucle d'evts, dans un thread separe.

Reza , 30/10/2007

  • Property svn:executable set to *
File size: 2.0 KB
RevLine 
[333]1// This may look like C code, but it is really -*- C++ -*-
2// Classe de fenetre pour gestion d'objet et PPF-In
3// Reza Aout 97 , Juillet,Aout 98, Ete 99
4// CEA-DAPNIA LAL-IN2P3/CNRS
5
[165]6#ifndef PISIADW_H_SEEN
7#define PISIADW_H_SEEN
8
9#include <string.h>
10
11#include "pisysdep.h"
12
13#include PIAPP_H
14#include PIWIN_H
15#include PIMENU_H
16#include PIOPTMENU_H
17#include PISTDWDG_H
18#include PILIST_H
19
20
21class PIStdImgApp;
22
23
24
25/* --------------------------------------------------------------------------- */
26class ObjMgrWind : public PIWindow {
27public :
28 ObjMgrWind(PIStdImgApp *par);
29 ~ObjMgrWind();
30 virtual void Show();
[3366]31 virtual void Hide();
[165]32 virtual void Process(PIMessage msg, PIMsgHandler* sender, void* data=NULL);
[333]33 inline void AddDirectory(const char * dir, int did)
34 { dirlist->AppendItem(dir, 30000+did); }
35 inline void DelDirectory(int did)
36 { dirlist->Menu()->DeleteItemMsg(30000+did); }
[685]37 inline void ClearObjList()
[333]38 { mNitem=0; objlist->DeleteAllItems(); }
[685]39 inline void AddObj(const char * objn, int oid)
40 { mNitem++; objlist->AppendItem(objn, oid); }
[2762]41 inline int GetCurDirId() { return (dirlist->GetValue()-30000); }
[685]42
[3366]43 inline void SetCurDir(string & cd) { dirlist->SetValueStr(cd); }
44
[685]45 virtual void UpdateList(int did);
46 virtual void AddObjList(int did, const char * objn, int oid);
47 virtual void DelObjList(int did, int oid);
48
[165]49private:
50 PIStdImgApp* dap;
[333]51 PIOptMenu* dirlist;
52 int mNitem;
[165]53 PIList* objlist;
[333]54 PIButton * mBut[6];
[165]55};
56
57/* --------------------------------------------------------------------------- */
58class PPInMgrWind : public PIWindow {
59public:
60 PPInMgrWind(PIStdImgApp *par);
61 ~PPInMgrWind();
62 virtual void Show();
63 virtual void Process(PIMessage msg, PIMsgHandler* sender, void* data=NULL);
64 void SetFile(string flnm);
65private:
66 PIStdImgApp* dap;
67 PIList* objlist;
68 PILabel * mLab[2];
69 PIButton* mBut[3];
70 PInPersist* mPin;
71 int tolx, toly, polx, poly; // Taille et position de objlist
72 int ttx, tty; // Taille globale par defaut
73
74};
75
76#endif
Note: See TracBrowser for help on using the repository browser.