24 output(std::ostream &out)
const {
27 out <<
"button " << _button <<
" down";
31 out <<
"button " << _button <<
" resume down";
35 out <<
"button " << _button <<
" up";
39 out <<
"button " << _button <<
" repeat";
43 out <<
"keystroke " << _keycode;
57 out <<
"raw button " << _button <<
" down";
61 out <<
"raw button " << _button <<
" up";
A class to retrieve the individual data elements previously stored in a Datagram.
uint8_t get_uint8()
Extracts an unsigned 8-bit integer.
uint16_t get_uint16()
Extracts an unsigned 16-bit integer.
std::string get_string()
Extracts a variable-length string.
An ordered list of data elements, formatted in memory for transmission over a socket or writing to a ...
void add_uint8(uint8_t value)
Adds an unsigned 8-bit integer to the datagram.
void add_uint16(uint16_t value)
Adds an unsigned 16-bit integer to the datagram.
void add_string(const std::string &str)
Adds a variable-length string to the datagram.
std::wstring decode_text(const std::string &text) const
Returns the given wstring decoded to a single-byte string, via the current encoding system.
get_default_encoding
Specifies the default encoding to be used for all subsequently created TextEncoder objects.
std::string encode_wtext(const std::wstring &wtext) const
Encodes a wide-text string into a single-char string, according to the current encoding.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.