Skip to content

Commit

Permalink
Merge pull request #125 from iNZightVIT/release/3.3.5
Browse files Browse the repository at this point in the history
Release 3.3.5
  • Loading branch information
tmelliott committed Jan 31, 2019
2 parents 77467e4 + ef8bc79 commit 0683ad7
Show file tree
Hide file tree
Showing 7 changed files with 56 additions and 47 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
@@ -1,8 +1,8 @@
Package: iNZight
Type: Package
Title: iNZight GUI for Data Exploration and Visualisation
Version: 3.3.4
Date: 2019-01-16
Version: 3.3.5
Date: 2019-02-01
Authors@R: c(person("Tom", "Elliott", role = c("aut", "cre"),
email = "tom.elliott@auckland.ac.nz"),
person("Dineika", "Chandrananda", role = "ctb"),
Expand Down
6 changes: 6 additions & 0 deletions NEWS.Md
@@ -1,3 +1,9 @@
## iNZight 3.3.5
__Release date__: 01 February 2019

- update API for module windows to create header (title), body (with scrollbar), and footer (for buttons)


## iNZight 3.3.4
__Release date:__ 16 January 2019

Expand Down
32 changes: 30 additions & 2 deletions R/iNZGUI.R
Expand Up @@ -1149,17 +1149,45 @@ iNZGUI <- setRefClass(
},
## create a gvbox object into the module window (ie, initialize it)
## NOTE: should be run every time when a new module is open
initializeModuleWindow = function(mod) {
initializeModuleWindow = function(mod, title, scroll = FALSE, border = 0) {
## delete any old ones:
if (length(.self$leftMain$children) > 1) {
delete(.self$leftMain, .self$leftMain$children[[2]])
}
## create a gvbox in moduleWindow
moduleWindow <<- gvbox(container = leftMain, expand = TRUE)
# to improve between-module similarity, set up here with
# -> head, body, footer (for buttons)
modContainer <- gvbox(container = leftMain, expand = TRUE)

moduleWindow <<-
list(
header =
gvbox(container = modContainer),
body =
gvbox(
spacing = 10,
use.scrollwindow = ifelse(scroll, "y", FALSE),
container = modContainer,
expand = TRUE
),
footer =
ggroup(container = modContainer)
)

if (!missing(title)) {
title <- glabel(title)
font(title) <- list(weight = "bold", size = 12)
add(moduleWindow$header, title, anchor = c(0, 0))
}

if (border > 0) moduleWindow$body$set_borderwidth(border)

visible(gp1) <<- FALSE

if (!missing(mod))
activeModule <<- mod

invisible(moduleWindow)
},
initializeCodeHistory = function() {
rhistory <<- iNZcodeWidget$new(.self)
Expand Down
23 changes: 6 additions & 17 deletions R/iNZPlotInfWin.R
Expand Up @@ -23,21 +23,14 @@ iNZPlotInfWin <- setRefClass(
initFields(GUI = gui)
if (!is.null(GUI)) {
## close modification window if one is open
if (length(GUI$leftMain$children) > 1) {
delete(GUI$leftMain, GUI$leftMain$children[[2]])
}
GUI$initializeModuleWindow()
# if (length(GUI$leftMain$children) > 1) {
# delete(GUI$leftMain, GUI$leftMain$children[[2]])
# }
modwin <- GUI$initializeModuleWindow(title = "Add Inference Information")
mainGrp <- modwin$body

updateSettings()

mainGrp <- gvbox(container = GUI$moduleWindow, expand = TRUE)
mainGrp$set_borderwidth(5)

## Window title
ttl <- glabel("Add Inference Information")
font(ttl) <- list(weight = "bold", family = "normal", size = 11)
add(mainGrp, ttl)

## Three layouts, one for parameter/method/type
parTab <<- glayout()
metTab <<- glayout()
Expand Down Expand Up @@ -76,8 +69,7 @@ iNZPlotInfWin <- setRefClass(

addSpring(mainGrp)

btnGrp <- ggroup(horizontal = TRUE,
expand = FALSE)
btnGrp <- modwin$footer

helpButton <- gbutton("Help", expand = TRUE, fill = TRUE,
cont = btnGrp,
Expand All @@ -93,9 +85,6 @@ iNZPlotInfWin <- setRefClass(
## display the default view (data, variable, etc.)
visible(GUI$gp1) <<- TRUE
})

add(mainGrp, btnGrp, expand = FALSE, fill = "x", anchor = c(0, -1))
visible(GUI$moduleWindow) <<- TRUE
}
},
## up the curSet class variable
Expand Down
19 changes: 6 additions & 13 deletions R/iNZPlotModWin.R
Expand Up @@ -127,12 +127,12 @@ iNZPlotModWin <- setRefClass(
if (!is.null(GUI)) {
updateSettings()

GUI$initializeModuleWindow()
modwin <- GUI$initializeModuleWindow(scroll = FALSE)
mainGrp <- modwin$body

mainGrp <- gvbox(container = GUI$moduleWindow, expand = TRUE, fill = TRUE)
mainGrp$set_borderwidth(5)
topGrp <- ggroup(horizontal = TRUE,
container = mainGrp)
# mainGrp <- gvbox(container = GUI$moduleWindow$body, expand = TRUE, fill = TRUE)

topGrp <- modwin$header
lbl <- glabel("Add to Plot :")
font(lbl) <- list(weight="bold",
family = "normal",
Expand Down Expand Up @@ -163,8 +163,7 @@ iNZPlotModWin <- setRefClass(
visible(updateBtn) <- !svalue(h$obj)
})

btnGrp <- ggroup(horizontal = TRUE,
expand = FALSE)
btnGrp <- modwin$footer

helpButton <- gbutton("Help", expand = TRUE, fill = TRUE,
cont = btnGrp,
Expand All @@ -181,12 +180,6 @@ iNZPlotModWin <- setRefClass(
visible(GUI$gp1) <<- TRUE
})


add(mainGrp, btnGrp, expand = FALSE, fill = "x", anchor = c(0, -1))



visible(GUI$moduleWindow) <<- TRUE
}
},
## up the curSet class variable
Expand Down
16 changes: 4 additions & 12 deletions R/iNZPlotRmveModWin.R
Expand Up @@ -127,23 +127,16 @@ iNZPlotRmveModWin <- setRefClass(
}

## open in leftMain
if (length(GUI$leftMain$children) > 1) {
delete(GUI$leftMain, GUI$leftMain$children[[2]])
}
GUI$initializeModuleWindow()

mainGrp <- gvbox(container = GUI$moduleWindow, expand = TRUE)
modwin <- GUI$initializeModuleWindow(title = "Remove additions", scroll = TRUE)

lbl <- glabel("Remove additions")
font(lbl) <- list(weight = "bold", family = "normal", size = 9)
add(mainGrp, lbl)
mainGrp <- modwin$body

selectGrp <- ggroup(horizontal = FALSE,
container = mainGrp,
expand = FALSE)

addSpring(mainGrp)
btnGrp <- ggroup(container = mainGrp, horizontal = TRUE)

btnGrp <- modwin$footer
mainGrp$set_borderwidth(5)

add(btnGrp, proceedButton, expand = TRUE, fill = TRUE)
Expand All @@ -166,7 +159,6 @@ iNZPlotRmveModWin <- setRefClass(
function() removeAdditions(TRUE)
)

visible(GUI$moduleWindow) <<- TRUE
}
},
## remove plot additions from the plot settings
Expand Down
3 changes: 2 additions & 1 deletion README.md
@@ -1,4 +1,5 @@
# iNZight
# iNZight <img src="inst/images/inzight_transp.png" align="right" width="320" />

[![Travis-CI Build Status](https://travis-ci.org/iNZightVIT/iNZight.svg?branch=master)](https://travis-ci.org/iNZightVIT/iNZight)
[![AppVeyor build status](https://ci.appveyor.com/api/projects/status/ks5p7takochbhhsq/branch/master?svg=true)](https://ci.appveyor.com/project/tmelliott/inzight/branch/master)
[![codecov](https://codecov.io/gh/iNZightVIT/iNZight/branch/master/graph/badge.svg)](https://codecov.io/gh/iNZightVIT/iNZight)
Expand Down

0 comments on commit 0683ad7

Please sign in to comment.