forked from panda3d/panda3d
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrocketRegion.I
More file actions
68 lines (62 loc) · 2.01 KB
/
rocketRegion.I
File metadata and controls
68 lines (62 loc) · 2.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
/**
* PANDA 3D SOFTWARE
* Copyright (c) Carnegie Mellon University. All rights reserved.
*
* All use of this software is subject to the terms of the revised BSD
* license. You should have received a copy of this license along
* with this source code in a file named "LICENSE."
*
* @file rocketRegion.I
* @author rdb
* @date 2011-12-01
*/
/**
* Creates a libRocket context with the given name (must be unique) for the
* given window. Returns a new DisplayRegion where the libRocket context will
* render to. This variant of make() creates a region that fills the entire
* window.
*/
INLINE RocketRegion *RocketRegion::
make(const std::string &context_name, GraphicsOutput *window) {
return make(context_name, window, LVecBase4(0.0f, 1.0f, 0.0f, 1.0f));
}
/**
* Creates a libRocket context with the given name (must be unique) for the
* given window. Returns a new DisplayRegion where the libRocket context will
* render to.
*/
INLINE RocketRegion *RocketRegion::
make(const std::string &context_name, GraphicsOutput *window,
const LVecBase4 &dimensions) {
return new RocketRegion(window, dimensions, context_name);
}
#ifndef CPPPARSER
/**
* Returns a pointer to the Rocket context associated with this region. Does
* not increase the reference count, so if you want to preserve it for longer
* than this region exists, be sure to call AddReference() and
* RemoveReference() yourself.
*/
Rocket::Core::Context* RocketRegion::
get_context() const {
return _context;
}
#endif
/**
* Sets the RocketInputHandler object from which to gather the keyboard and
* mouse inputs to pass to the libRocket context before rendering. You may
* use one input handler to provide inputs to any number of RocketRegion
* objects.
*/
INLINE void RocketRegion::
set_input_handler(RocketInputHandler *handler) {
_input_handler = handler;
}
/**
* Returns the RocketInputHandler object previously passed to
* set_input_handler.
*/
INLINE RocketInputHandler *RocketRegion::
get_input_handler() const {
return _input_handler;
}