controlEnv {iSPlot} | R Documentation

## An environment to store information for the controller

### Description

controlEnv is an environment that stores information about the control window and the settings chosen from the menu. Currently, the variables stored in controlEnv are ag, availDF, chosenX, chosenY, clickEvent, colorBrowser, controlWin, curAction, currentColor, dataF, fillPch, findInfo, findOn, gtkTable, keyVals, menuBar, menus, notDone, oldAction, plotTitle, showDF, toggleButtonXList, toggleButtonYList, vBox, viewMode, winCounter, winDefaultHeight, winDefaultWidth, and windowItem. controlEnv pertains to storing information for the controller in the model-view-controller paradigm.

### Details

ag is the gtk accelerator group for menu item accelerators.

availDF stores which data set the user chose to load into dfList in dataEnv when the user is looking at the Open Data view.

chosenX is the variable the user chose to plot as the X variable. chosenX is set in the Plot Data view.

chosenY is the variable the user chose to plot as the Y variable. chosenY is set in the Plot Data view.

clickEvent is a boolean that is set to TRUE when a row is selected in a spreadsheet and set to FALSE when a row is unselected.

colorBrowser is the gtk window that holds the color selection dialog.

controlWin is the gtk window that is the control window.

curAction is the action the user chose from the main menu on the control window. Changing the curAction will cause the control window view to change to reflect which menu item was chosen.

currentColor is the color the user chose from the color browser. The default value for currentColor is "black".

dataF is the data set that the user chose to plot in the Plot Data view.

fillPch is the pch value that will fill in a round point with color. The default value for fillPch is 19.

findInfo is the text the user entered that will be used to search for a row name or data element. findInfo is set when the user chooses Find from the Edit menu.

findOn is either "Row" or "Data Element" depending on whether the user wants to search for a row name or a data element when performing find.

gtkTable is the gtk table that is added to the control window when a menu item is selected from the main menu. gtk table contains the items that are shown on the control window view. gtk table is stored so that it can be removed from the control window when the user chooses a new menu item. When a new menu item is chosen, the old gtk table is removed and a new gtk table is added to the control window. This allows the control window view to change depending on the menu item chosen.

keyVals is a list that stores the key values of the accelerators for the menu items and also stores the action that corresponds with the accelerator. Each item in keyVals is a list with the elements keyval, action, and accelChar. Besides these 3 elements, keyVals may also contain extra elements for the functions, updateCurAction and updateControlWindow .

menuBar is the gtk menu bar that is the main menu bar on the control window (all menus are added to the menu bar).

menus is a list of menus that are added to the control window, such as file, edit, display and viewMode.

notDone is a boolean variable that is used when a gtk window needs to be modal.

oldAction is set to the curAction value right before curAction is updated. Thus, it is the action previous to the current action. It is needed to update the control window when a curAction opens a new window (for instance, open file menu item under the file menu).

plotTitle is character string that will be the title on all the scatterplots. Currently, plotTitle is set to the view mode.

showDF is set in the View Data view and determines which data set will be shown in a gtk spreadsheet (clist).

toggleButtonXList is a list of gtk toggle buttons to choose the X variable when plotting a data set. The gtk toggle buttons need to be stored so that only one button can be active at a time.

toggleButtonYList is a list of gtk toggle buttons to choose the Y variable when plotting a data set. The gtk toggle buttons need to be stored so that only one button can be active at a time.

vBox is the gtk vertical box on the control window that stores the main menu and the gtk table stored in gtkTable. vBox is stored so that new gtk tables can be added to it when a new menu item is chosen.

viewMode is the view mode chosen by the user by clicking on one of the menu items under the viewMode menu.

winCounter is a counter of how many windows containing views have been opened. So when one view is opened, the counter is incremented to one. When a second view is opened, the counter is incremented to two. winCounter is not decremented when a view is removed.

winDefaultHeight is the default height of the control window. It is set to 500.

winDefaultWidth is the default width of the control window. It is set to 300.

windowItem stores the menu item that refers to the window menu item on the control window. It needs to be stored because the window menu often needs to be updated when views are added or removed.

### See Also

`setControlEnvDefaults`, `setControlWindowDefaults`

### Examples

      # first set the control environment variables to their default values
      setControlEnvDefaults()
      # list the environment variables in controlEnv
      ls(env=controlEnv)
      # return one of the environment variables
      get("winDefaultHeight",controlEnv)

[Package iSPlot version 1.0.7 Index]