guiWidgetsToolkit-class {gWidgets2} | R Documentation |
A class to record the toolkit a gui object uses
Description
An observer can be observed
This interface is inherited by the base GComponent classes in the
toolkit implementations. The methods defined here are referenced
by the S3 methods. For exampe, svalue
dispatches to
get_value
or get_index
.
Class for commands. Has methods do, redo, undo
A list with ptr. delegates call of do or undo to appropriate command
A reference class to create a model that monitors the global
workspace. The class has method update_state
and the
"getting" methods get_by_class
, get_by_function
(filter), get_changes
. Use with a gtimer
instance to
keep up to date with changes to the workspace.
Arguments
... |
passed to constructor |
Details
We combine both widget and container methods here. It isn't perfect, but they do share quite a bit. Perhaps, we could make the container class subclass the basic interface.
Methods
update(...)
Call self.
update(...)
Call self.
add_observer(o, signal = "DEFAULT")
Add an observer. Return id for block/remove/...
block_observer(id)
Block observers. If o missing, block all
block_observers()
Block all observers
notify_observers(..., signal = "DEFAULT")
Call each non-blocked observer
remove_observer(id)
Remove observer
unblock_observer(id)
Unblock observer. If id missing, unblock global block
unblock_observers()
Remove block of all observers. Keeps count, so may need to call again
add_handler(signal, handler, action, ...)
Add a handler to be called for the event indicated by signal
get_enabled()
is widget sensistive to user input
get_index(drop = NULL, ...)
svalue; index=TRUE
get_value(drop = NULL, ...)
Get main value of widget. From 'svalue' when index = FALSE or NULL
set_enabled(value, ...)
specify with logical if widget is sensistive to user input
set_value(value, ..., drop = NULL)
for 'svalue<-' when index = FALSE or NULL
any_changes(...)
Report if any changes
filter_names(f)
Filter the names by f
get_by_class(classes = character(0))
Return objects matching any of classes
get_by_function(f)
Filter objects by function f
get_changes()
Return list of changes
initialize(...)
Initialze state of cached objects
pop_changes()
pop changes, reset
update_state(...)
update cache of names/digests, then notify observers if there are changes