Package avail.anvil

Types

Link copied to clipboard
data class AdaptiveColor(val light: Color, val dark: Color)

An abstraction for a color that's dependent on light versus dark mode.

Link copied to clipboard
class AvailEditor(    val workbench: AvailWorkbench,     moduleName: ModuleName,     afterTextLoaded: (AvailEditor) -> Unit = {}) : WorkbenchFrame

An editor for an Avail source module. Currently supports:

Link copied to clipboard
class AvailWorkbench : WorkbenchFrame

AvailWorkbench is a simple user interface for the Avail builder.

Link copied to clipboard
interface BoundStyle

An abstraction of the styles used by the workbench. Represents the binding of an abstract style name to a textual style usable by a styled document.

Link copied to clipboard
class CodeGuide(afterColumn: Int = 80) : LayerUI<JScrollPane>

Draws a code guide after the 80th column on the decorated JScrollPane.

Link copied to clipboard
object DarkColors : SystemColors

The dark-themed palette of system colors.

Link copied to clipboard
enum DefaultBoundSystemStyle : Enum<DefaultBoundSystemStyle> , BoundStyle

Default style bindings for all system styles. Constructor capabilities are not intended to cover Swing's styling capabilities comprehensively, only to provide those options that will be exercised by one or more system styles.

Link copied to clipboard
class DefaultBoundSystemStyleBuilder(flags: MutableSet<StyleFlag>)

A builder for DefaultBoundSystemStyle.

Link copied to clipboard
class GlowHighlightPainter(color: Color) : DefaultHighlighter.DefaultHighlightPainter
Link copied to clipboard
object LightColors : SystemColors

The light-themed palette of system colors.

Link copied to clipboard
class MenuBarBuilder(theMenuBar: JMenuBar)

A helper class for building the menu bar.

Link copied to clipboard
class MenuBuilder(theMenu: JMenu)

A helper class for building menus.

Link copied to clipboard
class SourceCodeInfo(val runtime: AvailRuntime, val resolverReference: ResolverReference)

Information about the source code for some module.

Link copied to clipboard
object StyleApplicator

Utility for applying bound styles to StyledDocuments.

Link copied to clipboard
enum StyleFlag : Enum<StyleFlag>

Styles that are on/off.

Link copied to clipboard
object StyleRegistry : Iterable<BoundStyle>

The global registry of all styles, initially populated with the system styles and their default bindings.

Link copied to clipboard
sealed class SystemColors

The abstract palette of system colors. Supports styling Avail source text and UI components.

Link copied to clipboard
class WindowAction(    name: String,     frame: JFrame,     keyStroke: KeyStroke? = null,     val action: () -> Unit) : AbstractAction

Functions

Link copied to clipboard
fun MenuBarBuilder.addWindowMenu(frame: JFrame)

Create a Window menu that appears suitable for the platform. Which is only Mac at the moment, although these commands should work anywhere.

Link copied to clipboard
fun Component.scroll(): JScrollPane

Either places the given component inside a JScrollPane or answers the JScrollPane that it's already inside.

Link copied to clipboard
fun JTextPane.scrollTextWithLineNumbers(): JLayer<JScrollPane>

Either places the receiver JTextArea inside a JScrollPane with line numbers presented as row headers, or answers the JScrollPane that it's already inside.

Link copied to clipboard
fun JTextComponent.showTextRange(rangeStart: Int, rangeEnd: Int)

Scroll the given JTextPane to ensure the given text range is visible, and preferably not jammed against the top or bottom border.