Classes (extension) | GUI

# ServerView : Singleton : Object
Extension

An improved GUI for server information
Source: ServerView.sc
See also: Server, Singleton

## Description

ServerView is a replacement for the standard SuperCollider server gui. It has a cleaner and more compact look, it supports multiple servers, and displays graphs of CPU usage, Synth counts, as well as a scope and input/output levels.

NOTE: ServerView is built to use the M+ font series: http://mplus-fonts.osdn.jp/mplus-outline-fonts/index-en.html

It will work without these installed, but layout and affordances may not be correct.

## Class Methods

### ServerView.new(name ... settings)

From superclass: Singleton

Create a new ServerView

#### Arguments:

key | A Symbol or other IdentityDictionary-appropriate object used to identify the ServerView. See Singleton: -new for behavior. Unless you need multiple ServerView's, no argument is required.

### ServerView.widgets

### ServerView.widgets = value

#### Arguments:

(widgetlist) | A list of subclasses of ServerWidgetBase to be displayed in the ServerView. By default, it contains ServerStatusWidget, VolumeWidget, ScopeWidget. Set this in your startup file to enable alternative configurations of widgets.

### Inherited class methods

### Undocumented class methods

### ServerView.actions

### ServerView.border

### ServerView.border = value

### ServerView.default

### ServerView.doOnServerBoot(server)

## Instance Methods

### .close

Close the view;

### .onClose(v)

Sets or gets the object to be evaluated when the view is destroyed (i.e. closed or removed). It is passed the view as an argument.

### .front

Bring ServerView to front. If this ServerView has not been created yet, create it.

### .registerKeyAction(key, action)

Add a keyboard action to the ServerView.

#### Arguments:

key | A Char representing an ascii key.
action | A function to execute when key is detected.

### Inherited instance methods

### Undocumented instance methods

### .clearView

### .createView

### .onClose(v)

### .populateView

### .server

### .server = newServer

### .set

### .view

### .view = value

### .widgets

### .widgets = value

### .window

## Examples

ServerView works as a singleton, so the default constructor will always refer to the same object.ServerView().front; ServerView().close;

## Keyboard shortcuts / interaction

p | Show node hierarchy window
n | Dump all node information to post window (`s.queryAllNodes(true)`)
l | Show level meters window.
<space> | Boot server (if not already running)
s | Show scope window
f | Show frequency scope window
d | Enable / disable dumping of OSC messages
m | Mute server volume
0 | Reset server volume to 0dB

Horizontal / vertical mouse wheel or scroll actions over the scope will zoom horizontally and vertically.

Clicking graph widgets will reset their bounds.

Clicking the server name will boot / kill the server.

## Adding widgets.

ServerView is populated by widgets that must be subclasses of ServerWidgetBase. To add a new widget type to the ServerView:

1. Create a subclass of ServerWidgetBase. It should not implement a constructor, and must implement a `view` method that returns a valid View.

2. Add the class to *widgets in your startup file, or any time before a ServerView is created.

helpfile source: /Users/zzk/Library/Application Support/SuperCollider/downloaded-quarks/ServerView/HelpSource/Classes/ServerView.schelp
link::Classes/ServerView::