[rkward-cvs] [rkward] packages/rkwarddev: added min_rows and min_columns to rk.XML.matrix()
m.eik michalke
meik.michalke at uni-duesseldorf.de
Tue Jan 20 14:10:44 UTC 2015
Git commit e62cb8c66d6774fa80abceda8b7d7d498f51e132 by m.eik michalke.
Committed on 20/01/2015 at 14:11.
Pushed by meikm into branch 'master'.
added min_rows and min_columns to rk.XML.matrix()
M +2 -1 packages/rkwarddev/ChangeLog
M +12 -4 packages/rkwarddev/R/rk.XML.matrix.R
http://commits.kde.org/rkward/e62cb8c66d6774fa80abceda8b7d7d498f51e132
diff --git a/packages/rkwarddev/ChangeLog b/packages/rkwarddev/ChangeLog
index c130f77..528129f 100644
--- a/packages/rkwarddev/ChangeLog
+++ b/packages/rkwarddev/ChangeLog
@@ -1,6 +1,6 @@
ChangeLog for package rkwarddev
-changes in version 0.07-1 (2015-01-13)
+changes in version 0.07-1 (2015-01-20)
fixed:
- rk.XML.optionset() does now allow to re-use objects defined in the same
function call (i.e., refer to optioncolumns in the logic section)
@@ -45,6 +45,7 @@ added:
rk.XML.vars() to also accept "duplicates"
- new argument "var" in rk.paste.JS() to define whether the JS keyword
"var" should be used or omitted for rk.JS.var objects
+ - rk.XML.matrix() now also accepts the arguments "min_rows" and "min_columns"
changed:
- function i18n() was changed to be used in JavaScript generation only;
this breaks code using the function introduced with 0.06-4, but that was to
diff --git a/packages/rkwarddev/R/rk.XML.matrix.R b/packages/rkwarddev/R/rk.XML.matrix.R
index 00d4c46..f5ee008 100644
--- a/packages/rkwarddev/R/rk.XML.matrix.R
+++ b/packages/rkwarddev/R/rk.XML.matrix.R
@@ -30,15 +30,17 @@
#' smallest representable value.
#' @param max Maximum acceptable value (if \code{type} is "integer" or "real"). Defaults to the
#' largest representable value.
+#' @param min_rows Minimum number of rows, matrix will refuse shrink below this size.
+#' @param min_columns Minimum number of columns, matrix will refuse shrink below this size.
#' @param allow_missings Logical, whether missing (empty) values are allowed in the matrix
#' (if \code{type} is "string").
#' @param allow_user_resize_columns Logical, if \code{TRUE}, the user can add columns by typing
#' on the rightmost (inactive) cells.
#' @param allow_user_resize_rows Logical, if \code{TRUE}, the user can add rows by typing on the
#' bottommost (inactive) cells.
-#' @param fixed_width Logical, force the GUI element to stay at its initial width. Do not use in
-#' combindation with matrices, where the number of columns may change in any way.
-#' Useful, esp. when creating a vector input element (rows="1").
+#' @param fixed_width Logical, assume the column count will not change. The last (or typically only)
+#' column will be stretched to take up the available width. Do not use in combination with matrices,
+#' where the number of columns may change in any way. Useful, esp. when creating a vector input element (rows="1").
#' @param fixed_height Logical, force the GUI element to stay at its initial height. Do not use in
#' combindation with matrices, where the number of rows may change in any way.
#' Useful, esp. when creating a vector input element (columns="1").
@@ -63,7 +65,7 @@
#' @examples
#' test.matrix <- rk.XML.matrix("A matrix")
-rk.XML.matrix <- function(label, mode="real", rows=2, columns=2, min=NULL, max=NULL,
+rk.XML.matrix <- function(label, mode="real", rows=2, columns=2, min=NULL, max=NULL, min_rows=0, min_columns=0,
allow_missings=FALSE, allow_user_resize_columns=TRUE,
allow_user_resize_rows=TRUE, fixed_width=FALSE, fixed_height=FALSE,
horiz_headers=NULL, vert_headers=NULL, id.name="auto", help=NULL, component=rk.get.comp(), i18n=NULL){
@@ -102,6 +104,9 @@ rk.XML.matrix <- function(label, mode="real", rows=2, columns=2, min=NULL, max=N
attr.list[["rows"]] <- rows
} else {}
} else {}
+ if(min_rows != 0){
+ attr.list[["min_rows"]] <- min_rows
+ } else {}
if(!isTRUE(allow_user_resize_columns)){
attr.list[["allow_user_resize_columns"]] <- "false"
@@ -109,6 +114,9 @@ rk.XML.matrix <- function(label, mode="real", rows=2, columns=2, min=NULL, max=N
attr.list[["columns"]] <- columns
} else {}
} else {}
+ if(min_columns != 0){
+ attr.list[["min_columns"]] <- min_columns
+ } else {}
if(isTRUE(fixed_width)){
attr.list[["fixed_width"]] <- "true"
------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
_______________________________________________
rkward-cvs mailing list
rkward-cvs at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rkward-cvs
More information about the rkward-tracker
mailing list