rk.XML.plugin: Create XML document for RKWard plugins

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

rk.XML.pluginR Documentation

Create XML document for RKWard plugins

Description

Create XML document for RKWard plugins

Usage

rk.XML.plugin(
  name,
  dialog = NULL,
  wizard = NULL,
  logic = NULL,
  snippets = NULL,
  provides = NULL,
  help = TRUE,
  include = NULL,
  label = NULL,
  clean.name = TRUE,
  about = NULL,
  dependencies = NULL,
  gen.info = TRUE,
  i18n = NULL
)

Arguments

name

Character string, the name of the plugin. Will be used for the names of the JavaScript and help files to be included, following the scheme "<name>.<ext>".

dialog

An object of class XiMpLe.node to be pasted as the <dialog> section. See rk.XML.dialog for details.

wizard

An object of class XiMpLe.node to be pasted as the <wizard> section. See rk.XML.wizard for details.

logic

An object of class XiMpLe.node to be pasted as the <logic> section. See rk.XML.logic for details.

snippets

An object of class XiMpLe.node to be pasted as the <snippets> section. See rk.XML.snippets for details.

provides

Character vector with possible entries of "logic", "dialog" or "wizard", defining what sections the document should provide even if dialog, wizard and logic are NULL. These sections must be edited manually and some parts are therefore commented out.

help

Logical, if TRUE an include tag for a help file named "<name>.rkh" will be added to the header.

include

Character string or vector, relative path(s) to other file(s), which will then be included in the head of the GUI XML document.

label

Character string, a text label for the plugin's top level, i.e. the window title of the dialog. Will only be used if dialog or wizard are NULL.

clean.name

Logical, if TRUE, all non-alphanumeric characters except the underscore ("_") will be removed from name.

about

An object of class XiMpLe.node with descriptive information on the plugin and its authors, see link[XiMpLe:rk.XML.about]{rk.XML.about} for details. Only useful for information that differs from the <about> section of the .pluginmap file. Skipped if NULL.

dependencies

An object of class XiMpLe.node to be pasted as the <dependencies> section, See rk.XML.dependencies for details. Skipped if NULL. This is only useful for information that differs from the <dependencies> section of the .pluginmap file.

gen.info

Logical, if TRUE a comment note will be written into the document, that it was generated by rkwarddev and changes should be done to the script. You can also provide a character string naming the very rkwarddev script file that generates this plugin, which will then also be added to the comment.

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.doc.

See Also

Introduction to Writing Plugins for RKWard

Examples

## Not run: 
test.checkboxes <- rk.XML.row(rk.XML.col(
  list(
    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=c(
  "First Tab"=test.checkboxes, "Second Tab"=test.dropdown))
# make a plugin with that tabbook
test.plugin <- rk.XML.plugin("My test", dialog=rk.XML.dialog(test.tabbook))

## End(Not run)

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