Main Page
Namespaces
Classes
Files
File List
File Members
include
Applications
GLX
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
10
#include <
Applications/GteWindowBase.h
>
11
#include <
Graphics/GteGraphicsEngine.h
>
12
13
// Forward declarations to avoid name conflicts caused by #include-ing X11/Xlib.h.
14
struct
_XDisplay;
15
16
namespace
gte
17
{
18
19
class
GTE_IMPEXP
Window
:
public
WindowBase
20
{
21
public
:
22
struct
GTE_IMPEXP
Parameters
:
public
WindowBase::Parameters
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
{
55
EVT_NONE_PENDING
,
56
EVT_PROCESSED
,
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
;
66
bool
mControlDown
;
67
bool
mAltDown
;
68
bool
mCommandDown
;
69
std::shared_ptr<GraphicsEngine>
mEngine
;
70
};
71
72
}
gte::Window::mButtonDown
std::array< bool, 8 > mButtonDown
Definition:
GLX/GteWindow.h:64
gte::Window::mControlDown
bool mControlDown
Definition:
GLX/GteWindow.h:66
gte::WindowBase
Definition:
GteWindowBase.h:18
GteWindowBase.h
gte::Window::EVT_PROCESSED
Definition:
GLX/GteWindow.h:56
gte::Window
Definition:
GLX/GteWindow.h:19
x
GLint GLenum GLint x
Definition:
glcorearb.h:404
gte::WindowBase::Parameters
Definition:
GteWindowBase.h:24
gte::WindowSystem
Definition:
GLX/GteWindowSystem.h:20
gte::Window::mDisplay
_XDisplay * mDisplay
Definition:
GLX/GteWindow.h:62
gte
Definition:
GLX/GteWICFileIO.h:16
gte::Window::Parameters::deviceCreationFlags
unsigned int deviceCreationFlags
Definition:
GLX/GteWindow.h:31
gte::Window::Parameters
Definition:
GLX/GteWindow.h:22
gte::Window::mEngine
std::shared_ptr< GraphicsEngine > mEngine
Definition:
GLX/GteWindow.h:69
gte::Window::mCommandDown
bool mCommandDown
Definition:
GLX/GteWindow.h:68
gte::Window::Parameters::window
unsigned long window
Definition:
GLX/GteWindow.h:30
GteGraphicsEngine.h
gte::Window::mAltDown
bool mAltDown
Definition:
GLX/GteWindow.h:67
gte::Window::Parameters::display
_XDisplay * display
Definition:
GLX/GteWindow.h:29
gte::Window::EVT_NONE_PENDING
Definition:
GLX/GteWindow.h:55
gte::Window::mWindow
unsigned long mWindow
Definition:
GLX/GteWindow.h:63
y
GLint y
Definition:
glcorearb.h:98
GTE_IMPEXP
#define GTE_IMPEXP
Definition:
GTEngineDEF.h:63
gte::Window::mShiftDown
bool mShiftDown
Definition:
GLX/GteWindow.h:65
geometric_tools_engine
Author(s): Yijiang Huang
autogenerated on Thu Jul 18 2019 04:00:02