rk.XML.tabbook: Create XML node "tabbook" for RKWard plugins

View source: R/rk.XML.tabbook.R

rk.XML.tabbookR Documentation

Create XML node "tabbook" for RKWard plugins

Description

Create XML node "tabbook" for RKWard plugins

Usage

rk.XML.tabbook(label = NULL, tabs = list(), id.name = "auto", i18n = NULL)

Arguments

label

Character string, a text label for this plugin element.

tabs

An optional named list with objects of class XiMpLe.node (or a list of these objects). You must provide one named element for each tab. Use NULL for tabs without predefined children.

id.name

Character vector, unique IDs for the tabbook (first entry) and all tabs. If "auto", IDs will be generated automatically from the labels. If NULL, no IDs will be given.

i18n

Either a character string or a named list with the optional elements context or comment, to give some i18n_context information for this node. If set to FALSE, the attribute label will be renamed into noi18n_label.

Value

An object of class XiMpLe.node.

Note

If a node in tabs is <insert>, it is returned as-is, without being nested in <tab>.

See Also

Introduction to Writing Plugins for RKWard

Examples

test.checkboxes <- rk.XML.row(rk.XML.col(
  rk.XML.cbox(label="foo", val="foo1", chk=TRUE),
  rk.XML.cbox(label="bar", val="bar2")))
test.dropdown <- rk.XML.dropdown("mydrop",
  options=list("First Option"=c(val="val1"),
  "Second Option"=c(val="val2", chk=TRUE)))
# combine the above into a tabbook
test.tabbook <- rk.XML.tabbook("My Tabbook",
  tabs=list("First Tab"=test.checkboxes, "Second Tab"=test.dropdown))
cat(pasteXML(test.tabbook))

rkward-community/rkwarddev documentation built on May 9, 2022, 3:02 p.m.