Class TreeView#
Defined in File TreeView.h
Nested Relationships#
Nested Types#
Inheritance Relationships#
Base Type#
public Karana::WebUI::Widget(Class Widget)
Class Documentation#
-
class TreeView : public Karana::WebUI::Widget#
Widget displaying an interactable tree using hierarchical html.
Public Functions
-
TreeView(Router &router, const NodeList &nodes = {}, std::function<void(Karana::Core::id_t)> on_select = {}, const Karana::Core::ks_ptr<State> &selection = nullptr)#
TreeView constructor.
- Parameters:
router – The connection router to use
nodes – The initial list of nodes in the tree
on_select – Called when a node is selected in the UI
selection – Optional existing State for the selection
-
void select(Karana::Core::id_t id)#
Select the node with the given id.
Note that calling this does not invoke the on_select callback passed into the constructor
- Parameters:
id – The id to select
Protected Functions
-
virtual void _onConnect(int client_id) override#
Called upon a client connecting.
This can be overridden to implement custom behavior.
- Parameters:
client_id – Unique id for the client.
-
TreeView(Router &router, const NodeList &nodes = {}, std::function<void(Karana::Core::id_t)> on_select = {}, const Karana::Core::ks_ptr<State> &selection = nullptr)#