Panda3D
|
DataNode that listens for keyboard and mouse events and passes them to libRocket. More...
#include "rocketInputHandler.h"
Public Member Functions | |
RocketInputHandler (const string &name=string()) | |
virtual TypeHandle | force_init_type () |
virtual TypeHandle | get_type () const |
void | update_context (Rocket::Core::Context *context, int xoffs, int yoffs) |
Updates the libRocket context with the changes that we have gathered in do_transmit_data. | |
Static Public Member Functions | |
static TypeHandle | get_class_type () |
static int | get_rocket_key (const ButtonHandle handle) |
Returns the libRocket KeyIdentifier for the given ButtonHandle, or KI_UNKNOWN (0) if it wasn't known. | |
static void | init_type () |
Protected Member Functions | |
virtual void | do_transmit_data (DataGraphTraverser *trav, const DataNodeTransmit &input, DataNodeTransmit &output) |
The virtual implementation of transmit_data(). |
DataNode that listens for keyboard and mouse events and passes them to libRocket.
Definition at line 33 of file rocketInputHandler.h.
void RocketInputHandler::do_transmit_data | ( | DataGraphTraverser * | trav, |
const DataNodeTransmit & | input, | ||
DataNodeTransmit & | output | ||
) | [protected, virtual] |
The virtual implementation of transmit_data().
This function receives an array of input parameters and should generate an array of output parameters. The input parameters may be accessed with the index numbers returned by the define_input() calls that were made earlier (presumably in the constructor); likewise, the output parameters should be set with the index numbers returned by the define_output() calls.
Reimplemented from DataNode.
Definition at line 144 of file rocketInputHandler.cxx.
References MouseButton::five(), MouseButton::four(), DataGraphTraverser::get_current_thread(), DataNodeTransmit::get_data(), ButtonEventList::get_event(), ButtonEventList::get_num_events(), EventParameter::get_ptr(), get_rocket_key(), EventStoreValue< Type >::get_value(), DataNodeTransmit::has_data(), MouseButton::one(), MouseButton::three(), MouseButton::two(), MouseButton::wheel_down(), and MouseButton::wheel_up().
int RocketInputHandler::get_rocket_key | ( | const ButtonHandle | handle | ) | [static] |
Returns the libRocket KeyIdentifier for the given ButtonHandle, or KI_UNKNOWN (0) if it wasn't known.
Definition at line 60 of file rocketInputHandler.cxx.
References KeyboardButton::ascii_key(), and ButtonHandle::get_index().
Referenced by do_transmit_data().
void RocketInputHandler::update_context | ( | Rocket::Core::Context * | context, |
int | xoffs, | ||
int | yoffs | ||
) |
Updates the libRocket context with the changes that we have gathered in do_transmit_data.
Also calls Update() on the context.
Definition at line 275 of file rocketInputHandler.cxx.