Main Page
Namespaces
Classes
Files
File List
File Members
include
Applications
MSW
GteMSWWindow.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.0 (2016/06/19)
7
8
#pragma once
9
10
#include <
Applications/GteWindowBase.h
>
11
#include <Windows.h>
12
13
namespace
gte
14
{
15
16
class
GTE_IMPEXP
MSWWindow
:
public
WindowBase
17
{
18
public
:
19
struct
GTE_IMPEXP
Parameters
:
public
WindowBase::Parameters
20
{
21
Parameters
();
22
23
Parameters(std::wstring
const
& inTitle,
24
int
inXOrigin,
int
inYOrigin,
int
inXSize,
int
inYSize);
25
26
HWND
handle
;
27
bool
hscrollBar,
vscrollBar
;
28
};
29
30
protected
:
31
// Abstract base class. Only WindowSystem may create windows.
32
MSWWindow
(
Parameters
& parameters);
33
public
:
34
virtual
~
MSWWindow
();
35
36
// Member access.
37
inline
HWND GetHandle()
const
;
38
virtual
void
SetTitle(std::wstring
const
& title)
override
;
39
40
// Mouse position information.
41
virtual
void
SetMousePosition(
int
x
,
int
y
)
override
;
42
virtual
void
GetMousePosition(
int
&
x
,
int
&
y
)
const override
;
43
44
// Actions to take before the window closes.
45
virtual
void
OnClose()
override
;
46
47
// Scroll support. The 'bar' value is 0 for horizontal scroll bars or 1
48
// for vertical scroll bars.
49
void
SetScrollInterval(
int
bar,
int
minValue,
int
maxValue);
50
void
GetScrollInterval(
int
bar,
int
& minValue,
int
& maxValue)
const
;
51
int
SetScrollPosition(
int
bar,
int
value
);
52
int
GetScrollPosition(
int
bar)
const
;
53
54
// The return value of the increment/decrement functions is the delta of
55
// the slider thumb. If zero, the scroll state did not change. For the
56
// tracking functions, the return value is the current slider thumb
57
// position. A derived-class override must call the base-class function
58
// first.
59
int
OnScrollIncrementLoRes(
int
bar);
60
int
OnScrollDecrementLoRes(
int
bar);
61
int
OnScrollIncrementHiRes(
int
bar);
62
int
OnScrollDecrementHiRes(
int
bar);
63
int
OnScrollTracking(
int
bar);
64
int
OnScrollEndTracking(
int
bar);
65
66
protected
:
67
// Standard window information.
68
HWND
mHandle
;
69
70
// Scroll bar support.
71
bool
mHasScroll[2];
72
mutable
SCROLLINFO mScrollInfo[2];
73
int
mScrollLoResDelta[2];
74
int
mScrollHiResDelta[2];
75
};
76
77
78
inline
HWND
MSWWindow::GetHandle
()
const
79
{
80
return
mHandle;
81
}
82
83
}
gte::WindowBase
Definition:
GteWindowBase.h:18
GteWindowBase.h
gte::MSWWindow::GetHandle
HWND GetHandle() const
Definition:
GteMSWWindow.h:78
gte::MSWWindow::mHandle
HWND mHandle
Definition:
GteMSWWindow.h:68
value
GLsizei const GLfloat * value
Definition:
glcorearb.h:819
gte::MSWWindow
Definition:
GteMSWWindow.h:16
x
GLint GLenum GLint x
Definition:
glcorearb.h:404
gte::MSWWindow::Parameters::handle
HWND handle
Definition:
GteMSWWindow.h:26
gte::WindowBase::Parameters
Definition:
GteWindowBase.h:24
gte
Definition:
GLX/GteWICFileIO.h:16
gte::MSWWindow::Parameters
Definition:
GteMSWWindow.h:19
y
GLint y
Definition:
glcorearb.h:98
GTE_IMPEXP
#define GTE_IMPEXP
Definition:
GTEngineDEF.h:63
gte::MSWWindow::Parameters::vscrollBar
bool vscrollBar
Definition:
GteMSWWindow.h:27
geometric_tools_engine
Author(s): Yijiang Huang
autogenerated on Thu Jul 18 2019 04:00:01