diff options
author | jranke <jranke@edb9625f-4e0d-4859-8d74-9fd3b1da38cb> | 2013-09-04 15:54:10 +0000 |
---|---|---|
committer | jranke <jranke@edb9625f-4e0d-4859-8d74-9fd3b1da38cb> | 2013-09-04 15:54:10 +0000 |
commit | ed8057b5a43bcdad59e7ebf4c3d429e38b25836d (patch) | |
tree | 67f97263bb6f650df19eff41764003e1d9cd2c41 /inst | |
parent | e63b3a62b6ce889f271f9cf7b6d18538395f21be (diff) |
git-svn-id: svn+ssh://svn.r-forge.r-project.org/svnroot/kinfit/pkg/mkin@87 edb9625f-4e0d-4859-8d74-9fd3b1da38cb
Diffstat (limited to 'inst')
-rw-r--r-- | inst/GUI/mkinGUItest.RData | bin | 0 -> 169 bytes | |||
-rw-r--r-- | inst/GUI/simple2.R | 65 | ||||
-rw-r--r-- | inst/GUI/test-simple2.R | 17 |
3 files changed, 82 insertions, 0 deletions
diff --git a/inst/GUI/mkinGUItest.RData b/inst/GUI/mkinGUItest.RData Binary files differnew file mode 100644 index 0000000..82b7086 --- /dev/null +++ b/inst/GUI/mkinGUItest.RData diff --git a/inst/GUI/simple2.R b/inst/GUI/simple2.R new file mode 100644 index 0000000..2f725d1 --- /dev/null +++ b/inst/GUI/simple2.R @@ -0,0 +1,65 @@ +# Simple gWidgetsWWW2 GUI for mkin
+w <- gwindow("Simple R GUI for kinetic evaluations")
+sb <- gstatusbar("Powered by gWidgetsWWW2 and Rook", cont = w)
+g <- gframe("Simple R GUI for kinetic evaluations", cont = w,
+ use.scrollwindow = TRUE, horizontal = FALSE)
+
+# Project definition {{{1
+prg <- gexpandgroup("Project definition", cont = g)
+visible(prg) <- TRUE
+
+make_observed <- function(observed.df) {
+ if (!exists("observed.df")) {
+ n.observed <- 2
+ observed.names = c("parent", paste("M", 1:(n.observed - 1), sep=""))
+ observed.df = data.frame(Index = 1:n.observed,
+ Name = observed.names,
+ stringsAsFactors = FALSE)
+ }
+
+ observed.gdf <- gdf(observed.df,
+ name = "Names of observed variables",
+ width = 500, height = 250, cont = prg)
+ observed.gdf$set_column_width(1, 40)
+}
+
+f <- gfile(text = "Set project file", cont = prg,
+ handler = function(h, ...)
+ {
+ tmpfile <- normalizePath(svalue(h$obj), winslash = "/")
+ load(tmpfile)
+ make_observed(observed.df)
+ })
+
+# Editable table of studies {{{1
+stg <- gexpandgroup("Studies", cont = g)
+visible(stg) <- FALSE
+studies.df <- data.frame(Index = as.integer(1),
+ Author = "FOCUS kinetics workgroup",
+ Year = "2006",
+ Title = "FOCUS Kinetics",
+ Datasets = as.integer(3),
+ stringsAsFactors = FALSE)
+studies.gdf <- gdf(studies.df,
+ name = "Editable list of studies in the project",
+ width = "auto",
+ cont = stg)
+studies.gdf$set_column_width(1, 40)
+studies.gdf$set_column_width(2, 200)
+
+# Table of datasets to select them for editing {{{1
+dsg <- gexpandgroup("Datasets", cont = g)
+visible(dsg) <- FALSE
+ds.df <- data.frame(Index = 1:3,
+ Study = as.integer(1),
+ Title = paste("FOCUS dataset", c("A", "B", "C")),
+ icon = asIcon(c("editor", "editor", "editor")),
+ stringsAsFactors = FALSE)
+ds.gtable <- gtable(ds.df, width = "auto", cont = dsg)
+ds.gtable$set_column_width(1, 40)
+ds.gtable$set_column_width(2, 40)
+ds.gtable$set_column_width(3, 200)
+
+
+# 1}}}
+# vim: set foldmethod=marker ts=2 sw=2 expandtab:
diff --git a/inst/GUI/test-simple2.R b/inst/GUI/test-simple2.R new file mode 100644 index 0000000..e33e077 --- /dev/null +++ b/inst/GUI/test-simple2.R @@ -0,0 +1,17 @@ +require(gWidgetsWWW)
+localServerStart("simple.R")
+
+localServerStart("gdf-test.R")
+localServerStart("gdf-test-john.R")
+
+localServerStart("Examples/ex-actions.R", package="gWidgetsWWW")
+localServerStart("Examples/ex-add-widget-dynamically.R", package="gWidgetsWWW")
+localServerStart("Examples/ex-clt.R", package="gWidgetsWWW")
+localServerStart("Examples/ex-form.R", package="gWidgetsWWW")
+localServerStart("Examples/ex-gcombobox.R", package="gWidgetsWWW")
+localServerStart("Examples/ex-gtable.R", package="gWidgetsWWW")
+localServerStart("Examples/ex-index.R", package="gWidgetsWWW")
+localServerStart("Examples/ex-layouts.R", package="gWidgetsWWW")
+localServerStart("Examples/ex-simple-gui.R", package="gWidgetsWWW")
+localServerStart("Examples/ex-widgets.R", package="gWidgetsWWW")
+localServerStart("Examples/ex-windows.R", package="gWidgetsWWW")
|