createGtkDev {iSPlot}R Documentation

Adds a Gtk Device on a Gtk window

Description

createGtkDev adds a gtk device on a gtk window and adds a callback for the focus event. When the window has focus, the gtk device in the window will be active. Rulers are also added to the gtk window in this function so that the location of the mouse can be recorded at all times - this is needed for the motion event.

Usage

createGtkDev(w)

Arguments

w the gtk window

Value

win the gtk window
drArea the gtk drawing area

Author(s)

Elizabeth Whalen

See Also

addDrawingArea, createPlotView

Examples

  if (interactive())
  {
    createControlWindow()
    # should load data through Open Data or Open File under the File menu
    data(USArrests)
    loadDFData(USArrests,"USArrests")
    # plotting the data should occur through Plot Data under 
    # the Display menu
    # createView will call createPlotView, which will call createGtkDev
    # to add a gtk device to the gtk window
    createView(type = "plotView", dataName = "USArrests", 
               plotType = "sPlotView", dfRows = 1:nrow(USArrests), 
               dfColumns = 1:2) 
  }

[Package iSPlot version 1.0.3 Index]