Starshatter_Open
Open source Starshatter engine
Main Page
Classes
Files
File List
File Members
All
Classes
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Mouse.h
Go to the documentation of this file.
1
/* Project nGenEx
2
Destroyer Studios LLC
3
Copyright © 1997-2004. All Rights Reserved.
4
5
SUBSYSTEM: nGenEx.lib
6
FILE: Mouse.h
7
AUTHOR: John DiCamillo
8
9
10
OVERVIEW
11
========
12
Mouse class
13
*/
14
15
#ifndef Mouse_h
16
#define Mouse_h
17
18
#include "
Types.h
"
19
20
// +--------------------------------------------------------------------+
21
22
class
Bitmap
;
23
class
Screen
;
24
class
Window
;
25
26
// +--------------------------------------------------------------------+
27
28
class
Mouse
29
{
30
friend
LRESULT CALLBACK
WndProc
(HWND, UINT, WPARAM, LPARAM);
31
friend
class
Game
;
32
33
public
:
34
static
const
char
*
TYPENAME
() {
return
"Mouse"
; }
35
36
enum
CURSOR
{
ARROW
,
CROSS
,
WAIT
,
NOT
,
DRAG
,
USER1
,
USER2
,
USER3
};
37
enum
HOTSPOT
{
HOTSPOT_CTR
,
HOTSPOT_NW
};
38
39
static
int
X
() {
return
x; }
40
static
int
Y
() {
return
y; }
41
static
int
LButton
() {
return
l; }
42
static
int
MButton
() {
return
m; }
43
static
int
RButton
() {
return
r; }
44
static
int
Wheel
() {
return
w; }
45
46
static
void
Paint
();
47
48
static
void
SetCursorPos
(
int
x,
int
y);
49
static
void
Show
(
int
s=1);
50
static
int
SetCursor
(
CURSOR
c);
51
static
int
LoadCursor
(
CURSOR
c,
const
char
* name,
HOTSPOT
hs =
HOTSPOT_CTR
);
52
53
static
void
Create
(
Screen
*
screen
);
54
static
void
Resize
(
Screen
*
screen
);
55
static
void
Close
();
56
57
private
:
58
static
int
show;
59
static
int
cursor;
60
61
static
int
x;
62
static
int
y;
63
static
int
l;
64
static
int
m;
65
static
int
r;
66
static
int
w;
67
68
static
Bitmap
* image[8];
69
static
int
hotspot[8];
70
71
static
Window
* window;
72
};
73
74
#endif Mouse_h
75
nGenEx
Mouse.h
Generated on Tue Jun 5 2012 20:46:24 for Starshatter_Open by
1.8.1