ExplorerClass.Rd
R6Class
, whose instantiations represent individual behaviour
of a specific group of elements inside the explorer
module. For
creating your own explorer class see the explorer class vignette:
vignette("explorer_class", package = "shinyExplorer")
.
new(id, ui, server)
Initialise a new object
of class ExplorerClass
.
id | Unique id. |
ui | A list of UI functions. See 'UI list' for details. |
server | Module server function. See 'Server function' for return list
elements that get handled by explorer and explorer_body . |
The argument ui
receives a named list of ui functions - these are
functions taking at least an argument id
and returning pseudo-HTML.
The following names are handled by explorer
:
contextmenu_item_ui | Function returning a contextmenu_item ,
which is displayed in the contextmenu, if this explorer_class is addable
in the explorer or explorer_selector . Clicking on this
contextmenu_item usually adds a new node of this explorer class as a child
node to the contextmenued node. |
specific_contextmenu_items_ui | Function returning a
tagList of contextmenu_items .
These contextmenu items are part of the contextmenu which is displayed upon
contextmenuing a node of this explorer class. |
These functions only provide the layout of the items. The functionality must be implemented in the server function.
The following (and only these) return list elements are handled by
explorer
and explorer_body
:
selectable_classes_r | Reactive
returning a character vector containing the id s of explorer_classes
who can be added to the explorer , if the current explorer_class
has id = id . Returning NULL results in no
possible selection. Returning of "" results in possible selection of
all explorer_classes . If the server function does not return this
reactive, all explorer_classes are selectable. |
icon_r | Reactive returning a
icon , which is displayed in the explorer_body . |
on_remove | Function , which is called
just before a node of this explorer class is removed from a tree. This
function receives the target node as the only argument. |