iNZGUI-class: iNZight GUI Class

iNZGUI-classR Documentation

iNZight GUI Class

Description

Main class that builds the iNZight GUI

Fields

iNZDocuments

A list of documents containing data, plot settings, etc.

activeDoc

The numeric ID of the currently active document

win

The main GUI window

menuBarWidget

the widget component containing the menu bar

leftMain

the left-hand-side panel containing data widgets and controls

moduleWindow

new modules are inserted into this component

activeModule

an indicator pointing at the currently active module

gp1

containing within the left panel

gp2

container within middle group

popOut

logical, indicates if the graphics window will be embedded or separate (TRUE)

dataViewWidget

a widget that displays the data to the user

dataToolbarWidget

the widget which lets user switch between data and variable view

dataNameWidget

displays the name of the current dataset, and allows users to switch between datasets

plotWidget

the widget containing the main plot window

plotToolbar

the widget in the bottom-right containing plot control buttons

ctrlWidget

the drop-down boxes allowing users to choose variables

modWin

a container for the current module window

curPlot

the current plot object is returned and stored in this field

plotType

the type of the current plot

OS

the name of the user's operating system

prefs.location

the location user preferences are saved

preferences

the current user preferences

statusbar

(unused currently) a statusbar widget

moduledata

data for the current module, so they can preserve state if closed

rhistory

a module containing the R history for the user's session

plot_history

contains history of gg_* plot types

disposer

the function called when iNZight closes

addonModuleDir

the path where modules are installed

code_env

the environment in which R code is executed

code_panel

the interactive code widget at the bottom of the iNZight window

is_initialized

logical, indicates if iNZight is initialised or not

stop_loading

logical, indicates if iNZight should stop loading

ui_env

the environment in which the GUI is created. Used as a base env for loading modules.

Methods

addActDocObs(FUN, ...)

Adds an observer to the active document

checkData(module)

Checks that data is loaded (used before opening modules that require data)

checkPrefs(prefs)

Checks the provided preferences are valid, returning a valid list

close()

Closes the iNZight window, calling the user-supplied disposer function

close_module()

Closes the current module, and re-displays the default control panel

closerHandler(disposer)

Adds a close handler that is called when the user closes the iNZight window

defaultPrefs()

Returns the default preferences

deleteDataset(ask = TRUE)

Deletes the current dataset

displayMsg(module, type)

Displays a message about data requirements for the chosen module

do_delete_dataset()

Does the dataset deletion

getActiveData(lazy = FALSE)

Returns the current dataset (if 'lazy' is TRUE, will not be converted to data.frame)

getActiveDoc()

Returns the currently active document

getPreferences()

Gets the user's preferences from a file

getState()

Returns the current state of the GUI

get_data_object(nrow, lazy = FALSE)

Returns the current dataset or survey design, if it exists

initializeCodeHistory()

Initializes the R code history widget

initializeControlWidget()

Initializes the control panel widget

initializeDataNameWidget()

Initializes the data name widget

initializeDataToolbar(dataThreshold)

Initializes the data toolbar widget

initializeDataView(dataThreshold)

Initializes the data view widget

initializeGui( data = NULL, dispose_fun = NULL, addonDir = NULL, show = TRUE, stop_loading = FALSE, ..., disposer = NULL, ui_env = parent.frame() )

Initiates the GUI

initializeMenu(cont)

Initializes the menu bar at the top of iNZight

initializeModuleWindow(mod, title, scroll = FALSE, border = 0, code = FALSE)

Initializes a module window in the left-hand panel

initializePlotHistory()

Initializes the plot history widget

initializePlotToolbar(cont)

Initializes the plot toolbar

initializePlotWidget()

Initializes the plot panel widget

loadState(file, .alert = TRUE)

Loads the state from a file called 'file'

new_document(data, suffix, name)

Create a new document based on the existing one ('getActiveDoc()')

plotMessage(heading, message, footer, type = "error")

Displays a message to the user using the plot panel

plotSplashScreen()

The default splash screen

reload()

Reloads iNZight

removeDesign()

Removes the survey design associated with a dataset

removeSignals()

Removes signals attached to the active document

restoreDataset()

Restores the original (first) dataset

savePreferences()

Saves the users preferences in a file

saveState(file)

Saves the state of the GUI in 'file'

setDocument(document, reset = FALSE)

Sets the current document

setState(state)

Sets the GUI to the provided state

set_visible(visible = TRUE)

Makes the iNZight window visible, and updates the plot

showHistory()

Displays the code history

updatePlot(allow.redraw = TRUE)

Updates the plot using the user's chosen variables and other settings

update_document(data)

Update the existing document with new data or survey design

view_dataset()

Views the dataset using the 'View()' function


iNZightVIT/iNZight documentation built on April 8, 2024, 10:23 a.m.