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
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 28 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.

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.

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 66 of file rocketRegion.h.

References DisplayRegion::init_type().

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_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.


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