Panda3D
|
Represents a region in a window or buffer where the libRocket UI will be rendered to. More...
#include "rocketRegion.h"
Public Member Functions | |
virtual TypeHandle | force_init_type () |
Rocket::Core::Context * | get_context () const |
Returns a pointer to the Rocket context associated with this region. | |
RocketInputHandler * | get_input_handler () const |
Returns the RocketInputHandler object previously passed to set_input_handler. | |
virtual TypeHandle | get_type () const |
bool | init_debugger () |
Initializes the libRocket debugger. | |
bool | is_debugger_visible () const |
Returns true if the debugger is visible. | |
void | set_debugger_visible (bool visible) |
Sets whether the debugger should be visible. | |
void | set_input_handler (RocketInputHandler *handler) |
Sets the RocketInputHandler object from which to gather the keyboard and mouse inputs to pass to the libRocket context before rendering. | |
Static Public Member Functions | |
static TypeHandle | get_class_type () |
static void | init_type () |
This function is declared non-inline to work around a compiler bug in g++ 2.96. | |
static RocketRegion * | make (const string &context_name, GraphicsOutput *window) |
Creates a libRocket context with the given name (must be unique) for the given window. | |
static RocketRegion * | make (const string &context_name, GraphicsOutput *window, const LVecBase4 &dimensions) |
Creates a libRocket context with the given name (must be unique) for the given window. | |
Protected Member Functions | |
RocketRegion (GraphicsOutput *window, const LVecBase4 &dimensions, const string &context_name) | |
Make sure that context_name is unique. | |
virtual void | do_cull (CullHandler *cull_handler, SceneSetup *scene_setup, GraphicsStateGuardian *gsg, Thread *current_thread) |
Performs a cull traversal for this region. |
Represents a region in a window or buffer where the libRocket UI will be rendered to.
Definition at line 30 of file rocketRegion.h.
RocketRegion::RocketRegion | ( | GraphicsOutput * | window, |
const LVecBase4 & | dimensions, | ||
const string & | context_name | ||
) | [protected] |
Make sure that context_name is unique.
Definition at line 32 of file rocketRegion.cxx.
References DisplayRegion::get_pixels(), DisplayRegion::set_camera(), and Lens::set_film_size().
Referenced by make().
void RocketRegion::do_cull | ( | CullHandler * | cull_handler, |
SceneSetup * | scene_setup, | ||
GraphicsStateGuardian * | gsg, | ||
Thread * | current_thread | ||
) | [protected, virtual] |
Performs a cull traversal for this region.
Reimplemented from DisplayRegion.
Definition at line 99 of file rocketRegion.cxx.
References CullTraverser::end_traverse(), DisplayRegion::get_cull_region_pcollector(), DisplayRegion::get_cull_traverser(), DisplayRegion::get_incomplete_render(), DisplayRegion::get_pixels(), RocketRenderInterface::render(), CullTraverser::set_cull_handler(), CullTraverser::set_scene(), and CullTraverser::set_view_frustum().
Rocket::Core::Context * RocketRegion::get_context | ( | ) | const [inline] |
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.
Definition at line 57 of file rocketRegion.I.
RocketInputHandler * RocketRegion::get_input_handler | ( | ) | const [inline] |
Returns the RocketInputHandler object previously passed to set_input_handler.
Definition at line 83 of file rocketRegion.I.
bool RocketRegion::init_debugger | ( | ) |
Initializes the libRocket debugger.
This will return false if the debugger failed to initialize, or if support for the debugger has not been built in (for example in an optimize=4 build).
Definition at line 154 of file rocketRegion.cxx.
static void RocketRegion::init_type | ( | ) | [inline, static] |
This function is declared non-inline to work around a compiler bug in g++ 2.96.
Making it inline seems to cause problems in the optimizer.
Reimplemented from DisplayRegion.
Definition at line 70 of file rocketRegion.h.
References DisplayRegion::init_type().
bool RocketRegion::is_debugger_visible | ( | ) | const |
Returns true if the debugger is visible.
Definition at line 180 of file rocketRegion.cxx.
RocketRegion * RocketRegion::make | ( | const string & | context_name, |
GraphicsOutput * | window | ||
) | [inline, static] |
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.
Definition at line 27 of file rocketRegion.I.
RocketRegion * RocketRegion::make | ( | const string & | context_name, |
GraphicsOutput * | window, | ||
const LVecBase4 & | dimensions | ||
) | [inline, static] |
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.
Definition at line 40 of file rocketRegion.I.
References RocketRegion().
void RocketRegion::set_debugger_visible | ( | bool | visible | ) |
Sets whether the debugger should be visible.
Definition at line 168 of file rocketRegion.cxx.
void RocketRegion::set_input_handler | ( | RocketInputHandler * | handler | ) | [inline] |
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.
Definition at line 72 of file rocketRegion.I.