The change handler for ggraphics is called when a rubber-band selection is completed
The click handler is called on a mouse click. The handler object should pass in value for x
, y
A GUI is made interactive by assigning handlers to user-generated
events, such as a mouse click, change of widget state, or keyboard
press. In gWidgets2 handlers are assigned through various
addHandlerXXX
methods. The handlers are functions whose
first argument should expect a list with components obj
(to
pass in the receiver object) and action
(to pass in any
user-supplied value to the action
argument). Some handlers
add other components, such as mouse position information on a
click, or key information on a keyboard event.
The "changed" event varies wildly amongst the widgets, but is meant to be the most "obvious" one. Typically this is also similar to "selected".
This may not be supported by all toolkits.
This may not be supported by all toolkits.
This may not be supported by all toolkits.
For table widgets (gtable
, gdf
) clicking the column
header should trigger this event. The column that is clicked on is
passed back in the component column
.
If defined (gtable
, gdf
) calls event handler for
double click enent. Passes back column information through
column
component.
The select event defaults to the "changed" event.
The "select" event is when a user "selects" an object, the "selection changed" event is when the selection changes. The distinction is in table and tree widgets where a user may select values with a single click yet want to initiate an action with a double click. The latter is the "addHandlerSelect" event, the former the "addHandlerSelectionChanged" event.
When a widget has the focus, it will receive the keyboard input. This handler is called when a widget receives the focus.
A blur or focus out event for a widget triggers this event handler
When a widget is destroyed, a handler can be assigned to perform any clean up tasks that are needed.
For gwindow objects this handler is called before the window is
closed. If this handler returns TRUE
the window will be
closed, if FALSE
the window will not be closed. In
contrast, the "destroy" handler does not allow conditional
destruction.
The "h" argument has components key
for the key and possibly modifier
for the modifier.
deprecated. See gtimer
.
Defaults to adding a right-click mouse popup menu, better known as a context menu, though some toolkits have both this and the latter provided.
These menus are also known as context menus, though there isn't really a good mechanism within gWidgets2 to make the menu items context sensitive.
Drag and drop requires one to register widgets a sources for dragging, a widgets as a targets for dropping.
The handler is called on the drop event. The component
dropdata
passes in the value being transferred by dragging.
Block all handlers for an object. Removed via unblockHandlers.
The block is a counter that gets decremented. If more blockHandlers calls are made than unblockHandlers, the handlers will still be blocked.
# S3 method for default
addHandlerChanged(obj, handler, action = NULL, ...)# S3 method for default
addHandlerClicked(obj, handler, action = NULL, ...)
addHandler(obj, signal, handler, action = NULL, ...)
# S3 method for default
addHandler(obj, signal, handler, action = NULL, ...)
addHandlerChanged(obj, handler, action = NULL, ...)
# S3 method for default
addHandlerChanged(obj, handler, action = NULL, ...)
addHandlerClicked(obj, handler, action = NULL, ...)
# S3 method for default
addHandlerClicked(obj, handler, action = NULL, ...)
addHandlerDoubleclick(obj, handler, action = NULL, ...)
# S3 method for default
addHandlerDoubleclick(obj, handler, action = NULL, ...)
addHandlerRightclick(obj, handler, action = NULL, ...)
# S3 method for default
addHandlerRightclick(obj, handler, action = NULL, ...)
addHandlerShiftclick(obj, handler, action = NULL, ...)
# S3 method for default
addHandlerShiftclick(obj, handler, action = NULL, ...)
addHandlerControlclick(obj, handler, action = NULL, ...)
# S3 method for default
addHandlerControlclick(obj, handler, action = NULL, ...)
addHandlerColumnclicked(obj, handler, action = NULL, ...)
# S3 method for default
addHandlerColumnclicked(obj, handler, action = NULL, ...)
addHandlerColumnDoubleclicked(obj, handler, action = NULL, ...)
# S3 method for default
addHandlerColumnDoubleclicked(obj, handler, action = NULL, ...)
addHandlerColumnRightclicked(obj, handler, action = NULL, ...)
# S3 method for default
addHandlerColumnRightclicked(obj, handler, action = NULL, ...)
addHandlerSelect(obj, handler, action = NULL, ...)
# S3 method for default
addHandlerSelect(obj, handler, action = NULL, ...)
addHandlerSelectionChanged(obj, handler, action = NULL, ...)
# S3 method for default
addHandlerSelectionChanged(obj, handler, action = NULL, ...)
addHandlerFocus(obj, handler, action = NULL, ...)
# S3 method for default
addHandlerFocus(obj, handler, action = NULL, ...)
addHandlerBlur(obj, handler, action = NULL, ...)
# S3 method for default
addHandlerBlur(obj, handler, action = NULL, ...)
addHandlerDestroy(obj, handler, action = NULL, ...)
# S3 method for default
addHandlerDestroy(obj, handler, action = NULL, ...)
addHandlerUnrealize(obj, handler, action = NULL, ...)
# S3 method for default
addHandlerUnrealize(obj, handler, action = NULL, ...)
addHandlerExpose(obj, handler, action = NULL, ...)
# S3 method for default
addHandlerExpose(obj, handler, action = NULL, ...)
addHandlerKeystroke(obj, handler, action = NULL, ...)
# S3 method for default
addHandlerKeystroke(obj, handler, action = NULL, ...)
addHandlerMouseMotion(obj, handler, action = NULL, ...)
# S3 method for default
addHandlerMouseMotion(obj, handler, action = NULL, ...)
addHandlerIdle(...)
addPopupMenu(obj, menulist, action = NULL, ...)
# S3 method for default
addPopupMenu(obj, menulist, action = NULL, ...)
addRightclickPopupMenu(obj, menulist, action = NULL, ...)
# S3 method for default
addRightclickPopupMenu(obj, menulist, action = NULL, ...)
# S3 method for default
addRightclickPopupMenu(obj, menulist, action = NULL, ...)
# S3 method for default
addRightclickPopupMenu(obj, menulist, action = NULL, ...)
addDropSource(
obj,
handler,
action = NULL,
data.type = c("text", "object"),
...
)
# S3 method for default
addDropSource(
obj,
handler,
action = NULL,
data.type = c("text", "object"),
...
)
addDropTarget(obj, handler, action = NULL, ...)
# S3 method for default
addDropTarget(obj, handler, action = NULL, ...)
addDragMotion(obj, handler, action = NULL, ...)
# S3 method for default
addDragMotion(obj, handler, action = NULL, ...)
blockHandlers(obj, ...)
# S3 method for default
blockHandlers(obj, ...)
blockHandler(obj, ID, ...)
# S3 method for default
blockHandler(obj, ID, ...)
unblockHandlers(obj, ...)
# S3 method for default
unblockHandlers(obj, ...)
unblockHandler(obj, ID, ...)
# S3 method for default
unblockHandler(obj, ID, ...)
removeHandler(obj, ID, ...)
# S3 method for default
removeHandler(obj, ID, ...)
object receiving event and emitting a signal to the handler
handler to assign when signal is emitted. A handler
is a function, its first argument should expect a list with
components obj
containing a reference to the object and
action
. Some handlers are passed additional values.
passed to handler to parameterize call.
passed along
toolkit signal, e.g. "clicked"
a list of gaction
items or a gmenu
instance
Type of data returned. It is either text or an object
returned by addHandler. If missing will try to block all handler passed to constructor
a handler ID which can be used to block/unblock or remove the handler
Although the add_handler
method, to which addHandler
dispatches, is basically the workhorse to add a handler to
response to a signal, it generally isn't called directly, as its
use is not cross toolkit. Rather, if possible, one should use the
addHandlerXXX
methods to add a handler. These dispatch to
this (basically) but do so in a toolkit independent manner.
This call (and the others) returns a handler ID which may be used
for some toolkits later on to remove, block or unblock the
call. All handlers for a widget may be blocked or unblocked via
blockHandlers
and unblockHandlers
.
The "changed" event is also the one that a handler passed to the constructor is called on.
To specify the values that is transferred in a drag and drop
event, the handler specified here should return the value to pass
via drag and drop. It will appear as the dropdata
component
of the list passed in as the first argument of the drop handler
blockHandlers
,
unblockHandlers
, blockHandler
,
unblockHandler
, and removeHandler
blockHandlers
to block all handlers for widget