Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

S4-classes

A class to record the toolkit a gui object uses


Description

A class to record the toolkit a gui object uses

An observer can be observed

Handler is a special observer with obj and actino passed as first argument

Observable class sets up objects that can be observed. Inherited by template

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

Class for multple commands

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.

Class for icons

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


gWidgets2

Rewrite of gWidgets API for Simplified GUI Construction

v1.0-8
GPL (>= 3)
Authors
John Verzani
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.