Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Help buttons added

  • Loading branch information...
commit 5c6d2b9acf2564bc502ea57d9acc795ace9dd60b 1 parent ac88f6f
@jfisher-usgs authored
View
2  NAMESPACE
@@ -8,7 +8,7 @@ importFrom(colorspace, rainbow_hcl, polarLUV, choose_palette)
export(AddAxis,
Autocrop,
- AutocropPolygon,
+ AutocropRegion,
BuildHistogram,
BuildPackage,
CheckEntry,
View
47 R/AutocropPolygon.R → R/AutocropRegion.R
@@ -1,4 +1,4 @@
-AutocropPolygon <- function(d, parent=NULL, ...) {
+AutocropRegion <- function(d, parent=NULL, ...) {
# A GUI for specify input parameters for the Autocrop function.
# Additional functions (subroutines)
@@ -70,7 +70,7 @@ AutocropPolygon <- function(d, parent=NULL, ...) {
is.pkg <- "tripack" %in% .packages(all.available=TRUE) &&
require(tripack, quietly=FALSE)
if (!is.pkg)
- stop("package tripack required for AutocropPolygon function")
+ stop("package tripack required for the AutocropRegion function")
# Initialize parameters
@@ -115,27 +115,28 @@ AutocropPolygon <- function(d, parent=NULL, ...) {
# Frame 0 contains buttons
- frame0 <- ttkframe(tt, relief="flat", borderwidth=10)
-
- frame0.but.2.1 <- ttkbutton(frame0, width=10, text="Build",
- command=DrawPolygon)
-
- frame0.but.2.2 <- ttkbutton(frame0, width=10, text="Refresh",
- command=RefreshPlot)
- frame0.but.2.3 <- ttkbutton(frame0, width=10, text="Save",
- command=SavePolygon)
- frame0.but.2.4 <- ttkbutton(frame0, width=10, text="Cancel",
- command=function() tclvalue(tt.done.var) <- 1)
-
- tkgrid(frame0.but.2.1, frame0.but.2.2, frame0.but.2.3, frame0.but.2.4,
- padx=c(0, 4))
-
- tkgrid.configure(frame0.but.2.3, padx=4)
- tkgrid.configure(frame0.but.2.4, padx=0)
-
- tcl("grid", "anchor", frame0, "center")
-
- tkpack(frame0, side="bottom", anchor="e")
+ frame0 <- ttkframe(tt, relief="flat")
+
+ frame0.but.2 <- ttkbutton(frame0, width=10, text="Build",
+ command=DrawPolygon)
+ frame0.but.3 <- ttkbutton(frame0, width=10, text="Refresh",
+ command=RefreshPlot)
+ frame0.but.4 <- ttkbutton(frame0, width=10, text="Save",
+ command=SavePolygon)
+ frame0.but.5 <- ttkbutton(frame0, width=10, text="Cancel",
+ command=function() tclvalue(tt.done.var) <- 1)
+ frame0.but.6 <- ttkbutton(frame0, width=12, text="Help",
+ command=function() {
+ print(help("AutocropRegion", package="RSurvey"))
+ })
+
+ tkgrid("x", frame0.but.2, frame0.but.3, frame0.but.4, frame0.but.5,
+ frame0.but.6, pady=c(15, 10), padx=c(4, 0))
+
+ tkgrid.columnconfigure(frame0, 0, weight=1)
+ tkgrid.configure(frame0.but.2, padx=c(10, 0))
+ tkgrid.configure(frame0.but.6, padx=c(4, 10))
+ tkpack(frame0, fill="x", side="bottom", anchor="e")
# Frame 1 contains parameters
View
10 R/BuildHistogram.R
@@ -194,9 +194,13 @@ BuildHistogram <- function(d, var.names=NULL, var.default=1L, parent=NULL) {
command=function() CalcHist())
frame0.but.3 <- ttkbutton(frame0, width=12, text="Close",
command=function() tclvalue(tt.done.var) <- 1)
- tkgrid(frame0.but.1, frame0.but.2, frame0.but.3, pady=10)
- tkgrid.configure(frame0.but.1, padx=c(0, 4))
- tkgrid.configure(frame0.but.3, padx=c(20, 10))
+ frame0.but.4 <- ttkbutton(frame0, width=12, text="Help",
+ command=function() {
+ print(help("BuildHistogram", package="RSurvey"))
+ })
+ tkgrid(frame0.but.1, frame0.but.2, frame0.but.3, frame0.but.4,
+ pady=10, padx=c(0, 4))
+ tkgrid.configure(frame0.but.4, padx=c(0, 10))
tkpack(frame0, side="bottom", anchor="e")
View
17 R/EditFunction.R
@@ -415,18 +415,23 @@ EditFunction <- function(cols, index=NULL, fun=NULL, value.length=NULL,
command=SaveFunction)
frame0.but.3 <- ttkbutton(frame0, width=12, text="Cancel",
command=function() tclvalue(tt.done.var) <- 1)
- frame0.grp.4 <- ttksizegrip(frame0)
+ frame0.but.4 <- ttkbutton(frame0, width=12, text="Help",
+ command=function() {
+ print(help("EditFunction", package="RSurvey"))
+ })
+ frame0.grp.5 <- ttksizegrip(frame0)
- tkgrid("x", frame0.but.2, frame0.but.3, frame0.grp.4)
+ tkgrid("x", frame0.but.2, frame0.but.3, frame0.but.4, frame0.grp.5)
tkgrid.columnconfigure(frame0, 0, weight=1)
- tkgrid.configure(frame0.but.2, frame0.but.3, padx=c(0, 4), pady=c(15, 10))
- tkgrid.configure(frame0.but.3, columnspan=2, padx=c(0, 10))
+ tkgrid.configure(frame0.but.2, frame0.but.3, frame0.but.4,
+ padx=c(0, 4), pady=c(15, 10))
+ tkgrid.configure(frame0.but.4, columnspan=2, padx=c(0, 10))
- tkgrid.configure(frame0.grp.4, sticky="se")
+ tkgrid.configure(frame0.grp.5, sticky="se")
- tkraise(frame0.but.3, frame0.grp.4)
+ tkraise(frame0.but.4, frame0.grp.5)
tkpack(frame0, fill="x", side="bottom", anchor="e")
View
20 R/ExportData.R
@@ -165,15 +165,21 @@ ExportData <- function(col.ids, file.type="text", parent=NULL) {
command=ExportToFile)
frame0.but.3 <- ttkbutton(frame0, width=12, text="Cancel",
command=function() tclvalue(tt.done.var) <- 1)
- frame0.grp.4 <- ttksizegrip(frame0)
-
- tkgrid("x", frame0.but.2, frame0.but.3, frame0.grp.4)
+
+ frame0.but.4 <- ttkbutton(frame0, width=12, text="Help",
+ command=function() {
+ print(help("ExportData", package="RSurvey"))
+ })
+ frame0.grp.5 <- ttksizegrip(frame0)
+
+ tkgrid("x", frame0.but.2, frame0.but.3, frame0.but.4, frame0.grp.5)
tkgrid.columnconfigure(frame0, 0, weight=1)
- tkgrid.configure(frame0.but.2, frame0.but.3, padx=c(0, 4), pady=c(4, 10))
- tkgrid.configure(frame0.but.3, columnspan=2, padx=c(0, 10))
- tkgrid.configure(frame0.grp.4, sticky="se")
+ tkgrid.configure(frame0.but.2, frame0.but.3, frame0.but.4,
+ padx=c(0, 4), pady=c(4, 10))
+ tkgrid.configure(frame0.but.4, columnspan=2, padx=c(0, 10))
+ tkgrid.configure(frame0.grp.5, sticky="se")
- tkraise(frame0.but.3, frame0.grp.4)
+ tkraise(frame0.but.4, frame0.grp.5)
tkpack(frame0, fill="x", side="bottom", anchor="e")
View
9 R/Format.R
@@ -290,9 +290,14 @@ Format <- function(sample=pi, fmt=NULL, parent=NULL) {
frame0.but.2 <- ttkbutton(frame0, width=12, text="OK", command=SaveFormat)
frame0.but.3 <- ttkbutton(frame0, width=12, text="Cancel",
command=function() tclvalue(tt.done.var) <- 1)
- tkgrid(frame0.but.2, frame0.but.3, sticky="se", pady=c(10, 10))
+ frame0.but.4 <- ttkbutton(frame0, width=12, text="Help",
+ command=function() {
+ print(help("Format", package="RSurvey"))
+ })
+ tkgrid("x", frame0.but.2, frame0.but.3, frame0.but.4,
+ sticky="se", pady=10, padx=c(4, 0))
tkgrid.columnconfigure(frame0, 0, weight=1)
- tkgrid.configure(frame0.but.3, padx=c(4, 10))
+ tkgrid.configure(frame0.but.4, padx=c(4, 10))
tkpack(frame0, fill="x", side="bottom", anchor="e")
# Frame 1
View
19 R/FormatDateTime.R
@@ -131,19 +131,24 @@ FormatDateTime <- function(sample=as.POSIXct("1991-08-25 20:57:08"),
frame0.but.3 <- ttkbutton(frame0, width=12, text="OK", command=SaveFormat)
frame0.but.4 <- ttkbutton(frame0, width=12, text="Cancel",
command=function() tclvalue(tt.done.var) <- 1)
+ frame0.but.5 <- ttkbutton(frame0, width=12, text="Help",
+ command=function() {
+ print(help("FormatDateTime", package="RSurvey"))
+ })
+ frame0.grp.6 <- ttksizegrip(frame0)
- frame0.grp.5 <- ttksizegrip(frame0)
-
- tkgrid(frame0.but.1, "x", frame0.but.3, frame0.but.4, frame0.grp.5)
+ tkgrid(frame0.but.1, "x", frame0.but.3, frame0.but.4, frame0.but.5,
+ frame0.grp.6)
tkgrid.columnconfigure(frame0, 1, weight=1)
tkgrid.configure(frame0.but.1, padx=c(10, 0), pady=4, sticky="n")
- tkgrid.configure(frame0.but.3, frame0.but.4, padx=c(0, 4), pady=c(15, 10))
- tkgrid.configure(frame0.but.4, columnspan=2, padx=c(0, 10))
- tkgrid.configure(frame0.grp.5, sticky="se")
+ tkgrid.configure(frame0.but.3, frame0.but.4, frame0.but.5,
+ padx=c(0, 4), pady=c(15, 10))
+ tkgrid.configure(frame0.but.5, columnspan=2, padx=c(0, 10))
+ tkgrid.configure(frame0.grp.6, sticky="se")
- tkraise(frame0.but.4, frame0.grp.5)
+ tkraise(frame0.but.5, frame0.grp.6)
tkpack(frame0, fill="x", side="bottom", anchor="e")
View
21 R/ImportData.R
@@ -352,22 +352,27 @@ ImportData <- function(parent=NULL) {
command=function() ReadFile(FALSE))
frame0.but.5 <- ttkbutton(frame0, width=12, text="Cancel",
command=function() tclvalue(tt.done.var) <- 1)
+ frame0.but.6 <- ttkbutton(frame0, width=12, text="Help",
+ command=function() {
+ print(help("ImportData", package="RSurvey"))
+ })
+ frame0.grp.7 <- ttksizegrip(frame0)
- frame0.grp.6 <- ttksizegrip(frame0)
-
- tkgrid(frame0.but.1, frame0.but.2, "x", frame0.but.4, frame0.but.5,
- frame0.grp.6)
+ tkgrid(frame0.but.1, frame0.but.2, "x", frame0.but.4, frame0.but.5,
+ frame0.but.6, frame0.grp.7)
tkgrid.columnconfigure(frame0, 2, weight=1)
tkgrid.configure(frame0.but.1, frame0.but.2,
sticky="n", padx=c(0, 4), pady=c(4, 0))
tkgrid.configure(frame0.but.1, padx=c(10, 4))
- tkgrid.configure(frame0.but.4, frame0.but.5, padx=c(0, 4), pady=c(15, 10))
- tkgrid.configure(frame0.but.5, columnspan=2, padx=c(0, 10))
- tkgrid.configure(frame0.grp.6, sticky="se")
+
+ tkgrid.configure(frame0.but.4, frame0.but.5, frame0.but.6, padx=c(0, 4), pady=c(15, 10))
+ tkgrid.configure(frame0.but.6, columnspan=2, padx=c(0, 10))
+
+ tkgrid.configure(frame0.grp.7, sticky="se")
- tkraise(frame0.but.5, frame0.grp.6)
+ tkraise(frame0.but.6, frame0.grp.7)
tkpack(frame0, fill="x", side="bottom", anchor="e")
View
26 R/ManageData.R
@@ -501,16 +501,20 @@ ManageData <- function(cols, vars, parent=NULL) {
frame0.but.8 <- ttkbutton(frame0, width=12, text="OK",
command=function() SaveChanges("ok"))
- frame0.but.9 <- ttkbutton(frame0, width=12, text="Apply",
- command=function() SaveChanges("apply"))
- frame0.but.10 <- ttkbutton(frame0, width=12, text="Cancel",
- command=function() tclvalue(tt.done.var) <- 1)
-
- frame0.grp.11 <- ttksizegrip(frame0)
+ frame0.but.9 <- ttkbutton(frame0, width=12, text="Cancel",
+ command=function() tclvalue(tt.done.var) <- 1)
+ frame0.but.10 <- ttkbutton(frame0, width=12, text="Apply",
+ command=function() SaveChanges("apply"))
+ frame0.but.11 <- ttkbutton(frame0, width=12, text="Help",
+ command=function() {
+ print(help("ManageData", package="RSurvey",
+ verbose=FALSE))
+ })
+ frame0.grp.12 <- ttksizegrip(frame0)
tkgrid(frame0.but.1, frame0.but.2, frame0.but.3, frame0.but.4,
frame0.but.5, frame0.but.6, "x", frame0.but.8, frame0.but.9,
- frame0.but.10, frame0.grp.11)
+ frame0.but.10, frame0.but.11, frame0.grp.12)
tkgrid.columnconfigure(frame0, 6, weight=1)
@@ -519,12 +523,12 @@ ManageData <- function(cols, vars, parent=NULL) {
padx=c(0, 2), pady=c(0, 0))
tkgrid.configure(frame0.but.1, padx=c(10, 2))
tkgrid.configure(frame0.but.4, padx=c(0, 15))
- tkgrid.configure(frame0.but.8, frame0.but.9, frame0.but.10,
+ tkgrid.configure(frame0.but.8, frame0.but.9, frame0.but.10, frame0.but.11,
padx=c(0, 4), pady=c(15, 10))
- tkgrid.configure(frame0.but.10, columnspan=2, padx=c(0, 10))
- tkgrid.configure(frame0.grp.11, sticky="se")
+ tkgrid.configure(frame0.but.11, columnspan=2, padx=c(0, 10))
+ tkgrid.configure(frame0.grp.12, sticky="se")
- tkraise(frame0.but.10, frame0.grp.11)
+ tkraise(frame0.but.11, frame0.grp.12)
tkpack(frame0, fill="x", side="bottom", anchor="e")
View
55 R/ManagePolygons.R
@@ -469,42 +469,43 @@ ManagePolygons <- function(polys=NULL, encoding=getOption("encoding"),
frame0 <- ttkframe(tt, relief="flat")
- frame0.but.1 <- ttkbutton(frame0, width=2, image=GetBitmapImage("up"),
- command=function() ArrangePolygon("backward"))
- frame0.but.2 <- ttkbutton(frame0, width=2, image=GetBitmapImage("top"),
- command=function() ArrangePolygon("back"))
- frame0.but.3 <- ttkbutton(frame0, width=2, image=GetBitmapImage("bottom"),
- command=function() ArrangePolygon("front"))
- frame0.but.4 <- ttkbutton(frame0, width=2, image=GetBitmapImage("down"),
- command=function() ArrangePolygon("forward"))
- frame0.but.5 <- ttkbutton(frame0, width=2, image=GetBitmapImage("delete"),
- command=ClearPolygon)
-
- frame0.but.7 <- ttkbutton(frame0, width=12, text="OK",
- command=function() SavePolygon("ok"))
- frame0.but.8 <- ttkbutton(frame0, width=12, text="Apply",
- command=function() SavePolygon("apply"))
- frame0.but.9 <- ttkbutton(frame0, width=12, text="Cancel",
- command=function() tclvalue(tt.done.var) <- 1L)
-
- frame0.grp.10 <- ttksizegrip(frame0)
+ frame0.but.1 <- ttkbutton(frame0, width=2, image=GetBitmapImage("up"),
+ command=function() ArrangePolygon("backward"))
+ frame0.but.2 <- ttkbutton(frame0, width=2, image=GetBitmapImage("top"),
+ command=function() ArrangePolygon("back"))
+ frame0.but.3 <- ttkbutton(frame0, width=2, image=GetBitmapImage("bottom"),
+ command=function() ArrangePolygon("front"))
+ frame0.but.4 <- ttkbutton(frame0, width=2, image=GetBitmapImage("down"),
+ command=function() ArrangePolygon("forward"))
+ frame0.but.5 <- ttkbutton(frame0, width=2, image=GetBitmapImage("delete"),
+ command=ClearPolygon)
+ frame0.but.7 <- ttkbutton(frame0, width=12, text="OK",
+ command=function() SavePolygon("ok"))
+ frame0.but.8 <- ttkbutton(frame0, width=12, text="Cancel",
+ command=function() tclvalue(tt.done.var) <- 1L)
+ frame0.but.9 <- ttkbutton(frame0, width=12, text="Apply",
+ command=function() SavePolygon("apply"))
+ frame0.but.10 <- ttkbutton(frame0, width=12, text="Help",
+ command=function() {
+ print(help("ManagePolygons", package="RSurvey"))
+ })
+ frame0.grp.11 <- ttksizegrip(frame0)
tkgrid(frame0.but.1, frame0.but.2, frame0.but.3, frame0.but.4, frame0.but.5,
- "x", frame0.but.7, frame0.but.8, frame0.but.9, frame0.grp.10)
-
+ "x", frame0.but.7, frame0.but.8, frame0.but.9, frame0.but.10,
+ frame0.grp.11)
tkgrid.columnconfigure(frame0, 5, weight=1)
-
tkgrid.configure(frame0.but.1, frame0.but.2, frame0.but.3, frame0.but.4,
frame0.but.5, sticky="n", padx=c(0, 2), pady=c(4, 0))
tkgrid.configure(frame0.but.1, padx=c(10, 2))
tkgrid.configure(frame0.but.5, padx=c(15, 0))
- tkgrid.configure(frame0.but.7, frame0.but.8, frame0.but.9,
- padx=c(0, 4), pady=c(15, 10))
- tkgrid.configure(frame0.but.9, columnspan=2, padx=c(0, 10))
- tkgrid.configure(frame0.grp.10, sticky="se")
+ tkgrid.configure(frame0.but.7, frame0.but.8, frame0.but.9, frame0.but.10,
+ padx=c(4, 0), pady=c(15, 10))
+ tkgrid.configure(frame0.but.10, columnspan=2, padx=c(4, 10))
+ tkgrid.configure(frame0.grp.11, sticky="se")
- tkraise(frame0.but.9, frame0.grp.10)
+ tkraise(frame0.but.10, frame0.grp.11)
tkpack(frame0, fill="x", side="bottom", anchor="e")
View
43 R/OpenRSurvey.R
@@ -360,7 +360,7 @@ OpenRSurvey <- function() {
# Autocrop polygon
- CallAutocropPolygon <- function() {
+ CallAutocropRegion <- function() {
if (is.null(Data("data.raw")))
return()
CallProcessData()
@@ -378,9 +378,9 @@ OpenRSurvey <- function() {
cex.pts <- Data("cex.pts")
rkey <- Data("rkey")
- ply.new <- AutocropPolygon(d, tt, xlab=xlab, ylab=ylab, zlab=zlab,
- asp=asp, csi=csi, width=width, nlevels=nlevels,
- cex.pts=cex.pts, rkey=rkey)
+ ply.new <- AutocropRegion(d, tt, xlab=xlab, ylab=ylab, zlab=zlab,
+ asp=asp, csi=csi, width=width, nlevels=nlevels,
+ cex.pts=cex.pts, rkey=rkey)
if (inherits(ply.new, "gpc.poly")) {
ply <- list()
@@ -599,23 +599,6 @@ OpenRSurvey <- function() {
tkfocus(tt)
}
- # Open HTML help for R functions
-
- OpenHTMLHelp <- function() {
- if (!("RSurvey" %in% .packages(all.available=TRUE)))
- stop("requires installed RSurvey package", call.=FALSE)
- if (tools:::httpdPort == 0L)
- tools::startDynamicHelp()
- if (tools:::httpdPort > 0L) {
- url <- paste("http://127.0.0.1:", tools:::httpdPort,
- "/library/RSurvey/html/00Index.html", sep="")
- browseURL(url, browser=getOption("browser"))
- } else {
- stop("requires the HTTP server to be running", call.=FALSE)
- }
- invisible()
- }
-
# Set the height of (default-sized) characters in inches.
SetCsi <- function() {
@@ -764,11 +747,9 @@ OpenRSurvey <- function() {
# Main program
# Load required R packages
-
LoadPackages()
# Warn if using Windows OS and running in MDI mode
-
if (.Platform$OS.type == "windows" && getIdentification() == "RGui")
message("\n\n You are running R in MDI mode which *may* interfere\n",
" with the functionality of the graphical user interface.\n",
@@ -776,13 +757,11 @@ OpenRSurvey <- function() {
" set in the command line or by clicking in the Menu:\n",
" Edit - GUI Preferences: SDI, then Save and restart R.\n\n")
- # Establish working directory
-
+ # Establish default directories
if ("package:RSurvey" %in% search())
path <- system.file("RSurvey-ex", package="RSurvey")
else
path <- getwd()
-
if (is.null(Data("default.dir")))
Data("default.dir", path)
@@ -792,17 +771,15 @@ OpenRSurvey <- function() {
image.path <- file.path(path, "inst", "images")
# Set options
-
SetCsi()
options(digits.secs=3)
+ options(help_type="html")
shown.construct.polygon.msgbox <- TRUE
# Assign variables linked to Tk entry widgets
-
tt.done.var <- tclVar(0)
# Package version number
-
f <- "DESCRIPTION"
if ("package:RSurvey" %in% search())
f <- system.file("DESCRIPTION", package="RSurvey")
@@ -810,7 +787,6 @@ OpenRSurvey <- function() {
Data("ver", paste("RSurvey", ver))
# Open GUI
-
tclServiceMode(FALSE)
tt <- tktoplevel()
tkwm.geometry(tt, Data("win.loc"))
@@ -818,7 +794,6 @@ OpenRSurvey <- function() {
tkwm.resizable(tt, 1, 0)
# Top menu
-
top.menu <- tkmenu(tt, tearoff=0)
# File menu
@@ -938,7 +913,7 @@ OpenRSurvey <- function() {
})
tkadd(menu.poly, "cascade", label="Build", menu=menu.poly.con)
tkadd(menu.poly, "command", label="Autocrop region",
- command=CallAutocropPolygon)
+ command=CallAutocropRegion)
# Graph menu
@@ -1003,7 +978,9 @@ OpenRSurvey <- function() {
menu.help <- tkmenu(tt, tearoff=0)
tkadd(top.menu, "cascade", label="Help", menu=menu.help, underline=0)
tkadd(menu.help, "command", label="R functions (html)",
- command=OpenHTMLHelp)
+ command=function() {
+ help(package="RSurvey")
+ })
tkadd(menu.help, "separator")
tkadd(menu.help, "command", label="About",
command=AboutPackage)
View
58 R/Rename.R
@@ -57,45 +57,51 @@ Rename <- function(names=NULL, cur.name=NULL, win.title=NULL, parent=NULL) {
frame0 <- ttkframe(tt, relief="flat")
- frame0.lab.1 <- ttklabel(frame0, text="Old name")
- frame0.lab.2 <- ttklabel(frame0, text="New name")
+ frame0.but.2 <- ttkbutton(frame0, width=12, text="OK",
+ command=SaveNames)
+ frame0.but.3 <- ttkbutton(frame0, width=12, text="Cancel",
+ command=function() tclvalue(tt.done.var) <- 1)
+ frame0.but.4 <- ttkbutton(frame0, width=12, text="Help",
+ command=function() {
+ print(help("Rename", package="RSurvey"))
+ })
+
+ tkgrid("x", frame0.but.2, frame0.but.3, frame0.but.4,
+ sticky="se", pady=c(15, 10), padx=c(4, 0))
+ tkgrid.columnconfigure(frame0, 0, weight=1)
+ tkgrid.configure(frame0.but.2, padx=c(40, 0))
+ tkgrid.configure(frame0.but.4, padx=c(4, 10))
+ tkpack(frame0, fill="x", side="bottom", anchor="e")
+
+ # Frame 1
+
+ frame1 <- ttkframe(tt, relief="flat")
+
+ frame1.lab.1 <- ttklabel(frame1, text="Old name")
+ frame1.lab.2 <- ttklabel(frame1, text="New name")
if (length(names) == 1)
prep.names <- paste("{", names, "}", sep="")
else
prep.names <- names
- frame0.box.1 <- ttkcombobox(frame0, state="readonly", values=prep.names,
+ frame1.box.1 <- ttkcombobox(frame1, state="readonly", values=prep.names,
textvariable=old.var)
- frame0.ent.1 <- ttkentry(frame0, textvariable=new.var)
+ frame1.ent.1 <- ttkentry(frame1, textvariable=new.var)
if (!is.null(cur.name) && cur.name %in% names)
- tcl(frame0.box.1, "current", match(cur.name, names) - 1)
-
- tkgrid(frame0.lab.1, frame0.box.1, pady=0)
- tkgrid(frame0.lab.2, frame0.ent.1, pady=c(4, 0))
+ tcl(frame1.box.1, "current", match(cur.name, names) - 1)
- tkgrid.configure(frame0.lab.1, frame0.lab.2, sticky="w", padx=c(0, 2))
- tkgrid.configure(frame0.box.1, frame0.ent.1, sticky="we")
+ tkgrid(frame1.lab.1, frame1.box.1, pady=0)
+ tkgrid(frame1.lab.2, frame1.ent.1, pady=c(4, 0))
- tkgrid.columnconfigure(frame0, 1, weight=1, minsize=25)
-
- tkpack(frame0, fill="x", expand=TRUE, padx=10, pady=c(10, 0))
-
- # Frame 1
-
- frame1 <- ttkframe(tt, relief="flat")
-
- frame1.but.1 <- ttkbutton(frame1, width=12, text="OK",
- command=SaveNames)
- frame1.but.2 <- ttkbutton(frame1, width=12, text="Cancel",
- command=function() tclvalue(tt.done.var) <- 1)
+ tkgrid.configure(frame1.lab.1, frame1.lab.2, sticky="w", padx=c(0, 2))
+ tkgrid.configure(frame1.box.1, frame1.ent.1, sticky="we")
- tkgrid(frame1.but.1, frame1.but.2, pady=c(15, 10))
- tkgrid.configure(frame1.but.2, padx=c(4, 10))
+ tkgrid.columnconfigure(frame1, 1, weight=1, minsize=25)
- tkpack(frame1, anchor="e")
+ tkpack(frame1, fill="x", expand=TRUE, padx=10, pady=c(10, 0))
# Bind events
@@ -103,7 +109,7 @@ Rename <- function(names=NULL, cur.name=NULL, win.title=NULL, parent=NULL) {
tkbind(tt, "<Destroy>", function() tclvalue(tt.done.var) <- 1)
- tkbind(frame0.box.1, "<<ComboboxSelected>>", UpdateEntry)
+ tkbind(frame1.box.1, "<<ComboboxSelected>>", UpdateEntry)
# GUI control
View
159 R/SetAxesLimits.R
@@ -94,7 +94,7 @@ SetAxesLimits <- function(lim=NULL, parent=NULL) {
# Open GUI
tclServiceMode(FALSE)
- tt <- tktoplevel(padx=5, pady=5)
+ tt <- tktoplevel()
if (!is.null(parent)) {
tkwm.transient(tt, parent)
@@ -105,155 +105,160 @@ SetAxesLimits <- function(lim=NULL, parent=NULL) {
tktitle(tt) <- "Axes Limits"
tkwm.resizable(tt, 1, 0)
+ # Frame 0 contains ok and cancel buttons
+
+ frame0 <- tkframe(tt, relief="flat")
+ frame0.but.2 <- ttkbutton(frame0, width=12, text="OK",
+ command=UpdateLimits)
+ frame0.but.3 <- ttkbutton(frame0, width=12, text="Cancel",
+ command=function() tclvalue(tt.done.var) <- 1)
+ frame0.but.4 <- ttkbutton(frame0, width=12, text="Help",
+ command=function() {
+ print(help("SetAxesLimits", package="RSurvey"))
+ })
+ tkgrid("x", frame0.but.2, frame0.but.3, frame0.but.4,
+ sticky="se", pady=10, padx=c(4, 0))
+ tkgrid.columnconfigure(frame0, 0, weight=1)
+ tkgrid.configure(frame0.but.4, padx=c(4, 10))
+ tkpack(frame0, fill="x", side="bottom", anchor="e")
+
# Notebook with tabs
nb <- ttknotebook(tt)
- # Frame 0 contains x-axis limits
+ # Frame 1 contains x-axis limits
- frame0 <- ttkframe(nb, relief="flat", padding=10, borderwidth=2)
- tkadd(nb, frame0, text=" x ")
+ frame1 <- ttkframe(nb, relief="flat", padding=10, borderwidth=2)
+ tkadd(nb, frame1, text=" x ")
- frame0.lab.1.1 <- ttklabel(frame0, text="Minimum")
- frame0.lab.2.1 <- ttklabel(frame0, text="Maximum")
+ frame1.lab.1.1 <- ttklabel(frame1, text="Minimum")
+ frame1.lab.2.1 <- ttklabel(frame1, text="Maximum")
- frame0.ent.1.2 <- ttkentry(frame0, textvariable=x1.var,
+ frame1.ent.1.2 <- ttkentry(frame1, textvariable=x1.var,
state=tclvalue(x1.sta.var))
- frame0.ent.2.2 <- ttkentry(frame0, textvariable=x2.var,
+ frame1.ent.2.2 <- ttkentry(frame1, textvariable=x2.var,
state=tclvalue(x2.sta.var))
- frame0.chk.1.3 <- ttkcheckbutton(frame0, variable=x1.chk.var, text="Auto",
+ frame1.chk.1.3 <- ttkcheckbutton(frame1, variable=x1.chk.var, text="Auto",
command=function() {
if (as.integer(tclvalue(x1.chk.var))) {
tclvalue(x1.sta.var) <- "disabled"
} else {
tclvalue(x1.sta.var) <- "normal"
}
- tkconfigure(frame0.ent.1.2, state=tclvalue(x1.sta.var))
- tkfocus(frame0.ent.1.2)
+ tkconfigure(frame1.ent.1.2, state=tclvalue(x1.sta.var))
+ tkfocus(frame1.ent.1.2)
})
- frame0.chk.2.3 <- ttkcheckbutton(frame0, variable=x2.chk.var, text="Auto",
+ frame1.chk.2.3 <- ttkcheckbutton(frame1, variable=x2.chk.var, text="Auto",
command=function() {
if (as.integer(tclvalue(x2.chk.var))) {
tclvalue(x2.sta.var) <- "disabled"
} else {
tclvalue(x2.sta.var) <- "normal"
}
- tkconfigure(frame0.ent.2.2, state=tclvalue(x2.sta.var))
- tkfocus(frame0.ent.2.2)
+ tkconfigure(frame1.ent.2.2, state=tclvalue(x2.sta.var))
+ tkfocus(frame1.ent.2.2)
})
- tkgrid(frame0.lab.1.1, frame0.ent.1.2, frame0.chk.1.3, padx=1, pady=2)
- tkgrid(frame0.lab.2.1, frame0.ent.2.2, frame0.chk.2.3, padx=1, pady=2)
+ tkgrid(frame1.lab.1.1, frame1.ent.1.2, frame1.chk.1.3, padx=1, pady=2)
+ tkgrid(frame1.lab.2.1, frame1.ent.2.2, frame1.chk.2.3, padx=1, pady=2)
- tkgrid.configure(frame0.lab.1.1, frame0.lab.2.1, sticky="e")
+ tkgrid.configure(frame1.lab.1.1, frame1.lab.2.1, sticky="e")
- tkgrid.configure(frame0.ent.1.2, frame0.ent.2.2, sticky="we")
+ tkgrid.configure(frame1.ent.1.2, frame1.ent.2.2, sticky="we")
- tkgrid.columnconfigure(frame0, 1, weight=1, minsize=25)
+ tkgrid.columnconfigure(frame1, 1, weight=1, minsize=25)
- tcl("grid", "anchor", frame0, "center")
+ tcl("grid", "anchor", frame1, "center")
- # Frame 1 contains y-axis limits
+ # Frame 2 contains y-axis limits
- frame1 <- ttkframe(nb, relief="flat", padding=10, borderwidth=2)
- tkadd(nb, frame1, text=" y ")
+ frame2 <- ttkframe(nb, relief="flat", padding=10, borderwidth=2)
+ tkadd(nb, frame2, text=" y ")
- frame1.lab.1.1 <- ttklabel(frame1, text="Minimum")
- frame1.lab.2.1 <- ttklabel(frame1, text="Maximum")
+ frame2.lab.1.1 <- ttklabel(frame2, text="Minimum")
+ frame2.lab.2.1 <- ttklabel(frame2, text="Maximum")
- frame1.ent.1.2 <- ttkentry(frame1, textvariable=y1.var,
+ frame2.ent.1.2 <- ttkentry(frame2, textvariable=y1.var,
state=tclvalue(y1.sta.var))
- frame1.ent.2.2 <- ttkentry(frame1, textvariable=y2.var,
+ frame2.ent.2.2 <- ttkentry(frame2, textvariable=y2.var,
state=tclvalue(y2.sta.var))
- frame1.chk.1.3 <- ttkcheckbutton(frame1, variable=y1.chk.var, text="Auto",
+ frame2.chk.1.3 <- ttkcheckbutton(frame2, variable=y1.chk.var, text="Auto",
command=function() {
if (as.integer(tclvalue(y1.chk.var))) {
tclvalue(y1.sta.var) <- "disabled"
} else {
tclvalue(y1.sta.var) <- "normal"
}
- tkconfigure(frame1.ent.1.2, state=tclvalue(y1.sta.var))
- tkfocus(frame1.ent.1.2)
+ tkconfigure(frame2.ent.1.2, state=tclvalue(y1.sta.var))
+ tkfocus(frame2.ent.1.2)
})
- frame1.chk.2.3 <- ttkcheckbutton(frame1, variable=y2.chk.var, text="Auto",
+ frame2.chk.2.3 <- ttkcheckbutton(frame2, variable=y2.chk.var, text="Auto",
command=function() {
if (as.integer(tclvalue(y2.chk.var)))
tclvalue(y2.sta.var) <- "disabled"
else
tclvalue(y2.sta.var) <- "normal"
- tkconfigure(frame1.ent.2.2, state=tclvalue(y2.sta.var))
- tkfocus(frame1.ent.2.2)
+ tkconfigure(frame2.ent.2.2, state=tclvalue(y2.sta.var))
+ tkfocus(frame2.ent.2.2)
})
- tkgrid(frame1.lab.1.1, frame1.ent.1.2, frame1.chk.1.3, padx=1, pady=2)
- tkgrid(frame1.lab.2.1, frame1.ent.2.2, frame1.chk.2.3, padx=1, pady=2)
+ tkgrid(frame2.lab.1.1, frame2.ent.1.2, frame2.chk.1.3, padx=1, pady=2)
+ tkgrid(frame2.lab.2.1, frame2.ent.2.2, frame2.chk.2.3, padx=1, pady=2)
- tkgrid.configure(frame1.lab.1.1, frame1.lab.2.1, sticky="e")
- tkgrid.configure(frame1.ent.1.2, frame1.ent.2.2, sticky="we")
+ tkgrid.configure(frame2.lab.1.1, frame2.lab.2.1, sticky="e")
+ tkgrid.configure(frame2.ent.1.2, frame2.ent.2.2, sticky="we")
- tkgrid.columnconfigure(frame1, 1, weight=1, minsize=25)
+ tkgrid.columnconfigure(frame2, 1, weight=1, minsize=25)
- tcl("grid", "anchor", frame1, "center")
+ tcl("grid", "anchor", frame2, "center")
- # Frame 2 contains z-axis limits
+ # Frame 3 contains z-axis limits
- frame2 <- ttkframe(nb, relief="flat", padding=10, borderwidth=2)
- tkadd(nb, frame2, text=" z ")
+ frame3 <- ttkframe(nb, relief="flat", padding=10, borderwidth=2)
+ tkadd(nb, frame3, text=" z ")
- frame2.lab.1.1 <- ttklabel(frame2, text="Minimum")
- frame2.lab.2.1 <- ttklabel(frame2, text="Maximum")
+ frame3.lab.1.1 <- ttklabel(frame3, text="Minimum")
+ frame3.lab.2.1 <- ttklabel(frame3, text="Maximum")
- frame2.ent.1.2 <- ttkentry(frame2, textvariable=z1.var,
+ frame3.ent.1.2 <- ttkentry(frame3, textvariable=z1.var,
state=tclvalue(z1.sta.var))
- frame2.ent.2.2 <- ttkentry(frame2, textvariable=z2.var,
+ frame3.ent.2.2 <- ttkentry(frame3, textvariable=z2.var,
state=tclvalue(z2.sta.var))
- frame2.chk.1.3 <- ttkcheckbutton(frame2, variable=z1.chk.var, text="Auto",
+ frame3.chk.1.3 <- ttkcheckbutton(frame3, variable=z1.chk.var, text="Auto",
command=function() {
if (as.integer(tclvalue(z1.chk.var)))
tclvalue(z1.sta.var) <- "disabled"
else
tclvalue(z1.sta.var) <- "normal"
- tkconfigure(frame2.ent.1.2, state=tclvalue(z1.sta.var))
- tkfocus(frame2.ent.1.2)
+ tkconfigure(frame3.ent.1.2, state=tclvalue(z1.sta.var))
+ tkfocus(frame3.ent.1.2)
})
- frame2.chk.2.3 <- ttkcheckbutton(frame2, variable=z2.chk.var, text="Auto",
+ frame3.chk.2.3 <- ttkcheckbutton(frame3, variable=z2.chk.var, text="Auto",
command=function() {
if (as.integer(tclvalue(z2.chk.var)))
tclvalue(z2.sta.var) <- "disabled"
else
tclvalue(z2.sta.var) <- "normal"
- tkconfigure(frame2.ent.2.2, state=tclvalue(z2.sta.var))
- tkfocus(frame2.ent.2.2)
+ tkconfigure(frame3.ent.2.2, state=tclvalue(z2.sta.var))
+ tkfocus(frame3.ent.2.2)
})
- tkgrid(frame2.lab.1.1, frame2.ent.1.2, frame2.chk.1.3, padx=1, pady=2)
- tkgrid(frame2.lab.2.1, frame2.ent.2.2, frame2.chk.2.3, padx=1, pady=2)
+ tkgrid(frame3.lab.1.1, frame3.ent.1.2, frame3.chk.1.3, padx=1, pady=2)
+ tkgrid(frame3.lab.2.1, frame3.ent.2.2, frame3.chk.2.3, padx=1, pady=2)
- tkgrid.configure(frame2.lab.1.1, frame2.lab.2.1, sticky="w")
- tkgrid.configure(frame2.ent.1.2, frame2.ent.2.2, sticky="we")
+ tkgrid.configure(frame3.lab.1.1, frame3.lab.2.1, sticky="w")
+ tkgrid.configure(frame3.ent.1.2, frame3.ent.2.2, sticky="we")
- tkgrid.columnconfigure(frame2, 1, weight=1, minsize=25)
+ tkgrid.columnconfigure(frame3, 1, weight=1, minsize=25)
- tcl("grid", "anchor", frame2, "center")
+ tcl("grid", "anchor", frame3, "center")
# Insert notebook
- tkpack(nb, fill="x", expand=TRUE, padx=5, pady=c(5, 0))
-
- # Frame 4 contains ok and cancel buttons
-
- frame4 <- tkframe(tt, relief="flat", padx=0, pady=0)
-
- frame4.but.1 <- ttkbutton(frame4, width=12, text="OK",
- command=UpdateLimits)
- frame4.but.2 <- ttkbutton(frame4, width=12, text="Cancel",
- command=function() tclvalue(tt.done.var) <- 1)
-
- tkgrid(frame4.but.1, frame4.but.2, padx=2, pady=c(10, 5))
- tkpack(frame4, anchor="e", padx=5)
+ tkpack(nb, fill="x", expand=TRUE, padx=10, pady=10)
# Bind events
@@ -261,29 +266,29 @@ SetAxesLimits <- function(lim=NULL, parent=NULL) {
tkbind(tt, "<Destroy>", function() tclvalue(tt.done.var) <- 1)
- tkbind(frame0.ent.1.2, "<KeyRelease>",
+ tkbind(frame1.ent.1.2, "<KeyRelease>",
function() {
tclvalue(x1.var) <- CheckEntry("numeric", tclvalue(x1.var))
})
- tkbind(frame0.ent.2.2, "<KeyRelease>",
+ tkbind(frame1.ent.2.2, "<KeyRelease>",
function() {
tclvalue(x2.var) <- CheckEntry("numeric", tclvalue(x2.var))
})
- tkbind(frame1.ent.1.2, "<KeyRelease>",
+ tkbind(frame2.ent.1.2, "<KeyRelease>",
function() {
tclvalue(y1.var) <- CheckEntry("numeric", tclvalue(y1.var))
})
- tkbind(frame1.ent.2.2, "<KeyRelease>",
+ tkbind(frame2.ent.2.2, "<KeyRelease>",
function() {
tclvalue(y2.var) <- CheckEntry("numeric", tclvalue(y2.var))
})
- tkbind(frame2.ent.1.2, "<KeyRelease>",
+ tkbind(frame3.ent.1.2, "<KeyRelease>",
function() {
tclvalue(z1.var) <- CheckEntry("numeric", tclvalue(z1.var))
})
- tkbind(frame2.ent.2.2, "<KeyRelease>",
+ tkbind(frame3.ent.2.2, "<KeyRelease>",
function() {
tclvalue(z2.var) <- CheckEntry("numeric", tclvalue(z2.var))
})
View
22 R/SetConfiguration.R
@@ -121,18 +121,18 @@ SetConfiguration <- function(parent=NULL) {
# Frame 0 contains ok and cancel buttons
frame0 <- ttkframe(tt, relief="flat")
-
- frame0.but.1 <- ttkbutton(frame0, width=12, text="OK",
- command=UpdatePar)
- frame0.but.2 <- ttkbutton(frame0, width=12, text="Cancel",
+ frame0.but.2 <- ttkbutton(frame0, width=12, text="OK", command=UpdatePar)
+ frame0.but.3 <- ttkbutton(frame0, width=12, text="Cancel",
command=function() tclvalue(tt.done.var) <- 1)
-
- tkgrid(frame0.but.1, frame0.but.2, pady=c(5, 10))
-
- tkgrid.configure(frame0.but.1, sticky="e", padx=c(0, 4))
- tkgrid.configure(frame0.but.2, sticky="w", padx=c(0, 10), rowspan=2)
-
- tkpack(frame0, side="bottom", anchor="e")
+ frame0.but.4 <- ttkbutton(frame0, width=12, text="Help",
+ command=function() {
+ print(help("SetConfiguration", package="RSurvey"))
+ })
+ tkgrid("x", frame0.but.2, frame0.but.3, frame0.but.4,
+ sticky="se", pady=10, padx=c(4, 0))
+ tkgrid.columnconfigure(frame0, 0, weight=1)
+ tkgrid.configure(frame0.but.4, padx=c(4, 10))
+ tkpack(frame0, fill="x", side="bottom", anchor="e")
# Paned window
View
24 R/SetPolygonLimits.R
@@ -56,17 +56,19 @@ SetPolygonLimits <- function(poly.names=NULL, data.poly=NULL, crop.poly=NULL,
frame0 <- tkframe(tt, relief="flat")
- frame0.but.1 <- ttkbutton(frame0, width=12, text="OK",
+ frame0.but.2 <- ttkbutton(frame0, width=12, text="OK",
command=SaveNames)
- frame0.but.2 <- ttkbutton(frame0, width=12, text="Cancel",
+ frame0.but.3 <- ttkbutton(frame0, width=12, text="Cancel",
command=function() tclvalue(tt.done.var) <- 1)
-
- tkgrid(frame0.but.1, frame0.but.2, pady=c(15, 10))
-
- tkgrid.configure(frame0.but.1, sticky="e", padx=c(0, 4))
- tkgrid.configure(frame0.but.2, sticky="w", padx=c(0, 10), rowspan=2)
-
- tkpack(frame0, side="bottom", anchor="e")
+ frame0.but.4 <- ttkbutton(frame0, width=12, text="Help",
+ command=function() {
+ print(help("SetPolygonLimits", package="RSurvey"))
+ })
+ tkgrid("x", frame0.but.2, frame0.but.3, frame0.but.4,
+ sticky="se", pady=10, padx=c(4, 0))
+ tkgrid.columnconfigure(frame0, 0, weight=1)
+ tkgrid.configure(frame0.but.4, padx=c(4, 10))
+ tkpack(frame0, fill="x", side="bottom", anchor="e")
# Frame 1
@@ -90,8 +92,8 @@ SetPolygonLimits <- function(poly.names=NULL, data.poly=NULL, crop.poly=NULL,
if (!is.null(crop.poly))
tcl(frame1.box.2.2, "current", match(crop.poly, poly.names) - 1)
- tkgrid(frame1.lab.1.1, frame1.box.1.2, pady=c(10, 4))
- tkgrid(frame1.lab.2.1, frame1.box.2.2)
+ tkgrid(frame1.lab.1.1, frame1.box.1.2, pady=c(20, 4))
+ tkgrid(frame1.lab.2.1, frame1.box.2.2, pady=c(0, 10))
tkgrid.configure(frame1.lab.1.1, frame1.lab.2.1, sticky="w")
tkgrid.configure(frame1.box.1.2, frame1.box.2.2, sticky="we")
View
21 R/SetPreferences.R
@@ -78,17 +78,20 @@ SetPreferences <- function(parent=NULL) {
frame0 <- tkframe(tt, relief="flat")
- frame0.but.1 <- ttkbutton(frame0, width=12, text="OK",
+ frame0.but.2 <- ttkbutton(frame0, width=12, text="OK",
command=UpdatePar)
- frame0.but.2 <- ttkbutton(frame0, width=12, text="Cancel",
+ frame0.but.3 <- ttkbutton(frame0, width=12, text="Cancel",
command=function() tclvalue(tt.done.var) <- 1)
-
- tkgrid(frame0.but.1, frame0.but.2, pady=c(15, 10))
-
- tkgrid.configure(frame0.but.1, sticky="e", padx=c(0, 4))
- tkgrid.configure(frame0.but.2, sticky="w", padx=c(0, 10), rowspan=2)
-
- tkpack(frame0, side="bottom", anchor="e")
+
+ frame0.but.4 <- ttkbutton(frame0, width=12, text="Help",
+ command=function() {
+ print(help("SetPreferences", package="RSurvey"))
+ })
+ tkgrid("x", frame0.but.2, frame0.but.3, frame0.but.4,
+ pady=c(15, 10), padx=c(4, 0))
+ tkgrid.columnconfigure(frame0, 0, weight=1)
+ tkgrid.configure(frame0.but.4, padx=c(4, 10))
+ tkpack(frame0, fill="x", side="bottom", anchor="e")
# Frame 1, interpolation parameteres
View
21 R/SetSortOrder.R
@@ -79,17 +79,20 @@ SetSortOrder <- function(col.ids, sort.on=NULL, parent=NULL) {
frame0 <- tkframe(tt, relief="flat")
- frame0.but.1 <- ttkbutton(frame0, width=12, text="OK",
+ frame0.but.2 <- ttkbutton(frame0, width=12, text="OK",
command=SaveSortOrder)
- frame0.but.2 <- ttkbutton(frame0, width=12, text="Cancel",
+ frame0.but.3 <- ttkbutton(frame0, width=12, text="Cancel",
command=function() tclvalue(tt.done.var) <- 1)
-
- tkgrid(frame0.but.1, frame0.but.2, pady=c(15, 10))
-
- tkgrid.configure(frame0.but.1, sticky="e", padx=c(0, 4))
- tkgrid.configure(frame0.but.2, sticky="w", padx=c(0, 10), rowspan=2)
-
- tkpack(frame0, side="bottom", anchor="e")
+ frame0.but.4 <- ttkbutton(frame0, width=12, text="Help",
+ command=function() {
+ print(help("SetSortOrder", package="RSurvey"))
+ })
+
+ tkgrid("x", frame0.but.2, frame0.but.3, frame0.but.4,
+ pady=c(15, 10), padx=c(4, 0))
+ tkgrid.columnconfigure(frame0, 0, weight=1)
+ tkgrid.configure(frame0.but.4, padx=c(4, 10))
+ tkpack(frame0, fill="x", side="bottom", anchor="e")
# Frame 1
View
17 R/ViewData.R
@@ -236,17 +236,22 @@ ViewData <- function(d, column.names=NULL, column.formats=NULL, parent=NULL) {
command=CopyValues)
frame0.but.3 <- ttkbutton(frame0, width=12, text="Close",
command=function() tclvalue(tt.done.var) <- 1)
- frame0.grp.4 <- ttksizegrip(frame0)
+ frame0.but.4 <- ttkbutton(frame0, width=12, text="Help",
+ command=function() {
+ print(help("ViewData", package="RSurvey"))
+ })
+ frame0.grp.5 <- ttksizegrip(frame0)
- tkgrid("x", frame0.but.2, frame0.but.3, frame0.grp.4)
+ tkgrid("x", frame0.but.2, frame0.but.3, frame0.but.4, frame0.grp.5)
tkgrid.columnconfigure(frame0, 0, weight=1)
- tkgrid.configure(frame0.but.2, frame0.but.3, padx=c(0, 4), pady=c(4, 10))
- tkgrid.configure(frame0.but.3, columnspan=2, padx=c(0, 10))
- tkgrid.configure(frame0.grp.4, sticky="se")
+ tkgrid.configure(frame0.but.2, frame0.but.3, frame0.but.4,
+ padx=c(0, 4), pady=c(10, 10))
+ tkgrid.configure(frame0.but.4, columnspan=2, padx=c(0, 10))
+ tkgrid.configure(frame0.grp.5, sticky="se")
- tkraise(frame0.but.3, frame0.grp.4)
+ tkraise(frame0.but.4, frame0.grp.5)
tkpack(frame0, fill="x", side="bottom", anchor="e")
View
2  man/Autocrop.Rd
@@ -30,7 +30,7 @@ Returns a polygon object of \code{\link{gpc.poly-class}}.
}
\seealso{
-\code{\link{AutocropPolygon}}
+\code{\link{AutocropRegion}}
}
\author{J.C. Fisher}
View
8 man/AutocropPolygon.Rd → man/AutocropRegion.Rd
@@ -1,6 +1,6 @@
-\name{AutocropPolygon}
+\name{AutocropRegion}
-\alias{AutocropPolygon}
+\alias{AutocropRegion}
\title{Set Autocrop Input Parameters}
@@ -10,7 +10,7 @@ function.
}
\usage{
-AutocropPolygon(d, parent = NULL, ...)
+AutocropRegion(d, parent = NULL, ...)
}
\arguments{
@@ -43,7 +43,7 @@ Returns a polygon object of \code{\link{gpc.poly-class}}.
\examples{\donttest{
data(tritest, package = "tripack")
-AutocropPolygon(as.data.frame(tritest), asp = 1)
+AutocropRegion(as.data.frame(tritest), asp = 1)
}}
\keyword{misc}
Please sign in to comment.
Something went wrong with that request. Please try again.