NeXTSTEP¶
The nextstep pack imitates NeXTSTEP 3.x (1992–1995), the classic look of the Application Kit
and the Workspace Manager that NeXT shipped from NeXTSTEP 1.0 (1989) through 3.3 and OPENSTEP 4.x.
Everything is drawn in the two-bit greyscale of the original MegaPixel display — black, dark grey
#555, light grey #AAA and white: windows have a one-pixel black frame, a black title bar when
key (dark grey when main, light grey otherwise) with the miniaturize button at the left and the
close button at the right, and a resize bar along the bottom. Applications have no menu bar:
the main menu is a vertical column of cells at the top-left of the screen, submenus open beside it
(cells with an arrow) and can be torn off to stay on screen with their own close button; keyboard
equivalents appear at the right of the cells. Push buttons are bevelled cells, the default one shows
the return glyph; highlighted cells turn white. Scrollers sit on the left with both arrows at
the bottom. The Workspace Manager's File Viewer has the shelf, the icon path and the multi-column
browser; the Dock of 64-pixel tiles stands at the right edge of the screen. Type is Helvetica
12 (Helvetica, "Helvetica Neue", Arial) with Helvetica Bold for titles.
Select it with import NeXTSTEP (also AppKitNeXT, OpenStep) or pack="nextstep". The default
device is a 640 × 480 window drawn by the window chrome (window="main" or window="inactive" on
the fence greys its title bar); device="screen" gives the 1120 × 832 MegaPixel screen for a
Workspace holding windows, menus and the Dock placed with .position(x:y:). Elements use the
Application Kit class names — Window (.variant(.key | .main | .inactive)), Panel, Menu,
TornOffMenu, MenuItem, SubmenuItem, Button, ReturnButton, ImageButton, Switch,
RadioButton, RadioMatrix, TextField, SecureTextField, Form / FormCell, TextView,
PopUpList, PullDownList, Slider, ColorWell, ScrollView, Box, SplitView, NXBrowser /
BrowserColumn / BrowserCell / BrowserLeaf, TableView, Ruler and AlertPanel (OPENSTEP
NS… names are accepted too) — plus the Workspace's Shelf, PathView, FileIcon, Dock,
DockTile (.variant(.idle) for a docked application that is not running) and MiniWindow. NeXT
had no dark mode: appearance: dark switches to a NeXTSTEP Color on darker greys variant with a
slate-blue selection. The NeXT logo is never drawn; the Workspace tile shows a neutral glyph, and
every application, document and person is invented.
The Workspace¶
The whole MegaPixel screen: the Workspace menu at the top-left, the key File Viewer with its shelf,
icon path and browser, an inactive Edit window behind it, a miniaturized Terminal window and the Dock
along the right edge. The callouts mark the miniaturize button 1, the close button 2, the
resize bar 3, a browser column's scroller on the left 4 and the ellipsis on the tile of a
docked application that is not running 5. The Dock is the StandardDock component from
docs/mockups/nextstep/workspace.mockitdown.
Walk the north quay with Ines on Monday.
Menus: the main menu, an attached submenu and a torn-off one¶
An application's main menu is a column of cells. Edit is open beside it, its cell highlighted; the Format submenu was torn off earlier and keeps its own title bar with a close button. Keyboard equivalents are the Command-key letters at the right of the cells.
Source
Workspace {
Menu("Scribe") {
SubmenuItem("Info")
SubmenuItem("Document")
SubmenuItem("Edit").selected()
SubmenuItem("Format")
SubmenuItem("Utilities")
SubmenuItem("Windows")
MenuItem("Print...", shortcut: "p")
SubmenuItem("Services")
MenuItem("Hide", shortcut: "h")
MenuItem("Quit", shortcut: "q")
}
.position(x: 64, y: 140)
Menu("Edit") {
MenuItem("Cut", shortcut: "x")
MenuItem("Copy", shortcut: "c").selected()
MenuItem("Paste", shortcut: "v")
MenuItem("Paste Font").disabled()
MenuItem("Delete")
MenuItem("Select All", shortcut: "a")
SubmenuItem("Find")
SubmenuItem("Spelling")
}
.position(x: 176, y: 118)
TornOffMenu("Format") {
SubmenuItem("Font")
SubmenuItem("Text")
MenuItem("Page Layout...", shortcut: "P")
MenuItem("Show Ruler")
MenuItem("Copy Ruler")
MenuItem("Paste Ruler")
}
.position(x: 440, y: 110)
}Preferences¶
An invented Preferences application: the row of section buttons at the top (Mouse pressed), then
Boxes holding Sliders, a RadioMatrix, Switches, a PopUpList, a ColorWell and a Form.
The SettingRow component lines titles up on the right.
Source
import "nextstep/workspace"
VStack(alignment: .stretch, spacing: 0) {
ButtonRow {
ImageButton("Localization", icon: "Localization")
ImageButton("Time", icon: "Time")
ImageButton("Password", icon: "Password")
ImageButton("Display", icon: "Display")
ImageButton("Keyboard", icon: "Keyboard")
ImageButton("Mouse", icon: "Mouse").selected()
ImageButton("Sound", icon: "Sound")
ImageButton("Menu", icon: "Menu")
}
HStack(alignment: .top, spacing: 12) {
VStack(alignment: .stretch, spacing: 12) {
Box("Mouse") {
Slider("Double-click delay", value: 0.4, ticks: 6)
Slider("Acceleration", value: 0.7, ticks: 6)
RadioMatrix("Handedness", items: ["Right-handed", "Left-handed"], selection: "Right-handed")
}
Box("Options") {
Switch("Highlight on mouse-down", checked: true)
Switch("Hide the Dock when inactive")
Switch("Auto-launch Mail", checked: true)
}
}
.frame(maxWidth: .infinity)
VStack(alignment: .stretch, spacing: 12) {
Box("Appearance") {
SettingRow(label: "Window title:") {
PopUpList(items: ["Helvetica 12", "Helvetica 14", "Times 12"], selection: "Helvetica 12")
}
SettingRow(label: "Selection:") {
ColorWell(.white)
}
}
Box("Owner") {
Form {
FormCell("Name:", text: "Rowan Castell")
FormCell("Host:", text: "harbour")
FormCell("Mail:", text: "rowan@harbour").state(.focused)
}
}
}
.frame(width: 240)
}
.padding(12)
Spacer()
HStack(spacing: 8) {
Spacer()
Button("Revert")
ReturnButton("Set")
}
.padding(10)
}Edit: a text window with the ruler¶
The Ruler above a TextView: font and alignment controls over the tick-marked strip, and the text
page with its scroller on the left. The window is main but not key (window="main"), so its title bar
is dark grey.
The east bollards were repainted in March; three of them have already lost their caps. The tide gauge reads 4 cm high against the benchmark on the harbour office wall.
To do before the spring meeting:
• photograph the slipway at low water
• ask Ines for the 1987 drawings
• measure the crane rail gauge again
The east bollards were repainted in March; three of them have already lost their caps. The tide gauge reads 4 cm high against the benchmark on the harbour office wall.
To do before the spring meeting:
• photograph the slipway at low water
• ask Ines for the 1987 drawings
• measure the crane rail gauge again
Mail¶
A Mail-like viewer: the button row (Compose, Reply, Forward, Deliver, Delete), the message list as a
TableView built from the MailRow component, the dimpled SplitView divider and the selected
message below.
| From | Subject | Date | Size | |
|---|---|---|---|---|
| • | Ines Valdour | 1987 harbour drawings | Nov 24 | 48K |
| • | Tomas Brecht | Re: crane rail gauge | Nov 24 | 2K |
| • | Harbour Office | Spring meeting agenda | Nov 23 | 6K |
| Ada Pellworm | Tide table corrections | Nov 21 | 3K | |
| Rowan Castell | Slipway photographs | Nov 20 | 212K | |
| Library | Overdue: Coastal Structures | Nov 18 | 1K |
To: Rowan Castell
Subject: 1987 harbour drawings
Rowan,
I found the folder with the 1987 drawings of the north quay in the basement archive. They show the old crane rail at 1.43 m, so your measurement fits. I scanned the two sheets and attached them.
See you Monday at the quay.
Ines
Source
import "nextstep/workspace"
VStack(alignment: .stretch, spacing: 0) {
ButtonRow {
ImageButton("Compose", icon: "Compose")
ImageButton("Reply", icon: "Reply")
ImageButton("Forward", icon: "Forward")
ImageButton("Deliver", icon: "Deliver")
ImageButton("Delete", icon: "Delete")
Spacer()
VStack(spacing: 2) {
Text("24 messages, 3 unread").font(.caption)
HStack(spacing: 2) {
IconButton(icon: "Previous")
IconButton(icon: "Next")
}
}
}
SplitView {
TableView(columns: ["", "From", "Subject", "Date", "Size"]) {
MailRow(from: "Ines Valdour", subject: "1987 harbour drawings", date: "Nov 24", size: "48K", unread: true, selected: true)
MailRow(from: "Tomas Brecht", subject: "Re: crane rail gauge", date: "Nov 24", unread: true)
MailRow(from: "Harbour Office", subject: "Spring meeting agenda", date: "Nov 23", size: "6K", unread: true)
MailRow(from: "Ada Pellworm", subject: "Tide table corrections", date: "Nov 21", size: "3K")
MailRow(from: "Rowan Castell", subject: "Slipway photographs", date: "Nov 20", size: "212K")
MailRow(from: "Library", subject: "Overdue: Coastal Structures", date: "Nov 18", size: "1K")
}
.frame(height: 150)
Divider()
TextView(text: "From: Ines Valdour\nTo: Rowan Castell\nSubject: 1987 harbour drawings\n\nRowan,\n\nI found the folder with the 1987 drawings of the north quay in the basement archive. They show the old crane rail at 1.43 m, so your measurement fits. I scanned the two sheets and attached them.\n\nSee you Monday at the quay.\nInes", rows: 12)
.frame(maxHeight: .infinity)
}
.frame(maxHeight: .infinity)
}Interface Builder: palette and inspector¶
An Interface-Builder-like session on the screen: the window being designed, the Palettes panel
with sample controls in PaletteCell components, and the Inspector with its PullDownList of
sections, a Form, Switches and a RadioMatrix.
An alert panel¶
Closing an edited document asks for confirmation in an AlertPanel: the application icon, the bold
title, the message, and the buttons with the default one at the right showing the return glyph.
The east bollards were repainted in March.
The east bollards were repainted in March.
Source
VStack(alignment: .stretch, spacing: 0) {
TextView(text: "North quay, survey notes\n\nThe east bollards were repainted in March.", rows: 10)
.frame(maxHeight: .infinity)
}
AlertPanel("Close", icon: "Edit",
message: "Save changes to north-quay.rtf?",
buttons: ["Don't Save", "Cancel", "Save"], primary: "Save")The Dock and miniwindows¶
A closer look at the Dock beside a Terminal window: running applications show their plain tile, docked ones that are not running carry the ellipsis, and miniaturized windows lie on the Workspace background as tiles with a title strip.