source: Sophya/trunk/SophyaPI/PI/Quartz/pibwdgquartz.h @ 4086

Last change on this file since 4086 was 4086, checked in by garnier, 11 years ago

before moving eventFilter

File size: 3.0 KB
Line 
1/*
2 *  pibwdgquartz.h
3 *  PI
4 *
5 *  Created by Bruno MANSOUX on 19/09/08.
6 *
7 */
8
9#ifndef PIBWDGQUARTZ_H_SEEN
10#define PIBWDGQUARTZ_H_SEEN
11
12#include "pisysdep.h"
13#include "pibwdggen.h"
14
15#include "pigraphquartz.h"
16#include "pigraphps.h"
17
18
19static const EventTypeSpec basewdgSpec[] = {
20                                                                                         { kEventClassWindow, kEventWindowClose},
21                                                                                         { kEventClassWindow, kEventWindowResizeCompleted},
22                                                                                         { kEventClassWindow, kEventWindowDrawContent},
23                                                                                         { kEventClassWindow, kEventWindowBoundsChanged },
24                                             { kEventClassWindow, kEventWindowBoundsChanging },
25                                                                                         { kEventClassHIObject, kEventHIObjectConstruct },
26                                                                                         { kEventClassHIObject, kEventHIObjectInitialize },
27                                                                                         { kEventClassHIObject, kEventHIObjectDestruct },
28                                                                                          { kEventClassControl, kEventControlDraw},
29                                                                                          { kEventClassControl, kEventControlClick},
30                                                                                          { kEventClassControl, kEventControlBoundsChanged},
31                                                                                          { kEventClassControl, kEventControlOwningWindowChanged },
32                                                                                          { kEventClassControl, kEventControlInitialize },
33                                                                                          { kEventClassControl, kEventControlGetPartRegion },
34                                                                                          { kEventClassControl, kEventControlHitTest }
35                                                                                         };
36
37
38
39/*
40 static const EventTypeSpec basewdgSpec[] = {{ kEventClassControl, kEventControlDraw},{kEventWindowBoundsChanged,kEventWindowResizeCompleted}};
41*/
42
43class PIBaseWdgQuartz : public PIBaseWdgGen
44{
45
46public:
47// Les methodes ...
48
49                     PIBaseWdgQuartz(PIContainerGen *par, const char *nom,
50                                int sx=10, int sy=10, int px=0, int py=0);
51  virtual            ~PIBaseWdgQuartz();
52
53  virtual void       FinishCreate();   // appele par la fenetre mere, apres XtRealize()
54
55//  Activation des evenements   
56  virtual void       ActivatePtrCross();
57  virtual void       ActivateButton(int bid);
58  virtual void       ActivateMove(int bid);
59  virtual void       ActivateKeyboard();
60
61//  Divers : couleur de fond, Effacement fenetre,  forme de la souris
62  virtual void       SelPointerShape(PIPointer ptr=PI_ArrowPointer);
63  virtual PIPointer  GetPointerShape();
64  virtual void       AssignKeyboard();
65
66// Acces aux caracteristiques du dernier evenement
67  virtual void       GetLastEventInfo(PIKeyModifier& kmod, unsigned long& tm);
68
69// On redefinit IsVisible() pour tenir compte de l appel a FinsihCreate 
70  virtual bool       IsVisible();
71
72//  Fonction qui doit etre appelee pour rafraichir la fenetre
73  virtual void       Refresh();
74
75//  Appel depuis le PIXtBaseWidget uniquement (ExposeEvt de Xt )
76  virtual void       eXposeProcess(CGContextRef cg, int x0, int y0, int dx, int dy);
77        const char *fName;
78 
79protected:
80  void               Init();
81  PIPointer          mPtrS;
82// pour s'assurer que le bon FinishCreate() est appele - pb lie aux tables de fonctions
83// virtuelles des classes qui sont remplies au fur et a mesure des constructeurs
84  bool               bwx_finishDone; 
85};
86
87typedef PIBaseWdgQuartz PIBaseWdg;
88
89#endif /* PIBWDGQUARTZ_H_SEEN */
Note: See TracBrowser for help on using the repository browser.