What's New in FWH 26.05
This page summarizes the changes and additions in FiveWin for Harbour/xHarbour version 26.05 (May 2026), relative to the previous release 26.03 (March 2026).
Comprehensive HTML Documentation
The most visible change: a complete HTML documentation site covering 200+ classes across three languages (English, Spanish, Portuguese). The docs include class hierarchy diagrams, DATA/Methods tables, code examples, and a clickable feature mindmap. Live at fivetechsoft.github.io/FWH_docs and auto-synced from the main repo via GitHub Actions.
New Classes
TKnob — rotary knob control (UI)
A modern custom rotary knob control by Silvio Falconi
(source/classes/tknob.prg), aimed at audio, MIDI and synthesizer style
interfaces. Derived from TControl and drawn entirely with GDI (no extra
DLL): LED or LINE indicator, illuminated outer ring with glow, optional external
ticks, unipolar (0..127) and bipolar (-30..+30) modes, mouse drag and wheel control
(CTRL for a finer step), double-click reset, enable/disable state, inner
value text plus external label with separate fonts, and bSetGet /
bChanged / bAction callbacks. A declarative
@ <row>,<col> KNOB command is provided in include/tknob.ch.
See TKnob. Demos:
samples/knobtst1.prg, samples/knobtst2.prg.
THFTask & TChatAgent — FWAI utilities (AI)
Two more "FWAI" utility classes. THFTask
(source/classes/thftask.prg) is one thin class over the HuggingFace
Inference API for the common NLP tasks — Classify,
ZeroShot, NER, Summarize,
Translate, Sentiment — each returning plain Harbour
values; transport is injectable (::bSender) for tests or a custom HTTP
layer. TChatAgent (source/classes/tchatagent.prg) is a
minimal "chat over your data" agent with tool-calling: New( bChat, bTool )
takes an LLM codeblock and a data-query codeblock, and the LLM replies
TOOL <query> or ANSWER <text> until answered.
Both are documented at THFTask / TChatAgent.
Also: GPT2Model (pretrained GPT-2 inference)
is now a library class. Tests: samples/ai/thftasktest.prg,
samples/ai/chatagenttest.prg.
TSemanticIndex — semantic search over DBF/SQL (AI)
The first of the "FWAI" utility classes (source/classes/tsemanticindex.prg):
meaning-based search for ordinary data apps. Instead of LIKE '%word%',
it ranks records by how close their text is in meaning to a query, using
embedding vectors and cosine similarity. Backend-agnostic —
New( bEmbed ) takes a { |cText| -> vector } codeblock,
so embeddings can come from TEmbeddings
(HuggingFace) or a local model.
USE customers
oEmb := TEmbeddings():New()
oIdx := TSemanticIndex():New( { |c| oEmb:GetEmbeddings( c ) } )
oIdx:IndexDbf( "NOTES" )
aHits := oIdx:Search( "unhappy about late delivery", 10 ) // { { RecNo, score }, ... }
See TSemanticIndex. Test: samples/ai/semindextest.prg.
Real pretrained GPT-2 runs in pure FWH/Harbour (AI)
A milestone for the FWH AI track: samples/ai/gpt2test.prg builds a
GPT2Model on FW_Tensor, loads the actual GPT-2 small weights
(model.safetensors, 124M params, ~500 MB) one tensor at a time
via FWT_LoadSafe (no full-file load), and runs the complete forward
pass on CPU — pre-norm, multi-head causal attention, GELU MLP, weight-tied
head. Verified numerically against a numpy GPT-2 reference: "The capital of
France is" → " the" (token 262), an exact argmax match, in
under a second. A multi-token generation loop (greedy / temperature / top-k) then
produces real text, e.g. "The capital of France is the capital of the French
Republic, and". Download model.safetensors from
huggingface.co/gpt2 — it is not
shipped with FWH.
FW_Tensor & TFWLanguageModel — toward local transformers (AI)
Two steps toward running real transformer models inside FWH apps.
FW_Tensor (source/function/fwtensor.c) is a flat,
garbage-collected float32 tensor: it stores data as a contiguous buffer
instead of Harbour nested arrays, so large weight sets fit in reasonable memory
and can be read straight from a safetensors file
(FWT_New, FWT_FromArray, FWT_ToArray,
FWT_Shape, FWT_Size, FWT_Get/Set,
FWT_MatMul, FWT_LoadSafe). It also ships the full
transformer forward-pass op set: FWT_Add, FWT_Scale,
FWT_AddBias, FWT_GELU, row-wise FWT_Softmax
and FWT_LayerNorm, FWT_Transpose,
FWT_GatherRows (embedding lookup), and
FWT_SliceCols/FWT_SetCols (attention head split/merge).
Test: samples/ai/fwtensortest.prg (10/10). This is Phase 1 of the
PyTorch-lite effort — see
docs/{en,es,pt}/ai/pytorch-lite-roadmap.html for why each step is
needed.
TFWLanguageModel (source/classes/fwlangmodel.prg) is
a one-line autoregressive language model: it wraps
HFTokenizer +
Transformer and a compact vocabulary
built from your corpus, with chunked training over longer text:
oLM := TFWLanguageModel():New( "gpt2.tokenizer.json", 2, 64, 2, 64 )
oLM:Train( cCorpus, 100, 0.01 )
? oLM:Generate( "To be", 12, 0.8, 20 )
Demo training on real Shakespeare text: samples/ai/shakegpt.prg.
Also new: hb_MatrixSeed( n ) for reproducible weight initialization.
HFTokenizer — HuggingFace BPE Tokenizer (AI)
The goal of the FWH AI classes is to bring the power of transformers into your
FiveWin applications — and to do so by reusing, as much as possible, the
resources of the HuggingFace ecosystem. HFTokenizer is the first
milestone of that effort: a pure Harbour implementation of the HuggingFace
byte-level BPE tokenizer used by GPT-2. It loads a standard
tokenizer.json from the HuggingFace Hub and reproduces GPT-2
tokenization bit-for-bit (e.g. "hello world" →
{ 31373, 995 }, with exact Decode(Encode(text))
round-trips).
A tokenizer → Transformer
bridge tokenizes real text, builds a compact vocabulary of only the tokens that
appear, trains the autoregressive Transformer, and decodes generated ids back to
text — so a model can be trained and run on real language instead of toy
ids. See HFTokenizer for the full
pipeline and integration roadmap. Samples: samples/ai/hftoktest.prg,
samples/ai/hflmtest.prg.
TGroupEx — Accordion-Style Group
Contributed by Silvio Falconi (Italy). An accordion-style collapsible group
with a painted rounded header, optional icon, and expand/collapse button.
Multiple TGroupEx panels can be linked with LINK GROUPS to behave
as a vertical accordion where opening one redistributes the others. The last
panel can optionally stretch to fill the remaining height. Three visual themes
available. Sample: samples/test/ui/testgrpex.prg.
BWCC 64-bit dll/bwcc64.dll
A clean-room 64-bit reimplementation of Borland Windows Custom Controls (BWCC) for 64-bit applications. Exports all 45 functions of the original 32-bit DLL:
- Controls: BorBtn (with predefined OK/Cancel/Yes/No/Help glyphs), BorCheck, BorRadio, BorStatic, BorShade
- Dialog classes: BorDlg, BorDlg_Gray, BorDlg_Std with dithered-gray pattern brush and template mangling
- BorBtn glyphs: resolved from module resources by integer ID, decimal-string name, or button caption
- BWCCMessageBox: Borland-styled message box with BWCC icon and BorBtn buttons
Native Dark Mode
Print Preview (TPreview) now supports native dark mode via
FW_SetDarkMode(.T.). The window background, toolbar, status bar,
and thumbnail panel auto-darken with no application code changes. The horizontal
menu bar is darkened using a new C function FW_DarkMenuBar() that
subclasses the preview window and owner-draws the top-level menu items in dark
colors. Submenus use the 2013 style for dark popups.
Notable Fixes
TTrayIcon on Windows 11
Fixed popup menu not appearing under Windows 11. Win11 refuses to display
TrackPopupMenu owned by a hidden/disabled window. A new oWndParent
DATA stores the main window and Command() activates it instead of
the internal hidden window. The cursor position returned by GetCursorPos is now
properly converted to client coordinates.
Dark Mode Bug Fixes
- TMenu:SetDarkMode no longer recurses infinitely. The
method now recurses into the actual submenu via
oItem:bActioninstead ofoItem:oMenu, which pointed back to the parent. - TBar:SetDarkMode fixed crash on uninitialized
bClrGradwhen called before the bar is painted.
TXBrowse:SetColFromMySQL
Fixed the method discarding an explicit header argument in the classic
two-parameter call. The column-spec parser now checks
ValType(cHeader) != 'C' before overwriting, so user-supplied
headers are preserved.
BWCC Button Glyph Resolution
Generic BorBtn buttons now show bitmaps from the owning module's resources, trying three conventions: RT_BITMAP matching the control ID, state-base bitmap IDs, and bitmap name matching the button caption. Both integer IDs and decimal-string names are matched, covering Borland resource tools.
New Samples
calexmaria — TCalex + MySQL/MariaDB Calendar
New sample samples/misc/calexmaria.prg demonstrating the TCalex
appointment-scheduling control with full CRUD against a MySQL or MariaDB
backend. Features Month, Week and Day views, a drag-and-drop appointment-move
workflow (right-click "Pick up" an appointment, then left-click the
target day), and an RC dialog resource for editing date/time, subject, notes
and color-coded status. Connection via maria_Connect() with
environment-variable overrides for host, database, user, password and port.
See the Samples Guide
and MariaDB / MySQL pages.
Documentation Improvements
| Category | Pages Added | Highlights |
|---|---|---|
| Internet / AI | 18 | TSocket, TSmtp, TPop3, TFtp, TWebClient, TOpenAI, TDeepSeek, TGemini, TOLlama, TGrok, TKimi, TEmbeddings, TNeuralNetwork, TProxy, TRas, TMail, TWhatsApp, TNewsServer |
| UI Controls | 55+ | TGraph, TGantt, TToast, TRating, TWebcam, TGif, TScintilla, TSwitch, TCalendar, TSlider, TImageList, TExplorerBar, TMetroPanel, TScrollPanel, TBarTabs, TProgressWheel, TTagCloud, TScrollMsg, TNavigator, TActiveX, TAnimate, TCoverFlow, TOutLook, TReBar, TSplitter, TStatusBar, TMsgBar, TTrayIcon, TUpDown, TVideo, TXImage, TWBrowse, TPages, TPanel, TTabs, TTrackBar, THotKey, TIPAddress, TRichEdit5, TBar, TButtonBmp, TMeter, TCBrowse, TSelex, TSkin, TFolderEx, TTitle |
| Data Access | 15+ | TArrayData, TDbOdbc, TStruct, TDataRow, TRecSet (expanded), TOrdInfo, TLocks, TSqlError, MariaDB ORM, ORM Classes, PostgreSQL, TTable, TIndex, TDict |
| Printing | 12+ | TPreview, TPdf, FWPdf, VRD, TRColumn, TRLine, TRGroup, TRFile, Barcode, TPrinter (expanded), TReport (expanded) |
| Graphics / GDI | 12 | TPen, TBrush, TBrushEx, TFont, TCursor, TRect/TPoint, GDI+ classes, TEnhMetaFile, TMetaFile, TProgress, TIcon, Graphics Rendering |
| Utilities | 18+ | TFile, TIni, TReg32, TClipBoard, TLinkList, TMRU, TBlock, TLayout, Excel, FWStack, TBackup/TRestore, TComm, TComObject, TDbg, TExStruct, TXmlWriter, TTime, TParser |
| Reference | 8 | TMenu/TMenuItem, TVistaMenu, TForm, TDde, TImageBase64, TCalInfo, TYacc/TLex, TBlockChain |
| Core (expanded) | 3 | TWindow, TDialog, TControl — expanded with missing methods and dark mode API |
New Functions Documented
- Network: IsInternet(), LocalIP(), PublicIP(), IsLocalIP(), IsExternalIP()
- ADO/Database: 30+ FW_Ado* and FW_Dbf* functions
- Date/Time: FW_ADDMONTH, FW_AGE, FW_YMDLAPSED, FW_DateToUnix, UTC_TIMESTAMP, 10+ more
- Image/Drawing: FW_DrawImage, FW_Box, FW_SayText, GradientFill, FW_ReadImage, FW_SaveImage, 10+ more
- Data Format: FW_TRANSFORM, FW_ValToCSV, FW_ArrayToHTML, FW_JsonDecode, 10+ more
- System Info: ScreenWidth, IsWindows11, FW_ActiveMonitors, WndCenterEx, 10+ more
Summary
FWH 26.05 represents a major documentation effort with 200+ new HTML class reference pages, combined with the TGroupEx accordion control, full BWCC 64-bit support, native dark mode for Print Preview, and multiple bug fixes. The new documentation is published at fivetechsoft.github.io/FWH_docs and auto-updates on every push.