File indexing completed on 2025-01-18 10:05:37
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 #ifndef Xw_Window_HeaderFile
0017 #define Xw_Window_HeaderFile
0018
0019 #include <Aspect_Window.hxx>
0020
0021 #include <Aspect_VKey.hxx>
0022
0023 class Aspect_DisplayConnection;
0024 class Aspect_WindowInputListener;
0025
0026 typedef union _XEvent XEvent;
0027
0028
0029 class Xw_Window : public Aspect_Window
0030 {
0031 DEFINE_STANDARD_RTTIEXT(Xw_Window, Aspect_Window)
0032 public:
0033
0034
0035 Standard_EXPORT static Aspect_VKey VirtualKeyFromNative (unsigned long theKey);
0036
0037 public:
0038
0039
0040
0041 Standard_EXPORT Xw_Window (const Handle(Aspect_DisplayConnection)& theXDisplay,
0042 const Standard_CString theTitle,
0043 const Standard_Integer thePxLeft,
0044 const Standard_Integer thePxTop,
0045 const Standard_Integer thePxWidth,
0046 const Standard_Integer thePxHeight);
0047
0048
0049 Standard_EXPORT Xw_Window (const Handle(Aspect_DisplayConnection)& theXDisplay,
0050 const Aspect_Drawable theXWin,
0051 const Aspect_FBConfig theFBConfig = NULL);
0052
0053
0054 Standard_EXPORT ~Xw_Window();
0055
0056
0057 Standard_EXPORT virtual void Map() const Standard_OVERRIDE;
0058
0059
0060 Standard_EXPORT virtual void Unmap() const Standard_OVERRIDE;
0061
0062
0063 Standard_EXPORT virtual Aspect_TypeOfResize DoResize() Standard_OVERRIDE;
0064
0065
0066 virtual Standard_Boolean DoMapping() const Standard_OVERRIDE
0067 {
0068 return Standard_True;
0069 }
0070
0071
0072 Standard_EXPORT virtual Standard_Boolean IsMapped() const Standard_OVERRIDE;
0073
0074
0075 Standard_EXPORT virtual Standard_Real Ratio() const Standard_OVERRIDE;
0076
0077
0078 Standard_EXPORT virtual void Position (Standard_Integer& X1,
0079 Standard_Integer& Y1,
0080 Standard_Integer& X2,
0081 Standard_Integer& Y2) const Standard_OVERRIDE;
0082
0083
0084 Standard_EXPORT virtual void Size (Standard_Integer& theWidth,
0085 Standard_Integer& theHeight) const Standard_OVERRIDE;
0086
0087
0088 Aspect_Drawable XWindow() const { return myXWindow; }
0089
0090
0091 virtual Aspect_Drawable NativeHandle() const Standard_OVERRIDE
0092 {
0093 return myXWindow;
0094 }
0095
0096
0097 virtual Aspect_Drawable NativeParentHandle() const Standard_OVERRIDE
0098 {
0099 return 0;
0100 }
0101
0102
0103 virtual Aspect_FBConfig NativeFBConfig() const Standard_OVERRIDE
0104 {
0105 return myFBConfig;
0106 }
0107
0108
0109 Standard_EXPORT virtual void SetTitle (const TCollection_AsciiString& theTitle) Standard_OVERRIDE;
0110
0111
0112
0113
0114
0115
0116 Standard_EXPORT virtual void InvalidateContent (const Handle(Aspect_DisplayConnection)& theDisp) Standard_OVERRIDE;
0117
0118
0119
0120
0121
0122 Standard_EXPORT virtual bool ProcessMessage (Aspect_WindowInputListener& theListener,
0123 XEvent& theMsg);
0124
0125 protected:
0126
0127 Aspect_Drawable myXWindow;
0128 Aspect_FBConfig myFBConfig;
0129 Standard_Integer myXLeft;
0130 Standard_Integer myYTop;
0131 Standard_Integer myXRight;
0132 Standard_Integer myYBottom;
0133 Standard_Boolean myIsOwnWin;
0134
0135 };
0136
0137 DEFINE_STANDARD_HANDLE(Xw_Window, Aspect_Window)
0138
0139 #endif