Package alphabet
Alphabet #sleela 2.5 (lib/alphabet/Alphabet.sleela)
Alphabet class
Defines Alphabet, the base writing-system Master Class a developer
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
MODULE | static final String MODULE = "Alphabet" | No description in source. |
MAX | static final int MAX = 256 | No description in source. |
loadedFlag | int loadedFlag | No description in source. |
scriptName | String scriptName | e.g. "Latin", "Greek", "Cyrillic" |
letters | Letter[] letters | No description in source. |
count | int count | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
load | void load() | --- loadable-module contract ------------------------------------------ |
loaded | boolean loaded() | No description in source. |
moduleName | String moduleName() | No description in source. |
begin | void begin(String name) | A subclass calls this from its own setup to declare the script name, then appends its letters via compose(). Mirrors the declare()/configure() pattern used across the standard library. |
compose | void compose() | Overridable: a concrete alphabet appends its Letters here, in order. The base version writes nothing, so an un-overridden Alphabet is honestly empty. |
append | void append(String glyph, boolean vowel) | Append one letter. Vowel-ness is passed in because only the script knows. |
appendLetter | void appendLetter(Letter L) | Syntax 1.8+: append a pre-built Letter (e.g. one made with the Letter constructor `new Letter(glyph, order, vowel)`). The letter's order is normalised to its real position so a builder need not track indices. |
at | Letter at(int i) | No description in source. |
find | Letter find(String glyph) | The first letter whose glyph matches, or null. |
has | boolean has(String glyph) | No description in source. |
vowelCount | int vowelCount() | No description in source. |
consonantCount | int consonantCount() | No description in source. |
size | int size() | No description in source. |
script | String script() | No description in source. |
describe | String describe() | No description in source. |
AlphabetBuilder #sleela 2.5 (lib/alphabet/AlphabetBuilder.sleela)
AlphabetBuilder class
Defines AlphabetBuilder — the syntax 1.8+ way to assemble a custom Alphabet without declaring a subclass. Where the classic path is "subclass Alphabet and override compose()", the builder lets a user of Sleela compose a writing system inline using one-line Letter constructors and `let`-inferred locals: let b = new AlphabetBuilder("Runic"); b.vowel("A"); b.consonant("B"); ... < a fully formed Alphabet > let alpha = b.build(); Each add() builds a Letter with `new Letter(glyph, order, vowel)` (the 1.8 constructor) and hands it to Alphabet.appendLetter. The builder is the ergonomic, subclass-free front door the 1.8 surface makes possible. Family: alphabet. Composes Alphabet + Letter (1.8 constructors).
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
target | Alphabet target | No description in source. |
next | int next | 1-based running order for constructed Letters |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
add | void add(String glyph, boolean vowel) | Add a letter built in one line with the Letter 1.8 constructor. |
vowel | void vowel(String glyph) | No description in source. |
consonant | void consonant(String glyph) | No description in source. |
build | Alphabet build() | The assembled alphabet. |
letterCount | int letterCount() | No description in source. |
describe | String describe() | No description in source. |
ArabicAlphabet #sleela 2.5 (lib/alphabet/ArabicAlphabet.sleela)
ArabicAlphabet class extends Alphabet
ArabicAlphabet — the 28-letter Arabic script (Alif..Ya). Like Hebrew, Arabic is an ABJAD: the letters are consonants and short vowels are written with optional diacritics, so each letter here is a consonant. Three letters (Alif, Waw, Ya) double as long-vowel carriers, but as letters they remain consonantal, so the alphabet's vowel count is honestly zero. A concrete Alphabet: override compose() to append its letters in order. Call begin("Arabic") to build it. Family: alphabet.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
compose | void compose() | No description in source. |
CharacterSet #sleela 2.5 (lib/alphabet/CharacterSet.sleela)
CharacterSet class
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
name | String name | No description in source. |
capacity | int capacity | No description in source. |
populated | int populated | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(String setName, int maximumEntries) | No description in source. |
setName | String setName() | No description in source. |
maxEntries | int maxEntries() | No description in source. |
size | int size() | No description in source. |
isEmpty | boolean isEmpty() | No description in source. |
contains | boolean contains(String symbol) | No description in source. |
add | boolean add(String symbol) | No description in source. |
Color #sleela 2.5 (lib/alphabet/Color.sleela)
Color class
Defines Color, the smallest unit of delight in the alphabet package — one RGB color, held as three channels of 0..255, with the hex string, blending, and luminance every user of Sleela quietly relies on. Color is a NATURAL / LOADABLE MODULE sharing the common module contract (load / loaded / moduleName / describe). It is thematically important to ALL users of Sleela: every Theme is, at heart, a handful of Colors that agree to get along. It holds channel state only; a Palette groups Colors and a Theme assigns them roles. Family: alphabet.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
MODULE | static final String MODULE = "Color" | No description in source. |
loadedFlag | int loadedFlag | 1 once the module is loaded |
r | int r | red channel, 0..255 |
g | int g | green channel, 0..255 |
b | int b | blue channel, 0..255 |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
load | void load() | --- loadable-module contract ------------------------------------------ |
loaded | boolean loaded() | No description in source. |
moduleName | String moduleName() | No description in source. |
set | void set(int red, int green, int blue) | Set the three channels, each clamped to the honest 0..255 range. |
channel | int channel(int v) | No description in source. |
red | int red() | No description in source. |
green | int green() | No description in source. |
blue | int blue() | No description in source. |
luminance | int luminance() | Perceived luminance, 0..255 (ITU-R BT.601 weights, integer math). |
isDark | boolean isDark() | Is this a "dark" color? Useful for deciding what text to put on top. |
blendHalf | Color blendHalf(Color other) | Blend halfway toward another color — the diplomacy of design. |
equalsColor | boolean equalsColor(Color other) | Two colors are equal when all three channels agree. |
hex | String hex() | Lowercase hex like "#1e90ff". Built with substring math — no char type. |
hex2 | String hex2(int v) | One byte (0..255) to a two-digit lowercase hex string. |
hexDigit | String hexDigit(int d) | No description in source. |
yn | String yn(boolean v) | No description in source. |
describe | String describe() | No description in source. |
CyrillicAlphabet #sleela 2.5 (lib/alphabet/CyrillicAlphabet.sleela)
CyrillicAlphabet class extends Alphabet
CyrillicAlphabet — a 33-letter Russian Cyrillic script, rendered here in Latin transliteration so it is readable in any Sleela terminal while still carrying its own order and vowel pattern. A concrete Alphabet: override compose() to append its letters in order. Call begin("Cyrillic") to build it. Family: alphabet.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
compose | void compose() | No description in source. |
DarkTheme #sleela 2.5 (lib/alphabet/DarkTheme.sleela)
DarkTheme class extends Theme
DarkTheme — a deep charcoal canvas with soft off-white text and a warm amber accent. The nighttime look beloved by users of Sleela who code at hours they will not admit to. A concrete Theme: override dress() to fill the palette and role colors. Call begin("Dark") to build it. Family: alphabet.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
dress | void dress() | No description in source. |
GreekAlphabet #sleela 2.5 (lib/alphabet/GreekAlphabet.sleela)
GreekAlphabet class extends Alphabet
GreekAlphabet — the 24-letter Greek script (Alpha..Omega), the script of mathematics, philosophy, and every variable name that wanted to look serious. A concrete Alphabet: override compose() to append its letters in order. Call begin("Greek") to build it. Family: alphabet.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
compose | void compose() | No description in source. |
HebrewAlphabet #sleela 2.5 (lib/alphabet/HebrewAlphabet.sleela)
HebrewAlphabet class extends Alphabet
HebrewAlphabet — the 22-letter Hebrew script (Alef..Tav). Hebrew is an ABJAD: its letters are consonants, with vowels normally supplied by points (niqqud) rather than letters, so every letter here is marked a consonant. A few letters (Alef, He, Vav, Yod) act as mater lectionis — vowel carriers — but as letters they remain consonantal, which is why the vowel count of a pure abjad is honestly zero. A concrete Alphabet: override compose() to append its letters in order. Call begin("Hebrew") to build it. Family: alphabet.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
compose | void compose() | No description in source. |
LatinAlphabet #sleela 2.5 (lib/alphabet/LatinAlphabet.sleela)
LatinAlphabet class extends Alphabet
LatinAlphabet — the 26-letter Latin script (A..Z), the default writing system most users of Sleela will reach for first. A concrete Alphabet: subclass, and override compose() to append its letters in order. Call begin("Latin") to build it. Family: alphabet.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
compose | void compose() | No description in source. |
Letter #sleela 2.5 (lib/alphabet/Letter.sleela)
Letter class
Defines Letter, a single glyph in an Alphabet — the symbol, its position in the written order, and whether it is a vowel. The humblest, most important class a user of Sleela will ever meet, because everything written is written out of these. Letter is a NATURAL / LOADABLE MODULE sharing the common module contract (load / loaded / moduleName / describe). It holds glyph state only; an Alphabet owns an ordered run of Letters. Syntax 1.8+: Letter now also offers a one-line CONSTRUCTOR — `new Letter(glyph, order, vowel)` — so a glyph can be built in a single expression (`let a = new Letter("A", 1, true);`) instead of the load()+set() two-step. The two-step contract (load / set) is retained unchanged, so every existing 1.3 caller — including Alphabet.append()'s `new Letter(); load()` — keeps working: a zero-argument `new Letter()` is still valid under 1.8. Family: alphabet.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
MODULE | static final String MODULE = "Letter" | No description in source. |
loadedFlag | int loadedFlag | No description in source. |
glyph | String glyph | the character itself, e.g. "A" |
order | int order | 1-based position within its alphabet |
vowel | boolean vowel | true for vowels, false otherwise |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
load | void load() | --- loadable-module contract (zero-arg path, unchanged) ---------------- A zero-argument `new Letter()` remains valid under 1.8; load() initialises an empty glyph for the classic two-step build used by Alphabet.append(). |
loaded | boolean loaded() | No description in source. |
moduleName | String moduleName() | No description in source. |
set | void set(String symbol, int position, boolean isVowel) | No description in source. |
symbol | String symbol() | No description in source. |
position | int position() | No description in source. |
isVowel | boolean isVowel() | No description in source. |
isConsonant | boolean isConsonant() | No description in source. |
sameAs | boolean sameAs(Letter other) | No description in source. |
yn | String yn(boolean v) | No description in source. |
describe | String describe() | No description in source. |
LightTheme #sleela 2.5 (lib/alphabet/LightTheme.sleela)
LightTheme class extends Theme
LightTheme — a bright, paper-white theme with near-black text and a friendly blue accent. The default daytime look for users of Sleela who like their contrast crisp and their eyes complaining by evening. A concrete Theme: override dress() to fill the palette and role colors. Call begin("Light") to build it. Family: alphabet.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
dress | void dress() | No description in source. |
Palette #sleela 2.5 (lib/alphabet/Palette.sleela)
Palette class
Defines Palette, an ordered collection of Colors — the box of crayons every Theme reaches into. A Palette gives colors names and an order, so a user of Sleela can say "the third one" and mean it. Palette is a NATURAL / LOADABLE MODULE sharing the common module contract (load / loaded / moduleName / describe). It owns an array of Colors and the labels that go with them; a Theme borrows from it to assign roles. Family: alphabet.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
MODULE | static final String MODULE = "Palette" | No description in source. |
MAX | static final int MAX = 64 | No description in source. |
loadedFlag | int loadedFlag | No description in source. |
paletteName | String paletteName | No description in source. |
colors | Color[] colors | No description in source. |
labels | String[] labels | No description in source. |
count | int count | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
load | void load() | --- loadable-module contract ------------------------------------------ |
loaded | boolean loaded() | No description in source. |
moduleName | String moduleName() | No description in source. |
name | void name(String n) | No description in source. |
add | int add(String label, int r, int g, int b) | Add a labeled color by its channels. Returns the color's index, or -1 if the palette is full. |
at | Color at(int i) | No description in source. |
labelAt | String labelAt(int i) | No description in source. |
byLabel | Color byLabel(String label) | Find a color by its label, or null if the palette never heard of it. |
size | int size() | No description in source. |
title | String title() | No description in source. |
describe | String describe() | No description in source. |
SLPackage #sleela 2.5 (lib/alphabet/SLPackage.sleela)
SLPackage class
Defines the SLeeLa standard-library package for alphabet.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
packageName | String packageName | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(String name) | No description in source. |
name | String name() | No description in source. |
available | boolean available() | No description in source. |
SolarizedTheme #sleela 2.5 (lib/alphabet/SolarizedTheme.sleela)
SolarizedTheme class extends Theme
SolarizedTheme — a muted, low-contrast theme in the famous solarized spirit: a tan-cream base, slate-gray text, and a cyan accent. For users of Sleela who find pure black and white a little shouty. A concrete Theme: override dress() to fill the palette and role colors. Call begin("Solarized") to build it. Family: alphabet.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
dress | void dress() | No description in source. |
Theme #sleela 2.5 (lib/alphabet/Theme.sleela)
Theme class
Defines Theme, the base Master Class that binds the three things this package is about — a Palette of Colors, role colors (background, foreground, accent), and an Alphabet — into one coherent, user-facing look. A Theme is what a user of Sleela actually sees. A concrete theme is created by subclassing Theme and overriding dress(), which fills in the palette and role colors. The base owns the role plumbing, contrast checking, and the loadable-module contract, mirroring the base/subclass pattern used by Alphabet and the lib/compiler front ends. Theme is a NATURAL / LOADABLE MODULE sharing the common module contract (load / loaded / moduleName / describe). Family: alphabet.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
MODULE | static final String MODULE = "Theme" | No description in source. |
loadedFlag | int loadedFlag | No description in source. |
themeName | String themeName | No description in source. |
palette | Palette palette | the colors this theme draws from |
background | Color background | the canvas |
foreground | Color foreground | the text |
accent | Color accent | the one color that gets to be loud |
script | Alphabet script | the writing system this theme presents |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
load | void load() | --- loadable-module contract ------------------------------------------ |
loaded | boolean loaded() | No description in source. |
moduleName | String moduleName() | No description in source. |
begin | void begin(String name) | A subclass calls this to build the theme: name it, dress it, done. Mirrors Alphabet.begin() / compose(). |
dress | void dress() | Overridable: a concrete theme fills palette + role colors here. The base leaves everything black-on-black, which is honestly unusable on purpose. |
setBackground | void setBackground(int r, int g, int b) | Helpers a subclass uses from dress() to set the three role colors. |
setForeground | void setForeground(int r, int g, int b) | No description in source. |
setAccent | void setAccent(int r, int g, int b) | No description in source. |
useAlphabet | void useAlphabet(Alphabet a) | Attach the writing system this theme presents. |
bg | Color bg() | No description in source. |
fg | Color fg() | No description in source. |
highlight | Color highlight() | No description in source. |
colors | Palette colors() | No description in source. |
alphabet | Alphabet alphabet() | No description in source. |
name | String name() | No description in source. |
isDark | boolean isDark() | A theme is "dark" when its canvas is dark. All users of Sleela will have opinions about this. |
readable | boolean readable() | Readable means the text and the canvas disagree about darkness — a crude but effective contrast check. |
letterCount | int letterCount() | No description in source. |
yn | String yn(boolean v) | No description in source. |
describe | String describe() | No description in source. |