SCLOrkChat:
Filter:
SCLOrkTools/Classes (extension) | Quarks > SCLOrkTools

SCLOrkChat
ExtensionExtension

Provides a Graphical User Interface for a SCLOrkChatClient object.

Description

Provides a graphical user interface for a provided SCLOrkChatClient, or can construct one from defaults. Serves as the primary user interface to the SCLOrkChat system. SCLOrkChat is a singleton, meaning that there can be one at most created in any interpreter instance.

Class Methods

.new

Construct, initialize, and return a new SCLOrkChat object. Will show the window. If there is already a SCLOrkChat in operation the arguments to new will be ignored and the running instance is returned.

Arguments:

name

The name to use in the chat. Will be shown to other users as your name.

asDirector

Activate some additional features for the director.

chatClient

Optional SCLOrkChatClient object to use for communication. If not provided the class will construct one with sensible defaults, at least sensible for the Santa Clara Laptop Orchestra. Will automatically call connect.

NOTE: If a SCLOrkChatClient object is provided, the SCLOrkChat UI will take ownership of that client object, including overriding all of its callback functions and object deletion. Subsequent usage of the provided client object is therefore discouraged.

.fontSize

Returns the font size, a constant. This should be passed as the size for all Font object construction in dependant views.

.instance

Returns the singleton instance of SCLOrkChat if there is one, or nil if not.

Instance Methods

.connect

Attempt to connect to the server via the SCLOrkChatClient.

.enqueueChatMessage

Adds the provided chat message to the UI view of all messages.

Arguments:

chatMessage

The SCLOrkChatMessage object to render in the UI.

.free

Disconnects from the server, deletes all UI elements, closes the window.

Examples