GLX/GteWindow.h
Go to the documentation of this file.
1 // David Eberly, Geometric Tools, Redmond WA 98052
2 // Copyright (c) 1998-2017
3 // Distributed under the Boost Software License, Version 1.0.
4 // http://www.boost.org/LICENSE_1_0.txt
5 // http://www.geometrictools.com/License/Boost/LICENSE_1_0.txt
6 // File Version: 3.0.1 (2016/11/14)
7 
8 #pragma once
9 
12 
13 // Forward declarations to avoid name conflicts caused by #include-ing X11/Xlib.h.
14 struct _XDisplay;
15 
16 namespace gte
17 {
18 
20 {
21 public:
23  {
24  Parameters();
25 
26  Parameters(std::wstring const& inTitle,
27  int inXOrigin, int inYOrigin, int inXSize, int inYSize);
28 
29  _XDisplay* display;
30  unsigned long window;
31  unsigned int deviceCreationFlags;
32  };
33 
34 protected:
35  // Abstract base class. Only WindowSystem may create windows.
36  friend class WindowSystem;
37  Window(Parameters& parameters);
38 public:
39  virtual ~Window();
40 
41  // Draw the window.
42  void ShowWindow();
43 
44  // Mouse position information.
45  virtual void SetMousePosition(int x, int y) override;
46  virtual void GetMousePosition(int& x, int& y) const override;
47 
48  // Actions to take before the window closes.
49  virtual void OnClose() override;
50 
51  // The event handler. TODO: This should not be public, but for now
52  // WindowSystem needs to call it. Make WindowSystem a friend?
53  enum
54  {
57  EVT_QUIT
58  };
59  int ProcessedEvent();
60 
61 protected:
62  _XDisplay* mDisplay;
63  unsigned long mWindow;
64  std::array<bool, 8> mButtonDown;
65  bool mShiftDown;
67  bool mAltDown;
69  std::shared_ptr<GraphicsEngine> mEngine;
70 };
71 
72 }
std::array< bool, 8 > mButtonDown
Definition: GLX/GteWindow.h:64
bool mControlDown
Definition: GLX/GteWindow.h:66
GLint GLenum GLint x
Definition: glcorearb.h:404
_XDisplay * mDisplay
Definition: GLX/GteWindow.h:62
unsigned int deviceCreationFlags
Definition: GLX/GteWindow.h:31
std::shared_ptr< GraphicsEngine > mEngine
Definition: GLX/GteWindow.h:69
bool mCommandDown
Definition: GLX/GteWindow.h:68
unsigned long mWindow
Definition: GLX/GteWindow.h:63
GLint y
Definition: glcorearb.h:98
#define GTE_IMPEXP
Definition: GTEngineDEF.h:63


geometric_tools_engine
Author(s): Yijiang Huang
autogenerated on Thu Jul 18 2019 04:00:02