Methods
Inherited methods
Initialize an object
Arguments
...
Values used for initialization
open
Logical, whether a connection with the frontend should be opened
Open a connection to the frontend
Close the connection to the frontend
Prepare synchronized traits for sending them to the frontend
Usage
Widget$get_state(keys = NULL)
Arguments
keys
Keys/names of the traits to be updated in the frontend
Update the synchronized states, usually with information from the frontend
Arguments
state
A list of values for the synchronized traits
Send updated traits to the frontend
Usage
Widget$send_state(keys = NULL, drop_defaults = FALSE)
Arguments
keys
Keys/names of the traits to be updated in the frontend
drop_defaults
Logical value, not yet used
Send content and binary buffers to the fronend
Usage
Widget$send(content, buffers = NULL)
Arguments
content
Some user-defined information to be send to the frontend
buffers
Some raw vector buffers
Send display-data of the widget to the frontend
Handle a 'comm' opened in the frontend
Usage
Widget$handle_comm_opened(comm, data)
Arguments
comm
The 'comm' object that is opened
data
Data sent by the frontend
Handle a message from the frontend
Usage
Widget$handle_comm_msg(comm, msg)
Arguments
comm
The 'comm' object via which the message is received
msg
Message sent by the frontend
Handle buffers in message.
This method should be overwritten by inherting classes that actually
process data in buffer components of messages.
Usage
Widget$handle_buffers(msg)
Call the custom message handlers
Usage
Widget$handle_custom_msg(content)
Arguments
content
The data received
Install a handler for messages being received
Usage
Widget$on_msg(handler, remove = FALSE)
Arguments
handler
A handler function
remove
Logical, should the handler be removed?
Install a handler for events in the frontend
Usage
Widget$on_event(event, handler, remove = FALSE)
Arguments
event
A character that describes the event
handler
A handler function
remove
Logical, should the handler be removed?
Call the installed event handlers
Usage
Widget$handle_event(event, args)
Arguments
event
A string that describes the event
args
A list of argument passed on with the event
Install a handler to be called when the widget is displayed
Usage
Widget$on_displayed(handler, remove = FALSE)
Arguments
handler
A handler function
remove
Logical, should the handler be removed?
Call the installed display handlers
Usage
Widget$handle_displayed()
The internal function to send messages to the frontend
Usage
Widget$_send(msg, buffers = NULL)
Arguments
msg
The message
buffers
Raw data buffers or NULL
Check whether current widget class is supported by ipywidgets
The objects of this class are cloneable with this method.
Usage
Widget$clone(deep = FALSE)
Arguments
deep
Whether to make a deep clone.