GUI:
Filter:
Classes | GUI > Kits

GUI

Factory abstraction for all GUI related core classes
Location: NOT INSTALLED!

Description

SuperCollider currently supports three operating system platforms: macOS, UNIX (Linux and FreeBSD) and Windows (with some limitations).

WARNING: The redirect system has been deprecated, please use the view classes directly. If you find old code that uses prefixes for the old GUI Kits (e.g. SCWindow for CocoaGUI), try dropping the prefixes to Window, Button etc. The Qt prefix Q, as e.g. in QWindow, is converted to Window automatically; still it is better style to simply write Window.

Switching between GUI schemes is not needed anymore, as Qt runs well on all platforms. Still, you can get the available schemes with:

For a complete list of historical gui classes and their redirects, see List of GUI classes.

Class Methods

.new

.makeGUI

.initClass

Sets the skin to default values on compile.

.add

.qt

Makes QtGUI the current scheme and returns it. Subsequent GUI object calls to GUI are delegated to Qt. Returns the current (Qt) scheme.

.fromID

Changes the current scheme and returns the new scheme.

Arguments:

id

A Symbol. The identifier of the scheme to use.

.current

Returns the current scheme. This is useful for objects that, upon instantiation, wish to store the then-current scheme, so as to be able to consistently use the same scheme in future method calls.

NOTE: the caller shouldn't make any assumptions about the nature (the class) of the returned object, so that the actual implementation (an Event) may change in the future.

.get

Returns the scheme for a given identifier. Does not switch the current scheme.

Arguments:

id

A Symbol. The identifier of the scheme to retrieve, such as returned by calling aScheme.id.

.set

Changes the current scheme.

Arguments:

aScheme

An instance of Symbol. The scheme to use as current scheme.

.use

Executes a function body, temporarily setting the current GUI scheme. This is useful inside view's action functions in order to make this function use the GUI scheme that was originally used for the view of the action, even if the scheme has been switched meanwhile.

Arguments:

aScheme

The scheme to use during the function execution.

func

An Instance of Function.

.useID

Same as use but using a scheme's id as first argument.

Arguments:

id

The id of the scheme to use during the function execution.

func

A body to execute.

.add

Registers a new scheme. This is typically called by external libraries in their startup procedure. If a scheme with the same identifier (scheme.id) exists, it is overwritten.

Arguments:

aScheme

The scheme to add.

.doesNotUnderstand

All method calls are mapped to the current scheme, so that for example GUI.button can be used and is delegated to the button association of the current scheme.

Arguments:

selector
... args

.setSkin

Arguments:

skinName

.scheme

A class variable. Returns the current scheme.

.schemes

A class variable. Returns an IdentityDictionary of registered schemes.

.skin

A class variable. Returns the current skin.

.skins

A class variable. Returns an IdentityDictionary of registered skins.

Inherited class methods

Instance Methods

Inherited instance methods