The gWidgets2 package provides a programming interface for making graphical user interfaces within R. The package is a rewrite of the gWidgets package, introducing a few external changes but a significant number of internal ones. The package relies on one of several underlying toolkit packages providing access to the graphical libraries. This package provides the implementation to interface with the underlying tcltk package.
Drag and drop in tcltk is not supported by any underlying toolkit functionality. As such, in gWidgets2tcltk we roll our own. The result is a little limited: a) you can't drop values from other applications b) drop targets aren't allowed to be picky about what they receive (not by mime-type anyways).
GComponent is a parent class for both GContainer and GWidget and inherits its primary interface from gWidgets2::BasicToolkitInterface.
GDf class provides a means to edit a data frame. We
use the add on TK code provided by tablelist as the underlying
The main reference methods
passed to constructor
To implement drag and drop, we bind to the toplevel window the events: button1, motion and button1 release. The binding occurs not to to widget, but to the toplevel window containing the widget. This has some advantages, most imporantly it is unlikely the binding will be overwritten by usual gWidgets2tcltk programs. (Recall tkbind will only allow one binding per widget per signal).
The gWidgets2 way of doing drag and drop is implemented here. You
add a drop source with a handler that returns the value of what
you want to pass via the dnd process. Then you specify a widget as
a drop target and give a handler. This handler receives the data
dropdata component of the "
argument. Here, the value is generated when the drop occurs, not
when the drag initiates. Not sure this makes any difference, but
Simply click on a row and the editor pops up as a modal dialog. The shortcut Shift+Enter will go onto the next case, saving changes provided the auto save featuer is employed.
There is no undo/redo support here. There is no support for editing rownames (just lazy at the moment, holler if you would like that). No support to change the dimensions of the data frame or edit factors, ...
Are we watching for a drag?
add_drag_motion(handler, action = NULL, ...)
Called when motion over widget occurs
add_to_parent(parent, child, expand = NULL, fill = NULL, anchor = NULL, ...)
Add a child to parent if it is ia container and non null. Dispatches to add_child method of parent
Return surround block
is widget sensistive to user input
get_index(drop = NULL, ...)
Return tk ID
return id of toplevel
get_value(drop = NULL, ...)
Get main value of widget. From 'svalue' when index = FALSE or NULL
Return widget (not block)
Is widget older style widget
Is widget new style widget?. Override in subclass if not
specify with logical if widget is sensistive to user input
Set widget size (size request), value=c(width=-1, height=-1)
set_value(value, ..., drop = NULL)
for 'svalue<-' when index = FALSE or NULL
add is just add_child
Update parent property of child and children property of parent container
Return widget (not block)
connect_to_toolkit_signal(signal, decorator, emitter = handler_widget(), ...)
Connect signal of toolkit to notify observer
Remove border by setting relief to none
Get length of object. Needed for sapply.
Save data set
Set the interval. Need to stop and start active timer to implement.
Start the timer
stop the timer
John Verzani email@example.com
Maintainer: John Verzani firstname.lastname@example.org
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.