Learn R Programming

dockViewR (version 0.3.0)

dock_view_plugins: Create dock view plugins

Description

Create plugins to enable additional functionality in dock view interfaces. Currently supports "add_tab" and "remove_tab" plugins.

Usage

new_dock_view_plugin(type, ...)

# S3 method for add_tab new_dock_view_plugin(type, enable = FALSE, callback = NULL, ...)

# S3 method for remove_tab new_dock_view_plugin(type, enable = FALSE, callback = NULL, mode = "auto", ...)

new_add_tab_plugin(enable = FALSE, callback = NULL, ...)

new_remove_tab_plugin(enable = FALSE, callback = NULL, mode = "auto", ...)

Value

A dock view plugin object of class add_tab or remove_tab, depending on the choosen `type``.

Arguments

type

Character string specifying the plugin type.

...

Additional plugin configuration arguments.

enable

Logical, whether the plugin functionality is enabled.

callback

Optional JavaScript function. If NULL and enable = TRUE, a default callback is used.

mode

For remove_tab plugins only. One of "auto" or "manual".

Examples

Run this code
# Add tab plugin
new_dock_view_plugin("add_tab", enable = TRUE)
new_add_tab_plugin(enable = TRUE)  # convenience function

# Remove tab plugin
new_dock_view_plugin("remove_tab", enable = TRUE, mode = "auto")
new_remove_tab_plugin(enable = TRUE, mode = "manual")  # convenience function

Run the code above in your browser using DataLab