Fixed merge order of help files.
This commit is contained in:
parent
fe68899020
commit
3c886a97f6
44 changed files with 228 additions and 50 deletions
3
Makefile
3
Makefile
|
|
@ -48,7 +48,8 @@ deploy-helpsrc:
|
||||||
|
|
||||||
HLPC = bin/host/dvxhlpc
|
HLPC = bin/host/dvxhlpc
|
||||||
|
|
||||||
SYSTEM_DHS = core/arch.dhs core/apiref.dhs \
|
SYSTEM_DHS = core/sysdoc.dhs \
|
||||||
|
core/arch.dhs core/apiref.dhs \
|
||||||
tasks/libtasks.dhs shell/dvxshell.dhs sql/dvxsql.dhs \
|
tasks/libtasks.dhs shell/dvxshell.dhs sql/dvxsql.dhs \
|
||||||
texthelp/texthelp.dhs listhelp/listhelp.dhs \
|
texthelp/texthelp.dhs listhelp/listhelp.dhs \
|
||||||
taskmgr/taskmgr.dhs serial/serial.dhs \
|
taskmgr/taskmgr.dhs serial/serial.dhs \
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
|
.section Libraries
|
||||||
.topic lib.basrt
|
.topic lib.basrt
|
||||||
.title BASIC Runtime Library
|
.title BASIC Runtime Library
|
||||||
.toc 1 BASIC Runtime Library
|
.toc 0 BASIC Runtime Library
|
||||||
.index BASIC Runtime
|
.index BASIC Runtime
|
||||||
.index BasVmT
|
.index BasVmT
|
||||||
.index BasValueT
|
.index BasValueT
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
.section Architecture
|
||||||
.topic api.overview
|
.topic api.overview
|
||||||
.title DVX GUI API Reference
|
.title DVX GUI API Reference
|
||||||
.toc 0 DVX GUI API Reference
|
.toc 0 DVX GUI API Reference
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
.section Architecture
|
||||||
.topic arch.overview
|
.topic arch.overview
|
||||||
.title DVX Architecture Overview
|
.title DVX Architecture Overview
|
||||||
.toc 0 System Overview
|
.toc 0 System Overview
|
||||||
|
|
|
||||||
8
core/sysdoc.dhs
Normal file
8
core/sysdoc.dhs
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
.topic sys.overview
|
||||||
|
.title DVX System Overview
|
||||||
|
.toc 0 System Overview
|
||||||
|
.default
|
||||||
|
|
||||||
|
.h1 DVX System Overview
|
||||||
|
|
||||||
|
DVX (DOS Visual eXecutive) is a graphical user interface environment for DOS, designed for 486-class hardware and above. This help file covers the system architecture, core API, libraries, and widget toolkit.
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<title>DVX Architecture Overview</title>
|
<title>DVX System Overview</title>
|
||||||
<style>
|
<style>
|
||||||
body { font-family: sans-serif; margin: 0; padding: 0; display: flex; }
|
body { font-family: sans-serif; margin: 0; padding: 0; display: flex; }
|
||||||
nav { width: 250px; min-width: 250px; background: #f0f0f0; padding: 16px;
|
nav { width: 250px; min-width: 250px; background: #f0f0f0; padding: 16px;
|
||||||
|
|
@ -29,6 +29,9 @@ img { max-width: 100%; }
|
||||||
<nav>
|
<nav>
|
||||||
<h3>Contents</h3>
|
<h3>Contents</h3>
|
||||||
<ul>
|
<ul>
|
||||||
|
<li><a href="#sys.overview">System Overview</a></li>
|
||||||
|
<li><strong>Architecture</strong>
|
||||||
|
<ul>
|
||||||
<li><a href="#arch.overview">System Overview</a>
|
<li><a href="#arch.overview">System Overview</a>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="#arch.layers">Five-Layer Architecture</a></li>
|
<li><a href="#arch.layers">Five-Layer Architecture</a></li>
|
||||||
|
|
@ -53,9 +56,13 @@ img { max-width: 100%; }
|
||||||
<li><a href="#api.wm">dvxWm.h -- Layer 4: Window Manager</a></li>
|
<li><a href="#api.wm">dvxWm.h -- Layer 4: Window Manager</a></li>
|
||||||
<li><a href="#api.app">dvxApp.h -- Layer 5: Application API</a></li>
|
<li><a href="#api.app">dvxApp.h -- Layer 5: Application API</a></li>
|
||||||
<li><a href="#api.widget">dvxWidget.h -- Widget System</a></li>
|
<li><a href="#api.widget">dvxWidget.h -- Widget System</a></li>
|
||||||
<li><a href="#libtasks">libtasks -- Cooperative Task Switching</a></li>
|
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li><strong>Libraries</strong>
|
||||||
|
<ul>
|
||||||
|
<li><a href="#libtasks">libtasks -- Cooperative Task Switching</a></li>
|
||||||
<li><a href="#shell.overview">DVX Shell Library</a>
|
<li><a href="#shell.overview">DVX Shell Library</a>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="#shell.types">Types and Constants</a></li>
|
<li><a href="#shell.types">Types and Constants</a></li>
|
||||||
|
|
@ -64,7 +71,10 @@ img { max-width: 100%; }
|
||||||
<li><a href="#shell.config">Configuration API</a></li>
|
<li><a href="#shell.config">Configuration API</a></li>
|
||||||
<li><a href="#shell.desktop">Desktop Callbacks</a></li>
|
<li><a href="#shell.desktop">Desktop Callbacks</a></li>
|
||||||
<li><a href="#shell.info">System Information</a></li>
|
<li><a href="#shell.info">System Information</a></li>
|
||||||
<li><a href="#sql.overview">dvxSql -- SQL Database Interface</a></li>
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li><a href="#sql.overview">dvxSql -- SQL Database Interface</a>
|
||||||
|
<ul>
|
||||||
<li><a href="#sql.db">Database Operations</a></li>
|
<li><a href="#sql.db">Database Operations</a></li>
|
||||||
<li><a href="#sql.cursor">Cursor Operations</a></li>
|
<li><a href="#sql.cursor">Cursor Operations</a></li>
|
||||||
<li><a href="#sql.utility">Utility Functions</a></li>
|
<li><a href="#sql.utility">Utility Functions</a></li>
|
||||||
|
|
@ -82,20 +92,29 @@ img { max-width: 100%; }
|
||||||
<li><a href="#lib.texthelp.mouseclick">widgetTextEditMouseClick</a></li>
|
<li><a href="#lib.texthelp.mouseclick">widgetTextEditMouseClick</a></li>
|
||||||
<li><a href="#lib.texthelp.onkey">widgetTextEditOnKey</a></li>
|
<li><a href="#lib.texthelp.onkey">widgetTextEditOnKey</a></li>
|
||||||
<li><a href="#lib.texthelp.paintline">widgetTextEditPaintLine</a></li>
|
<li><a href="#lib.texthelp.paintline">widgetTextEditPaintLine</a></li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
<li><a href="#lib.listhelp">List Helper Library</a></li>
|
<li><a href="#lib.listhelp">List Helper Library</a></li>
|
||||||
<li><a href="#lib.taskmgr">Task Manager</a></li>
|
<li><a href="#lib.taskmgr">Task Manager</a></li>
|
||||||
<li><a href="#lib.serial">Serial Stack</a></li>
|
<li><a href="#lib.serial">Serial Stack</a>
|
||||||
|
<ul>
|
||||||
<li><a href="#lib.serial.rs232">RS-232 UART Driver</a></li>
|
<li><a href="#lib.serial.rs232">RS-232 UART Driver</a></li>
|
||||||
<li><a href="#lib.serial.packet">Packet Transport</a></li>
|
<li><a href="#lib.serial.packet">Packet Transport</a></li>
|
||||||
<li><a href="#lib.serial.security">Security (DH + XTEA)</a></li>
|
<li><a href="#lib.serial.security">Security (DH + XTEA)</a></li>
|
||||||
<li><a href="#lib.serial.seclink">Secure Link</a></li>
|
<li><a href="#lib.serial.seclink">Secure Link</a></li>
|
||||||
<li><a href="#lib.basrt">BASIC Runtime Library</a></li>
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li><a href="#lib.basrt">BASIC Runtime Library</a>
|
||||||
|
<ul>
|
||||||
<li><a href="#lib.basrt.values">Value System</a></li>
|
<li><a href="#lib.basrt.values">Value System</a></li>
|
||||||
<li><a href="#lib.basrt.vm">Virtual Machine</a></li>
|
<li><a href="#lib.basrt.vm">Virtual Machine</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li><a href="#widget.base">Widget System</a>
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li><strong>Widgets</strong>
|
||||||
<ul>
|
<ul>
|
||||||
|
<li><a href="#widget.base">Widget System</a></li>
|
||||||
<li><a href="#widget.ansiterm">AnsiTerm</a></li>
|
<li><a href="#widget.ansiterm">AnsiTerm</a></li>
|
||||||
<li><a href="#widget.box">Layout Containers</a></li>
|
<li><a href="#widget.box">Layout Containers</a></li>
|
||||||
<li><a href="#widget.box">Box (VBox / HBox / Frame)</a></li>
|
<li><a href="#widget.box">Box (VBox / HBox / Frame)</a></li>
|
||||||
|
|
@ -742,6 +761,11 @@ img { max-width: 100%; }
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
<main>
|
<main>
|
||||||
|
<div class="topic" id="sys.overview">
|
||||||
|
<h1>DVX System Overview</h1>
|
||||||
|
<h2>DVX System Overview</h2>
|
||||||
|
<p>DVX (DOS Visual eXecutive) is a graphical user interface environment for DOS, designed for 486-class hardware and above. This help file covers the system architecture, core API, libraries, and widget toolkit.</p>
|
||||||
|
</div>
|
||||||
<div class="topic" id="arch.overview">
|
<div class="topic" id="arch.overview">
|
||||||
<h1>DVX Architecture Overview</h1>
|
<h1>DVX Architecture Overview</h1>
|
||||||
<h2>DVX Architecture Overview</h2>
|
<h2>DVX Architecture Overview</h2>
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
|
.section Libraries
|
||||||
.topic lib.listhelp
|
.topic lib.listhelp
|
||||||
.title List Helper Library
|
.title List Helper Library
|
||||||
.toc 1 List Helper Library
|
.toc 0 List Helper Library
|
||||||
.index listhelp
|
.index listhelp
|
||||||
.index widgetDrawDropdownArrow
|
.index widgetDrawDropdownArrow
|
||||||
.index widgetMaxItemLen
|
.index widgetMaxItemLen
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
|
.section Libraries
|
||||||
.topic lib.serial
|
.topic lib.serial
|
||||||
.title Serial Stack
|
.title Serial Stack
|
||||||
.toc 1 Serial Stack
|
.toc 0 Serial Stack
|
||||||
.index Serial
|
.index Serial
|
||||||
.index RS-232
|
.index RS-232
|
||||||
.index HDLC
|
.index HDLC
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
.section Libraries
|
||||||
.topic shell.overview
|
.topic shell.overview
|
||||||
.title DVX Shell Library
|
.title DVX Shell Library
|
||||||
.toc 0 DVX Shell Library
|
.toc 0 DVX Shell Library
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
|
.section Libraries
|
||||||
.topic sql.overview
|
.topic sql.overview
|
||||||
.title dvxSql -- SQL Database Interface
|
.title dvxSql -- SQL Database Interface
|
||||||
.toc 1 dvxSql -- SQL Database Interface
|
.toc 0 dvxSql -- SQL Database Interface
|
||||||
.default
|
.default
|
||||||
.index dvxSql
|
.index dvxSql
|
||||||
.index SQL
|
.index SQL
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
|
.section Libraries
|
||||||
.topic lib.taskmgr
|
.topic lib.taskmgr
|
||||||
.title Task Manager
|
.title Task Manager
|
||||||
.toc 1 Task Manager
|
.toc 0 Task Manager
|
||||||
.index Task Manager
|
.index Task Manager
|
||||||
.index shellTaskMgrOpen
|
.index shellTaskMgrOpen
|
||||||
.index shellTaskMgrRefresh
|
.index shellTaskMgrRefresh
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
|
.section Libraries
|
||||||
.topic libtasks
|
.topic libtasks
|
||||||
.title libtasks -- Cooperative Task Switching
|
.title libtasks -- Cooperative Task Switching
|
||||||
.toc 1 libtasks -- Cooperative Task Switching
|
.toc 0 libtasks -- Cooperative Task Switching
|
||||||
.index libtasks
|
.index libtasks
|
||||||
.index Task Switching
|
.index Task Switching
|
||||||
.index Cooperative Multitasking
|
.index Cooperative Multitasking
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
.section Libraries
|
||||||
.topic lib.texthelp
|
.topic lib.texthelp
|
||||||
.title Text Help Library
|
.title Text Help Library
|
||||||
.toc 0 Text Help Library
|
.toc 0 Text Help Library
|
||||||
|
|
|
||||||
109
tools/dvxhlpc.c
109
tools/dvxhlpc.c
|
|
@ -39,6 +39,7 @@
|
||||||
#define MAX_LINE_LEN 1024
|
#define MAX_LINE_LEN 1024
|
||||||
#define MAX_TRIGRAMS 65536
|
#define MAX_TRIGRAMS 65536
|
||||||
#define MAX_INCLUDE_DEPTH 16
|
#define MAX_INCLUDE_DEPTH 16
|
||||||
|
#define MAX_SECTIONS 64
|
||||||
#define INITIAL_STRTAB_SIZE 65536
|
#define INITIAL_STRTAB_SIZE 65536
|
||||||
#define INITIAL_BUF_SIZE 65536
|
#define INITIAL_BUF_SIZE 65536
|
||||||
|
|
||||||
|
|
@ -56,6 +57,7 @@ typedef struct {
|
||||||
typedef struct {
|
typedef struct {
|
||||||
char id[128];
|
char id[128];
|
||||||
char title[256];
|
char title[256];
|
||||||
|
char section[64]; // section group (e.g., "Libraries") or empty for root
|
||||||
RecordT *records;
|
RecordT *records;
|
||||||
int32_t recordCount;
|
int32_t recordCount;
|
||||||
int32_t recordCap;
|
int32_t recordCap;
|
||||||
|
|
@ -64,6 +66,7 @@ typedef struct {
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
char title[256];
|
char title[256];
|
||||||
|
char section[64]; // section group this entry belongs to
|
||||||
int32_t topicIdx;
|
int32_t topicIdx;
|
||||||
int32_t depth;
|
int32_t depth;
|
||||||
} TocEntryT;
|
} TocEntryT;
|
||||||
|
|
@ -133,8 +136,9 @@ static int32_t errorCount = 0;
|
||||||
static bool quietMode = false;
|
static bool quietMode = false;
|
||||||
|
|
||||||
// Parse state
|
// Parse state
|
||||||
static const char *currentFile = NULL;
|
static const char *currentFile = NULL;
|
||||||
static int32_t currentLine = 0;
|
static int32_t currentLine = 0;
|
||||||
|
static char currentSection[64] = {0};
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
// Prototypes
|
// Prototypes
|
||||||
|
|
@ -161,6 +165,7 @@ static void parseDirective(const char *line, TopicT **curTopic, bool *inL
|
||||||
static void parseFile(const char *path, TopicT **curTopic, bool *inList, bool *inTable, bool *inCode, bool *inNote, uint8_t *noteFlags, char *para, int32_t *paraLen, int32_t includeDepth);
|
static void parseFile(const char *path, TopicT **curTopic, bool *inList, bool *inTable, bool *inCode, bool *inNote, uint8_t *noteFlags, char *para, int32_t *paraLen, int32_t includeDepth);
|
||||||
static void pass1Parse(int32_t fileCount, char **files);
|
static void pass1Parse(int32_t fileCount, char **files);
|
||||||
static void pass2Wrap(void);
|
static void pass2Wrap(void);
|
||||||
|
static void regroupTocBySections(void);
|
||||||
static void pass3StringTable(void);
|
static void pass3StringTable(void);
|
||||||
static void pass4SearchIndex(void);
|
static void pass4SearchIndex(void);
|
||||||
static int pass5Serialize(const char *outputPath);
|
static int pass5Serialize(const char *outputPath);
|
||||||
|
|
@ -256,6 +261,7 @@ static TopicT *addTopic(const char *id) {
|
||||||
TopicT *t = &topics[topicCount++];
|
TopicT *t = &topics[topicCount++];
|
||||||
memset(t, 0, sizeof(*t));
|
memset(t, 0, sizeof(*t));
|
||||||
snprintf(t->id, sizeof(t->id), "%s", id);
|
snprintf(t->id, sizeof(t->id), "%s", id);
|
||||||
|
snprintf(t->section, sizeof(t->section), "%s", currentSection);
|
||||||
t->recordCap = 32;
|
t->recordCap = 32;
|
||||||
t->records = malloc(sizeof(RecordT) * t->recordCap);
|
t->records = malloc(sizeof(RecordT) * t->recordCap);
|
||||||
if (!t->records) {
|
if (!t->records) {
|
||||||
|
|
@ -307,6 +313,7 @@ static void addTocEntry(const char *title, int32_t topicIdx, int32_t depth) {
|
||||||
TocEntryT *e = &tocEntries[tocCount++];
|
TocEntryT *e = &tocEntries[tocCount++];
|
||||||
snprintf(e->title, sizeof(e->title), "%s", title);
|
snprintf(e->title, sizeof(e->title), "%s", title);
|
||||||
e->title[sizeof(e->title) - 1] = '\0';
|
e->title[sizeof(e->title) - 1] = '\0';
|
||||||
|
snprintf(e->section, sizeof(e->section), "%s", currentSection);
|
||||||
e->topicIdx = topicIdx;
|
e->topicIdx = topicIdx;
|
||||||
e->depth = depth;
|
e->depth = depth;
|
||||||
}
|
}
|
||||||
|
|
@ -464,6 +471,17 @@ static void parseDirective(const char *line, TopicT **curTopic, bool *inList, bo
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Handle .section -- sets section group for subsequent topics/TOC entries
|
||||||
|
if (strcmp(directive, "section") == 0) {
|
||||||
|
if (*rest) {
|
||||||
|
snprintf(currentSection, sizeof(currentSection), "%s", rest);
|
||||||
|
currentSection[sizeof(currentSection) - 1] = '\0';
|
||||||
|
} else {
|
||||||
|
currentSection[0] = '\0';
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (!*curTopic) {
|
if (!*curTopic) {
|
||||||
emitError("directive .%s outside of a topic", directive);
|
emitError("directive .%s outside of a topic", directive);
|
||||||
return;
|
return;
|
||||||
|
|
@ -631,6 +649,8 @@ static void parseFile(const char *path, TopicT **curTopic, bool *inList, bool *i
|
||||||
// Save and set parse state
|
// Save and set parse state
|
||||||
const char *savedFile = currentFile;
|
const char *savedFile = currentFile;
|
||||||
int32_t savedLine = currentLine;
|
int32_t savedLine = currentLine;
|
||||||
|
char savedSection[64];
|
||||||
|
memcpy(savedSection, currentSection, sizeof(savedSection));
|
||||||
currentFile = path;
|
currentFile = path;
|
||||||
currentLine = 0;
|
currentLine = 0;
|
||||||
|
|
||||||
|
|
@ -723,6 +743,87 @@ static void parseFile(const char *path, TopicT **curTopic, bool *inList, bool *i
|
||||||
// Restore parse state
|
// Restore parse state
|
||||||
currentFile = savedFile;
|
currentFile = savedFile;
|
||||||
currentLine = savedLine;
|
currentLine = savedLine;
|
||||||
|
memcpy(currentSection, savedSection, sizeof(currentSection));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ---------------------------------------------------------------------------
|
||||||
|
// regroupTocBySections -- reorder TOC entries by .section directives
|
||||||
|
//
|
||||||
|
// Entries with no section stay at the front in their original order.
|
||||||
|
// Each unique section (in order of first appearance) gets a depth-0
|
||||||
|
// header entry inserted, and all entries in that section are placed
|
||||||
|
// underneath with their depths bumped by 1.
|
||||||
|
// ---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
static void regroupTocBySections(void) {
|
||||||
|
// Collect unique section names in order of first appearance
|
||||||
|
char sectionNames[MAX_SECTIONS][64];
|
||||||
|
int32_t sectionCount = 0;
|
||||||
|
|
||||||
|
for (int32_t i = 0; i < tocCount; i++) {
|
||||||
|
if (tocEntries[i].section[0] == '\0') {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
bool found = false;
|
||||||
|
for (int32_t s = 0; s < sectionCount; s++) {
|
||||||
|
if (strcmp(sectionNames[s], tocEntries[i].section) == 0) {
|
||||||
|
found = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!found) {
|
||||||
|
if (sectionCount >= MAX_SECTIONS) {
|
||||||
|
emitWarning("too many sections (max %d)", MAX_SECTIONS);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
snprintf(sectionNames[sectionCount], sizeof(sectionNames[0]), "%s", tocEntries[i].section);
|
||||||
|
sectionCount++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (sectionCount == 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
TocEntryT *newToc = malloc(sizeof(TocEntryT) * MAX_TOC_ENTRIES);
|
||||||
|
if (!newToc) {
|
||||||
|
fprintf(stderr, "fatal: out of memory\n");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
int32_t newCount = 0;
|
||||||
|
|
||||||
|
// Unsectioned entries first (original order, unchanged depths)
|
||||||
|
for (int32_t i = 0; i < tocCount; i++) {
|
||||||
|
if (tocEntries[i].section[0] == '\0') {
|
||||||
|
newToc[newCount++] = tocEntries[i];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Each section: header entry + grouped entries with depth+1
|
||||||
|
for (int32_t s = 0; s < sectionCount; s++) {
|
||||||
|
// Insert section header (no topic)
|
||||||
|
TocEntryT *hdr = &newToc[newCount++];
|
||||||
|
snprintf(hdr->title, sizeof(hdr->title), "%s", sectionNames[s]);
|
||||||
|
hdr->section[0] = '\0';
|
||||||
|
hdr->topicIdx = -1;
|
||||||
|
hdr->depth = 0;
|
||||||
|
|
||||||
|
// All entries belonging to this section
|
||||||
|
for (int32_t i = 0; i < tocCount; i++) {
|
||||||
|
if (strcmp(tocEntries[i].section, sectionNames[s]) == 0) {
|
||||||
|
newToc[newCount] = tocEntries[i];
|
||||||
|
newToc[newCount].depth += 1;
|
||||||
|
newCount++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
memcpy(tocEntries, newToc, sizeof(TocEntryT) * newCount);
|
||||||
|
tocCount = newCount;
|
||||||
|
free(newToc);
|
||||||
|
|
||||||
|
hlpcInfo(" regrouped TOC: %d sections, %d entries\n", sectionCount, tocCount);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -741,6 +842,7 @@ static void pass1Parse(int32_t fileCount, char **files) {
|
||||||
int32_t paraLen = 0;
|
int32_t paraLen = 0;
|
||||||
|
|
||||||
for (int32_t i = 0; i < fileCount; i++) {
|
for (int32_t i = 0; i < fileCount; i++) {
|
||||||
|
currentSection[0] = '\0';
|
||||||
parseFile(files[i], &curTopic, &inList, &inTable, &inCode, &inNote, ¬eFlags, para, ¶Len, 0);
|
parseFile(files[i], &curTopic, &inList, &inTable, &inCode, &inNote, ¬eFlags, para, ¶Len, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -761,6 +863,9 @@ static void pass1Parse(int32_t fileCount, char **files) {
|
||||||
flushParagraph(curTopic, para, paraLen, type, flags);
|
flushParagraph(curTopic, para, paraLen, type, flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Regroup TOC entries by section
|
||||||
|
regroupTocBySections();
|
||||||
|
|
||||||
hlpcInfo(" %d topic(s), %d TOC entries, %d index entries, %d image(s)\n",
|
hlpcInfo(" %d topic(s), %d TOC entries, %d index entries, %d image(s)\n",
|
||||||
topicCount, tocCount, indexCount, imageCount);
|
topicCount, tocCount, indexCount, imageCount);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
|
.section Widgets
|
||||||
.topic widget.ansiterm
|
.topic widget.ansiterm
|
||||||
.title AnsiTerm
|
.title AnsiTerm
|
||||||
.toc 1 AnsiTerm
|
.toc 0 AnsiTerm
|
||||||
.index AnsiTerm
|
.index AnsiTerm
|
||||||
.index wgtAnsiTerm
|
.index wgtAnsiTerm
|
||||||
.index Terminal
|
.index Terminal
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,8 @@
|
||||||
|
.section Widgets
|
||||||
.topic widget.box
|
.topic widget.box
|
||||||
.title Box (VBox / HBox / Frame)
|
.title Box (VBox / HBox / Frame)
|
||||||
.toc 1 Layout Containers
|
.toc 0 Layout Containers
|
||||||
.toc 1 Box (VBox / HBox / Frame)
|
.toc 0 Box (VBox / HBox / Frame)
|
||||||
.index VBox
|
.index VBox
|
||||||
.index HBox
|
.index HBox
|
||||||
.index Frame
|
.index Frame
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
|
.section Widgets
|
||||||
.topic widget.button
|
.topic widget.button
|
||||||
.title Button
|
.title Button
|
||||||
.toc 1 Button
|
.toc 0 Button
|
||||||
.index Button
|
.index Button
|
||||||
.index wgtButton
|
.index wgtButton
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
|
.section Widgets
|
||||||
.topic widget.canvas
|
.topic widget.canvas
|
||||||
.title Canvas
|
.title Canvas
|
||||||
.toc 1 Canvas
|
.toc 0 Canvas
|
||||||
.index Canvas
|
.index Canvas
|
||||||
.index wgtCanvas
|
.index wgtCanvas
|
||||||
.index wgtCanvasClear
|
.index wgtCanvasClear
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
|
.section Widgets
|
||||||
.topic widget.checkbox
|
.topic widget.checkbox
|
||||||
.title Checkbox
|
.title Checkbox
|
||||||
.toc 1 Checkbox
|
.toc 0 Checkbox
|
||||||
.index Checkbox
|
.index Checkbox
|
||||||
.index wgtCheckbox
|
.index wgtCheckbox
|
||||||
.index wgtCheckboxIsChecked
|
.index wgtCheckboxIsChecked
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
|
.section Widgets
|
||||||
.topic widget.combobox
|
.topic widget.combobox
|
||||||
.title ComboBox
|
.title ComboBox
|
||||||
.toc 1 ComboBox
|
.toc 0 ComboBox
|
||||||
.index ComboBox
|
.index ComboBox
|
||||||
.index wgtComboBox
|
.index wgtComboBox
|
||||||
.index wgtComboBoxSetItems
|
.index wgtComboBoxSetItems
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,8 @@
|
||||||
|
.section Widgets
|
||||||
.topic widget.datactrl
|
.topic widget.datactrl
|
||||||
.title DataCtrl
|
.title DataCtrl
|
||||||
.toc 1 Data Widgets
|
.toc 0 Data Widgets
|
||||||
.toc 1 DataCtrl
|
.toc 0 DataCtrl
|
||||||
.index DataCtrl
|
.index DataCtrl
|
||||||
.index wgtDataCtrl
|
.index wgtDataCtrl
|
||||||
.index Database Binding
|
.index Database Binding
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
|
.section Widgets
|
||||||
.topic widget.dbgrid
|
.topic widget.dbgrid
|
||||||
.title DbGrid
|
.title DbGrid
|
||||||
.toc 1 DbGrid
|
.toc 0 DbGrid
|
||||||
.index DbGrid
|
.index DbGrid
|
||||||
.index wgtDbGrid
|
.index wgtDbGrid
|
||||||
.index wgtDbGridSetDataWidget
|
.index wgtDbGridSetDataWidget
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
|
.section Widgets
|
||||||
.topic widget.dropdown
|
.topic widget.dropdown
|
||||||
.title Dropdown
|
.title Dropdown
|
||||||
.toc 1 Dropdown
|
.toc 0 Dropdown
|
||||||
.index Dropdown
|
.index Dropdown
|
||||||
.index wgtDropdown
|
.index wgtDropdown
|
||||||
.index wgtDropdownSetItems
|
.index wgtDropdownSetItems
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,8 @@
|
||||||
|
.section Widgets
|
||||||
.topic widget.image
|
.topic widget.image
|
||||||
.title Image
|
.title Image
|
||||||
.toc 1 Display Widgets
|
.toc 0 Display Widgets
|
||||||
.toc 1 Image
|
.toc 0 Image
|
||||||
.index Image
|
.index Image
|
||||||
.index wgtImage
|
.index wgtImage
|
||||||
.index wgtImageFromFile
|
.index wgtImageFromFile
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
|
.section Widgets
|
||||||
.topic widget.imagebutton
|
.topic widget.imagebutton
|
||||||
.title ImageButton
|
.title ImageButton
|
||||||
.toc 1 ImageButton
|
.toc 0 ImageButton
|
||||||
.index ImageButton
|
.index ImageButton
|
||||||
.index wgtImageButton
|
.index wgtImageButton
|
||||||
.index wgtImageButtonFromFile
|
.index wgtImageButtonFromFile
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
|
.section Widgets
|
||||||
.topic widget.label
|
.topic widget.label
|
||||||
.title Label
|
.title Label
|
||||||
.toc 1 Label
|
.toc 0 Label
|
||||||
.index Label
|
.index Label
|
||||||
.index wgtLabel
|
.index wgtLabel
|
||||||
.index wgtLabelSetAlign
|
.index wgtLabelSetAlign
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
|
.section Widgets
|
||||||
.topic widget.listbox
|
.topic widget.listbox
|
||||||
.title ListBox
|
.title ListBox
|
||||||
.toc 1 ListBox
|
.toc 0 ListBox
|
||||||
.index ListBox
|
.index ListBox
|
||||||
.index wgtListBox
|
.index wgtListBox
|
||||||
.index wgtListBoxSetItems
|
.index wgtListBoxSetItems
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
|
.section Widgets
|
||||||
.topic widget.listview
|
.topic widget.listview
|
||||||
.title ListView
|
.title ListView
|
||||||
.toc 1 ListView
|
.toc 0 ListView
|
||||||
.index ListView
|
.index ListView
|
||||||
.index wgtListView
|
.index wgtListView
|
||||||
.index wgtListViewSetColumns
|
.index wgtListViewSetColumns
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
|
.section Widgets
|
||||||
.topic widget.progressbar
|
.topic widget.progressbar
|
||||||
.title ProgressBar
|
.title ProgressBar
|
||||||
.toc 1 ProgressBar
|
.toc 0 ProgressBar
|
||||||
.index ProgressBar
|
.index ProgressBar
|
||||||
.index wgtProgressBar
|
.index wgtProgressBar
|
||||||
.index wgtProgressBarV
|
.index wgtProgressBarV
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
|
.section Widgets
|
||||||
.topic widget.radio
|
.topic widget.radio
|
||||||
.title Radio Button
|
.title Radio Button
|
||||||
.toc 1 Radio Button
|
.toc 0 Radio Button
|
||||||
.index Radio
|
.index Radio
|
||||||
.index RadioGroup
|
.index RadioGroup
|
||||||
.index wgtRadio
|
.index wgtRadio
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
|
.section Widgets
|
||||||
.topic widget.scrollpane
|
.topic widget.scrollpane
|
||||||
.title ScrollPane
|
.title ScrollPane
|
||||||
.toc 1 ScrollPane
|
.toc 0 ScrollPane
|
||||||
.index ScrollPane
|
.index ScrollPane
|
||||||
.index wgtScrollPane
|
.index wgtScrollPane
|
||||||
.index wgtScrollPaneScrollToChild
|
.index wgtScrollPaneScrollToChild
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
|
.section Widgets
|
||||||
.topic widget.separator
|
.topic widget.separator
|
||||||
.title Separator
|
.title Separator
|
||||||
.toc 1 Separator
|
.toc 0 Separator
|
||||||
.index Separator
|
.index Separator
|
||||||
.index wgtHSeparator
|
.index wgtHSeparator
|
||||||
.index wgtVSeparator
|
.index wgtVSeparator
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
|
.section Widgets
|
||||||
.topic widget.slider
|
.topic widget.slider
|
||||||
.title Slider
|
.title Slider
|
||||||
.toc 1 Slider
|
.toc 0 Slider
|
||||||
.index Slider
|
.index Slider
|
||||||
.index wgtSlider
|
.index wgtSlider
|
||||||
.index wgtSliderSetValue
|
.index wgtSliderSetValue
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
|
.section Widgets
|
||||||
.topic widget.spacer
|
.topic widget.spacer
|
||||||
.title Spacer
|
.title Spacer
|
||||||
.toc 1 Spacer
|
.toc 0 Spacer
|
||||||
.index Spacer
|
.index Spacer
|
||||||
.index wgtSpacer
|
.index wgtSpacer
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
|
.section Widgets
|
||||||
.topic widget.spinner
|
.topic widget.spinner
|
||||||
.title Spinner
|
.title Spinner
|
||||||
.toc 1 Spinner
|
.toc 0 Spinner
|
||||||
.index Spinner
|
.index Spinner
|
||||||
.index wgtSpinner
|
.index wgtSpinner
|
||||||
.index wgtSpinnerSetValue
|
.index wgtSpinnerSetValue
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
|
.section Widgets
|
||||||
.topic widget.splitter
|
.topic widget.splitter
|
||||||
.title Splitter
|
.title Splitter
|
||||||
.toc 1 Splitter
|
.toc 0 Splitter
|
||||||
.index Splitter
|
.index Splitter
|
||||||
.index wgtSplitter
|
.index wgtSplitter
|
||||||
.index wgtSplitterSetPos
|
.index wgtSplitterSetPos
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
|
.section Widgets
|
||||||
.topic widget.statusbar
|
.topic widget.statusbar
|
||||||
.title StatusBar
|
.title StatusBar
|
||||||
.toc 1 StatusBar
|
.toc 0 StatusBar
|
||||||
.index StatusBar
|
.index StatusBar
|
||||||
.index wgtStatusBar
|
.index wgtStatusBar
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
|
.section Widgets
|
||||||
.topic widget.tabcontrol
|
.topic widget.tabcontrol
|
||||||
.title TabControl
|
.title TabControl
|
||||||
.toc 1 TabControl
|
.toc 0 TabControl
|
||||||
.index TabControl
|
.index TabControl
|
||||||
.index TabPage
|
.index TabPage
|
||||||
.index wgtTabControl
|
.index wgtTabControl
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,8 @@
|
||||||
|
.section Widgets
|
||||||
.topic widget.textinput
|
.topic widget.textinput
|
||||||
.title TextInput / TextArea
|
.title TextInput / TextArea
|
||||||
.toc 1 Input Widgets
|
.toc 0 Input Widgets
|
||||||
.toc 1 TextInput / TextArea
|
.toc 0 TextInput / TextArea
|
||||||
.index TextInput
|
.index TextInput
|
||||||
.index TextArea
|
.index TextArea
|
||||||
.index wgtTextInput
|
.index wgtTextInput
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,8 @@
|
||||||
|
.section Widgets
|
||||||
.topic widget.timer
|
.topic widget.timer
|
||||||
.title Timer
|
.title Timer
|
||||||
.toc 1 Non-Visual Widgets
|
.toc 0 Non-Visual Widgets
|
||||||
.toc 1 Timer
|
.toc 0 Timer
|
||||||
.index Timer
|
.index Timer
|
||||||
.index wgtTimer
|
.index wgtTimer
|
||||||
.index wgtTimerStart
|
.index wgtTimerStart
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,8 @@
|
||||||
|
.section Widgets
|
||||||
.topic widget.toolbar
|
.topic widget.toolbar
|
||||||
.title Toolbar
|
.title Toolbar
|
||||||
.toc 1 Container Widgets
|
.toc 0 Container Widgets
|
||||||
.toc 1 Toolbar
|
.toc 0 Toolbar
|
||||||
.index Toolbar
|
.index Toolbar
|
||||||
.index wgtToolbar
|
.index wgtToolbar
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
|
.section Widgets
|
||||||
.topic widget.treeview
|
.topic widget.treeview
|
||||||
.title TreeView
|
.title TreeView
|
||||||
.toc 1 TreeView
|
.toc 0 TreeView
|
||||||
.index TreeView
|
.index TreeView
|
||||||
.index TreeItem
|
.index TreeItem
|
||||||
.index wgtTreeView
|
.index wgtTreeView
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
.section Widgets
|
||||||
.topic widget.base
|
.topic widget.base
|
||||||
.title Base WidgetT (Common Properties, Events, and Operations)
|
.title Base WidgetT (Common Properties, Events, and Operations)
|
||||||
.toc 0 Widget System
|
.toc 0 Widget System
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
|
.section Widgets
|
||||||
.topic widget.wrapbox
|
.topic widget.wrapbox
|
||||||
.title WrapBox
|
.title WrapBox
|
||||||
.toc 1 WrapBox
|
.toc 0 WrapBox
|
||||||
.index WrapBox
|
.index WrapBox
|
||||||
.index wgtWrapBox
|
.index wgtWrapBox
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue