Panda3D
Public Member Functions | Static Public Member Functions | Protected Member Functions
RocketRegion Class Reference

Represents a region in a window or buffer where the libRocket UI will be rendered to. More...

#include "rocketRegion.h"

Inheritance diagram for RocketRegion:
DisplayRegion DisplayRegionBase DrawableRegion TypedReferenceCount TypedObject ReferenceCount MemoryBase MemoryBase

List of all members.

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.
RocketInputHandlerget_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 RocketRegionmake (const string &context_name, GraphicsOutput *window)
 Creates a libRocket context with the given name (must be unique) for the given window.
static RocketRegionmake (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.

Detailed Description

Represents a region in a window or buffer where the libRocket UI will be rendered to.

Definition at line 30 of file rocketRegion.h.


Constructor & Destructor Documentation

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().


Member Function Documentation

void RocketRegion::do_cull ( CullHandler cull_handler,
SceneSetup scene_setup,
GraphicsStateGuardian gsg,
Thread current_thread 
) [protected, virtual]
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.

Returns the RocketInputHandler object previously passed to set_input_handler.

Definition at line 83 of file rocketRegion.I.

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().

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.

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.


The documentation for this class was generated from the following files:
 All Classes Functions Variables Enumerations