[rkward-cvs] SF.net SVN: rkward:[3855] trunk/rkward/rkward/rbackend/rpackages/rkwarddev
m-eik at users.sourceforge.net
m-eik at users.sourceforge.net
Wed Sep 28 15:23:12 UTC 2011
Revision: 3855
http://rkward.svn.sourceforge.net/rkward/?rev=3855&view=rev
Author: m-eik
Date: 2011-09-28 15:23:12 +0000 (Wed, 28 Sep 2011)
Log Message:
-----------
rkwarddev: added rk.XML.insert(), rk.XML.include(), rk.XML.embed(), rk.XML.preview(), rk.XML.snippet() and rk.XML.snippets()
Modified Paths:
--------------
trunk/rkward/rkward/rbackend/rpackages/rkwarddev/ChangeLog
trunk/rkward/rkward/rbackend/rpackages/rkwarddev/DESCRIPTION
trunk/rkward/rkward/rbackend/rpackages/rkwarddev/NAMESPACE
trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk-internal.R
trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.about.R
trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.browser.R
trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.cbox.R
trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.col.R
trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.connect.R
trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.convert.R
trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.copy.R
trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.dialog.R
trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.dropdown.R
trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.external.R
trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.formula.R
trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.frame.R
trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.input.R
trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.logic.R
trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.page.R
trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.plugin.R
trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.radio.R
trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.row.R
trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.saveobj.R
trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.set.R
trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.spinbox.R
trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.stretch.R
trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.tabbook.R
trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.text.R
trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.vars.R
trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.varselector.R
trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.varslot.R
trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.wizard.R
trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.about.Rd
trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.browser.Rd
trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.cbox.Rd
trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.col.Rd
trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.connect.Rd
trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.convert.Rd
trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.copy.Rd
trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.dialog.Rd
trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.dropdown.Rd
trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.external.Rd
trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.formula.Rd
trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.frame.Rd
trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.input.Rd
trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.logic.Rd
trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.page.Rd
trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.plugin.Rd
trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.radio.Rd
trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.row.Rd
trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.saveobj.Rd
trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.set.Rd
trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.spinbox.Rd
trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.stretch.Rd
trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.tabbook.Rd
trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.text.Rd
trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.vars.Rd
trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.varselector.Rd
trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.varslot.Rd
trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.wizard.Rd
Added Paths:
-----------
trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.embed.R
trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.include.R
trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.insert.R
trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.preview.R
trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.snippet.R
trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.snippets.R
trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.embed.Rd
trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.include.Rd
trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.insert.Rd
trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.preview.Rd
trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.snippet.Rd
trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.snippets.Rd
Modified: trunk/rkward/rkward/rbackend/rpackages/rkwarddev/ChangeLog
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkwarddev/ChangeLog 2011-09-28 11:01:35 UTC (rev 3854)
+++ trunk/rkward/rkward/rbackend/rpackages/rkwarddev/ChangeLog 2011-09-28 15:23:12 UTC (rev 3855)
@@ -1,6 +1,8 @@
ChangeLog for package rkwarddev
## 0.02-1 (2011-09-28)
+ - added functions rk.XML.insert(), rk.XML.include(), rk.XML.embed(), rk.XML.preview(),
+ rk.XML.snippet(), and rk.XML.snippets()
- included formula node into rk.XML.vars() wrapper
- rk.XML.varslot() now automatically sets "multi=TRUE" if "min", "max" or "any" are set
Modified: trunk/rkward/rkward/rbackend/rpackages/rkwarddev/DESCRIPTION
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkwarddev/DESCRIPTION 2011-09-28 11:01:35 UTC (rev 3854)
+++ trunk/rkward/rkward/rbackend/rpackages/rkwarddev/DESCRIPTION 2011-09-28 15:23:12 UTC (rev 3855)
@@ -36,18 +36,24 @@
'rk.XML.copy.R'
'rk.XML.dialog.R'
'rk.XML.dropdown.R'
+ 'rk.XML.embed.R'
'rk.XML.external.R'
'rk.XML.formula.R'
'rk.XML.frame.R'
+ 'rk.XML.include.R'
'rk.XML.input.R'
+ 'rk.XML.insert.R'
'rk.XML.logic.R'
'rk.XML.page.R'
'rk.XML.pluginmap.R'
'rk.XML.plugin.R'
+ 'rk.XML.preview.R'
'rk.XML.radio.R'
'rk.XML.row.R'
'rk.XML.saveobj.R'
'rk.XML.set.R'
+ 'rk.XML.snippet.R'
+ 'rk.XML.snippets.R'
'rk.XML.spinbox.R'
'rk.XML.stretch.R'
'rk.XML.tabbook.R'
Modified: trunk/rkward/rkward/rbackend/rpackages/rkwarddev/NAMESPACE
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkwarddev/NAMESPACE 2011-09-28 11:01:35 UTC (rev 3854)
+++ trunk/rkward/rkward/rbackend/rpackages/rkwarddev/NAMESPACE 2011-09-28 15:23:12 UTC (rev 3855)
@@ -14,18 +14,24 @@
export(rk.XML.copy)
export(rk.XML.dialog)
export(rk.XML.dropdown)
+export(rk.XML.embed)
export(rk.XML.external)
export(rk.XML.formula)
export(rk.XML.frame)
+export(rk.XML.include)
export(rk.XML.input)
+export(rk.XML.insert)
export(rk.XML.logic)
export(rk.XML.page)
export(rk.XML.plugin)
export(rk.XML.pluginmap)
+export(rk.XML.preview)
export(rk.XML.radio)
export(rk.XML.row)
export(rk.XML.saveobj)
export(rk.XML.set)
+export(rk.XML.snippet)
+export(rk.XML.snippets)
export(rk.XML.spinbox)
export(rk.XML.stretch)
export(rk.XML.tabbook)
Modified: trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk-internal.R
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk-internal.R 2011-09-28 11:01:35 UTC (rev 3854)
+++ trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk-internal.R 2011-09-28 15:23:12 UTC (rev 3855)
@@ -132,6 +132,18 @@
return(prfx)
} ## end function ID.prefix()
+## function node.soup()
+# pastes the nodes as XML, only alphanumeric characters, e.g. to generate auto-IDs
+node.soup <- function(nodes){
+ if(inherits(nodes, "XiMpLe.node")){
+ the.soup <- gsub("[^[:alnum:]]", "", pasteXMLNode(nodes, shine=0))
+ } else {
+ stop(simpleError("Nodes must be of class XiMpLe.node!"))
+ }
+ return(the.soup)
+}
+## end function node.soup()
+
## function get.by.role()
# filters a vector with person objects by roles
get.by.role <- function(persons, role="aut"){
Modified: trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.about.R
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.about.R 2011-09-28 11:01:35 UTC (rev 3854)
+++ trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.about.R 2011-09-28 15:23:12 UTC (rev 3855)
@@ -67,7 +67,7 @@
#' c(name="heisenberg.pluginmap", url="http://eternalwondermaths.example.org/hsb"))
#' )
#'
-#' cat(pasteXMLNode(about.node))
+#' cat(pasteXMLNode(about.node, shine=2))
rk.XML.about <- function(name, author, about=list(desc="SHORT_DESCRIPTION", version="0.01-0", date=Sys.Date(), url="http://EXAMPLE.com", license="GPL (>= 3)"), dependencies=NULL, package=NULL, pluginmap=NULL){
Modified: trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.browser.R
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.browser.R 2011-09-28 11:01:35 UTC (rev 3854)
+++ trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.browser.R 2011-09-28 15:23:12 UTC (rev 3855)
@@ -13,7 +13,7 @@
#' @export
#' @examples
#' test.browser <- rk.XML.browser("Browse here:")
-#' cat(pasteXMLNode(test.browser, shine=1))
+#' cat(pasteXMLNode(test.browser))
rk.XML.browser <- function(label, type="file", initial=NULL, urls=FALSE, filter=NULL, required=FALSE, id.name="auto"){
Modified: trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.cbox.R
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.cbox.R 2011-09-28 11:01:35 UTC (rev 3854)
+++ trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.cbox.R 2011-09-28 15:23:12 UTC (rev 3855)
@@ -13,7 +13,7 @@
#' list(
#' rk.XML.cbox(label="foo", value="foo1", chk=TRUE),
#' rk.XML.cbox(label="bar", value="bar2"))))
-#' cat(pasteXMLNode(test.checkboxes, shine=1))
+#' cat(pasteXMLNode(test.checkboxes))
rk.XML.cbox <- function(label, value, un.value=NULL, chk=FALSE, id.name="auto"){
if(identical(id.name, "auto")){
Modified: trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.col.R
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.col.R 2011-09-28 11:01:35 UTC (rev 3854)
+++ trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.col.R 2011-09-28 15:23:12 UTC (rev 3855)
@@ -10,7 +10,7 @@
#' list(
#' rk.XML.cbox(label="foo", val="foo1", chk=TRUE),
#' rk.XML.cbox(label="bar", val="bar2"))))
-#' cat(pasteXMLNode(test.checkboxes, shine=1))
+#' cat(pasteXMLNode(test.checkboxes))
rk.XML.col <- function(children=list(), id.name=NULL){
if(!is.null(id.name)){
Modified: trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.connect.R
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.connect.R 2011-09-28 11:01:35 UTC (rev 3854)
+++ trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.connect.R 2011-09-28 15:23:12 UTC (rev 3855)
@@ -27,7 +27,7 @@
#' \code{\link[rkwarddev:rk.XML.set]{rk.XML.set}}
#' @examples
#' test.connect <- rk.XML.connect(governor="lgc_foobar", client="frame_bar")
-#' cat(pasteXMLNode(test.connect, shine=1))
+#' cat(pasteXMLNode(test.connect))
rk.XML.connect <- function(governor, client, set="enabled", not=FALSE, reconcile=FALSE){
Modified: trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.convert.R
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.convert.R 2011-09-28 11:01:35 UTC (rev 3854)
+++ trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.convert.R 2011-09-28 15:23:12 UTC (rev 3855)
@@ -42,7 +42,7 @@
#' \code{\link[rkwarddev:rk.XML.set]{rk.XML.set}}
#' @examples
#' test.convert <- rk.XML.convert(c(string="foo"), mode=c(notequals="bar"))
-#' cat(pasteXMLNode(test.convert, shine=1))
+#' cat(pasteXMLNode(test.convert))
rk.XML.convert <- function(sources, mode=c(), required=FALSE, id.name="auto"){
Modified: trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.copy.R
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.copy.R 2011-09-28 11:01:35 UTC (rev 3854)
+++ trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.copy.R 2011-09-28 15:23:12 UTC (rev 3855)
@@ -17,7 +17,7 @@
#' test.text <- rk.XML.text("Did you test more than 30 subjects?")
#' test.copy <- rk.XML.copy(id=test.cbox1)
#' test.wizard <- rk.XML.wizard(rk.XML.page(list(test.text, test.copy)))
-#' cat(pasteXMLNode(test.wizard, shine=1))
+#' cat(pasteXMLNode(test.wizard))
rk.XML.copy <- function(id, as=NULL){
if(length(id) > 1 | length(as) > 1){
Modified: trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.dialog.R
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.dialog.R 2011-09-28 11:01:35 UTC (rev 3854)
+++ trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.dialog.R 2011-09-28 15:23:12 UTC (rev 3855)
@@ -1,8 +1,8 @@
#' Create XML dialog section for RKWard plugins
#'
#' This function will create a dialog section with optional child nodes "browser", "checkbox",
-#' "column", "copy", "dropdown", "formula", "frame", "input", "radio", "row", "saveobject",
-#' "spinbox", "stretch", "tabbook", "text", "varselector" and "varslot".
+#' "column", "copy", "dropdown", "embed", "formula", "frame", "include", "input", "insert",
+#' "preview", "radio", "row", "saveobject", "spinbox", "stretch", "tabbook", "text", "varselector" and "varslot".
#'
#' @param nodes A (list of) objects of class \code{XiMpLe.node}.
#' @param label Character string, a text label for this plugin element.
@@ -17,7 +17,7 @@
#' test.cbox1 <- rk.XML.cbox(label="Want to type?", val="true")
#' test.cbox2 <- rk.XML.cbox(label="Are you shure?", val="true")
#' test.dialog <- rk.XML.dialog(rk.XML.col(list(test.input, test.cbox1, test.cbox2)))
-#' cat(pasteXMLNode(test.dialog, shine=1))
+#' cat(pasteXMLNode(test.dialog))
rk.XML.dialog <- function(nodes, label=NULL){
# check the node names and allow only valid ones
@@ -26,8 +26,9 @@
})
invalid.sets <- !node.names %in% c("browser", "checkbox", "column", "copy",
- "dropdown", "formula", "frame", "input", "radio", "row", "saveobject",
- "spinbox", "stretch", "tabbook", "text", "varselector", "varslot")
+ "dropdown", "embed", "formula", "frame", "include", "input", "insert",
+ "preview", "radio", "row", "saveobject", "spinbox", "stretch", "tabbook",
+ "text", "varselector", "varslot")
if(any(invalid.sets)){
stop(simpleError(paste("Invalid XML nodes for dialog section: ", paste(node.names[invalid.sets], collapse=", "), sep="")))
} else {}
Modified: trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.dropdown.R
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.dropdown.R 2011-09-28 11:01:35 UTC (rev 3854)
+++ trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.dropdown.R 2011-09-28 15:23:12 UTC (rev 3855)
@@ -12,7 +12,7 @@
#' test.dropdown <- rk.XML.dropdown("mydrop",
#' options=list("First Option"=c(val="val1"),
#' "Second Option"=c(val="val2", chk=TRUE)))
-#' cat(pasteXMLNode(test.dropdown, shine=1))
+#' cat(pasteXMLNode(test.dropdown))
rk.XML.dropdown <- function(label, options=list(label=c(val=NULL, chk=FALSE)), id.name="auto"){
num.opt <- length(options)
Added: trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.embed.R
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.embed.R (rev 0)
+++ trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.embed.R 2011-09-28 15:23:12 UTC (rev 3855)
@@ -0,0 +1,29 @@
+#' Create XML node "embed" for RKWard plugins
+#'
+#' @param component A character string, registered name (\code{id} in pluginmap file) of the component to be embedded.
+#' @param button Logical, whether the plugin should be embedded as a button and appear if it's pressed.
+#' @param label A character string, text label for the button (only used if \code{button=TRUE}).
+#' @return A list of objects of class \code{XiMpLe.node}.
+#' @export
+#' @examples
+#' test.embed <- rk.XML.embed("someComponent")
+#' cat(pasteXMLNode(test.embed))
+
+rk.XML.embed <- function(component, button=FALSE, label="Options"){
+ attr.list <- list(component=component)
+
+ if(isTRUE(button)){
+ attr.list[["as_button"]] <- "true"
+ } else {}
+
+ if(!identical(label, "Options")){
+ attr.list[["label"]] <- label
+ } else {}
+
+ node <- new("XiMpLe.node",
+ name="embed",
+ attributes=attr.list
+ )
+
+ return(node)
+}
Modified: trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.external.R
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.external.R 2011-09-28 11:01:35 UTC (rev 3854)
+++ trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.external.R 2011-09-28 15:23:12 UTC (rev 3855)
@@ -11,7 +11,7 @@
#' \code{\link[rkwarddev:rk.XML.set]{rk.XML.set}}
#' @examples
#' test.external <- rk.XML.external(id="ext_property", default="none")
-#' cat(pasteXMLNode(test.external, shine=1))
+#' cat(pasteXMLNode(test.external))
rk.XML.external <- function(id, default=NULL){
attr.list <- list(id=id)
Modified: trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.formula.R
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.formula.R 2011-09-28 11:01:35 UTC (rev 3854)
+++ trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.formula.R 2011-09-28 15:23:12 UTC (rev 3855)
@@ -11,13 +11,14 @@
#' @export
#' @seealso
#' \code{\link[rkwarddev:rk.XML.varselector]{rk.XML.varselector}},
-#' \code{\link[rkwarddev:rk.XML.varslot]{rk.XML.varslot}}
+#' \code{\link[rkwarddev:rk.XML.varslot]{rk.XML.varslot}},
+#' \code{\link[rkwarddev:rk.XML.vars]{rk.XML.vars}} (a wrapper, including formula)
#' @examples
#' test.varselector <- rk.XML.varselector("Select some vars")
#' test.varslot1 <- rk.XML.varslot("Fixed factors", source=test.varselector)
#' test.varslot2 <- rk.XML.varslot("Dependent variables", source=test.varselector)
#' test.formula <- rk.XML.formula(fixed=test.varslot1, dependent=test.varslot2)
-#' cat(pasteXMLNode(test.formula, shine=1))
+#' cat(pasteXMLNode(test.formula))
rk.XML.formula <- function(fixed, dependent, id.name="auto"){
# check if these are actually varslots
Modified: trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.frame.R
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.frame.R 2011-09-28 11:01:35 UTC (rev 3854)
+++ trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.frame.R 2011-09-28 15:23:12 UTC (rev 3855)
@@ -11,7 +11,7 @@
#' test.dropdown <- rk.XML.dropdown("mydrop",
#' options=list("First Option"=c(val="val1"),
#' "Second Option"=c(val="val2", chk=TRUE)))
-#' cat(pasteXMLNode(rk.XML.frame(test.dropdown, label="Some options"), shine=1))
+#' cat(pasteXMLNode(rk.XML.frame(test.dropdown, label="Some options")))
rk.XML.frame <- function(children=list(), label=NULL, id.name="auto"){
if(!is.null(label)){
Added: trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.include.R
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.include.R (rev 0)
+++ trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.include.R 2011-09-28 15:23:12 UTC (rev 3855)
@@ -0,0 +1,17 @@
+#' Create XML node "include" for RKWard plugins
+#'
+#' @param file A character string, the file name to be included.
+#' @return A list of objects of class \code{XiMpLe.node}.
+#' @export
+#' @examples
+#' test.include <- rk.XML.include("../some_file.xml")
+#' cat(pasteXMLNode(test.include))
+
+rk.XML.include <- function(file){
+ node <- new("XiMpLe.node",
+ name="include",
+ attributes=list(file=as.character(file))
+ )
+
+ return(node)
+}
Modified: trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.input.R
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.input.R 2011-09-28 11:01:35 UTC (rev 3854)
+++ trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.input.R 2011-09-28 15:23:12 UTC (rev 3855)
@@ -10,7 +10,7 @@
#' @export
#' @examples
#' test.input <- rk.XML.input("Type some text")
-#' cat(pasteXMLNode(test.input, shine=1))
+#' cat(pasteXMLNode(test.input))
rk.XML.input <- function(label, initial=NULL, size="medium", required=FALSE, id.name="auto"){
attr.list <- list(label=label)
Added: trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.insert.R
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.insert.R (rev 0)
+++ trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.insert.R 2011-09-28 15:23:12 UTC (rev 3855)
@@ -0,0 +1,42 @@
+#' Create XML node "insert" for RKWard plugins
+#'
+#' This function creates an insert node to use snippets.
+#'
+#' @param snippet Either a character string (the \code{id} of the snippet to be inserted),
+#' or an object of class \code{XiMpLe.node} (whose \code{id} will be extracted and used; must be a snippet!).
+#' @return A list of objects of class \code{XiMpLe.node}.
+#' @export
+#' @seealso
+#' \code{\link[rkwarddev:rk.XML.snippets]{rk.XML.snippets}}
+#' \code{\link[rkwarddev:rk.XML.snippet]{rk.XML.snippet}}
+#' @examples
+#' # define a formula section with varselector and varslots
+#' test.formula <- rk.XML.vars("Variables", "Fixed", formula.dependent="Dependent")
+#' # define the snippet
+#' test.snippet <- rk.XML.snippet(test.formula)
+#' # now to insert the snippet
+#' test.insert <- rk.XML.insert(test.snippet)
+#' cat(pasteXMLNode(test.insert))
+
+rk.XML.insert <- function(snippet){
+ if(length(snippet) > 1){
+ stop(simpleError("'snippet' must be of length 1!"))
+ } else {}
+
+ if(inherits(snippet, "XiMpLe.node")){
+ node.name <- snippet at name
+ if(!identical(node.name, "snippet")){
+ stop(simpleError(paste("Invalid XML node, must be a snippet: ", node.name, sep="")))
+ } else {}
+ } else {}
+
+ # let's see if we need to extract IDs first
+ attr.list <- list(snippet=check.ID(snippet))
+
+ node <- new("XiMpLe.node",
+ name="insert",
+ attributes=attr.list
+ )
+
+ return(node)
+}
Modified: trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.logic.R
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.logic.R 2011-09-28 11:01:35 UTC (rev 3854)
+++ trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.logic.R 2011-09-28 15:23:12 UTC (rev 3855)
@@ -1,6 +1,6 @@
#' Create XML logic section for RKWard plugins
#'
-#' This function will create a logic section with "convert", "connect" ,"external" and "set" nodes.
+#' This function will create a logic section with "convert", "connect", "include", "insert", "external" and "set" nodes.
#'
#' @param nodes A list of objects of class \code{XiMpLe.node}.
#' @return A list of objects of class \code{XiMpLe.node}.
@@ -19,12 +19,12 @@
#' test.convert <- rk.XML.convert(c(state=test.cbox1,state=test.cbox2), mode=c(and=""))
#' test.connect <- rk.XML.connect(governor=test.convert, client=test.input, set="enabled")
#' test.logic <- rk.XML.logic(nodes=list(test.convert, test.connect))
-#' cat(pasteXMLNode(test.logic, shine=1))
+#' cat(pasteXMLNode(test.logic))
#'
#' # with only one checkbox, you can directly query if it's checked
#' test.connect2 <- rk.XML.connect(governor=test.cbox1, client=test.input, set="enabled")
#' test.logic2 <- rk.XML.logic(nodes=list(test.connect2))
-#' cat(pasteXMLNode(test.logic2, shine=1))
+#' cat(pasteXMLNode(test.logic2))
rk.XML.logic <- function(nodes){
# check the node names and allow only valid ones
@@ -32,7 +32,7 @@
this.node at name
})
- invalid.sets <- !node.names %in% c("connect", "convert","external","set")
+ invalid.sets <- !node.names %in% c("connect", "convert","include","insert","external","set")
if(any(invalid.sets)){
stop(simpleError(paste("Invalid XML nodes for logic section: ", paste(node.names[invalid.sets], collapse=", "), sep="")))
} else {}
Modified: trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.page.R
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.page.R 2011-09-28 11:01:35 UTC (rev 3854)
+++ trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.page.R 2011-09-28 15:23:12 UTC (rev 3855)
@@ -17,7 +17,7 @@
#' test.text <- rk.XML.text("Did you test more than 30 subjects?")
#' test.copy <- rk.XML.copy(id.name=test.cbox1)
#' test.wizard <- rk.XML.wizard(rk.XML.page(list(test.text, test.copy)))
-#' cat(pasteXMLNode(test.wizard, shine=1))
+#' cat(pasteXMLNode(test.wizard))
rk.XML.page <- function(nodes, id.name=NULL){
# check the node names and allow only valid ones
Modified: trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.plugin.R
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.plugin.R 2011-09-28 11:01:35 UTC (rev 3854)
+++ trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.plugin.R 2011-09-28 15:23:12 UTC (rev 3855)
@@ -31,7 +31,7 @@
#' "Second Tab"), dialog=list(test.checkboxes, test.dropdown))
#' # make a plugin with that tabbook
#' test.plugin <- rk.XML.plugin("My test", dialog=test.tabbook)
-#' cat(pasteXMLTree(test.plugin, shine=1))
+#' cat(pasteXMLTree(test.plugin))
rk.XML.plugin <- function(name, dialog=NULL, wizard=NULL, logic=NULL, provides=NULL, help=TRUE, pluginmap=NULL, label=NULL, clean.name=TRUE){
if(isTRUE(clean.name)){
Added: trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.preview.R
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.preview.R (rev 0)
+++ trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.preview.R 2011-09-28 15:23:12 UTC (rev 3855)
@@ -0,0 +1,23 @@
+#' Create XML node "preview" for RKWard plugins
+#'
+#' @param label A character string, text label for the preview checkbox.
+#' @return A list of objects of class \code{XiMpLe.node}.
+#' @export
+#' @examples
+#' test.preview <- rk.XML.preview("See a preview?")
+#' cat(pasteXMLNode(test.preview))
+
+rk.XML.preview <- function(label="Preview"){
+ if(!identical(label, "Preview")){
+ attr.list <- list(label=label)
+ } else {
+ attr.list <- list()
+ }
+
+ node <- new("XiMpLe.node",
+ name="preview",
+ attributes=attr.list
+ )
+
+ return(node)
+}
Modified: trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.radio.R
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.radio.R 2011-09-28 11:01:35 UTC (rev 3854)
+++ trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.radio.R 2011-09-28 15:23:12 UTC (rev 3855)
@@ -12,7 +12,7 @@
#' test.radio <- rk.XML.radio("Chose one",
#' options=list("First Option"=c(val="val1"),
#' "Second Option"=c(val="val2", chk=TRUE)))
-#' cat(pasteXMLNode(test.radio, shine=1))
+#' cat(pasteXMLNode(test.radio))
rk.XML.radio <- function(label, options=list(label=c(val=NULL, chk=FALSE)), id.name="auto"){
num.opt <- length(options)
Modified: trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.row.R
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.row.R 2011-09-28 11:01:35 UTC (rev 3854)
+++ trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.row.R 2011-09-28 15:23:12 UTC (rev 3855)
@@ -10,7 +10,7 @@
#' list(
#' rk.XML.cbox(label="foo", val="foo1", chk=TRUE),
#' rk.XML.cbox(label="bar", val="bar2"))))
-#' cat(pasteXMLNode(test.checkboxes, shine=1))
+#' cat(pasteXMLNode(test.checkboxes))
rk.XML.row <- function(children=list(), id.name=NULL){
if(!is.null(id.name)){
Modified: trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.saveobj.R
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.saveobj.R 2011-09-28 11:01:35 UTC (rev 3854)
+++ trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.saveobj.R 2011-09-28 15:23:12 UTC (rev 3855)
@@ -12,7 +12,7 @@
#' @export
#' @examples
#' test.saveobj <- rk.XML.saveobj("Save the results")
-#' cat(pasteXMLNode(test.saveobj, shine=1))
+#' cat(pasteXMLNode(test.saveobj))
rk.XML.saveobj <- function(label, chk=FALSE, checkable=TRUE, initial="auto", required=FALSE, id.name="auto"){
attr.list <- list(label=label)
Modified: trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.set.R
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.set.R 2011-09-28 11:01:35 UTC (rev 3854)
+++ trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.set.R 2011-09-28 15:23:12 UTC (rev 3855)
@@ -18,7 +18,7 @@
#' \code{\link[rkwarddev:rk.XML.logic]{rk.XML.logic}}
#' @examples
#' test.set <- rk.XML.set(id="input_foo", set="required", to=TRUE)
-#' cat(pasteXMLNode(test.set, shine=1))
+#' cat(pasteXMLNode(test.set))
rk.XML.set <- function(id, set=NULL, to){
Added: trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.snippet.R
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.snippet.R (rev 0)
+++ trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.snippet.R 2011-09-28 15:23:12 UTC (rev 3855)
@@ -0,0 +1,35 @@
+#' Create XML "snippet" node for RKWard plugins
+#'
+#' This function will create a snippet node for snippets sections.
+#'
+#' @param nodes A (list of) objects of class \code{XiMpLe.node}.
+#' @param id.name Character string, a unique ID for this plugin element.
+#' If \code{"auto"}, an ID will be generated automatically from the tag names and
+#' IDs of the given nodes.
+#' @return A list of objects of class \code{XiMpLe.node}.
+#' @export
+#' @seealso
+#' \code{\link[rkwarddev:rk.XML.snippets]{rk.XML.snippets}}
+#' @examples
+#' # define a formula section with varselector and varslots
+#' test.formula <- rk.XML.vars("Variables", "Fixed", formula.dependent="Dependent")
+#' # define the snippet
+#' test.snippet <- rk.XML.snippet(test.formula)
+#' cat(pasteXMLNode(test.snippet))
+
+rk.XML.snippet <- function(nodes, id.name="auto"){
+ if(identical(id.name, "auto")){
+ # try autogenerating some id
+ id.name <- auto.ids(node.soup(nodes), prefix=ID.prefix("snippet"), chars=10)
+ } else if(is.null(id.name)){
+ stop(simpleError("Snippets need an ID!"))
+ } else {}
+
+ node <- new("XiMpLe.node",
+ name="snippet",
+ attributes=list(id=id.name),
+ children=child.list(nodes)
+ )
+
+ return(node)
+}
Added: trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.snippets.R
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.snippets.R (rev 0)
+++ trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.snippets.R 2011-09-28 15:23:12 UTC (rev 3855)
@@ -0,0 +1,39 @@
+#' Create XML "snippets" node for RKWard plugins
+#'
+#' This function will create a snippets node for the document section, with optional child nodes "snippet".
+#'
+#' @param nodes A (list of) objects of class \code{XiMpLe.node}. They must all have the name "snippet".
+#' @return A list of objects of class \code{XiMpLe.node}.
+#' @export
+#' @seealso
+#' \code{\link[rkwarddev:rk.XML.plugin]{rk.XML.plugin}}
+#' \code{\link[rkwarddev:rk.XML.snippet]{rk.XML.snippet}}
+#' @examples
+#' # define a formula section with varselector and varslots
+#' test.formula <- rk.XML.vars("Variables", "Fixed", formula.dependent="Dependent")
+#' # define the snippets section
+#' test.snippet <- rk.XML.snippet(test.formula)
+#' test.snippets <- rk.XML.snippets(test.snippet)
+#' cat(pasteXMLNode(test.snippets))
+
+rk.XML.snippets <- function(nodes=NULL){
+ if(!is.null(nodes)){
+ # check the node names and allow only valid ones
+ sapply(child.list(nodes), function(this.node){
+ node.name <- this.node at name
+ if(!identical(node.name, "snippet")){
+ stop(simpleError(paste("Invalid XML nodes for snippets section: ", node.name, sep="")))
+ } else {}
+ })
+ } else {
+ nodes <- list()
+ }
+
+ node <- new("XiMpLe.node",
+ name="snippets",
+ children=child.list(nodes),
+ value=""
+ )
+
+ return(node)
+}
Modified: trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.spinbox.R
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.spinbox.R 2011-09-28 11:01:35 UTC (rev 3854)
+++ trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.spinbox.R 2011-09-28 15:23:12 UTC (rev 3855)
@@ -13,7 +13,7 @@
#' @export
#' @examples
#' test.spinbox <- rk.XML.spinbox("Spin this:")
-#' cat(pasteXMLNode(test.spinbox, shine=1))
+#' cat(pasteXMLNode(test.spinbox))
rk.XML.spinbox <- function(label, min=NULL, max=NULL, initial=0, real=TRUE, precision=2, max.precision=8, id.name="auto"){
Modified: trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.stretch.R
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.stretch.R 2011-09-28 11:01:35 UTC (rev 3854)
+++ trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.stretch.R 2011-09-28 15:23:12 UTC (rev 3855)
@@ -9,7 +9,7 @@
#' @return An object of class \code{XiMpLe.node}.
#' @export
#' @examples
-#' cat(pasteXMLNode(rk.XML.stretch(), shine=1))
+#' cat(pasteXMLNode(rk.XML.stretch()))
#<stretch />
rk.XML.stretch <- function(before=NULL, after=NULL){
Modified: trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.tabbook.R
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.tabbook.R 2011-09-28 11:01:35 UTC (rev 3854)
+++ trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.tabbook.R 2011-09-28 15:23:12 UTC (rev 3855)
@@ -22,7 +22,7 @@
#' # combine the above into a tabbook
#' test.tabbook <- rk.XML.tabbook("My Tabbook", tab.labels=c("First Tab",
#' "Second Tab"), children=list(test.checkboxes, test.dropdown))
-#' cat(pasteXMLNode(test.tabbook, shine=1))
+#' cat(pasteXMLNode(test.tabbook))
rk.XML.tabbook <- function(label=NULL, tab.labels, children=list(), id.name="auto"){
if(is.null(label)){
Modified: trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.text.R
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.text.R 2011-09-28 11:01:35 UTC (rev 3854)
+++ trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.text.R 2011-09-28 15:23:12 UTC (rev 3855)
@@ -7,7 +7,7 @@
#' @export
#' @examples
#' test.text <- rk.XML.text("Added this text.")
-#' cat(pasteXMLNode(test.text, shine=1))
+#' cat(pasteXMLNode(test.text))
rk.XML.text <- function(text, type="normal", id.name=NULL){
if(!is.null(id.name)){
Modified: trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.vars.R
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.vars.R 2011-09-28 11:01:35 UTC (rev 3854)
+++ trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.vars.R 2011-09-28 15:23:12 UTC (rev 3855)
@@ -47,7 +47,7 @@
#' \code{\link[rkwarddev:rk.XML.varselector]{rk.XML.varselector}}
#' @examples
#' test.vars <- rk.XML.vars("Select some vars", "Vars go here")
-#' cat(pasteXMLNode(test.vars, shine=1))
+#' cat(pasteXMLNode(test.vars))
rk.XML.vars <- function(label, slot.text, required=FALSE, multi=FALSE, min=1, any=1, max=0,
dim=0, min.len=0, max.len=NULL, classes=NULL, types=NULL, horiz=TRUE, add.nodes=NULL,
Modified: trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.varselector.R
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.varselector.R 2011-09-28 11:01:35 UTC (rev 3854)
+++ trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.varselector.R 2011-09-28 15:23:12 UTC (rev 3855)
@@ -10,7 +10,7 @@
#' \code{\link[rkwarddev:rk.XML.vars]{rk.XML.vars}}
#' @examples
#' test.varselector <- rk.XML.varselector("Select some vars")
-#' cat(pasteXMLNode(test.varselector, shine=1))
+#' cat(pasteXMLNode(test.varselector))
rk.XML.varselector <- function(label=NULL, id.name="auto"){
if(identical(id.name, "auto")){
Modified: trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.varslot.R
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.varslot.R 2011-09-28 11:01:35 UTC (rev 3854)
+++ trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.varslot.R 2011-09-28 15:23:12 UTC (rev 3855)
@@ -32,7 +32,7 @@
#' \dontrun{
#' test.varselector <- rk.XML.varselector("Select some vars")
#' test.varslot <- rk.XML.varslot("Vars go here", source=test.varselector)
-#' cat(pasteXMLNode(test.varslot, shine=1))
+#' cat(pasteXMLNode(test.varslot))
#' }
rk.XML.varslot <- function(label, source, required=FALSE, multi=FALSE, min=1, any=1, max=0,
Modified: trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.wizard.R
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.wizard.R 2011-09-28 11:01:35 UTC (rev 3854)
+++ trunk/rkward/rkward/rbackend/rpackages/rkwarddev/R/rk.XML.wizard.R 2011-09-28 15:23:12 UTC (rev 3855)
@@ -1,8 +1,8 @@
#' Create XML wizard section for RKWard plugins
#'
#' This function will create a wizard section with optional child nodes "browser", "checkbox",
-#' "column", "copy", "dropdown", "formula", "frame", "input", "page", "radio", "row", "saveobject",
-#' "spinbox", "stretch", "tabbook", "text", "varselector" and "varslot".
+#' "column", "copy", "dropdown", "embed", "formula", "frame", "include", "input", "insert",
+#' "page", "preview", "radio", "row", "saveobject", "spinbox", "stretch", "tabbook", "text", "varselector" and "varslot".
#'
#' @param nodes A (list of) objects of class \code{XiMpLe.node}
#' @param label Character string, a text label for this plugin element.
@@ -18,7 +18,7 @@
#' test.text <- rk.XML.text("Did you test more than 30 subjects?")
#' test.copy <- rk.XML.copy(id=test.cbox1)
#' test.wizard <- rk.XML.wizard(rk.XML.page(list(test.text, test.copy)))
-#' cat(pasteXMLNode(test.wizard, shine=1))
+#' cat(pasteXMLNode(test.wizard))
rk.XML.wizard <- function(nodes, label=NULL){
# check the node names and allow only valid ones
@@ -27,8 +27,9 @@
})
invalid.sets <- !node.names %in% c("browser", "checkbox", "column", "copy",
- "dropdown", "formula", "frame", "input", "page", "radio", "row", "saveobject",
- "spinbox", "stretch", "tabbook", "text", "varselector", "varslot")
+ "dropdown", "embed", "formula", "frame", "include", "input", "insert",
+ "page", "preview", "radio", "row", "saveobject", "spinbox", "stretch",
+ "tabbook", "text", "varselector", "varslot")
if(any(invalid.sets)){
stop(simpleError(paste("Invalid XML nodes for wizard section: ", paste(node.names[invalid.sets], collapse=", "), sep="")))
} else {}
Modified: trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.about.Rd
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.about.Rd 2011-09-28 11:01:35 UTC (rev 3854)
+++ trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.about.Rd 2011-09-28 15:23:12 UTC (rev 3855)
@@ -82,6 +82,6 @@
c(name="heisenberg.pluginmap", url="http://eternalwondermaths.example.org/hsb"))
)
-cat(pasteXMLNode(about.node))
+cat(pasteXMLNode(about.node, shine=2))
}
Modified: trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.browser.Rd
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.browser.Rd 2011-09-28 11:01:35 UTC (rev 3854)
+++ trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.browser.Rd 2011-09-28 15:23:12 UTC (rev 3855)
@@ -40,6 +40,6 @@
}
\examples{
test.browser <- rk.XML.browser("Browse here:")
-cat(pasteXMLNode(test.browser, shine=1))
+cat(pasteXMLNode(test.browser))
}
Modified: trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.cbox.Rd
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.cbox.Rd 2011-09-28 11:01:35 UTC (rev 3854)
+++ trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.cbox.Rd 2011-09-28 15:23:12 UTC (rev 3855)
@@ -33,6 +33,6 @@
list(
rk.XML.cbox(label="foo", value="foo1", chk=TRUE),
rk.XML.cbox(label="bar", value="bar2"))))
-cat(pasteXMLNode(test.checkboxes, shine=1))
+cat(pasteXMLNode(test.checkboxes))
}
Modified: trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.col.Rd
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.col.Rd 2011-09-28 11:01:35 UTC (rev 3854)
+++ trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.col.Rd 2011-09-28 15:23:12 UTC (rev 3855)
@@ -22,6 +22,6 @@
list(
rk.XML.cbox(label="foo", val="foo1", chk=TRUE),
rk.XML.cbox(label="bar", val="bar2"))))
-cat(pasteXMLNode(test.checkboxes, shine=1))
+cat(pasteXMLNode(test.checkboxes))
}
Modified: trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.connect.Rd
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.connect.Rd 2011-09-28 11:01:35 UTC (rev 3854)
+++ trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.connect.Rd 2011-09-28 15:23:12 UTC (rev 3855)
@@ -43,7 +43,7 @@
}
\examples{
test.connect <- rk.XML.connect(governor="lgc_foobar", client="frame_bar")
-cat(pasteXMLNode(test.connect, shine=1))
+cat(pasteXMLNode(test.connect))
}
\seealso{
\code{\link[rkwarddev:rk.XML.convert]{rk.XML.convert}},
Modified: trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.convert.Rd
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.convert.Rd 2011-09-28 11:01:35 UTC (rev 3854)
+++ trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.convert.Rd 2011-09-28 15:23:12 UTC (rev 3855)
@@ -61,7 +61,7 @@
}
\examples{
test.convert <- rk.XML.convert(c(string="foo"), mode=c(notequals="bar"))
-cat(pasteXMLNode(test.convert, shine=1))
+cat(pasteXMLNode(test.convert))
}
\seealso{
\code{\link[rkwarddev:rk.XML.connect]{rk.XML.connect}},
Modified: trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.copy.Rd
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.copy.Rd 2011-09-28 11:01:35 UTC (rev 3854)
+++ trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.copy.Rd 2011-09-28 15:23:12 UTC (rev 3855)
@@ -28,7 +28,7 @@
test.text <- rk.XML.text("Did you test more than 30 subjects?")
test.copy <- rk.XML.copy(id=test.cbox1)
test.wizard <- rk.XML.wizard(rk.XML.page(list(test.text, test.copy)))
-cat(pasteXMLNode(test.wizard, shine=1))
+cat(pasteXMLNode(test.wizard))
}
\seealso{
\code{\link[rkwarddev:rk.XML.plugin]{rk.XML.plugin}},
Modified: trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.dialog.Rd
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.dialog.Rd 2011-09-28 11:01:35 UTC (rev 3854)
+++ trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.dialog.Rd 2011-09-28 15:23:12 UTC (rev 3855)
@@ -17,7 +17,8 @@
\description{
This function will create a dialog section with optional
child nodes "browser", "checkbox", "column", "copy",
- "dropdown", "formula", "frame", "input", "radio", "row",
+ "dropdown", "embed", "formula", "frame", "include",
+ "input", "insert", "preview", "radio", "row",
"saveobject", "spinbox", "stretch", "tabbook", "text",
"varselector" and "varslot".
}
@@ -27,7 +28,7 @@
test.cbox1 <- rk.XML.cbox(label="Want to type?", val="true")
test.cbox2 <- rk.XML.cbox(label="Are you shure?", val="true")
test.dialog <- rk.XML.dialog(rk.XML.col(list(test.input, test.cbox1, test.cbox2)))
-cat(pasteXMLNode(test.dialog, shine=1))
+cat(pasteXMLNode(test.dialog))
}
\seealso{
\code{\link[rkwarddev:rk.XML.plugin]{rk.XML.plugin}},
Modified: trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.dropdown.Rd
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.dropdown.Rd 2011-09-28 11:01:35 UTC (rev 3854)
+++ trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.dropdown.Rd 2011-09-28 15:23:12 UTC (rev 3855)
@@ -30,6 +30,6 @@
test.dropdown <- rk.XML.dropdown("mydrop",
options=list("First Option"=c(val="val1"),
"Second Option"=c(val="val2", chk=TRUE)))
-cat(pasteXMLNode(test.dropdown, shine=1))
+cat(pasteXMLNode(test.dropdown))
}
Added: trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.embed.Rd
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.embed.Rd (rev 0)
+++ trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.embed.Rd 2011-09-28 15:23:12 UTC (rev 3855)
@@ -0,0 +1,29 @@
+\name{rk.XML.embed}
+\alias{rk.XML.embed}
+\title{Create XML node "embed" for RKWard plugins}
+\usage{
+ rk.XML.embed(component, button = FALSE, label =
+ "Options")
+}
+\arguments{
+ \item{component}{A character string, registered name
+ (\code{id} in pluginmap file) of the component to be
+ embedded.}
+
+ \item{button}{Logical, whether the plugin should be
+ embedded as a button and appear if it's pressed.}
+
+ \item{label}{A character string, text label for the
+ button (only used if \code{button=TRUE}).}
+}
+\value{
+ A list of objects of class \code{XiMpLe.node}.
+}
+\description{
+ Create XML node "embed" for RKWard plugins
+}
+\examples{
+test.embed <- rk.XML.embed("someComponent")
+cat(pasteXMLNode(test.embed))
+}
+
Modified: trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.external.Rd
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.external.Rd 2011-09-28 11:01:35 UTC (rev 3854)
+++ trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.external.Rd 2011-09-28 15:23:12 UTC (rev 3855)
@@ -18,7 +18,7 @@
}
\examples{
test.external <- rk.XML.external(id="ext_property", default="none")
-cat(pasteXMLNode(test.external, shine=1))
+cat(pasteXMLNode(test.external))
}
\seealso{
\code{\link[rkwarddev:rk.XML.convert]{rk.XML.convert}},
Modified: trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.formula.Rd
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.formula.Rd 2011-09-28 11:01:35 UTC (rev 3854)
+++ trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.formula.Rd 2011-09-28 15:23:12 UTC (rev 3855)
@@ -29,10 +29,12 @@
test.varslot1 <- rk.XML.varslot("Fixed factors", source=test.varselector)
test.varslot2 <- rk.XML.varslot("Dependent variables", source=test.varselector)
test.formula <- rk.XML.formula(fixed=test.varslot1, dependent=test.varslot2)
-cat(pasteXMLNode(test.formula, shine=1))
+cat(pasteXMLNode(test.formula))
}
\seealso{
\code{\link[rkwarddev:rk.XML.varselector]{rk.XML.varselector}},
- \code{\link[rkwarddev:rk.XML.varslot]{rk.XML.varslot}}
+ \code{\link[rkwarddev:rk.XML.varslot]{rk.XML.varslot}},
+ \code{\link[rkwarddev:rk.XML.vars]{rk.XML.vars}} (a
+ wrapper, including formula)
}
Modified: trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.frame.Rd
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.frame.Rd 2011-09-28 11:01:35 UTC (rev 3854)
+++ trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.frame.Rd 2011-09-28 15:23:12 UTC (rev 3855)
@@ -27,6 +27,6 @@
test.dropdown <- rk.XML.dropdown("mydrop",
options=list("First Option"=c(val="val1"),
"Second Option"=c(val="val2", chk=TRUE)))
-cat(pasteXMLNode(rk.XML.frame(test.dropdown, label="Some options"), shine=1))
+cat(pasteXMLNode(rk.XML.frame(test.dropdown, label="Some options")))
}
Added: trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.include.Rd
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.include.Rd (rev 0)
+++ trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.include.Rd 2011-09-28 15:23:12 UTC (rev 3855)
@@ -0,0 +1,21 @@
+\name{rk.XML.include}
+\alias{rk.XML.include}
+\title{Create XML node "include" for RKWard plugins}
+\usage{
+ rk.XML.include(file)
+}
+\arguments{
+ \item{file}{A character string, the file name to be
+ included.}
+}
+\value{
+ A list of objects of class \code{XiMpLe.node}.
+}
+\description{
+ Create XML node "include" for RKWard plugins
+}
+\examples{
+test.include <- rk.XML.include("../some_file.xml")
+cat(pasteXMLNode(test.include))
+}
+
Modified: trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.input.Rd
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.input.Rd 2011-09-28 11:01:35 UTC (rev 3854)
+++ trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.input.Rd 2011-09-28 15:23:12 UTC (rev 3855)
@@ -30,6 +30,6 @@
}
\examples{
test.input <- rk.XML.input("Type some text")
-cat(pasteXMLNode(test.input, shine=1))
+cat(pasteXMLNode(test.input))
}
Added: trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.insert.Rd
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.insert.Rd (rev 0)
+++ trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.insert.Rd 2011-09-28 15:23:12 UTC (rev 3855)
@@ -0,0 +1,32 @@
+\name{rk.XML.insert}
+\alias{rk.XML.insert}
+\title{Create XML node "insert" for RKWard plugins}
+\usage{
+ rk.XML.insert(snippet)
+}
+\arguments{
+ \item{snippet}{Either a character string (the \code{id}
+ of the snippet to be inserted), or an object of class
+ \code{XiMpLe.node} (whose \code{id} will be extracted and
+ used; must be a snippet!).}
+}
+\value{
+ A list of objects of class \code{XiMpLe.node}.
+}
+\description{
+ This function creates an insert node to use snippets.
+}
+\examples{
+# define a formula section with varselector and varslots
+test.formula <- rk.XML.vars("Variables", "Fixed", formula.dependent="Dependent")
+# define the snippet
+test.snippet <- rk.XML.snippet(test.formula)
+# now to insert the snippet
+test.insert <- rk.XML.insert(test.snippet)
+cat(pasteXMLNode(test.insert))
+}
+\seealso{
+ \code{\link[rkwarddev:rk.XML.snippets]{rk.XML.snippets}}
+ \code{\link[rkwarddev:rk.XML.snippet]{rk.XML.snippet}}
+}
+
Modified: trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.logic.Rd
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.logic.Rd 2011-09-28 11:01:35 UTC (rev 3854)
+++ trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.logic.Rd 2011-09-28 15:23:12 UTC (rev 3855)
@@ -13,7 +13,8 @@
}
\description{
This function will create a logic section with "convert",
- "connect" ,"external" and "set" nodes.
+ "connect", "include", "insert", "external" and "set"
+ nodes.
}
\examples{
# define an input field and two checkboxes
@@ -24,12 +25,12 @@
test.convert <- rk.XML.convert(c(state=test.cbox1,state=test.cbox2), mode=c(and=""))
test.connect <- rk.XML.connect(governor=test.convert, client=test.input, set="enabled")
test.logic <- rk.XML.logic(nodes=list(test.convert, test.connect))
-cat(pasteXMLNode(test.logic, shine=1))
+cat(pasteXMLNode(test.logic))
# with only one checkbox, you can directly query if it's checked
test.connect2 <- rk.XML.connect(governor=test.cbox1, client=test.input, set="enabled")
test.logic2 <- rk.XML.logic(nodes=list(test.connect2))
-cat(pasteXMLNode(test.logic2, shine=1))
+cat(pasteXMLNode(test.logic2))
}
\seealso{
\code{\link[rkwarddev:rk.XML.convert]{rk.XML.convert}},
Modified: trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.page.Rd
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.page.Rd 2011-09-28 11:01:35 UTC (rev 3854)
+++ trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.page.Rd 2011-09-28 15:23:12 UTC (rev 3855)
@@ -29,7 +29,7 @@
test.text <- rk.XML.text("Did you test more than 30 subjects?")
test.copy <- rk.XML.copy(id.name=test.cbox1)
test.wizard <- rk.XML.wizard(rk.XML.page(list(test.text, test.copy)))
-cat(pasteXMLNode(test.wizard, shine=1))
+cat(pasteXMLNode(test.wizard))
}
\seealso{
\code{\link[rkwarddev:rk.XML.wizard]{rk.XML.wizard}}
Modified: trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.plugin.Rd
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.plugin.Rd 2011-09-28 11:01:35 UTC (rev 3854)
+++ trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.plugin.Rd 2011-09-28 15:23:12 UTC (rev 3855)
@@ -70,6 +70,6 @@
"Second Tab"), dialog=list(test.checkboxes, test.dropdown))
# make a plugin with that tabbook
test.plugin <- rk.XML.plugin("My test", dialog=test.tabbook)
-cat(pasteXMLTree(test.plugin, shine=1))
+cat(pasteXMLTree(test.plugin))
}
Added: trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.preview.Rd
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.preview.Rd (rev 0)
+++ trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.preview.Rd 2011-09-28 15:23:12 UTC (rev 3855)
@@ -0,0 +1,21 @@
+\name{rk.XML.preview}
+\alias{rk.XML.preview}
+\title{Create XML node "preview" for RKWard plugins}
+\usage{
+ rk.XML.preview(label = "Preview")
+}
+\arguments{
+ \item{label}{A character string, text label for the
+ preview checkbox.}
+}
+\value{
+ A list of objects of class \code{XiMpLe.node}.
+}
+\description{
+ Create XML node "preview" for RKWard plugins
+}
+\examples{
+test.preview <- rk.XML.preview("See a preview?")
+cat(pasteXMLNode(test.preview))
+}
+
Modified: trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.radio.Rd
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.radio.Rd 2011-09-28 11:01:35 UTC (rev 3854)
+++ trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.radio.Rd 2011-09-28 15:23:12 UTC (rev 3855)
@@ -30,6 +30,6 @@
test.radio <- rk.XML.radio("Chose one",
options=list("First Option"=c(val="val1"),
"Second Option"=c(val="val2", chk=TRUE)))
-cat(pasteXMLNode(test.radio, shine=1))
+cat(pasteXMLNode(test.radio))
}
Modified: trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.row.Rd
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.row.Rd 2011-09-28 11:01:35 UTC (rev 3854)
+++ trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.row.Rd 2011-09-28 15:23:12 UTC (rev 3855)
@@ -22,6 +22,6 @@
list(
rk.XML.cbox(label="foo", val="foo1", chk=TRUE),
rk.XML.cbox(label="bar", val="bar2"))))
-cat(pasteXMLNode(test.checkboxes, shine=1))
+cat(pasteXMLNode(test.checkboxes))
}
Modified: trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.saveobj.Rd
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.saveobj.Rd 2011-09-28 11:01:35 UTC (rev 3854)
+++ trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.saveobj.Rd 2011-09-28 15:23:12 UTC (rev 3855)
@@ -37,6 +37,6 @@
}
\examples{
test.saveobj <- rk.XML.saveobj("Save the results")
-cat(pasteXMLNode(test.saveobj, shine=1))
+cat(pasteXMLNode(test.saveobj))
}
Modified: trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.set.Rd
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.set.Rd 2011-09-28 11:01:35 UTC (rev 3854)
+++ trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.set.Rd 2011-09-28 15:23:12 UTC (rev 3855)
@@ -27,7 +27,7 @@
}
\examples{
test.set <- rk.XML.set(id="input_foo", set="required", to=TRUE)
-cat(pasteXMLNode(test.set, shine=1))
+cat(pasteXMLNode(test.set))
}
\seealso{
\code{\link[rkwarddev:rk.XML.convert]{rk.XML.convert}},
Added: trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.snippet.Rd
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.snippet.Rd (rev 0)
+++ trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.snippet.Rd 2011-09-28 15:23:12 UTC (rev 3855)
@@ -0,0 +1,33 @@
+\name{rk.XML.snippet}
+\alias{rk.XML.snippet}
+\title{Create XML "snippet" node for RKWard plugins}
+\usage{
+ rk.XML.snippet(nodes, id.name = "auto")
+}
+\arguments{
+ \item{nodes}{A (list of) objects of class
+ \code{XiMpLe.node}.}
+
+ \item{id.name}{Character string, a unique ID for this
+ plugin element. If \code{"auto"}, an ID will be generated
+ automatically from the tag names and IDs of the given
+ nodes.}
+}
+\value{
+ A list of objects of class \code{XiMpLe.node}.
+}
+\description{
+ This function will create a snippet node for snippets
+ sections.
+}
+\examples{
+# define a formula section with varselector and varslots
+test.formula <- rk.XML.vars("Variables", "Fixed", formula.dependent="Dependent")
+# define the snippet
+test.snippet <- rk.XML.snippet(test.formula)
+cat(pasteXMLNode(test.snippet))
+}
+\seealso{
+ \code{\link[rkwarddev:rk.XML.snippets]{rk.XML.snippets}}
+}
+
Added: trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.snippets.Rd
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.snippets.Rd (rev 0)
+++ trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.snippets.Rd 2011-09-28 15:23:12 UTC (rev 3855)
@@ -0,0 +1,31 @@
+\name{rk.XML.snippets}
+\alias{rk.XML.snippets}
+\title{Create XML "snippets" node for RKWard plugins}
+\usage{
+ rk.XML.snippets(nodes = NULL)
+}
+\arguments{
+ \item{nodes}{A (list of) objects of class
+ \code{XiMpLe.node}. They must all have the name
+ "snippet".}
+}
+\value{
+ A list of objects of class \code{XiMpLe.node}.
+}
+\description{
+ This function will create a snippets node for the
+ document section, with optional child nodes "snippet".
+}
+\examples{
+# define a formula section with varselector and varslots
+test.formula <- rk.XML.vars("Variables", "Fixed", formula.dependent="Dependent")
+# define the snippets section
+test.snippet <- rk.XML.snippet(test.formula)
+test.snippets <- rk.XML.snippets(test.snippet)
+cat(pasteXMLNode(test.snippets))
+}
+\seealso{
+ \code{\link[rkwarddev:rk.XML.plugin]{rk.XML.plugin}}
+ \code{\link[rkwarddev:rk.XML.snippet]{rk.XML.snippet}}
+}
+
Modified: trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.spinbox.Rd
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.spinbox.Rd 2011-09-28 11:01:35 UTC (rev 3854)
+++ trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.spinbox.Rd 2011-09-28 15:23:12 UTC (rev 3855)
@@ -43,6 +43,6 @@
}
\examples{
test.spinbox <- rk.XML.spinbox("Spin this:")
-cat(pasteXMLNode(test.spinbox, shine=1))
+cat(pasteXMLNode(test.spinbox))
}
Modified: trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.stretch.Rd
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.stretch.Rd 2011-09-28 11:01:35 UTC (rev 3854)
+++ trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.stretch.Rd 2011-09-28 15:23:12 UTC (rev 3855)
@@ -21,6 +21,6 @@
elements defined there.
}
\examples{
-cat(pasteXMLNode(rk.XML.stretch(), shine=1))
+cat(pasteXMLNode(rk.XML.stretch()))
}
Modified: trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.tabbook.Rd
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.tabbook.Rd 2011-09-28 11:01:35 UTC (rev 3854)
+++ trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.tabbook.Rd 2011-09-28 15:23:12 UTC (rev 3855)
@@ -40,6 +40,6 @@
# combine the above into a tabbook
test.tabbook <- rk.XML.tabbook("My Tabbook", tab.labels=c("First Tab",
"Second Tab"), children=list(test.checkboxes, test.dropdown))
-cat(pasteXMLNode(test.tabbook, shine=1))
+cat(pasteXMLNode(test.tabbook))
}
Modified: trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.text.Rd
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.text.Rd 2011-09-28 11:01:35 UTC (rev 3854)
+++ trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.text.Rd 2011-09-28 15:23:12 UTC (rev 3855)
@@ -21,6 +21,6 @@
}
\examples{
test.text <- rk.XML.text("Added this text.")
-cat(pasteXMLNode(test.text, shine=1))
+cat(pasteXMLNode(test.text))
}
Modified: trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.vars.Rd
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.vars.Rd 2011-09-28 11:01:35 UTC (rev 3854)
+++ trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.vars.Rd 2011-09-28 15:23:12 UTC (rev 3855)
@@ -100,7 +100,7 @@
}
\examples{
test.vars <- rk.XML.vars("Select some vars", "Vars go here")
-cat(pasteXMLNode(test.vars, shine=1))
+cat(pasteXMLNode(test.vars))
}
\seealso{
\code{\link[rkwarddev:rk.XML.varslot]{rk.XML.varslot}},
Modified: trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.varselector.Rd
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.varselector.Rd 2011-09-28 11:01:35 UTC (rev 3854)
+++ trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.varselector.Rd 2011-09-28 15:23:12 UTC (rev 3855)
@@ -20,7 +20,7 @@
}
\examples{
test.varselector <- rk.XML.varselector("Select some vars")
-cat(pasteXMLNode(test.varselector, shine=1))
+cat(pasteXMLNode(test.varselector))
}
\seealso{
\code{\link[rkwarddev:rk.XML.varslot]{rk.XML.varslot}},
Modified: trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.varslot.Rd
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.varslot.Rd 2011-09-28 11:01:35 UTC (rev 3854)
+++ trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.varslot.Rd 2011-09-28 15:23:12 UTC (rev 3855)
@@ -69,7 +69,7 @@
\dontrun{
test.varselector <- rk.XML.varselector("Select some vars")
test.varslot <- rk.XML.varslot("Vars go here", source=test.varselector)
-cat(pasteXMLNode(test.varslot, shine=1))
+cat(pasteXMLNode(test.varslot))
}
}
\seealso{
Modified: trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.wizard.Rd
===================================================================
--- trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.wizard.Rd 2011-09-28 11:01:35 UTC (rev 3854)
+++ trunk/rkward/rkward/rbackend/rpackages/rkwarddev/man/rk.XML.wizard.Rd 2011-09-28 15:23:12 UTC (rev 3855)
@@ -17,9 +17,10 @@
\description{
This function will create a wizard section with optional
child nodes "browser", "checkbox", "column", "copy",
- "dropdown", "formula", "frame", "input", "page", "radio",
- "row", "saveobject", "spinbox", "stretch", "tabbook",
- "text", "varselector" and "varslot".
+ "dropdown", "embed", "formula", "frame", "include",
+ "input", "insert", "page", "preview", "radio", "row",
+ "saveobject", "spinbox", "stretch", "tabbook", "text",
+ "varselector" and "varslot".
}
\examples{
# define a checkbox for the actual dialog
@@ -28,7 +29,7 @@
test.text <- rk.XML.text("Did you test more than 30 subjects?")
test.copy <- rk.XML.copy(id=test.cbox1)
test.wizard <- rk.XML.wizard(rk.XML.page(list(test.text, test.copy)))
-cat(pasteXMLNode(test.wizard, shine=1))
+cat(pasteXMLNode(test.wizard))
}
\seealso{
\code{\link[rkwarddev:rk.XML.plugin]{rk.XML.plugin}},
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the rkward-tracker
mailing list