diff --git a/WIP.ExamplesBuild.md b/WIP.ExamplesBuild.md index 42428cbf0..68f9ff0ed 100644 --- a/WIP.ExamplesBuild.md +++ b/WIP.ExamplesBuild.md @@ -12,10 +12,10 @@ compiles](docs/Documentation/Authoring.md) in Authoring.md. ## State -Of 1,249 `tb` fences in 613 pages, **1,197 are marked `check_build`** and compile, and 52 -are `inert` with a recorded reason. **None is undecided**, so the backlog the census measures -is empty. No fence is an `excerpt`. The run takes about 110 s. 33 of the marked samples are -also `check_run`. +Of 1,530 `tb` fences in 749 pages, **1,370 are marked `check_build`** and compile, and 159 +are `inert` with a recorded reason (107 of them OLEGuids' method signatures). +**None is undecided**, so the backlog the census measures is empty. No fence is an +`excerpt`. The run takes about 110 s. 88 of the marked samples are also `check_run`. New marked samples should come from editing pages, not from marking: the unmarked fences that are left are not programs (see [What cannot be marked](#what-cannot-be-marked)). @@ -298,17 +298,50 @@ updates it, which beats a sample that quietly stops demonstrating anything. Version-controlled exported trees under `test/example-projects//` --- a `Settings` file plus `Sources/`, exactly what `node scripts/impexp.mjs export` produces and what `tbrun` -already consumes. Three exist: +already consumes. Three whole ones exist: | template | references | for | |---|---|---| | `console` | stdole, VB (Forms), AppGlobalClassObject | everything by default | | `packages` | the above plus all eleven other shipped packages | `Reference/Built-In/` and the package tutorials | | `form` | `console`, a delta | a `check_run` sample that needs a real form: drawing, `Cls`, `Print`, `Scale`, a form property. Never inferred: a fence says `project=form` | +| `contributed-` | `console`, a delta: one `Settings` referencing one documented TWINSERV package, embedded | `Reference/Contributed//` | (The table is the three whole templates. The deltas over them --- `vb-private`, `cc-private`, `wnc-private`, `cef-private`, `implicit`, `cef`, `webview2` --- are `TEMPLATE_BASE` in -`scripts/lib/example-batches.mjs`, with `form`.) +`scripts/lib/example-batches.mjs`, with `form` and the `contributed-` ones, which +`TEMPLATE_BASE` gets from the directories so named.) + +**`contributed-`: packages embedded, not committed.** A project uses a TWINSERV +package by embedding its whole exported tree under `Packages//`, with a reference +whose `path32` and `path64` are `/Packages/` (an AutoCompleteLib `.twinpack` embeds +AutoCompleteGuids this way). A template commits only that `Settings`; `embeddedPackages` +reads the references, and `fetchEmbedded` in `check_examples.mjs` downloads each package at +the reference's version from TWINSERV into `%TEMP%\tb-twinserv\_.twinpack`, +unpacks it beside, and copies it into every batch staged from the template. The code is not +the repository's to commit: four of the nine ship no licence file, and WinReg embeds WinDevLib, +14 MB. + +- **One template per package, because a reader's project references one.** With the nine in + one project, VBA_JSON's `Dictionary` class hid the `Scripting.Dictionary` that WinReg's + samples name. +- **A project does not see the names a package's own references declare.** WinReg embeds + WinDevLib, and its samples' `HKEY_CURRENT_USER`, `REGTYPES` and `BOOL` were unresolved + until `contributed-WinReg` referenced WinDevLib (at the version WinReg embeds, 8.8.0.507) + and the Scripting Runtime itself. The WinReg landing page tells the reader the same. +- **An error inside an embedded package is the package's, and fails nothing** + (`splitPackageFaults`). BigNumberLib 0.0.0.0 and WinReg 0.0.0.0 do not compile on BETA + 1005: each passes a pointer to a `ByRef` structure parameter without `ByVal` (TB5001). The + template-alone build finds those rows; the run prints them as a note naming the package + rather than as a template FAIL, every other template row still fails, and the samples are + judged by their own rows as before. Their landing pages say so in a NOTE, and both sections + are excluded from the site until the packages compile; `examples.bat` still compiles their + samples, since it reads every page under `docs/` whatever `exclude:` says. +- **When a section's `indexed_from` moves to a new version, change the version fields in its + `test/example-projects/contributed-/Settings` with it**, or its samples compile + against the old package. A new contributed section needs a template of its own: a copy of + another's `Settings` with the reference's `id`, `name`, `symbolId`, `path32`, `path64` and + version fields (strings) changed, from the package's own `Settings` and its TWINSERV version. **Template inheritance.** `TEMPLATE_BASE` names each template's base. The stager copies base-first, delta-over, so a template holds only the files that *differ*: `vb-private` is diff --git a/WIP.Indexer.md b/WIP.Indexer.md index 65d8409bf..71b36f37d 100644 --- a/WIP.Indexer.md +++ b/WIP.Indexer.md @@ -194,6 +194,57 @@ the old tool's at BETA 997, and it takes half a second with no cache. its 17 values at BETA 997, the first named `" "`, which the committed file lacked until it was derived again. +## `draft` and the doc-draft workflow + +`twin-index draft` turns `report.json` into page plans (`lib/draft-plan.mjs`), and +`indexer/draft/workflow.mjs` is the Claude Code workflow that writes the pages from them. + +- **Placement is read from each section, not from a convention**, because the sections do not + share one: the built-in packages keep enumerations in `Enumerations/`, the contributed ones + beside the classes; a class is `X/index.md` with member pages, `X.md` with its members + inline, or `_App/_App.md`. The draft workflow this replaced derived every path from one rule + (`/.md`, `.md`), which matched no section exactly. Every rule in + `draft-plan.mjs` is a majority over the section's own pages. +- **How well it places, checked by leaving each symbol out** of every section with a store + package (the thirteen built-in and default ones at BETA 997, and the nine contributed ones of + the `contributed-packages` branch) and planning it again: 994 of 998 members land on the file + the section has them on, with its parent and permalink; 138 of 156 types; and the landing + page of each contributed section, planned from the other eight, matches in all nine. The 18 + types that miss are layout choices no API shows: six that are the only type of their kind + in their package, with nothing to follow (`AutoComplete.md`, not `AutoComplete/index.md`; + `_App/_App.md`); seven controls laid out unlike their package's other controls; two + `...State` classes kept in their control's folder; CustomControls' `Constants` module, at + the root while its other modules are in `Framework/`; and two collections whose owner's + folder the check had itself taken away. The four members that miss are documented unlike + the others of their kind in their type, or not at all. The rule that places a type in the + folder of the type returning it is limited to folders that already keep a type, because + without that limit it moved Printer under Printers, Dictionary under JsonConverter and + eight others that the sections keep at their roots. +- **A permalink is computed only where the rule holds for every existing page** of the + section (`followsFolders`). On staging at BETA 997 that is every section but VBA's, whose + pages live under `/tB/Modules/`. A section that breaks the rule once gets no computed + permalinks at all, rather than a guess that a sibling page would contradict. +- **The prep is Node and the workflow is thin**, as Wisdom's extract is + ([WIP.Wisdom.md](WIP.Wisdom.md)): a workflow script cannot read a file, so everything that + needs the tree --- the pages, their titles and permalinks, the kinds of the types they + document --- is decided by tested code, and the agents get finished decisions. The + manifest passed as `args` names the batch files and nothing more, because `args` is written + out by the calling session, at output-token cost; each agent reads its own batch. +- **No two agents write one file.** A batch is a type with its new members, or one type's + members, and the pages that go on one type's one page are never split across batches. The + lists that several batches would all touch --- the landing page's, and a type page's list of + its members --- are left to one agent per package after its batches finish. +- **The check step compiles before a person reads.** One agent per package runs + `check_examples --only` on the section, at a port of its own (9700 up, clear of the + harness's default 9480), and fixes the pages. A contributed package without a + `contributed-` template cannot be compiled, and the agent says so. +- **The agents are Sonnet**, as the content agents of the contributed packages were; the + drafts are read against the sources before they are committed, which no model choice + replaces. +- **It is not in the published docs.** `draft` is (Tools-Build), because its plans serve a + person writing pages by hand; the workflow is described here and in `WIP.md`, because + nothing under `docs/Documentation/` may require Claude. + ## Open items - **`diffApi` reports `attributes` as changed as well as `signature` when only a property's diff --git a/WIP.md b/WIP.md index ffdea2313..b8494b06a 100644 --- a/WIP.md +++ b/WIP.md @@ -33,6 +33,8 @@ sibling. History goes nowhere: git keeps it. Reference documentation is **complete** for all thirteen packages: VBA, VBRUN, VB, WebView2, Assert, CustomControls, CEF, WinEventLogLib, WinNamedPipesLib, WinServicesLib, tbIDE, WinNativeCommonCtls and AppGlobalClassObject. It is adapted from primary sources: Microsoft VBA-Docs (CC-BY-4.0) for the runtime library, `.twin` source for the twinBASIC-specific packages. The CEF and WebView2 packages also carry a tutorial set. +Eleven **contributed** packages from TWINSERV have sections under `docs/Reference/Contributed/`: FileProps, Fmt, OLEGuids, WinReg, TwinTimerPackage, TBMANLIB_ListBoxHScroll, TBMANLIB_RES and VBA_JSON complete; AutoCompleteLib, BigNumberLib and VBComDlg their main class only. Fmt documents its test code (`HelloWorldClass`, `HelloWorldModule`, `Pootle`) in one paragraph of its landing page, which `exclude_from_docs` names; OLEGuids documents each interface's methods on the interface's page. Each published one has a chapter in the book's Packages part. **BigNumberLib and WinReg are not published**: their packages do not compile on BETA 1005, so their pages are kept but excluded in `_config.yml`'s `exclude:` (owner, 2026-10-11), whose comment says how to bring one back. + The rest of this file is the maintenance guide for updating existing pages or adding new ones: package surface notes, page conventions, and the integrity check. ## Where things live @@ -43,7 +45,8 @@ The rest of this file is the maintenance guide for updating existing pages or ad > that ship with the IDE but are referenced on demand (`AppGlobalClassObject`, `CEF`, > `CustomControls`, `TwinBasicAssertions`, `WebView2`, `WinEventLogLib`, > `WinNamedPipesLib`, `WinNativeCommonCtls`, `WinServicesLib`, `tbIDE`). `Core/` is not -> nested. +> nested. The contributed packages from TWINSERV sit in `docs/Reference/Contributed/`, and +> unlike the others their URLs say so: `/tB/Packages/Contributed//`. > > **The folder layout does not affect URLs.** Every `permalink:` is independent of it, so the > [Cross-section linking](WIP.Authoring.md#cross-section-linking) tables are unaffected --- they @@ -75,6 +78,7 @@ The rest of this file is the maintenance guide for updating existing pages or ad > would file the page as a *static file* and serve the raw markdown. Editors on > Windows add a BOM unasked. `lib/frontmatter.mjs` strips a leading BOM before parsing. - `docs/Reference/Built-In/tbIDE/` — IDE Extensibility package (this is the **addin SDK**). The package is type-only — it ships **public interfaces + CoClasses** that an addin DLL binds to; every implementation behind them lives in the twinBASIC IDE itself. The user-facing surface is one entry-point factory (`tbCreateCompilerAddin`) plus 23 CoClasses grouped by role: the addin contract (`AddIn`), the root API (`Host`), the loaded `Project`, the editors collection (`Editor` / `CodeEditor` / `Editors`), the virtual file system (`FileSystem` / `FileSystemItem` / `Folder` / `File`), the in-IDE UI surface (`Toolbar` / `Toolbars` / `Button` / `ToolWindow` / `ToolWindows`), the HTML DOM inside a tool window (`HtmlElement` / `HtmlElements` / `HtmlElementProperty` / `HtmlElementProperties` / `HtmlEventProperty` / `HtmlEventProperties`), the `DebugConsole`, `KeyboardShortcuts`, `Themes`, and the single concrete user-instantiable helper class `AddinTimer`. Flat layout — one page per CoClass / Class plus the index landing. +- `docs/Reference/Contributed/` — the contributed packages, one folder each, landing page `Contributed.md` beside it. **A package's landing page opens, under its H1, with `**Author:**`** (owner, 2026-10-11): the publisher TWINSERV lists (`publisher` in `indexer/.packages/manifests/contributed.json`), or the author the package's own sources name when that is someone else (VBA_JSON: Tim Hall, published by WaynePhillipsEA). Then `**On GitHub:**` with a link, when a repository holds the package, or the library the package says it is made from; search GitHub for the package's name and the author's account, and check that the repository holds the package's code (its history too: `TBMANLIB_*` were never in woeoio's `tbman`). A landing page with one or two sections has no `* TOC` list. A class with member pages is a folder, `/index.md` at `/tB/Packages/Contributed///` with its members beside it, so a member links to its class as `(.)`; a class documented on one page is `.md`. Each package is a chapter of the book's Packages part in `_book.yml`. A section's `indexed_from` is the four-part TWINSERV version, and its snapshot is under `indexer/snapshots/contributed/`. Its samples compile in the `contributed-` sample template, whose `Settings` names the package's version: **change that version with `indexed_from`** ([WIP.ExamplesBuild.md](WIP.ExamplesBuild.md#template-projects)). **A contributed package is documented and its samples compiled against the newest twinBASIC BETA installed, never an older one** (owner, 2026-10-11): the version that matters is the package's, and a statement about the compiler (such as "does not compile on BETA 1005") names that newest build. - `docs/Reference/Statements.md` — alphabetical index of language statements. - `docs/Reference/Procedures and Functions.md` — alphabetical index of procedures/functions. - `docs/LLVM/` — the LLVM section: compiling with the LLVM back end. A top-level section between Features and Reference Section in the nav, at `nav_order: 6` (Features is 5). `index.md` is the landing page and `Getting-Started.md` the only page so far, with its screenshots under `Images/`. Everything it describes arrived in **BETA 984**. Its language claims are measured on BETA 995 with `tbrun --llvm` and `--exe`: the comma, space and comma-space spellings of `[CompilerOptions]` all turn LLVM and `+optimize` on, `[CompilerOptions("")]` turns it off under project-wide LLVM, the long CPU-flag sample runs, and an error is lost between procedures when either the callee or the caller is LLVM-compiled. Its samples are marked `check_build`, which compiles them; `examples.bat --llvm` also builds them with LLVM. @@ -415,6 +419,14 @@ as it is. The rules: - **Run `analyze` to find what a page set lacks**, before and after a batch of pages; see the [per-symbol workflow](WIP.Authoring.md#per-symbol-workflow). +- **`draft` places what `analyze` lists**: each page's file, parent and permalink, from the + section's own layout, in `indexer/.packages/draft/`. To have Claude write the drafts, pass the + parsed `indexer/.packages/draft/manifest.json` as `args` to the Workflow tool with `scriptPath: + "indexer/draft/workflow.mjs"` --- only when the owner asks for it, since it runs one agent per + batch of twelve pages and three per package. It writes pages and compiles their samples, and + commits nothing; read every draft against its source before committing it. The workflow is + described here and in [WIP.Indexer.md](WIP.Indexer.md) only: nothing under + `docs/Documentation/` may require Claude. - **Bump a section's `indexed_from` when its package is re-indexed**, and commit the pages, the new `indexed_from`, the new snapshots and `derive`'s `builder/package-api.json` together. `analyze` compares with the snapshot at `HEAD` and only when its `version` is the @@ -461,7 +473,7 @@ No build gate evaluates a `tb` fence: `check_code_regions.mjs` only protects its the compiler. A sample opts in by carrying `check_build` in its fence info string. The tool works out what to generate around it, packs many samples into one project, builds them through `tbbuild` on concurrent lanes, and reports each diagnostic against the line in the -page it came from. **1,197 samples are marked, and the run takes about 110 seconds.** +page it came from. **1,370 samples are marked, and the run takes about 110 seconds.** It is **never** wired into `build.bat`, `check.bat`, `test.bat` or CI: it needs a twinBASIC install, which `npm install` is not, and Windows with a private desktop and a @@ -502,7 +514,7 @@ Why the report separates the wedged task from the merely blocked ones, and why - `test.bat` — the tests the *toolchain* has to pass: the publish-allowlist self-test (`scripts/check_publish_policy.mjs`), the gate-list check (`scripts/check_gate_lists.mjs`), the CI-workflow roster check (`scripts/check_ci_workflows.mjs`), the lint gate (`scripts/check_lint.mjs`), the site-search unit tests (`node --test test/search.test.mjs`), the markdown-plugin unit tests (`node --test test/render.test.mjs`), the date-formatter unit tests (`node --test test/strftime.test.mjs`), the bug-reproducer picture tests (`node --test test/png.test.mjs`), the embedded-image tests (`node --test test/compact-image.test.mjs`), the SVG screenshots' one-line test (`node --test test/svgshot.test.mjs`), `check_examples.mjs`'s probes (`node --test test/example-batches.test.mjs`), the port-claim unit tests (`node --test test/ports.test.mjs`), the add-in project-file tests (`node --test test/addin-project.test.mjs`), the package-indexer tests (`node --test test/indexer.test.mjs`), the regex-safety gate (`scripts/check_regex_safety.mjs`), the code-region gate (`scripts/check_code_regions.mjs`), the page-count drift-guard probes (`scripts/check_page_baseline.mjs`), the book-coverage probes (`scripts/check_book_coverage.mjs`), the symbol-index probes (`scripts/check_symbol_index.mjs`), the twinBASIC-scanner probes (`scripts/check_twin_parsers.mjs`), the attribute-sweep probes (`scripts/check_attribute_sweep.mjs`), the command-line probes and cases (`scripts/check_cli.mjs`), the pdf-lib shim comparison (`scripts/check_pdf_shims_equiv.mjs`), the impexp parity check (`scripts/check_impexp_parity.mjs`), and the axe source-patch verification (`scripts/check_axe_patch_equiv.mjs`). ~23 s, of which the regex-safety gate is ~10 s and the impexp check ~4 s. See [What belongs in test.bat rather than check.bat](WIP.Build.md#what-belongs-in-testbat-rather-than-checkbat). - `book.bat` — renders the PDF from `docs\_site-pdf\book.html` via `node book\render-book.mjs` into `docs\_pdf\twinBASIC Book.pdf`. Run `build.bat` first to populate `_site-pdf/`; `book.bat` refuses a tree older than its sources rather than rendering the previous book (see [The book refuses a stale source tree](WIP.Build.md#the-book-refuses-a-stale-source-tree)). -- `examples.bat` — compiles the documentation's own twinBASIC code samples, every `tb` fence marked `check_build`, and reports the ones the compiler refuses against the line in the page they came from; a statement sample also marked `check_run` is built and run, and what it prints is checked against the page. Needs a twinBASIC install and Windows, so it is outside every gate and outside CI; ~110 s over the 1,197 samples marked (33 of them `check_run`). `--build` also builds each project that compiles clean, and `--llvm` builds it with LLVM (see [WIP.ExamplesBuild.md](WIP.ExamplesBuild.md)). Two modes need no compiler at all: `--census` classifies every fence and says how many classifiable ones are still unmarked, and `--report ` groups a saved `--propose --json` survey by diagnostic, section and unresolved name. `--propose` itself does compile. See [Compiling the reference's own code samples](#compiling-the-references-own-code-samples) and [WIP.ExamplesBuild.md](WIP.ExamplesBuild.md). +- `examples.bat` — compiles the documentation's own twinBASIC code samples, every `tb` fence marked `check_build`, and reports the ones the compiler refuses against the line in the page they came from; a statement sample also marked `check_run` is built and run, and what it prints is checked against the page. Needs a twinBASIC install and Windows, so it is outside every gate and outside CI; ~110 s over the 1,370 samples marked (88 of them `check_run`). `--build` also builds each project that compiles clean, and `--llvm` builds it with LLVM (see [WIP.ExamplesBuild.md](WIP.ExamplesBuild.md)). Two modes need no compiler at all: `--census` classifies every fence and says how many classifiable ones are still unmarked, and `--report ` groups a saved `--propose --json` survey by diagnostic, section and unresolved name. `--propose` itself does compile. See [Compiling the reference's own code samples](#compiling-the-references-own-code-samples) and [WIP.ExamplesBuild.md](WIP.ExamplesBuild.md). - `addin-test.bat` — tests IDE add-ins by operating an IDE: every lane in `test/addin/lanes.mjs` builds the add-ins it tests into a private copy of the install, opens a project and checks what the add-in does. Outside every gate and outside CI for the same reasons as `examples.bat`; about two minutes for the seventeen lanes today (BETA 997): Samples 10 and 15, the thirteen probe lanes behind Stage 2's answers in [WIP.HelpAddin.md](WIP.HelpAddin.md), and the help add-in in `add-in/` twice, built with its committed copy of the symbol index, `add-in/Resources/SYMBOLS/symbols.json`, which a local build rewrites whenever the index changes. The `help` lane serves the built `docs/_site` on localhost to the add-in's pane; `help-offline` builds the add-in with a help archive of `docs/_site-offline` and the pane's pages come from the add-in's own server. So run `build.bat` first. Exit 0 every lane passed and the registry is as it was found, 1 a lane failed, 2 the harness failed, 3 the registry or a work folder was not put back. See [Driving the twinBASIC compiler](#driving-the-twinbasic-compiler) for its rules. - `ide-test.bat` --- the same runner for scenarios that operate the IDE itself rather than an add-in: every lane in `test/ide/lanes.mjs`, base port 9660. Same exit codes, same standing outside every gate and outside CI, same rules. - `try-help-addin.bat` --- opens one IDE on the user's desktop with the help add-in built and loaded, to try it by hand, and puts the registry back once it is closed (see [Driving the twinBASIC compiler](#driving-the-twinbasic-compiler)). Needs `build.bat` first. Exit 0 closed and put back, 1 the add-in or the project did not compile, 2 the tool could not run, 3 not put back. diff --git a/biome.jsonc b/biome.jsonc index c41a991bd..a26ba784d 100644 --- a/biome.jsonc +++ b/biome.jsonc @@ -25,11 +25,12 @@ "!book/lib/paged.browser.js", "!book/lib/outline.mjs", "!book/lib/postprocesser.mjs", - // A Workflow script, not a module: the agent Workflow engine runs it as + // Workflow scripts, not modules: the agent Workflow engine runs each as // a function body, so it ends in a top-level `return`, which no module - // parser accepts. check_regex_safety.mjs still reads its regexes, through - // acorn's allowReturnOutsideFunction. + // parser accepts. check_regex_safety.mjs still reads their regexes, + // through acorn's allowReturnOutsideFunction. "!wisdom/extract/workflow.mjs", + "!indexer/draft/workflow.mjs", // Trees the gates read as data. "!test/fixtures" ] diff --git a/builder/page-baseline.json b/builder/page-baseline.json index fcbd962c5..4a589d5f5 100644 --- a/builder/page-baseline.json +++ b/builder/page-baseline.json @@ -1,5 +1,5 @@ { "src": "docs", - "pages": 935, + "pages": 1066, "staticFiles": 794 } diff --git a/docs/Documentation/Tools-Build.md b/docs/Documentation/Tools-Build.md index 3d798aecf..035cbd455 100644 --- a/docs/Documentation/Tools-Build.md +++ b/docs/Documentation/Tools-Build.md @@ -155,9 +155,10 @@ Exit codes: **0** the table was written or is unchanged (with `--check`, it is c node indexer/twin-index.mjs sync [--package | --packages ,] [--ide | --release] node indexer/twin-index.mjs analyze [--package | --packages , | --all] + node indexer/twin-index.mjs draft [--package | --packages ,] node indexer/twin-index.mjs derive [--check] [--out ] [--ide | --release] -The package indexer, which finds the documentation work that a new twinBASIC build leaves. `sync` reads the sources of the packages and writes an `api.json` snapshot of each: every type the package declares and every member of each, with its visibility, kind and declaration. `analyze` compares the current snapshot of each documented package with the one the reference was last brought up to date with, and reports the public symbols to create a page for, to update and to remove. `derive` writes `builder/package-api.json`, the package half of the [symbol index](Building#the-symbol-index); see [The symbol index's packages](#package-api) below. +The package indexer, which finds the documentation work that a new twinBASIC build leaves. `sync` reads the sources of the packages and writes an `api.json` snapshot of each: every type the package declares and every member of each, with its visibility, kind and declaration. `analyze` compares the current snapshot of each documented package with the one the reference was last brought up to date with, and reports the public symbols to create a page for, to update and to remove. `draft` turns that report into the list of pages to write or change, each with its file, its parent and its permalink. `derive` writes `builder/package-api.json`, the package half of the [symbol index](Building#the-symbol-index); see [The symbol index's packages](#package-api) below. The build does not run it and it is not a gate. It sits in `indexer/` rather than `scripts/` because it keeps state of its own. It reads the sources with `scripts/lib/twin-api.mjs`, the repository's one scanner of twinBASIC declarations, which [`check_symbol_index.mjs`](Tools-Toolchain-Tests#check-symbol-index) and [`check_twin_parsers.mjs`](Tools-Toolchain-Tests#check-twin-parsers) test. [`test/indexer.test.mjs`](Tools-Toolchain-Tests#indexer-test) tests it without a network, git or a twinBASIC install. The layout of `indexer/` and the format of `api.json` are in [`indexer/README.md`](https://github.com/twinbasic/documentation/blob/main/indexer/README.md). @@ -165,8 +166,8 @@ The build does not run it and it is not a gate. It sits in `indexer/` rather tha | Option | Command | Effect | |---|---|---| -| `--package ` | `sync`, `analyze` | Limits the command to one package, by the name the store has. | -| `--packages ,` | `sync`, `analyze` | The same for a comma-separated list. Not with `--package`. | +| `--package ` | `sync`, `analyze`, `draft` | Limits the command to one package, by the name the store has. | +| `--packages ,` | `sync`, `analyze`, `draft` | The same for a comma-separated list. Not with `--package`. | | `--all` | `analyze` | Covers every package in the store, not only the documented ones. Not with `--package` or `--packages`. | | `--ide ` | `sync`, `derive` | The twinBASIC install to read the built-in and default packages from. Not with `--release`. | | `--release` | `sync`, `derive` | Downloads the built-in and default packages from the latest GitHub release. | @@ -182,6 +183,7 @@ A name that matches no package is reported, the other packages are done, and the | `indexer/.packages/` | no | The store, a git repository of its own that `sync` creates. Each package has its `sources/`, its `Settings` file, its `api.json` and an `indexer.json` that records which version of the scanner wrote the `api.json`. A new store starts from the committed snapshots, so its history shows what changed in each package's API. | | `indexer/.packages/manifests/` | no | What was last read: `built-in.json` (the source, `install` or `release`, and the build) and `contributed.json` (the TWINSERV versions). They never hold the path of an install, which contains a user name. | | `indexer/.packages/report.json` | no | The report of the last `analyze`. | +| `indexer/.packages/draft/` | no | What the last `draft` placed: a plan for each package, its pages in batches, and `manifest.json`, which lists them. | | `indexer/snapshots///api.json` | yes | A copy of the `api.json` of each package the reference documents, for `analyze` to compare with. `` is `default`, `built-in` or `contributed`. | `sync` judges a package by what the store holds, never by the manifest. A package is read again when the store lacks its sources or its `api.json`, or holds an `api.json` in an older format or from another build. A package whose `api.json` another version of the scanner wrote is indexed again from the sources already in the store, with no download. A clone has no store, so its first `sync` reads every package. @@ -195,17 +197,19 @@ A name that matches no package is reported, the other packages are done, and the `analyze` exits 0 whenever it writes its report, whatever the report lists: the list is the product, not a failure. +**What `draft` places.** `draft` reads the last report and, for each package in it (or each one `--package` or `--packages` names), writes the plan `indexer/.packages/draft/.json`. Each entry names the page file to write or change, the title of its parent, and its permalink, all taken from what most of the section's pages do: a new type goes in the folder the section keeps that kind of type in (an `Enumerations/` folder, or beside the classes), as a folder with an `index.md` or as one page as those types are; a type that another type returns, such as a collection's item, goes in that type's folder when the folder already holds a type; and a new member gets a page of its own or goes on its type's page, as that type's other members do. A permalink is filled in only when every page of the section has the permalink its folders give it, which is so for every section except VBA's; otherwise it is left to follow the sibling pages. Each entry also names a page of the same kind in the section to follow, and the source file that declares the symbol. A package with no section gets one in its group's folder, with a landing page titled and placed like those of the group's other sections. A symbol no page can be found for, such as a member of a type that has no page, is listed as unplaced. A symbol the build no longer declares is listed with the page that documents it. The pages are also split into batches, one file each, for whoever writes them in parallel. + **Moving the reference to a new build:** 1. Run `sync` and `derive` with the new install. `sync` writes the new snapshots into the working tree, and `analyze` still compares with the ones at `HEAD`; `derive` writes the new `builder/package-api.json`. -2. Run `analyze` and write the pages it lists. +2. Run `analyze`, then `draft`, and write the pages the plans list, where they say. 3. Set `indexed_from` on each section to the new build's tag (`beta-x-0997` is BETA 997), and commit the pages, the new `indexed_from`, the new snapshots and `builder/package-api.json` together. A snapshot committed on its own, or an `indexed_from` that is not the snapshot's `version`, sends the next `analyze` into audit mode. **After a change to the scanner or the model.** The code that writes `api.json` is `scripts/lib/twin-api.mjs`, `scripts/lib/twin-declarations.mjs`, `indexer/lib/api-model.mjs` and `indexer/lib/vb6-preprocess.mjs`. A change to any of them, the `format` number of `api.json` included, can change what the same sources index to. The next `sync` indexes every package again, and the committed snapshots have to be written again from the build they record, with `sync --ide` naming that build's install, in the same commit as the change. Otherwise `analyze` compares the output of the new code with that of the old and reports the difference as changes to the API. `--release` cannot do this: it downloads only the latest release. **The symbol index's packages.**{: #package-api } `derive` writes `builder/package-api.json`: every type the built-in and default packages declare, public or not, and the public members of each with their kinds, in declaration order. The [symbol index](Building#the-symbol-index) takes its entries from the pages, and this file adds the kind of a member documented on a page of its own, an enumeration's values, and the interface a CoClass's members are declared on. It also says which public symbols no page documents. `derive` reads every package of the install, or of the latest release with `--release`, and parses them as `sync` does, so it needs no store and no `sync` first. The snapshots cannot serve instead: they hold only the documented packages, and keep no declaration order. Packages are keyed by the project name, which is not always the package's: TwinBasicAssertions is `Assert`, and the three CEF builds are one `cefPackage`, whose APIs `derive` checks are identical. The file is committed and the build never writes it, because that needs the packages. Run `derive` with the same install as `sync` when the reference moves to a new build, and commit the file with the pages and the snapshots. `--check` compares instead of writing. -Exit codes: **0** the command finished: `sync` wrote every package it was asked for, or found it up to date; `analyze` wrote its report; `derive` wrote the file, or with `--check` found it up to date. **1** a package named by `--package` or `--packages` failed to sync, or does not exist, and the others were done; with `derive --check`, the file is stale. **2** a refused command line, no twinBASIC install found, no snapshots to analyze (run `sync` first), packages that declare different APIs under one project name (`derive`), or a crash. +Exit codes: **0** the command finished: `sync` wrote every package it was asked for, or found it up to date; `analyze` wrote its report; `draft` placed its pages; `derive` wrote the file, or with `--check` found it up to date. **1** a package named by `--package` or `--packages` failed to sync, or does not exist, or is not in the report (`draft`), and the others were done; with `derive --check`, the file is stale. **2** a refused command line, no twinBASIC install found, no snapshots to analyze (run `sync` first), no report to place pages from (run `analyze` first), packages that declare different APIs under one project name (`derive`), or a crash. ## convert_em_dash_separators.mjs {: #convert-em-dash-separators } diff --git a/docs/Documentation/Tools-Samples.md b/docs/Documentation/Tools-Samples.md index 0c72298e3..c54fea1db 100644 --- a/docs/Documentation/Tools-Samples.md +++ b/docs/Documentation/Tools-Samples.md @@ -56,6 +56,7 @@ Each marked sample is generated into its own `Module tbx_`, packed with a - `console` is the default. - `packages` references every package the IDE ships. A page under `Reference/Built-In/` or a package tutorial gets it without asking. - `form` is `console` with a real, empty `Form1`, for the samples that draw on a form or read its properties: a form made in code has no designer file and cannot be drawn on. +- `contributed-` is `console` with a reference to one contributed package, at the version its section's `indexed_from` names, and to what that package's samples name besides (WinReg's take WinDevLib's constants). A page under `Reference/Contributed//` gets it without asking, so each package's samples compile in a project that references that package alone, as a reader's does. The packages are not in the repository: the tool downloads each version from TWINSERV the first time it is needed, keeps it in `%TEMP%\tb-twinserv\`, and embeds it in every project built from the template. So the first run of these samples needs the network. An error inside an embedded package's own source fails nothing: the run reports it as a note naming the package, since the package is someone else's code, and the package's page says it does not compile. After each `check_run` sample the run unloads every form the sample left loaded, so a sample that forgets `Unload Form1` neither keeps the run waiting nor leaves its drawing for the next sample. diff --git a/docs/Reference/Contributed.md b/docs/Reference/Contributed.md new file mode 100644 index 000000000..552413c36 --- /dev/null +++ b/docs/Reference/Contributed.md @@ -0,0 +1,23 @@ +--- +title: Contributed Packages +parent: Packages +nav_order: 3 +permalink: /tB/Packages/Contributed/ +has_toc: false +--- + +# Contributed Packages + +Community-authored packages published through TWINSERV, the twinBASIC package registry. To use a contributed package, add it to Project → References (Ctrl-T) → Available Packages. + +Each package is versioned apart from twinBASIC, and its section says which version it documents. + +- [**AutoCompleteLib**](AutoCompleteLib/) -- Windows shell auto-complete for text-input controls +- [**FileProps**](FileProps/) -- the Windows shell properties of a file, read and written +- [**Fmt**](Fmt/) -- **StringFormat**, a string built from a format string and values, in the style of C#'s **String.Format** +- [**OLEGuids**](OLEGuids/) -- OLE and COM interfaces and structures in twinBASIC source, in place of `OLEGuids.tlb` +- [**TBMANLIB_ListBoxHScroll**](TBMANLIB_ListBoxHScroll/) -- a horizontal scroll bar for a **ListBox** +- [**TBMANLIB_RES**](TBMANLIB_RES/) -- resources embedded in an executable, as bytes, strings, hex, Base64 or pictures +- [**TwinTimerPackage**](TwinTimerPackage/) -- a Win32 timer class that reports the elapsed time +- [**VBA_JSON**](VBA_JSON/) -- JSON parsing and serialization, with UTC and ISO 8601 date conversion +- [**VBComDlg**](VBComDlg/) -- the **CommonDialog** class, for the Windows common dialogs diff --git a/docs/Reference/Contributed/AutoCompleteLib/AutoComplete.md b/docs/Reference/Contributed/AutoCompleteLib/AutoComplete.md new file mode 100644 index 000000000..b5738cd1b --- /dev/null +++ b/docs/Reference/Contributed/AutoCompleteLib/AutoComplete.md @@ -0,0 +1,178 @@ +--- +title: AutoComplete +parent: AutoCompleteLib Package +permalink: /tB/Packages/Contributed/AutoCompleteLib/AutoComplete +has_toc: false +--- + +# AutoComplete class +{: .no_toc } + +A class that attaches Windows shell auto-complete behaviour to a text-input control's window handle. + +**AutoComplete** wraps the `IAutoComplete2` COM interface. After calling [**Init**](#init) with the window handle of an edit box and a source type, the Windows shell begins offering suggestions as the user types. The source can be the shell history, the file system, the most-recently-used list, all three combined, or a custom string array supplied through [**CustomSource**](#customsource). + +```tb check_build +Private m_AC As AutoComplete + +Private Sub Form_Load() + Set m_AC = New AutoComplete + m_AC.Init Text1.hWnd, AutoCompleteSourceHistory + m_AC.Options = AutoCompleteOptionSuggestAppend +End Sub +``` + +* TOC +{:toc} + +## Properties + +### CustomSource +{: .no_toc } + +Returns or sets a one-dimensional **String** array used as the suggestion list when [**Init**](#init) is called with **AutoCompleteSourceCustomSource**. + +Syntax: *object*.**CustomSource** [ = *StringArray* ] + +*StringArray* +: A one-dimensional **Variant** holding a **String** array. Empty strings and non-string elements are silently ignored. Assigning **Empty** clears the list. A two-or-more-dimensional array raises run-time error 5 ("Array must be single dimensioned"). An unallocated array raises run-time error 91. Any other value that is not an array raises run-time error 380. + +The getter returns the filtered array currently stored in the object. Assigning a new value replaces the previous list in full; there is no way to append individual entries. + +### FileSystemOptions +{: .no_toc } + +Returns or sets the file-system objects enumerated when the source is **AutoCompleteSourceFileSystem** or **AutoCompleteSourceAll**. + +Syntax: *object*.**FileSystemOptions** [ = *value* ] + +*value* +: One or more **AutoCompleteFileSystemOptionConstants** values combined with `Or`. + +| Constant | Value | Description | +|----------|-------|-------------| +| **AutoCompleteFileSystemOptionNone** | 0 | No specific file-system objects. | +| **AutoCompleteFileSystemOptionCurrentDir** | 1 | The current directory. | +| **AutoCompleteFileSystemOptionMyComputer** | 2 | Objects under *My Computer*. | +| **AutoCompleteFileSystemOptionDesktop** | 4 | Desktop objects. | +| **AutoCompleteFileSystemOptionFavorites** | 8 | Favorites folder contents. | +| **AutoCompleteFileSystemOptionFileSysOnly** | 16 | File-system items only (no virtual shell folders). | +| **AutoCompleteFileSystemOptionFileSysDirs** | 32 | Directories only. | + +### Options +{: .no_toc } + +Returns or sets flags that control how the completion works. + +Syntax: *object*.**Options** [ = *value* ] + +*value* +: One or more **AutoCompleteOptionConstants** values combined with `Or`. + +| Constant | Value | Description | +|----------|-------|-------------| +| **AutoCompleteOptionNone** | &H0 | No special behaviour. | +| **AutoCompleteOptionAppend** | &H2 | Appends the best match to the typed text inline. | +| **AutoCompleteOptionSuggest** | &H1 | Shows a drop-down list of suggestions. | +| **AutoCompleteOptionSuggestAppend** | &H3 | Both **AutoCompleteOptionSuggest** and **AutoCompleteOptionAppend**. | +| **AutoCompleteOptionSearch** | &H4 | Adds a search item at the bottom of the drop-down list. | +| **AutoCompleteOptionFilterPrefixes** | &H8 | Does not match common prefixes such as `www.` and `http://`. | +| **AutoCompleteOptionUseTab** | &H10 | Selects the highlighted suggestion when the user presses **Tab**. | +| **AutoCompleteOptionUpDownKeyDropsList** | &H20 | Opens the drop-down list when the user presses the **Up** or **Down** arrow key. | + +## Methods + +### Disable +{: .no_toc } + +Disables auto-complete without destroying the object. + +Syntax: *object*.**Disable** + +Auto-complete stops offering suggestions. Call [**Enable**](#enable) to turn it back on without calling [**Init**](#init) again. + +### DroppedDown +{: .no_toc } + +Returns whether the suggestion drop-down list is currently visible. + +Syntax: *object*.**DroppedDown** ( ) **As Boolean** + +Returns **True** when the drop-down is open, **False** otherwise. The return value is **False** if the `IAutoCompleteDropDown` interface cannot be obtained. + +### Enable +{: .no_toc } + +Re-enables auto-complete after a call to [**Disable**](#disable). + +Syntax: *object*.**Enable** + +### Init +{: .no_toc } + +Attaches auto-complete to a text-input control. + +Syntax: *object*.**Init** *hWndEdit*, *Source* + +*hWndEdit* +: *required* A **LongPtr** (32-bit: **Long**) containing the window handle of the edit control that should receive suggestions. + +*Source* +: *required* An **AutoCompleteSourceConstants** value identifying where suggestions come from. + +| Constant | Value | Description | +|----------|-------|-------------| +| **AutoCompleteSourceNone** | 0 | Not valid; passing this value raises run-time error 380. | +| **AutoCompleteSourceHistory** | 1 | The shell history list (the `ACLHistory` shell object). | +| **AutoCompleteSourceFileSystem** | 2 | File-system paths, filtered by [**FileSystemOptions**](#filesystemoptions). | +| **AutoCompleteSourceMRU** | 3 | The shell most-recently-used list. | +| **AutoCompleteSourceAll** | 4 | History, file system, and MRU combined through an `IObjMgr`. | +| **AutoCompleteSourceCustomSource** | 5 | The one-dimensional string array set through [**CustomSource**](#customsource). | + +The target control must exist when **Init** is called, and **Init** is called before the user starts typing. Calling **Init** with **AutoCompleteSourceNone**, or with any other value outside the table, raises run-time error 380 (Invalid property value). If the internal `IAutoComplete2` object could not be created when the **AutoComplete** object was created, **Init** exits silently. + +### Refresh +{: .no_toc } + +Forces the drop-down list to rebuild its suggestions from the current source. + +Syntax: *object*.**Refresh** + +Calls `IAutoCompleteDropDown.ResetEnumerator` on the underlying COM object. Use this after modifying [**CustomSource**](#customsource) while the list is open, or whenever the suggestion set changes at run time. + +## Example + +This example attaches file-system auto-complete to a text box and restricts suggestions to directories. + +```tb check_build +Private m_AC As AutoComplete + +Private Sub Form_Load() + Set m_AC = New AutoComplete + m_AC.FileSystemOptions = AutoCompleteFileSystemOptionFileSysDirs + m_AC.Options = AutoCompleteOptionSuggestAppend + m_AC.Init Text1.hWnd, AutoCompleteSourceFileSystem +End Sub +``` + +This example supplies a fixed custom list. + +```tb check_build +Private m_AC As AutoComplete + +Private Sub Form_Load() + Set m_AC = New AutoComplete + m_AC.CustomSource = Array("Apple", "Apricot", "Avocado", "Banana", "Blueberry") + m_AC.Options = AutoCompleteOptionSuggest + m_AC.Init Text1.hWnd, AutoCompleteSourceCustomSource +End Sub + +Private Sub btnRefresh_Click() + m_AC.CustomSource = Array("Cherry", "Clementine", "Coconut") + m_AC.Refresh +End Sub +``` + +## See Also + +- [AutoCompleteLib](.) package -- overview diff --git a/docs/Reference/Contributed/AutoCompleteLib/index.md b/docs/Reference/Contributed/AutoCompleteLib/index.md new file mode 100644 index 000000000..3035f8857 --- /dev/null +++ b/docs/Reference/Contributed/AutoCompleteLib/index.md @@ -0,0 +1,18 @@ +--- +title: AutoCompleteLib Package +parent: Contributed Packages +has_toc: false +indexed_from: 1.0.0.0 +permalink: /tB/Packages/Contributed/AutoCompleteLib/ +--- + +# AutoCompleteLib Package +{: .no_toc } + +**Author:** Krool + +The **AutoCompleteLib** contributed package provides Windows shell auto-complete behavior for text-input controls. The package references the **AutoCompleteGuids** package, which holds the GUID and interface definitions the class uses. + +## Classes + +- [AutoComplete](AutoComplete) -- attaches Windows shell auto-complete behaviour to a text-input control's window handle. diff --git a/docs/Reference/Contributed/BigNumberLib/BigNumber.md b/docs/Reference/Contributed/BigNumberLib/BigNumber.md new file mode 100644 index 000000000..d8b946e88 --- /dev/null +++ b/docs/Reference/Contributed/BigNumberLib/BigNumber.md @@ -0,0 +1,413 @@ +--- +title: BigNumber +parent: BigNumberLib Package +permalink: /tB/Packages/Contributed/BigNumberLib/BigNumber +has_toc: false +--- + +# BigNumber class +{: .no_toc } + +A **BigNumber** represents an arbitrary-precision signed integer backed by the TomsFastMath (libtfm) C library, supporting numbers up to 4096 bits. A multiplication accepts operands of up to 2048 bits each. The default property is [**ValueString**](#valuestring). + +```tb check_build +Dim a As New BigNumber +Dim b As New BigNumber +Dim result As New BigNumber + +a.ValueString = "123456789012345678901234567890" +b.ValueString = "987654321098765432109876543210" +result.AssignAddition a, b +Debug.Print result.ValueString +``` + +> [!NOTE] +> This class requires twinBASIC BETA 434 or newer. Overflow errors are not trapped. String-to-value conversions silently stop at the first invalid character --- for example, setting `ValueHex = "ABC123he"` stores `&HABC123` without raising an error. + +* TOC +{:toc} + +## Properties + +### ValueString +{: .no_toc } + +Returns or sets the value as a decimal string representation. **Default property.** + +Syntax: *object*.**ValueString** [ = *value* ] + +*value* +: A **String** containing a decimal integer, optionally preceded by a minus sign. Conversion stops at the first character that is not a valid decimal digit. + +The getter returns the decimal digits, preceded by a minus sign for a negative value. + +### ValueHex +{: .no_toc } + +Returns or sets the value as a hexadecimal string representation. + +Syntax: *object*.**ValueHex** [ = *value* ] + +*value* +: A **String** containing a hexadecimal integer (digits `0`--`9` and `A`--`F`, case-insensitive), optionally preceded by a minus sign. Conversion stops at the first character that is not a valid hex digit. + +The getter returns upper-case digits without leading zeros, preceded by a minus sign for a negative value. + +### ValueOctal +{: .no_toc } + +Returns or sets the value as an octal string representation. + +Syntax: *object*.**ValueOctal** [ = *value* ] + +*value* +: A **String** containing an octal integer (digits `0`--`7`), optionally preceded by a minus sign. Conversion stops at the first character that is not a valid octal digit. + +The getter returns the digits without leading zeros, preceded by a minus sign for a negative value. + +### ValueBinary +{: .no_toc } + +Returns or sets the value as a binary string representation. + +Syntax: *object*.**ValueBinary** [ = *value* ] + +*value* +: A **String** containing a binary integer (digits `0` and `1`), optionally preceded by a minus sign. Conversion stops at the first character that is not `0` or `1`. + +The getter returns the digits without leading zeros, preceded by a minus sign for a negative value. + +### IsNegative +{: .no_toc } + +Returns or sets whether the value is negative. + +Syntax: *object*.**IsNegative** [ = *value* ] + +*value* +: A **Boolean**. Setting **True** marks the number as negative; setting **False** marks it as positive. + +## Methods + +### AssignAddition +{: .no_toc } + +Sets this instance to `a + b`. + +Syntax: *object*.**AssignAddition** *a*, *b* + +*a* +: *required* A **BigNumber** holding the first operand. + +*b* +: *required* A **BigNumber** holding the second operand. + +### AssignSubtraction +{: .no_toc } + +Sets this instance to `a - b`. + +Syntax: *object*.**AssignSubtraction** *a*, *b* + +*a* +: *required* A **BigNumber** holding the minuend. + +*b* +: *required* A **BigNumber** holding the subtrahend. + +### AssignMultiplication +{: .no_toc } + +Sets this instance to `a * b`. + +Syntax: *object*.**AssignMultiplication** *a*, *b* + +*a* +: *required* A **BigNumber** holding the first factor. + +*b* +: *required* A **BigNumber** holding the second factor. + +### AssignDivision +{: .no_toc } + +Sets this instance to the integer quotient `a \ b`, truncated toward zero. Raises run-time error 5 if *b* is zero. + +Syntax: *object*.**AssignDivision** *a*, *b* + +*a* +: *required* A **BigNumber** holding the dividend. + +*b* +: *required* A **BigNumber** holding the divisor. Must not be zero. + +### AssignModulus +{: .no_toc } + +Sets this instance to `a Mod b`. The result is zero or has the sign of *b*, so `-7 Mod 2` is 1 and `7 Mod -2` is -1. Raises run-time error 5 if *b* is zero. + +Syntax: *object*.**AssignModulus** *a*, *b* + +*a* +: *required* A **BigNumber** holding the dividend. + +*b* +: *required* A **BigNumber** holding the divisor. Must not be zero. + +### AssignSquared +{: .no_toc } + +Sets this instance to `a * a` (the square of *a*). + +Syntax: *object*.**AssignSquared** *a* + +*a* +: *required* A **BigNumber** holding the value to square. + +### AssignAdditionModulus +{: .no_toc } + +Sets this instance to `(a + b) Mod mod_c`. + +Syntax: *object*.**AssignAdditionModulus** *a*, *b*, *mod_c* + +*a* +: *required* A **BigNumber** holding the first addend. + +*b* +: *required* A **BigNumber** holding the second addend. + +*mod_c* +: *required* A **BigNumber** holding the modulus. + +### AssignSubtractionModulus +{: .no_toc } + +Sets this instance to `(a - b) Mod mod_c`. + +Syntax: *object*.**AssignSubtractionModulus** *a*, *b*, *mod_c* + +*a* +: *required* A **BigNumber** holding the minuend. + +*b* +: *required* A **BigNumber** holding the subtrahend. + +*mod_c* +: *required* A **BigNumber** holding the modulus. + +### AssignMultiplicationModulus +{: .no_toc } + +Sets this instance to `(a * b) Mod mod_c`. + +Syntax: *object*.**AssignMultiplicationModulus** *a*, *b*, *mod_c* + +*a* +: *required* A **BigNumber** holding the first factor. + +*b* +: *required* A **BigNumber** holding the second factor. + +*mod_c* +: *required* A **BigNumber** holding the modulus. + +### AssignSquaredModulus +{: .no_toc } + +Sets this instance to `(a * a) Mod mod_b`. + +Syntax: *object*.**AssignSquaredModulus** *a*, *mod_b* + +*a* +: *required* A **BigNumber** holding the value to square. + +*mod_b* +: *required* A **BigNumber** holding the modulus. + +### AssignModularMultiplicativeInverse +{: .no_toc } + +Sets this instance to the modular multiplicative inverse of *a* modulo *mod_b* --- the value *x* such that `(a * x) Mod mod_b = 1`. Raises run-time error 5 if the inverse does not exist. + +Syntax: *object*.**AssignModularMultiplicativeInverse** *a*, *mod_b* + +*a* +: *required* A **BigNumber** holding the value to invert. + +*mod_b* +: *required* A **BigNumber** holding the modulus. + +### AssignGreatestCommonDivisor +{: .no_toc } + +Sets this instance to the greatest common divisor of *a* and *b*. The signs of *a* and *b* are ignored; the result is always non-negative. + +Syntax: *object*.**AssignGreatestCommonDivisor** *a*, *b* + +*a* +: *required* A **BigNumber** holding the first value. + +*b* +: *required* A **BigNumber** holding the second value. + +### AssignLeastCommonMultiple +{: .no_toc } + +Sets this instance to the least common multiple of *a* and *b*. The signs of *a* and *b* are ignored. + +Syntax: *object*.**AssignLeastCommonMultiple** *a*, *b* + +*a* +: *required* A **BigNumber** holding the first value. + +*b* +: *required* A **BigNumber** holding the second value. + +### AssignShiftRight +{: .no_toc } + +Sets this instance to *a* right-shifted by *shiftAmount_b* bits (equivalent to integer division by 2^*shiftAmount_b*, truncated toward zero, so shifting -1 right by any positive amount gives 0). + +Syntax: *object*.**AssignShiftRight** *a*, *shiftAmount_b* + +*a* +: *required* A **BigNumber** holding the value to shift. + +*shiftAmount_b* +: *required* A **Long** specifying the number of bit positions to shift right. + +### AssignShiftLeft +{: .no_toc } + +Sets this instance to *a* left-shifted by *shiftAmount_b* bits (equivalent to multiplication by 2^*shiftAmount_b*). + +Syntax: *object*.**AssignShiftLeft** *a*, *shiftAmount_b* + +*a* +: *required* A **BigNumber** holding the value to shift. + +*shiftAmount_b* +: *required* A **Long** specifying the number of bit positions to shift left. + +### AssignNegation +{: .no_toc } + +Sets this instance to the arithmetic negation of *a* (`-a`). + +Syntax: *object*.**AssignNegation** *a* + +*a* +: *required* A **BigNumber** holding the value to negate. + +**AssignNegation** is declared as a **Function** returning **Boolean**, but the return value is never set and is always **False**. + +### AssignAbsolute +{: .no_toc } + +Sets this instance to the absolute value of *a*. + +Syntax: *object*.**AssignAbsolute** *a* + +*a* +: *required* A **BigNumber** holding the value whose absolute value is taken. + +**AssignAbsolute** is declared as a **Function** returning **Boolean**, but the return value is never set and is always **False**. + +### AssignFromLong +{: .no_toc } + +Sets this instance to a value from a native **Long** integer. + +Syntax: *object*.**AssignFromLong** *a* + +*a* +: *required* A **Long** holding the value to assign. Negative values (including `&H80000000`) are handled correctly. + +### HandleError +{: .no_toc } + +Examines the last status code the class stored from the library and raises run-time error 5 if it is a failure. The error description is "invalid operation" or "out of memory". + +Syntax: *object*.**HandleError** + +The string-conversion properties, **AssignDivision**, **AssignModulus**, the four modular-arithmetic methods (**AssignAdditionModulus**, **AssignSubtractionModulus**, **AssignMultiplicationModulus**, **AssignSquaredModulus**) and **AssignModularMultiplicativeInverse** store the library's status and call **HandleError** themselves. The other methods do not store a status. The stored status stays in place until one of those members runs again, so calling **HandleError** later raises the error again. + +## Comparison functions + +### IsEqualTo +{: .no_toc } + +Returns **True** if this instance equals *b*. + +Syntax: *object*.**IsEqualTo**( *b* ) + +*b* +: *required* A **BigNumber** to compare against. + +### IsLessThan +{: .no_toc } + +Returns **True** if this instance is less than *b*. + +Syntax: *object*.**IsLessThan**( *b* ) + +*b* +: *required* A **BigNumber** to compare against. + +### IsLessThanOrEqualTo +{: .no_toc } + +Returns **True** if this instance is less than or equal to *b*. + +Syntax: *object*.**IsLessThanOrEqualTo**( *b* ) + +*b* +: *required* A **BigNumber** to compare against. + +### IsGreaterThan +{: .no_toc } + +Returns **True** if this instance is greater than *b*. + +Syntax: *object*.**IsGreaterThan**( *b* ) + +*b* +: *required* A **BigNumber** to compare against. + +### IsGreaterThanOrEqualTo +{: .no_toc } + +Returns **True** if this instance is greater than or equal to *b*. + +Syntax: *object*.**IsGreaterThanOrEqualTo**( *b* ) + +*b* +: *required* A **BigNumber** to compare against. + +## Example + +This example computes the factorial of 50 using **BigNumber** arithmetic. + +```tb check_build +Public Function Factorial50() As String + Dim result As New BigNumber + Dim factor As New BigNumber + Dim temp As New BigNumber + + result.AssignFromLong 1 + + Dim i As Long + For i = 2 To 50 + factor.AssignFromLong i + temp.AssignMultiplication result, factor + result.ValueString = temp.ValueString ' copy temp into result + Next i + + Factorial50 = result.ValueString +End Function +``` + +## See Also + +- [BigNumberLib](.) package -- overview diff --git a/docs/Reference/Contributed/BigNumberLib/index.md b/docs/Reference/Contributed/BigNumberLib/index.md new file mode 100644 index 000000000..6f0a4c213 --- /dev/null +++ b/docs/Reference/Contributed/BigNumberLib/index.md @@ -0,0 +1,21 @@ +--- +title: BigNumberLib Package +parent: Contributed Packages +has_toc: false +indexed_from: 0.0.0.0 +permalink: /tB/Packages/Contributed/BigNumberLib/ +--- + +# BigNumberLib Package +{: .no_toc } + +**Author:** WaynePhillipsEA + +The **BigNumberLib** contributed package provides arbitrary-precision signed integer arithmetic for twinBASIC. + +> [!NOTE] +> Version 0.0.0.0 does not compile in twinBASIC BETA 1005, so a project that references it does not build. **BigNumber** passes `vbNullPtr` to the `ByRef` *remainder* structure parameter of `fp_div` and `fp_div_2d`, where a null pointer for a structure has to be passed as `ByVal vbNullPtr` (error TB5001). + +## Classes + +- [BigNumber](BigNumber) -- arbitrary-precision signed integer backed by the TomsFastMath (libtfm) C library, supporting numbers up to 4096 bits. diff --git a/docs/Reference/Contributed/FileProps/Example/DisplayInDebugConsole.md b/docs/Reference/Contributed/FileProps/Example/DisplayInDebugConsole.md new file mode 100644 index 000000000..2e579ff7b --- /dev/null +++ b/docs/Reference/Contributed/FileProps/Example/DisplayInDebugConsole.md @@ -0,0 +1,39 @@ +--- +title: DisplayInDebugConsole +parent: Example +permalink: /tB/Packages/Contributed/FileProps/Example/DisplayInDebugConsole +has_toc: false +--- +# DisplayInDebugConsole +{: .no_toc } + +Opens a file and prints all its shell properties to the Debug console. + +Syntax: **DisplayInDebugConsole** [ *FilePath* ] + +*FilePath* +: *optional* A **String** containing the full path of the file whose shell properties are printed. If omitted or empty, a file dialog is displayed so the user can choose a file. + +The procedure opens the specified file through **FilePropertyExplorer** and iterates over every property in the returned **FileProperties** collection, printing the system property name and its localized value to the Debug console with `Debug.Print`. + +When *FilePath* is omitted or empty, **FilePropertyExplorer.BrowseAndOpenFile** is called instead of **FilePropertyExplorer.OpenFile**, which displays a file dialog. + +### Example + +This example prints the shell properties of a specific file by passing a path, then repeats the call without a path to let the user choose a file interactively. + +```tb check_build +' Print properties for a known file. +DisplayInDebugConsole "C:\Windows\notepad.exe" + +' Print properties for a file chosen via dialog. +DisplayInDebugConsole +``` + +### See Also + +- [Example](.) module +- [FilePropertyExplorer](../FilePropertyExplorer/) class +- [BrowseAndOpenFile](../FilePropertyExplorer/BrowseAndOpenFile) method +- [OpenFile](../FilePropertyExplorer/OpenFile) method +- [FileProperties](../FileProperties/) class diff --git a/docs/Reference/Contributed/FileProps/Example/index.md b/docs/Reference/Contributed/FileProps/Example/index.md new file mode 100644 index 000000000..6c1f89bc9 --- /dev/null +++ b/docs/Reference/Contributed/FileProps/Example/index.md @@ -0,0 +1,49 @@ +--- +title: Example +parent: FileProps Package +permalink: /tB/Packages/Contributed/FileProps/Example/ +has_toc: false +--- + +# Example module +{: .no_toc } + +A demonstration module that prints all Windows shell file properties for a chosen file to the Debug console. + +## Members + +### DisplayInDebugConsole + +Opens a file and prints each of its shell properties -- name and localized value -- to the Debug console. + +Syntax: **DisplayInDebugConsole** [ *FilePath* ] + +*FilePath* +: *optional* A **String** holding the full path of the file to inspect. If omitted or empty, a file dialog is displayed so the user can choose the file interactively. + +**DisplayInDebugConsole** calls [**FilePropertyExplorer.OpenFile**](../FilePropertyExplorer/OpenFile) when *FilePath* is not empty, or [**FilePropertyExplorer.BrowseAndOpenFile**](../FilePropertyExplorer/BrowseAndOpenFile) otherwise. Each property in the returned [**FileProperties**](../FileProperties/) collection is printed on its own line: the system name (**FileProperty.Name**), then the localized value string (**FileProperty.ValueDesc**), positioned further right with `Tab(80)`. + +## Example + +This example prints all shell properties of a specific file to the Debug console by supplying a path directly. + +```tb check_build +Sub Main() + Example.DisplayInDebugConsole "C:\Users\Public\Pictures\Sample.jpg" +End Sub +``` + +To use the interactive file-open dialog instead, call the procedure without an argument: + +```tb check_build +Sub Main() + Example.DisplayInDebugConsole +End Sub +``` + +## See Also + +- [FilePropertyExplorer](../FilePropertyExplorer/) class -- opens a file and returns its shell properties +- [FileProperties](../FileProperties/) class -- read-only collection of shell properties for a file +- [FileProperty](../FileProperty/) class -- one shell property entry with name, ID, and value +- [FileProps package](../) -- overview of all classes and modules diff --git a/docs/Reference/Contributed/FileProps/FileProperties/Count.md b/docs/Reference/Contributed/FileProps/FileProperties/Count.md new file mode 100644 index 000000000..450e701a0 --- /dev/null +++ b/docs/Reference/Contributed/FileProps/FileProperties/Count.md @@ -0,0 +1,33 @@ +--- +title: Count +parent: FileProperties +has_toc: false +permalink: /tB/Packages/Contributed/FileProps/FileProperties/Count +--- +# Count +{: .no_toc } + +Returns the number of properties in the collection. + +Syntax: *object*.**Count** + +*object* +: *required* An object expression that evaluates to a **FileProperties** object. + +**Count** returns a **Long** equal to the total number of shell properties available for the file. Valid index values for [**Item**](Item) range from `0` to `Count - 1`. + +### Example + +This example opens a file and prints the total number of shell properties it exposes. + +```tb check_build +Dim props As FileProperties +Set props = FilePropertyExplorer.OpenFile("C:\example.mp3") +Debug.Print "Property count: " & props.Count +``` + +### See Also + +- [Item](Item) property +- [FilePath](FilePath) property +- [FileProperties](.) class diff --git a/docs/Reference/Contributed/FileProps/FileProperties/FilePath.md b/docs/Reference/Contributed/FileProps/FileProperties/FilePath.md new file mode 100644 index 000000000..faaf3a36a --- /dev/null +++ b/docs/Reference/Contributed/FileProps/FileProperties/FilePath.md @@ -0,0 +1,36 @@ +--- +title: FilePath +parent: FileProperties +has_toc: false +permalink: /tB/Packages/Contributed/FileProps/FileProperties/FilePath +--- +# FilePath +{: .no_toc } + +Returns a **String** containing the full file path of the file that was opened. Read-only. + +Syntax: *object*.**FilePath** + +*object* +: *required* An object expression that evaluates to a **FileProperties** object. + +The value is the full path of the file that was passed to [**FilePropertyExplorer.OpenFile**](../FilePropertyExplorer/OpenFile) or selected through [**FilePropertyExplorer.BrowseAndOpenFile**](../FilePropertyExplorer/BrowseAndOpenFile) when the **FileProperties** collection was created. + +### Example + +This example opens a file and prints its path and property count to the Debug console. + +```tb check_build +Dim fp As FileProperties +Set fp = FilePropertyExplorer.OpenFile("C:\Users\Public\sample.mp3") +Debug.Print "File: " & fp.FilePath +Debug.Print "Properties: " & fp.Count +``` + +### See Also + +- [FileProperties](.) class +- [Count](Count) property +- [Item](Item) property +- [OpenFile](../FilePropertyExplorer/OpenFile) method +- [BrowseAndOpenFile](../FilePropertyExplorer/BrowseAndOpenFile) method diff --git a/docs/Reference/Contributed/FileProps/FileProperties/Item.md b/docs/Reference/Contributed/FileProps/FileProperties/Item.md new file mode 100644 index 000000000..0f571d0b5 --- /dev/null +++ b/docs/Reference/Contributed/FileProps/FileProperties/Item.md @@ -0,0 +1,49 @@ +--- +title: Item +parent: FileProperties +has_toc: false +permalink: /tB/Packages/Contributed/FileProps/FileProperties/Item +--- +# Item +{: .no_toc } + +Returns the **FileProperty** object at the given index, name, or ID in the collection. + +Syntax: *object*.**Item**(*IndexOrNameOrID*) + +*object* +: *required* An object expression that evaluates to a **FileProperties** object. + +*IndexOrNameOrID* +: *required* A **Variant** identifying the property to retrieve. Pass an integer index (zero-based, from `0` to `Count - 1`), a **String** matching **FileProperty.Name**, or a **String** matching **FileProperty.ID**. + +**Item** forwards the call to the underlying Virtual-COM object. Passing an integer retrieves the property at that position in the collection. Passing a string retrieves the property whose **FileProperty.Name** (the system identity name, such as `"System.Audio.EncodingBitrate"`) or **FileProperty.ID** (the unique identifier of the shell property) equals that string. + +### Example + +This example opens a file, iterates the properties by index, and also retrieves one property by name. + +```tb check_build +Dim fp As FileProperties +Set fp = FilePropertyExplorer.OpenFile("C:\Music\track.mp3") + +' Iterate all properties by index. +Dim i As Long +For i = 0 To fp.Count - 1 + Dim prop As FileProperty + Set prop = fp.Item(i) + Debug.Print prop.NameDesc & ": " & prop.ValueDesc +Next i + +' Retrieve a specific property by system name. +Dim bitrate As FileProperty +Set bitrate = fp.Item("System.Audio.EncodingBitrate") +Debug.Print "Bitrate: " & bitrate.ValueDesc +``` + +### See Also + +- [FileProperties](.) class +- [Count](Count) property +- [FilePath](FilePath) property +- [FileProperty](../FileProperty/) class diff --git a/docs/Reference/Contributed/FileProps/FileProperties/VCOMObject.md b/docs/Reference/Contributed/FileProps/FileProperties/VCOMObject.md new file mode 100644 index 000000000..0096e09d5 --- /dev/null +++ b/docs/Reference/Contributed/FileProps/FileProperties/VCOMObject.md @@ -0,0 +1,30 @@ +--- +title: VCOMObject +parent: FileProperties +has_toc: false +permalink: /tB/Packages/Contributed/FileProps/FileProperties/VCOMObject +--- +# VCOMObject +{: .no_toc } + +Holds the native-code COM object created internally by the Virtual-COM library. For internal use only. + +> [!WARNING] +> +> **VCOMObject** is an internal implementation detail of the FileProps Virtual-COM loader, and the package marks it as for internal use only. Do not use it in application code. + +Syntax: *object*.**VCOMObject** + +*object* +: *required* An object expression that evaluates to a **FileProperties** object. + +The **FileProps** package is a Virtual-COM library. It creates native-code COM objects in memory without a separate DLL. **VCOMObject** is the raw **Object** reference to that in-memory COM object; the **FileProperties** class delegates all its property implementations (**Count**, **FilePath**, **Item**) to it. The field has the member ID -4 (`VB_VarUserMemId = -4`), the ID COM reserves for the enumerator of a collection, so it is the member that `For Each` uses to enumerate a **FileProperties** collection. + +This field has no documented interface and no stable contract outside the library. Use **Count**, **FilePath**, and **Item** to access file properties. + +### See Also + +- [FileProperties](.) class +- [Count](Count) property +- [FilePath](FilePath) property +- [Item](Item) property diff --git a/docs/Reference/Contributed/FileProps/FileProperties/index.md b/docs/Reference/Contributed/FileProps/FileProperties/index.md new file mode 100644 index 000000000..b8ca2176c --- /dev/null +++ b/docs/Reference/Contributed/FileProps/FileProperties/index.md @@ -0,0 +1,111 @@ +--- +title: FileProperties +parent: FileProps Package +permalink: /tB/Packages/Contributed/FileProps/FileProperties/ +has_toc: false +--- + +# FileProperties class +{: .no_toc } + +A read-only collection of Windows shell properties for a single file, returned by **FilePropertyExplorer**. + +**FileProperties** is a Virtual-COM object that provides indexed access to the detailed file properties the operating system exposes for the opened file, commonly called shell property handlers. Each entry in the collection is a [**FileProperty**](../FileProperty/) object with the system name, localized name, unique property ID, and current value of one shell property. Common examples include the duration of an audio file such as an MP3 and the EXIF properties of a JPEG image. + +Instances are not constructed directly. Call [**FilePropertyExplorer.OpenFile**](../FilePropertyExplorer/OpenFile) or [**FilePropertyExplorer.BrowseAndOpenFile**](../FilePropertyExplorer/BrowseAndOpenFile) to obtain a **FileProperties** collection. + +```tb check_build +Dim Props As FileProperties +Set Props = FilePropertyExplorer.OpenFile("C:\Music\track.mp3") + +Dim i As Long +For i = 0 To Props.Count - 1 + Dim Prop As FileProperty + Set Prop = Props.Item(i) + Debug.Print Prop.NameDesc & " = " & Prop.ValueDesc +Next i +``` + +* TOC +{:toc} + +## Properties + +### Count +{: .no_toc } + +Returns the number of shell properties in the collection. **Long**. Read-only. + +Syntax: *object*.**Count** + +The count is the number of properties the shell exposes for the opened file. Different file types expose different property sets. + +### FilePath +{: .no_toc } + +Returns the full file path of the file that was opened. **String**. Read-only. + +Syntax: *object*.**FilePath** + +The value is the full path of the file passed to [**FilePropertyExplorer.OpenFile**](../FilePropertyExplorer/OpenFile). When a collection is obtained through [**FilePropertyExplorer.BrowseAndOpenFile**](../FilePropertyExplorer/BrowseAndOpenFile), it is the path of the file the user selected in the dialog. + +### Item +{: .no_toc } + +Returns the [**FileProperty**](../FileProperty/) object at the given position, name, or ID in the collection. + +Syntax: *object*.**Item** ( *IndexOrNameOrID* ) **As FileProperty** + +*IndexOrNameOrID* +: *required* A **Variant** that identifies the property to retrieve. Accepted forms: + - An integer index from `0` to `Count - 1`. + - A **String** matching [**FileProperty.Name**](../FileProperty/Name) (the system identity name, e.g. `"System.Media.Duration"`). + - A **String** matching [**FileProperty.ID**](../FileProperty/ID) (the unique property identifier). + +```tb check_build +Dim Props As FileProperties +Set Props = FilePropertyExplorer.OpenFile("C:\Music\track.mp3") + +' By zero-based index: +Dim Prop As FileProperty +Set Prop = Props.Item(0) + +' By system name: +Set Prop = Props.Item("System.Media.Duration") +``` + +### VCOMObject +{: .no_toc } + +Holds the native-code COM object created internally by the Virtual-COM library. **Object**. For internal use only. + +> [!WARNING] +> Do not read, assign, or pass **VCOMObject** to any function. The package marks it as for internal use only, and **Count**, **FilePath** and **Item** forward their calls to it. + +## Example + +This example opens the file at the given path and prints its path, its property count and all its shell properties to the Debug console. + +```tb check_build +Sub PrintShellProps(FilePath As String) + Dim Props As FileProperties + Set Props = FilePropertyExplorer.OpenFile(FilePath) + + Debug.Print "File: " & Props.FilePath + Debug.Print "Properties: " & Props.Count + + Dim i As Long + For i = 0 To Props.Count - 1 + Dim Prop As FileProperty + Set Prop = Props.Item(i) + Debug.Print Prop.NameDesc & " (" & Prop.Name & ")" & " = " & Prop.ValueDesc + Next i +End Sub +``` + +## See Also + +- [FilePropertyExplorer](../FilePropertyExplorer/) class -- the predeclared factory that opens a file and returns a **FileProperties** collection +- [FileProperty](../FileProperty/) class -- one shell property in the collection +- [FilePropertyExplorer.OpenFile](../FilePropertyExplorer/OpenFile) -- opens a file by path and returns a **FileProperties** collection +- [FilePropertyExplorer.BrowseAndOpenFile](../FilePropertyExplorer/BrowseAndOpenFile) -- displays a file-open dialog and returns a **FileProperties** collection diff --git a/docs/Reference/Contributed/FileProps/FileProperty/ID.md b/docs/Reference/Contributed/FileProps/FileProperty/ID.md new file mode 100644 index 000000000..6c0de500f --- /dev/null +++ b/docs/Reference/Contributed/FileProps/FileProperty/ID.md @@ -0,0 +1,43 @@ +--- +title: ID +parent: FileProperty +permalink: /tB/Packages/Contributed/FileProps/FileProperty/ID +has_toc: false +--- +# ID +{: .no_toc } + +Returns a unique identifier string for the shell property. + +Syntax: *object*.**ID** + +*object* +: *required* An object expression that evaluates to a **FileProperty** object. + +The **ID** property returns a **String** that is a unique identity for the property and can always be used to refer to it. It consists of a GUID identifying the property schema, followed by an integer identifying the property's index within that schema. + +Unlike [**Name**](Name), which is a dotted system name such as `System.ItemFolderNameDisplay`, the **ID** string is made of the schema GUID and the index. + +### Example + +This example opens a file and prints the ID and name of each shell property to the Debug console. + +```tb check_build +Dim props As FileProperties +Set props = FilePropertyExplorer.OpenFile("C:\example\photo.jpg") + +Dim i As Long +For i = 0 To props.Count - 1 + Dim prop As FileProperty + Set prop = props.Item(i) + Debug.Print prop.ID & " -> " & prop.Name +Next i +``` + +### See Also + +- [Name](Name) property +- [NameDesc](NameDesc) property +- [Value](Value) property +- [ValueDesc](ValueDesc) property +- [FileProperty](.) class diff --git a/docs/Reference/Contributed/FileProps/FileProperty/Name.md b/docs/Reference/Contributed/FileProps/FileProperty/Name.md new file mode 100644 index 000000000..62dbb6ada --- /dev/null +++ b/docs/Reference/Contributed/FileProps/FileProperty/Name.md @@ -0,0 +1,47 @@ +--- +title: Name +parent: FileProperty +permalink: /tB/Packages/Contributed/FileProps/FileProperty/Name +has_toc: false +--- +# Name +{: .no_toc } + +Returns the system identity name of the Windows shell property. + +Syntax: *object*.**Name** + +*object* +: *required* An object expression that evaluates to a **FileProperty** object. + +Returns a **String** containing the system identity name of the property, such as `"System.ItemFolderNameDisplay"`. This name is safe to use as an identity field even on non-English systems. + +### Remarks + +**Name** differs from [**NameDesc**](NameDesc), which returns a localized version of the name that is not always available. When storing or comparing property identifiers across locale boundaries, use **Name** rather than **NameDesc**. + +For an alternative unique identifier that includes the property schema GUID and index, see [**ID**](ID). + +### Example + +This example iterates over all shell properties for a file and prints the system name and value of each one to the Debug console. + +```tb check_build +Dim Props As FileProperties +Set Props = FilePropertyExplorer.OpenFile("C:\Example\photo.jpg") + +Dim i As Long +For i = 0 To Props.Count - 1 + Dim Prop As FileProperty + Set Prop = Props.Item(i) + Debug.Print Prop.Name & " = " & Prop.ValueDesc +Next i +``` + +### See Also + +- [NameDesc](NameDesc) property -- returns the localized display name of the property +- [ID](ID) property -- returns the schema GUID and index as a unique identifier +- [Value](Value) property -- returns or sets the current value of the shell property as a Variant +- [ValueDesc](ValueDesc) property -- returns the current value as a localized string +- [FileProperty](.) class diff --git a/docs/Reference/Contributed/FileProps/FileProperty/NameDesc.md b/docs/Reference/Contributed/FileProps/FileProperty/NameDesc.md new file mode 100644 index 000000000..e8ff10879 --- /dev/null +++ b/docs/Reference/Contributed/FileProps/FileProperty/NameDesc.md @@ -0,0 +1,27 @@ +--- +title: NameDesc +parent: FileProperty +has_toc: false +permalink: /tB/Packages/Contributed/FileProps/FileProperty/NameDesc +--- +# NameDesc +{: .no_toc } + +Returns the localized name of the shell property, when one is available. + +Syntax: *object*.**NameDesc** + +*object* +: *required* An object expression that evaluates to a **FileProperty** object. + +Returns a **String** containing a localized version of the property's name. This name is suitable for display to the user. + +The localized name is not always available. Use [**Name**](Name) instead when a locale-independent identifier is needed --- for example, when storing or comparing property names across systems. + +### See Also + +- [Name](Name) property +- [ID](ID) property +- [Value](Value) property +- [ValueDesc](ValueDesc) property +- [FileProperty](.) class diff --git a/docs/Reference/Contributed/FileProps/FileProperty/VCOMObject.md b/docs/Reference/Contributed/FileProps/FileProperty/VCOMObject.md new file mode 100644 index 000000000..5fb32ee3e --- /dev/null +++ b/docs/Reference/Contributed/FileProps/FileProperty/VCOMObject.md @@ -0,0 +1,32 @@ +--- +title: VCOMObject +parent: FileProperty +has_toc: false +permalink: /tB/Packages/Contributed/FileProps/FileProperty/VCOMObject +--- +# VCOMObject +{: .no_toc } + +Holds the native-code COM object created internally by the Virtual-COM library. For internal use only. + +> [!WARNING] +> +> **VCOMObject** is an internal implementation detail of the FileProps Virtual-COM loader, and the package marks it as for internal use only. Do not use it in application code. + +Syntax: *object*.**VCOMObject** + +*object* +: *required* An object expression that evaluates to a **FileProperty** object. + +The **FileProps** package is a Virtual-COM library. It creates native-code COM objects in memory without a separate DLL. **VCOMObject** is the raw **Object** reference to that in-memory COM object; the **FileProperty** class delegates all its property implementations (**Value**, **ValueDesc**, **NameDesc**, **Name**, **ID**) to it. + +This field has no documented interface and no stable contract outside the library. Use **Value**, **ValueDesc**, **NameDesc**, **Name**, and **ID** to access shell property data. + +### See Also + +- [FileProperty](.) class +- [Value](Value) property +- [ValueDesc](ValueDesc) property +- [Name](Name) property +- [NameDesc](NameDesc) property +- [ID](ID) property diff --git a/docs/Reference/Contributed/FileProps/FileProperty/Value.md b/docs/Reference/Contributed/FileProps/FileProperty/Value.md new file mode 100644 index 000000000..a828e6167 --- /dev/null +++ b/docs/Reference/Contributed/FileProps/FileProperty/Value.md @@ -0,0 +1,64 @@ +--- +title: Value +parent: FileProperty +has_toc: false +permalink: /tB/Packages/Contributed/FileProps/FileProperty/Value +--- +# Value +{: .no_toc } + +Returns or sets the current value of the Windows shell property as a **Variant**. + +## Get + +Returns a **Variant** containing the current value of the shell property. + +Syntax: *object*.**Value** + +*object* +: *required* An object expression that evaluates to a **FileProperty** object. + +The type of the returned value depends on the property. A multi-value property can return an array. + +To obtain a localized string representation of the same data, use [**ValueDesc**](ValueDesc) instead. + +## Let + +Sets the current value of the shell property. + +Syntax: *object*.**Value** **=** *value* + +*value* +: A **Variant** containing the new value for the property. + +> [!IMPORTANT] +> +> Write support requires Windows Vista or newer. Assigning a property that is not writable raises a *Permission denied* error. + +### Remarks + +Not all shell properties are writable. To assign **Value**, open the file with write support enabled by passing **True** as the *WriteSupport* argument of [**FilePropertyExplorer.OpenFile**](../FilePropertyExplorer/OpenFile) or [**FilePropertyExplorer.BrowseAndOpenFile**](../FilePropertyExplorer/BrowseAndOpenFile). + +### Example + +This example opens a file, reads the **System.Title** property, then updates it. + +```tb check_build +Dim Props As FileProperties +Set Props = FilePropertyExplorer.OpenFile("C:\Documents\Report.docx", True) + +Dim Prop As FileProperty +Set Prop = Props.Item("System.Title") + +Debug.Print "Current title: " & Prop.Value + +Prop.Value = "Annual Report 2025" +Debug.Print "Updated title: " & Prop.Value +``` + +### See Also + +- [ValueDesc](ValueDesc) property +- [Name](Name) property +- [ID](ID) property +- [FileProperty](.) class diff --git a/docs/Reference/Contributed/FileProps/FileProperty/ValueDesc.md b/docs/Reference/Contributed/FileProps/FileProperty/ValueDesc.md new file mode 100644 index 000000000..9b0dd9f39 --- /dev/null +++ b/docs/Reference/Contributed/FileProps/FileProperty/ValueDesc.md @@ -0,0 +1,41 @@ +--- +title: ValueDesc +parent: FileProperty +permalink: /tB/Packages/Contributed/FileProps/FileProperty/ValueDesc +has_toc: false +--- +# ValueDesc +{: .no_toc } + +Returns the current value of the shell property as a localized string. Read-only. + +Syntax: *object*.**ValueDesc** + +*object* +: *required* An object expression that evaluates to a **FileProperty** object. + +**ValueDesc** returns a **String** containing the property value in localized form, suitable for display. For multi-value properties, all values are combined into a single string; no array handling is required. + +To retrieve the value as a **Variant** (which can be an array for multi-value properties), use the [**Value**](Value) property instead. + +### Example + +This example opens a file and prints the localized value of each shell property to the Debug console. + +```tb check_build +Dim Props As FileProperties +Set Props = FilePropertyExplorer.OpenFile("C:\Music\track.mp3") + +Dim Prop As FileProperty +For Each Prop In Props + Debug.Print Prop.Name & " = " & Prop.ValueDesc +Next Prop +``` + +### See Also + +- [Value](Value) property +- [Name](Name) property +- [NameDesc](NameDesc) property +- [ID](ID) property +- [FileProperty](.) class diff --git a/docs/Reference/Contributed/FileProps/FileProperty/index.md b/docs/Reference/Contributed/FileProps/FileProperty/index.md new file mode 100644 index 000000000..374232164 --- /dev/null +++ b/docs/Reference/Contributed/FileProps/FileProperty/index.md @@ -0,0 +1,117 @@ +--- +title: FileProperty +parent: FileProps Package +permalink: /tB/Packages/Contributed/FileProps/FileProperty/ +has_toc: false +--- + +# FileProperty class +{: .no_toc } + +A **FileProperty** represents one Windows shell property attached to a file --- its system name, localized name, unique ID, and current value. + +**FileProperty** objects are not created directly. They are returned as items from the [**FileProperties**](../FileProperties/) collection, which is obtained by calling [**FilePropertyExplorer.OpenFile**](../FilePropertyExplorer/OpenFile) or [**FilePropertyExplorer.BrowseAndOpenFile**](../FilePropertyExplorer/BrowseAndOpenFile). + +```tb check_build +Dim Props As FileProperties +Set Props = FilePropertyExplorer.OpenFile("C:\Photos\image.jpg") + +Dim Prop As FileProperty +Set Prop = Props.Item(1) + +Debug.Print Prop.Name ' e.g. "System.ItemFolderNameDisplay" +Debug.Print Prop.ValueDesc ' e.g. "Photos" +``` + +* TOC +{:toc} + +## Properties + +### ID +{: .no_toc } + +A unique identifier string for the shell property. + +Syntax: *object*.**ID** **As String** (read-only) + +The identifier consists of a GUID identifying the property schema, followed by an integer identifying the property index within that schema. It can always be used to refer to a specific property unambiguously. + +### Name +{: .no_toc } + +The system identity name of the property. + +Syntax: *object*.**Name** **As String** (read-only) + +Returns a system name such as `"System.ItemFolderNameDisplay"`. This name is safe to use as an identity field even on non-English systems. For the localized name, use [**NameDesc**](#namedesc). + +### NameDesc +{: .no_toc } + +The localized name of the property. + +Syntax: *object*.**NameDesc** **As String** (read-only) + +Returns a localized version of the name. It is not always available. Use [**Name**](#name) for a locale-independent identifier. + +### Value +{: .no_toc } + +The current value of the shell property as a **Variant**. + +Syntax: *object*.**Value** [ **=** *value* ] + +Reading this property returns the value of the property as exposed by the operating system. The type of the returned **Variant** depends on the property. A multi-value property can return an array. + +Assigning a value writes the property. Write support requires Windows Vista or newer. Assigning a property that is not writable raises a *Permission denied* error. + +> [!NOTE] +> Multi-value properties can return a **Variant** array. Check `IsArray(Prop.Value)` before using the result as a scalar. + +For a string representation of the value in localized form, use [**ValueDesc**](#valuedesc). + +### ValueDesc +{: .no_toc } + +The current value of the property as a localized string. + +Syntax: *object*.**ValueDesc** **As String** (read-only) + +Returns the property value in localized form, combined into a single string. Multi-value properties that can return an array from [**Value**](#value) are already combined into one string here. + +Use this property when displaying values to an end user. Use [**Value**](#value) when the typed value is needed for computation or comparison. + +### VCOMObject +{: .no_toc } + +Holds the native-code COM object created internally by the Virtual-COM library. + +Syntax: *object*.**VCOMObject** **As Object** + +> [!WARNING] +> This member is for internal use only. Do not read or assign **VCOMObject** from application code. All public members of **FileProperty** forward their calls to it. + +## Example + +This example opens a file and prints the system name, localized description, and value for each shell property. + +```tb check_build +Sub PrintFileProperties(ByVal FilePath As String) + Dim Props As FileProperties + Set Props = FilePropertyExplorer.OpenFile(FilePath) + + Dim i As Long + For i = 0 To Props.Count - 1 + Dim Prop As FileProperty + Set Prop = Props.Item(i) + Debug.Print Prop.Name & " (" & Prop.NameDesc & "): " & Prop.ValueDesc + Next i +End Sub +``` + +## See Also + +- [FileProperties](../FileProperties/) class -- the collection that contains **FileProperty** objects +- [FilePropertyExplorer](../FilePropertyExplorer/) class -- the factory that opens a file and returns a **FileProperties** collection +- [FileProps Package](../) package -- overview and usage diff --git a/docs/Reference/Contributed/FileProps/FilePropertyExplorer/BrowseAndOpenFile.md b/docs/Reference/Contributed/FileProps/FilePropertyExplorer/BrowseAndOpenFile.md new file mode 100644 index 000000000..4d8506300 --- /dev/null +++ b/docs/Reference/Contributed/FileProps/FilePropertyExplorer/BrowseAndOpenFile.md @@ -0,0 +1,48 @@ +--- +title: BrowseAndOpenFile +parent: FilePropertyExplorer +has_toc: false +permalink: /tB/Packages/Contributed/FileProps/FilePropertyExplorer/BrowseAndOpenFile +--- +# BrowseAndOpenFile +{: .no_toc } + +Displays a file-open dialog and returns a **FileProperties** collection for the file the user selects. + +Syntax: *object*.**BrowseAndOpenFile** [ (*WriteSupport*) ] + +*object* +: *required* An object expression that evaluates to a **FilePropertyExplorer** object. The predeclared default instance is available as `FilePropertyExplorer`. + +*WriteSupport* +: *optional* A **Boolean** that controls whether the returned **FileProperties** collection is opened with write support for property values. **False** (default) opens it without write support. Pass **True** to allow setting [**FileProperty.Value**](../FileProperty/Value). Write support requires Windows Vista or newer. + +**BrowseAndOpenFile** opens a file dialog for the user to select a file, and returns a [**FileProperties**](../FileProperties/) collection for the selected file, as [**OpenFile**](OpenFile) does for a path. The returned collection contains the [**FileProperty**](../FileProperty/) entries for the properties the operating system exposes for the selected file. + +### Example + +This example uses **BrowseAndOpenFile** to let the user pick a file and then prints all its shell properties to the Debug console. + +```tb check_build +Dim Props As FileProperties +Set Props = FilePropertyExplorer.BrowseAndOpenFile() + +If Props Is Nothing Then + Debug.Print "No file selected." +Else + Debug.Print "File: " & Props.FilePath + Dim i As Long + For i = 0 To Props.Count - 1 + Dim Prop As FileProperty + Set Prop = Props.Item(i) + Debug.Print Prop.NameDesc & " = " & Prop.ValueDesc + Next i +End If +``` + +### See Also + +- [FilePropertyExplorer](.) class -- the predeclared factory class +- [OpenFile](OpenFile) function -- opens a file by path and returns a **FileProperties** collection +- [FileProperties](../FileProperties/) class -- the collection returned by this function +- [FileProperty](../FileProperty/) class -- one shell property in the collection diff --git a/docs/Reference/Contributed/FileProps/FilePropertyExplorer/OpenFile.md b/docs/Reference/Contributed/FileProps/FilePropertyExplorer/OpenFile.md new file mode 100644 index 000000000..13024a18d --- /dev/null +++ b/docs/Reference/Contributed/FileProps/FilePropertyExplorer/OpenFile.md @@ -0,0 +1,51 @@ +--- +title: OpenFile +parent: FilePropertyExplorer +has_toc: false +permalink: /tB/Packages/Contributed/FileProps/FilePropertyExplorer/OpenFile +--- +# OpenFile +{: .no_toc } + +Opens a file by path and returns a **FileProperties** collection of its Windows shell properties. + +Syntax: *object*.**OpenFile**(*FilePath* [ **,** *WriteSupport* ]) + +*object* +: *required* An object expression that evaluates to a **FilePropertyExplorer** object. The predeclared default instance is available as `FilePropertyExplorer`. + +*FilePath* +: *required* A **String** giving the path to a valid file. + +*WriteSupport* +: *optional* A **Boolean** that controls whether the returned **FileProperties** collection is opened with write support for property values. **False** (default) opens it without write support. Pass **True** to allow setting [**FileProperty.Value**](../FileProperty/Value). + +**OpenFile** returns a [**FileProperties**](../FileProperties/) collection for the specified file. The collection contains the [**FileProperty**](../FileProperty/) entries for the properties the operating system exposes for that file. Common examples include the duration of an audio file such as an MP3 and the EXIF properties of a JPEG image. + +Write support requires Windows Vista or newer. + +### Example + +This example opens an MP3 file and prints all its shell properties to the Debug console. + +```tb check_build +Dim Props As FileProperties +Set Props = FilePropertyExplorer.OpenFile("C:\Music\track.mp3") + +Debug.Print "File: " & Props.FilePath +Debug.Print "Properties: " & Props.Count + +Dim i As Long +For i = 0 To Props.Count - 1 + Dim Prop As FileProperty + Set Prop = Props.Item(i) + Debug.Print Prop.NameDesc & " = " & Prop.ValueDesc +Next i +``` + +### See Also + +- [FilePropertyExplorer](.) class -- the predeclared factory class +- [BrowseAndOpenFile](BrowseAndOpenFile) function -- displays a file-open dialog and returns a **FileProperties** collection +- [FileProperties](../FileProperties/) class -- the collection returned by this function +- [FileProperty](../FileProperty/) class -- one shell property in the collection diff --git a/docs/Reference/Contributed/FileProps/FilePropertyExplorer/index.md b/docs/Reference/Contributed/FileProps/FilePropertyExplorer/index.md new file mode 100644 index 000000000..0591d7084 --- /dev/null +++ b/docs/Reference/Contributed/FileProps/FilePropertyExplorer/index.md @@ -0,0 +1,121 @@ +--- +title: FilePropertyExplorer +parent: FileProps Package +permalink: /tB/Packages/Contributed/FileProps/FilePropertyExplorer/ +has_toc: false +--- + +# FilePropertyExplorer class +{: .no_toc } + +A predeclared factory class that opens a file and returns a [**FileProperties**](../FileProperties/) collection of its Windows shell properties. + +**FilePropertyExplorer** is a Virtual-COM wrapper that gives access to the detailed file properties the operating system exposes, commonly called shell property handlers. Common examples include the duration of an audio file such as an MP3 and the EXIF properties of a JPEG image. + +The class has the `[ PredeclaredId ]` attribute, so it acts as a default instance and its methods are callable without creating an explicit object variable: + +```tb check_build +Dim Props As FileProperties +Set Props = FilePropertyExplorer.OpenFile("C:\Music\track.mp3") +``` + +* TOC +{:toc} + +## Methods + +### BrowseAndOpenFile +{: .no_toc } + +Displays a file dialog for the user to select a file, and returns a [**FileProperties**](../FileProperties/) collection for the selected file. + +Syntax: **FilePropertyExplorer**.**BrowseAndOpenFile** ( [ *WriteSupport* ] ) **As FileProperties** + +*WriteSupport* +: *optional* A **Boolean**. Pass **True** to open the file with write support so that [**FileProperty.Value**](../FileProperty/Value) can be assigned. Default: **False**. + +```tb check_build +Dim Props As FileProperties +Set Props = FilePropertyExplorer.BrowseAndOpenFile() + +If Not Props Is Nothing Then + Dim i As Long + For i = 0 To Props.Count - 1 + Dim Prop As FileProperty + Set Prop = Props.Item(i) + Debug.Print Prop.NameDesc & " = " & Prop.ValueDesc + Next i +End If +``` + +### OpenFile +{: .no_toc } + +Opens a file by path and returns a [**FileProperties**](../FileProperties/) collection of its shell properties. + +Syntax: **FilePropertyExplorer**.**OpenFile** ( *FilePath* [, *WriteSupport* ] ) **As FileProperties** + +*FilePath* +: *required* A **String** containing the path to a valid file. + +*WriteSupport* +: *optional* A **Boolean**. Pass **True** to open the file with write support so that [**FileProperty.Value**](../FileProperty/Value) can be assigned. Default: **False**. + +```tb check_build +Dim Props As FileProperties +Set Props = FilePropertyExplorer.OpenFile("C:\Pictures\photo.jpg") + +If Not Props Is Nothing Then + Debug.Print "File: " & Props.FilePath + Debug.Print "Property count: " & Props.Count + + ' Look up a specific property by system name: + Dim Prop As FileProperty + Set Prop = Props.Item("System.Photo.CameraModel") + If Not Prop Is Nothing Then + Debug.Print "Camera: " & Prop.ValueDesc + End If +End If +``` + +## Remarks + +**FilePropertyExplorer** uses a Virtual-COM library --- a self-contained native-code COM object loaded into memory without registering a DLL. The library supports both 32-bit and 64-bit hosts. + +The shell property handler infrastructure requires Windows 2000 or later. If the memory for the native code cannot be allocated when the class is created, the class raises error 7 (*Out of memory*). + +> [!NOTE] +> Write support for [**FileProperty.Value**](../FileProperty/Value) requires Windows Vista or newer. + +## Example + +This example opens a file-open dialog, then prints all shell properties for the selected file to the Debug console. + +```tb check_build +Sub ShowFileProps() + Dim Props As FileProperties + Set Props = FilePropertyExplorer.BrowseAndOpenFile() + + If Props Is Nothing Then + Debug.Print "No file selected." + Exit Sub + End If + + Debug.Print "File: " & Props.FilePath + Debug.Print "Properties: " & Props.Count & Chr(10) + + Dim i As Long + For i = 0 To Props.Count - 1 + Dim Prop As FileProperty + Set Prop = Props.Item(i) + Debug.Print Prop.NameDesc & " (" & Prop.Name & ")" & " = " & Prop.ValueDesc + Next i +End Sub +``` + +## See Also + +- [FileProperties](../FileProperties/) class -- the read-only collection returned by this class +- [FileProperty](../FileProperty/) class -- one shell property in the collection +- [FilePropertyExplorer.OpenFile](OpenFile) -- opens a file by path and returns a **FileProperties** collection +- [FilePropertyExplorer.BrowseAndOpenFile](BrowseAndOpenFile) -- displays a file-open dialog and returns a **FileProperties** collection diff --git a/docs/Reference/Contributed/FileProps/index.md b/docs/Reference/Contributed/FileProps/index.md new file mode 100644 index 000000000..ff8d2b401 --- /dev/null +++ b/docs/Reference/Contributed/FileProps/index.md @@ -0,0 +1,34 @@ +--- +title: FileProps Package +parent: Contributed Packages +has_toc: false +exclude_from_docs: + - VCOMObject + - Example + - FilePropertyExplorer_Helper +indexed_from: 1.7.1.0 +permalink: /tB/Packages/Contributed/FileProps/ +--- + +# FileProps Package +{: .no_toc } + +**Author:** WaynePhillipsEA + +The **FileProps** contributed package provides access to Windows shell file properties through a Virtual-COM wrapper. It exposes a predeclared **FilePropertyExplorer** class that opens a file and returns a **FileProperties** collection; each entry in that collection is a **FileProperty** object with the system name, localized name, unique ID, and current value of one shell property. + +## Classes + +- [FileProperties](FileProperties/) -- a read-only collection of Windows shell properties for a single file, returned by FilePropertyExplorer + - [Count](FileProperties/Count) -- returns the number of properties in the collection + - [FilePath](FileProperties/FilePath) -- returns the full file path of the file that was opened + - [Item](FileProperties/Item) -- returns the FileProperty object at the given index, name, or ID in the collection +- [FileProperty](FileProperty/) -- one Windows shell property of a file + - [ID](FileProperty/ID) -- returns a unique identifier string for the shell property + - [Name](FileProperty/Name) -- returns the system identity name of the property + - [NameDesc](FileProperty/NameDesc) -- returns the localized display name of the property + - [Value](FileProperty/Value) -- returns or sets the current value of the shell property as a Variant + - [ValueDesc](FileProperty/ValueDesc) -- returns the current value of the property as a localized string +- [FilePropertyExplorer](FilePropertyExplorer/) -- a predeclared factory class that opens a file and returns a FileProperties collection of its Windows shell properties + - [BrowseAndOpenFile](FilePropertyExplorer/BrowseAndOpenFile) -- displays a file-open dialog and returns a FileProperties collection for the selected file + - [OpenFile](FilePropertyExplorer/OpenFile) -- opens a file by path and returns a FileProperties collection of its shell properties diff --git a/docs/Reference/Contributed/Fmt/AsciiEscapeBase.md b/docs/Reference/Contributed/Fmt/AsciiEscapeBase.md new file mode 100644 index 000000000..6463e6e5e --- /dev/null +++ b/docs/Reference/Contributed/Fmt/AsciiEscapeBase.md @@ -0,0 +1,33 @@ +--- +title: AsciiEscapeBase +parent: Fmt Package +permalink: /tB/Packages/Contributed/Fmt/AsciiEscapeBase +has_toc: false +--- + +# AsciiEscapeBase enumeration +{: .no_toc } + +Selects the number base of the digits in an ASCII escape sequence. + +**AsciiEscapeBase** is used by the *base* parameter of [**EscapeSequence.Create**](EscapeSequence/Create) and by the [**AsciiBase**](EscapeSequence/AsciiBase) property. It matters only for an escape sequence created with *isAsciiReplacement* set to **True**. The enumeration is declared in the [**EscapeSequence**](EscapeSequence/) class module, and its members are used without a qualifier or with the name `AsciiEscapeBase`. + +| Constant | Value | Description | +|----------|-------|-------------| +| **Octal**{: #Octal } | 0 | The digits that the escape's pattern captures are octal. The package reads them with the prefix `&O`. This is the default. | +| **Hexadecimal**{: #Hexadecimal } | 1 | The digits that the escape's pattern captures are hexadecimal. The package reads them with the prefix `&H`. | + +```tb check_build check_run +Debug.Print AsciiEscapeBase.Octal ' 0 +Debug.Print AsciiEscapeBase.Hexadecimal ' 1 +Debug.Print Hexadecimal ' 1 +``` + +[**StringHelper**](StringHelper) registers `\xHH` as a **Hexadecimal** escape and `\ooo` as an **Octal** one. + +## See Also + +- [EscapeSequence](EscapeSequence/) class -- one escape sequence +- [Create](EscapeSequence/Create) method -- creates an escape sequence with a base +- [AsciiBase](EscapeSequence/AsciiBase) property -- returns the base of an escape sequence +- [Fmt package](./) -- overview, with the table of escape sequences diff --git a/docs/Reference/Contributed/Fmt/CurrencySFI.md b/docs/Reference/Contributed/Fmt/CurrencySFI.md new file mode 100644 index 000000000..f09aa8594 --- /dev/null +++ b/docs/Reference/Contributed/Fmt/CurrencySFI.md @@ -0,0 +1,43 @@ +--- +title: CurrencySFI +parent: Fmt Package +permalink: /tB/Packages/Contributed/Fmt/CurrencySFI +has_toc: false +--- + +# CurrencySFI class +{: .no_toc } + +Formats a number as an amount of money for the **C** identifier. + +**CurrencySFI** is a format identifier class. It implements [**IStringFormatIdentifier**](IStringFormatIdentifier) and matches the identifier **C** or **c** in any case. [**StringHelper**](StringHelper) registers it, so `{0:C}` in a call to [**StringFormat**](PublicEntryPoints/StringFormat) uses it for a numeric value. The class is predeclared, and its two members are reached through the interface. + +## Output + +The value is passed to **Format$**. Without a precision the format is `#,##0.00$`: thousands separators, two decimal places and a `$` after the number. With a precision *n* greater than zero the format has *n* decimal places instead. A precision of `0` is the same as none. + +The `$` is a fixed character placed after the number. It is not the currency symbol of the system locale, and the identifier does not move it in front of the number. The thousands separator and the decimal point follow the Windows regional settings. + +```tb check_build +Debug.Print StringFormat("{0:C}", 1234.5) ' 1,234.50$ +Debug.Print StringFormat("{0:C3}", 2.5) ' 2.500$ +Debug.Print StringFormat("{0:C0}", 17.63245) ' 17.63$ +Debug.Print StringFormat("{0:C}", -5) ' -5.00$ +``` + +The output shown is for an English (United States) system. + +## Members + +- **IsIdentifierMatch** returns **True** when the specifier's [**identifier**](StringFormatSpecifier/identifier) is `C` or `c`. +- **GetFormattedValue** returns the value formatted as described above. It reads the specifier's [**Precision**](StringFormatSpecifier/Precision). + +Both are implemented as private members of the interface. + +## See Also + +- [IStringFormatIdentifier](IStringFormatIdentifier) interface -- the contract every format identifier class implements +- [DecimalSFI](DecimalSFI) class -- integer digits, padded with zeros +- [FixedPointSFI](FixedPointSFI) class -- a fixed number of decimal places, no separators +- [StringFormat](PublicEntryPoints/StringFormat) function -- formats a string using the identifiers +- [Fmt package](./) -- overview, with the table of identifiers diff --git a/docs/Reference/Contributed/Fmt/DateTimeSFI.md b/docs/Reference/Contributed/Fmt/DateTimeSFI.md new file mode 100644 index 000000000..1554f7796 --- /dev/null +++ b/docs/Reference/Contributed/Fmt/DateTimeSFI.md @@ -0,0 +1,44 @@ +--- +title: DateTimeSFI +parent: Fmt Package +permalink: /tB/Packages/Contributed/Fmt/DateTimeSFI +has_toc: false +--- + +# DateTimeSFI class +{: .no_toc } + +Formats a **Date** for the same identifiers as **GenericDateTimeSFI**, but is not registered with **StringHelper**. + +**DateTimeSFI** is a format identifier class. It implements [**IStringFormatIdentifier**](IStringFormatIdentifier) and contains the same code as [**GenericDateTimeSFI**](GenericDateTimeSFI): the identifiers **d**, **D**, **f**, **F**, **g**, **G**, **s**, **t**, **T** and **C** give the same results, and any other identifier does not match. The table of identifiers is on the [**GenericDateTimeSFI**](GenericDateTimeSFI#identifiers) page. + +[**StringHelper**](StringHelper) registers **GenericDateTimeSFI** and not this class, so [**StringFormat**](PublicEntryPoints/StringFormat) never calls it. Code that calls the format identifier classes directly can use it. The class is predeclared, and its two members are reached through the interface. + +```tb check_build check_run +Dim spec As New StringFormatSpecifier +spec.identifier = "d" + +Dim f As IStringFormatIdentifier +Set f = DateTimeSFI +Debug.Print f.IsIdentifierMatch(spec) ' True + +spec.identifier = "q" +Debug.Print f.IsIdentifierMatch(spec) ' False + +spec.identifier = "C" +spec.CustomSpecifier = "yyyy-MM-dd" +Debug.Print f.GetFormattedValue(#2026-10-11 14:05:09#, spec) ' 2026-10-11 +``` + +## Members + +- **IsIdentifierMatch** returns **True** when the specifier's [**identifier**](StringFormatSpecifier/identifier) is `C` or `c`, or is one of the other nine letters. +- **GetFormattedValue** returns the value formatted by the identifier. With `C` it uses the specifier's [**CustomSpecifier**](StringFormatSpecifier/CustomSpecifier). + +Both are implemented as private members of the interface. + +## See Also + +- [IStringFormatIdentifier](IStringFormatIdentifier) interface -- the contract every format identifier class implements +- [GenericDateTimeSFI](GenericDateTimeSFI) class -- the registered date and time identifier +- [Fmt package](./) -- overview, with the table of identifiers diff --git a/docs/Reference/Contributed/Fmt/DecimalSFI.md b/docs/Reference/Contributed/Fmt/DecimalSFI.md new file mode 100644 index 000000000..5e6b694ad --- /dev/null +++ b/docs/Reference/Contributed/Fmt/DecimalSFI.md @@ -0,0 +1,41 @@ +--- +title: DecimalSFI +parent: Fmt Package +permalink: /tB/Packages/Contributed/Fmt/DecimalSFI +has_toc: false +--- + +# DecimalSFI class +{: .no_toc } + +Formats a number as whole-number digits for the **D** identifier. + +**DecimalSFI** is a format identifier class. It implements [**IStringFormatIdentifier**](IStringFormatIdentifier) and matches the identifier **D** or **d** in any case. [**StringHelper**](StringHelper) registers it, so `{0:D}` in a call to [**StringFormat**](PublicEntryPoints/StringFormat) uses it for a numeric value. The class is predeclared, and its two members are reached through the interface. + +## Output + +The value is passed to **Format$** with a format of zeros. Without a precision the format is `0`. With a precision *n* the format is *n* zeros, so the result has at least *n* digits and shorter numbers are padded on the left with zeros. A value with a fractional part is rounded to a whole number, and a negative number keeps its minus sign in front of the padding. A value with more digits than *n* is not shortened. + +```tb check_build check_run +Debug.Print StringFormat("{0:D}", 42) ' 42 +Debug.Print StringFormat("{0:D5}", 42) ' 00042 +Debug.Print StringFormat("{0:D3}", -5) ' -005 +Debug.Print StringFormat("{0:D}", 3.7) ' 4 +Debug.Print StringFormat("{0:D2}", 1234) ' 1234 +Debug.Print StringFormat("{0:D2}:{1:D2}", 7, 5) ' 07:05 +``` + +## Members + +- **IsIdentifierMatch** returns **True** when the specifier's [**identifier**](StringFormatSpecifier/identifier) is `D` or `d`. +- **GetFormattedValue** returns the value formatted as described above. It reads the specifier's [**Precision**](StringFormatSpecifier/Precision). + +Both are implemented as private members of the interface. [**GeneralNumericSFI**](GeneralNumericSFI) calls this class for **Integer** and **Long** values. + +## See Also + +- [IStringFormatIdentifier](IStringFormatIdentifier) interface -- the contract every format identifier class implements +- [HexSFI](HexSFI) class -- hexadecimal digits, padded with zeros +- [GeneralNumericSFI](GeneralNumericSFI) class -- the **G** identifier, which uses this class for integers +- [StringFormat](PublicEntryPoints/StringFormat) function -- formats a string using the identifiers +- [Fmt package](./) -- overview, with the table of identifiers diff --git a/docs/Reference/Contributed/Fmt/EscapeSequence/AsciiBase.md b/docs/Reference/Contributed/Fmt/EscapeSequence/AsciiBase.md new file mode 100644 index 000000000..0cc87430e --- /dev/null +++ b/docs/Reference/Contributed/Fmt/EscapeSequence/AsciiBase.md @@ -0,0 +1,53 @@ +--- +title: AsciiBase +parent: EscapeSequence +permalink: /tB/Packages/Contributed/Fmt/EscapeSequence/AsciiBase +has_toc: false +--- + +# AsciiBase +{: .no_toc } + +Returns or sets the number base of the digits that an ASCII escape sequence captures. + +## Get + +Returns an [**AsciiEscapeBase**](../AsciiEscapeBase) value. + +Syntax: *object*.**AsciiBase** + +*object* +: *required* An object expression that evaluates to an **EscapeSequence**. + +The default value is **Octal**. The value matters only when [**IsAsciiCharacter**](IsAsciiCharacter) is **True**. + +## Let + +Declared **Friend**. Sets the number base. + +Syntax: *object*.**AsciiBase** **=** *value* + +*value* +: An [**AsciiEscapeBase**](../AsciiEscapeBase) value: **Octal** (0) or **Hexadecimal** (1). + +## Remarks + +[**Create**](Create) sets the property from its *base* argument. [**Execute**](Execute) reads the captured digits with the prefix `&O` for **Octal** and `&H` for **Hexadecimal**. + +## Example + +```tb check_build check_run +Dim esc As EscapeSequence +Set esc = EscapeSequence.Create("\\x(\w{2})", vbNullString, True, Hexadecimal) +Debug.Print esc.AsciiBase ' 1 + +Set esc = EscapeSequence.Create("\\(\d{3})", vbNullString, True) +Debug.Print esc.AsciiBase ' 0 +``` + +## See Also + +- [IsAsciiCharacter](IsAsciiCharacter) property -- whether the base is used +- [Create](Create) method -- sets the base +- [AsciiEscapeBase](../AsciiEscapeBase) enumeration -- the number bases +- [EscapeSequence](./) class -- overview diff --git a/docs/Reference/Contributed/Fmt/EscapeSequence/Create.md b/docs/Reference/Contributed/Fmt/EscapeSequence/Create.md new file mode 100644 index 000000000..8c86fa7cc --- /dev/null +++ b/docs/Reference/Contributed/Fmt/EscapeSequence/Create.md @@ -0,0 +1,61 @@ +--- +title: Create +parent: EscapeSequence +permalink: /tB/Packages/Contributed/Fmt/EscapeSequence/Create +has_toc: false +--- + +# Create +{: .no_toc } + +Creates an escape sequence, plain or ASCII. + +Syntax: *object*.**Create** ( *escape*, *replacement* [, *isAsciiReplacement* [, *base* ]] ) **As EscapeSequence** + +*object* +: *required* The class name, `EscapeSequence`, which is predeclared. + +*escape* +: *required* A **String**. For a plain sequence, the text to look for, such as `\n`. For an ASCII sequence, a regular expression with one capture group that captures the digits of the character code, such as `\\x(\w{2})`. The expression ignores letter case. + +*replacement* +: *required* A **String**, the text that replaces *escape* in a plain sequence. An ASCII sequence ignores it, and `vbNullString` can be passed. + +*isAsciiReplacement* +: *optional* A **Boolean**. **True** makes the sequence an ASCII sequence. The default is **False**. + +*base* +: *optional* An [**AsciiEscapeBase**](../AsciiEscapeBase) value, the number base of the captured digits. It matters only for an ASCII sequence. The default is **Octal**. + +Returns a new **EscapeSequence** whose [**EscapeString**](EscapeString), [**ReplacementString**](ReplacementString), [**IsAsciiCharacter**](IsAsciiCharacter) and [**AsciiBase**](AsciiBase) properties hold the arguments. + +## Remarks + +**Create** is the intended way to make an escape sequence. It fills in a new instance through the **Friend** setters of the properties and returns it through [**Self**](Self). + +## Example + +This example creates a plain sequence and an ASCII sequence. + +```tb check_build check_run +Dim plain As EscapeSequence +Set plain = EscapeSequence.Create("\z", "ZZ") +Debug.Print plain.EscapeString & " " & plain.ReplacementString ' \z ZZ +Debug.Print plain.IsAsciiCharacter ' False + +Dim ascii As EscapeSequence +Set ascii = EscapeSequence.Create("\\#(\d{2})", vbNullString, True, Hexadecimal) +Debug.Print ascii.IsAsciiCharacter ' True +Debug.Print ascii.AsciiBase ' 1 + +Dim text As String +text = "a\#41b\#42" +ascii.Execute text +Debug.Print text ' aAbB +``` + +## See Also + +- [Execute](Execute) method -- applies the sequence to a string +- [AsciiEscapeBase](../AsciiEscapeBase) enumeration -- the number bases +- [EscapeSequence](./) class -- overview diff --git a/docs/Reference/Contributed/Fmt/EscapeSequence/EscapeString.md b/docs/Reference/Contributed/Fmt/EscapeSequence/EscapeString.md new file mode 100644 index 000000000..f0f290139 --- /dev/null +++ b/docs/Reference/Contributed/Fmt/EscapeSequence/EscapeString.md @@ -0,0 +1,53 @@ +--- +title: EscapeString +parent: EscapeSequence +permalink: /tB/Packages/Contributed/Fmt/EscapeSequence/EscapeString +has_toc: false +--- + +# EscapeString +{: .no_toc } + +Returns or sets the text, or the regular expression, that the escape sequence looks for. + +## Get + +Returns a **String**. + +Syntax: *object*.**EscapeString** + +*object* +: *required* An object expression that evaluates to an **EscapeSequence**. + +The default value is an empty string. For a plain sequence the value is the text itself, such as `\n`. For an ASCII sequence ([**IsAsciiCharacter**](IsAsciiCharacter) is **True**) it is a regular expression with one capture group, such as `\\x(\w{2})`. + +## Let + +Declared **Friend**. Sets the text or the expression. + +Syntax: *object*.**EscapeString** **=** *value* + +*value* +: A **String**. + +## Remarks + +[**Create**](Create) sets the property from its *escape* argument. + +## Example + +```tb check_build check_run +Dim esc As EscapeSequence +Set esc = EscapeSequence.Create("\z", "ZZ") +Debug.Print esc.EscapeString ' \z + +esc.EscapeString = "\y" +Debug.Print esc.EscapeString ' \y +``` + +## See Also + +- [ReplacementString](ReplacementString) property -- the text that replaces it +- [Create](Create) method -- sets the text +- [Execute](Execute) method -- applies the sequence +- [EscapeSequence](./) class -- overview diff --git a/docs/Reference/Contributed/Fmt/EscapeSequence/Execute.md b/docs/Reference/Contributed/Fmt/EscapeSequence/Execute.md new file mode 100644 index 000000000..1d1388e19 --- /dev/null +++ b/docs/Reference/Contributed/Fmt/EscapeSequence/Execute.md @@ -0,0 +1,50 @@ +--- +title: Execute +parent: EscapeSequence +permalink: /tB/Packages/Contributed/Fmt/EscapeSequence/Execute +has_toc: false +--- + +# Execute +{: .no_toc } + +Applies the escape sequence to a string, replacing it in place. + +Syntax: *object*.**Execute** ( *string_value* ) + +*object* +: *required* An object expression that evaluates to an **EscapeSequence**. + +*string_value* +: *required* A **String** variable, passed by reference. On return it holds the text with the sequence replaced. + +## Remarks + +A plain sequence replaces every occurrence of [**EscapeString**](EscapeString) with [**ReplacementString**](ReplacementString). The match takes letter case into account, so `\z` does not replace `\Z`. The string is left alone when it does not contain the text. + +An ASCII sequence reads [**EscapeString**](EscapeString) as a regular expression that ignores letter case. For each match it reads the digits of the first capture group in the base given by [**AsciiBase**](AsciiBase) and replaces the matched text with the character that has that code. [**ReplacementString**](ReplacementString) is not used. Two details follow from the implementation: + +- The expression is applied only when the string contains a backslash. A pattern that does not match a backslash, such as `#(\d{3})`, has no effect on a string that has none. +- Digits that are not valid in the base, as in `\189` read as octal, raise run-time error 13, *Type mismatch*. + +## Example + +```tb check_build check_run +Dim esc As EscapeSequence +Set esc = EscapeSequence.Create("\z", "ZZ") + +Dim text As String +text = "a\zb\z" +esc.Execute text +Debug.Print text ' aZZbZZ + +text = "a\Zb" +esc.Execute text +Debug.Print text ' a\Zb +``` + +## See Also + +- [Create](Create) method -- creates an escape sequence +- [AsciiBase](AsciiBase) property -- the number base of an ASCII sequence +- [EscapeSequence](./) class -- overview diff --git a/docs/Reference/Contributed/Fmt/EscapeSequence/IsAsciiCharacter.md b/docs/Reference/Contributed/Fmt/EscapeSequence/IsAsciiCharacter.md new file mode 100644 index 000000000..9ed291baa --- /dev/null +++ b/docs/Reference/Contributed/Fmt/EscapeSequence/IsAsciiCharacter.md @@ -0,0 +1,48 @@ +--- +title: IsAsciiCharacter +parent: EscapeSequence +permalink: /tB/Packages/Contributed/Fmt/EscapeSequence/IsAsciiCharacter +has_toc: false +--- + +# IsAsciiCharacter +{: .no_toc } + +Returns or sets whether the escape sequence stands for a character code instead of fixed text. + +## Get + +Returns a **Boolean**. + +Syntax: *object*.**IsAsciiCharacter** + +*object* +: *required* An object expression that evaluates to an **EscapeSequence**. + +The default value is **False**. **True** means that [**EscapeString**](EscapeString) is a regular expression whose capture group holds the digits of a character code, and that [**ReplacementString**](ReplacementString) is not used. + +## Let + +Declared **Friend**. Sets the value. + +Syntax: *object*.**IsAsciiCharacter** **=** *value* + +*value* +: A **Boolean**. + +## Remarks + +[**Create**](Create) sets the property from its *isAsciiReplacement* argument. [**Execute**](Execute) takes the ASCII path when the value is **True**, reading the digits in the base given by [**AsciiBase**](AsciiBase). + +## Example + +```tb check_build check_run +Debug.Print EscapeSequence.Create("\n", vbNewLine).IsAsciiCharacter ' False +Debug.Print EscapeSequence.Create("\\(\d{3})", vbNullString, True).IsAsciiCharacter ' True +``` + +## See Also + +- [AsciiBase](AsciiBase) property -- the number base used when the value is **True** +- [Create](Create) method -- sets the value +- [EscapeSequence](./) class -- overview diff --git a/docs/Reference/Contributed/Fmt/EscapeSequence/ReplacementString.md b/docs/Reference/Contributed/Fmt/EscapeSequence/ReplacementString.md new file mode 100644 index 000000000..fee79aef9 --- /dev/null +++ b/docs/Reference/Contributed/Fmt/EscapeSequence/ReplacementString.md @@ -0,0 +1,50 @@ +--- +title: ReplacementString +parent: EscapeSequence +permalink: /tB/Packages/Contributed/Fmt/EscapeSequence/ReplacementString +has_toc: false +--- + +# ReplacementString +{: .no_toc } + +Returns or sets the text that replaces a plain escape sequence. + +## Get + +Returns a **String**. + +Syntax: *object*.**ReplacementString** + +*object* +: *required* An object expression that evaluates to an **EscapeSequence**. + +The default value is an empty string. An ASCII sequence ([**IsAsciiCharacter**](IsAsciiCharacter) is **True**) does not use the value. + +## Let + +Declared **Friend**. Sets the replacement text. + +Syntax: *object*.**ReplacementString** **=** *value* + +*value* +: A **String**. + +## Remarks + +[**Create**](Create) sets the property from its *replacement* argument. [**Execute**](Execute) puts the value in place of every occurrence of [**EscapeString**](EscapeString). + +## Example + +```tb check_build check_run +Dim esc As EscapeSequence +Set esc = EscapeSequence.Create("\n", vbNewLine) +Debug.Print Len(esc.ReplacementString) ' 2 +``` + +## See Also + +- [EscapeString](EscapeString) property -- the text that is replaced +- [Create](Create) method -- sets the replacement +- [Execute](Execute) method -- applies the sequence +- [EscapeSequence](./) class -- overview diff --git a/docs/Reference/Contributed/Fmt/EscapeSequence/Self.md b/docs/Reference/Contributed/Fmt/EscapeSequence/Self.md new file mode 100644 index 000000000..dd30bfe44 --- /dev/null +++ b/docs/Reference/Contributed/Fmt/EscapeSequence/Self.md @@ -0,0 +1,35 @@ +--- +title: Self +parent: EscapeSequence +permalink: /tB/Packages/Contributed/Fmt/EscapeSequence/Self +has_toc: false +--- + +# Self +{: .no_toc } + +Returns the escape sequence object itself. + +Syntax: *object*.**Self** + +*object* +: *required* An object expression that evaluates to an **EscapeSequence**. + +Returns the same **EscapeSequence** that *object* refers to. The property is read-only and is declared **Friend**. + +## Remarks + +[**Create**](Create) builds the new instance inside a `With New EscapeSequence` block and returns it through **Self**, because a `With` block does not give a way to name the object it works on. A project that references the package can call **Self** as well (checked on BETA 1005), though it only returns what the caller already holds. + +## Example + +```tb check_build check_run +Dim esc As EscapeSequence +Set esc = EscapeSequence.Create("\z", "ZZ") +Debug.Print (esc.Self Is esc) ' True +``` + +## See Also + +- [Create](Create) method -- uses the property +- [EscapeSequence](./) class -- overview diff --git a/docs/Reference/Contributed/Fmt/EscapeSequence/index.md b/docs/Reference/Contributed/Fmt/EscapeSequence/index.md new file mode 100644 index 000000000..b60a0c5b2 --- /dev/null +++ b/docs/Reference/Contributed/Fmt/EscapeSequence/index.md @@ -0,0 +1,51 @@ +--- +title: EscapeSequence +parent: Fmt Package +permalink: /tB/Packages/Contributed/Fmt/EscapeSequence/ +has_toc: false +--- + +# EscapeSequence class +{: .no_toc } + +Describes one escape sequence of a format string, the text to look for and what replaces it, and applies it to a string. + +An escape sequence is either plain or ASCII: + +- A **plain** sequence replaces every occurrence of a fixed text with a fixed replacement. `\n` and `\t` are plain. +- An **ASCII** sequence is a regular expression with one capture group. The group captures the digits of a character code, which are read in octal or hexadecimal ([**AsciiEscapeBase**](../AsciiEscapeBase)), and each match is replaced with the character that has that code. `\xHH` and `\ooo` are ASCII. + +**EscapeSequence** is predeclared. [**Create**](Create) is called on the class name and returns a configured instance, and [**Execute**](Execute) applies the sequence to a string. [**StringHelper**](../StringHelper) creates the ten sequences that **StringFormat** expands; the [package overview](../#escape-sequences) lists them. + +```tb check_build check_run +Dim esc As EscapeSequence +Set esc = EscapeSequence.Create("\z", "ZZ") + +Dim text As String +text = "a\zb" +esc.Execute text +Debug.Print text ' aZZb +``` + +> [!NOTE] +> [**Self**](Self) and the four property setters ([**AsciiBase**](AsciiBase), [**EscapeString**](EscapeString), [**IsAsciiCharacter**](IsAsciiCharacter) and [**ReplacementString**](ReplacementString) with **Let**) are declared **Friend**, for [**Create**](Create) to use. A project that references the package can call them too (checked on BETA 1005), so the properties of an instance can be changed after it is created. + +## Properties + +- [AsciiBase](AsciiBase) -- returns the number base of an ASCII sequence +- [EscapeString](EscapeString) -- returns the text or the pattern to look for +- [IsAsciiCharacter](IsAsciiCharacter) -- returns whether the sequence is an ASCII sequence +- [ReplacementString](ReplacementString) -- returns the text that replaces a plain sequence +- [Self](Self) -- returns the object itself + +## Methods + +- [Create](Create) -- creates an escape sequence +- [Execute](Execute) -- applies the sequence to a string + +## See Also + +- [AsciiEscapeBase](../AsciiEscapeBase) enumeration -- the number bases +- [StringHelper](../StringHelper) class -- creates and applies the sequences +- [FormerEscapeSequence](../FormerEscapeSequence/) class -- a plain sequence without an **Execute** method, unused by the package +- [Fmt package](../) -- overview, with the table of escape sequences diff --git a/docs/Reference/Contributed/Fmt/ExponentialSFI.md b/docs/Reference/Contributed/Fmt/ExponentialSFI.md new file mode 100644 index 000000000..ecc24fd67 --- /dev/null +++ b/docs/Reference/Contributed/Fmt/ExponentialSFI.md @@ -0,0 +1,63 @@ +--- +title: ExponentialSFI +parent: Fmt Package +permalink: /tB/Packages/Contributed/Fmt/ExponentialSFI +has_toc: false +--- + +# ExponentialSFI class +{: .no_toc } + +Formats a number in exponential notation for the **E** identifier, and reads the exponent back from such a text. + +**ExponentialSFI** is a format identifier class. It implements [**IStringFormatIdentifier**](IStringFormatIdentifier) and matches the identifier **E** or **e** in any case. [**StringHelper**](StringHelper) registers it, so `{0:E}` in a call to [**StringFormat**](PublicEntryPoints/StringFormat) uses it for a numeric value. The class is predeclared. Its interface members are reached through the interface, and [**ParseExponent**](#parseexponent) is public. + +## Output + +The value is passed to **Format$** with a format of the form `0.00000#E-#`. The letter in the format is the identifier as written, so `E` gives an upper-case `E` in the result and `e` a lower-case `e`. The exponent has no plus sign and no leading zeros. + +- Without a precision the mantissa has six decimal places. The sixth is optional, so a trailing zero there is dropped. +- With a precision *n* greater than zero the mantissa has *n* decimal places, and the last of them is optional. A precision of `0` is the same as none. + +```tb check_build check_run +Debug.Print StringFormat("{0:E}", 12345.678) ' 1.234568E4 +Debug.Print StringFormat("{0:E2}", 12345.678) ' 1.23E4 +Debug.Print StringFormat("{0:e}", 12345.678) ' 1.234568e4 +Debug.Print StringFormat("{0:E}", 0.00012345) ' 1.23450E-4 +Debug.Print StringFormat("{0:E3}", 1.5) ' 1.50E0 +Debug.Print StringFormat("{0:E1}", 1.5) ' 1.5E0 +``` + +## Members + +### ParseExponent + +Returns the exponent of a value that was formatted in exponential notation. + +Syntax: *object*.**ParseExponent** ( *formattedValue* ) **As Long** + +*formattedValue* +: *required* A **String** holding exponential notation, such as `"1.5E-3"`. The text after the first `E` or `e` is converted to a **Long**. + +Returns the exponent as a **Long**. **ParseExponent** is public so that [**GeneralNumericSFI**](GeneralNumericSFI) can call it. Call it on the predeclared instance, `ExponentialSFI.ParseExponent`. + +```tb check_build check_run +Debug.Print ExponentialSFI.ParseExponent("1.5E-3") ' -3 +Debug.Print ExponentialSFI.ParseExponent("1.5E4") ' 4 +Debug.Print ExponentialSFI.ParseExponent("1.5e12") ' 12 +``` + +### IsIdentifierMatch and GetFormattedValue + +- **IsIdentifierMatch** returns **True** when the specifier's [**identifier**](StringFormatSpecifier/identifier) is `E` or `e`. +- **GetFormattedValue** returns the value formatted as described above. It reads the specifier's [**Precision**](StringFormatSpecifier/Precision) and [**identifier**](StringFormatSpecifier/identifier). + +Both are implemented as private members of the interface. + +## See Also + +- [IStringFormatIdentifier](IStringFormatIdentifier) interface -- the contract every format identifier class implements +- [GeneralNumericSFI](GeneralNumericSFI) class -- the **G** identifier, which chooses between this class and **FixedPointSFI** +- [FixedPointSFI](FixedPointSFI) class -- a fixed number of decimal places +- [StringFormat](PublicEntryPoints/StringFormat) function -- formats a string using the identifiers +- [Fmt package](./) -- overview, with the table of identifiers diff --git a/docs/Reference/Contributed/Fmt/FixedPointSFI.md b/docs/Reference/Contributed/Fmt/FixedPointSFI.md new file mode 100644 index 000000000..99f890a9e --- /dev/null +++ b/docs/Reference/Contributed/Fmt/FixedPointSFI.md @@ -0,0 +1,41 @@ +--- +title: FixedPointSFI +parent: Fmt Package +permalink: /tB/Packages/Contributed/Fmt/FixedPointSFI +has_toc: false +--- + +# FixedPointSFI class +{: .no_toc } + +Formats a number with a fixed count of decimal places for the **F** identifier. + +**FixedPointSFI** is a format identifier class. It implements [**IStringFormatIdentifier**](IStringFormatIdentifier) and matches the identifier **F** or **f** in any case. [**StringHelper**](StringHelper) registers it, so `{0:F}` in a call to [**StringFormat**](PublicEntryPoints/StringFormat) uses it for a numeric value. The class is predeclared, and its two members are reached through the interface. + +## Output + +The value is passed to **Format$**. Without a precision the format is `0.00`, two decimal places. With a precision *n* greater than zero the format is `0.` followed by *n* zeros. A precision of `0` is the same as none, so `{0:F0}` also gives two decimal places. The result has no thousands separator, and the decimal point follows the Windows regional settings. + +```tb check_build check_run +Debug.Print StringFormat("{0:F}", 3.14159) ' 3.14 +Debug.Print StringFormat("{0:F3}", 3.14159) ' 3.142 +Debug.Print StringFormat("{0:f1}", -3.14159) ' -3.1 +Debug.Print StringFormat("{0:F0}", 2.5) ' 2.50 +Debug.Print StringFormat("{0:F2}", 12345.678) ' 12345.68 +``` + +## Members + +- **IsIdentifierMatch** returns **True** when the specifier's [**identifier**](StringFormatSpecifier/identifier) is `F` or `f`. +- **GetFormattedValue** returns the value formatted as described above. It reads the specifier's [**Precision**](StringFormatSpecifier/Precision). + +Both are implemented as private members of the interface. [**GeneralNumericSFI**](GeneralNumericSFI) calls this class when it chooses fixed-point notation. + +## See Also + +- [IStringFormatIdentifier](IStringFormatIdentifier) interface -- the contract every format identifier class implements +- [CurrencySFI](CurrencySFI) class -- decimal places with thousands separators and a trailing `$` +- [ExponentialSFI](ExponentialSFI) class -- exponential notation +- [GeneralNumericSFI](GeneralNumericSFI) class -- the **G** identifier, which can fall back to this class +- [StringFormat](PublicEntryPoints/StringFormat) function -- formats a string using the identifiers +- [Fmt package](./) -- overview, with the table of identifiers diff --git a/docs/Reference/Contributed/Fmt/FormerEntryPoint/FormerStringFormat.md b/docs/Reference/Contributed/Fmt/FormerEntryPoint/FormerStringFormat.md new file mode 100644 index 000000000..b5a40c467 --- /dev/null +++ b/docs/Reference/Contributed/Fmt/FormerEntryPoint/FormerStringFormat.md @@ -0,0 +1,72 @@ +--- +title: FormerStringFormat +parent: FormerEntryPoint +permalink: /tB/Packages/Contributed/Fmt/FormerEntryPoint/FormerStringFormat +has_toc: false +--- + +# FormerStringFormat +{: .no_toc } + +Builds a string from a format string and a list of values, with the earlier implementation of the formatter. + +Syntax: **FormerStringFormat** ( *format_string* [, *values* ] ) **As String** + +*format_string* +: *required* A **String** that holds text, format items and escape sequences, in the same notation as [**StringFormat**](../PublicEntryPoints/StringFormat). A leading `@` turns the escape sequences off. + +*values* +: *optional* Any number of values. The first value is index `0`. This is a **ParamArray** of **Variant**. + +Returns the format string with every format item and escape sequence replaced. + +## Remarks + +The function reads the same format items (`{index[,alignment][:identifier[precision]]}`) and the same escape sequences as [**StringFormat**](../PublicEntryPoints/StringFormat), checks that the number of distinct indexes equals the number of values, and aligns values in the same way. The identifiers `C D E F G P R X` for numbers and `d D f F g G s t T C` for dates exist here too. + +It differs from [**StringFormat**](../PublicEntryPoints/StringFormat) in these ways: + +- **N** is understood. `{0:N}` writes a number with thousands separators and no decimal places, and `{0:N2}` with two decimal places. **StringFormat** does not know the identifier. +- A few custom number formats are passed to **Format$**, for example `{0:0.00}`. +- **G** without a precision takes the count of digits after the decimal point in the value as its precision. `{0:G}` of `123.456` gives `123.46` here and `1.23456E2` in **StringFormat**. +- **X** writes the prefix `&H` in upper case whatever the case of the identifier. `{0:x4}` of `255` gives `&H00ff` here and `&h00ff` in **StringFormat**. +- The escape sequence `\xHH` is not expanded. `\x41` stays as written, where **StringFormat** gives `A`. The simple sequences and `\ooo` are expanded as in **StringFormat**. +- A non-numeric value with a numeric identifier raises error `-2147212501` (`vbObjectError Or 9003`), *Invalid number argument*. **StringFormat** raises *Invalid format string*. `{0:E0}` raises *Invalid format string* here, where **StringFormat** treats `E0` as `E`. +- Its errors have the source `FormerStringFormat`. The error for a wrong count of values has the same number, `-2147212503`, and the same text as **StringFormat**. + +```tb check_build check_run +Debug.Print FormerStringFormat("{0} {1:F2}", "x", 2.5) ' x 2.50 +Debug.Print FormerStringFormat("{0:P1}", 0.12345) ' 12.3% +Debug.Print FormerStringFormat("{0:x4}", 255) ' &H00ff +Debug.Print StringFormat("{0:x4}", 255) ' &h00ff + +Debug.Print FormerStringFormat("\x41\101") ' \x41A +Debug.Print StringFormat("\x41\101") ' AA + +Debug.Print FormerStringFormat("{0:G}", 123.456) ' 123.46 +Debug.Print StringFormat("{0:G}", 123.456) ' 1.23456E2 +``` + +## Example + +This example uses **N** and a custom number format, which only this function accepts. The results depend on the regional settings, so the output shown is for English (United States). + +```tb check_build +Debug.Print FormerStringFormat("{0:N}|{0:N2}", 1234567.891) ' 1,234,568|1,234,567.89 +Debug.Print FormerStringFormat("{0:0.00}", 3.14159) ' 3.14 +``` + +This example shows the error for a value that is not a number. + +```tb check_build check_run +On Error Resume Next +Debug.Print FormerStringFormat("{0:C}", "abc") +Debug.Print Err.Number & ": " & Err.Description ' -2147212501: Invalid number argument. +``` + +## See Also + +- [StringFormat](../PublicEntryPoints/StringFormat) function -- the current implementation +- [FormerEscapeSequence](../FormerEscapeSequence/) class -- an escape sequence class that this function does not use +- [FormerEntryPoint](./) module +- [Fmt package](../) -- overview diff --git a/docs/Reference/Contributed/Fmt/FormerEntryPoint/index.md b/docs/Reference/Contributed/Fmt/FormerEntryPoint/index.md new file mode 100644 index 000000000..fa8ad6668 --- /dev/null +++ b/docs/Reference/Contributed/Fmt/FormerEntryPoint/index.md @@ -0,0 +1,27 @@ +--- +title: FormerEntryPoint +parent: Fmt Package +permalink: /tB/Packages/Contributed/Fmt/FormerEntryPoint/ +has_toc: false +--- + +# FormerEntryPoint module +{: .no_toc } + +Holds **FormerStringFormat**, the earlier implementation of the formatter, which is kept in the package beside the newer one. + +**FormerEntryPoint** is a standard module with one function, [**FormerStringFormat**](FormerStringFormat). The function does the whole job in one procedure, in the style of VB6 code. It does not use [**StringHelper**](../StringHelper), [**StringFormatSpecifier**](../StringFormatSpecifier/) or the format identifier classes, and only borrows [**EscapeSequence**](../EscapeSequence/) for the simple escape sequences. It takes the same format strings as [**StringFormat**](../PublicEntryPoints/StringFormat) with a few differences, which are listed on the page of the function. A project that references the package calls it by name or as `FormerEntryPoint.FormerStringFormat`. + +```tb check_build check_run +Debug.Print FormerStringFormat("{0} {1:F2}", "x", 2.5) ' x 2.50 +``` + +## Functions + +- [FormerStringFormat](FormerStringFormat) -- builds a string from a format string and a list of values, with the earlier implementation + +## See Also + +- [StringFormat](../PublicEntryPoints/StringFormat) function -- the current implementation +- [FormerEscapeSequence](../FormerEscapeSequence/) class -- an escape sequence class that the function does not use +- [Fmt package](../) -- overview diff --git a/docs/Reference/Contributed/Fmt/FormerEscapeSequence/Create.md b/docs/Reference/Contributed/Fmt/FormerEscapeSequence/Create.md new file mode 100644 index 000000000..ec94efb78 --- /dev/null +++ b/docs/Reference/Contributed/Fmt/FormerEscapeSequence/Create.md @@ -0,0 +1,46 @@ +--- +title: Create +parent: FormerEscapeSequence +permalink: /tB/Packages/Contributed/Fmt/FormerEscapeSequence/Create +has_toc: false +--- + +# Create +{: .no_toc } + +Creates a **FormerEscapeSequence** that holds a text and its replacement. + +Syntax: *object*.**Create** ( *escape*, *replacement* ) **As FormerEscapeSequence** + +*object* +: *required* An object expression that evaluates to a **FormerEscapeSequence**. The class is not predeclared, so create an instance with `New` first. + +*escape* +: *required* A **String**, the text to look for. The parameter is declared **ByRef**. + +*replacement* +: *required* A **String**, the replacement text. The parameter is declared **ByRef**. + +Returns a new **FormerEscapeSequence** whose [**EscapeString**](EscapeString) and [**ReplacementString**](ReplacementString) hold the arguments. The object that **Create** is called on is not changed. + +## Remarks + +The class has no constructor with arguments. **Create** takes its place: it makes a new instance, fills in the two properties through their **Friend** setters and returns it. + +## Example + +```tb check_build check_run +Dim factory As New FormerEscapeSequence + +Dim esc As FormerEscapeSequence +Set esc = factory.Create("\n", vbNewLine) +Debug.Print esc.EscapeString ' \n +Debug.Print Len(esc.ReplacementString) ' 2 +Debug.Print (esc Is factory) ' False +``` + +## See Also + +- [EscapeString](EscapeString) property -- the text to look for +- [ReplacementString](ReplacementString) property -- the replacement text +- [FormerEscapeSequence](./) class -- overview diff --git a/docs/Reference/Contributed/Fmt/FormerEscapeSequence/EscapeString.md b/docs/Reference/Contributed/Fmt/FormerEscapeSequence/EscapeString.md new file mode 100644 index 000000000..b0ec5e3d6 --- /dev/null +++ b/docs/Reference/Contributed/Fmt/FormerEscapeSequence/EscapeString.md @@ -0,0 +1,48 @@ +--- +title: EscapeString +parent: FormerEscapeSequence +permalink: /tB/Packages/Contributed/Fmt/FormerEscapeSequence/EscapeString +has_toc: false +--- + +# EscapeString +{: .no_toc } + +Returns or sets the text that the escape sequence looks for. + +## Get + +Returns a **String**. + +Syntax: *object*.**EscapeString** + +*object* +: *required* An object expression that evaluates to a **FormerEscapeSequence**. + +The default value is an empty string. + +## Let + +Declared **Friend**. Sets the text. + +Syntax: *object*.**EscapeString** **=** *value* + +*value* +: A **String**. + +## Remarks + +[**Create**](Create) sets the property on the instance that it returns. + +## Example + +```tb check_build check_run +Dim factory As New FormerEscapeSequence +Debug.Print factory.Create("\t", vbTab).EscapeString ' \t +``` + +## See Also + +- [ReplacementString](ReplacementString) property -- the text that replaces it +- [Create](Create) method -- sets the text +- [FormerEscapeSequence](./) class -- overview diff --git a/docs/Reference/Contributed/Fmt/FormerEscapeSequence/ReplacementString.md b/docs/Reference/Contributed/Fmt/FormerEscapeSequence/ReplacementString.md new file mode 100644 index 000000000..ba3f5648d --- /dev/null +++ b/docs/Reference/Contributed/Fmt/FormerEscapeSequence/ReplacementString.md @@ -0,0 +1,48 @@ +--- +title: ReplacementString +parent: FormerEscapeSequence +permalink: /tB/Packages/Contributed/Fmt/FormerEscapeSequence/ReplacementString +has_toc: false +--- + +# ReplacementString +{: .no_toc } + +Returns or sets the text that replaces the escape sequence. + +## Get + +Returns a **String**. + +Syntax: *object*.**ReplacementString** + +*object* +: *required* An object expression that evaluates to a **FormerEscapeSequence**. + +The default value is an empty string. + +## Let + +Declared **Friend**. Sets the replacement text. + +Syntax: *object*.**ReplacementString** **=** *value* + +*value* +: A **String**. + +## Remarks + +[**Create**](Create) sets the property on the instance that it returns. + +## Example + +```tb check_build check_run +Dim factory As New FormerEscapeSequence +Debug.Print factory.Create("\q", Chr$(34)).ReplacementString ' " +``` + +## See Also + +- [EscapeString](EscapeString) property -- the text that is replaced +- [Create](Create) method -- sets the replacement +- [FormerEscapeSequence](./) class -- overview diff --git a/docs/Reference/Contributed/Fmt/FormerEscapeSequence/index.md b/docs/Reference/Contributed/Fmt/FormerEscapeSequence/index.md new file mode 100644 index 000000000..96e1449df --- /dev/null +++ b/docs/Reference/Contributed/Fmt/FormerEscapeSequence/index.md @@ -0,0 +1,38 @@ +--- +title: FormerEscapeSequence +parent: Fmt Package +permalink: /tB/Packages/Contributed/Fmt/FormerEscapeSequence/ +has_toc: false +--- + +# FormerEscapeSequence class +{: .no_toc } + +Holds a piece of text and its replacement, in the form of the earlier escape sequence class of the package. + +**FormerEscapeSequence** has two properties, [**EscapeString**](EscapeString) and [**ReplacementString**](ReplacementString), and a [**Create**](Create) method that returns a new instance. It has no method that applies the sequence to a string and cannot describe an ASCII escape. Nothing in the package uses it: [**FormerStringFormat**](../FormerEntryPoint/FormerStringFormat) creates [**EscapeSequence**](../EscapeSequence/) objects. + +Unlike **EscapeSequence**, the class is not predeclared, so an instance is created with `New`, and **Create** is called on that instance. The two property setters are declared **Friend**, and a project that references the package can call them as well (checked on BETA 1005). + +```tb check_build check_run +Dim blank As New FormerEscapeSequence + +Dim esc As FormerEscapeSequence +Set esc = blank.Create("\z", "ZZ") +Debug.Print esc.EscapeString & " " & esc.ReplacementString ' \z ZZ +``` + +## Properties + +- [EscapeString](EscapeString) -- returns or sets the text to look for +- [ReplacementString](ReplacementString) -- returns or sets the replacement text + +## Methods + +- [Create](Create) -- creates an escape sequence + +## See Also + +- [EscapeSequence](../EscapeSequence/) class -- the escape sequence class that the package uses +- [FormerStringFormat](../FormerEntryPoint/FormerStringFormat) function -- the older formatter +- [Fmt package](../) -- overview diff --git a/docs/Reference/Contributed/Fmt/GeneralNumericSFI.md b/docs/Reference/Contributed/Fmt/GeneralNumericSFI.md new file mode 100644 index 000000000..a61a57731 --- /dev/null +++ b/docs/Reference/Contributed/Fmt/GeneralNumericSFI.md @@ -0,0 +1,74 @@ +--- +title: GeneralNumericSFI +parent: Fmt Package +permalink: /tB/Packages/Contributed/Fmt/GeneralNumericSFI +has_toc: false +--- + +# GeneralNumericSFI class +{: .no_toc } + +Formats a number for the **G** identifier, as whole-number digits, fixed-point or exponential notation depending on its type and size. + +**GeneralNumericSFI** is a format identifier class. It implements [**IStringFormatIdentifier**](IStringFormatIdentifier) and matches the identifier **G** or **g** in any case. [**StringHelper**](StringHelper) registers it, so `{0:G}` in a call to [**StringFormat**](PublicEntryPoints/StringFormat) uses it for a numeric value. The class is predeclared. Its interface members are reached through the interface, and [**GetFormattedValue**](#getformattedvalue) is also public. + +## Output + +The result depends on the **TypeName** of the value: + +- An **Integer** or a **Long** is formatted by [**DecimalSFI**](DecimalSFI): whole-number digits, padded with zeros to the precision. +- A **Double** is first formatted by [**ExponentialSFI**](ExponentialSFI) with the same precision. The exponent of that text is read back with [**ParseExponent**](ExponentialSFI#parseexponent). When the exponent is greater than -5 and its absolute value is less than the precision, the value is formatted again by [**FixedPointSFI**](FixedPointSFI), with the precision as the count of decimal places. Otherwise the exponential text is the result. Without a precision the second test cannot succeed, so a **Double** is always in exponential notation. +- A value of any other type, such as a **Single**, **Currency**, **Byte**, **Decimal** or a numeric **String**, gives an empty string. + +The precision is therefore a count of decimal places and a limit for the exponent. It is not a count of significant digits, as it is in .NET. The case of the identifier is kept: `g` gives a lower-case `e` in exponential notation. + +```tb check_build check_run +Debug.Print StringFormat("{0:G}", 42) ' 42 +Debug.Print StringFormat("{0:G5}", 42) ' 00042 +Debug.Print StringFormat("{0:G}", 12345.678) ' 1.234568E4 +Debug.Print StringFormat("{0:G3}", 12345.678) ' 1.235E4 +Debug.Print StringFormat("{0:G6}", 12345.678) ' 12345.678000 +Debug.Print StringFormat("{0:G3}", 123.456) ' 123.456 +Debug.Print StringFormat("{0:G3}", 0.5) ' 0.500 +Debug.Print StringFormat("{0:g}", 12345.678) ' 1.234568e4 +Debug.Print "[" & StringFormat("{0:G}", 3.14!) & "]" ' [] +``` + +> [!NOTE] +> **FormerStringFormat** treats a missing precision differently: it derives one from the count of digits after the decimal point in the value. `{0:G}` of `123.456` gives `123.46` there and `1.23456E2` here. See [FormerStringFormat](FormerEntryPoint/FormerStringFormat). + +## Members + +### GetFormattedValue + +Returns a value formatted as the **G** identifier does. + +Syntax: *object*.**GetFormattedValue** ( *value*, *specifier* ) **As String** + +*value* +: *required* A **Variant** holding the number to format. Only **Integer**, **Long** and **Double** give a result. + +*specifier* +: *required* A [**StringFormatSpecifier**](StringFormatSpecifier/) whose [**identifier**](StringFormatSpecifier/identifier) is `G` or `g` and whose [**CustomSpecifier**](StringFormatSpecifier/CustomSpecifier) holds the precision. The method uses the identifier only for its letter case. + +Returns the formatted text. This is the method that the interface's **GetFormattedValue** calls, made public. + +```tb check_build check_run +Dim spec As New StringFormatSpecifier +spec.identifier = "G" +spec.CustomSpecifier = "3" +Debug.Print GeneralNumericSFI.GetFormattedValue(12345.678, spec) ' 1.235E4 +``` + +### IsIdentifierMatch + +Returns **True** when the specifier's [**identifier**](StringFormatSpecifier/identifier) is `G` or `g`. It is implemented as a private member of the interface. + +## See Also + +- [IStringFormatIdentifier](IStringFormatIdentifier) interface -- the contract every format identifier class implements +- [DecimalSFI](DecimalSFI) class -- whole-number digits, used for integers +- [FixedPointSFI](FixedPointSFI) class -- fixed-point notation, used for a **Double** whose exponent is small +- [ExponentialSFI](ExponentialSFI) class -- exponential notation, used for any other **Double** +- [StringFormat](PublicEntryPoints/StringFormat) function -- formats a string using the identifiers +- [Fmt package](./) -- overview, with the table of identifiers diff --git a/docs/Reference/Contributed/Fmt/GenericDateTimeSFI.md b/docs/Reference/Contributed/Fmt/GenericDateTimeSFI.md new file mode 100644 index 000000000..99c9c777f --- /dev/null +++ b/docs/Reference/Contributed/Fmt/GenericDateTimeSFI.md @@ -0,0 +1,64 @@ +--- +title: GenericDateTimeSFI +parent: Fmt Package +permalink: /tB/Packages/Contributed/Fmt/GenericDateTimeSFI +has_toc: false +--- + +# GenericDateTimeSFI class +{: .no_toc } + +Formats a **Date** for the date and time identifiers **d**, **D**, **f**, **F**, **g**, **G**, **s**, **t**, **T** and **C**. + +**GenericDateTimeSFI** is a format identifier class. It implements [**IStringFormatIdentifier**](IStringFormatIdentifier). [**StringHelper**](StringHelper) registers it as the only date and time identifier, so every date item in a call to [**StringFormat**](PublicEntryPoints/StringFormat) uses it. A value is treated as a date when its **TypeName** is `Date`. The class is predeclared, and its two members are reached through the interface. + +## Identifiers + +The identifier letters of the first nine rows are case-sensitive: `d` and `D` are different formats, and `S` matches nothing. The identifier **C** matches in either case. The text after the identifier is not used by the other letters. + +| Identifier | Format string passed to **Format$** | Result | +|------------|-------------------------------------|--------| +| `d` | `ddddd` | The short date. | +| `D` | `dddddd` | The long date. | +| `f` | `dddddd h:mm AM/PM` | The long date and the short time. | +| `F` | `dddddd ttttt` | The long date and the long time. | +| `g` | `ddddd hh:mm AM/PM` | The short date and the short time. | +| `G` | `ddddd ttttt` | The short date and the long time. | +| `s` | `yyyy-mm-ddThh:mm:ss` | A sortable date and time. | +| `t` | `hh:mm AM/PM` | The short time. | +| `T` | `ttttt` | The long time. | +| `C` or `c` | the text after the identifier | A custom format: the rest of the item, up to the closing brace, is passed to **Format$** as it stands. An empty custom format gives the general date format. | + +The date and time layouts of the named formats follow the Windows regional settings. Any other identifier raises error `-2147212503`, *Invalid format string*. + +```tb check_build +Dim d As Date +d = #2026-10-11 14:05:09# + +Debug.Print StringFormat("{0:d}", d) ' 10/11/2026 +Debug.Print StringFormat("{0:D}", d) ' Sunday, October 11, 2026 +Debug.Print StringFormat("{0:f}", d) ' Sunday, October 11, 2026 2:05 PM +Debug.Print StringFormat("{0:g}", d) ' 10/11/2026 02:05 PM +Debug.Print StringFormat("{0:t}", d) ' 02:05 PM +Debug.Print StringFormat("{0:T}", d) ' 2:05:09 PM +Debug.Print StringFormat("{0:s}", d) ' 2026-10-11T14:05:09 +Debug.Print StringFormat("{0:Cyyyy-MM-dd}", d) ' 2026-10-11 +Debug.Print StringFormat("{0:Cdddd}", d) ' Sunday +``` + +The output shown is for an English (United States) system. + +## Members + +- **IsIdentifierMatch** returns **True** when the specifier's [**identifier**](StringFormatSpecifier/identifier) is `C` or `c`, or is one of the other nine letters in the table. +- **GetFormattedValue** returns the value formatted as the table says. With `C` it uses the specifier's [**CustomSpecifier**](StringFormatSpecifier/CustomSpecifier). + +Both are implemented as private members of the interface. + +## See Also + +- [IStringFormatIdentifier](IStringFormatIdentifier) interface -- the contract every format identifier class implements +- [DateTimeSFI](DateTimeSFI) class -- an identical class that **StringHelper** does not register +- [StringFormatSpecifier](StringFormatSpecifier/) class -- holds the identifier and the custom format +- [StringFormat](PublicEntryPoints/StringFormat) function -- formats a string using the identifiers +- [Fmt package](./) -- overview, with the table of identifiers diff --git a/docs/Reference/Contributed/Fmt/HexSFI.md b/docs/Reference/Contributed/Fmt/HexSFI.md new file mode 100644 index 000000000..5c148b045 --- /dev/null +++ b/docs/Reference/Contributed/Fmt/HexSFI.md @@ -0,0 +1,48 @@ +--- +title: HexSFI +parent: Fmt Package +permalink: /tB/Packages/Contributed/Fmt/HexSFI +has_toc: false +--- + +# HexSFI class +{: .no_toc } + +Formats a number as hexadecimal digits with an `&H` prefix for the **X** identifier. + +**HexSFI** is a format identifier class. It implements [**IStringFormatIdentifier**](IStringFormatIdentifier) and matches the identifier **X** or **x** in any case. [**StringHelper**](StringHelper) registers it, so `{0:X}` in a call to [**StringFormat**](PublicEntryPoints/StringFormat) uses it for a numeric value. The class is predeclared, and its two members are reached through the interface. + +## Output + +The digits are the result of **Hex$**, so a value with a fractional part is rounded to a whole number and a negative **Integer** gives its 16-bit form (`&HFFFF` for `-1`) where a negative **Long** gives its 32-bit form. + +- Without a precision the result is the prefix and the digits. +- With a precision *n* greater than zero the digits are padded on the left with zeros to *n* digits, and a longer number is cut to its last *n* digits. `{0:X2}` of `4095` is `&HFF`. +- The case of the identifier sets the case of the whole result, prefix included: `X` gives `&HFF` and `x` gives `&hff`. + +```tb check_build check_run +Debug.Print StringFormat("{0:X}", 255) ' &HFF +Debug.Print StringFormat("{0:x}", 255) ' &hff +Debug.Print StringFormat("{0:X8}", 255) ' &H000000FF +Debug.Print StringFormat("{0:x4}", 255) ' &h00ff +Debug.Print StringFormat("{0:X2}", 4095) ' &HFF +Debug.Print StringFormat("{0:X}", -1) ' &HFFFF +Debug.Print StringFormat("{0:X}", -1&) ' &HFFFFFFFF +``` + +> [!NOTE] +> **FormerStringFormat** writes the `&H` prefix in upper case for both `X` and `x`, so `{0:x4}` of `255` gives `&H00ff` there and `&h00ff` here. + +## Members + +- **IsIdentifierMatch** returns **True** when the specifier's [**identifier**](StringFormatSpecifier/identifier) is `X` or `x`. +- **GetFormattedValue** returns the value formatted as described above. It reads the specifier's [**Precision**](StringFormatSpecifier/Precision) and [**identifier**](StringFormatSpecifier/identifier). + +Both are implemented as private members of the interface. + +## See Also + +- [IStringFormatIdentifier](IStringFormatIdentifier) interface -- the contract every format identifier class implements +- [DecimalSFI](DecimalSFI) class -- decimal digits, padded with zeros +- [StringFormat](PublicEntryPoints/StringFormat) function -- formats a string using the identifiers +- [Fmt package](./) -- overview, with the table of identifiers diff --git a/docs/Reference/Contributed/Fmt/IStringFormatIdentifier.md b/docs/Reference/Contributed/Fmt/IStringFormatIdentifier.md new file mode 100644 index 000000000..af856bcf6 --- /dev/null +++ b/docs/Reference/Contributed/Fmt/IStringFormatIdentifier.md @@ -0,0 +1,85 @@ +--- +title: IStringFormatIdentifier +parent: Fmt Package +permalink: /tB/Packages/Contributed/Fmt/IStringFormatIdentifier +has_toc: false +--- + +# IStringFormatIdentifier interface +{: .no_toc } + +The contract that a format identifier class implements: it says whether it handles an item's identifier, and formats a value for it. + +Each of the eleven format identifier classes of the package implements **IStringFormatIdentifier**: [**CurrencySFI**](CurrencySFI), [**DateTimeSFI**](DateTimeSFI), [**DecimalSFI**](DecimalSFI), [**ExponentialSFI**](ExponentialSFI), [**FixedPointSFI**](FixedPointSFI), [**GeneralNumericSFI**](GeneralNumericSFI), [**GenericDateTimeSFI**](GenericDateTimeSFI), [**HexSFI**](HexSFI), [**NumericPaddingSFI**](NumericPaddingSFI), [**PercentSFI**](PercentSFI) and [**RoundTripSFI**](RoundTripSFI). [**StringHelper**](StringHelper) holds one list of them for numeric values and one for dates. For each format item it asks every class of the list that suits the value's type whether it matches the item's identifier, and a class that matches formats the value. It does not stop at the first match, so the last matching class decides. The classes of one list match different letters, so at most one of them matches an item. + +The interface is declared as a class module with two empty members. A class in a project can implement it, and its methods can be called through the interface, as in the example below. The lists in **StringHelper** are private and filled when the class is initialised, so there is no way to add a class to them, and [**StringFormat**](PublicEntryPoints/StringFormat) never calls a class that is not already there. + +* TOC +{:toc} + +## Methods + +### GetFormattedValue + +Returns the value formatted as the implementing class defines. + +Syntax: *object*.**GetFormattedValue** ( *value*, *specifier* ) **As String** + +*value* +: *required* A **Variant** holding the value to format. **StringHelper** passes a number to the numeric classes and a **Date** to the date classes. + +*specifier* +: *required* A [**StringFormatSpecifier**](StringFormatSpecifier/) describing the format item: its [**identifier**](StringFormatSpecifier/identifier), [**Precision**](StringFormatSpecifier/Precision) and [**CustomSpecifier**](StringFormatSpecifier/CustomSpecifier). + +Returns the formatted text. **StringHelper** applies the item's [**Alignment**](StringFormatSpecifier/Alignment) afterwards, so an implementation does not pad the result. + +### IsIdentifierMatch + +Returns whether the implementing class handles the identifier of a format item. + +Syntax: *object*.**IsIdentifierMatch** ( *specifier* ) **As Boolean** + +*specifier* +: *required* A [**StringFormatSpecifier**](StringFormatSpecifier/) describing the format item. + +Returns **True** when the class formats items with that identifier. The classes of the package compare the specifier's [**identifier**](StringFormatSpecifier/identifier) with their own letter. The numeric classes ignore the case of the identifier. The date classes treat nine of their letters as case-sensitive and accept `C` in either case. + +## Example + +This example implements the interface in a class that upper-cases a value for the identifier `U`, and calls it directly. + +```tb check_build projname=fmt-isfi +Class UpperSFI + Implements IStringFormatIdentifier + + Private Function IStringFormatIdentifier_GetFormattedValue(ByVal value As Variant, ByVal specifier As StringFormatSpecifier) As String + IStringFormatIdentifier_GetFormattedValue = UCase$(CStr(value)) + End Function + + Private Function IStringFormatIdentifier_IsIdentifierMatch(ByVal specifier As StringFormatSpecifier) As Boolean + IStringFormatIdentifier_IsIdentifierMatch = (specifier.identifier = "U") + End Function +End Class +``` + +```tb check_build check_run projname=fmt-isfi +Dim spec As New StringFormatSpecifier +spec.identifier = "U" + +Dim f As IStringFormatIdentifier +Set f = New UpperSFI +Debug.Print f.IsIdentifierMatch(spec) ' True +Debug.Print f.GetFormattedValue("hello", spec) ' HELLO + +' StringFormat does not know the class, so the identifier is refused. +On Error Resume Next +Debug.Print StringFormat("{0:U}", "hello") +Debug.Print Err.Number & ": " & Err.Description ' -2147212503: Invalid format string. +``` + +## See Also + +- [StringHelper](StringHelper) class -- holds the lists of format identifier classes +- [StringFormatSpecifier](StringFormatSpecifier/) class -- describes one format item +- [GenericDateTimeSFI](GenericDateTimeSFI) class -- the registered date and time identifier class +- [Fmt package](./) -- overview, with the table of identifiers diff --git a/docs/Reference/Contributed/Fmt/NumericPaddingSFI.md b/docs/Reference/Contributed/Fmt/NumericPaddingSFI.md new file mode 100644 index 000000000..5c63a7e74 --- /dev/null +++ b/docs/Reference/Contributed/Fmt/NumericPaddingSFI.md @@ -0,0 +1,41 @@ +--- +title: NumericPaddingSFI +parent: Fmt Package +permalink: /tB/Packages/Contributed/Fmt/NumericPaddingSFI +has_toc: false +--- + +# NumericPaddingSFI class +{: .no_toc } + +A placeholder format identifier that never matches and cannot format. + +**NumericPaddingSFI** is a format identifier class. It implements [**IStringFormatIdentifier**](IStringFormatIdentifier) but has no identifier of its own. [**StringHelper**](StringHelper) registers it last among the numeric identifiers, and because its **IsIdentifierMatch** always returns **False**, [**StringFormat**](PublicEntryPoints/StringFormat) never calls its **GetFormattedValue**. The package's source states no purpose for it. The class is predeclared, and its two members are reached through the interface. + +An item such as `{0:N}` names an identifier that no class matches, so it raises error `-2147212503`, *Invalid format string*. This class does not implement the .NET `N` identifier or any other padding. + +## Members + +- **IsIdentifierMatch** always returns **False**, whatever the specifier holds. +- **GetFormattedValue** always raises run-time error 5, *Invalid procedure call or argument*. + +Both are implemented as private members of the interface. + +```tb check_build check_run +Dim f As IStringFormatIdentifier +Set f = NumericPaddingSFI + +Dim spec As New StringFormatSpecifier +spec.identifier = "N" +Debug.Print f.IsIdentifierMatch(spec) ' False + +On Error Resume Next +Debug.Print f.GetFormattedValue(1, spec) +Debug.Print Err.Number & ": " & Err.Description ' 5: Invalid procedure call or argument +``` + +## See Also + +- [IStringFormatIdentifier](IStringFormatIdentifier) interface -- the contract every format identifier class implements +- [StringHelper](StringHelper) class -- registers the numeric identifiers +- [Fmt package](./) -- overview, with the table of identifiers diff --git a/docs/Reference/Contributed/Fmt/PercentSFI.md b/docs/Reference/Contributed/Fmt/PercentSFI.md new file mode 100644 index 000000000..3a42eba0c --- /dev/null +++ b/docs/Reference/Contributed/Fmt/PercentSFI.md @@ -0,0 +1,39 @@ +--- +title: PercentSFI +parent: Fmt Package +permalink: /tB/Packages/Contributed/Fmt/PercentSFI +has_toc: false +--- + +# PercentSFI class +{: .no_toc } + +Formats a number as a percentage for the **P** identifier. + +**PercentSFI** is a format identifier class. It implements [**IStringFormatIdentifier**](IStringFormatIdentifier) and matches the identifier **P** or **p** in any case. [**StringHelper**](StringHelper) registers it, so `{0:P}` in a call to [**StringFormat**](PublicEntryPoints/StringFormat) uses it for a numeric value. The class is predeclared, and its two members are reached through the interface. + +## Output + +The value is passed to **Format$**, whose `%` format multiplies it by 100 and appends a percent sign. Without a precision the format is `#,##0%`, a whole number of percent, rounded. With a precision *n* greater than zero the format has *n* decimal places. A precision of `0` is the same as none. The result has thousands separators, and the decimal point follows the Windows regional settings. + +```tb check_build check_run +Debug.Print StringFormat("{0:P}", 0.12345) ' 12% +Debug.Print StringFormat("{0:P1}", 0.12345) ' 12.3% +Debug.Print StringFormat("{0:P2}", 0.5) ' 50.00% +Debug.Print StringFormat("{0:P}", 1) ' 100% +Debug.Print StringFormat("{0:P}", 0.005) ' 1% +``` + +## Members + +- **IsIdentifierMatch** returns **True** when the specifier's [**identifier**](StringFormatSpecifier/identifier) is `P` or `p`. +- **GetFormattedValue** returns the value formatted as described above. It reads the specifier's [**Precision**](StringFormatSpecifier/Precision). + +Both are implemented as private members of the interface. + +## See Also + +- [IStringFormatIdentifier](IStringFormatIdentifier) interface -- the contract every format identifier class implements +- [FixedPointSFI](FixedPointSFI) class -- a fixed number of decimal places +- [StringFormat](PublicEntryPoints/StringFormat) function -- formats a string using the identifiers +- [Fmt package](./) -- overview, with the table of identifiers diff --git a/docs/Reference/Contributed/Fmt/PublicEntryPoints/StringFormat.md b/docs/Reference/Contributed/Fmt/PublicEntryPoints/StringFormat.md new file mode 100644 index 000000000..498b0e5db --- /dev/null +++ b/docs/Reference/Contributed/Fmt/PublicEntryPoints/StringFormat.md @@ -0,0 +1,151 @@ +--- +title: StringFormat +parent: PublicEntryPoints +permalink: /tB/Packages/Contributed/Fmt/PublicEntryPoints/StringFormat +has_toc: false +--- + +# StringFormat +{: .no_toc } + +Builds a string from a format string and a list of values, in the style of C#'s **String.Format**. + +Syntax: **StringFormat** ( *format_string* [, *values* ] ) **As String** + +*format_string* +: *required* A **String** that holds text, format items and escape sequences. A format item is written `{index[,alignment][:identifier[precision]]}` and is replaced by the value at position *index* in *values*, formatted and padded as the item says. An escape sequence such as `\n` is replaced by the character it stands for. A format string that starts with `@` is taken literally: the `@` is dropped and no escape sequence is expanded. + +*values* +: *optional* Any number of values, of any type that fits a **Variant**. The first value is index `0`. This is a **ParamArray**. To pass values that are already in an array, call [**StringHelper.StringFormat**](../StringHelper) instead. + +Returns the format string with every format item and escape sequence replaced. + +The syntax of a format item, the identifiers and the escape sequences are in the [package overview](../). This page describes what the function does with them. + +## Remarks + +**Which values are needed.** The function finds the format items first. When there are any, the number of distinct indexes must equal the number of values, and the highest index must be below that number. In practice every value must be used, and the indexes must run from `0` to one less than the number of values without a gap; the same index can occur any number of times. Anything else raises error `-2147212503`. A format string with no items accepts any number of values and ignores them. + +**How a value is formatted.** The type of the value decides which identifiers an item may use: + +- A value for which **IsNumeric** is **True** uses the numeric identifiers `C D E F G P R X`. This includes every number type, a **Boolean** and a **String** that looks like a number. +- A value whose type is **Date** uses the date and time identifiers `d D f F g G s t T C`. +- An item with no identifier converts the value to text as an assignment to a **String** does, without any format. +- An item with an identifier that the value's type does not accept, or that no class knows, raises error `-2147212503`, *Invalid format string*. Text that is not a number cannot take `F`, and a date cannot take `X`. +- A **Null** value raises run-time error 94, *Invalid use of Null*. + +**Alignment** is applied after the value is formatted. A positive alignment pads the result on the left with spaces, so the value is right-justified, and a negative alignment pads on the right. A result that is wider than the alignment is not shortened. + +**Order of work.** The function replaces the items one at a time, in the order they appear, and expands the escape sequences once all items are replaced. Three things follow: + +- Escape sequences in a value are expanded too, because they are expanded in the finished string. A format string that starts with `@` expands none, in the values as well as in the text. +- A value that contains the text of an item that is not replaced yet, such as `{1}`, has that text replaced as well. +- The character `Chr$(27)` protects doubled backslashes while the string is built, so an ESC character anywhere in the result becomes a backslash. + +An item is found again in the text by the text that [**ToString**](../StringFormatSpecifier/ToString) rebuilds from its parts. An item written with a leading zero in its index or alignment (`{00}`, `{0,08}`) or with an alignment of zero (`{0,0}`) is found by the pattern but not by the rebuilt text, and stays in the result unchanged. + +> [!NOTE] +> The function is not .NET's **String.Format**, and it departs from it in several ways. Doubled braces do not escape a brace: `{{0}}` with the value `5` gives `{5}`. An index must be a number, and an item such as `{name}` raises error 13, *Type mismatch*. A value that no item uses is an error. Custom .NET format strings such as `{0:yyyy-MM-dd}` or `{0:#,##0.0}` are not understood, and give *Invalid format string*; the identifier `C` for a date takes a **Format$** string instead. The identifier `N` does not exist. A precision is a number of decimal places, not of significant digits. See the [package overview](../#differences-from-net) for the full list. + +> [!NOTE] +> The results come from **Format$**, so the decimal separator, the thousands separator and the layout of dates and times follow the Windows regional settings. The output shown on this page is for an English (United States) system. + +## Example + +This example inserts values into a string, in the order of the format items and out of it. + +```tb check_build check_run +Dim fruit As String +fruit = "Bramleys" +Debug.Print StringFormat("I'm eating a very nice {0} {1}", fruit, 3.142) ' I'm eating a very nice Bramleys 3.142 +Debug.Print StringFormat("{1} {0} {1}", "a", "b") ' b a b +Debug.Print StringFormat("No items, so values are ignored.", 1, 2) ' No items, so values are ignored. +``` + +This example formats numbers with the numeric identifiers. + +```tb check_build check_run +Debug.Print StringFormat("{0:F2}", 12345.678) ' 12345.68 +Debug.Print StringFormat("{0:D5}", 42) ' 00042 +Debug.Print StringFormat("{0:X}", 255) ' &HFF +Debug.Print StringFormat("{0:P1}", 0.12345) ' 12.3% +Debug.Print StringFormat("{0:E2}", 12345.678) ' 1.23E4 +Debug.Print StringFormat("{0:G3}", 12345.678) ' 1.235E4 +Debug.Print StringFormat("{0:R}", 0.1) ' 0.1 +``` + +This example aligns values in columns. The brackets show the width. + +```tb check_build check_run +Debug.Print StringFormat("[{0,8}][{1,-8}]", "ab", "cd") ' [ ab][cd ] +Debug.Print StringFormat("[{0,8:F2}]", 3.14159) ' [ 3.14] +Debug.Print StringFormat("[{0,3}]", "abcdef") ' [abcdef] +``` + +This example formats money and dates. These results depend on the regional settings of the system, so the output shown is for English (United States). + +```tb check_build +Dim due As Date +due = #2026-10-11 14:05:09# + +Debug.Print StringFormat("The price is {0:C2} per ounce.", 17.63245) ' The price is 17.63$ per ounce. +Debug.Print StringFormat("Due {0:d} at {0:t}", due) ' Due 10/11/2026 at 02:05 PM +Debug.Print StringFormat("{0:D}", due) ' Sunday, October 11, 2026 +Debug.Print StringFormat("{0:Cyyyy-MM-dd hh:mm}", due) ' 2026-10-11 14:05 +``` + +This example uses escape sequences. `\n` is a line break and `\q` a double quote. + +```tb check_build check_run +Debug.Print StringFormat("Total:\n {0} items\n \q{1}\q", 3, "ok") +' Output: +' Total: +' 3 items +' "ok" +``` + +A backslash in a path is written as `\\`, or the whole format string is made literal with a leading `@`. + +```tb check_build check_run +Debug.Print StringFormat("C:\\temp\\{0}", "file.txt") ' C:\temp\file.txt +Debug.Print StringFormat("@C:\temp\{0}", "file.txt") ' C:\temp\file.txt +``` + +This example shows the effect of the order of work on the values. The leading `@` stops the expansion of escape sequences in a value too. + +```tb check_build check_run +Debug.Print StringFormat("{0} {1}", "{1}", "x") ' x x +Debug.Print StringFormat("{0}", "a\qb") ' a"b +Debug.Print StringFormat("@{0}", "a\qb") ' a\qb +``` + +This example handles the errors that the function raises. + +```tb check_build check_run +On Error Resume Next + +Debug.Print StringFormat("{0} {1}", "only one") +Debug.Print Err.Number & " " & Err.Source ' -2147212503 StringHelper +Err.Clear + +Debug.Print StringFormat("{0:Z}", 5) +Debug.Print Err.Number & ": " & Err.Description ' -2147212503: Invalid format string. +Err.Clear + +Debug.Print StringFormat("{0}", Null) +Debug.Print Err.Number & ": " & Err.Description ' 94: Invalid use of Null +Err.Clear + +Debug.Print StringFormat("{name}", 1) +Debug.Print Err.Number & ": " & Err.Description ' 13: Type mismatch +``` + +## See Also + +- [FormerStringFormat](../FormerEntryPoint/FormerStringFormat) function -- the earlier implementation +- [StringHelper](../StringHelper) class -- the same function, taking an array +- [StringFormatSpecifier](../StringFormatSpecifier/) class -- describes one format item +- [EscapeSequence](../EscapeSequence/) class -- one escape sequence +- [IStringFormatIdentifier](../IStringFormatIdentifier) interface -- the contract of the format identifier classes +- [PublicEntryPoints](./) module +- [Fmt package](../) -- overview, with the syntax of format items diff --git a/docs/Reference/Contributed/Fmt/PublicEntryPoints/index.md b/docs/Reference/Contributed/Fmt/PublicEntryPoints/index.md new file mode 100644 index 000000000..8a04736d8 --- /dev/null +++ b/docs/Reference/Contributed/Fmt/PublicEntryPoints/index.md @@ -0,0 +1,28 @@ +--- +title: PublicEntryPoints +parent: Fmt Package +permalink: /tB/Packages/Contributed/Fmt/PublicEntryPoints/ +has_toc: false +--- + +# PublicEntryPoints module +{: .no_toc } + +Holds **StringFormat**, the main entry point of the package. + +**PublicEntryPoints** is a standard module with one function, [**StringFormat**](StringFormat). Its **ParamArray** takes the values to format as arguments. It copies them into an array and passes them to [**StringHelper**](../StringHelper), which does the work. A project that references the package calls it by name or as `PublicEntryPoints.StringFormat`. + +```tb check_build check_run +Debug.Print StringFormat("I'm eating a very nice {0} {1}", "Bramleys", 3.142) ' I'm eating a very nice Bramleys 3.142 +Debug.Print PublicEntryPoints.StringFormat("{0,-6}|{1,6}|", "ab", "cd") ' ab | cd| +``` + +## Functions + +- [StringFormat](StringFormat) -- builds a string from a format string and a list of values + +## See Also + +- [FormerStringFormat](../FormerEntryPoint/FormerStringFormat) function -- the earlier implementation +- [StringHelper](../StringHelper) class -- takes the values as an array +- [Fmt package](../) -- overview, with the syntax of format items diff --git a/docs/Reference/Contributed/Fmt/RoundTripSFI.md b/docs/Reference/Contributed/Fmt/RoundTripSFI.md new file mode 100644 index 000000000..364c14798 --- /dev/null +++ b/docs/Reference/Contributed/Fmt/RoundTripSFI.md @@ -0,0 +1,37 @@ +--- +title: RoundTripSFI +parent: Fmt Package +permalink: /tB/Packages/Contributed/Fmt/RoundTripSFI +has_toc: false +--- + +# RoundTripSFI class +{: .no_toc } + +Converts a number to a **Double** and returns its text for the **R** identifier. + +**RoundTripSFI** is a format identifier class. It implements [**IStringFormatIdentifier**](IStringFormatIdentifier) and matches the identifier **R** or **r** in any case. [**StringHelper**](StringHelper) registers it, so `{0:R}` in a call to [**StringFormat**](PublicEntryPoints/StringFormat) uses it for a numeric value. The class is predeclared, and its two members are reached through the interface. + +## Output + +The value is converted with **CDbl**, and the **Double** is converted to a **String** by the ordinary conversion. A precision is ignored. The ordinary conversion keeps at most 15 significant digits, so a value that needs more digits does not survive the round trip, in spite of the identifier's name. A numeric **String** is accepted and returned as a number, without trailing zeros. The decimal point follows the Windows regional settings. + +```tb check_build check_run +Debug.Print StringFormat("{0:R}", 0.1) ' 0.1 +Debug.Print StringFormat("{0:R}", 1 / 3) ' 0.333333333333333 +Debug.Print StringFormat("{0:R}", "1.50") ' 1.5 +``` + +## Members + +- **IsIdentifierMatch** returns **True** when the specifier's [**identifier**](StringFormatSpecifier/identifier) is `R` or `r`. +- **GetFormattedValue** returns the value converted as described above. + +Both are implemented as private members of the interface. + +## See Also + +- [IStringFormatIdentifier](IStringFormatIdentifier) interface -- the contract every format identifier class implements +- [FixedPointSFI](FixedPointSFI) class -- a fixed number of decimal places +- [StringFormat](PublicEntryPoints/StringFormat) function -- formats a string using the identifiers +- [Fmt package](./) -- overview, with the table of identifiers diff --git a/docs/Reference/Contributed/Fmt/StringFormatSpecifier/Alignment.md b/docs/Reference/Contributed/Fmt/StringFormatSpecifier/Alignment.md new file mode 100644 index 000000000..3e3888f9d --- /dev/null +++ b/docs/Reference/Contributed/Fmt/StringFormatSpecifier/Alignment.md @@ -0,0 +1,52 @@ +--- +title: Alignment +parent: StringFormatSpecifier +permalink: /tB/Packages/Contributed/Fmt/StringFormatSpecifier/Alignment +has_toc: false +--- + +# Alignment +{: .no_toc } + +Returns or sets the width and the justification of a formatted value. + +## Get + +Returns a **Long**. + +Syntax: *object*.**Alignment** + +*object* +: *required* An object expression that evaluates to a **StringFormatSpecifier**. + +The default value is `0`, which means no alignment. + +## Let + +Sets the alignment. + +Syntax: *object*.**Alignment** **=** *value* + +*value* +: A **Long**. A positive number is the minimum width of the result, with the formatted value right-justified (padded on the left). A negative number is the minimum width with the value left-justified (padded on the right). Zero means no padding. + +## Remarks + +[**StringHelper**](../StringHelper) sets the property from the comma part of a format item, so `{0,8}` gives `8` and `{0,-8}` gives `-8`, and it pads the result after the format identifier class has produced it. The padding character is a space. A formatted value that is wider than the alignment is not shortened. The format identifier classes do not read the property. + +## Example + +```tb check_build check_run +Dim spec As New StringFormatSpecifier +Debug.Print spec.Alignment ' 0 + +spec.Alignment = -8 +Debug.Print spec.ToString() ' {0,-8} +Debug.Print StringFormat("[{0,-8}][{0,8}]", "ab") ' [ab ][ ab] +``` + +## See Also + +- [ToString](ToString) method -- includes the alignment in its text +- [Index](IndexProperty) property -- the position of the value +- [StringFormatSpecifier](./) class -- overview diff --git a/docs/Reference/Contributed/Fmt/StringFormatSpecifier/CustomSpecifier.md b/docs/Reference/Contributed/Fmt/StringFormatSpecifier/CustomSpecifier.md new file mode 100644 index 000000000..689846cc7 --- /dev/null +++ b/docs/Reference/Contributed/Fmt/StringFormatSpecifier/CustomSpecifier.md @@ -0,0 +1,57 @@ +--- +title: CustomSpecifier +parent: StringFormatSpecifier +permalink: /tB/Packages/Contributed/Fmt/StringFormatSpecifier/CustomSpecifier +has_toc: false +--- + +# CustomSpecifier +{: .no_toc } + +Returns or sets the text of a format item that follows its identifier letter. + +## Get + +Returns a **String**. + +Syntax: *object*.**CustomSpecifier** + +*object* +: *required* An object expression that evaluates to a **StringFormatSpecifier**. + +The default value is an empty string. + +## Let + +Sets the text, and sets [**Precision**](Precision) when the text is a non-zero number. + +Syntax: *object*.**CustomSpecifier** **=** *value* + +*value* +: A **String**. For `{0:F2}` it is `2`, for `{0:Cyyyy-MM-dd}` it is `yyyy-MM-dd`. + +## Remarks + +The text is stored as written. When it is numeric and not zero, [**Precision**](Precision) takes the value as well. When it is not, [**Precision**](Precision) is left as it was: assigning `"abc"` or `"0"` does not reset an earlier precision to zero. + +The meaning of the text belongs to the format identifier class. The numeric classes read it as a precision through [**Precision**](Precision). [**GenericDateTimeSFI**](../GenericDateTimeSFI) passes it to **Format$** as a custom date and time format when the identifier is `C`. + +## Example + +```tb check_build check_run +Dim spec As New StringFormatSpecifier +spec.identifier = "F" +spec.CustomSpecifier = "3" +Debug.Print spec.Precision ' 3 + +spec.CustomSpecifier = "abc" +Debug.Print spec.Precision ' 3 +Debug.Print spec.CustomSpecifier ' abc +``` + +## See Also + +- [Precision](Precision) property -- the numeric reading of the text +- [identifier](identifier) property -- the letter in front of the text +- [ToString](ToString) method -- includes the text +- [StringFormatSpecifier](./) class -- overview diff --git a/docs/Reference/Contributed/Fmt/StringFormatSpecifier/IndexProperty.md b/docs/Reference/Contributed/Fmt/StringFormatSpecifier/IndexProperty.md new file mode 100644 index 000000000..48bb11817 --- /dev/null +++ b/docs/Reference/Contributed/Fmt/StringFormatSpecifier/IndexProperty.md @@ -0,0 +1,50 @@ +--- +title: Index +parent: StringFormatSpecifier +permalink: /tB/Packages/Contributed/Fmt/StringFormatSpecifier/IndexProperty +has_toc: false +--- + +# Index +{: .no_toc } + +Returns or sets the position of the value that a format item refers to. + +## Get + +Returns a **Long**. + +Syntax: *object*.**Index** + +*object* +: *required* An object expression that evaluates to a **StringFormatSpecifier**. + +The default value is `0`. + +## Let + +Sets the position. + +Syntax: *object*.**Index** **=** *value* + +*value* +: A **Long**. The zero-based position of the value in the argument list: `0` for the first value, `1` for the second. + +## Remarks + +[**StringHelper**](../StringHelper) sets the property from the number at the start of a format item, so `{2}` gives `2`. The same index can occur in several items. The property is not checked when it is assigned; [**StringHelper**](../StringHelper) checks the indexes of a whole format string against the number of values. + +## Example + +```tb check_build check_run +Dim spec As New StringFormatSpecifier +spec.Index = 2 +Debug.Print spec.Index ' 2 +Debug.Print spec.ToString() ' {2} +``` + +## See Also + +- [Alignment](Alignment) property -- the width of the formatted value +- [ToString](ToString) method -- includes the index +- [StringFormatSpecifier](./) class -- overview diff --git a/docs/Reference/Contributed/Fmt/StringFormatSpecifier/Precision.md b/docs/Reference/Contributed/Fmt/StringFormatSpecifier/Precision.md new file mode 100644 index 000000000..96f63c0c5 --- /dev/null +++ b/docs/Reference/Contributed/Fmt/StringFormatSpecifier/Precision.md @@ -0,0 +1,45 @@ +--- +title: Precision +parent: StringFormatSpecifier +permalink: /tB/Packages/Contributed/Fmt/StringFormatSpecifier/Precision +has_toc: false +--- + +# Precision +{: .no_toc } + +Returns the number that follows the identifier letter of a format item. + +Syntax: *object*.**Precision** + +*object* +: *required* An object expression that evaluates to a **StringFormatSpecifier**. + +Returns a **Long**. The default value is `0`, which means that no precision was given. + +## Remarks + +The property is read-only. It changes only when [**CustomSpecifier**](CustomSpecifier) is assigned a numeric text that is not zero, so `{0:F3}` gives `3` and `{0:F}` and `{0:F0}` give `0`. Assigning a text that is not numeric, or is zero, leaves the earlier value in place. + +The meaning of the number depends on the format identifier class: a count of decimal places for [**FixedPointSFI**](../FixedPointSFI), [**ExponentialSFI**](../ExponentialSFI), [**CurrencySFI**](../CurrencySFI) and [**PercentSFI**](../PercentSFI), a count of digits for [**DecimalSFI**](../DecimalSFI) and [**HexSFI**](../HexSFI), and both a count of decimal places and a limit for the exponent for [**GeneralNumericSFI**](../GeneralNumericSFI). A precision of `0` selects each class's default. + +## Example + +```tb check_build check_run +Dim spec As New StringFormatSpecifier +spec.identifier = "F" +Debug.Print spec.Precision ' 0 + +spec.CustomSpecifier = "3" +Debug.Print spec.Precision ' 3 + +Dim f As IStringFormatIdentifier +Set f = FixedPointSFI +Debug.Print f.GetFormattedValue(3.14159, spec) ' 3.142 +``` + +## See Also + +- [CustomSpecifier](CustomSpecifier) property -- sets the precision +- [identifier](identifier) property -- the letter in front of the precision +- [StringFormatSpecifier](./) class -- overview diff --git a/docs/Reference/Contributed/Fmt/StringFormatSpecifier/ToString.md b/docs/Reference/Contributed/Fmt/StringFormatSpecifier/ToString.md new file mode 100644 index 000000000..555c56ae8 --- /dev/null +++ b/docs/Reference/Contributed/Fmt/StringFormatSpecifier/ToString.md @@ -0,0 +1,50 @@ +--- +title: ToString +parent: StringFormatSpecifier +permalink: /tB/Packages/Contributed/Fmt/StringFormatSpecifier/ToString +has_toc: false +--- + +# ToString +{: .no_toc } + +Returns the text of the format item that the properties describe. + +Syntax: *object*.**ToString** ( ) **As String** + +*object* +: *required* An object expression that evaluates to a **StringFormatSpecifier**. + +Returns a **String**: an opening brace, the [**Index**](IndexProperty), a comma and the [**Alignment**](Alignment) when the alignment is not zero, a colon and the [**identifier**](identifier) when the identifier is not empty, the [**CustomSpecifier**](CustomSpecifier), and a closing brace. + +## Remarks + +[**StringHelper**](../StringHelper) calls **ToString** to find the item again in the text it is building, and replaces that text with the formatted value. An item that is written differently from the text that **ToString** builds therefore stays in the result unchanged. This happens to an index or an alignment written with a leading zero (`{00}`, `{0,08}`) and to an alignment of zero (`{0,0}`), because the rebuilt text is `{0}` or `{0,8}`. + +```tb check_build check_run +Debug.Print StringFormat("[{0}]", 5) ' [5] +Debug.Print StringFormat("[{00}]", 5) ' [{00}] +Debug.Print StringFormat("[{0,08}]", 5) ' [{0,08}] +Debug.Print StringFormat("[{0,0}]", 5) ' [{0,0}] +``` + +## Example + +```tb check_build check_run +Dim spec As New StringFormatSpecifier +Debug.Print spec.ToString() ' {0} + +spec.Index = 1 +spec.Alignment = 8 +spec.identifier = "F" +spec.CustomSpecifier = "2" +Debug.Print spec.ToString() ' {1,8:F2} +``` + +## See Also + +- [Index](IndexProperty) property -- the position of the value +- [Alignment](Alignment) property -- the width of the value +- [identifier](identifier) property -- the format letter +- [CustomSpecifier](CustomSpecifier) property -- the text after the letter +- [StringFormatSpecifier](./) class -- overview diff --git a/docs/Reference/Contributed/Fmt/StringFormatSpecifier/identifier.md b/docs/Reference/Contributed/Fmt/StringFormatSpecifier/identifier.md new file mode 100644 index 000000000..37261a385 --- /dev/null +++ b/docs/Reference/Contributed/Fmt/StringFormatSpecifier/identifier.md @@ -0,0 +1,58 @@ +--- +title: identifier +parent: StringFormatSpecifier +permalink: /tB/Packages/Contributed/Fmt/StringFormatSpecifier/identifier +has_toc: false +--- + +# identifier +{: .no_toc } + +Returns or sets the letter that selects the format of a format item. + +## Get + +Returns a **String**. + +Syntax: *object*.**identifier** + +*object* +: *required* An object expression that evaluates to a **StringFormatSpecifier**. + +The default value is an empty string, which means that the item has no identifier. + +## Let + +Sets the identifier. + +Syntax: *object*.**identifier** **=** *value* + +*value* +: A **String**, normally one character such as `"F"` or `"x"`. + +## Remarks + +[**StringHelper**](../StringHelper) sets the property from the first character after the colon of a format item, so `{0:F2}` gives `F`. The rest of the text after the colon goes to [**CustomSpecifier**](CustomSpecifier). + +The property keeps the letter as written, including its case. The format identifier classes compare it with their own letter, and [**HexSFI**](../HexSFI) and [**GeneralNumericSFI**](../GeneralNumericSFI) copy its case into their results. + +## Example + +```tb check_build check_run +Dim spec As New StringFormatSpecifier +spec.identifier = "x" + +Dim f As IStringFormatIdentifier +Set f = HexSFI +Debug.Print f.IsIdentifierMatch(spec) ' True +Debug.Print f.GetFormattedValue(255, spec) ' &hff + +Set f = CurrencySFI +Debug.Print f.IsIdentifierMatch(spec) ' False +``` + +## See Also + +- [CustomSpecifier](CustomSpecifier) property -- the text after the identifier +- [IStringFormatIdentifier](../IStringFormatIdentifier) interface -- compares the identifier +- [StringFormatSpecifier](./) class -- overview diff --git a/docs/Reference/Contributed/Fmt/StringFormatSpecifier/index.md b/docs/Reference/Contributed/Fmt/StringFormatSpecifier/index.md new file mode 100644 index 000000000..f585c7d81 --- /dev/null +++ b/docs/Reference/Contributed/Fmt/StringFormatSpecifier/index.md @@ -0,0 +1,44 @@ +--- +title: StringFormatSpecifier +parent: Fmt Package +permalink: /tB/Packages/Contributed/Fmt/StringFormatSpecifier/ +has_toc: false +--- + +# StringFormatSpecifier class +{: .no_toc } + +Describes one format item of a format string: its index, alignment, identifier and the text that follows the identifier. + +[**StringHelper**](../StringHelper) creates one **StringFormatSpecifier** for every format item it finds in a format string, and passes it to the [format identifier classes](../IStringFormatIdentifier), which read the identifier and the precision from it. For the item `{2,-8:G3}` the index is `2`, the alignment is `-8`, the identifier is `G` and the custom specifier is `3`, which is also the precision. + +A project can create an instance with `New StringFormatSpecifier` to call a format identifier class directly. The properties are plain stored values, with one exception: assigning [**CustomSpecifier**](CustomSpecifier) can set [**Precision**](Precision). + +```tb check_build check_run +Dim spec As New StringFormatSpecifier +spec.Index = 2 +spec.Alignment = -8 +spec.identifier = "G" +spec.CustomSpecifier = "3" + +Debug.Print spec.ToString() ' {2,-8:G3} +Debug.Print spec.Precision ' 3 +``` + +## Properties + +- [Alignment](Alignment) -- returns or sets the width and justification of the formatted value +- [CustomSpecifier](CustomSpecifier) -- returns or sets the text that follows the identifier +- [identifier](identifier) -- returns or sets the letter that selects the format +- [Index](IndexProperty) -- returns or sets the position of the value in the argument list +- [Precision](Precision) -- returns the number that the custom specifier gave + +## Methods + +- [ToString](ToString) -- returns the text of the format item that the properties describe + +## See Also + +- [StringHelper](../StringHelper) class -- creates the specifiers +- [IStringFormatIdentifier](../IStringFormatIdentifier) interface -- receives a specifier +- [Fmt package](../) -- overview, with the syntax of a format item diff --git a/docs/Reference/Contributed/Fmt/StringHelper.md b/docs/Reference/Contributed/Fmt/StringHelper.md new file mode 100644 index 000000000..2cf4ce45a --- /dev/null +++ b/docs/Reference/Contributed/Fmt/StringHelper.md @@ -0,0 +1,57 @@ +--- +title: StringHelper +parent: Fmt Package +permalink: /tB/Packages/Contributed/Fmt/StringHelper +has_toc: false +--- + +# StringHelper class +{: .no_toc } + +The class that does the work behind **StringFormat**: it finds the format items in a format string, formats the values and expands the escape sequences. + +**StringHelper** is predeclared, so its one public method is called on the class name, `StringHelper.StringFormat`. [**StringFormat**](PublicEntryPoints/StringFormat) in the [**PublicEntryPoints**](PublicEntryPoints/) module copies its **ParamArray** into an array and calls this method. Call the method directly when the values are already in an array. A project can also create an instance with `New StringHelper`, which behaves in the same way. + +Creating an instance, the predeclared one on its first use included, builds three private lists that cannot be changed afterwards: + +- The escape sequences, in the order `\n`, `\q`, `\t`, `\a`, `\b`, `\v`, `\f`, `\r`, then `\xHH` (hexadecimal) and `\ooo` (octal). The table of what they produce is in the [package overview](./#escape-sequences). +- The numeric format identifier classes, in the order [**CurrencySFI**](CurrencySFI), [**DecimalSFI**](DecimalSFI), [**GeneralNumericSFI**](GeneralNumericSFI), [**PercentSFI**](PercentSFI), [**FixedPointSFI**](FixedPointSFI), [**ExponentialSFI**](ExponentialSFI), [**HexSFI**](HexSFI), [**RoundTripSFI**](RoundTripSFI) and [**NumericPaddingSFI**](NumericPaddingSFI). +- The date format identifier classes: only [**GenericDateTimeSFI**](GenericDateTimeSFI). [**DateTimeSFI**](DateTimeSFI) exists in the package but is not registered. + +The padding character for alignment is a space and cannot be changed. + +* TOC +{:toc} + +## Methods + +### StringFormat + +Builds a string from a format string and an array of values. + +Syntax: *object*.**StringFormat** ( *format_string*, *values* ) **As String** + +*format_string* +: *required* A **String** holding text, format items and escape sequences. See [**PublicEntryPoints.StringFormat**](PublicEntryPoints/StringFormat) for the rules. + +*values* +: *required* A **Variant** array holding the values. The array is indexed from 0: element *n* supplies the format items with index *n*, and the number of elements is the number of distinct indexes the format string must use. + +Returns the formatted **String**. The method raises the same errors as [**PublicEntryPoints.StringFormat**](PublicEntryPoints/StringFormat), from the source `StringHelper`. + +```tb check_build check_run +Dim values(0 To 1) As Variant +values(0) = "x" +values(1) = 2.5 +Debug.Print StringHelper.StringFormat("{0}-{1:F1}", values) ' x-2.5 + +Debug.Print StringHelper.StringFormat("{0} and {1}", Array("salt", "pepper")) ' salt and pepper +``` + +## See Also + +- [StringFormat](PublicEntryPoints/StringFormat) function -- the entry point that takes the values as arguments +- [IStringFormatIdentifier](IStringFormatIdentifier) interface -- implemented by the identifier classes the lists hold +- [EscapeSequence](EscapeSequence/) class -- the escape sequences the list holds +- [StringFormatSpecifier](StringFormatSpecifier/) class -- describes one format item +- [Fmt package](./) -- overview diff --git a/docs/Reference/Contributed/Fmt/StringValidation/CopyCapitalisation.md b/docs/Reference/Contributed/Fmt/StringValidation/CopyCapitalisation.md new file mode 100644 index 000000000..8934da44a --- /dev/null +++ b/docs/Reference/Contributed/Fmt/StringValidation/CopyCapitalisation.md @@ -0,0 +1,41 @@ +--- +title: CopyCapitalisation +parent: StringValidation +permalink: /tB/Packages/Contributed/Fmt/StringValidation/CopyCapitalisation +has_toc: false +--- + +# CopyCapitalisation +{: .no_toc } + +Returns a string in upper case or in lower case, following the case of another string. + +Syntax: **CopyCapitalisation** ( *source*, *applyTo* ) **As String** + +*source* +: *required* The **String** whose letter case is followed. + +*applyTo* +: *required* The **String** to convert. + +Returns *applyTo* in upper case when *source* has no lower-case letters, and in lower case otherwise. + +## Remarks + +The function looks at *source* as a whole and does not copy case letter by letter. A *source* of `"HeLLo"` has lower-case letters, so the result is lower case. A *source* with no letters at all, such as `"123"`, is equal to its upper-case form, so the result is upper case. + +The format identifier classes use it to give a result the case of the identifier that was written: `{0:X}` and `{0:x}` give `&HFF` and `&hff`. + +## Example + +```tb check_build check_run +Debug.Print CopyCapitalisation("HELLO", "world") ' WORLD +Debug.Print CopyCapitalisation("HeLLo", "world") ' world +Debug.Print CopyCapitalisation("hello", "WORLD") ' world +Debug.Print CopyCapitalisation("123", "world") ' WORLD +``` + +## See Also + +- [HexSFI](../HexSFI) class -- follows the case of its identifier +- [StringValidation](./) module -- overview diff --git a/docs/Reference/Contributed/Fmt/StringValidation/StringContains.md b/docs/Reference/Contributed/Fmt/StringValidation/StringContains.md new file mode 100644 index 000000000..6fd79e03f --- /dev/null +++ b/docs/Reference/Contributed/Fmt/StringValidation/StringContains.md @@ -0,0 +1,46 @@ +--- +title: StringContains +parent: StringValidation +permalink: /tB/Packages/Contributed/Fmt/StringValidation/StringContains +has_toc: false +--- + +# StringContains +{: .no_toc } + +Returns whether a string contains another string, ignoring letter case unless asked not to. + +Syntax: **StringContains** ( *haystack*, *needle* [, *caseSensitive* ] ) **As Boolean** + +*haystack* +: *required* The **String** to search. + +*needle* +: *required* The **String** to look for. + +*caseSensitive* +: *optional* A **Boolean**. When **False** (the default) the comparison ignores letter case. When **True** it compares the characters exactly. + +Returns **True** when *needle* occurs in *haystack*, and **False** otherwise. + +## Remarks + +The function calls **InStr** with the text-comparison mode, or the binary mode when *caseSensitive* is **True**. An empty *needle* is found at the first position, so the result is **True**. A **Null** argument raises run-time error 94, *Invalid use of Null*. + +[**StringContainsAny**](StringContainsAny) takes *caseSensitive* as a required argument before its list of strings. Here it is the last argument and is optional. + +## Example + +```tb check_build check_run +Debug.Print StringContains("Hello", "ELL") ' True +Debug.Print StringContains("Hello", "ELL", True) ' False +Debug.Print StringContains("Hello", "xyz") ' False +Debug.Print StringContains("Hello", "") ' True +``` + +## See Also + +- [StringContainsAny](StringContainsAny) function -- the same test against several strings +- [StringStartsWith](StringStartsWith) function -- tests the start of a string +- [StringMatchesAny](StringMatchesAny) function -- tests for equality with several values +- [StringValidation](./) module -- overview diff --git a/docs/Reference/Contributed/Fmt/StringValidation/StringContainsAny.md b/docs/Reference/Contributed/Fmt/StringValidation/StringContainsAny.md new file mode 100644 index 000000000..2b2ba7d2f --- /dev/null +++ b/docs/Reference/Contributed/Fmt/StringValidation/StringContainsAny.md @@ -0,0 +1,43 @@ +--- +title: StringContainsAny +parent: StringValidation +permalink: /tB/Packages/Contributed/Fmt/StringValidation/StringContainsAny +has_toc: false +--- + +# StringContainsAny +{: .no_toc } + +Returns whether a string contains at least one of several strings. + +Syntax: **StringContainsAny** ( *haystack*, *caseSensitive* [, *needles* ] ) **As Boolean** + +*haystack* +: *required* The **String** to search. + +*caseSensitive* +: *required* A **Boolean**. When **False** the comparison ignores letter case. When **True** it compares the characters exactly. It comes before the list of strings and cannot be left out. + +*needles* +: *optional* Any number of values, each of which is converted to a **String** and looked for in *haystack*. This is a **ParamArray** of **Variant**. + +Returns **True** when at least one of *needles* occurs in *haystack*, and **False** otherwise. + +## Remarks + +The function passes each needle in turn to [**StringContains**](StringContains) and returns **True** at the first one that is found, so later needles are not tried. With no needles the result is **False**. + +## Example + +```tb check_build check_run +Debug.Print StringContainsAny("Hello", False, "x", "L") ' True +Debug.Print StringContainsAny("Hello", True, "x", "L") ' False +Debug.Print StringContainsAny("Hello", True, "x", "l") ' True +Debug.Print StringContainsAny("Hello", False) ' False +``` + +## See Also + +- [StringContains](StringContains) function -- the same test against one string +- [StringMatchesAny](StringMatchesAny) function -- tests for equality with several values +- [StringValidation](./) module -- overview diff --git a/docs/Reference/Contributed/Fmt/StringValidation/StringMatchesAny.md b/docs/Reference/Contributed/Fmt/StringValidation/StringMatchesAny.md new file mode 100644 index 000000000..2fd8597b5 --- /dev/null +++ b/docs/Reference/Contributed/Fmt/StringValidation/StringMatchesAny.md @@ -0,0 +1,41 @@ +--- +title: StringMatchesAny +parent: StringValidation +permalink: /tB/Packages/Contributed/Fmt/StringValidation/StringMatchesAny +has_toc: false +--- + +# StringMatchesAny +{: .no_toc } + +Returns whether a string is equal to at least one of several values. + +Syntax: **StringMatchesAny** ( *searchString* [, *possibleMatches* ] ) **As Boolean** + +*searchString* +: *required* The **String** to test. + +*possibleMatches* +: *optional* Any number of values. Each is converted to a **String** with **CStr** and compared with *searchString*. This is a **ParamArray** of **Variant**. + +Returns **True** when *searchString* is equal to at least one of *possibleMatches*, and **False** otherwise. + +## Remarks + +The comparison is an equality test of whole strings, not a search for a substring. It takes letter case into account, because the module has no `Option Compare` statement and the default comparison is binary. A number among the values is compared as its text, so `1` matches `"1"`. With no values the result is **False**. + +## Example + +```tb check_build check_run +Debug.Print StringMatchesAny("b", "a", "b", "c") ' True +Debug.Print StringMatchesAny("B", "a", "b", "c") ' False +Debug.Print StringMatchesAny("1", 1, 2) ' True +Debug.Print StringMatchesAny("ab", "a", "b") ' False +Debug.Print StringMatchesAny("a") ' False +``` + +## See Also + +- [StringContainsAny](StringContainsAny) function -- searches for substrings instead +- [StringContains](StringContains) function -- searches for one substring +- [StringValidation](./) module -- overview diff --git a/docs/Reference/Contributed/Fmt/StringValidation/StringStartsWith.md b/docs/Reference/Contributed/Fmt/StringValidation/StringStartsWith.md new file mode 100644 index 000000000..cad3f54a2 --- /dev/null +++ b/docs/Reference/Contributed/Fmt/StringValidation/StringStartsWith.md @@ -0,0 +1,45 @@ +--- +title: StringStartsWith +parent: StringValidation +permalink: /tB/Packages/Contributed/Fmt/StringValidation/StringStartsWith +has_toc: false +--- + +# StringStartsWith +{: .no_toc } + +Returns whether a string begins with another string, taking letter case into account. + +Syntax: **StringStartsWith** ( *startingSequence*, *source* ) **As Boolean** + +*startingSequence* +: *required* The **String** that the start of *source* is compared with. It comes first. + +*source* +: *required* The **String** whose start is tested. + +Returns **True** when the first characters of *source* are exactly *startingSequence*, and **False** otherwise. + +## Remarks + +> [!IMPORTANT] +> The arguments are in the order *startingSequence*, *source*. This is the reverse of [**StringContains**](StringContains), which takes the string to search first. `StringStartsWith("Hello", "He")` asks whether `"He"` starts with `"Hello"` and returns **False**. + +The comparison is binary, so `"he"` does not start `"Hello"`. An empty *startingSequence* returns **True**. A *source* shorter than *startingSequence* returns **False**. + +[**StringFormat**](../PublicEntryPoints/StringFormat) uses the function to test whether a format string begins with `@`. + +## Example + +```tb check_build check_run +Debug.Print StringStartsWith("He", "Hello") ' True +Debug.Print StringStartsWith("he", "Hello") ' False +Debug.Print StringStartsWith("Hello", "He") ' False +Debug.Print StringStartsWith("", "Hello") ' True +``` + +## See Also + +- [StringContains](StringContains) function -- tests whether a string occurs anywhere +- [StringMatchesAny](StringMatchesAny) function -- tests for equality with several values +- [StringValidation](./) module -- overview diff --git a/docs/Reference/Contributed/Fmt/StringValidation/index.md b/docs/Reference/Contributed/Fmt/StringValidation/index.md new file mode 100644 index 000000000..963af532e --- /dev/null +++ b/docs/Reference/Contributed/Fmt/StringValidation/index.md @@ -0,0 +1,37 @@ +--- +title: StringValidation +parent: Fmt Package +permalink: /tB/Packages/Contributed/Fmt/StringValidation/ +has_toc: false +--- + +# StringValidation module +{: .no_toc } + +Holds the small string tests and the case helper that the package's formatter is built on. + +**StringValidation** is a standard module of five public functions. [**StringContains**](StringContains), [**StringContainsAny**](StringContainsAny), [**StringMatchesAny**](StringMatchesAny) and [**StringStartsWith**](StringStartsWith) return a **Boolean** about the text of a string, and [**CopyCapitalisation**](CopyCapitalisation) returns a string in the letter case of another. The formatter calls them to look for backslashes and escape sequences, to test whether a format string begins with `@` and to follow the case of an identifier. A project that references the package can call them too, by name or as `StringValidation.StringContains`. + +> [!NOTE] +> The package declares the module with `Option Private Module`, which marks it as internal to the package. A project that references the package can still call its functions (checked on BETA 1005). + +```tb check_build check_run +Debug.Print StringContains("Hello", "ELL") ' True +Debug.Print StringContainsAny("Hello", False, "x", "L") ' True +Debug.Print StringMatchesAny("b", "a", "b", "c") ' True +Debug.Print StringStartsWith("He", "Hello") ' True +Debug.Print CopyCapitalisation("HELLO", "world") ' WORLD +``` + +## Functions + +- [CopyCapitalisation](CopyCapitalisation) -- returns a string in upper case or lower case, following another string +- [StringContains](StringContains) -- returns whether a string contains another, ignoring case unless asked not to +- [StringContainsAny](StringContainsAny) -- returns whether a string contains any one of several strings +- [StringMatchesAny](StringMatchesAny) -- returns whether a string is equal to any one of several values +- [StringStartsWith](StringStartsWith) -- returns whether a string begins with another, taking case into account + +## See Also + +- [StringFormat](../PublicEntryPoints/StringFormat) function -- the formatter that uses these functions +- [Fmt package](../) -- overview diff --git a/docs/Reference/Contributed/Fmt/index.md b/docs/Reference/Contributed/Fmt/index.md new file mode 100644 index 000000000..86986a74b --- /dev/null +++ b/docs/Reference/Contributed/Fmt/index.md @@ -0,0 +1,252 @@ +--- +title: Fmt Package +parent: Contributed Packages +has_toc: false +exclude_from_docs: + - HelloWorldClass + - HelloWorldModule + - Pootle +indexed_from: 1.0.0.0 +permalink: /tB/Packages/Contributed/Fmt/ +--- + +# Fmt Package +{: .no_toc } + +**Author:** FullValueRider + +The **Fmt** contributed package provides [**StringFormat**](PublicEntryPoints/StringFormat), a function that builds a string from a format string and a list of values, in the style of C#'s **String.Format**. A format string holds text, format items such as `{0}`, `{1,8}` or `{2:F2}`, and C-style escape sequences such as `\n` and `\q`. Each format item is replaced by the value at its index, formatted and padded as the item says. + +The rest of the package is what **StringFormat** is built from: a class for each format identifier and the interface they implement, a class for each escape sequence, the string tests the formatter uses, and the older implementation, [**FormerStringFormat**](FormerEntryPoint/FormerStringFormat). + +```tb check_build check_run +Debug.Print StringFormat("I'm eating a very nice {0} {1}", "Bramleys", 3.142) ' I'm eating a very nice Bramleys 3.142 +Debug.Print StringFormat("Item {0,-6}|{1,8:F2}|", "tea", 2.5) ' Item tea | 2.50| +``` + +The functions are public, so **StringFormat** is called by name, as the samples do, or as `PublicEntryPoints.StringFormat`. + +* TOC +{:toc} + +## Format items + +A format item is written + +``` +{index[,alignment][:identifier[precision]]} +``` + +| Part | Meaning | +|------|---------| +| *index* | The position of the value in the argument list, counting from 0. It is written in decimal digits. A word that is not a number, such as `{name}`, raises error 13. | +| *alignment* | Optional. A comma and an integer, with an optional minus sign: `,8` or `,-8`. A positive number is the minimum width and right-justifies the value. A negative number is the minimum width and left-justifies it. The padding is spaces, and a value wider than the width is not shortened. | +| *identifier* | Optional. A colon and one letter that selects the format. The letters are in the tables [below](#format-identifiers). An item without an identifier shows the value as the conversion of the value to a **String** gives it. | +| *precision* | Optional. The text after the identifier letter, up to the closing brace. A number sets the precision of the identifier, a count of decimal places or of digits depending on the identifier; `0` is the same as none. With the date identifier `C` the text is a **Format$** format string. | + +Four rules decide what is an item and what is text: + +- The index, the alignment and the identifier contain no spaces. `{0, 8}` is not an item and stays in the result as text, and so does `{0` without a closing brace. +- The index is written in its plain form. An item whose index or alignment has a leading zero (`{00}`, `{0,08}`), or whose alignment is zero (`{0,0}`), is recognised but not replaced, and stays in the result unchanged. +- Every value must be used. The distinct indexes of the items must number exactly the values, and run from 0 without a gap. A format string with no items ignores its values. +- A doubled brace is not an escape. `{{0}}` with the value `5` gives `{5}`. + +```tb check_build check_run +Debug.Print StringFormat("{{0}} {0}", 5) ' {5} 5 +Debug.Print StringFormat("[{0, 8}]", 5) ' [{0, 8}] +Debug.Print StringFormat("[{00}]", 5) ' [{00}] +``` + +[**StringFormat**](PublicEntryPoints/StringFormat) describes how the items are processed. The properties of one item are held by a [**StringFormatSpecifier**](StringFormatSpecifier/). + +## Format identifiers + +The type of the value decides which identifiers an item can use. A value for which **IsNumeric** is **True** (a number, a **Boolean**, a **String** that looks like a number) uses the numeric identifiers. A value of type **Date** uses the date identifiers. A value of any other type takes no identifier. An identifier that does not suit the value raises error `-2147212503`, *Invalid format string*. A **Null** value raises error 94. + +### Numeric values + +The numeric identifiers ignore the case of the letter, and the letters `X`, `E` and `G` copy it into the result. A precision of *n* below is a precision greater than zero. + +| Identifier | Class | Without a precision | With a precision *n* | Example | +|------------|-------|---------------------|----------------------|---------| +| `C` | [CurrencySFI](CurrencySFI) | Thousands separators, two decimal places and a `$` after the number | *n* decimal places | `{0:C}` of `17.63245` gives `17.63$` | +| `D` | [DecimalSFI](DecimalSFI) | A whole number, rounded | At least *n* digits, padded with zeros | `{0:D5}` of `42` gives `00042` | +| `E` | [ExponentialSFI](ExponentialSFI) | Exponential notation with up to six decimal places | *n* decimal places | `{0:E2}` of `12345.678` gives `1.23E4` | +| `F` | [FixedPointSFI](FixedPointSFI) | Two decimal places | *n* decimal places | `{0:F}` of `12345.678` gives `12345.68` | +| `G` | [GeneralNumericSFI](GeneralNumericSFI) | An **Integer** or **Long** as `D`. A **Double** in exponential notation. Any other type gives an empty string | An **Integer** or **Long** as `D`. A **Double** in fixed-point notation with *n* decimal places when its exponent is above -5 and its size is below *n*, otherwise exponential | `{0:G3}` of `12345.678` gives `1.235E4` | +| `P` | [PercentSFI](PercentSFI) | A whole number of percent | *n* decimal places | `{0:P1}` of `0.12345` gives `12.3%` | +| `R` | [RoundTripSFI](RoundTripSFI) | The value as a **Double** converted to text, with at most 15 significant digits | Ignored | `{0:R}` of `0.1` gives `0.1` | +| `X` | [HexSFI](HexSFI) | `&H` and the hexadecimal digits | The digits padded with zeros, or cut from the left, to *n* digits | `{0:X}` of `255` gives `&HFF` | + +No class accepts any other letter. [**NumericPaddingSFI**](NumericPaddingSFI) is registered for numbers but its test is always **False**, so `N` and every other letter raise error `-2147212503`. + +```tb check_build check_run +Debug.Print StringFormat("{0:D5}|{0:D}", 42) ' 00042|42 +Debug.Print StringFormat("{0:E2}|{0:E}", 12345.678) ' 1.23E4|1.234568E4 +Debug.Print StringFormat("{0:F2}|{0:F}|{0:F0}", 12345.678) ' 12345.68|12345.68|12345.68 +Debug.Print StringFormat("{0:G}|{0:G3}", 12345.678) ' 1.234568E4|1.235E4 +Debug.Print StringFormat("{0:P1}|{0:P}", 0.12345) ' 12.3%|12% +Debug.Print StringFormat("{0:R}", 0.1) ' 0.1 +Debug.Print StringFormat("{0:X}|{0:x4}|{0:X8}", 255) ' &HFF|&h00ff|&H000000FF +``` + +The currency identifier writes the dollar sign after the number, and its thousands separator follows the regional settings of the system. + +```tb check_build +Debug.Print StringFormat("{0:C2}|{0:C}|{0:c0}", 17.63245) ' 17.63$|17.63$|17.63$ +Debug.Print StringFormat("{0:C}", 1234567.891) ' 1,234,567.89$ +Debug.Print StringFormat("{0:C}", -5) ' -5.00$ +``` + +### Dates + +The date identifiers are the letters of [**GenericDateTimeSFI**](GenericDateTimeSFI). They are case-sensitive, except `C`. + +| Identifier | Result | Example for 11 October 2026, 14:05:09 | +|------------|--------|---------------------------------------| +| `d` | The short date | `10/11/2026` | +| `D` | The long date | `Sunday, October 11, 2026` | +| `f` | The long date and the short time | `Sunday, October 11, 2026 2:05 PM` | +| `F` | The long date and the long time | `Sunday, October 11, 2026 2:05:09 PM` | +| `g` | The short date and the short time | `10/11/2026 02:05 PM` | +| `G` | The short date and the long time | `10/11/2026 2:05:09 PM` | +| `s` | A sortable date and time | `2026-10-11T14:05:09` | +| `t` | The short time | `02:05 PM` | +| `T` | The long time | `2:05:09 PM` | +| `C` or `c` | A custom format: the text after the letter is a **Format$** format string | `{0:Cyyyy-MM-dd}` gives `2026-10-11` | + +The text after a letter other than `C` is ignored, and a letter that is not in the table raises error `-2147212503`. A .NET custom format such as `{0:yyyy-MM-dd}` starts with the letter `y`, so it is refused. + +```tb check_build +Dim d As Date +d = #2026-10-11 14:05:09# + +Debug.Print StringFormat("{0:d}|{0:t}", d) ' 10/11/2026|02:05 PM +Debug.Print StringFormat("{0:D}|{0:T}", d) ' Sunday, October 11, 2026|2:05:09 PM +Debug.Print StringFormat("{0:f}|{0:g}", d) ' Sunday, October 11, 2026 2:05 PM|10/11/2026 02:05 PM +Debug.Print StringFormat("{0:Cyyyy-MM-dd}", d) ' 2026-10-11 +``` + +> [!NOTE] +> The results come from **Format$**, so the decimal separator, the thousands separator and the layout of dates and times follow the Windows regional settings. The output shown for the currency and date identifiers is for an English (United States) system. + +## Escape sequences + +The formatter replaces these sequences in the finished string, values included. A backslash that starts none of them stays as it is. + +| Sequence | Result | +|----------|--------| +| `\n` | A line break, **vbNewLine**: `Chr$(13)` followed by `Chr$(10)` | +| `\q` | A double quote, `Chr$(34)` | +| `\t` | A tab, **vbTab** | +| `\a` | `Chr$(7)` | +| `\b` | `Chr$(8)` | +| `\v` | `Chr$(13)` | +| `\f` | `Chr$(14)` | +| `\r` | `Chr$(15)` | +| `\xHH` | The character whose code is the two hexadecimal digits *HH*: `\x41` gives `A` | +| `\ooo` | The character whose code is the three octal digits *ooo*: `\101` gives `A` | +| `\\` | A backslash | + +> [!NOTE] +> The package maps `\v`, `\f` and `\r` to the codes 13, 14 and 15. In C they are the vertical tab (11), the form feed (12) and the carriage return (13). Use `\n` for a line break, and `\x0B`, `\x0C` or `\x0D` for the C characters. + +A format string that starts with `@` is literal: the `@` is dropped and no sequence is expanded, `\\` included. This suits a file path. + +```tb check_build check_run +Debug.Print Asc(StringFormat("\v")) & " " & Asc(StringFormat("\f")) & " " & Asc(StringFormat("\r")) ' 13 14 15 +Debug.Print Len(StringFormat("a\nb")) ' 4 +Debug.Print StringFormat("\x41\101") ' AA +Debug.Print StringFormat("a\\nb") ' a\nb +Debug.Print StringFormat("@a\nb") ' a\nb +``` + +An `\xHH` or `\ooo` sequence with digits that are not valid in its base, such as `\xzz` or `\189`, raises error 13. + +## Errors + +| Number | Description | Raised when | +|--------|-------------|-------------| +| `-2147212503` (`vbObjectError Or 9001`) | *The number indicating an argument to format is less than zero, or greater than or equal to the length of the args array.* | The format string has items, and the distinct indexes do not number exactly the values, or the highest index is not below that number, or no values were given. | +| `-2147212503` | *Invalid format string.* | An item has an identifier that no class accepts for the type of the value. | +| 13 | *Type mismatch* | An index is not a number, as in `{name}`, or an escape sequence has invalid digits. | +| 94 | *Invalid use of Null* | A value is **Null**. | + +The first two have the source `StringHelper`. [**FormerStringFormat**](FormerEntryPoint/FormerStringFormat) raises the same numbers from the source `FormerStringFormat`, and adds `-2147212501` (`vbObjectError Or 9003`), *Invalid number argument*. + +## Differences from .NET + +The function follows the notation of .NET's **String.Format** and departs from it in these ways: + +- Doubled braces do not escape a brace. +- The index must be a number. Names are not supported. +- Every value must be used by an item, and a value that no item uses raises an error where .NET ignores it. +- The numeric identifiers are `C D E F G P R X`. There is no `N`, and the custom numeric formats of .NET, such as `#,##0.0`, are refused. +- A precision is a count of decimal places or of digits. For `G` it is not a count of significant digits. +- `C` writes a `$` after the number whatever the regional settings, `X` writes an `&H` prefix, and `R` keeps 15 significant digits. +- Only the identifiers of the date table exist for dates, and they are case-sensitive. The custom format of a date is the `C` identifier with a **Format$** string, whose letters are VBA's. +- Escape sequences are expanded by the function itself and use the C-style letters of the table above. + +## Modules + +- [FormerEntryPoint](FormerEntryPoint/) -- holds FormerStringFormat, the earlier implementation of the formatter + - [FormerStringFormat](FormerEntryPoint/FormerStringFormat) -- builds a string from a format string and a list of values, with the earlier implementation +- [PublicEntryPoints](PublicEntryPoints/) -- holds StringFormat, the main entry point of the package + - [StringFormat](PublicEntryPoints/StringFormat) -- builds a string from a format string and a list of values +- [StringValidation](StringValidation/) -- holds the small string tests and the case helper that the formatter uses + - [CopyCapitalisation](StringValidation/CopyCapitalisation) -- returns a string in upper case or lower case, following another string + - [StringContains](StringValidation/StringContains) -- returns whether a string contains another, ignoring case unless asked not to + - [StringContainsAny](StringValidation/StringContainsAny) -- returns whether a string contains at least one of several strings + - [StringMatchesAny](StringValidation/StringMatchesAny) -- returns whether a string is equal to at least one of several values + - [StringStartsWith](StringValidation/StringStartsWith) -- returns whether a string begins with another, taking case into account + +## Classes + +- [EscapeSequence](EscapeSequence/) -- describes one escape sequence and applies it to a string + - [AsciiBase](EscapeSequence/AsciiBase) -- returns or sets the number base of an ASCII sequence + - [Create](EscapeSequence/Create) -- creates an escape sequence, plain or ASCII + - [EscapeString](EscapeSequence/EscapeString) -- returns or sets the text or the pattern to look for + - [Execute](EscapeSequence/Execute) -- applies the sequence to a string + - [IsAsciiCharacter](EscapeSequence/IsAsciiCharacter) -- returns or sets whether the sequence stands for a character code + - [ReplacementString](EscapeSequence/ReplacementString) -- returns or sets the text that replaces a plain sequence + - [Self](EscapeSequence/Self) -- returns the object itself +- [FormerEscapeSequence](FormerEscapeSequence/) -- holds a text and its replacement, in the form of the earlier escape sequence class + - [Create](FormerEscapeSequence/Create) -- creates a FormerEscapeSequence + - [EscapeString](FormerEscapeSequence/EscapeString) -- returns or sets the text to look for + - [ReplacementString](FormerEscapeSequence/ReplacementString) -- returns or sets the replacement text +- [StringFormatSpecifier](StringFormatSpecifier/) -- describes one format item + - [Alignment](StringFormatSpecifier/Alignment) -- returns or sets the width and the justification of a formatted value + - [CustomSpecifier](StringFormatSpecifier/CustomSpecifier) -- returns or sets the text that follows the identifier letter + - [identifier](StringFormatSpecifier/identifier) -- returns or sets the letter that selects the format + - [Index](StringFormatSpecifier/IndexProperty) -- returns or sets the position of the value in the argument list + - [Precision](StringFormatSpecifier/Precision) -- returns the number that follows the identifier letter + - [ToString](StringFormatSpecifier/ToString) -- returns the text of the format item +- [StringHelper](StringHelper) -- the class behind StringFormat, which takes the values as an array + +### Format identifier classes + +Each of these implements [**IStringFormatIdentifier**](IStringFormatIdentifier) and is predeclared. + +- [CurrencySFI](CurrencySFI) -- the `C` identifier for numbers: an amount with a trailing `$` +- [DateTimeSFI](DateTimeSFI) -- the date identifiers, in a class that StringHelper does not register +- [DecimalSFI](DecimalSFI) -- the `D` identifier for numbers: whole-number digits +- [ExponentialSFI](ExponentialSFI) -- the `E` identifier for numbers: exponential notation, with ParseExponent +- [FixedPointSFI](FixedPointSFI) -- the `F` identifier for numbers: a fixed count of decimal places +- [GeneralNumericSFI](GeneralNumericSFI) -- the `G` identifier for numbers: whole-number, fixed-point or exponential notation +- [GenericDateTimeSFI](GenericDateTimeSFI) -- the date identifiers `d D f F g G s t T C` +- [HexSFI](HexSFI) -- the `X` identifier for numbers: hexadecimal digits with an `&H` prefix +- [NumericPaddingSFI](NumericPaddingSFI) -- a placeholder that never matches +- [PercentSFI](PercentSFI) -- the `P` identifier for numbers: a percentage +- [RoundTripSFI](RoundTripSFI) -- the `R` identifier for numbers: the value as a **Double** in text + +## Interface + +- [IStringFormatIdentifier](IStringFormatIdentifier) -- the contract of the format identifier classes + +## Enumeration + +- [AsciiEscapeBase](AsciiEscapeBase) -- selects the number base of an ASCII escape sequence + +## Other public names + +The package also exposes `HelloWorldClass`, `HelloWorldModule` and `Pootle`. They are test code that was left in the package, and they are not part of its formatting API. `HelloWorldClass.Show` and `HelloWorldModule.Show` each display a message box that says *Hello world!*, and `Pootle.SimpleTest` prints the results of four sample calls to **StringFormat** to the Immediate window. These three names have no pages. diff --git a/docs/Reference/Contributed/OLEGuids/IDataObject.md b/docs/Reference/Contributed/OLEGuids/IDataObject.md new file mode 100644 index 000000000..7cfe77202 --- /dev/null +++ b/docs/Reference/Contributed/OLEGuids/IDataObject.md @@ -0,0 +1,21 @@ +--- +title: IDataObject +parent: OLEGuids Package +permalink: /tB/Packages/Contributed/OLEGuids/IDataObject +has_toc: false +--- + +# IDataObject interface +{: .no_toc } + +Names the COM interface that transfers data between applications, as the clipboard and drag and drop do; declared here as a stub with no methods. + +**IDataObject** has the interface identifier `0000010E-0000-0000-C000-000000000046` and extends **stdole.IUnknown**. It is declared `[OleAutomation(False)]`. Its description marks it as a stub and points to the tbShellLib package for the full version. Microsoft Learn describes the Windows interface: [IDataObject](https://learn.microsoft.com/en-us/windows/win32/api/objidl/nn-objidl-idataobject). + +The stub declares none of the methods that get, set and describe data formats. The type exists so that other declarations of the package can name it: [**IRichEditOle.GetClipboardData**](IRichEditOle#getclipboarddata) and [**IRichEditOleCallback.GetClipboardData**](IRichEditOleCallback#getclipboarddata) return one, and [**IRichEditOle.ImportDataObject**](IRichEditOle#importdataobject) and [**IRichEditOleCallback.QueryAcceptData**](IRichEditOleCallback#queryacceptdata) take one. Nothing can be called through a variable of this type. + +## See Also + +- [IRichEditOle](IRichEditOle) interface -- the OLE objects in a Rich Edit control +- [IRichEditOleCallback](IRichEditOleCallback) interface -- what a Rich Edit control asks its container +- [IStorage](IStorage) interface -- stub for the structured-storage interface diff --git a/docs/Reference/Contributed/OLEGuids/IDispatch.md b/docs/Reference/Contributed/OLEGuids/IDispatch.md new file mode 100644 index 000000000..4c4b6e3ea --- /dev/null +++ b/docs/Reference/Contributed/OLEGuids/IDispatch.md @@ -0,0 +1,76 @@ +--- +title: IDispatch +parent: OLEGuids Package +permalink: /tB/Packages/Contributed/OLEGuids/IDispatch +has_toc: false +--- + +# IDispatch interface +{: .no_toc } + +Finds and calls the members of an automation object by name or by dispatch identifier. + +**IDispatch** has the interface identifier `00020400-0000-0000-C000-000000000046` and extends **stdole.IUnknown**. It is declared `[OleAutomation(False)]`. Microsoft Learn describes the Windows interface: [IDispatch](https://learn.microsoft.com/en-us/windows/win32/api/oaidl/nn-oaidl-idispatch). + +The declaration is complete: it has all four methods of the Windows interface. Each is a **Sub** that hides the HRESULT: a failure code raises a run-time error, and a success code other than `S_OK` is read with [**Err.LastHresult**](../../../Modules/ErrObject/LastHresult). The structure parameters of **Invoke** are **stdole**'s **DISPPARAMS** and **EXCEPINFO**; the interface identifiers are the package's [OLECLSID](OLECLSID). + +> [!NOTE] +> A variable declared `As IDispatch` has the type of **stdole**, not this one, in a project that references **stdole**. A call through it is late-bound by name, and the four methods are not reached. Write `OLEGuids.IDispatch` to get this declaration. [IOleControlSite.GetExtendedControl](IOleControlSite#getextendedcontrol) returns it. + +The [IDispatch](../../../../Reference/COM-Interfaces/IDispatch) page in the COM Interfaces section gives the contract of the four methods, what a class that implements the interface must do, and how the **stdole** declaration behaves. The parameters there are the same as here, except that a project declares its own structure for the interface identifier where this package supplies [OLECLSID](OLECLSID). + +## Methods + +### GetTypeInfoCount + +```tb inert=signature +Sub GetTypeInfoCount(ByRef pctInfo As Long) +``` + +Says whether the object can describe itself with type information. *pctInfo* receives 1 when the object has type information and 0 when it has none. + +### GetTypeInfo + +```tb inert=signature +Sub GetTypeInfo(ByVal itinfo As Long, ByVal lcid As Long, ByRef pptinfo As LongPtr) +``` + +Returns the object's type information, as an `ITypeInfo*` in *pptinfo*. *itinfo* is the index of the type information: 0 selects the type information of the object's own implementation of **IDispatch**. *lcid* is the locale of the information. + +### GetIDsOfNames + +```tb inert=signature +Sub GetIDsOfNames(ByRef riid As OLEGuids.OLECLSID, ByRef rgszNames As LongPtr, ByVal cNames As Long, ByVal lcid As Long, ByRef rgDispID As Long) +``` + +Converts the names of a member and its parameters into dispatch identifiers. *riid* is reserved: pass an [OLECLSID](OLECLSID) holding only zeros. *rgszNames* is the first element of an array of *cNames* pointers to Unicode strings, such as `StrPtr(name)` in a **LongPtr** variable, and *rgDispID* receives one identifier for each name. A name that the object does not have raises a run-time error. + +### Invoke + +```tb inert=signature +Sub Invoke(ByVal DispIDMember As Long, ByRef riid As OLEGuids.OLECLSID, ByVal lcid As Long, ByVal wFlags As Integer, ByRef pdispparams As stdole.DISPPARAMS, ByRef pvarResult As Variant, ByRef pexcepinfo As stdole.EXCEPINFO, ByRef puArgErr As Long) +``` + +Calls the member with the dispatch identifier *DispIDMember*. *riid* is reserved and holds only zeros. *wFlags* says what kind of access it is: 1 calls a method (`DISPATCH_METHOD`), 2 reads a property (`DISPATCH_PROPERTYGET`), 4 assigns a property (`DISPATCH_PROPERTYPUT`) and 8 sets an object property (`DISPATCH_PROPERTYPUTREF`). *pdispparams* holds the arguments, *pvarResult* receives the result, *pexcepinfo* receives the details of an error the member raised, and *puArgErr* receives the index of the argument that was wrong. + +## Example + +This function finds the dispatch identifier of a member of an object by name. The *riid* argument is an **OLECLSID** that is not filled in, so it holds only zeros. + +```tb check_build +Private Function DispIdOf(ByVal Obj As Object, ByVal MemberName As String) As Long + Dim d As OLEGuids.IDispatch = Obj + Dim iid As OLECLSID + Dim namePtr As LongPtr = StrPtr(MemberName) + Dim id As Long + d.GetIDsOfNames iid, namePtr, 1, 0, id + Return id +End Function +``` + +## See Also + +- [IDispatch](../../../../Reference/COM-Interfaces/IDispatch) interface -- the contract, in the COM Interfaces section +- [OLECLSID](OLECLSID) type -- a class or interface identifier +- [IOleControlSite](IOleControlSite) interface -- its **GetExtendedControl** returns this interface +- [IEnumVARIANTUnrestricted](IEnumVARIANTUnrestricted) interface -- extends **stdole.IDispatch** diff --git a/docs/Reference/Contributed/OLEGuids/IEnumVARIANTUnrestricted.md b/docs/Reference/Contributed/OLEGuids/IEnumVARIANTUnrestricted.md new file mode 100644 index 000000000..eac41547b --- /dev/null +++ b/docs/Reference/Contributed/OLEGuids/IEnumVARIANTUnrestricted.md @@ -0,0 +1,60 @@ +--- +title: IEnumVARIANTUnrestricted +parent: OLEGuids Package +permalink: /tB/Packages/Contributed/OLEGuids/IEnumVARIANTUnrestricted +has_toc: false +--- + +# IEnumVARIANTUnrestricted interface +{: .no_toc } + +Enumerates a sequence of **Variant** values, with counts declared as **Long** values. + +**IEnumVARIANTUnrestricted** has the interface identifier `00020404-0000-0000-C000-000000000046`, which is the identifier of **IEnumVARIANT**, the enumerator that **For Each** uses. It is declared `[OleAutomation(False)]`. Microsoft Learn describes the Windows interface: [IEnumVARIANT](https://learn.microsoft.com/en-us/windows/win32/api/oaidl/nn-oaidl-ienumvariant). + +## Declaration + +The enumerator declared in **stdole** cannot be implemented from twinBASIC, because its counts are unsigned 32-bit integers, which twinBASIC has no type for. This declaration uses **Long** counts instead. Its *cElt* parameters are **Long**, and so is *pcEltFetched*, which is passed by value. + +The declaration extends **stdole.IDispatch**. The Windows **IEnumVARIANT** extends **IUnknown**. + +The declaration is complete: it has all four methods of the Windows interface. Each is a **Sub**, so the HRESULT is hidden: a failure code raises a run-time error, and a success code such as `S_FALSE` is read with [**Err.LastHresult**](../../../Modules/ErrObject/LastHresult). The [IEnumVARIANT](../../../../Reference/COM-Interfaces/IEnumVARIANT) page in the COM Interfaces section gives the contract of the four methods, how **For Each** uses them, and a project's own declaration of the interface. + +## Methods + +### Next + +```tb inert=signature +Sub Next(ByVal cElt As Long, ByRef rgVar As Variant, ByVal pcEltFetched As Long) +``` + +Returns the next *cElt* items of the sequence, or as many as are left. *rgVar* is the first element of the caller's array of **Variant** values, which receives the items. *pcEltFetched* is the number of items fetched, as a pointer in the Windows method. It is a 32-bit **Long** here, so it can hold a pointer only in 32-bit code; a caller that does not need the count passes 0, which is a null pointer. A call that returns fewer items than asked for returns `S_FALSE`. + +### Skip + +```tb inert=signature +Sub Skip(ByVal cElt As Long) +``` + +Skips the next *cElt* items of the sequence. It returns `S_FALSE` when fewer than *cElt* items were left. + +### Reset + +```tb inert=signature +Sub Reset() +``` + +Returns to the first item of the sequence. + +### Clone + +```tb inert=signature +Sub Clone(ByRef ppEnum As stdole.IEnumVARIANT) +``` + +Returns, in *ppEnum*, a copy of the enumerator that starts at the same position. The two then advance independently. The type of *ppEnum* is **stdole.IEnumVARIANT**. + +## See Also + +- [IEnumVARIANT](../../../../Reference/COM-Interfaces/IEnumVARIANT) interface -- the contract, in the COM Interfaces section +- [IDispatch](IDispatch) interface -- finds and calls members of an automation object diff --git a/docs/Reference/Contributed/OLEGuids/IObjectSafety.md b/docs/Reference/Contributed/OLEGuids/IObjectSafety.md new file mode 100644 index 000000000..97ccf05b1 --- /dev/null +++ b/docs/Reference/Contributed/OLEGuids/IObjectSafety.md @@ -0,0 +1,79 @@ +--- +title: IObjectSafety +parent: OLEGuids Package +permalink: /tB/Packages/Contributed/OLEGuids/IObjectSafety +has_toc: false +--- + +# IObjectSafety interface +{: .no_toc } + +Lets a host ask an object which safety options it supports for an interface, and set them. + +**IObjectSafety** has the interface identifier `CB5BDC81-93C1-11CF-8F20-00805F2CD064` and extends **stdole.IUnknown**. It is declared `[OleAutomation(False)]`. Microsoft Learn describes the Windows interface: [IObjectSafety](https://learn.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/aa768224(v=vs.85)). + +A host, such as a web browser that runs scripts, asks an object that may be called by untrusted code whether it agrees to be. An object implements the interface to say that it does. The declaration is complete: it has both methods of the Windows interface. They are **Sub** members, so the HRESULT is hidden: a failure code raises a run-time error, and a class that implements the interface sets [**Err.ReturnHResult**](../../../Modules/ErrObject/ReturnHResult) to return one. Neither method is marked `[PreserveSig]`, so a class can implement the interface. + +The safety options are bits in a **Long**: + +| Value | Constant | Meaning | +|------:|----------|---------| +| 1 | `INTERFACESAFE_FOR_UNTRUSTED_CALLER` | the interface is safe to call from an untrusted caller | +| 2 | `INTERFACESAFE_FOR_UNTRUSTED_DATA` | the interface is safe to use with untrusted data | +| 4 | `INTERFACE_USES_DISPEX` | the caller knows to use **IDispatchEx** | +| 8 | `INTERFACE_USES_SECURITY_MANAGER` | the caller knows to use **IInternetHostSecurityManager** | + +The package does not declare the constants. + +## Methods + +### GetInterfaceSafetyOptions + +```tb inert=signature +Sub GetInterfaceSafetyOptions(ByRef riid As OLEGuids.OLECLSID, ByRef pdwSupportedOptions As Long, ByRef pdwEnabledOptions As Long) +``` + +Reports the safety options for the interface that *riid* identifies. *pdwSupportedOptions* receives the options the object supports, and *pdwEnabledOptions* the options that are set now. + +### SetInterfaceSafetyOptions + +```tb inert=signature +Sub SetInterfaceSafetyOptions(ByRef riid As OLEGuids.OLECLSID, ByVal dwOptionSetMask As Long, ByVal dwEnabledOptions As Long) +``` + +Turns safety options on or off for the interface that *riid* identifies. The bits set in *dwOptionSetMask* select the options to change, and the same bits in *dwEnabledOptions* give their new values: set for on, clear for off. + +## Example + +This class supports the two "untrusted" options, keeps the ones the host has turned on, and refuses a request for any other option. + +```tb check_build slot=file +Class ScriptSafeObject + Implements IObjectSafety + + Private Const INTERFACESAFE_FOR_UNTRUSTED_CALLER As Long = &H1 + Private Const INTERFACESAFE_FOR_UNTRUSTED_DATA As Long = &H2 + Private Const SUPPORTED As Long = INTERFACESAFE_FOR_UNTRUSTED_CALLER Or INTERFACESAFE_FOR_UNTRUSTED_DATA + Private Const E_FAIL As Long = &H80004005 + + Private m_Enabled As Long + + Private Sub IObjectSafety_GetInterfaceSafetyOptions(ByRef riid As OLECLSID, ByRef pdwSupportedOptions As Long, ByRef pdwEnabledOptions As Long) Implements IObjectSafety.GetInterfaceSafetyOptions + pdwSupportedOptions = SUPPORTED + pdwEnabledOptions = m_Enabled + End Sub + + Private Sub IObjectSafety_SetInterfaceSafetyOptions(ByRef riid As OLECLSID, ByVal dwOptionSetMask As Long, ByVal dwEnabledOptions As Long) Implements IObjectSafety.SetInterfaceSafetyOptions + If (dwOptionSetMask And Not SUPPORTED) <> 0 Then + Err.ReturnHResult = E_FAIL + Exit Sub + End If + m_Enabled = (m_Enabled And Not dwOptionSetMask) Or (dwEnabledOptions And dwOptionSetMask) + End Sub +End Class +``` + +## See Also + +- [OLECLSID](OLECLSID) type -- a class or interface identifier +- [IDispatch](IDispatch) interface -- finds and calls members of an automation object diff --git a/docs/Reference/Contributed/OLEGuids/IOleClientSite.md b/docs/Reference/Contributed/OLEGuids/IOleClientSite.md new file mode 100644 index 000000000..e1953f52c --- /dev/null +++ b/docs/Reference/Contributed/OLEGuids/IOleClientSite.md @@ -0,0 +1,23 @@ +--- +title: IOleClientSite +parent: OLEGuids Package +permalink: /tB/Packages/Contributed/OLEGuids/IOleClientSite +has_toc: false +--- + +# IOleClientSite interface +{: .no_toc } + +Names the container-side site of an embedded OLE object; declared here as a stub with no methods. + +**IOleClientSite** has the interface identifier `00000118-0000-0000-C000-000000000046` and extends **stdole.IUnknown**. It is declared `[OleAutomation(False)]`. Its description marks it as a stub and points to the tbShellLib package for the full version. + +In Windows, a container implements the interface to give an embedded object the services of its site: saving the object, naming its moniker and container, showing it, and resizing it. Microsoft Learn describes the Windows interface: [IOleClientSite](https://learn.microsoft.com/en-us/windows/win32/api/oleidl/nn-oleidl-ioleclientsite). + +The stub declares none of those methods, so nothing can be called through a variable of this type. The type exists so that other declarations of the package can name it: [**IOleObject.SetClientSite**](IOleObject#setclientsite) takes one, [**IOleObject.GetClientSite**](IOleObject#getclientsite) and [**IRichEditOle.GetClientSite**](IRichEditOle#getclientsite) return one, and [**IOleObject.DoVerb**](IOleObject#doverb) takes one as its active site. + +## See Also + +- [IOleObject](IOleObject) interface -- connects an embedded object to its site +- [IRichEditOle](IRichEditOle) interface -- the OLE objects in a Rich Edit control +- [IOleInPlaceSite](IOleInPlaceSite) interface -- the site for in-place activation diff --git a/docs/Reference/Contributed/OLEGuids/IOleControl.md b/docs/Reference/Contributed/OLEGuids/IOleControl.md new file mode 100644 index 000000000..9ce32ea33 --- /dev/null +++ b/docs/Reference/Contributed/OLEGuids/IOleControl.md @@ -0,0 +1,58 @@ +--- +title: IOleControl +parent: OLEGuids Package +permalink: /tB/Packages/Contributed/OLEGuids/IOleControl +has_toc: false +--- + +# IOleControl interface +{: .no_toc } + +Lets a container ask an OLE control for its keyboard mnemonics, and tell the control about changes to the container's ambient properties and about frozen events. + +**IOleControl** has the interface identifier `B196B288-BAB4-101A-B69C-00AA00341D07` and extends **stdole.IUnknown**. It is declared `[OleAutomation(False)]`. Microsoft Learn describes the Windows interface: [IOleControl](https://learn.microsoft.com/en-us/windows/win32/api/ocidl/nn-ocidl-iolecontrol). + +The declaration is complete: it has all four methods of the Windows interface. **GetControlInfo** and **OnMnemonic** are marked `[PreserveSig]`, so a class cannot implement this interface; it is for calling. [IOleControlVB](IOleControlVB) declares the same two methods in a form a class can implement. **OnAmbientPropertyChange** and **FreezeEvents** hide the HRESULT: a failure code raises a run-time error. + +## Methods + +### GetControlInfo + +```tb inert=signature +[PreserveSig] +Function GetControlInfo(ByRef pCI As OLECONTROLINFO) As Long +``` + +Fills *pCI* with the control's keyboard mnemonics and keyboard behavior. The caller sets the structure's `cb` field to its size before the call. The result is the raw HRESULT; a control that has no mnemonics returns `E_NOTIMPL` (`&H80004001`). + +### OnMnemonic + +```tb inert=signature +[PreserveSig] +Function OnMnemonic(ByRef pMsg As OLEACCELMSG) As Long +``` + +Tells the control that the user pressed one of the mnemonic keys it listed in **GetControlInfo**. *pMsg* holds the keystroke message. The result is the raw HRESULT. + +### OnAmbientPropertyChange + +```tb inert=signature +Sub OnAmbientPropertyChange(ByVal DispID As Long) +``` + +Tells the control that an ambient property of the container changed. *DispID* is the dispatch identifier of the property, or -1 (`DISPID_UNKNOWN`) when more than one property changed. + +### FreezeEvents + +```tb inert=signature +Sub FreezeEvents(ByVal bFreeze As Long) +``` + +Tells the control to stop firing events, when *bFreeze* is not 0, or to resume, when it is 0. + +## See Also + +- [IOleControlVB](IOleControlVB) interface -- Visual Basic-style versions of **GetControlInfo** and **OnMnemonic** +- [IOleControlSite](IOleControlSite) interface -- the container-side site of a control +- [OLECONTROLINFO](OLECONTROLINFO) type -- the keyboard mnemonic table of a control +- [OLEACCELMSG](OLEACCELMSG) type -- a window message diff --git a/docs/Reference/Contributed/OLEGuids/IOleControlSite.md b/docs/Reference/Contributed/OLEGuids/IOleControlSite.md new file mode 100644 index 000000000..4783917ce --- /dev/null +++ b/docs/Reference/Contributed/OLEGuids/IOleControlSite.md @@ -0,0 +1,85 @@ +--- +title: IOleControlSite +parent: OLEGuids Package +permalink: /tB/Packages/Contributed/OLEGuids/IOleControlSite +has_toc: false +--- + +# IOleControlSite interface +{: .no_toc } + +The container-side site of an OLE control: lets a control tell its container about focus, unused keystrokes and changes to its keyboard information, and ask the container to convert coordinates. + +**IOleControlSite** has the interface identifier `B196B289-BAB4-101A-B69C-00AA00341D07` and extends **stdole.IUnknown**. It is declared `[OleAutomation(False)]`. Microsoft Learn describes the Windows interface: [IOleControlSite](https://learn.microsoft.com/en-us/windows/win32/api/ocidl/nn-ocidl-iolecontrolsite). + +The declaration is complete: it has all seven methods of the Windows interface. **TranslateAccelerator** is marked `[PreserveSig]`, so a class cannot implement this interface; it is for calling. The other six hide the HRESULT: a failure code raises a run-time error. + +## Methods + +### OnControlInfoChanged + +```tb inert=signature +Sub OnControlInfoChanged() +``` + +Tells the container that the control's [OLECONTROLINFO](OLECONTROLINFO) changed. The container then calls [**IOleControl.GetControlInfo**](IOleControl#getcontrolinfo) again. + +### LockInPlaceActive + +```tb inert=signature +Sub LockInPlaceActive(ByVal fLock As Long) +``` + +Asks the container to keep the control active in place, when *fLock* is not 0, or to stop keeping it, when it is 0. + +### GetExtendedControl + +```tb inert=signature +Function GetExtendedControl() As OLEGuids.IDispatch +``` + +Returns the container's extended control: the object that holds the properties and methods the container maintains for the control, and that the control could not reach otherwise. The result is the package's [IDispatch](IDispatch). The Windows method returns it through an output parameter. + +### TransformCoords + +```tb inert=signature +Sub TransformCoords(ByVal pPtlHimetric As LongPtr, ByVal pPtfContainer As LongPtr, ByVal dwFlags As Long) +``` + +Converts a position or a size between HIMETRIC units (hundredths of a millimeter) and the container's own units. *pPtlHimetric* points to a `POINTL`, two **Long** values with the layout of an [OLEPOINT](OLEPOINT), and *pPtfContainer* to a `POINTF`, two **Single** values. One structure is read and the other is written, according to the direction. *dwFlags* combines two choices: + +- what is converted: 1 for a position (`XFORMCOORDS_POSITION`) or 2 for a size (`XFORMCOORDS_SIZE`); +- which way: 4 for HIMETRIC to the container's units (`XFORMCOORDS_HIMETRICTOCONTAINER`) or 8 for the container's units to HIMETRIC (`XFORMCOORDS_CONTAINERTOHIMETRIC`). + +### TranslateAccelerator + +```tb inert=signature +[PreserveSig] +Function TranslateAccelerator(ByVal lpMsg As LongPtr, ByVal grfModifiers As Long) As Long +``` + +Passes a keystroke that the control did not use to the container. *lpMsg* points to the `MSG` of the keystroke, such as the address of an [OLEACCELMSG](OLEACCELMSG). *grfModifiers* holds the state of the modifier keys: 1 for Shift, 2 for Ctrl and 4 for Alt (`KEYMOD_SHIFT`, `KEYMOD_CONTROL`, `KEYMOD_ALT`). The result is the raw HRESULT: `S_OK` (0) when the container used the keystroke, and `S_FALSE` (1) when it did not. + +### OnFocus + +```tb inert=signature +Sub OnFocus(ByVal fGotFocus As Long) +``` + +Tells the container that the control gained the focus, when *fGotFocus* is not 0, or lost it, when it is 0. + +### ShowPropertyFrame + +```tb inert=signature +Sub ShowPropertyFrame() +``` + +Asks the container to show the control's property pages itself, so that they can work with the container's extended control. A container that does not need to returns `E_NOTIMPL`, which raises a run-time error, and the control then shows the pages directly. + +## See Also + +- [IOleControl](IOleControl) interface -- the control's side +- [IDispatch](IDispatch) interface -- finds and calls members of an automation object +- [OLECONTROLINFO](OLECONTROLINFO) type -- the keyboard mnemonic table of a control +- [OLEACCELMSG](OLEACCELMSG) type -- a window message +- [OLEPOINT](OLEPOINT) type -- a point diff --git a/docs/Reference/Contributed/OLEGuids/IOleControlVB.md b/docs/Reference/Contributed/OLEGuids/IOleControlVB.md new file mode 100644 index 000000000..f6d725b90 --- /dev/null +++ b/docs/Reference/Contributed/OLEGuids/IOleControlVB.md @@ -0,0 +1,45 @@ +--- +title: IOleControlVB +parent: OLEGuids Package +permalink: /tB/Packages/Contributed/OLEGuids/IOleControlVB +has_toc: false +--- + +# IOleControlVB interface +{: .no_toc } + +Visual Basic-style versions of the **IOleControl** methods **GetControlInfo** and **OnMnemonic**, which a class can implement. + +**IOleControlVB** is not a Windows interface. It has the interface identifier `C895C8F9-6564-4123-8760-529F72AB9322` and extends **stdole.IDispatch**. It is not declared `[OleAutomation(False)]`, as the package's Windows interfaces are. Its two methods have the dispatch identifiers 1 and 2 (`[DispId(1)]` and `[DispId(2)]`). + +It exists because [**IOleControl**](IOleControl) has `[PreserveSig]` members, which a twinBASIC class cannot implement. Each method here is a **Sub** that corresponds to one of those two methods, with signature types that Visual Basic code uses. The other two methods of **IOleControl**, **OnAmbientPropertyChange** and **FreezeEvents**, have no counterpart. + +*Handled* is the first parameter of both methods. It is passed by reference, and it is a flag that an implementation which dealt with the call sets to **True**. + +## Methods + +### GetControlInfo + +```tb inert=signature +[DispId(1)] +Sub GetControlInfo(ByRef Handled As Boolean, ByRef AccelCount As Integer, ByRef AccelTable As LongPtr, ByRef Flags As Long) +``` + +Reports the control's keyboard mnemonics. The three parameters after *Handled* are the fields of the [OLECONTROLINFO](OLECONTROLINFO) structure that the Windows method fills in: *AccelCount* is `cAccel`, *AccelTable* is `hAccel` and *Flags* is `dwFlags`. + +### OnMnemonic + +```tb inert=signature +[DispId(2)] +Sub OnMnemonic(ByRef Handled As Boolean, ByVal hWnd As LongPtr, ByVal wMsg As Long, ByVal wParam As LongPtr, ByVal lParam As LongPtr, ByVal Shift As Long) +``` + +Tells the control that the user pressed one of its mnemonic keys. The Windows method receives a pointer to the keystroke message, an [OLEACCELMSG](OLEACCELMSG); this one receives the fields of the message as separate parameters: the window handle *hWnd*, the message number *wMsg*, and *wParam* and *lParam*. *Shift* is passed in addition to them. + +## See Also + +- [IOleControl](IOleControl) interface -- the Windows interface this one corresponds to +- [IOleInPlaceActiveObjectVB](IOleInPlaceActiveObjectVB) interface -- Visual Basic-style **TranslateAccelerator** +- [IPerPropertyBrowsingVB](IPerPropertyBrowsingVB) interface -- Visual Basic-style versions of three **IPerPropertyBrowsing** methods +- [OLECONTROLINFO](OLECONTROLINFO) type -- the keyboard mnemonic table of a control +- [OLEACCELMSG](OLEACCELMSG) type -- a window message diff --git a/docs/Reference/Contributed/OLEGuids/IOleInPlaceActiveObject.md b/docs/Reference/Contributed/OLEGuids/IOleInPlaceActiveObject.md new file mode 100644 index 000000000..74c179032 --- /dev/null +++ b/docs/Reference/Contributed/OLEGuids/IOleInPlaceActiveObject.md @@ -0,0 +1,93 @@ +--- +title: IOleInPlaceActiveObject +parent: OLEGuids Package +permalink: /tB/Packages/Contributed/OLEGuids/IOleInPlaceActiveObject +has_toc: false +--- + +# IOleInPlaceActiveObject interface +{: .no_toc } + +Lets the container of an OLE object that is active in place pass the object its accelerator keystrokes, window activation changes and border changes. + +**IOleInPlaceActiveObject** has the interface identifier `00000117-0000-0000-C000-000000000046`. It is declared `[OleAutomation(False)]`. Microsoft Learn describes the Windows interface: [IOleInPlaceActiveObject](https://learn.microsoft.com/en-us/windows/win32/api/oleidl/nn-oleidl-ioleinplaceactiveobject). + +## Declaration + +The Windows interface extends **IOleWindow**. This declaration extends [**IUnknownUnrestricted**](IUnknownUnrestricted) instead, and declares **GetWindow** and **ContextSensitiveHelp** itself, in the order and with the meaning that [IOleWindow](IOleWindow) gives them. The type is therefore not derived from **IOleWindow**, though the methods come in the same order. + +Every method is marked `[PreserveSig]`, **GetWindow** and **ContextSensitiveHelp** included: they return the raw HRESULT as a **Long**, and **GetWindow** returns the window handle through its *phWnd* parameter. A class cannot implement this interface; it is for calling. [IOleInPlaceActiveObjectVB](IOleInPlaceActiveObjectVB) declares **TranslateAccelerator** in a form a class can implement. + +## Methods + +### GetWindow + +```tb inert=signature +[PreserveSig] +Function GetWindow(ByRef phWnd As LongPtr) As Long +``` + +Returns the handle of the window that takes part in in-place activation, in *phWnd*. The result is the raw HRESULT. + +### ContextSensitiveHelp + +```tb inert=signature +[PreserveSig] +Function ContextSensitiveHelp(ByVal fEnterMode As Long) As Long +``` + +Turns context-sensitive help mode on, when *fEnterMode* is not 0, or off, when it is 0. The result is the raw HRESULT. + +### TranslateAccelerator + +```tb inert=signature +[PreserveSig] +Function TranslateAccelerator(ByVal lpMsg As LongPtr) As Long +``` + +Lets the object process an accelerator keystroke that the container's message loop received. *lpMsg* points to the `MSG` of the keystroke, such as the address of an [OLEACCELMSG](OLEACCELMSG). The result is `S_OK` (0) when the object used the keystroke and `S_FALSE` (1) when it did not. + +### OnFrameWindowActivate + +```tb inert=signature +[PreserveSig] +Function OnFrameWindowActivate(ByVal fActivate As Long) As Long +``` + +Tells the object that the container's top-level frame window was activated, when *fActivate* is not 0, or deactivated, when it is 0. + +### OnDocWindowActivate + +```tb inert=signature +[PreserveSig] +Function OnDocWindowActivate(ByVal fActivate As Long) As Long +``` + +Tells the object that the container's document window was activated, when *fActivate* is not 0, or deactivated, when it is 0. + +### ResizeBorder + +```tb inert=signature +[PreserveSig] +Function ResizeBorder(ByVal prcBorder As LongPtr, ByVal pUIWindow As OLEGuids.IOleInPlaceUIWindow, ByVal fFrameWindow As Long) As Long +``` + +Tells the object that the border space it may use for its tools changed. *prcBorder* points to a `RECT` holding the new outer rectangle in which the object can request space, such as the address of an [OLERECT](OLERECT). *pUIWindow* is the [IOleInPlaceUIWindow](IOleInPlaceUIWindow) of the frame or document window whose border changed, and *fFrameWindow* is not 0 when that is the frame window. + +### EnableModeless + +```tb inert=signature +[PreserveSig] +Function EnableModeless(ByVal fEnable As Long) As Long +``` + +Enables the object's modeless dialog windows, when *fEnable* is not 0, or disables them, when it is 0. A container disables them while it shows a modal dialog of its own. + +## See Also + +- [IUnknownUnrestricted](IUnknownUnrestricted) interface -- the base interface +- [IOleWindow](IOleWindow) interface -- the interface whose two methods are redeclared here +- [IOleInPlaceActiveObjectVB](IOleInPlaceActiveObjectVB) interface -- Visual Basic-style **TranslateAccelerator** +- [IOleInPlaceUIWindow](IOleInPlaceUIWindow) interface -- border space in a frame or document window +- [OLERECT](OLERECT) type -- a rectangle +- [OLEACCELMSG](OLEACCELMSG) type -- a window message diff --git a/docs/Reference/Contributed/OLEGuids/IOleInPlaceActiveObjectVB.md b/docs/Reference/Contributed/OLEGuids/IOleInPlaceActiveObjectVB.md new file mode 100644 index 000000000..e4c49ac98 --- /dev/null +++ b/docs/Reference/Contributed/OLEGuids/IOleInPlaceActiveObjectVB.md @@ -0,0 +1,34 @@ +--- +title: IOleInPlaceActiveObjectVB +parent: OLEGuids Package +permalink: /tB/Packages/Contributed/OLEGuids/IOleInPlaceActiveObjectVB +has_toc: false +--- + +# IOleInPlaceActiveObjectVB interface +{: .no_toc } + +A Visual Basic-style version of **IOleInPlaceActiveObject.TranslateAccelerator**, which a class can implement. + +**IOleInPlaceActiveObjectVB** is not a Windows interface. It has the interface identifier `38584260-0CFB-45E7-8FBB-5D20B311F5B8` and extends **stdole.IDispatch**. It is not declared `[OleAutomation(False)]`, as the package's Windows interfaces are. + +It exists because [**IOleInPlaceActiveObject**](IOleInPlaceActiveObject) has `[PreserveSig]` members, which a twinBASIC class cannot implement. This interface has one **Sub** that corresponds to the **TranslateAccelerator** method of that interface, with signature types that Visual Basic code uses. + +## Methods + +### TranslateAccelerator + +```tb inert=signature +Sub TranslateAccelerator(Handled As Boolean, RetVal As Long, ByVal hWnd As LongPtr, ByVal wMsg As Long, ByVal wParam As LongPtr, ByVal lParam As LongPtr, ByVal Shift As Long) +``` + +Lets the object process an accelerator keystroke. The Windows method receives a pointer to a `MSG` structure; this one receives the fields of the message as separate parameters: the window handle *hWnd*, the message number *wMsg*, and *wParam* and *lParam*. *Shift* is passed in addition to them. + +*Handled* and *RetVal* are passed by reference, and the implementation sets them. *Handled* is a flag that an implementation which dealt with the keystroke sets to **True**. *RetVal* corresponds to the HRESULT that the Windows method returns: `S_OK` (0) when the object used the keystroke and `S_FALSE` (1) when it did not. + +## See Also + +- [IOleInPlaceActiveObject](IOleInPlaceActiveObject) interface -- the Windows interface this one corresponds to +- [IOleControlVB](IOleControlVB) interface -- Visual Basic-style **GetControlInfo** and **OnMnemonic** +- [IPerPropertyBrowsingVB](IPerPropertyBrowsingVB) interface -- Visual Basic-style versions of three **IPerPropertyBrowsing** methods +- [OLEACCELMSG](OLEACCELMSG) type -- a window message diff --git a/docs/Reference/Contributed/OLEGuids/IOleInPlaceFrame.md b/docs/Reference/Contributed/OLEGuids/IOleInPlaceFrame.md new file mode 100644 index 000000000..dc9595984 --- /dev/null +++ b/docs/Reference/Contributed/OLEGuids/IOleInPlaceFrame.md @@ -0,0 +1,24 @@ +--- +title: IOleInPlaceFrame +parent: OLEGuids Package +permalink: /tB/Packages/Contributed/OLEGuids/IOleInPlaceFrame +has_toc: false +--- + +# IOleInPlaceFrame interface +{: .no_toc } + +Names the container's top-level frame window in in-place activation; declared here as a stub that adds no methods to **IOleInPlaceUIWindow**. + +**IOleInPlaceFrame** has the interface identifier `00000116-0000-0000-C000-000000000046` and extends [**IOleInPlaceUIWindow**](IOleInPlaceUIWindow). It is declared `[OleAutomation(False)]`. Its description marks it as a stub and points to the tbShellLib package for the full version. + +In Windows, the interface adds the container's menu and status line services to the border negotiation of **IOleInPlaceUIWindow**: **InsertMenus**, **SetMenu**, **RemoveMenus**, **SetStatusText**, **EnableModeless** and **TranslateAccelerator**. Microsoft Learn describes the Windows interface: [IOleInPlaceFrame](https://learn.microsoft.com/en-us/windows/win32/api/oleidl/nn-oleidl-ioleinplaceframe). + +The stub declares none of those six. Through a variable of this type, only the four methods of **IOleInPlaceUIWindow** and the two of [**IOleWindow**](IOleWindow) can be called. The type is useful for naming a parameter: [**IOleInPlaceSite.GetWindowContext**](IOleInPlaceSite#getwindowcontext) and [**IRichEditOleCallback.GetInPlaceContext**](IRichEditOleCallback#getinplacecontext) return one. + +## See Also + +- [IOleInPlaceUIWindow](IOleInPlaceUIWindow) interface -- the base interface +- [IOleWindow](IOleWindow) interface -- the base of the base interface +- [IOleInPlaceSite](IOleInPlaceSite) interface -- the container-side site for in-place activation +- [IRichEditOleCallback](IRichEditOleCallback) interface -- what a Rich Edit control asks its container diff --git a/docs/Reference/Contributed/OLEGuids/IOleInPlaceObject.md b/docs/Reference/Contributed/OLEGuids/IOleInPlaceObject.md new file mode 100644 index 000000000..662ae7b89 --- /dev/null +++ b/docs/Reference/Contributed/OLEGuids/IOleInPlaceObject.md @@ -0,0 +1,69 @@ +--- +title: IOleInPlaceObject +parent: OLEGuids Package +permalink: /tB/Packages/Contributed/OLEGuids/IOleInPlaceObject +has_toc: false +--- + +# IOleInPlaceObject interface +{: .no_toc } + +Lets a container deactivate an OLE object that is active in place, and tell the object where it is drawn. + +**IOleInPlaceObject** has the interface identifier `00000113-0000-0000-C000-000000000046` and extends [**IOleWindow**](IOleWindow), so it also has that interface's **GetWindow** and **ContextSensitiveHelp** methods. It is declared `[OleAutomation(False)]`. All four methods hide the HRESULT: a failure code raises a run-time error. Microsoft Learn describes the Windows interface: [IOleInPlaceObject](https://learn.microsoft.com/en-us/windows/win32/api/oleidl/nn-oleidl-ioleinplaceobject). + +The declaration is complete: it has every method of the Windows interface. + +## Methods + +### InPlaceDeactivate + +```tb inert=signature +Sub InPlaceDeactivate() +``` + +Deactivates the object, which stops being active in place, and releases the resources it took for in-place activation. + +### UIDeactivate + +```tb inert=signature +Sub UIDeactivate() +``` + +Removes the object's user interface, such as its menus and toolbars, from the container's windows. The object stays active in place. + +### SetObjectRects + +```tb inert=signature +Sub SetObjectRects(ByVal lprcPosRect As LongPtr, ByVal lprcClipRect As LongPtr) +``` + +Tells the object how much of itself is visible. *lprcPosRect* points to a `RECT` holding the object's position in its parent window, and *lprcClipRect* to a `RECT` holding the rectangle it must be clipped to. Both are pointers: pass the address of an [OLERECT](OLERECT) with [**VarPtr**](../../../Modules/Information/VarPtr). + +### ReactivateAndUndo + +```tb inert=signature +Sub ReactivateAndUndo() +``` + +Reactivates an object that was deactivated, and undoes the changes made since it was activated. + +## Example + +This procedure gives an in-place object a position and a clipping rectangle of the same size, with its upper-left corner at the origin of its parent window. + +```tb check_build +Private Sub PlaceObject(ByVal Obj As IOleInPlaceObject, ByVal Width As Long, ByVal Height As Long) + Dim area As OLERECT + area.Right = Width + area.Bottom = Height + Obj.SetObjectRects VarPtr(area), VarPtr(area) +End Sub +``` + +## See Also + +- [IOleWindow](IOleWindow) interface -- the base interface +- [IOleInPlaceSite](IOleInPlaceSite) interface -- the container-side site for in-place activation +- [IOleInPlaceActiveObject](IOleInPlaceActiveObject) interface -- messages, activation and border changes for an in-place active object +- [OLERECT](OLERECT) type -- a rectangle diff --git a/docs/Reference/Contributed/OLEGuids/IOleInPlaceSite.md b/docs/Reference/Contributed/OLEGuids/IOleInPlaceSite.md new file mode 100644 index 000000000..c2eaf2abd --- /dev/null +++ b/docs/Reference/Contributed/OLEGuids/IOleInPlaceSite.md @@ -0,0 +1,109 @@ +--- +title: IOleInPlaceSite +parent: OLEGuids Package +permalink: /tB/Packages/Contributed/OLEGuids/IOleInPlaceSite +has_toc: false +--- + +# IOleInPlaceSite interface +{: .no_toc } + +The container-side site for in-place activation: a container learns through it when its object is activated and deactivated, and gives the object the windows and rectangles it needs. + +**IOleInPlaceSite** has the interface identifier `00000119-0000-0000-C000-000000000046` and extends [**IOleWindow**](IOleWindow), so it also has that interface's **GetWindow** and **ContextSensitiveHelp** methods. It is declared `[OleAutomation(False)]`. Microsoft Learn describes the Windows interface: [IOleInPlaceSite](https://learn.microsoft.com/en-us/windows/win32/api/oleidl/nn-oleidl-ioleinplacesite). + +The declaration is complete: it has all ten methods of the Windows interface. **CanInPlaceActivate** is marked `[PreserveSig]`, so a class cannot implement this interface; it is for calling. The other nine hide the HRESULT: a failure code raises a run-time error. + +A parameter that is a pointer to a structure (a `RECT*`, an `OLEINPLACEFRAMEINFO*`) is a **LongPtr**: pass the address of an [OLERECT](OLERECT) or an [OLEINPLACEFRAMEINFO](OLEINPLACEFRAMEINFO) with [**VarPtr**](../../../Modules/Information/VarPtr). + +## Methods + +### CanInPlaceActivate + +```tb inert=signature +[PreserveSig] +Function CanInPlaceActivate() As Long +``` + +Asks whether the container can activate the object in place. The result is the raw HRESULT: `S_OK` (0) when it can and `S_FALSE` (1) when it cannot. + +### OnInPlaceActivate + +```tb inert=signature +Sub OnInPlaceActivate() +``` + +Tells the container that its object is about to be activated in place. + +### OnUIActivate + +```tb inert=signature +Sub OnUIActivate() +``` + +Tells the container that the object is about to replace the container's menus and toolbars with its own. + +### GetWindowContext + +```tb inert=signature +Sub GetWindowContext(ByRef ppFrame As OLEGuids.IOleInPlaceFrame, ByRef ppDoc As OLEGuids.IOleInPlaceUIWindow, ByVal lprcPosRect As LongPtr, ByVal lprcClipRect As LongPtr, ByVal lpFrameInfo As LongPtr) +``` + +Returns what the object needs to run in place. *ppFrame* receives the container's [IOleInPlaceFrame](IOleInPlaceFrame), and *ppDoc* its document window's [IOleInPlaceUIWindow](IOleInPlaceUIWindow), or `Nothing` when the document window is the frame window. The container writes the object's position in its parent window to the `RECT` that *lprcPosRect* points to, and the outer clipping rectangle to the one that *lprcClipRect* points to. It fills the `OLEINPLACEFRAMEINFO` that *lpFrameInfo* points to. + +### Scroll + +```tb inert=signature +Sub Scroll(ByVal scrollExtant As Currency) +``` + +Asks the container to scroll the object by a number of pixels. The Windows method takes a `SIZE` by value, the distances in the x and y directions. This declaration passes the same eight bytes as a **Currency**. After the scroll, the container gives the object the new clipping rectangle with [**IOleInPlaceObject.SetObjectRects**](IOleInPlaceObject#setobjectrects). + +### OnUIDeactivate + +```tb inert=signature +Sub OnUIDeactivate(ByVal fUndoable As Long) +``` + +Tells the container that the object deactivated its user interface, so the container restores its own menus and toolbars. *fUndoable* is not 0 when the object can undo the changes made since it was activated. + +### OnInPlaceDeactivate + +```tb inert=signature +Sub OnInPlaceDeactivate() +``` + +Tells the container that the object is no longer active in place. + +### DiscardUndoState + +```tb inert=signature +Sub DiscardUndoState() +``` + +Tells the container to discard the undo state that the object kept for **ReactivateAndUndo**, because the object can no longer undo. + +### DeactivateAndUndo + +```tb inert=signature +Sub DeactivateAndUndo() +``` + +Asks the container to deactivate the object and return it to the state it had before it was activated. + +### OnPosRectChange + +```tb inert=signature +Sub OnPosRectChange(ByVal lprcPosRect As LongPtr) +``` + +Tells the container that the object's position changed. *lprcPosRect* points to a `RECT` holding the new position. + +## See Also + +- [IOleWindow](IOleWindow) interface -- the base interface +- [IOleInPlaceObject](IOleInPlaceObject) interface -- activates and deactivates an object in place +- [IOleInPlaceFrame](IOleInPlaceFrame) interface -- the container's frame window +- [IOleInPlaceUIWindow](IOleInPlaceUIWindow) interface -- border space in a frame or document window +- [OLERECT](OLERECT) type -- a rectangle +- [OLEINPLACEFRAMEINFO](OLEINPLACEFRAMEINFO) type -- accelerator information of an in-place frame diff --git a/docs/Reference/Contributed/OLEGuids/IOleInPlaceUIWindow.md b/docs/Reference/Contributed/OLEGuids/IOleInPlaceUIWindow.md new file mode 100644 index 000000000..c0678d411 --- /dev/null +++ b/docs/Reference/Contributed/OLEGuids/IOleInPlaceUIWindow.md @@ -0,0 +1,58 @@ +--- +title: IOleInPlaceUIWindow +parent: OLEGuids Package +permalink: /tB/Packages/Contributed/OLEGuids/IOleInPlaceUIWindow +has_toc: false +--- + +# IOleInPlaceUIWindow interface +{: .no_toc } + +Lets an object that is active in place negotiate border space for its tools in a container's frame or document window. + +**IOleInPlaceUIWindow** has the interface identifier `00000115-0000-0000-C000-000000000046` and extends [**IOleWindow**](IOleWindow), so it also has that interface's **GetWindow** and **ContextSensitiveHelp** methods. It is declared `[OleAutomation(False)]`. All four methods hide the HRESULT: a failure code raises a run-time error. Microsoft Learn describes the Windows interface: [IOleInPlaceUIWindow](https://learn.microsoft.com/en-us/windows/win32/api/oleidl/nn-oleidl-ioleinplaceuiwindow). + +The declaration is complete: it has every method of the Windows interface. [IOleInPlaceFrame](IOleInPlaceFrame) extends it. + +The *pBorderWidths* parameters point to a `BORDERWIDTHS` structure, which is a `RECT` whose four fields are the widths, in pixels, needed on the left, top, right and bottom sides. An [OLERECT](OLERECT) has that layout. + +## Methods + +### GetBorder + +```tb inert=signature +Sub GetBorder(ByVal lpRectBorder As LongPtr) +``` + +Writes into the `RECT` that *lpRectBorder* points to the outer rectangle in which the object can place its tools, such as the address of an [OLERECT](OLERECT). + +### RequestBorderSpace + +```tb inert=signature +Sub RequestBorderSpace(ByVal pBorderWidths As LongPtr) +``` + +Asks whether the window can give up the border widths that *pBorderWidths* holds. A window that supports no toolbars, or has no room, returns `INPLACE_E_NOTOOLSPACE`, which raises a run-time error. The space is not allocated until **SetBorderSpace**, so the object can negotiate before it moves its tools. + +### SetBorderSpace + +```tb inert=signature +Sub SetBorderSpace(ByVal pBorderWidths As LongPtr) +``` + +Allocates the border space that **RequestBorderSpace** accepted. A null pointer (0) says that the object does not need any space. + +### SetActiveObject + +```tb inert=signature +Sub SetActiveObject(ByVal pActiveObject As OLEGuids.IOleInPlaceActiveObject, ByVal lpszObjName As LongPtr) +``` + +Gives the window the [IOleInPlaceActiveObject](IOleInPlaceActiveObject) of the object, which sets up a direct channel between the two. *lpszObjName* is a pointer to a Unicode string that names the object for the container's window title, or 0 when the object does not need the title changed. A deactivating object passes `Nothing` and 0. + +## See Also + +- [IOleWindow](IOleWindow) interface -- the base interface +- [IOleInPlaceFrame](IOleInPlaceFrame) interface -- the container's frame window +- [IOleInPlaceActiveObject](IOleInPlaceActiveObject) interface -- messages, activation and border changes for an in-place active object +- [OLERECT](OLERECT) type -- a rectangle diff --git a/docs/Reference/Contributed/OLEGuids/IOleObject.md b/docs/Reference/Contributed/OLEGuids/IOleObject.md new file mode 100644 index 000000000..88ea2c9a1 --- /dev/null +++ b/docs/Reference/Contributed/OLEGuids/IOleObject.md @@ -0,0 +1,117 @@ +--- +title: IOleObject +parent: OLEGuids Package +permalink: /tB/Packages/Contributed/OLEGuids/IOleObject +has_toc: false +--- + +# IOleObject interface +{: .no_toc } + +The main interface of an embedded OLE object: connects the object to its container's site, and asks the object to perform a verb such as showing or opening itself. + +**IOleObject** has the interface identifier `00000112-0000-0000-C000-000000000046` and extends **stdole.IUnknown**. It is declared `[OleAutomation(False)]`. Microsoft Learn describes the Windows interface: [IOleObject](https://learn.microsoft.com/en-us/windows/win32/api/oleidl/nn-oleidl-ioleobject). + +The declaration is partial. The Windows interface has 21 methods, and this one declares the first nine, up to and including **DoVerb**. The methods that follow --- **EnumVerbs**, **Update**, **IsUpToDate**, **GetUserClassID**, **GetUserType**, **SetExtent**, **GetExtent**, **Advise**, **Unadvise**, **EnumAdvise**, **GetMiscStatus** and **SetColorScheme** --- are not declared. **DoVerb** is marked `[PreserveSig]`, so a class cannot implement this interface; it is for calling. Every method except **DoVerb** hides the HRESULT: a failure code raises a run-time error. + +A parameter that is a pointer to an interface or structure that the package does not declare (an `IMoniker*`, an `IDataObject*`, a `RECT*`, a `MSG*`) is a **LongPtr**. + +## Methods + +### SetClientSite + +```tb inert=signature +Sub SetClientSite(ByVal pClientSite As OLEGuids.IOleClientSite) +``` + +Tells the object which [IOleClientSite](IOleClientSite) represents its place in the container. A container calls it once, when the object is created or loaded. + +### GetClientSite + +```tb inert=signature +Function GetClientSite() As OLEGuids.IOleClientSite +``` + +Returns the client site that **SetClientSite** last gave the object. + +### SetHostNames + +```tb inert=signature +Sub SetHostNames(ByVal lpszContainerApp As LongPtr, ByVal lpszContainerObj As LongPtr) +``` + +Gives the object the names of the container application and of the container's document or object, which the object can show in its window caption. Both parameters are pointers to Unicode strings, so a caller passes `StrPtr(name)`. + +### Close + +```tb inert=signature +Sub Close(ByVal dwSaveOption As Long) +``` + +Moves the object from the running state to the loaded state. *dwSaveOption* says whether the object saves first: 0 saves it if it has changed (`OLECLOSE_SAVEIFDIRTY`), 1 does not save (`OLECLOSE_NOSAVE`), and 2 prompts the user (`OLECLOSE_PROMPTSAVE`). + +### SetMoniker + +```tb inert=signature +Sub SetMoniker(ByVal dwWhichMoniker As Long, ByVal lpmk As LongPtr) +``` + +Tells the object the moniker of its container, or of the object itself. *lpmk* is an `IMoniker*`. *dwWhichMoniker* says which moniker it is: 1 for the container's, 2 for the object's name relative to the container, and 3 for the object's full name (`OLEWHICHMK_CONTAINER`, `OLEWHICHMK_OBJREL`, `OLEWHICHMK_OBJFULL`). + +### GetMoniker + +```tb inert=signature +Function GetMoniker(ByVal dwAssign As Long, ByVal dwWhichMoniker As Long) As LongPtr +``` + +Returns an `IMoniker*` that names the object, as a **LongPtr**. *dwAssign* says whether the object assigns itself a moniker if it has none: 1 returns one only if it exists, 2 forces an assignment, 3 removes the assignment and 4 assigns a temporary one (`OLEGETMONIKER_ONLYIFTHERE`, `OLEGETMONIKER_FORCEASSIGN`, `OLEGETMONIKER_UNASSIGN`, `OLEGETMONIKER_TEMPFORUSER`). *dwWhichMoniker* is the same value as for **SetMoniker**. + +### InitFromData + +```tb inert=signature +Sub InitFromData(ByVal lpDataObject As LongPtr, ByVal fCreation As Long, ByVal dwReserved As Long) +``` + +Initializes the object from the data in an `IDataObject*`, *lpDataObject*. *fCreation* is not 0 when the object is being created from the data, and 0 when the data replaces the contents of an existing object. *dwReserved* is reserved. + +### GetClipboardData + +```tb inert=signature +Function GetClipboardData(ByVal dwReserved As Long) As LongPtr +``` + +Returns an `IDataObject*` holding the data the object would put on the clipboard if it were copied, as a **LongPtr**. *dwReserved* is reserved and is passed as 0. + +### DoVerb + +```tb inert=signature +[PreserveSig] +Function DoVerb(ByVal iVerb As Long, ByVal lpMsg As LongPtr, ByVal pActiveSite As OLEGuids.IOleClientSite, ByVal Index As Long, ByVal hWndParent As LongPtr, ByVal lprcPosRect As LongPtr) As Long +``` + +Asks the object to perform one of its verbs. The result is the raw HRESULT. + +*iVerb* +: A verb number. The standard verbs are negative or zero: 0 is the primary verb (`OLEIVERB_PRIMARY`), -1 shows the object (`OLEIVERB_SHOW`), -2 opens it in a separate window (`OLEIVERB_OPEN`), -3 hides it (`OLEIVERB_HIDE`), -4 activates it in place with its user interface (`OLEIVERB_UIACTIVATE`) and -5 activates it in place without it (`OLEIVERB_INPLACEACTIVATE`). + +*lpMsg* +: A pointer to the `MSG` that caused the activation, such as the double-click, or 0. + +*pActiveSite* +: The [IOleClientSite](IOleClientSite) of the site that activates the object. + +*Index* +: Reserved; the Windows parameter is named `lindex`. Pass 0. + +*hWndParent* +: The handle of the container window that holds the object. + +*lprcPosRect* +: A pointer to a `RECT` holding the object's position in *hWndParent*, such as the address of an [OLERECT](OLERECT). + +## See Also + +- [IOleClientSite](IOleClientSite) interface -- the container-side site of an embedded object +- [IOleInPlaceObject](IOleInPlaceObject) interface -- activates and deactivates an object in place +- [IOleControl](IOleControl) interface -- keyboard mnemonics and ambient properties of a control +- [OLERECT](OLERECT) type -- a rectangle diff --git a/docs/Reference/Contributed/OLEGuids/IOleWindow.md b/docs/Reference/Contributed/OLEGuids/IOleWindow.md new file mode 100644 index 000000000..9cbd80ae4 --- /dev/null +++ b/docs/Reference/Contributed/OLEGuids/IOleWindow.md @@ -0,0 +1,62 @@ +--- +title: IOleWindow +parent: OLEGuids Package +permalink: /tB/Packages/Contributed/OLEGuids/IOleWindow +has_toc: false +--- + +# IOleWindow interface +{: .no_toc } + +Returns the handle of a window that an OLE object or container uses, and turns context-sensitive help mode on and off. + +**IOleWindow** has the interface identifier `00000114-0000-0000-C000-000000000046` and extends **stdole.IUnknown**. It is declared `[OleAutomation(False)]`. Microsoft Learn describes the Windows interface: [IOleWindow](https://learn.microsoft.com/en-us/windows/win32/api/oleidl/nn-oleidl-iolewindow). + +It is the base of the in-place activation interfaces: [IOleInPlaceObject](IOleInPlaceObject), [IOleInPlaceUIWindow](IOleInPlaceUIWindow) (and through it [IOleInPlaceFrame](IOleInPlaceFrame)) and [IOleInPlaceSite](IOleInPlaceSite) extend it. Neither method is marked `[PreserveSig]`, so the HRESULT is hidden: a failure code raises a run-time error. + +## Methods + +### GetWindow + +```tb inert=signature +Function GetWindow() As LongPtr +``` + +Returns the handle of one of the windows that take part in in-place activation: the frame, document, parent or in-place object window. The Windows method returns this handle through an output parameter; here it is the result. + +### ContextSensitiveHelp + +```tb inert=signature +Sub ContextSensitiveHelp(ByVal fEnterMode As Long) +``` + +Turns context-sensitive help mode on, when *fEnterMode* is not 0, or off, when it is 0. The mode is usually entered with Shift+F1, and the next click then asks for help on the item clicked. + +## Example + +This class reports one window handle, which it is given when it is created. Its **ContextSensitiveHelp** does nothing, because the class has no help mode. + +```tb check_build slot=file +Class WindowSite + Implements IOleWindow + + Private m_hWnd As LongPtr + + Public Sub Init(ByVal hWnd As LongPtr) + m_hWnd = hWnd + End Sub + + Private Function IOleWindow_GetWindow() As LongPtr Implements IOleWindow.GetWindow + Return m_hWnd + End Function + + Private Sub IOleWindow_ContextSensitiveHelp(ByVal fEnterMode As Long) Implements IOleWindow.ContextSensitiveHelp + End Sub +End Class +``` + +## See Also + +- [IOleInPlaceObject](IOleInPlaceObject) interface -- activates and deactivates an object in place +- [IOleInPlaceUIWindow](IOleInPlaceUIWindow) interface -- border space in a frame or document window +- [IOleInPlaceSite](IOleInPlaceSite) interface -- the container-side site for in-place activation diff --git a/docs/Reference/Contributed/OLEGuids/IPerPropertyBrowsing.md b/docs/Reference/Contributed/OLEGuids/IPerPropertyBrowsing.md new file mode 100644 index 000000000..35e5482fe --- /dev/null +++ b/docs/Reference/Contributed/OLEGuids/IPerPropertyBrowsing.md @@ -0,0 +1,63 @@ +--- +title: IPerPropertyBrowsing +parent: OLEGuids Package +permalink: /tB/Packages/Contributed/OLEGuids/IPerPropertyBrowsing +has_toc: false +--- + +# IPerPropertyBrowsing interface +{: .no_toc } + +Lets a property browser ask an object for the display string, the property page and the predefined values of one of its properties. + +**IPerPropertyBrowsing** has the interface identifier `376BD3AA-3845-101B-84ED-08002B2EC713` and extends **stdole.IUnknown**. It is declared `[OleAutomation(False)]`. Microsoft Learn describes the Windows interface: [IPerPropertyBrowsing](https://learn.microsoft.com/en-us/windows/win32/api/ocidl/nn-ocidl-iperpropertybrowsing). + +The declaration is complete: it has all four methods of the Windows interface, and every one is marked `[PreserveSig]`. Each returns the raw HRESULT as a **Long**; `E_NOTIMPL` (`&H80004001`) means that the object does not provide that kind of information. A class cannot implement this interface; it is for calling. [IPerPropertyBrowsingVB](IPerPropertyBrowsingVB) declares three of the methods in a form a class can implement. + +Each property is named by its dispatch identifier, *DispID*. + +## Methods + +### GetDisplayString + +```tb inert=signature +[PreserveSig] +Function GetDisplayString(ByVal DispID As Long, ByRef lpDisplayName As LongPtr) As Long +``` + +Returns a text string that describes a property, for a property browser to display. *lpDisplayName* receives a pointer to a `BSTR` that the object allocates. The caller frees it with `SysFreeString`. + +### MapPropertyToPage + +```tb inert=signature +[PreserveSig] +Function MapPropertyToPage(ByVal DispID As Long, ByRef pCLSID As OLEGuids.OLECLSID) As Long +``` + +Returns the class identifier of the property page on which the property can be edited, in *pCLSID*. When the method fails, *pCLSID* is set to the null identifier. + +### GetPredefinedStrings + +```tb inert=signature +[PreserveSig] +Function GetPredefinedStrings(ByVal DispID As Long, ByRef pCaStringsOut As OLEGuids.OLECALPOLESTR, ByRef pCaCookiesOut As OLEGuids.OLECADWORD) As Long +``` + +Returns the names of the values a property can take, for a drop-down list. *pCaStringsOut* receives a counted array of string pointers, and *pCaCookiesOut* a counted array of cookies. Each string has a cookie in the same position. The object allocates the strings and both arrays, and the caller frees them with `CoTaskMemFree`. A cookie is passed to **GetPredefinedValue** to get the value the string names. + +### GetPredefinedValue + +```tb inert=signature +[PreserveSig] +Function GetPredefinedValue(ByVal DispID As Long, ByVal dwCookie As Long, ByRef pVarOut As Variant) As Long +``` + +Returns, in *pVarOut*, the value that corresponds to *dwCookie*, a cookie that **GetPredefinedStrings** returned. + +## See Also + +- [IPerPropertyBrowsingVB](IPerPropertyBrowsingVB) interface -- Visual Basic-style versions of three of the methods +- [ISpecifyPropertyPages](ISpecifyPropertyPages) interface -- lists the property pages of an object +- [OLECLSID](OLECLSID) type -- a class or interface identifier +- [OLECALPOLESTR](OLECALPOLESTR) type -- a counted array of Unicode string pointers +- [OLECADWORD](OLECADWORD) type -- a counted array of **DWORD** values diff --git a/docs/Reference/Contributed/OLEGuids/IPerPropertyBrowsingVB.md b/docs/Reference/Contributed/OLEGuids/IPerPropertyBrowsingVB.md new file mode 100644 index 000000000..97aea4c63 --- /dev/null +++ b/docs/Reference/Contributed/OLEGuids/IPerPropertyBrowsingVB.md @@ -0,0 +1,52 @@ +--- +title: IPerPropertyBrowsingVB +parent: OLEGuids Package +permalink: /tB/Packages/Contributed/OLEGuids/IPerPropertyBrowsingVB +has_toc: false +--- + +# IPerPropertyBrowsingVB interface +{: .no_toc } + +Visual Basic-style versions of three **IPerPropertyBrowsing** methods, which a class can implement. + +**IPerPropertyBrowsingVB** is not a Windows interface. It has the interface identifier `D5D3BBE3-DB60-4522-AF5B-D767FE736DDB` and extends **stdole.IDispatch**. It is not declared `[OleAutomation(False)]`, as the package's Windows interfaces are. Its three methods have the dispatch identifiers 1, 2 and 3 (`[DispId(1)]`, `[DispId(2)]` and `[DispId(3)]`). + +It exists because [**IPerPropertyBrowsing**](IPerPropertyBrowsing) has `[PreserveSig]` members, which a twinBASIC class cannot implement. Each method here is a **Sub** that corresponds to one of that interface's methods, and uses Visual Basic types in place of pointers: a **String** for a `BSTR*`, and arrays of **String** and **Long** for the counted arrays. **MapPropertyToPage** has no counterpart. + +*Handled* is the first parameter of every method. It is passed by reference, and it is a flag that an implementation which dealt with the call sets to **True**. *DispID* is the dispatch identifier of the property. + +## Methods + +### GetDisplayString + +```tb inert=signature +[DispId(1)] +Sub GetDisplayString(ByRef Handled As Boolean, ByVal DispID As Long, ByRef DisplayName As String) +``` + +Returns a text string that describes the property, for a property browser to display, in *DisplayName*. Corresponds to [**IPerPropertyBrowsing.GetDisplayString**](IPerPropertyBrowsing#getdisplaystring). + +### GetPredefinedStrings + +```tb inert=signature +[DispId(2)] +Sub GetPredefinedStrings(ByRef Handled As Boolean, ByVal DispID As Long, ByRef StringsOut As String(), ByRef CookiesOut As Long()) +``` + +Returns the names of the values the property can take, in *StringsOut*, and a cookie for each in *CookiesOut*, at the same position. Corresponds to [**IPerPropertyBrowsing.GetPredefinedStrings**](IPerPropertyBrowsing#getpredefinedstrings). + +### GetPredefinedValue + +```tb inert=signature +[DispId(3)] +Sub GetPredefinedValue(ByRef Handled As Boolean, ByVal DispID As Long, ByVal Cookie As Long, ByRef Value As Variant) +``` + +Returns, in *Value*, the value that corresponds to *Cookie*, a cookie that **GetPredefinedStrings** returned. Corresponds to [**IPerPropertyBrowsing.GetPredefinedValue**](IPerPropertyBrowsing#getpredefinedvalue). + +## See Also + +- [IPerPropertyBrowsing](IPerPropertyBrowsing) interface -- the Windows interface this one corresponds to +- [IOleControlVB](IOleControlVB) interface -- Visual Basic-style **GetControlInfo** and **OnMnemonic** +- [IOleInPlaceActiveObjectVB](IOleInPlaceActiveObjectVB) interface -- Visual Basic-style **TranslateAccelerator** diff --git a/docs/Reference/Contributed/OLEGuids/IRichEditOle.md b/docs/Reference/Contributed/OLEGuids/IRichEditOle.md new file mode 100644 index 000000000..19e4a04bc --- /dev/null +++ b/docs/Reference/Contributed/OLEGuids/IRichEditOle.md @@ -0,0 +1,170 @@ +--- +title: IRichEditOle +parent: OLEGuids Package +permalink: /tB/Packages/Contributed/OLEGuids/IRichEditOle +has_toc: false +--- + +# IRichEditOle interface +{: .no_toc } + +Gives a program access to the OLE objects in a Rich Edit control: counts them, reads and inserts them, and sets how they are hosted. + +**IRichEditOle** has the interface identifier `00020D00-0000-0000-C000-000000000046` and extends **stdole.IUnknown**. It is declared `[OleAutomation(False)]`. A program gets the interface by sending the `EM_GETOLEINTERFACE` message to a Rich Edit control. Microsoft Learn describes the Windows interface: [IRichEditOle](https://learn.microsoft.com/en-us/windows/win32/api/richole/nn-richole-iricheditole). + +The declaration is complete: it has all 16 methods of the Windows interface. Every method except **GetClientSite** is marked `[PreserveSig]` and returns the raw HRESULT as a **Long**, so a class cannot implement this interface; it is for calling. **GetClientSite** hides the HRESULT: a failure code raises a run-time error. + +Several parameters need declarations that the package does not have. The `REOBJECT` structure that **GetObject** and **InsertObject** pass is declared `As Any`: pass a variable of a structure with that layout. The `CHARRANGE` structure that **GetClipboardData** takes is a **LongPtr**. The strings of **ConvertObject** and **SetHostNames** are pointers to ANSI strings, not Unicode ones. The *iob* parameters are object indexes, which start at 0; -1 (`REO_IOB_SELECTION`) selects the selected object where a method allows it. + +## Methods + +### GetClientSite + +```tb inert=signature +Function GetClientSite() As OLEGuids.IOleClientSite +``` + +Returns an [IOleClientSite](IOleClientSite) for a new object. Every object inserted into the control must use a client site returned by this method, and a site serves exactly one object. + +### GetObjectCount + +```tb inert=signature +[PreserveSig] +Function GetObjectCount() As Long +``` + +Returns the number of objects in the control. Unlike the other methods, the result is the count, not an HRESULT. + +### GetLinkCount + +```tb inert=signature +[PreserveSig] +Function GetLinkCount() As Long +``` + +Returns the number of objects in the control that are links. The result is the count, not an HRESULT. + +### GetObject + +```tb inert=signature +[PreserveSig] +Function GetObject(ByVal iob As Long, ByRef pREOBJECT As Any, ByVal dwFlags As Long) As Long +``` + +Fills the `REOBJECT` structure in *pREOBJECT* with information about the object at index *iob*, or about the object at the character position the structure holds when *iob* is -2 (`REO_IOB_USE_CP`). *dwFlags* says which interface pointers to return in the structure: 1 for the object (`REO_GETOBJ_POLEOBJ`), 2 for its storage (`REO_GETOBJ_PSTG`), 4 for its site (`REO_GETOBJ_POLESITE`), 7 for all of them (`REO_GETOBJ_ALL_INTERFACES`) and 0 for none. Each interface pointer returned has a reference that the caller releases. + +### InsertObject + +```tb inert=signature +[PreserveSig] +Function InsertObject(ByRef pREOBJECT As Any) As Long +``` + +Inserts the object that the `REOBJECT` structure in *pREOBJECT* describes into the control. + +### ConvertObject + +```tb inert=signature +[PreserveSig] +Function ConvertObject(ByVal iob As Long, ByRef pCLSIDNew As OLEGuids.OLECLSID, ByVal lpstrUserTypeNew As LongPtr /* ANSI */) As Long +``` + +Converts the object at index *iob* to the class that *pCLSIDNew* identifies. *lpstrUserTypeNew* is a pointer to the ANSI name of the new class that the user sees. The call reloads the object but does not update it; the caller does that. + +### ActivateAs + +```tb inert=signature +[PreserveSig] +Function ActivateAs(ByRef pCLSID As OLEGuids.OLECLSID, ByRef pCLSIDAs As OLEGuids.OLECLSID) As Long +``` + +Makes objects of the class *pCLSID* behave as objects of the class *pCLSIDAs*. The control unloads all objects of the old class, tells OLE to treat them as the new class, and reloads them. An object that cannot be reloaded is deleted. + +### SetHostNames + +```tb inert=signature +[PreserveSig] +Function SetHostNames(ByVal lpstrContainerApp As LongPtr /* ANSI */, ByVal lpstrContainerObj As LongPtr /* ANSI */) As Long +``` + +Sets the names of the container application and of its document or object that the control gives to every object it inserts. The parameters are pointers to ANSI strings. A server shows the names in its window when the object is opened. + +### SetLinkAvailable + +```tb inert=signature +[PreserveSig] +Function SetLinkAvailable(ByVal iob As Long, ByVal fAvailable As Long) As Long +``` + +Sets the link-available flag of the object at index *iob*: on when *fAvailable* is not 0, off when it is 0. + +### SetDvaspect + +```tb inert=signature +[PreserveSig] +Function SetDvaspect(ByVal iob As Long, ByVal dvAspect As Long) As Long +``` + +Sets the aspect in which the control draws the object at index *iob*, one of the `DVASPECT` values that OLE defines, such as 1 for the content and 4 for an icon. The control redraws the object. The drawing information that the object has cached is not changed; the caller does that. + +### HandsOffStorage + +```tb inert=signature +[PreserveSig] +Function HandsOffStorage(ByVal iob As Long) As Long +``` + +Tells the control to release its reference to the storage of the object at index *iob*. It does not call the object's own **HandsOffStorage**; the caller does that. + +### SaveCompleted + +```tb inert=signature +[PreserveSig] +Function SaveCompleted(ByVal iob As Long, ByVal pStorage As OLEGuids.IStorage) As Long +``` + +Tells the control that the most recent save of the object at index *iob* is complete. When *pStorage* is not `Nothing`, the control releases the storage it holds for the object and uses [IStorage](IStorage) *pStorage* from then on. + +### InPlaceDeactivate + +```tb inert=signature +[PreserveSig] +Function InPlaceDeactivate() As Long +``` + +Tells the control to deactivate the object that is active in place, if there is one. + +### ContextSensitiveHelp + +```tb inert=signature +[PreserveSig] +Function ContextSensitiveHelp(ByVal fEnterMode As Long) As Long +``` + +Tells the control to turn context-sensitive help mode on, when *fEnterMode* is not 0, or off, when it is 0. The control passes the change to the object that is active in place. + +### GetClipboardData + +```tb inert=signature +[PreserveSig] +Function GetClipboardData(ByVal lpCharRange As LongPtr, ByVal RECO As Long, ByRef ppDataObject As OLEGuids.IDataObject) As Long +``` + +Returns, in *ppDataObject*, a clipboard object for the range of text that the `CHARRANGE` at *lpCharRange* holds. The result is an [IDataObject](IDataObject). The Windows method ignores *RECO*. + +### ImportDataObject + +```tb inert=signature +[PreserveSig] +Function ImportDataObject(ByVal pDataObject As OLEGuids.IDataObject, ByVal CF As Integer, ByVal hMetaPict As LongPtr) As Long +``` + +Imports a clipboard object into the control, replacing the current selection. *CF* is the clipboard format to use, and 0 selects the best available format. *hMetaPict* is the handle of a metafile that holds the icon view of the object, and is used only when a paste special operation asks for the icon aspect. + +## See Also + +- [IRichEditOleCallback](IRichEditOleCallback) interface -- what a Rich Edit control asks its container +- [IOleClientSite](IOleClientSite) interface -- the container-side site of an embedded object +- [IStorage](IStorage) interface -- stub for the structured-storage interface +- [IDataObject](IDataObject) interface -- stub for the data transfer interface +- [OLECLSID](OLECLSID) type -- a class or interface identifier diff --git a/docs/Reference/Contributed/OLEGuids/IRichEditOleCallback.md b/docs/Reference/Contributed/OLEGuids/IRichEditOleCallback.md new file mode 100644 index 000000000..5a1390519 --- /dev/null +++ b/docs/Reference/Contributed/OLEGuids/IRichEditOleCallback.md @@ -0,0 +1,157 @@ +--- +title: IRichEditOleCallback +parent: OLEGuids Package +permalink: /tB/Packages/Contributed/OLEGuids/IRichEditOleCallback +has_toc: false +--- + +# IRichEditOleCallback interface +{: .no_toc } + +The interface that a Rich Edit control calls on its client to get storage for new objects, to ask whether to accept inserted objects and pasted data, and to ask for drag and drop effects and a context menu. + +**IRichEditOleCallback** has the interface identifier `00020D03-0000-0000-C000-000000000046` and extends **stdole.IUnknown**. It is declared `[OleAutomation(False)]`. The client implements the interface and gives it to the control by sending the `EM_SETOLECALLBACK` message. Microsoft Learn describes the Windows interface: [IRichEditOleCallback](https://learn.microsoft.com/en-us/windows/win32/api/richole/nn-richole-iricheditolecallback). + +The declaration is complete: it has all 10 methods of the Windows interface, and none is marked `[PreserveSig]`, so a class can implement it. Every method is a **Sub**, which hides the HRESULT. An implementation returns a failure code by setting [**Err.ReturnHResult**](../../../Modules/ErrObject/ReturnHResult), and a success code other than `S_OK` the same way. Where a Windows method returns a pointer through a pointer-to-pointer parameter, the **Sub** takes a **ByRef** parameter of the interface type: assign it, or leave it `Nothing`. + +A parameter that is a pointer to a structure the package does not declare (a `CHARRANGE*`) or to an object the package does not name (an `IOleObject*`) is a **LongPtr**. *RECO* is a clipboard operation flag: 0 for a paste (`RECO_PASTE`), 1 for a drop (`RECO_DROP`), 2 for a copy (`RECO_COPY`), 3 for a cut (`RECO_CUT`) and 4 for a drag (`RECO_DRAG`). + +## Methods + +### GetNewStorage + +```tb inert=signature +Sub GetNewStorage(ByRef ppStorage As OLEGuids.IStorage) +``` + +Supplies storage for a new object that was pasted from the clipboard or read from an RTF stream. The result is an [IStorage](IStorage). + +### GetInPlaceContext + +```tb inert=signature +Sub GetInPlaceContext(ByRef ppFrame As OLEGuids.IOleInPlaceFrame, ByRef ppDoc As OLEGuids.IOleInPlaceUIWindow, ByRef pFrameInfo As OLEGuids.OLEINPLACEFRAMEINFO) +``` + +Supplies what in-place activation needs: the client's frame window in *ppFrame* as an [IOleInPlaceFrame](IOleInPlaceFrame), its document window in *ppDoc* as an [IOleInPlaceUIWindow](IOleInPlaceUIWindow), which can stay `Nothing` when the frame and document windows are the same, and the accelerator information in *pFrameInfo*, an [OLEINPLACEFRAMEINFO](OLEINPLACEFRAMEINFO). + +### ShowContainerUI + +```tb inert=signature +Sub ShowContainerUI(ByVal fShow As Long) +``` + +Tells the client to show its own user interface, when *fShow* is not 0, or to hide it, when it is 0. The control calls it when an object activates or deactivates its user interface in place. + +### QueryInsertObject + +```tb inert=signature +Sub QueryInsertObject(ByRef pCLSID As OLEGuids.OLECLSID, ByVal pStorage As OLEGuids.IStorage, ByVal CharPos As Long) +``` + +Asks whether the control may insert an object of the class *pCLSID*, which is stored in *pStorage*, at the character position *CharPos*. The control calls it when it pastes an object and when it reads RTF. Any result other than `S_OK` refuses the insertion. + +### DeleteObject + +```tb inert=signature +Sub DeleteObject(ByVal LpOleObject As LongPtr) +``` + +Tells the client that the object `IOleObject*` *LpOleObject* is about to be deleted from the control. The object is not necessarily released at that point. + +### QueryAcceptData + +```tb inert=signature +Sub QueryAcceptData(ByVal pDataObject As OLEGuids.IDataObject, ByRef CF As Integer, ByVal RECO As Long, ByVal fReally As Long, ByVal hMetaPict As LongPtr) +``` + +Asks whether the control should accept the data that is pasted or dragged in, an [IDataObject](IDataObject). *CF* holds the clipboard format to use; 0 selects the best available format, and a value the client changes it to is the only format the control then uses. *RECO* is 0 for a paste and 1 for a drop. *fReally* is not 0 when the paste or drop is happening, and 0 when the control only asks, such as for `EM_CANPASTE`. *hMetaPict* is the handle of a metafile that holds the icon view of the object, and is used only when a paste special operation imposes the icon aspect. A failure code refuses the data and ends the operation. + +### ContextSensitiveHelp + +```tb inert=signature +Sub ContextSensitiveHelp(ByVal fEnterMode As Long) +``` + +Tells the client to turn context-sensitive help mode on, when *fEnterMode* is not 0, or off, when it is 0. It has the meaning of [**IOleWindow.ContextSensitiveHelp**](IOleWindow#contextsensitivehelp). + +### GetClipboardData + +```tb inert=signature +Sub GetClipboardData(ByVal lpCharRange As LongPtr, ByVal RECO As Long, ByRef ppDataObject As OLEGuids.IDataObject) +``` + +Lets the client supply its own clipboard object, an [IDataObject](IDataObject), for the range of text that the `CHARRANGE` at *lpCharRange* holds. + +### GetDragDropEffect + +```tb inert=signature +Sub GetDragDropEffect(ByVal fDrag As Long, ByVal KeyState As Long, ByRef dwEffect As Long) +``` + +Lets the client set the effect of a drop. *fDrag* is not 0 when the query is for a drag over the control (`IDropTarget::DragEnter` or `DragOver`), and 0 when it is for the drop itself. *KeyState* is the key state as OLE defines it. On return, *dwEffect* is the effect that the control allows when *fDrag* is not 0, and the effect to use when it is 0. + +### GetContextMenu + +```tb inert=signature +Sub GetContextMenu(ByVal SelType As Integer, ByVal LpOleObject As LongPtr, ByVal lpCharRange As LongPtr, ByRef hMenu As LongPtr) +``` + +Asks the client for the context menu to show on a right-click. *SelType* describes the selection: 0 is empty (`SEL_EMPTY`), 1 is text (`SEL_TEXT`), 2 includes an object (`SEL_OBJECT`), 4 is more than one character of text (`SEL_MULTICHAR`) and 8 is more than one object (`SEL_MULTIOBJECT`). *LpOleObject* is an `IOleObject*` of the first selected object when *SelType* includes `SEL_OBJECT`, and 0 otherwise. *lpCharRange* points to the `CHARRANGE` of the selection. *hMenu* receives the handle of the menu; the control destroys it when it has finished. The control sends a `WM_COMMAND` message to its parent window when the user chooses an item. + +## Example + +This class refuses every object that a Rich Edit control tries to insert, and answers the other methods with `E_NOTIMPL` or accepts the default. A method that supplies an object leaves its parameter `Nothing` and reports `E_NOTIMPL`. + +```tb check_build slot=file +Class NoObjects + Implements IRichEditOleCallback + + Private Const E_NOTIMPL As Long = &H80004001 + Private Const E_FAIL As Long = &H80004005 + + Private Sub IRichEditOleCallback_GetNewStorage(ByRef ppStorage As IStorage) Implements IRichEditOleCallback.GetNewStorage + Err.ReturnHResult = E_NOTIMPL + End Sub + + Private Sub IRichEditOleCallback_GetInPlaceContext(ByRef ppFrame As IOleInPlaceFrame, ByRef ppDoc As IOleInPlaceUIWindow, ByRef pFrameInfo As OLEINPLACEFRAMEINFO) Implements IRichEditOleCallback.GetInPlaceContext + Err.ReturnHResult = E_NOTIMPL + End Sub + + Private Sub IRichEditOleCallback_ShowContainerUI(ByVal fShow As Long) Implements IRichEditOleCallback.ShowContainerUI + End Sub + + Private Sub IRichEditOleCallback_QueryInsertObject(ByRef pCLSID As OLECLSID, ByVal pStorage As IStorage, ByVal CharPos As Long) Implements IRichEditOleCallback.QueryInsertObject + Err.ReturnHResult = E_FAIL + End Sub + + Private Sub IRichEditOleCallback_DeleteObject(ByVal LpOleObject As LongPtr) Implements IRichEditOleCallback.DeleteObject + End Sub + + Private Sub IRichEditOleCallback_QueryAcceptData(ByVal pDataObject As IDataObject, ByRef CF As Integer, ByVal RECO As Long, ByVal fReally As Long, ByVal hMetaPict As LongPtr) Implements IRichEditOleCallback.QueryAcceptData + End Sub + + Private Sub IRichEditOleCallback_ContextSensitiveHelp(ByVal fEnterMode As Long) Implements IRichEditOleCallback.ContextSensitiveHelp + End Sub + + Private Sub IRichEditOleCallback_GetClipboardData(ByVal lpCharRange As LongPtr, ByVal RECO As Long, ByRef ppDataObject As IDataObject) Implements IRichEditOleCallback.GetClipboardData + Err.ReturnHResult = E_NOTIMPL + End Sub + + Private Sub IRichEditOleCallback_GetDragDropEffect(ByVal fDrag As Long, ByVal KeyState As Long, ByRef dwEffect As Long) Implements IRichEditOleCallback.GetDragDropEffect + End Sub + + Private Sub IRichEditOleCallback_GetContextMenu(ByVal SelType As Integer, ByVal LpOleObject As LongPtr, ByVal lpCharRange As LongPtr, ByRef hMenu As LongPtr) Implements IRichEditOleCallback.GetContextMenu + Err.ReturnHResult = E_NOTIMPL + End Sub +End Class +``` + +## See Also + +- [IRichEditOle](IRichEditOle) interface -- the OLE objects in a Rich Edit control +- [IStorage](IStorage) interface -- stub for the structured-storage interface +- [IDataObject](IDataObject) interface -- stub for the data transfer interface +- [IOleInPlaceFrame](IOleInPlaceFrame) interface -- stub for the container's frame window +- [IOleInPlaceUIWindow](IOleInPlaceUIWindow) interface -- border space in a frame or document window +- [OLEINPLACEFRAMEINFO](OLEINPLACEFRAMEINFO) type -- accelerator information of an in-place frame +- [OLECLSID](OLECLSID) type -- a class or interface identifier diff --git a/docs/Reference/Contributed/OLEGuids/ISpecifyPropertyPages.md b/docs/Reference/Contributed/OLEGuids/ISpecifyPropertyPages.md new file mode 100644 index 000000000..673d3ac80 --- /dev/null +++ b/docs/Reference/Contributed/OLEGuids/ISpecifyPropertyPages.md @@ -0,0 +1,30 @@ +--- +title: ISpecifyPropertyPages +parent: OLEGuids Package +permalink: /tB/Packages/Contributed/OLEGuids/ISpecifyPropertyPages +has_toc: false +--- + +# ISpecifyPropertyPages interface +{: .no_toc } + +Lets an object list the class identifiers of its property pages. + +**ISpecifyPropertyPages** has the interface identifier `B196B28B-BAB4-101A-B69C-00AA00341D07` and extends **stdole.IUnknown**. It is declared `[OleAutomation(False)]`. Microsoft Learn describes the Windows interface: [ISpecifyPropertyPages](https://learn.microsoft.com/en-us/windows/win32/api/ocidl/nn-ocidl-ispecifypropertypages). + +The declaration is complete: it has the one method of the Windows interface. The method is a **Sub**, so the HRESULT is hidden: a failure code raises a run-time error. + +## Methods + +### GetPages + +```tb inert=signature +Sub GetPages(ByRef pPages As OLEGuids.OLECAUUID) +``` + +Fills *pPages* with a counted array of the class identifiers of the object's property pages. *pPages* is not initialized by the caller. The object allocates the array with `CoTaskMemAlloc` and stores its address in the structure's `pElems` field; the caller frees it with `CoTaskMemFree`. + +## See Also + +- [IPerPropertyBrowsing](IPerPropertyBrowsing) interface -- display strings, property pages and predefined values of an object's properties +- [OLECAUUID](OLECAUUID) type -- a counted array of GUIDs diff --git a/docs/Reference/Contributed/OLEGuids/IStorage.md b/docs/Reference/Contributed/OLEGuids/IStorage.md new file mode 100644 index 000000000..3f22e8e37 --- /dev/null +++ b/docs/Reference/Contributed/OLEGuids/IStorage.md @@ -0,0 +1,21 @@ +--- +title: IStorage +parent: OLEGuids Package +permalink: /tB/Packages/Contributed/OLEGuids/IStorage +has_toc: false +--- + +# IStorage interface +{: .no_toc } + +Names the COM structured-storage interface, which holds streams and nested storages in a compound file; declared here as a stub with no methods. + +**IStorage** has the interface identifier `0000000B-0000-0000-C000-000000000046` and extends **stdole.IUnknown**. It is declared `[OleAutomation(False)]`. Its description marks it as a stub and points to the tbShellLib package for the full version. Microsoft Learn describes the Windows interface: [IStorage](https://learn.microsoft.com/en-us/windows/win32/api/objidl/nn-objidl-istorage). + +The stub declares none of the methods that create, open, copy, enumerate and commit streams and storages. The type exists so that other declarations of the package can name it: [**IRichEditOle.SaveCompleted**](IRichEditOle#savecompleted) takes one, and [**IRichEditOleCallback.GetNewStorage**](IRichEditOleCallback#getnewstorage) and [**IRichEditOleCallback.QueryInsertObject**](IRichEditOleCallback#queryinsertobject) pass one. Nothing can be called through a variable of this type. + +## See Also + +- [IRichEditOle](IRichEditOle) interface -- the OLE objects in a Rich Edit control +- [IRichEditOleCallback](IRichEditOleCallback) interface -- what a Rich Edit control asks its container +- [IDataObject](IDataObject) interface -- stub for the data transfer interface diff --git a/docs/Reference/Contributed/OLEGuids/IUnknownUnrestricted.md b/docs/Reference/Contributed/OLEGuids/IUnknownUnrestricted.md new file mode 100644 index 000000000..0b4e77690 --- /dev/null +++ b/docs/Reference/Contributed/OLEGuids/IUnknownUnrestricted.md @@ -0,0 +1,66 @@ +--- +title: IUnknownUnrestricted +parent: OLEGuids Package +permalink: /tB/Packages/Contributed/OLEGuids/IUnknownUnrestricted +has_toc: false +--- + +# IUnknownUnrestricted interface +{: .no_toc } + +Declares the three methods of the COM base interface **IUnknown** as ordinary members, so that code can call **QueryInterface**, **AddRef** and **Release** itself. + +**IUnknownUnrestricted** has the interface identifier `00000000-0000-0000-C000-000000000046`, which is the identifier of **IUnknown**. Microsoft Learn describes the Windows interface: [IUnknown](https://learn.microsoft.com/en-us/windows/win32/api/unknwn/nn-unknwn-iunknown). + +The interface is declared `Extends Nothing` and `[OleAutomation(False)]`. With no base interface, its three methods are the first three entries of the method table, the slots that **IUnknown** occupies. The **stdole.IUnknown** declaration, which every other interface of the package extends, exposes none of them: twinBASIC supplies the three methods for every object and hides them. Every method is marked `[PreserveSig]` and returns the raw result. A class cannot implement this interface; [IOleInPlaceActiveObject](IOleInPlaceActiveObject) extends it for calling. + +See [IUnknown](../../../../Reference/COM-Interfaces/IUnknown) for the contract of the three methods and for how twinBASIC uses them. + +## Methods + +### QueryInterface + +```tb inert=signature +[PreserveSig] +Function QueryInterface(ByVal priid As LongPtr, ppvObject As LongPtr) As Long +``` + +Asks the object for another interface. *priid* is the address of the interface identifier requested, such as the address of an [OLECLSID](OLECLSID) variable. *ppvObject* is passed by reference and receives the interface pointer, or 0 when the object does not support the interface. The result is the HRESULT: 0 (`S_OK`) on success, `&H80004002` (`E_NOINTERFACE`) when the interface is not supported. + +A pointer that **QueryInterface** returns comes with a reference, which the caller gives back with **Release**. + +### AddRef + +```tb inert=signature +[PreserveSig] +Function AddRef() As Long +``` + +Adds a reference to the object and returns the new reference count. + +### Release + +```tb inert=signature +[PreserveSig] +Function Release() As Long +``` + +Removes a reference from the object and returns the new reference count. An object whose count reaches 0 may free itself. + +## Example + +This function adds a reference and removes it again, and returns the object's reference count at that moment. The count includes the references that the procedure's own variables hold. + +```tb check_build +Private Function ReferenceCount(ByVal Obj As Object) As Long + Dim u As IUnknownUnrestricted = Obj + u.AddRef + Return u.Release() +End Function +``` + +## See Also + +- [IUnknown](../../../../Reference/COM-Interfaces/IUnknown) interface -- the contract of the base interface +- [IOleInPlaceActiveObject](IOleInPlaceActiveObject) interface -- extends this interface +- [OLECLSID](OLECLSID) type -- an interface identifier diff --git a/docs/Reference/Contributed/OLEGuids/OLEACCELMSG.md b/docs/Reference/Contributed/OLEGuids/OLEACCELMSG.md new file mode 100644 index 000000000..33a30fc56 --- /dev/null +++ b/docs/Reference/Contributed/OLEGuids/OLEACCELMSG.md @@ -0,0 +1,54 @@ +--- +title: OLEACCELMSG +parent: OLEGuids Package +permalink: /tB/Packages/Contributed/OLEGuids/OLEACCELMSG +has_toc: false +--- + +# OLEACCELMSG type +{: .no_toc } + +A window message, with the layout of the Windows `MSG` structure. + +**OLEACCELMSG** is a user-defined type declared in the package's `OLEGuids` module, so both `OLEACCELMSG` and `OLEGuids.OLEACCELMSG` name it. It mirrors the Windows structure [MSG](https://learn.microsoft.com/en-us/windows/win32/api/winuser/ns-winuser-msg). +```tb inert=signature +Public Type OLEACCELMSG + hWnd As LongPtr + Message As Long + wParam As LongPtr + lParam As LongPtr + Time As Long + PT As OLEPOINT +End Type +``` + +## Fields + +*hWnd* +: A **LongPtr** holding the handle of the window that receives the message. + +*Message* +: A **Long** holding the message identifier, such as `WM_KEYDOWN`. + +*wParam* +: A **LongPtr** holding additional message information. Its meaning depends on *Message*. + +*lParam* +: A **LongPtr** holding additional message information. Its meaning depends on *Message*. + +*Time* +: A **Long** holding the time at which the message was posted. + +*PT* +: An [OLEPOINT](OLEPOINT) holding the position of the cursor, in screen coordinates, when the message was posted. + +## Where it is used + +- [**IOleControl.OnMnemonic**](IOleControl#onmnemonic) -- takes it by reference as *pMsg*. +- Methods that take a `MSG*` declare the parameter as a **LongPtr**, and the address of an **OLEACCELMSG** variable fits it: [**IOleObject.DoVerb**](IOleObject#doverb) (*lpMsg*), [**IOleControlSite.TranslateAccelerator**](IOleControlSite#translateaccelerator) (*lpMsg*) and [**IOleInPlaceActiveObject.TranslateAccelerator**](IOleInPlaceActiveObject#translateaccelerator) (*lpMsg*). + +## See Also + +- [OLEPOINT](OLEPOINT) type -- a point +- [IOleControl](IOleControl) interface -- keyboard mnemonics, ambient property changes and event freezing of a control +- [IOleControlVB](IOleControlVB) interface -- Visual Basic-style **GetControlInfo** and **OnMnemonic** diff --git a/docs/Reference/Contributed/OLEGuids/OLECADWORD.md b/docs/Reference/Contributed/OLEGuids/OLECADWORD.md new file mode 100644 index 000000000..c19b7972e --- /dev/null +++ b/docs/Reference/Contributed/OLEGuids/OLECADWORD.md @@ -0,0 +1,38 @@ +--- +title: OLECADWORD +parent: OLEGuids Package +permalink: /tB/Packages/Contributed/OLEGuids/OLECADWORD +has_toc: false +--- + +# OLECADWORD type +{: .no_toc } + +A counted array of 32-bit values, with the layout of the Windows `CADWORD` structure. + +**OLECADWORD** is a user-defined type declared in the package's `OLEGuids` module, so both `OLECADWORD` and `OLEGuids.OLECADWORD` name it. It mirrors the Windows structure [CADWORD](https://learn.microsoft.com/en-us/windows/win32/api/ocidl/ns-ocidl-cadword), which holds the number of elements of an array and the address of the array. + +```tb inert=signature +Public Type OLECADWORD + cElems As Long + pElems As LongPtr +End Type +``` + +## Fields + +*cElems* +: A **Long** holding the number of elements in the array. + +*pElems* +: A **LongPtr** holding the address of the array. Each element is a 32-bit `DWORD`, which is a **Long** in twinBASIC. + +## Where it is used + +[**IPerPropertyBrowsing.GetPredefinedStrings**](IPerPropertyBrowsing#getpredefinedstrings) takes it by reference as *pCaCookiesOut* and fills it with a cookie for each of the strings it returns in an [OLECALPOLESTR](OLECALPOLESTR). The cookie at a given position goes with the string at the same position, and is passed to [**GetPredefinedValue**](IPerPropertyBrowsing#getpredefinedvalue). The object allocates the array, and the caller frees it with `CoTaskMemFree`. + +## See Also + +- [OLECALPOLESTR](OLECALPOLESTR) type -- a counted array of Unicode string pointers +- [OLECAUUID](OLECAUUID) type -- a counted array of GUIDs +- [IPerPropertyBrowsing](IPerPropertyBrowsing) interface -- display strings, property pages and predefined values of an object's properties diff --git a/docs/Reference/Contributed/OLEGuids/OLECALPOLESTR.md b/docs/Reference/Contributed/OLEGuids/OLECALPOLESTR.md new file mode 100644 index 000000000..f9dc1b3f1 --- /dev/null +++ b/docs/Reference/Contributed/OLEGuids/OLECALPOLESTR.md @@ -0,0 +1,38 @@ +--- +title: OLECALPOLESTR +parent: OLEGuids Package +permalink: /tB/Packages/Contributed/OLEGuids/OLECALPOLESTR +has_toc: false +--- + +# OLECALPOLESTR type +{: .no_toc } + +A counted array of pointers to Unicode strings, with the layout of the Windows `CALPOLESTR` structure. + +**OLECALPOLESTR** is a user-defined type declared in the package's `OLEGuids` module, so both `OLECALPOLESTR` and `OLEGuids.OLECALPOLESTR` name it. It mirrors the Windows structure [CALPOLESTR](https://learn.microsoft.com/en-us/windows/win32/api/ocidl/ns-ocidl-calpolestr), which holds the number of elements of an array and the address of the array. + +```tb inert=signature +Public Type OLECALPOLESTR + cElems As Long + pElems As LongPtr +End Type +``` + +## Fields + +*cElems* +: A **Long** holding the number of elements in the array. + +*pElems* +: A **LongPtr** holding the address of the array. Each element is a pointer to a null-terminated Unicode string. + +## Where it is used + +[**IPerPropertyBrowsing.GetPredefinedStrings**](IPerPropertyBrowsing#getpredefinedstrings) takes it by reference as *pCaStringsOut* and fills it with the names of the values a property can take. The object allocates the array and each string, and the caller frees them with `CoTaskMemFree`. + +## See Also + +- [OLECADWORD](OLECADWORD) type -- a counted array of **DWORD** values +- [OLECAUUID](OLECAUUID) type -- a counted array of GUIDs +- [IPerPropertyBrowsing](IPerPropertyBrowsing) interface -- display strings, property pages and predefined values of an object's properties diff --git a/docs/Reference/Contributed/OLEGuids/OLECAUUID.md b/docs/Reference/Contributed/OLEGuids/OLECAUUID.md new file mode 100644 index 000000000..dca350878 --- /dev/null +++ b/docs/Reference/Contributed/OLEGuids/OLECAUUID.md @@ -0,0 +1,39 @@ +--- +title: OLECAUUID +parent: OLEGuids Package +permalink: /tB/Packages/Contributed/OLEGuids/OLECAUUID +has_toc: false +--- + +# OLECAUUID type +{: .no_toc } + +A counted array of GUIDs, with the layout of the Windows `CAUUID` structure. + +**OLECAUUID** is a user-defined type declared in the package's `OLEGuids` module, so both `OLECAUUID` and `OLEGuids.OLECAUUID` name it. It mirrors the Windows structure [CAUUID](https://learn.microsoft.com/en-us/windows/win32/api/ocidl/ns-ocidl-cauuid), which holds the number of elements of an array and the address of the array. + +```tb inert=signature +Public Type OLECAUUID + cElems As Long + pElems As LongPtr +End Type +``` + +## Fields + +*cElems* +: A **Long** holding the number of elements in the array. + +*pElems* +: A **LongPtr** holding the address of the array. Each element is a GUID, with the layout of an [OLECLSID](OLECLSID). + +## Where it is used + +[**ISpecifyPropertyPages.GetPages**](ISpecifyPropertyPages#getpages) takes it by reference as *pPages* and fills it with the class identifiers of an object's property pages. The object allocates the array with `CoTaskMemAlloc`, and the caller frees it with `CoTaskMemFree`. + +## See Also + +- [OLECLSID](OLECLSID) type -- a class or interface identifier +- [OLECALPOLESTR](OLECALPOLESTR) type -- a counted array of Unicode string pointers +- [OLECADWORD](OLECADWORD) type -- a counted array of **DWORD** values +- [ISpecifyPropertyPages](ISpecifyPropertyPages) interface -- lists the property pages of an object diff --git a/docs/Reference/Contributed/OLEGuids/OLECLSID.md b/docs/Reference/Contributed/OLEGuids/OLECLSID.md new file mode 100644 index 000000000..7cebf727b --- /dev/null +++ b/docs/Reference/Contributed/OLEGuids/OLECLSID.md @@ -0,0 +1,73 @@ +--- +title: OLECLSID +parent: OLEGuids Package +permalink: /tB/Packages/Contributed/OLEGuids/OLECLSID +has_toc: false +--- + +# OLECLSID type +{: .no_toc } + +A class or interface identifier, with the layout of the Windows `GUID` structure. + +**OLECLSID** is a user-defined type declared in the package's `OLEGuids` module, so both `OLECLSID` and `OLEGuids.OLECLSID` name it. It mirrors the Windows structure [GUID](https://learn.microsoft.com/en-us/windows/win32/api/guiddef/ns-guiddef-guid), which the interface declarations use for a class identifier (CLSID) and for an interface identifier (IID) alike. + +```tb inert=signature +Public Type OLECLSID + Data1 As Long + Data2 As Integer + Data3 As Integer + Data4(0 To 7) As Byte +End Type +``` + +## Fields + +*Data1* +: A **Long** holding the first eight hexadecimal digits of the identifier. The Windows field is unsigned, so a value above `&H7FFFFFFF` appears negative. + +*Data2* +: An **Integer** holding the next four digits. + +*Data3* +: An **Integer** holding the next four digits. + +*Data4* +: An array of eight **Byte** values, indexed from 0 to 7, holding the last sixteen hexadecimal digits, two to a byte. + +For the identifier `00020400-0000-0000-C000-000000000046`, *Data1* is `&H00020400`, *Data2* and *Data3* are 0, and *Data4* holds `&HC0`, 0, 0, 0, 0, 0, 0 and `&H46`. + +An **OLECLSID** variable that is not filled in holds only zeros, which is the null identifier `IID_NULL` that [**IDispatch.GetIDsOfNames**](IDispatch#getidsofnames) and [**IDispatch.Invoke**](IDispatch#invoke) ask for in their *riid* parameter. + +## Where it is used + +- [**IDispatch.GetIDsOfNames**](IDispatch#getidsofnames) and [**IDispatch.Invoke**](IDispatch#invoke) -- *riid*, by reference. +- [**IObjectSafety.GetInterfaceSafetyOptions**](IObjectSafety#getinterfacesafetyoptions) and [**SetInterfaceSafetyOptions**](IObjectSafety#setinterfacesafetyoptions) -- *riid*, by reference. +- [**IPerPropertyBrowsing.MapPropertyToPage**](IPerPropertyBrowsing#mappropertytopage) -- *pCLSID*, by reference. +- [**IRichEditOle.ConvertObject**](IRichEditOle#convertobject) -- *pCLSIDNew*, and [**IRichEditOle.ActivateAs**](IRichEditOle#activateas) -- *pCLSID* and *pCLSIDAs*, by reference. +- [**IRichEditOleCallback.QueryInsertObject**](IRichEditOleCallback#queryinsertobject) -- *pCLSID*, by reference. +- [**IUnknownUnrestricted.QueryInterface**](IUnknownUnrestricted#queryinterface) -- *priid* is the address of the identifier, from [**VarPtr**](../../../Modules/Information/VarPtr). + +## Example + +This procedure asks an object which safety options it supports for the **IDispatch** interface. The identifier `00020400-0000-0000-C000-000000000046` is written into an **OLECLSID** field by field. + +```tb check_build +Private Function DispatchSafetyOptions(ByVal Obj As IObjectSafety) As Long + Dim iid As OLECLSID + iid.Data1 = &H20400 + iid.Data4(0) = &HC0 + iid.Data4(7) = &H46 + + Dim supported As Long + Dim enabled As Long + Obj.GetInterfaceSafetyOptions iid, supported, enabled + Return supported +End Function +``` + +## See Also + +- [IDispatch](IDispatch) interface -- finds and calls members of an automation object +- [IObjectSafety](IObjectSafety) interface -- reports and sets an object's safety options +- [OLECAUUID](OLECAUUID) type -- a counted array of GUIDs diff --git a/docs/Reference/Contributed/OLEGuids/OLECONTROLINFO.md b/docs/Reference/Contributed/OLEGuids/OLECONTROLINFO.md new file mode 100644 index 000000000..404c1582d --- /dev/null +++ b/docs/Reference/Contributed/OLEGuids/OLECONTROLINFO.md @@ -0,0 +1,48 @@ +--- +title: OLECONTROLINFO +parent: OLEGuids Package +permalink: /tB/Packages/Contributed/OLEGuids/OLECONTROLINFO +has_toc: false +--- + +# OLECONTROLINFO type +{: .no_toc } + +The keyboard mnemonic table of an OLE control, with the layout of the Windows `CONTROLINFO` structure. + +**OLECONTROLINFO** is a user-defined type declared in the package's `OLEGuids` module, so both `OLECONTROLINFO` and `OLEGuids.OLECONTROLINFO` name it. It mirrors the Windows structure [CONTROLINFO](https://learn.microsoft.com/en-us/windows/win32/api/ocidl/ns-ocidl-controlinfo). + +```tb inert=signature +Public Type OLECONTROLINFO + cb As Long + hAccel As LongPtr + cAccel As Integer + dwFlags As Long +End Type +``` + +## Fields + +*cb* +: A **Long** holding the size of the structure, in bytes. The caller sets it before the call that fills the structure. + +*hAccel* +: A **LongPtr** holding the handle of an accelerator table that holds the control's mnemonics. + +*cAccel* +: An **Integer** holding the number of entries in the accelerator table. + +*dwFlags* +: A **Long** holding flags that describe the control's keyboard behavior: 1 when the control processes the Enter key in a dialog box (`CTRLINFO_EATS_RETURN`), and 2 when it processes the Esc key (`CTRLINFO_EATS_ESCAPE`). + +## Where it is used + +- [**IOleControl.GetControlInfo**](IOleControl#getcontrolinfo) -- takes it by reference as *pCI*. +- [**IOleControlVB.GetControlInfo**](IOleControlVB#getcontrolinfo) -- takes the three last fields as separate parameters: *AccelCount* for *cAccel*, *AccelTable* for *hAccel* and *Flags* for *dwFlags*. +- [**IOleControlSite.OnControlInfoChanged**](IOleControlSite#oncontrolinfochanged) -- tells the container that the information changed. + +## See Also + +- [IOleControl](IOleControl) interface -- keyboard mnemonics, ambient property changes and event freezing of a control +- [IOleControlVB](IOleControlVB) interface -- Visual Basic-style **GetControlInfo** and **OnMnemonic** +- [OLEACCELMSG](OLEACCELMSG) type -- a window message diff --git a/docs/Reference/Contributed/OLEGuids/OLEINPLACEFRAMEINFO.md b/docs/Reference/Contributed/OLEGuids/OLEINPLACEFRAMEINFO.md new file mode 100644 index 000000000..830b01356 --- /dev/null +++ b/docs/Reference/Contributed/OLEGuids/OLEINPLACEFRAMEINFO.md @@ -0,0 +1,51 @@ +--- +title: OLEINPLACEFRAMEINFO +parent: OLEGuids Package +permalink: /tB/Packages/Contributed/OLEGuids/OLEINPLACEFRAMEINFO +has_toc: false +--- + +# OLEINPLACEFRAMEINFO type +{: .no_toc } + +The accelerator information of a container's frame window in in-place activation, with the layout of the Windows `OLEINPLACEFRAMEINFO` structure. + +**OLEINPLACEFRAMEINFO** is a user-defined type declared in the package's `OLEGuids` module, so both `OLEINPLACEFRAMEINFO` and `OLEGuids.OLEINPLACEFRAMEINFO` name it. It mirrors the Windows structure [OLEINPLACEFRAMEINFO](https://learn.microsoft.com/en-us/windows/win32/api/oleidl/ns-oleidl-oleinplaceframeinfo). + +```tb inert=signature +Public Type OLEINPLACEFRAMEINFO + cb As Long + fMDIApp As Long + hWndFrame As LongPtr + hAccel As LongPtr + cAccelEntries As Long +End Type +``` + +## Fields + +*cb* +: A **Long** holding the size of the structure, in bytes. + +*fMDIApp* +: A **Long** that is not 0 when the container is a multiple-document interface (MDI) application, and 0 when it is not. + +*hWndFrame* +: A **LongPtr** holding the handle of the container's top-level frame window. + +*hAccel* +: A **LongPtr** holding the handle of the accelerator table that the container uses in its frame. + +*cAccelEntries* +: A **Long** holding the number of entries in that table. + +## Where it is used + +- [**IRichEditOleCallback.GetInPlaceContext**](IRichEditOleCallback#getinplacecontext) -- takes it by reference as *pFrameInfo*. +- [**IOleInPlaceSite.GetWindowContext**](IOleInPlaceSite#getwindowcontext) -- takes a pointer to it as *lpFrameInfo*, declared as a **LongPtr**: pass the address of an **OLEINPLACEFRAMEINFO** variable with [**VarPtr**](../../../Modules/Information/VarPtr). + +## See Also + +- [IOleInPlaceSite](IOleInPlaceSite) interface -- the container-side site for in-place activation +- [IRichEditOleCallback](IRichEditOleCallback) interface -- what a Rich Edit control asks its container +- [IOleInPlaceFrame](IOleInPlaceFrame) interface -- stub for the container's frame window diff --git a/docs/Reference/Contributed/OLEGuids/OLEPOINT.md b/docs/Reference/Contributed/OLEGuids/OLEPOINT.md new file mode 100644 index 000000000..c58580018 --- /dev/null +++ b/docs/Reference/Contributed/OLEGuids/OLEPOINT.md @@ -0,0 +1,38 @@ +--- +title: OLEPOINT +parent: OLEGuids Package +permalink: /tB/Packages/Contributed/OLEGuids/OLEPOINT +has_toc: false +--- + +# OLEPOINT type +{: .no_toc } + +A point, with the layout of the Windows `POINT` structure. + +**OLEPOINT** is a user-defined type declared in the package's `OLEGuids` module, so both `OLEPOINT` and `OLEGuids.OLEPOINT` name it. It mirrors the Windows structure [POINT](https://learn.microsoft.com/en-us/windows/win32/api/windef/ns-windef-point). + +```tb inert=signature +Public Type OLEPOINT + X As Long + Y As Long +End Type +``` + +## Fields + +*X* +: A **Long** holding the x coordinate. + +*Y* +: A **Long** holding the y coordinate. + +## Where it is used + +It is the type of the *PT* field of [OLEACCELMSG](OLEACCELMSG). No method of the package takes an **OLEPOINT** by name. [**IOleControlSite.TransformCoords**](IOleControlSite#transformcoords) takes a pointer to a `POINTL` structure, which has the same two **Long** fields, so the address of an **OLEPOINT** variable fits its *pPtlHimetric* parameter. + +## See Also + +- [OLEACCELMSG](OLEACCELMSG) type -- a window message +- [OLERECT](OLERECT) type -- a rectangle +- [OLESIZE](OLESIZE) type -- a width and a height diff --git a/docs/Reference/Contributed/OLEGuids/OLERECT.md b/docs/Reference/Contributed/OLEGuids/OLERECT.md new file mode 100644 index 000000000..ee2bf7ea1 --- /dev/null +++ b/docs/Reference/Contributed/OLEGuids/OLERECT.md @@ -0,0 +1,67 @@ +--- +title: OLERECT +parent: OLEGuids Package +permalink: /tB/Packages/Contributed/OLEGuids/OLERECT +has_toc: false +--- + +# OLERECT type +{: .no_toc } + +A rectangle, with the layout of the Windows `RECT` structure. + +**OLERECT** is a user-defined type declared in the package's `OLEGuids` module, so both `OLERECT` and `OLEGuids.OLERECT` name it. It mirrors the Windows structure [RECT](https://learn.microsoft.com/en-us/windows/win32/api/windef/ns-windef-rect), which holds the coordinates of the upper-left and lower-right corners of a rectangle. + +```tb inert=signature +Public Type OLERECT + Left As Long + Top As Long + Right As Long + Bottom As Long +End Type +``` + +## Fields + +*Left* +: A **Long** holding the x coordinate of the upper-left corner. + +*Top* +: A **Long** holding the y coordinate of the upper-left corner. + +*Right* +: A **Long** holding the x coordinate of the lower-right corner. + +*Bottom* +: A **Long** holding the y coordinate of the lower-right corner. + +## Where it is used + +No method of the package takes an **OLERECT** by name. The methods that take a `RECT*` declare the parameter as a **LongPtr**, and the address of an **OLERECT** variable, from [**VarPtr**](../../../Modules/Information/VarPtr), fits it: + +- [**IOleObject.DoVerb**](IOleObject#doverb) -- *lprcPosRect* +- [**IOleInPlaceObject.SetObjectRects**](IOleInPlaceObject#setobjectrects) -- *lprcPosRect* and *lprcClipRect* +- [**IOleInPlaceActiveObject.ResizeBorder**](IOleInPlaceActiveObject#resizeborder) -- *prcBorder* +- [**IOleInPlaceUIWindow.GetBorder**](IOleInPlaceUIWindow#getborder) -- *lpRectBorder* +- [**IOleInPlaceUIWindow.RequestBorderSpace**](IOleInPlaceUIWindow#requestborderspace) and [**SetBorderSpace**](IOleInPlaceUIWindow#setborderspace) -- *pBorderWidths*, a `RECT` that holds four widths +- [**IOleInPlaceSite.GetWindowContext**](IOleInPlaceSite#getwindowcontext) -- *lprcPosRect* and *lprcClipRect* +- [**IOleInPlaceSite.OnPosRectChange**](IOleInPlaceSite#onposrectchange) -- *lprcPosRect* + +## Example + +This function asks a frame or document window for its border rectangle and returns the width of the rectangle. + +```tb check_build +Private Function BorderWidth(ByVal Window As IOleInPlaceUIWindow) As Long + Dim border As OLERECT + Window.GetBorder VarPtr(border) + Return border.Right - border.Left +End Function +``` + +## See Also + +- [OLEPOINT](OLEPOINT) type -- a point +- [OLESIZE](OLESIZE) type -- a width and a height +- [IOleInPlaceObject](IOleInPlaceObject) interface -- activates and deactivates an object in place +- [IOleInPlaceUIWindow](IOleInPlaceUIWindow) interface -- border space in a frame or document window diff --git a/docs/Reference/Contributed/OLEGuids/OLESIZE.md b/docs/Reference/Contributed/OLEGuids/OLESIZE.md new file mode 100644 index 000000000..8f9e56bbf --- /dev/null +++ b/docs/Reference/Contributed/OLEGuids/OLESIZE.md @@ -0,0 +1,37 @@ +--- +title: OLESIZE +parent: OLEGuids Package +permalink: /tB/Packages/Contributed/OLEGuids/OLESIZE +has_toc: false +--- + +# OLESIZE type +{: .no_toc } + +A width and a height, with the layout of the Windows `SIZE` structure. + +**OLESIZE** is a user-defined type declared in the package's `OLEGuids` module, so both `OLESIZE` and `OLEGuids.OLESIZE` name it. It mirrors the Windows structure [SIZE](https://learn.microsoft.com/en-us/windows/win32/api/windef/ns-windef-size). + +```tb inert=signature +Public Type OLESIZE + CX As Long + CY As Long +End Type +``` + +## Fields + +*CX* +: A **Long** holding the width. + +*CY* +: A **Long** holding the height. + +## Where it is used + +No method of the package takes an **OLESIZE**. [**IOleInPlaceSite.Scroll**](IOleInPlaceSite#scroll) takes a `SIZE` by value, and declares the parameter as a **Currency**, which is the same eight bytes. + +## See Also + +- [OLEPOINT](OLEPOINT) type -- a point +- [OLERECT](OLERECT) type -- a rectangle diff --git a/docs/Reference/Contributed/OLEGuids/index.md b/docs/Reference/Contributed/OLEGuids/index.md new file mode 100644 index 000000000..7a94f147c --- /dev/null +++ b/docs/Reference/Contributed/OLEGuids/index.md @@ -0,0 +1,95 @@ +--- +title: OLEGuids Package +parent: Contributed Packages +has_toc: false +indexed_from: 1.0.2.0 +permalink: /tB/Packages/Contributed/OLEGuids/ +--- + +# OLEGuids Package +{: .no_toc } + +**Author:** Krool. **On GitHub:** [Kr00l/VBCCR](https://github.com/Kr00l/VBCCR/tree/master/twinBASIC%20Package/OLEGuids), in the folder *twinBASIC Package/OLEGuids*. + +A twinBASIC package that declares 23 OLE and COM interfaces and 10 structures in twinBASIC source, so that a 32-bit or 64-bit project can call or implement them without a type library. + +The package is a twinBASIC implementation of `OLEGuids.tlb`, the type library of OLE interface and type definitions that Krool's VBCCR and VBFLXGRD controls (`VBCCRxx.OCX` and `VBFLXGRDxx.OCX`) use. It replaces `OLEGuids.tlb` in projects that build 64-bit programs, and works in 32-bit projects as well. This section documents version 1.0.2.0, published under the MIT licence. + +## Using the package + +Add the package in Project → References (Ctrl-T) → Available Packages. The interfaces and structures are then visible to the whole project. Two things can be done with an interface: + +- **Call it.** Declare a variable of the interface type and assign an object to it. The assignment asks the object for that interface, and a call through the variable runs the object's method. +- **Implement it.** Name it in an [**Implements**](../../../Core/Implements) statement in a class, and write each method. A class cannot implement an interface that has a `[PreserveSig]` member (see [How the declarations differ from Windows](#how-the-declarations-differ-from-windows)). + +A name can be written bare (`IOleWindow`, `OLERECT`) or qualified with the package name (`OLEGuids.IOleWindow`, `OLEGuids.OLERECT`). The ten structures are declared in a module named `OLEGuids`, which is why the qualified form works for them; the module has no page of its own. + +```tb check_build +Private Function InPlaceWindow(ByVal Obj As Object) As LongPtr + Dim w As IOleWindow = Obj + Return w.GetWindow() +End Function +``` + +> [!NOTE] +> In a project that references **stdole**, as every default project does, the bare name `IDispatch` is **stdole**'s declaration. A call through it is late-bound by name, and its four methods are not reached (see [IDispatch](../../../../Reference/COM-Interfaces/IDispatch#the-stdole-declaration)). The package's own declaration needs the qualified name, **OLEGuids.IDispatch**. + +```tb check_build +Private Function HasTypeInfo(ByVal Obj As Object) As Boolean + Dim d As OLEGuids.IDispatch = Obj + Dim count As Long + d.GetTypeInfoCount count + Return count > 0 +End Function +``` + +## How the declarations differ from Windows + +The interfaces that exist in Windows have their original interface identifiers, so an object written in another language can be called through them. The declarations differ from the C headers in these ways: + +- **The HRESULT is hidden.** A **Sub**, and a **Function** that is not marked `[PreserveSig]`, returns nothing of the Windows method's HRESULT. A failure code raises a run-time error, and a success code other than `S_OK` is read with [**Err.LastHresult**](../../../Modules/ErrObject/LastHresult). Where the Windows method has an output parameter for its result, the **Function**'s result takes its place. +- **`[PreserveSig]` members return the raw HRESULT** as a **Long**. A twinBASIC class cannot implement a member marked [**[PreserveSig]**](../../../Core/Attributes#preservesig): the compiler reports TB5004, *unable to match this implementation to its interface member*. The interfaces with such a member are for calling, not for implementing: [IUnknownUnrestricted](IUnknownUnrestricted), [IOleObject](IOleObject), [IOleControl](IOleControl), [IOleControlSite](IOleControlSite), [IOleInPlaceActiveObject](IOleInPlaceActiveObject), [IOleInPlaceSite](IOleInPlaceSite), [IPerPropertyBrowsing](IPerPropertyBrowsing) and [IRichEditOle](IRichEditOle). A class sets [**Err.ReturnHResult**](../../../Modules/ErrObject/ReturnHResult) to return a specific HRESULT from a **Sub** it implements. +- **Pointers are `LongPtr`.** A parameter that is a pointer to a structure or to an interface the package does not declare (a `RECT*`, a `MSG*`, an `IMoniker*`) is a **LongPtr**. Pass the address of a variable with [**VarPtr**](../../../Modules/Information/VarPtr), or `StrPtr` for a string. +- **Some declarations are partial.** [IOleObject](IOleObject) declares the first nine of the 21 methods of the Windows interface. The four stub interfaces --- [IOleClientSite](IOleClientSite), [IOleInPlaceFrame](IOleInPlaceFrame), [IStorage](IStorage) and [IDataObject](IDataObject) --- declare no methods; their description says to use the tbShellLib package for the full version. A stub is useful for naming the type of a parameter or a variable, not for calling. +- **Five declarations are variants of a Windows interface.** [IUnknownUnrestricted](IUnknownUnrestricted) has no base interface, which makes the three methods of **IUnknown** callable. [IEnumVARIANTUnrestricted](IEnumVARIANTUnrestricted) declares the **IEnumVARIANT** enumerator with **Long** counts. [IOleInPlaceActiveObjectVB](IOleInPlaceActiveObjectVB), [IOleControlVB](IOleControlVB) and [IPerPropertyBrowsingVB](IPerPropertyBrowsingVB) are not Windows interfaces: they have Visual Basic-style signatures that a class can implement. + +Every interface except the three `VB` variants is declared `[OleAutomation(False)]`, so it is not marked as an Automation interface. The contract of each method is that of the Windows interface, which Microsoft Learn documents; each interface page links to it. + +## Interfaces + +- [IDataObject](IDataObject) -- stub for the interface that transfers data between applications +- [IDispatch](IDispatch) -- finds and calls members of an automation object by name or dispatch identifier +- [IEnumVARIANTUnrestricted](IEnumVARIANTUnrestricted) -- enumerator of **Variant** values with **Long** counts +- [IObjectSafety](IObjectSafety) -- reports and sets an object's safety options for untrusted callers and data +- [IOleClientSite](IOleClientSite) -- stub for the container-side site of an embedded object +- [IOleControl](IOleControl) -- keyboard mnemonics, ambient property changes and event freezing of a control +- [IOleControlSite](IOleControlSite) -- the container-side site of a control +- [IOleControlVB](IOleControlVB) -- Visual Basic-style **GetControlInfo** and **OnMnemonic** +- [IOleInPlaceActiveObject](IOleInPlaceActiveObject) -- messages, activation and border changes for an in-place active object +- [IOleInPlaceActiveObjectVB](IOleInPlaceActiveObjectVB) -- Visual Basic-style **TranslateAccelerator** +- [IOleInPlaceFrame](IOleInPlaceFrame) -- stub for the container's frame window in in-place activation +- [IOleInPlaceObject](IOleInPlaceObject) -- activates and deactivates an object in place +- [IOleInPlaceSite](IOleInPlaceSite) -- the container-side site for in-place activation +- [IOleInPlaceUIWindow](IOleInPlaceUIWindow) -- border space in a frame or document window +- [IOleObject](IOleObject) -- connects an embedded object to its site and performs its verbs +- [IOleWindow](IOleWindow) -- returns the window handle of an OLE object +- [IPerPropertyBrowsing](IPerPropertyBrowsing) -- display strings, property pages and predefined values of an object's properties +- [IPerPropertyBrowsingVB](IPerPropertyBrowsingVB) -- Visual Basic-style versions of three **IPerPropertyBrowsing** methods +- [IRichEditOle](IRichEditOle) -- the OLE objects in a Rich Edit control +- [IRichEditOleCallback](IRichEditOleCallback) -- what a Rich Edit control asks its container +- [ISpecifyPropertyPages](ISpecifyPropertyPages) -- lists the property pages of an object +- [IStorage](IStorage) -- stub for the structured-storage interface +- [IUnknownUnrestricted](IUnknownUnrestricted) -- the three methods of **IUnknown**, callable + +## Types + +- [OLEACCELMSG](OLEACCELMSG) -- a window message, with the layout of the Windows **MSG** structure +- [OLECADWORD](OLECADWORD) -- a counted array of **DWORD** values +- [OLECALPOLESTR](OLECALPOLESTR) -- a counted array of Unicode string pointers +- [OLECAUUID](OLECAUUID) -- a counted array of GUIDs +- [OLECLSID](OLECLSID) -- a class or interface identifier, with the layout of the Windows **GUID** structure +- [OLECONTROLINFO](OLECONTROLINFO) -- the keyboard mnemonic table of a control +- [OLEINPLACEFRAMEINFO](OLEINPLACEFRAMEINFO) -- accelerator information of an in-place frame +- [OLEPOINT](OLEPOINT) -- a point, with the layout of the Windows **POINT** structure +- [OLERECT](OLERECT) -- a rectangle, with the layout of the Windows **RECT** structure +- [OLESIZE](OLESIZE) -- a width and a height, with the layout of the Windows **SIZE** structure diff --git a/docs/Reference/Contributed/TBMANLIB_ListBoxHScroll/cListboxHScroll/Show.md b/docs/Reference/Contributed/TBMANLIB_ListBoxHScroll/cListboxHScroll/Show.md new file mode 100644 index 000000000..40b2a46c8 --- /dev/null +++ b/docs/Reference/Contributed/TBMANLIB_ListBoxHScroll/cListboxHScroll/Show.md @@ -0,0 +1,53 @@ +--- +title: Show +parent: cListboxHScroll +permalink: /tB/Packages/Contributed/TBMANLIB_ListBoxHScroll/cListboxHScroll/Show +has_toc: false +--- +# Show +{: .no_toc } + +Attaches the horizontal scroll bar to a **ListBox** control and initialises scroll handling. + +Syntax: *object*.**Show** *ListBoxInst* + +*ListBoxInst* +: *required* An object expression that evaluates to a **ListBox** control. The class assigns it to a **ListBox** variable, so an object of another type causes a run-time error. The class holds this reference for the lifetime of the object; [**UnShow**](UnShow) does not release it. + +**Show** performs three actions in sequence: + +1. Calls the Win32 `ShowScrollBar` API to make the horizontal scroll bar visible on *ListBoxInst*. +2. Iterates every item in the list, measures each item's pixel width using the GDI `GetTextExtentPoint32` API with the control's own font, then sets the horizontal scrollable extent via the `LB_SETHORIZONTALEXTENT` message and the scroll range and page size via `SetScrollInfo`. A 10-pixel margin is added to the widest item. When the list is empty, or every item is empty, the extent and the scroll range are not set. +3. Installs a window subclass (`SetWindowSubclass` from `comctl32`) on the control's `hWnd` to intercept `WM_HSCROLL` messages. The subclass procedure updates the scroll bar position with `SetScrollInfo` and then passes each message on to `DefSubclassProc`. + +After **Show** returns, the **ListBox** scrolls horizontally when any item is wider than the visible area. + +> [!IMPORTANT] +> **Show** must be called after the **ListBox** has been populated. If items are added or removed after the call, the horizontal extent is not updated automatically. Call **Show** again on the same control to recalculate the extent for the updated item list. + +> [!NOTE] +> The subclass installed by **Show** is removed automatically when the class instance is destroyed (`Class_Terminate`). It can also be removed explicitly by calling [**UnShow**](UnShow). + +### Example + +This example attaches a horizontal scroll bar to a **ListBox** named `List1` after filling it with items. + +```tb check_build +Private hScroll As New cListboxHScroll + +Private Sub Form_Load() + List1.AddItem "Short item" + List1.AddItem "A much longer item that exceeds the visible width of the list box" + List1.AddItem "Another moderately long entry" + + hScroll.Show List1 +End Sub + +Private Sub Form_Unload(Cancel As Integer) + hScroll.UnShow +End Sub +``` + +### See Also + +- [UnShow](UnShow) method diff --git a/docs/Reference/Contributed/TBMANLIB_ListBoxHScroll/cListboxHScroll/UnShow.md b/docs/Reference/Contributed/TBMANLIB_ListBoxHScroll/cListboxHScroll/UnShow.md new file mode 100644 index 000000000..a56d3f374 --- /dev/null +++ b/docs/Reference/Contributed/TBMANLIB_ListBoxHScroll/cListboxHScroll/UnShow.md @@ -0,0 +1,44 @@ +--- +title: UnShow +parent: cListboxHScroll +permalink: /tB/Packages/Contributed/TBMANLIB_ListBoxHScroll/cListboxHScroll/UnShow +has_toc: false +--- +# UnShow +{: .no_toc } + +Removes the window subclass installed by [**Show**](Show). + +Syntax: *object*.**UnShow** + +*object* +: *required* An object expression that evaluates to a **cListboxHScroll** instance. + +**UnShow** calls `RemoveWindowSubclass` (comctl32) to detach the scroll message handler that was installed by **Show**. After this call, the **ListBox** control associated with the instance no longer receives the subclassed `WM_HSCROLL` processing added by the class. + +> [!NOTE] +> **UnShow** does not hide the horizontal scrollbar itself, and does not reset the horizontal extent or release the **ListBox** reference---it removes only the subclass procedure. Call `ShowScrollBar` directly with `SB_HORZ` and `0` if the scrollbar must also be hidden. + +> [!IMPORTANT] +> The class destructor (`Class_Terminate`) calls the internal `RemoveListBoxSubclass` helper automatically, so **UnShow** need only be called explicitly when the subclass must be removed before the **cListboxHScroll** instance goes out of scope. + +### Example + +This example adds a horizontal scrollbar to a ListBox on a form, then removes it when a button is clicked. + +```tb check_build +Private HScroll As cListboxHScroll + +Private Sub Form_Load() + Set HScroll = New cListboxHScroll + HScroll.Show List1 +End Sub + +Private Sub cmdRemove_Click() + HScroll.UnShow +End Sub +``` + +### See Also + +- [Show](Show) method diff --git a/docs/Reference/Contributed/TBMANLIB_ListBoxHScroll/cListboxHScroll/index.md b/docs/Reference/Contributed/TBMANLIB_ListBoxHScroll/cListboxHScroll/index.md new file mode 100644 index 000000000..106f0f36c --- /dev/null +++ b/docs/Reference/Contributed/TBMANLIB_ListBoxHScroll/cListboxHScroll/index.md @@ -0,0 +1,99 @@ +--- +title: cListboxHScroll +parent: TBMANLIB_ListBoxHScroll Package +permalink: /tB/Packages/Contributed/TBMANLIB_ListBoxHScroll/cListboxHScroll/ +has_toc: false +--- + +# cListboxHScroll class +{: .no_toc } + +A helper class that adds a functional horizontal scrollbar to a standard VB **ListBox** control by combining the `LB_SETHORIZONTALEXTENT` message, Win32 scroll-info APIs, and window subclassing. + +The class measures the pixel width of each list item using GDI's `GetTextExtentPoint32W`, sets the scroll range to fit the widest item, and installs a subclass procedure to intercept `WM_HSCROLL` messages so the scrollbar thumb tracks correctly. Call [**Show**](#show) after populating the list and [**UnShow**](#unshow) (or allow the class instance to be destroyed) when the scroll handling is no longer needed. + +```tb check_build +Private HScroll As New cListboxHScroll + +Private Sub Form_Load() + List1.AddItem "A short item" + List1.AddItem "A much longer item that overflows the default width" + HScroll.Show List1 +End Sub + +Private Sub Form_Unload(Cancel As Integer) + HScroll.UnShow +End Sub +``` + +* TOC +{:toc} + +## Methods + +### Show +{: .no_toc } + +Activates horizontal scrolling on a **ListBox** control. + +Syntax: *object*.**Show** *ListBoxInst* + +*ListBoxInst* +: *required* An **Object** reference to the **ListBox** control to instrument. The class assigns it to a **ListBox** variable, so an object of another type causes a run-time error. The control must already have its items populated; **Show** measures the text width of every item at call time to compute the scroll range. + +**Show** performs three operations in sequence: + +1. Calls the Win32 `ShowScrollBar` API to make the horizontal scrollbar visible. +2. Iterates every list item, measures its pixel width using the GDI device context of the control, and sends `LB_SETHORIZONTALEXTENT` with the widest measurement plus a 10-pixel margin. It also calls `SetScrollInfo` to set the scroll range and page size so the scrollbar thumb reflects the visible proportion of the content. When the list is empty, or every item is empty, neither is set. +3. Installs a window subclass procedure via `SetWindowSubclass` (comctl32) to intercept `WM_HSCROLL` messages. The subclass updates the scroll position on line-left / line-right (20 px per step), page-left / page-right, thumb-track / thumb-position, and left / right scrolls, then passes the message to `DefSubclassProc`. + +The scroll range is calculated from the widest item's pixel width measured with the font that the control reports through `WM_GETFONT`, so a **ListBox** that uses a non-default font is measured with that font. + +> [!NOTE] +> **Show** measures item widths at the moment it is called. If items are added or removed after **Show**, the scroll range is not updated automatically. Call **Show** again after bulk changes to refresh the extent. + +> [!IMPORTANT] +> The control's **hWnd** must be valid (the form must be loaded and the control fully created) before calling **Show**. Calling **Show** before the control's window exists returns silently without installing any scrolling behavior. + +### UnShow +{: .no_toc } + +Removes the window subclass installed by [**Show**](#show). + +Syntax: *object*.**UnShow** + +Calls `RemoveWindowSubclass` to detach the `WM_HSCROLL` handler. After **UnShow** the **ListBox** no longer receives the class's `WM_HSCROLL` handling. The scroll bar and the horizontal extent set by **Show** are not reset; send the `LB_SETHORIZONTALEXTENT` message with a width of 0 to the control, and hide the bar with `ShowScrollBar`, if clearing them is required. + +`Class_Terminate` removes the subclass with the same internal helper, so the subclass is removed when the **cListboxHScroll** instance is destroyed. + +## Example + +This example attaches a horizontal scrollbar to a **ListBox** and removes it when the form closes. + +```tb check_build +Private HScroll As cListboxHScroll + +Private Sub Form_Load() + Set HScroll = New cListboxHScroll + + List1.AddItem "Alpha" + List1.AddItem "Beta -- a much longer entry that would normally be clipped" + List1.AddItem "Gamma" + + HScroll.Show List1 +End Sub + +Private Sub Form_Unload(Cancel As Integer) + HScroll.UnShow +End Sub +``` + +## Remarks + +**cListboxHScroll** uses window subclassing via the comctl32 `SetWindowSubclass` / `RemoveWindowSubclass` / `DefSubclassProc` API family. The subclass is identified by the constant ID `1` in every instance, so use one instance per **ListBox**. + +The class stores the **ListBox** reference in a class-level variable (`Ctl`). Replacing the control by calling **Show** with a different **ListBox** does not automatically remove the subclass from the first control; call **UnShow** before switching targets. + +## See Also + +- [TBMANLIB_ListBoxHScroll](../) package -- overview and installation diff --git a/docs/Reference/Contributed/TBMANLIB_ListBoxHScroll/index.md b/docs/Reference/Contributed/TBMANLIB_ListBoxHScroll/index.md new file mode 100644 index 000000000..ccaa237e2 --- /dev/null +++ b/docs/Reference/Contributed/TBMANLIB_ListBoxHScroll/index.md @@ -0,0 +1,20 @@ +--- +title: TBMANLIB_ListBoxHScroll Package +parent: Contributed Packages +has_toc: false +indexed_from: 1.0.0.0 +permalink: /tB/Packages/Contributed/TBMANLIB_ListBoxHScroll/ +--- + +# TBMANLIB_ListBoxHScroll Package +{: .no_toc } + +**Author:** woeoio + +The **TBMANLIB_ListBoxHScroll** contributed package provides a helper class that adds a functional horizontal scrollbar to a standard VB **ListBox** control by combining the `LB_SETHORIZONTALEXTENT` message, Win32 scroll-info APIs, and window subclassing. + +## Classes + +- [cListboxHScroll](cListboxHScroll/) -- a helper class that adds a functional horizontal scrollbar to a standard VB ListBox control using GDI text measurement, `LB_SETHORIZONTALEXTENT`, and window subclassing + - [Show](cListboxHScroll/Show) -- attaches the horizontal scrollbar to a ListBox control and initialises scroll handling + - [UnShow](cListboxHScroll/UnShow) -- removes the window subclass installed by Show diff --git a/docs/Reference/Contributed/TBMANLIB_RES/Base64Prefix.md b/docs/Reference/Contributed/TBMANLIB_RES/Base64Prefix.md new file mode 100644 index 000000000..5dd158457 --- /dev/null +++ b/docs/Reference/Contributed/TBMANLIB_RES/Base64Prefix.md @@ -0,0 +1,32 @@ +--- +title: Base64Prefix +parent: TBMANLIB_RES Package +permalink: /tB/Packages/Contributed/TBMANLIB_RES/Base64Prefix +has_toc: false +--- +# Base64Prefix +{: .no_toc } + +Specifies whether, and with what MIME type, a data URI prefix is prepended to the base64 string returned by [**ReturnBase64**](cRes/#returnbase64). + +| Constant | Value | Description | +|----------|-------|-------------| +| **Base64Prefix_None**{: #Base64Prefix_None } | 0 | No prefix. The returned string is raw base64 with no leading data URI scheme. | +| **Base64Prefix_ImagePNG**{: #Base64Prefix_ImagePNG } | 1 | Prepends `data:image/png;base64,`. | +| **Base64Prefix_ImageJPEG**{: #Base64Prefix_ImageJPEG } | 2 | Prepends `data:image/jpeg;base64,`. | +| **Base64Prefix_ImageGIF**{: #Base64Prefix_ImageGIF } | 3 | Prepends `data:image/gif;base64,`. | +| **Base64Prefix_ImageBMP**{: #Base64Prefix_ImageBMP } | 4 | Prepends `data:image/bmp;base64,`. | +| **Base64Prefix_ImageICO**{: #Base64Prefix_ImageICO } | 5 | Prepends `data:image/x-icon;base64,`. | +| **Base64Prefix_ImageWebP**{: #Base64Prefix_ImageWebP } | 6 | Prepends `data:image/webp;base64,`. | +| **Base64Prefix_VideoMP4**{: #Base64Prefix_VideoMP4 } | 7 | Prepends `data:video/mp4;base64,`. | +| **Base64Prefix_VideoWebM**{: #Base64Prefix_VideoWebM } | 8 | Prepends `data:video/webm;base64,`. | +| **Base64Prefix_VideoOGG**{: #Base64Prefix_VideoOGG } | 9 | Prepends `data:video/ogg;base64,`. | +| **Base64Prefix_AudioMP3**{: #Base64Prefix_AudioMP3 } | 10 | Prepends `data:audio/mpeg;base64,`. | +| **Base64Prefix_AudioWAV**{: #Base64Prefix_AudioWAV } | 11 | Prepends `data:audio/wav;base64,`. | +| **Base64Prefix_AudioOGG**{: #Base64Prefix_AudioOGG } | 12 | Prepends `data:audio/ogg;base64,`. | + +The default value used by **ReturnBase64** when *Prefix* is omitted is **Base64Prefix_None**. + +### See Also + +- [cRes](cRes/) class -- loads and converts embedded resources diff --git a/docs/Reference/Contributed/TBMANLIB_RES/TBMAN.md b/docs/Reference/Contributed/TBMANLIB_RES/TBMAN.md new file mode 100644 index 000000000..3106597cf --- /dev/null +++ b/docs/Reference/Contributed/TBMANLIB_RES/TBMAN.md @@ -0,0 +1,41 @@ +--- +title: TBMAN +parent: TBMANLIB_RES Package +permalink: /tB/Packages/Contributed/TBMANLIB_RES/TBMAN +has_toc: false +--- + +# TBMAN module +{: .no_toc } + +A standard module that exposes a pre-instantiated [**cRes**](cRes/) object as a public variable, providing package-wide access to resource loading without requiring a separate **cRes** instance. + +## Members + +### Res + +A pre-instantiated **cRes** object. + +```tb check_build +Public Res As New cRes +``` + +Because of **As New**, the instance is created automatically the first time **Res** is referenced. It provides the same interface as a manually constructed **cRes** instance: [**Read**](cRes/Read), [**ReturnBytes**](cRes/ReturnBytes), [**ReturnString**](cRes/ReturnString), [**ReturnHex**](cRes/ReturnHex), [**ReturnBase64**](cRes/ReturnBase64), and [**ReturnPicture**](cRes/ReturnPicture). + +> [!NOTE] +> **TBMAN.Res** is a single shared instance for the entire project. Calling **Res.Read** replaces its internal byte buffer. If multiple callers read different resources in the same execution path, use separate **cRes** instances rather than sharing **TBMAN.Res**. + +## Example + +This example loads a PNG resource and assigns it to a **PictureBox** control. + +```tb check_build +Private Sub Form_Load() + Picture1.Picture = TBMAN.Res.Read(101, "PNG").ReturnPicture() +End Sub +``` + +## See Also + +- [cRes](cRes/) class -- loads and converts binary resources embedded in the project +- [TBMANLIB_RES](.) package -- overview diff --git a/docs/Reference/Contributed/TBMANLIB_RES/cRes/Read.md b/docs/Reference/Contributed/TBMANLIB_RES/cRes/Read.md new file mode 100644 index 000000000..b96d6d3eb --- /dev/null +++ b/docs/Reference/Contributed/TBMANLIB_RES/cRes/Read.md @@ -0,0 +1,52 @@ +--- +title: Read +parent: cRes +permalink: /tB/Packages/Contributed/TBMANLIB_RES/cRes/Read +has_toc: false +--- +# Read +{: .no_toc } + +Loads a resource from the compiled executable into the **cRes** instance. + +Syntax: *object*.**Read**( *id*, *Type* ) **As cRes** + +*id* +: *required* A **Variant** identifying the resource to load. Pass a numeric **Long** to identify the resource by its integer ID, or a **String** to identify it by name. + +*Type* +: *required* A **Variant** identifying the resource type. Pass a numeric **Long** for a predefined resource type (for example, `2` for `RT_BITMAP`), or a **String** for a named custom resource type (for example, `"CUSTOM"`). + +**Read** calls the **LoadResData** function with the supplied *id* and *Type* arguments and stores the resulting byte array internally. The method returns the **cRes** instance itself, so calls to the retrieval methods ([**ReturnBytes**](ReturnBytes), [**ReturnString**](ReturnString), [**ReturnHex**](ReturnHex), [**ReturnBase64**](ReturnBase64), [**ReturnPicture**](ReturnPicture)) can be chained directly onto the **Read** call. + +> [!IMPORTANT] +> **Read** must be called before any retrieval method. The resource data is not populated at construction time; a retrieval method called without a prior **Read** will operate on an empty byte array and may raise a runtime error. + +> [!NOTE] +> **Read** can load only a resource that is part of the project. *Type* names a folder under **Resources** in the Project Explorer (or is the number of a standard resource type), and *id* identifies a resource in it. If no resource matches, **LoadResData** raises a run-time error. + +### Example + +This example loads a custom binary resource by name and retrieves it as a byte array, then loads an image resource by integer ID and assigns it to a **PictureBox**. + +```tb check_build +Private Sub Form_Load() + ' Load a named custom resource and retrieve the raw bytes. + Dim res As New cRes + res.Read "CONFIG_DATA", "CUSTOM" + Dim data() As Byte + data = res.ReturnBytes() + + ' Load an image stored as a PNG resource by integer ID and display it. + Dim imgRes As New cRes + Picture1.Picture = imgRes.Read(101, "PNG").ReturnPicture() +End Sub +``` + +### See Also + +- [ReturnBytes](ReturnBytes) method +- [ReturnString](ReturnString) method +- [ReturnHex](ReturnHex) method +- [ReturnBase64](ReturnBase64) method +- [ReturnPicture](ReturnPicture) method diff --git a/docs/Reference/Contributed/TBMANLIB_RES/cRes/ReturnBase64.md b/docs/Reference/Contributed/TBMANLIB_RES/cRes/ReturnBase64.md new file mode 100644 index 000000000..486bb3132 --- /dev/null +++ b/docs/Reference/Contributed/TBMANLIB_RES/cRes/ReturnBase64.md @@ -0,0 +1,68 @@ +--- +title: ReturnBase64 +parent: cRes +permalink: /tB/Packages/Contributed/TBMANLIB_RES/cRes/ReturnBase64 +has_toc: false +--- +# ReturnBase64 +{: .no_toc } + +Returns the resource bytes as a Base64-encoded string, with an optional MIME-type data-URI prefix. + +Syntax: *object*.**ReturnBase64** ( [ *Prefix* ] ) **As String** + +*Prefix* +: *optional* A **Base64Prefix** enumeration value that selects a data-URI prefix to prepend to the encoded string. Defaults to **Base64Prefix_None**, which returns the raw Base64 string with no prefix. + +**ReturnBase64** encodes the byte array held by the **cRes** instance using MSXML2's `bin.base64` data type and returns the result as a **String**. MSXML puts a line feed (`vbLf`) after every 72 characters of Base64, and **ReturnBase64** does not remove them. When *Prefix* is any value other than **Base64Prefix_None**, the corresponding `data:;base64,` header is prepended, producing a data URI that can be used in an ``, `,] +``` + +Places the pages the last report asks for. For each package of +`report.json` (or each one named), `lib/draft-plan.mjs` reads the section's +pages and the package's `api.json` and decides, for each task: + +- **the file**, as most of the section's pages of the same kind are. A new type + goes in the folder that keeps most types of its kind (a control, a class + marked `[WindowsControl]` or `[CustomControl]`, counts as a kind of its own), + as `/index.md` or `.md` as most of them are; with none to go by, + as a folder when it has new members. A type that a documented type's member + returns (`As ListItem`) goes in that type's folder instead, when the folder + already keeps another type, as `ListView/` keeps `ListItem`. A member of a + type whose page is a folder's (`X/index.md`, or `X/X.md` in a folder with no + `index.md`, as `_App/_App.md` is) gets `X/.md` if most of the type's + members of that kind have pages, else most of its members, else most members + in the section; otherwise it goes `inline` on the type's page, as VB's do. A + change goes to the page that documents the symbol: the one titled with its + name whose parent is its type's page. +- **the parent**: the type's page, the folder's `index.md` (`Enumerations`), or + the landing page. +- **the permalink**, only when every page of the section has the permalink its + folders give it (`followsFolders`); otherwise null, to follow the siblings. + VBA's `/tB/Modules/...` is the one section that does not. +- **a model page** of the same kind in the section, and the source file. + +A package with no section gets `docs/Reference///` and a +landing page like the group's others (`newLandingFor`): ` Package`, +their parent, and a permalink beside theirs. A member of a type with no page is +`unplaced`; a removed symbol is `flagged` with its page. + +It writes `indexer/.packages/draft/`, emptied first: `.json` (the +plan), `batch-.json` (a type with its new members, or one type's members, +twelve pages at most, never splitting the pages that go on one file), and +`manifest.json`, which lists them. The manifest is what the Claude Code +workflow `draft/workflow.mjs` takes; see [WIP.Indexer.md](../WIP.Indexer.md). + ### derive ```sh @@ -463,26 +504,31 @@ twinBASIC project. Everything else the install (or the release zip) holds is ## Pipeline overview ``` -sync --> analyze --> write the pages --> verify --> review +sync --> analyze --> draft --> write the pages --> verify --> review ``` 1. **sync** — read, extract, generate api.json, commit to store 2. **analyze** — diff snapshots, produce change report -3. **write the pages** — the per-symbol workflow in - [`WIP.Authoring.md`](../WIP.Authoring.md#per-symbol-workflow), by hand - or with the `document-symbol` skill, from `report.json`; then set - `indexed_from`, run `derive`, and commit the new snapshots and - `builder/package-api.json` with the pages -4. **verify** — `build.bat`, `check.bat` (the existing builder) -5. **review** — the developer reviews and commits - -The indexer implements steps 1 and 2. Step 3 is not automated. +3. **draft** — place each page the report asks for: file, parent, permalink +4. **write the pages** — the per-symbol workflow in + [`WIP.Authoring.md`](../WIP.Authoring.md#per-symbol-workflow), by hand, + with the `document-symbol` skill, or with the `draft/workflow.mjs` + Claude Code workflow, from the plans; then set `indexed_from`, run + `derive`, and commit the new snapshots and `builder/package-api.json` + with the pages +5. **verify** — `build.bat`, `check.bat` (the existing builder), and + `examples.bat` for the new samples +6. **review** — the developer reviews and commits + +The indexer implements steps 1 to 3. Step 4 needs a person, or Claude. ## Directory layout ``` indexer/ - twin-index.mjs CLI entry point (sync | analyze | derive) + twin-index.mjs CLI entry point (sync | analyze | draft | derive) + draft/ + workflow.mjs the doc-draft Claude Code workflow, over draft's manifest lib/ sync.mjs TWINSERV manifest comparison + download builtin-sync.mjs install / GitHub release manifest comparison + extraction @@ -497,6 +543,7 @@ indexer/ doc-pages.mjs the reference's package sections: package_name, indexed_from, exclusions store.mjs .packages/ git repo lifecycle, sync state, what the store holds differ.mjs api.json diff + coverage audit + draft-plan.mjs report tasks -> page files, parents, permalinks, batches (draft) snapshots/ (committed) latest api.json per package default/ built-in/ diff --git a/indexer/draft/workflow.mjs b/indexer/draft/workflow.mjs new file mode 100644 index 000000000..1c7231aab --- /dev/null +++ b/indexer/draft/workflow.mjs @@ -0,0 +1,162 @@ +// Drafts the reference pages a new twinBASIC build, or a package new to the +// reference, leaves to write. A Workflow script for Claude Code: the agent +// Workflow engine runs it as the body of a function, so it ends in a top-level +// `return`, and it can read no file itself. Its agents can. +// +// Invocation: +// 1. node indexer/twin-index.mjs analyze [--package ] +// 2. node indexer/twin-index.mjs draft [--package ] +// which writes indexer/.packages/draft/: manifest.json, a plan for each +// package and a file for each batch of pages. +// 3. Read indexer/.packages/draft/manifest.json and pass its parsed contents +// as `args` to the Workflow tool, with scriptPath +// "indexer/draft/workflow.mjs". The manifest is small: it names the batch +// files, and each agent reads its own. +// 4. Review the drafts like any other pages: build.bat, check.bat, and the +// follow-ups the workflow returns. +// +// For each package, one agent writes each batch of pages, all at once; then one +// agent adds the new pages to the lists of the landing page and of the pages +// of their types, and writes a new section's landing page; then one compiles +// the section's samples with check_examples and fixes what the compiler +// refuses. Nothing here commits, builds or runs a gate: the drafts are drafts. +// WIP.Indexer.md says why the work is split this way. + +export const meta = { + name: 'doc-draft', + description: 'Draft the reference pages that twin-index analyze and draft found missing or changed', + whenToUse: 'After node indexer/twin-index.mjs draft has written indexer/.packages/draft/manifest.json', + phases: [ + { title: 'Draft', detail: 'one agent per batch of pages', model: 'sonnet' }, + { title: 'Lists', detail: 'one agent per package: landing page and member lists', model: 'sonnet' }, + { title: 'Check', detail: 'one agent per package: compile the samples and fix them', model: 'sonnet' }, + ], +} + +// The Workflow tool may deliver args as JSON text. +const manifest = typeof args === 'string' ? JSON.parse(args) : args +if (!manifest || !Array.isArray(manifest.packages)) { + throw new Error( + 'doc-draft takes the parsed contents of indexer/.packages/draft/manifest.json as args; ' + + 'run node indexer/twin-index.mjs analyze, then draft, first.', + ) +} +const packages = manifest.packages.filter((p) => p.batches.length) +const unplaced = manifest.packages.reduce((n, p) => n + p.unplaced, 0) +const flagged = manifest.packages.reduce((n, p) => n + p.flagged, 0) +if (!packages.length) { + log('Nothing to draft.') + return { status: 'no-tasks', unplaced, flagged } +} +const pageCount = packages.reduce((n, p) => n + p.batches.reduce((m, b) => m + b.pages, 0), 0) +log(`${pageCount} page(s) in ${packages.length} package(s)` + (unplaced ? `; ${unplaced} symbol(s) unplaced, see the plans` : '')) + +// check_examples takes a base port and two lanes from it; each package's check +// gets ports of its own, clear of the harness's default 9480. +const CHECK_PORT_BASE = 9700 +const CHECK_PORT_STEP = 4 + +const results = await pipeline( + packages, + (pkg) => + parallel( + pkg.batches.map((batch) => () => + agent(draftPrompt(pkg, batch), { + label: `draft:${pkg.package}.${batch.container}`, + phase: 'Draft', + model: 'sonnet', + }), + ), + ), + (drafted, pkg) => + agent(listsPrompt(pkg), { label: `lists:${pkg.package}`, phase: 'Lists', model: 'sonnet' }).then((lists) => ({ + drafted, + lists, + })), + (done, pkg, i) => + agent(checkPrompt(pkg, CHECK_PORT_BASE + i * CHECK_PORT_STEP), { + label: `check:${pkg.package}`, + phase: 'Check', + model: 'sonnet', + }).then((check) => ({ package: pkg.package, ...done, check })), +) + +const followUps = [ + 'Read every drafted page against its source before committing it; the drafts are drafts.', + 'Run build.bat and check.bat; a new page may need a nav parent or a link fixed.', + "Commit each section's pages with its new indexed_from, the new snapshots (indexer/snapshots/) and, for a built-in or default package, builder/package-api.json from twin-index derive (WIP.md, The package indexer).", +] +if (packages.some((p) => p.mode === 'audit')) { + followUps.push( + 'A package analyzed in audit mode has no snapshot yet: remove its folder from indexer/.packages// and run twin-index sync, which then writes one (WIP.Indexer.md).', + ) +} +if (unplaced || flagged) { + followUps.push( + `${unplaced} unplaced and ${flagged} no longer declared symbol(s) are listed in the plans under indexer/.packages/draft/; they need a person.`, + ) +} +return { packages: results.filter(Boolean), followUps } + +// --- Prompts --- + +function draftPrompt(pkg, batch) { + return `Draft twinBASIC reference pages: ${batch.pages} page(s) of the ${pkg.package} package, for ${batch.container}. + +Read first: +1. ${batch.file} -- your tasks. Each names the page \`file\` to write or change; its \`parent\` title; its \`permalink\` (null: use the form its sibling pages use); whether it is \`new\`, or goes \`inline\` on the one page its type has; the \`signature\`; and the \`source\` file in the indexer's store that declares it. \`model\` is a page of the same kind in the same section: follow its structure, headings and frontmatter. The file also gives the section's folder and landing page. +2. WIP.Authoring.md: "Page template", "Example" and "See Also"; "Cross-section linking" if a page links outside its section. +3. Each source file named in your tasks, once. + +Then, for each task: +- action "create", \`new: true\`: write the page. Frontmatter: \`title\` (the bare name), \`parent\`, \`permalink\` (from the task, else by the siblings' form), \`has_toc: false\`. +- action "create", \`inline: true\`: add a section for the symbol to its type's page, in the order and the form that page already uses. +- action "update": change the existing page so it matches the new declaration (\`old_signature\` to \`new_signature\`, \`changes\`) and change nothing else. + +Rules: +- State only what the source declares and its code does. Where the source does not make a behaviour clear, document the declaration and say nothing more: never invent semantics. +- Every \`tb\` fence carries \`check_build\`. A statement sample whose output the page states also carries \`check_run\`, with the output as a trailing comment on each \`Debug.Print\` line; \`MsgBox\`, \`InputBox\` and \`End\` cannot be run. +- Do not edit the landing page, or a type's page that lists its members, except to add an \`inline\` section: a later step updates the lists. +- Write files with the Write and Edit tools, never through the shell. No git commands; do not build. + +Return one line for each task, \`: written\`, \`changed\` or \`skipped ()\`, then one line for each doubt about what the source means.` +} + +function listsPrompt(pkg) { + const landing = pkg.landing + const newLanding = landing?.new + ? `The section has no landing page yet. Write ${landing.file} first: frontmatter \`title: ${landing.title}\`` + + (landing.parent ? `, \`parent: ${landing.parent}\`` : ', the parent the landing pages beside it use') + + (landing.permalink ? `, \`permalink: ${landing.permalink}\`` : ', a permalink of the form the landing pages beside it use') + + `, \`has_toc: false\` and \`indexed_from: ${pkg.version}\`; ` + + (landing.author + ? `under the H1, the line \`**Author:** ${landing.author}\`, or the author the package's sources name if they name someone else (WIP.md, the contributed packages); ` + : '') + + `a short description of the package from its sources (the \`source\` paths in the plan); then the lists, with no \`* TOC\` list when the page has only one or two sections. Model it on a landing page of another section in the same folder.\n\n` + : '' + return `Bring the lists of the ${pkg.package} section up to date with the pages just drafted for it. + +Read ${pkg.plan}: the plan. Its \`tasks\` are the pages; \`landing\` is the section's landing page. + +${newLanding}1. Add each new page (\`new: true\`) to the landing page's lists, under the heading that fits its kind, in the form those lists already use (\`- [Name](link) -- short description\`), the link relative to the landing page's permalink. Take each description from the page's own first sentence. +2. For each task with a \`containerPage\`: if that page lists its members, add the new member there the same way. +3. Set \`indexed_from:\` in the landing page's frontmatter to \`${pkg.version}\`. +4. Change nothing else. Write files with the Write and Edit tools, never through the shell; no git commands; do not build. + +Return one line for each file changed, saying what was added.` +} + +function checkPrompt(pkg, port) { + const only = pkg.sectionDir.replace(/^docs\//, '') + return `Compile the samples of the ${pkg.package} section and fix the drafted pages the compiler refuses. + +Run, from the repository root: + node scripts/check_examples.mjs --only "^${only}/" --port ${port} --jobs 2 +It needs a twinBASIC install. For a contributed package it also needs a sample template, test/example-projects/contributed-${pkg.package}/Settings: if the run says the harness or the template is missing, stop and say so. + +For each finding, fix the page it names: the sample, or what the page says it prints. Fix the page, never the harness or a template, and only pages listed in ${pkg.plan}. A \`check_run\` mismatch prints what the code really printed: that is the fact to document. Run again after fixing, three runs at most. + +Write files with the Write and Edit tools, never through the shell; no git commands; do not build. + +Return the last run's summary line, then one line for each fix: \`:: \`.` +} diff --git a/indexer/lib/doc-pages.mjs b/indexer/lib/doc-pages.mjs index 2dc6711e1..fb7fbf258 100644 --- a/indexer/lib/doc-pages.mjs +++ b/indexer/lib/doc-pages.mjs @@ -23,6 +23,43 @@ const GROUP_FOLDERS = [ ["contributed", "Contributed"], ]; +/** The folder of the reference a store group's sections are in, `Built-In` for `built-in`. */ +export const groupFolder = (group) => new Map(GROUP_FOLDERS).get(group); + +/** + * Every page of a section, `{ rel, title, parent, permalink }`, `rel` relative + * to the section's folder with `/` separators, in path order. A frontmatter + * value in quotes is read without them. + */ +export async function sectionPages(dir) { + const pages = []; + const unquote = (v) => (v && /^(["']).*\1$/.test(v) ? v.slice(1, -1) : v); + const walk = async (sub) => { + let entries; + try { + entries = await fs.readdir(path.join(dir, sub), { withFileTypes: true }); + } catch { + return; /* no such folder */ + } + for (const entry of entries.sort((a, b) => (a.name < b.name ? -1 : a.name > b.name ? 1 : 0))) { + const rel = sub ? `${sub}/${entry.name}` : entry.name; + if (entry.isDirectory()) await walk(rel); + else if (entry.name.endsWith(".md")) { + const block = frontmatterOf(await fs.readFile(path.join(dir, rel), "utf-8")); + if (!block) continue; + pages.push({ + rel, + title: unquote(frontmatterValue(block, "title")), + parent: unquote(frontmatterValue(block, "parent")), + permalink: unquote(frontmatterValue(block, "permalink")), + }); + } + } + }; + await walk(""); + return pages; +} + /** The text of a page's frontmatter block, or null when the page has none. */ export function frontmatterOf(text) { const m = /^?---[ \t]*\r?\n([\s\S]*?)\r?\n---[ \t]*(?:\r?\n|$)/.exec(text); diff --git a/indexer/lib/draft-plan.mjs b/indexer/lib/draft-plan.mjs new file mode 100644 index 000000000..20f8f9c5e --- /dev/null +++ b/indexer/lib/draft-plan.mjs @@ -0,0 +1,406 @@ +import path from "node:path"; +import { flattenSymbols } from "./differ.mjs"; + +/** + * The pages `analyze`'s tasks ask for, placed in the reference: for each task + * of a package's report, the page file to write or change, its parent's title + * and its permalink, read from the section's own layout rather than from a + * convention, because the sections do not share one (enumerations in an + * `Enumerations/` folder in some, beside the classes in others; a class with + * its members on pages of their own in a folder, or on its one page). + * + * Everything here is pure: `twin-index draft` reads the files and calls + * planPackage, and test/indexer.test.mjs calls it with hand-made sections. + */ + +// The kinds of a report that are types. Every other kind is a member of one. +const TYPE_KINDS = new Set(["Module", "Class", "Interface", "CoClass", "Enum", "Type", "Union"]); + +// The folder a page's members go in: `X/index.md`, or `X/X.md` in a folder +// with no `index.md` as AppGlobalClassObject's `_App/_App.md` is, keeps its +// members in `X/`; a page of its own (`X.md`) keeps them on the page, and has +// none. `rels` are the paths of the section's pages. +function memberFolder(rel, rels = new Set()) { + if (rel.endsWith("/index.md")) return rel.slice(0, -"/index.md".length); + const dir = path.posix.dirname(rel); + const named = dir !== "." && path.posix.basename(rel, ".md") === path.posix.basename(dir); + return named && !rels.has(`${dir}/index.md`) ? dir : null; +} + +// The folder a type's page sits in: `A/X/index.md` and `A/X.md` are both in +// `A`; the section's root is `.`. +function typeFolder(rel, rels) { + return path.posix.dirname(memberFolder(rel, rels) ?? rel.slice(0, -".md".length)); +} + +/** + * The permalink a section gives the page at `rel` when its permalinks follow + * its folders: the landing page's, then the path with `.md` dropped, and a + * folder's own page (`index.md`, or `X/X.md`) as the folder with a trailing + * slash. `rels` are the paths of the section's pages. + */ +export function permalinkByFolder(landingPermalink, rel, rels = new Set()) { + const base = landingPermalink.endsWith("/") ? landingPermalink : `${landingPermalink}/`; + if (rel === "index.md") return base; + const folder = memberFolder(rel, rels); + return folder === null ? `${base}${rel.slice(0, -".md".length)}` : `${base}${folder}/`; +} + +/** + * Whether every page of a section that sets a permalink has the one + * permalinkByFolder gives it. Only then are the permalinks of new pages + * computed; otherwise each is left to whoever writes the page, from its + * siblings'. + */ +export function followsFolders(pages, landing) { + if (!landing?.permalink) return false; + const rels = new Set(pages.map((p) => p.rel)); + return pages.every((p) => !p.permalink || p.permalink === permalinkByFolder(landing.permalink, p.rel, rels)); +} + +// Whether most of `flags` are true: null on a tie, and when there are none. +function majority(flags) { + const yes = flags.filter(Boolean).length; + const no = flags.length - yes; + return yes > no ? true : no > yes ? false : null; +} + +// The most frequent of `values`, a tie to the first seen; `fallback` when none. +function mostCommon(values, fallback) { + const counts = new Map(); + for (const v of values) counts.set(v, (counts.get(v) ?? 0) + 1); + let best = fallback; + let n = 0; + for (const [v, c] of counts) { + if (c > n) { + best = v; + n = c; + } + } + return best; +} + +/** + * Plans the pages of one package's report. + * + * - `report`: one entry of report.json (`{ package, group, mode, to, tasks }`). + * - `api`: the package's current api.json, which says what kind of type each + * existing page documents. + * - `pages`: every page of the section, `{ rel, title, parent, permalink }`, + * `rel` relative to the section's folder with `/` separators; `index.md` is + * the landing page. Empty for a package the reference has no section for. + * - `sectionDir`, `sourceDir`: the section's folder and the package's sources + * in the store, relative to the repository, with `/`. + * - `newLanding`: for a section with no landing page yet, the `{ title, + * parent, permalink }` it is to get, and for a contributed package its + * `author`; the returned `landing` then says `new: true`. + * + * Returns `{ package, group, mode, version, sectionDir, landing, permalinks, + * tasks, unplaced, flagged }`. Each of `tasks` names the page `file` + * (repository-relative); whether it is `new`; whether the symbol goes `inline`, + * on the one page its type has; the `parent` title; the `permalink` (null for + * an inline symbol, and when the section's permalinks do not follow its + * folders); the `containerPage`, which may list its members; a `model` page of + * the same kind in the section, to follow; and the `source` file to read. + * `unplaced` are the tasks no page can be found for, such as a member whose + * type has no page and gets none; `flagged`, the symbols the package no longer + * declares, with the page that documents each. + */ +export function planPackage({ report, api, pages, sectionDir, sourceDir, newLanding = null }) { + const landing = + pages.find((p) => p.rel === "index.md") ?? (newLanding ? { rel: "index.md", new: true, ...newLanding } : null); + const permalinks = followsFolders(pages, landing); + const inSection = (rel) => `${sectionDir}/${rel}`; + const titleOf = new Map(pages.map((p) => [p.rel, p.title])); + // The pages there are, and those planned so far. + const rels = new Set(pages.map((p) => p.rel)); + const folderOf = (rel) => memberFolder(rel, rels); + const byTitle = new Map(); + for (const p of pages) { + if (p.rel === "index.md") continue; + if (!byTitle.has(p.title)) byTitle.set(p.title, []); + byTitle.get(p.title).push(p); + } + // A symbol's page: the one titled with its name whose parent is its type's + // page; for a type of the package's own, the first so titled. + const pageOf = (name, host, isTopType) => { + const found = byTitle.get(name) ?? []; + return found.find((p) => host && p.parent === host.title) ?? (isTopType ? found[0] : null) ?? null; + }; + + // The page of each type that has one, by the type's path; for each kind of + // type, the folders the section keeps it in, and whether each is a folder of + // its own (`X/index.md`) or one page (`X.md`); and a page of each kind. A + // control (a class marked [WindowsControl] or [CustomControl]) is a kind of + // its own: the sections lay their controls out apart from their classes. + const typePages = new Map(); + const kindFolders = new Map(); + const kindStyles = new Map(); + const kindPages = new Map(); + const symbols = flattenSymbols(api ?? {}); + const types = symbols + .filter((s) => s.isType) + .map((s) => ({ ...s, path: s.container ? `${s.container}.${s.name}` : s.name })); + const controls = new Set( + types + .filter((t) => JSON.parse(t.attributes).some((a) => a.name === "WindowsControl" || a.name === "CustomControl")) + .map((t) => t.path), + ); + const kindKey = (kind, typePath) => (controls.has(typePath) ? `${kind} control` : kind); + const add = (map, key, value) => { + if (!map.has(key)) map.set(key, []); + map.get(key).push(value); + }; + for (const t of types) { + const page = t.container ? pageOf(t.name, typePages.get(t.container), false) : pageOf(t.name, landing, true); + if (!page) continue; + typePages.set(t.path, page); + const key = kindKey(t.kind, t.path); + if (!kindPages.has(key)) kindPages.set(key, page.rel); + if (t.container) continue; + add(kindFolders, key, typeFolder(page.rel, rels)); + add(kindStyles, key, folderOf(page.rel) !== null); + } + const anyFolder = mostCommon([...kindFolders.values()].flat(), "."); + // A control with no other control to go by goes as the classes do. + const byKind = (map, kind, typePath) => map.get(kindKey(kind, typePath)) ?? map.get(kind); + const folderFor = (kind, typePath) => mostCommon(byKind(kindFolders, kind, typePath) ?? [], anyFolder); + const modelFor = (kind, typePath) => kindPages.get(kindKey(kind, typePath)) ?? kindPages.get(kind) ?? null; + // Whether a new type of a kind gets a folder: as most of the section's types + // of that kind have, else most of its types; null when it has none. + const folderStyle = (kind, typePath) => + majority(byKind(kindStyles, kind, typePath) ?? []) ?? majority([...kindStyles.values()].flat()); + const containerOf = (task) => + TYPE_KINDS.has(task.kind) ? (task.module === task.symbol ? null : task.module) : task.module; + const common = (task) => ({ + action: task.action, + symbol: task.symbol, + kind: task.kind, + container: containerOf(task), + signature: task.signature ?? null, + source: task.file ? `${sourceDir}/${task.file}` : null, + }); + const created = report.tasks.filter((t) => t.action === "create"); + const hasNewMembers = (typePath) => created.some((t) => !TYPE_KINDS.has(t.kind) && t.module === typePath); + const isCreated = (typePath, name) => created.some((t) => t.module === typePath && t.symbol === name); + // The members a type already had, each with the page of its own it has, or + // null when it is on its type's page or on none. + const knownMembers = (typePath, host) => + symbols + .filter((s) => !s.isType && s.public && s.container === typePath && !isCreated(typePath, s.name)) + .map((s) => ({ kind: s.kind, page: pageOf(s.name, host, false) })); + // Whether the section gives members pages of their own: as most members of + // the types it keeps in folders have. VB's keep theirs on the folder's index.md. + const membersOnPages = + majority( + [...typePages] + .filter(([, page]) => folderOf(page.rel) !== null) + .flatMap(([typePath, page]) => knownMembers(typePath, page).map((m) => m.page !== null)), + ) ?? true; + // The folder a type's page keeps the pages of its members of `kind` in, or + // null when they go on the type's page: as most of its members of that kind + // are, else most of its members, else as the section does. The model is a + // page of one of them. + const memberPlace = (host, typePath, kind) => { + const folder = folderOf(host.rel); + if (folder === null) return { folder: null, model: null }; + const known = knownMembers(typePath, host); + const same = known.filter((m) => m.kind === kind); + const onPages = majority((same.length ? same : known).map((m) => m.page !== null)) ?? membersOnPages; + const model = (same.find((m) => m.page) ?? known.find((m) => m.page))?.page.rel ?? null; + return { folder: onPages ? folder : null, model }; + }; + // The type that keeps a new type in its folder, as ListView keeps ListItem: + // the one type with a folder of its own, or whose page is in a folder, among + // the documented types whose members return the new type (`As ListItem`), + // and only when that folder keeps another type's page already: a class + // returned by another is more often a page of its own (Printers returns + // Printer). The folder and the title of its page; null when there is no + // such type, or several. + const keepsTypes = (folder) => [...typePages.values()].some((p) => typeFolder(p.rel, rels) === folder); + const returns = (signature, name) => { + const words = (signature ?? "").split(/\W+/); + return words.some((w, i) => w === "As" && [1, 2].some((j) => words[i + j] === name)); + }; + const ownerOf = (name) => { + const owners = new Map(); + for (const s of symbols) { + if (s.isType || !s.container || s.container === name || !returns(s.signature, name)) continue; + const page = typePages.get(s.container); + const folder = page && (folderOf(page.rel) ?? (page.rel.includes("/") ? path.posix.dirname(page.rel) : null)); + if (folder && keepsTypes(folder)) owners.set(folder, page); + } + if (owners.size !== 1) return null; + const [[folder, page]] = owners; + return { folder, title: (folderOf(page.rel) === folder ? page.title : titleOf.get(`${folder}/index.md`)) ?? null }; + }; + // Whether the types directly in a folder mostly have folders of their own. + const styleIn = (folder) => + majority( + [...typePages.values()].filter((p) => typeFolder(p.rel, rels) === folder).map((p) => folderOf(p.rel) !== null), + ); + + const tasks = []; + const unplaced = []; + const flagged = []; + + // The types first, the package's own before the nested, so that a member + // finds the page its new type gets. + const order = (t) => (TYPE_KINDS.has(t.kind) ? (containerOf(t) ? 1 : 0) : 2); + for (const task of [...created].sort((a, b) => order(a) - order(b))) { + const container = containerOf(task); + const isType = TYPE_KINDS.has(task.kind); + const ownPath = isType ? (container ? `${container}.${task.symbol}` : task.symbol) : null; + const host = container ? (typePages.get(container) ?? null) : null; + let rel = null; + let parent = null; + let inline = false; + let model = null; + // A type with a folder of its own: as the section keeps its kind, else when + // it has new members to put in it. + const ownFolder = isType && (folderStyle(task.kind, ownPath) ?? hasNewMembers(ownPath)); + const place = host && !isType ? memberPlace(host, container, task.kind) : null; + const folder = host ? (isType ? folderOf(host.rel) : place.folder) : null; + const owner = isType && !container ? ownerOf(task.symbol) : null; + // A page of its own named Index would be written as Index.html, which on + // Windows is the folder's index.html: Fmt's StringFormatSpecifier.Index is + // IndexProperty.md. + const name = task.symbol.toLowerCase() === "index" ? `${task.symbol}${task.kind}` : task.symbol; + if (owner) { + // Kept in its owner's folder, with a folder of its own as the types there have. + const own = styleIn(owner.folder) ?? false; + rel = own ? `${owner.folder}/${task.symbol}/index.md` : `${owner.folder}/${name}.md`; + parent = owner.title ?? landing?.title ?? null; + model = modelFor(task.kind, ownPath); + } else if (!container) { + const kindFolder = folderFor(task.kind, ownPath); + const stem = kindFolder === "." ? task.symbol : `${kindFolder}/${task.symbol}`; + rel = ownFolder ? `${stem}/index.md` : `${kindFolder === "." ? name : `${kindFolder}/${name}`}.md`; + parent = (kindFolder !== "." && titleOf.get(`${kindFolder}/index.md`)) || landing?.title || null; + model = modelFor(task.kind, ownPath); + } else if (folder !== null) { + rel = ownFolder ? `${folder}/${task.symbol}/index.md` : `${folder}/${name}.md`; + parent = host.title; + model = isType ? modelFor(task.kind, ownPath) : place.model; + } else if (host) { + rel = host.rel; + parent = host.parent; + inline = true; + } + if (!rel) { + unplaced.push({ ...common(task), reason: `${container} has no page` }); + continue; + } + if (isType) typePages.set(ownPath, { rel, title: task.symbol, parent }); + rels.add(rel); + tasks.push({ + ...common(task), + file: inSection(rel), + new: !inline, + inline, + parent, + permalink: permalinks && !inline ? permalinkByFolder(landing.permalink, rel, rels) : null, + containerPage: host ? inSection(host.rel) : null, + model: model && model !== rel ? inSection(model) : null, + }); + } + + // A change or a removal is to the page the symbol has, or, for a member of a + // type on one page, to that page. + const existingPage = (task) => { + const container = containerOf(task); + const host = container ? (typePages.get(container) ?? null) : null; + const page = pageOf(task.symbol, host, !container); + if (page) return { file: inSection(page.rel), inline: false }; + if (host && memberPlace(host, container, task.kind).folder === null) + return { file: inSection(host.rel), inline: true }; + return { file: null, inline: false }; + }; + for (const task of report.tasks) { + if (task.action === "update") { + const { file, inline } = existingPage(task); + if (!file) { + unplaced.push({ ...common(task), reason: "no page documents it" }); + continue; + } + tasks.push({ + ...common(task), + file, + new: false, + inline, + reason: task.reason ?? null, + changes: task.changes ?? [], + old_signature: task.old_signature ?? null, + new_signature: task.new_signature ?? null, + }); + } else if (task.action === "flag_removal") { + flagged.push({ ...common(task), file: existingPage(task).file }); + } + } + + return { + package: report.package, + group: report.group, + mode: report.mode, + version: report.to, + sectionDir, + landing: landing + ? { + file: inSection("index.md"), + title: landing.title, + parent: landing.parent ?? null, + permalink: landing.permalink ?? null, + new: !!landing.new, + author: landing.author ?? null, + } + : null, + permalinks, + tasks, + unplaced, + flagged, + }; +} + +/** + * The landing page a new section is to get, from the landing pages of the + * other sections of its group, `[{ folder, title, parent, permalink }]`: its + * title ` Package` when theirs are named so, their most frequent + * parent, and a permalink beside theirs when theirs end in their folder's name. + */ +export function newLandingFor(name, siblings) { + const named = siblings.every((s) => s.title === `${s.folder} Package`); + const prefixes = siblings.map((s) => + s.permalink?.endsWith(`/${s.folder}/`) ? s.permalink.slice(0, -(s.folder.length + 1)) : null, + ); + const prefix = prefixes.length && prefixes.every((p) => p && p === prefixes[0]) ? prefixes[0] : null; + return { + title: named ? `${name} Package` : name, + parent: mostCommon(siblings.map((s) => s.parent).filter(Boolean), null), + permalink: prefix ? `${prefix}${name}/` : null, + }; +} + +// The most pages one agent of the workflow writes. +export const PAGES_PER_BATCH = 12; + +/** + * Splits a package's planned tasks into the batches the workflow gives one + * agent each: a type with its new members, or the members of one type, in + * `PAGES_PER_BATCH` at most. A type's symbols that go on its one page stay in + * one batch however many they are, so that no two agents edit one file. + * Returns `[{ container, tasks }]` in the order the plan lists them. + */ +export function batchTasks(plan) { + const groups = new Map(); + for (const t of plan.tasks) { + const key = t.container ?? t.symbol; + if (!groups.has(key)) groups.set(key, []); + groups.get(key).push(t); + } + const batches = []; + for (const [container, tasks] of groups) { + const size = tasks.some((t) => t.inline) ? tasks.length : PAGES_PER_BATCH; + for (let i = 0; i < tasks.length; i += size) batches.push({ container, tasks: tasks.slice(i, i + size) }); + } + return batches; +} diff --git a/indexer/snapshots/contributed/AutoCompleteLib/api.json b/indexer/snapshots/contributed/AutoCompleteLib/api.json new file mode 100644 index 000000000..c6312be02 --- /dev/null +++ b/indexer/snapshots/contributed/AutoCompleteLib/api.json @@ -0,0 +1,222 @@ +{ + "format": 3, + "package": "AutoCompleteLib", + "project": "AutoCompleteLib", + "version": "1.0.0.0", + "types": [ + { + "name": "AutoComplete", + "kind": "class", + "vis": "public", + "file": "AutoComplete.cls", + "signature": "Class AutoComplete", + "implements": ["AutoCompleteGuids.IEnumStringVB"], + "members": [ + {"name":"ACDD_VISIBLE","kind":"const","vis":"private","signature":"Private Const ACDD_VISIBLE As Long = 1"}, + {"name":"ACLO_CURRENTDIR","kind":"const","vis":"private","signature":"Private Const ACLO_CURRENTDIR As Long = 1"}, + {"name":"ACLO_DESKTOP","kind":"const","vis":"private","signature":"Private Const ACLO_DESKTOP As Long = 4"}, + {"name":"ACLO_FAVORITES","kind":"const","vis":"private","signature":"Private Const ACLO_FAVORITES As Long = 8"}, + {"name":"ACLO_FILESYSDIRS","kind":"const","vis":"private","signature":"Private Const ACLO_FILESYSDIRS As Long = 32"}, + {"name":"ACLO_FILESYSONLY","kind":"const","vis":"private","signature":"Private Const ACLO_FILESYSONLY As Long = 16"}, + {"name":"ACLO_MYCOMPUTER","kind":"const","vis":"private","signature":"Private Const ACLO_MYCOMPUTER As Long = 2"}, + {"name":"ACLO_NONE","kind":"const","vis":"private","signature":"Private Const ACLO_NONE As Long = 0"}, + {"name":"ACO_AUTOAPPEND","kind":"const","vis":"private","signature":"Private Const ACO_AUTOAPPEND As Long = &H2"}, + {"name":"ACO_AUTOSUGGEST","kind":"const","vis":"private","signature":"Private Const ACO_AUTOSUGGEST As Long = &H1"}, + {"name":"ACO_FILTERPREFIXES","kind":"const","vis":"private","signature":"Private Const ACO_FILTERPREFIXES As Long = &H8"}, + {"name":"ACO_NONE","kind":"const","vis":"private","signature":"Private Const ACO_NONE As Long = &H0"}, + {"name":"ACO_SEARCH","kind":"const","vis":"private","signature":"Private Const ACO_SEARCH As Long = &H4"}, + {"name":"ACO_UPDOWNKEYDROPSLIST","kind":"const","vis":"private","signature":"Private Const ACO_UPDOWNKEYDROPSLIST As Long = &H20"}, + {"name":"ACO_USETAB","kind":"const","vis":"private","signature":"Private Const ACO_USETAB As Long = &H10"}, + {"name":"AutoCompleteFileSystemOptionCurrentDir","kind":"field","vis":"private","signature":"Private AutoCompleteFileSystemOptionCurrentDir"}, + {"name":"AutoCompleteFileSystemOptionDesktop","kind":"field","vis":"private","signature":"Private AutoCompleteFileSystemOptionDesktop"}, + {"name":"AutoCompleteFileSystemOptionFavorites","kind":"field","vis":"private","signature":"Private AutoCompleteFileSystemOptionFavorites"}, + {"name":"AutoCompleteFileSystemOptionFileSysDirs","kind":"field","vis":"private","signature":"Private AutoCompleteFileSystemOptionFileSysDirs"}, + {"name":"AutoCompleteFileSystemOptionFileSysOnly","kind":"field","vis":"private","signature":"Private AutoCompleteFileSystemOptionFileSysOnly"}, + {"name":"AutoCompleteFileSystemOptionMyComputer","kind":"field","vis":"private","signature":"Private AutoCompleteFileSystemOptionMyComputer"}, + {"name":"AutoCompleteFileSystemOptionNone","kind":"field","vis":"private","signature":"Private AutoCompleteFileSystemOptionNone"}, + {"name":"AutoCompleteOptionAppend","kind":"field","vis":"private","signature":"Private AutoCompleteOptionAppend"}, + {"name":"AutoCompleteOptionFilterPrefixes","kind":"field","vis":"private","signature":"Private AutoCompleteOptionFilterPrefixes"}, + {"name":"AutoCompleteOptionNone","kind":"field","vis":"private","signature":"Private AutoCompleteOptionNone"}, + {"name":"AutoCompleteOptionSearch","kind":"field","vis":"private","signature":"Private AutoCompleteOptionSearch"}, + {"name":"AutoCompleteOptionSuggest","kind":"field","vis":"private","signature":"Private AutoCompleteOptionSuggest"}, + {"name":"AutoCompleteOptionSuggestAppend","kind":"field","vis":"private","signature":"Private AutoCompleteOptionSuggestAppend"}, + {"name":"AutoCompleteOptionUpDownKeyDropsList","kind":"field","vis":"private","signature":"Private AutoCompleteOptionUpDownKeyDropsList"}, + {"name":"AutoCompleteOptionUseTab","kind":"field","vis":"private","signature":"Private AutoCompleteOptionUseTab"}, + {"name":"AutoCompleteSourceAll","kind":"field","vis":"private","signature":"Private AutoCompleteSourceAll"}, + {"name":"AutoCompleteSourceCustomSource","kind":"field","vis":"private","signature":"Private AutoCompleteSourceCustomSource"}, + {"name":"AutoCompleteSourceFileSystem","kind":"field","vis":"private","signature":"Private AutoCompleteSourceFileSystem"}, + {"name":"AutoCompleteSourceHistory","kind":"field","vis":"private","signature":"Private AutoCompleteSourceHistory"}, + {"name":"AutoCompleteSourceMRU","kind":"field","vis":"private","signature":"Private AutoCompleteSourceMRU"}, + {"name":"AutoCompleteSourceNone","kind":"field","vis":"private","signature":"Private AutoCompleteSourceNone"}, + {"name":"Class_Initialize","kind":"sub","vis":"private","signature":"Private Sub Class_Initialize()"}, + {"name":"CopyMemory","kind":"sub","vis":"private","declare":true,"signatures":[{"cond":"VBA7","signature":"Private Declare PtrSafe Sub CopyMemory Lib \"kernel32\" Alias \"RtlMoveMemory\" (ByRef Destination As Any, ByRef Source As Any, ByVal Length As Long)"},{"cond":"Not (VBA7)","signature":"Private Declare Sub CopyMemory Lib \"kernel32\" Alias \"RtlMoveMemory\" (ByRef Destination As Any, ByRef Source As Any, ByVal Length As Long)"}]}, + {"name":"CustomSource","kind":"property","vis":"public","signature":"Public Property Get CustomSource() As Variant","returnType":"Variant","accessor":"Get"}, + {"name":"CustomSource","kind":"property","vis":"public","signature":"Public Property Let CustomSource(ByVal StringArray As Variant)","accessor":"Let"}, + {"name":"Disable","kind":"sub","vis":"public","signature":"Public Sub Disable()"}, + {"name":"DroppedDown","kind":"function","vis":"public","signature":"Public Function DroppedDown() As Boolean","returnType":"Boolean"}, + {"name":"E_NOTIMPL","kind":"const","vis":"private","signature":"Private Const E_NOTIMPL As Long = &H80004001"}, + {"name":"E_POINTER","kind":"const","vis":"private","signature":"Private Const E_POINTER As Long = &H80004003"}, + {"name":"Enable","kind":"sub","vis":"public","signature":"Public Sub Enable()"}, + {"name":"FileSystemOptions","kind":"property","vis":"public","signature":"Public Property Get FileSystemOptions() As AutoCompleteFileSystemOptionConstants","returnType":"AutoCompleteFileSystemOptionConstants","accessor":"Get"}, + {"name":"FileSystemOptions","kind":"property","vis":"public","signature":"Public Property Let FileSystemOptions(ByVal Value As AutoCompleteFileSystemOptionConstants)","accessor":"Let"}, + {"name":"IAutoComplete","kind":"field","vis":"private","signature":"Private IAutoComplete As AutoCompleteGuids.IAutoComplete2"}, + {"name":"IAutoCompleteDropDown","kind":"field","vis":"private","signature":"Private IAutoCompleteDropDown As AutoCompleteGuids.IAutoCompleteDropDown"}, + {"name":"IAutoCompleteIACList2","kind":"field","vis":"private","signature":"Private IAutoCompleteIACList2 As AutoCompleteGuids.IACList2"}, + {"name":"IEnumStringCount","kind":"field","vis":"private","signature":"Private IEnumStringCount As Long"}, + {"name":"IEnumStringCurrentElement","kind":"field","vis":"private","signature":"Private IEnumStringCurrentElement As Long"}, + {"name":"IEnumStringElements","kind":"field","vis":"private","signature":"Private IEnumStringElements() As String"}, + {"name":"IEnumStringVB_Clone","kind":"sub","vis":"private","signatures":[{"cond":"VBA7","signature":"Private Sub IEnumStringVB_Clone(ByRef RetVal As Long, ByVal lppEnum As LongPtr)"},{"cond":"Not (VBA7)","signature":"Private Sub IEnumStringVB_Clone(ByRef RetVal As Long, ByVal lppEnum As Long)"}]}, + {"name":"IEnumStringVB_Next","kind":"sub","vis":"private","signatures":[{"cond":"VBA7","signature":"Private Sub IEnumStringVB_Next(ByRef RetVal As Long, ByVal cElt As Long, ByVal rgElt As LongPtr, ByVal lpcEltFetched As LongPtr)"},{"cond":"Not (VBA7)","signature":"Private Sub IEnumStringVB_Next(ByRef RetVal As Long, ByVal cElt As Long, ByVal rgElt As Long, ByVal lpcEltFetched As Long)"}]}, + {"name":"IEnumStringVB_Reset","kind":"sub","vis":"private","signature":"Private Sub IEnumStringVB_Reset(ByRef RetVal As Long)"}, + {"name":"IEnumStringVB_Skip","kind":"sub","vis":"private","signature":"Private Sub IEnumStringVB_Skip(ByRef RetVal As Long, ByVal cElt As Long)"}, + {"name":"Init","kind":"sub","vis":"public","signatures":[{"cond":"VBA7","signature":"Public Sub Init(ByVal hWndEdit As LongPtr, ByVal Source As AutoCompleteSourceConstants)"},{"cond":"Not (VBA7)","signature":"Public Sub Init(ByVal hWndEdit As Long, ByVal Source As AutoCompleteSourceConstants)"}]}, + {"name":"NULL_PTR","kind":"const","vis":"private","signatures":[{"cond":"Win64","signature":"Private Const NULL_PTR As LongPtr = 0"},{"cond":"Not (Win64)","signature":"Private Const NULL_PTR As Long = 0"}]}, + {"name":"Options","kind":"property","vis":"public","signature":"Public Property Get Options() As AutoCompleteOptionConstants","returnType":"AutoCompleteOptionConstants","accessor":"Get"}, + {"name":"Options","kind":"property","vis":"public","signature":"Public Property Let Options(ByVal Value As AutoCompleteOptionConstants)","accessor":"Let"}, + {"name":"PTR_SIZE","kind":"const","vis":"private","signatures":[{"cond":"Win64","signature":"Private Const PTR_SIZE As Long = 8"},{"cond":"Not (Win64)","signature":"Private Const PTR_SIZE As Long = 4"}]}, + {"name":"Refresh","kind":"sub","vis":"public","signature":"Public Sub Refresh()"}, + {"name":"S_FALSE","kind":"const","vis":"private","signature":"Private Const S_FALSE As Long = &H1"}, + {"name":"S_OK","kind":"const","vis":"private","signature":"Private Const S_OK As Long = &H0"}, + {"name":"UnsignedAdd","kind":"function","vis":"private","signature":"Private Function UnsignedAdd(ByVal Start As LongPtr, ByVal Incr As LongPtr) As LongPtr","returnType":"LongPtr"} + ] + }, + { + "name": "AutoCompleteFileSystemOptionConstants", + "kind": "enum", + "in": "AutoComplete", + "vis": "public", + "file": "AutoComplete.cls", + "signature": "Public Enum AutoCompleteFileSystemOptionConstants", + "values": [ + {"name":"AutoCompleteFileSystemOptionNone","value":"ACLO_NONE"}, + {"name":"AutoCompleteFileSystemOptionCurrentDir","value":"ACLO_CURRENTDIR"}, + {"name":"AutoCompleteFileSystemOptionMyComputer","value":"ACLO_MYCOMPUTER"}, + {"name":"AutoCompleteFileSystemOptionDesktop","value":"ACLO_DESKTOP"}, + {"name":"AutoCompleteFileSystemOptionFavorites","value":"ACLO_FAVORITES"}, + {"name":"AutoCompleteFileSystemOptionFileSysOnly","value":"ACLO_FILESYSONLY"}, + {"name":"AutoCompleteFileSystemOptionFileSysDirs","value":"ACLO_FILESYSDIRS"} + ] + }, + { + "name": "AutoCompleteOptionConstants", + "kind": "enum", + "in": "AutoComplete", + "vis": "public", + "file": "AutoComplete.cls", + "signature": "Public Enum AutoCompleteOptionConstants", + "values": [ + {"name":"AutoCompleteOptionNone","value":"ACO_NONE"}, + {"name":"AutoCompleteOptionAppend","value":"ACO_AUTOAPPEND"}, + {"name":"AutoCompleteOptionSuggest","value":"ACO_AUTOSUGGEST"}, + {"name":"AutoCompleteOptionSuggestAppend","value":"(ACO_AUTOSUGGEST Or ACO_AUTOAPPEND)"}, + {"name":"AutoCompleteOptionSearch","value":"ACO_SEARCH"}, + {"name":"AutoCompleteOptionFilterPrefixes","value":"ACO_FILTERPREFIXES"}, + {"name":"AutoCompleteOptionUseTab","value":"ACO_USETAB"}, + {"name":"AutoCompleteOptionUpDownKeyDropsList","value":"ACO_UPDOWNKEYDROPSLIST"} + ] + }, + { + "name": "AutoCompleteSourceConstants", + "kind": "enum", + "in": "AutoComplete", + "vis": "public", + "file": "AutoComplete.cls", + "signature": "Public Enum AutoCompleteSourceConstants", + "values": [ + {"name":"AutoCompleteSourceNone","value":"0"}, + {"name":"AutoCompleteSourceHistory","value":"1"}, + {"name":"AutoCompleteSourceFileSystem","value":"2"}, + {"name":"AutoCompleteSourceMRU","value":"3"}, + {"name":"AutoCompleteSourceAll","value":"4"}, + {"name":"AutoCompleteSourceCustomSource","value":"5"} + ] + }, + { + "name": "LongPtr", + "kind": "enum", + "in": "AutoComplete", + "vis": "private", + "public": false, + "file": "AutoComplete.cls", + "signature": "Private Enum LongPtr", + "values": [ + {"name":"_"} + ] + }, + { + "name": "AutoCompleteHandle", + "kind": "module", + "vis": "public", + "file": "AutoCompleteHandle.bas", + "signature": "Module AutoCompleteHandle", + "members": [ + {"name":"CLSCTX_INPROC_SERVER","kind":"const","vis":"private","signature":"Private Const CLSCTX_INPROC_SERVER As Long = 1"}, + {"name":"CLSIDFromString","kind":"function","vis":"private","declare":true,"returnType":"Long","signatures":[{"cond":"VBA7","signature":"Private Declare PtrSafe Function CLSIDFromString Lib \"ole32\" (ByVal lpszProgID As LongPtr, ByRef pCLSID As Any) As Long"},{"cond":"Not (VBA7)","signature":"Private Declare Function CLSIDFromString Lib \"ole32\" (ByVal lpszProgID As Long, ByRef pCLSID As Any) As Long"}]}, + {"name":"CLSID_ACLHistory","kind":"const","vis":"private","signature":"Private Const CLSID_ACLHistory As String = \"{00BB2764-6A77-11D0-A535-00C04FD7D062}\""}, + {"name":"CLSID_ACLMRU","kind":"const","vis":"private","signature":"Private Const CLSID_ACLMRU As String = \"{6756A641-DE71-11D0-831B-00AA005B4383}\""}, + {"name":"CLSID_ACLMulti","kind":"const","vis":"private","signature":"Private Const CLSID_ACLMulti As String = \"{00BB2765-6A77-11D0-A535-00C04FD7D062}\""}, + {"name":"CLSID_ACListISF","kind":"const","vis":"private","signature":"Private Const CLSID_ACListISF As String = \"{03C036F1-A186-11D0-824A-00AA005B4383}\""}, + {"name":"CLSID_IACList2","kind":"const","vis":"private","signature":"Private Const CLSID_IACList2 As String = \"{470141A0-5186-11D2-BBB6-0060977B464C}\""}, + {"name":"CLSID_IAutoComplete","kind":"const","vis":"private","signature":"Private Const CLSID_IAutoComplete As String = \"{00BB2763-6A77-11D0-A535-00C04FD7D062}\""}, + {"name":"CLSID_IAutoCompleteDropDown","kind":"const","vis":"private","signature":"Private Const CLSID_IAutoCompleteDropDown As String = \"{3CD141F4-3C6A-11D2-BCAA-00C04FD929DB}\""}, + {"name":"CoCreateInstance","kind":"function","vis":"private","declare":true,"returnType":"Long","signatures":[{"cond":"VBA7","signature":"Private Declare PtrSafe Function CoCreateInstance Lib \"ole32\" (ByRef rclsid As Any, ByVal pUnkOuter As LongPtr, ByVal dwClsContext As Long, ByRef riid As Any, ByRef ppv As IUnknown) As Long"},{"cond":"Not (VBA7)","signature":"Private Declare Function CoCreateInstance Lib \"ole32\" (ByRef rclsid As Any, ByVal pUnkOuter As Long, ByVal dwClsContext As Long, ByRef riid As Any, ByRef ppv As IUnknown) As Long"}]}, + {"name":"CreateIACLHistory","kind":"function","vis":"public","signature":"Public Function CreateIACLHistory() As IUnknown","returnType":"IUnknown"}, + {"name":"CreateIACLMRU","kind":"function","vis":"public","signature":"Public Function CreateIACLMRU() As IUnknown","returnType":"IUnknown"}, + {"name":"CreateIACList2","kind":"function","vis":"public","signature":"Public Function CreateIACList2() As IUnknown","returnType":"IUnknown"}, + {"name":"CreateIACListISF","kind":"function","vis":"public","signature":"Public Function CreateIACListISF() As IUnknown","returnType":"IUnknown"}, + {"name":"CreateIAutoComplete2","kind":"function","vis":"public","signature":"Public Function CreateIAutoComplete2() As IUnknown","returnType":"IUnknown"}, + {"name":"CreateIAutoCompleteDropDown","kind":"function","vis":"public","signature":"Public Function CreateIAutoCompleteDropDown() As IUnknown","returnType":"IUnknown"}, + {"name":"CreateIObjMgr","kind":"function","vis":"public","signature":"Public Function CreateIObjMgr() As IUnknown","returnType":"IUnknown"}, + {"name":"E_NOINTERFACE","kind":"const","vis":"private","signature":"Private Const E_NOINTERFACE As Long = &H80004002"}, + {"name":"E_NOTIMPL","kind":"const","vis":"private","signature":"Private Const E_NOTIMPL As Long = &H80004001"}, + {"name":"E_POINTER","kind":"const","vis":"private","signature":"Private Const E_POINTER As Long = &H80004003"}, + {"name":"GetACLEnum","kind":"function","vis":"public","signature":"Public Function GetACLEnum(ByVal This As AutoCompleteGuids.IEnumStringVB) As AutoCompleteGuids.IEnumString","returnType":"AutoCompleteGuids.IEnumString"}, + {"name":"GetVTableIEnumString","kind":"function","vis":"private","signature":"Private Function GetVTableIEnumString() As LongPtr","returnType":"LongPtr"}, + {"name":"IEnumString_AddRef","kind":"function","vis":"private","signature":"Private Function IEnumString_AddRef(ByRef This As VTableIEnumStringDataStruct) As Long","returnType":"Long"}, + {"name":"IEnumString_Clone","kind":"function","vis":"private","signature":"Private Function IEnumString_Clone(ByRef This As VTableIEnumStringDataStruct, ByRef ppEnum As AutoCompleteGuids.IEnumString) As Long","returnType":"Long"}, + {"name":"IEnumString_Next","kind":"function","vis":"private","signature":"Private Function IEnumString_Next(ByRef This As VTableIEnumStringDataStruct, ByVal cElt As Long, ByVal rgElt As LongPtr, ByVal lpcEltFetched As LongPtr) As Long","returnType":"Long"}, + {"name":"IEnumString_QueryInterface","kind":"function","vis":"private","signature":"Private Function IEnumString_QueryInterface(ByRef This As VTableIEnumStringDataStruct, ByRef IID As AutoCompleteGuids.[_AC_GUID], ByRef pvObj As LongPtr) As Long","returnType":"Long"}, + {"name":"IEnumString_Release","kind":"function","vis":"private","signature":"Private Function IEnumString_Release(ByRef This As VTableIEnumStringDataStruct) As Long","returnType":"Long"}, + {"name":"IEnumString_Reset","kind":"function","vis":"private","signature":"Private Function IEnumString_Reset(ByRef This As VTableIEnumStringDataStruct) As Long","returnType":"Long"}, + {"name":"IEnumString_Skip","kind":"function","vis":"private","signature":"Private Function IEnumString_Skip(ByRef This As VTableIEnumStringDataStruct, ByVal cElt As Long) As Long","returnType":"Long"}, + {"name":"IID_IAutoComplete2","kind":"const","vis":"private","signature":"Private Const IID_IAutoComplete2 As String = \"{EAC04BC0-3791-11D2-BB95-0060977B464C}\""}, + {"name":"IID_IObjMgr","kind":"const","vis":"private","signature":"Private Const IID_IObjMgr As String = \"{00BB2761-6A77-11D0-A535-00C04FD7D062}\""}, + {"name":"IID_IUnknown","kind":"const","vis":"private","signature":"Private Const IID_IUnknown As String = \"{00000000-0000-0000-C000-000000000046}\""}, + {"name":"NULL_PTR","kind":"const","vis":"private","signatures":[{"cond":"Win64","signature":"Private Const NULL_PTR As LongPtr = 0"},{"cond":"Not (Win64)","signature":"Private Const NULL_PTR As Long = 0"}]}, + {"name":"PTR_SIZE","kind":"const","vis":"private","signatures":[{"cond":"Win64","signature":"Private Const PTR_SIZE As Long = 8"},{"cond":"Not (Win64)","signature":"Private Const PTR_SIZE As Long = 4"}]}, + {"name":"ProcPtr","kind":"function","vis":"private","signature":"Private Function ProcPtr(ByVal Address As LongPtr) As LongPtr","returnType":"LongPtr"}, + {"name":"S_OK","kind":"const","vis":"private","signature":"Private Const S_OK As Long = &H0"}, + {"name":"VTableIEnumString","kind":"field","vis":"private","signature":"Private VTableIEnumString(0 To 6) As LongPtr"} + ] + }, + { + "name": "LongPtr", + "kind": "enum", + "in": "AutoCompleteHandle", + "vis": "private", + "public": false, + "file": "AutoCompleteHandle.bas", + "signature": "Private Enum LongPtr", + "values": [ + {"name":"_"} + ] + }, + { + "name": "VTableIEnumStringDataStruct", + "kind": "type", + "in": "AutoCompleteHandle", + "vis": "private", + "public": false, + "file": "AutoCompleteHandle.bas", + "signature": "Private Type VTableIEnumStringDataStruct", + "fields": [ + {"name":"VTable","vis":"public","signature":"VTable As LongPtr"}, + {"name":"RefCount","vis":"public","signature":"RefCount As Long"}, + {"name":"Enumerable","vis":"public","signature":"Enumerable As AutoCompleteGuids.IEnumStringVB"} + ], + "members": [] + } + ], + "aliases": [], + "problems": [] +} diff --git a/indexer/snapshots/contributed/BigNumberLib/api.json b/indexer/snapshots/contributed/BigNumberLib/api.json new file mode 100644 index 000000000..b314dd1bf --- /dev/null +++ b/indexer/snapshots/contributed/BigNumberLib/api.json @@ -0,0 +1,336 @@ +{ + "format": 3, + "package": "BigNumberLib", + "project": "BigNumberLib", + "version": "0.0.0.0", + "types": [ + { + "name": "Absolute", + "kind": "module", + "vis": "public", + "file": "Tests/Absolute.twin", + "signature": "Module Absolute", + "members": [ + {"name":"RunTests","kind":"sub","vis":"public","signature":"Sub RunTests()"} + ] + }, + { + "name": "AddModulus", + "kind": "module", + "vis": "public", + "file": "Tests/AddModulus.twin", + "signature": "Module AddModulus", + "members": [ + {"name":"RunTests","kind":"sub","vis":"public","signature":"Sub RunTests()"} + ] + }, + { + "name": "Addition", + "kind": "module", + "vis": "public", + "file": "Tests/Addition.twin", + "signature": "Module Addition", + "members": [ + {"name":"RunTests","kind":"sub","vis":"public","signature":"Sub RunTests()"} + ] + }, + { + "name": "BigNumber", + "kind": "class", + "vis": "public", + "file": "BigNumber.twin", + "signature": "Public Class BigNumber", + "attrs": [{"name":"COMCreatable","args":"False"},{"name":"ClassId","args":"\"AAAF216D-144C-41E9-B225-03C74714CBDC\""},{"name":"InterfaceId","args":"\"3F8857C6-6B1B-43AD-A644-2F4C04366FC6\""}], + "members": [ + {"name":"AssignAbsolute","kind":"function","vis":"public","signature":"Public Function AssignAbsolute(ByRef a As BigNumber) As Boolean","returnType":"Boolean","description":"{this} = -a"}, + {"name":"AssignAddition","kind":"sub","vis":"public","signature":"Public Sub AssignAddition(ByRef a As BigNumber, ByRef b As BigNumber)","description":"{this} = a + b"}, + {"name":"AssignAdditionModulus","kind":"sub","vis":"public","signature":"Public Sub AssignAdditionModulus(ByRef a As BigNumber, ByRef b As BigNumber, ByRef mod_c As BigNumber)","description":"{this} = a + b (mod c)"}, + {"name":"AssignDivision","kind":"sub","vis":"public","signature":"Public Sub AssignDivision(ByRef a As BigNumber, ByRef b As BigNumber)","description":"{this} = a \\ b"}, + {"name":"AssignFromLong","kind":"sub","vis":"public","signature":"Public Sub AssignFromLong(ByVal a As Long)","description":"{this} = a"}, + {"name":"AssignGreatestCommonDivisor","kind":"sub","vis":"public","signature":"Public Sub AssignGreatestCommonDivisor(ByRef a As BigNumber, ByRef b As BigNumber)","description":"{this} = (a, b)"}, + {"name":"AssignLeastCommonMultiple","kind":"sub","vis":"public","signature":"Public Sub AssignLeastCommonMultiple(ByRef a As BigNumber, ByRef b As BigNumber)","description":"{this} = [a, b]"}, + {"name":"AssignModularMultiplicativeInverse","kind":"sub","vis":"public","signature":"Public Sub AssignModularMultiplicativeInverse(ByRef a As BigNumber, ByRef mod_b As BigNumber)","description":"{this} = 1/a (mod b)"}, + {"name":"AssignModulus","kind":"sub","vis":"public","signature":"Public Sub AssignModulus(ByRef a As BigNumber, ByRef b As BigNumber)","description":"{this} = a mod b"}, + {"name":"AssignMultiplication","kind":"sub","vis":"public","signature":"Public Sub AssignMultiplication(ByRef a As BigNumber, ByRef b As BigNumber)","description":"{this} = a * b"}, + {"name":"AssignMultiplicationModulus","kind":"sub","vis":"public","signature":"Public Sub AssignMultiplicationModulus(ByRef a As BigNumber, ByRef b As BigNumber, ByRef mod_c As BigNumber)","description":"{this} = a * b (mod c)"}, + {"name":"AssignNegation","kind":"function","vis":"public","signature":"Public Function AssignNegation(ByRef a As BigNumber) As Boolean","returnType":"Boolean","description":"{this} = -a"}, + {"name":"AssignShiftLeft","kind":"sub","vis":"public","signature":"Public Sub AssignShiftLeft(ByRef a As BigNumber, ByVal shiftAmount_b As Long)","description":"{this} = a << b"}, + {"name":"AssignShiftRight","kind":"sub","vis":"public","signature":"Public Sub AssignShiftRight(ByRef a As BigNumber, ByVal shiftAmount_b As Long)","description":"{this} = a >> b"}, + {"name":"AssignSquared","kind":"sub","vis":"public","signature":"Public Sub AssignSquared(ByRef a As BigNumber)","description":"{this} = a * a"}, + {"name":"AssignSquaredModulus","kind":"sub","vis":"public","signature":"Public Sub AssignSquaredModulus(ByRef a As BigNumber, ByRef mod_b As BigNumber)","description":"{this} = a * a (mod b)"}, + {"name":"AssignSubtraction","kind":"sub","vis":"public","signature":"Public Sub AssignSubtraction(ByRef a As BigNumber, ByRef b As BigNumber)","description":"{this} = a - b"}, + {"name":"AssignSubtractionModulus","kind":"sub","vis":"public","signature":"Public Sub AssignSubtractionModulus(ByRef a As BigNumber, ByRef b As BigNumber, ByRef mod_c As BigNumber)","description":"{this} = a - b (mod c)"}, + {"name":"BinaryRadix","kind":"const","vis":"private","signature":"Const BinaryRadix As Long = 2"}, + {"name":"DecimalRadix","kind":"const","vis":"private","signature":"Const DecimalRadix As Long = 10"}, + {"name":"FP_EQ","kind":"const","vis":"private","signature":"Const FP_EQ As Long = 0"}, + {"name":"FP_GT","kind":"const","vis":"private","signature":"Const FP_GT As Long = 1"}, + {"name":"FP_LT","kind":"const","vis":"private","signature":"Const FP_LT As Long = -1"}, + {"name":"FP_MEM","kind":"const","vis":"private","signature":"Const FP_MEM = 2"}, + {"name":"FP_OKAY","kind":"const","vis":"private","signature":"Const FP_OKAY = 0"}, + {"name":"FP_VAL","kind":"const","vis":"private","signature":"Const FP_VAL = 1"}, + {"name":"HandleError","kind":"sub","vis":"public","signature":"Public Sub HandleError()"}, + {"name":"HexRadix","kind":"const","vis":"private","signature":"Const HexRadix As Long = 16"}, + {"name":"IsEqualTo","kind":"function","vis":"public","signature":"Public Function IsEqualTo(ByRef b As BigNumber) As Boolean","returnType":"Boolean","description":"a == b"}, + {"name":"IsGreaterThan","kind":"function","vis":"public","signature":"Public Function IsGreaterThan(ByRef b As BigNumber) As Boolean","returnType":"Boolean","description":"a > b"}, + {"name":"IsGreaterThanOrEqualTo","kind":"function","vis":"public","signature":"Public Function IsGreaterThanOrEqualTo(ByRef b As BigNumber) As Boolean","returnType":"Boolean","description":"a >= b"}, + {"name":"IsLessThan","kind":"function","vis":"public","signature":"Public Function IsLessThan(ByRef b As BigNumber) As Boolean","returnType":"Boolean","description":"a < b"}, + {"name":"IsLessThanOrEqualTo","kind":"function","vis":"public","signature":"Public Function IsLessThanOrEqualTo(ByRef b As BigNumber) As Boolean","returnType":"Boolean","description":"a <= b"}, + {"name":"IsNegative","kind":"property","vis":"public","signature":"Public Property Get IsNegative() As Boolean","returnType":"Boolean","accessor":"Get"}, + {"name":"IsNegative","kind":"property","vis":"public","signature":"Public Property Let IsNegative(Value As Boolean)","accessor":"Let"}, + {"name":"OctalRadix","kind":"const","vis":"private","signature":"Const OctalRadix As Long = 8"}, + {"name":"ValueBinary","kind":"property","vis":"public","signature":"Property Get ValueBinary() As String","returnType":"String","accessor":"Get","description":"returns/sets the value as a binary-string respresentation"}, + {"name":"ValueBinary","kind":"property","vis":"public","signature":"Property Let ValueBinary(ByVal Value As String)","accessor":"Let","description":"returns/sets the value as a binary-string respresentation"}, + {"name":"ValueHex","kind":"property","vis":"public","signature":"Property Get ValueHex() As String","returnType":"String","accessor":"Get","description":"returns/sets the value as a hex-string respresentation"}, + {"name":"ValueHex","kind":"property","vis":"public","signature":"Property Let ValueHex(ByVal Value As String)","accessor":"Let","description":"returns/sets the value as a hex-string respresentation"}, + {"name":"ValueOctal","kind":"property","vis":"public","signature":"Property Get ValueOctal() As String","returnType":"String","accessor":"Get","description":"returns/sets the value as a octal-string respresentation"}, + {"name":"ValueOctal","kind":"property","vis":"public","signature":"Property Let ValueOctal(ByVal Value As String)","accessor":"Let","description":"returns/sets the value as a octal-string respresentation"}, + {"name":"ValueString","kind":"property","vis":"public","signature":"Property Get ValueString() As String","returnType":"String","accessor":"Get","attrs":[{"name":"DefaultMember"}],"description":"returns/sets the value as a string respresentation"}, + {"name":"ValueString","kind":"property","vis":"public","signature":"Property Let ValueString(ByVal Value As String)","accessor":"Let","attrs":[{"name":"DefaultMember"}],"description":"returns/sets the value as a string respresentation"}, + {"name":"fp_add","kind":"sub","vis":"private","declare":true,"signature":"Private Declare PtrSafe Sub fp_add CDecl Lib libtfm (ByRef a As fp_int, ByRef b As fp_int, ByRef out As fp_int)"}, + {"name":"fp_addmod","kind":"function","vis":"private","declare":true,"signature":"Private Declare PtrSafe Function fp_addmod CDecl Lib libtfm (ByRef a As fp_int, ByRef b As fp_int, ByRef mod As fp_int, ByRef out As fp_int) As Long","returnType":"Long"}, + {"name":"fp_cmp","kind":"function","vis":"private","declare":true,"signature":"Private Declare PtrSafe Function fp_cmp CDecl Lib libtfm (ByRef a As fp_int, ByRef b As fp_int) As Long","returnType":"Long"}, + {"name":"fp_cmp_mag","kind":"function","vis":"private","declare":true,"signature":"Private Declare PtrSafe Function fp_cmp_mag CDecl Lib libtfm (ByRef a As fp_int, ByRef b As fp_int) As Long","returnType":"Long"}, + {"name":"fp_div","kind":"function","vis":"private","declare":true,"signature":"Private Declare PtrSafe Function fp_div CDecl Lib libtfm (ByRef a As fp_int, ByRef b As fp_int, ByRef out As fp_int, ByRef remainder As fp_int) As Long","returnType":"Long"}, + {"name":"fp_div_2","kind":"sub","vis":"private","declare":true,"signature":"Private Declare PtrSafe Sub fp_div_2 CDecl Lib libtfm (ByRef a As fp_int, ByRef b As fp_int)"}, + {"name":"fp_div_2d","kind":"sub","vis":"private","declare":true,"signature":"Private Declare PtrSafe Sub fp_div_2d CDecl Lib libtfm (ByRef a As fp_int, ByVal b As Long, ByRef out As fp_int, ByRef remainder As fp_int)"}, + {"name":"fp_gcd","kind":"sub","vis":"private","declare":true,"signature":"Private Declare PtrSafe Sub fp_gcd CDecl Lib libtfm (ByRef a As fp_int, ByRef b As fp_int, ByRef out As fp_int)"}, + {"name":"fp_invmod","kind":"function","vis":"private","declare":true,"signature":"Private Declare PtrSafe Function fp_invmod CDecl Lib libtfm (ByRef a As fp_int, ByRef mod As fp_int, ByRef out As fp_int) As Long","returnType":"Long"}, + {"name":"fp_lcm","kind":"sub","vis":"private","declare":true,"signature":"Private Declare PtrSafe Sub fp_lcm CDecl Lib libtfm (ByRef a As fp_int, ByRef b As fp_int, ByRef out As fp_int)"}, + {"name":"fp_mod","kind":"function","vis":"private","declare":true,"signature":"Private Declare PtrSafe Function fp_mod CDecl Lib libtfm (ByRef a As fp_int, ByRef b As fp_int, ByRef out As fp_int) As Long","returnType":"Long"}, + {"name":"fp_mul","kind":"sub","vis":"private","declare":true,"signature":"Private Declare PtrSafe Sub fp_mul CDecl Lib libtfm (ByRef a As fp_int, ByRef b As fp_int, ByRef out As fp_int)"}, + {"name":"fp_mul_2","kind":"sub","vis":"private","declare":true,"signature":"Private Declare PtrSafe Sub fp_mul_2 CDecl Lib libtfm (ByRef a As fp_int, ByRef b As fp_int)"}, + {"name":"fp_mul_2d","kind":"sub","vis":"private","declare":true,"signature":"Private Declare PtrSafe Sub fp_mul_2d CDecl Lib libtfm (ByRef a As fp_int, ByVal b As Long, ByRef out As fp_int)"}, + {"name":"fp_mulmod","kind":"function","vis":"private","declare":true,"signature":"Private Declare PtrSafe Function fp_mulmod CDecl Lib libtfm (ByRef a As fp_int, ByRef b As fp_int, ByRef mod As fp_int, ByRef out As fp_int) As Long","returnType":"Long"}, + {"name":"fp_radix_size","kind":"function","vis":"private","declare":true,"signature":"Private Declare PtrSafe Function fp_radix_size CDecl Lib libtfm (ByRef value As fp_int, ByVal radix As Long, ByRef outSizeReqd As Long) As Long","returnType":"Long"}, + {"name":"fp_read_radix","kind":"function","vis":"private","declare":true,"signature":"Private Declare PtrSafe Function fp_read_radix CDecl Lib libtfm (ByRef out As fp_int, ByVal string As String, ByVal radix As Long) As Long","returnType":"Long"}, + {"name":"fp_set","kind":"sub","vis":"private","declare":true,"signature":"Private Declare PtrSafe Sub fp_set CDecl Lib libtfm (ByRef a As fp_int, ByVal b As Long)"}, + {"name":"fp_sqr","kind":"sub","vis":"private","declare":true,"signature":"Private Declare PtrSafe Sub fp_sqr CDecl Lib libtfm (ByRef a As fp_int, ByRef out As fp_int)"}, + {"name":"fp_sqrmod","kind":"function","vis":"private","declare":true,"signature":"Private Declare PtrSafe Function fp_sqrmod CDecl Lib libtfm (ByRef a As fp_int, ByRef mod As fp_int, ByRef out As fp_int) As Long","returnType":"Long"}, + {"name":"fp_sub","kind":"sub","vis":"private","declare":true,"signature":"Private Declare PtrSafe Sub fp_sub CDecl Lib libtfm (ByRef a As fp_int, ByRef b As fp_int, ByRef out As fp_int)"}, + {"name":"fp_submod","kind":"function","vis":"private","declare":true,"signature":"Private Declare PtrSafe Function fp_submod CDecl Lib libtfm (ByRef a As fp_int, ByRef b As fp_int, ByRef mod As fp_int, ByRef out As fp_int) As Long","returnType":"Long"}, + {"name":"fp_toradix","kind":"function","vis":"private","declare":true,"signature":"Private Declare PtrSafe Function fp_toradix CDecl Lib libtfm (ByRef value As fp_int, ByVal result As String, ByVal radix As Long) As Long","returnType":"Long"}, + {"name":"internalData","kind":"field","vis":"friend","signature":"Friend internalData As fp_int"}, + {"name":"lastError","kind":"field","vis":"private","signature":"Private lastError As Long"} + ] + }, + { + "name": "fp_int", + "kind": "type", + "in": "BigNumber", + "vis": "public", + "file": "BigNumber.twin", + "signature": "Type fp_int", + "fields": [ + {"name":"blocks","vis":"public","signature":"blocks(0 To 63) As LongPtr"}, + {"name":"blocks","vis":"public","signature":"blocks(0 To 127) As Long"}, + {"name":"overReservedSpace","vis":"public","signature":"overReservedSpace(0 To 7) As LongPtr"}, + {"name":"usedBlocks","vis":"public","signature":"usedBlocks As Long"}, + {"name":"sign","vis":"public","signature":"sign As Long"} + ], + "members": [] + }, + { + "name": "BigNumberTests", + "kind": "module", + "vis": "public", + "file": "Tests.twin", + "signature": "Public Module BigNumberTests", + "members": [ + {"name":"Example","kind":"sub","vis":"private","signature":"Private Sub Example()"}, + {"name":"RunAllTests","kind":"sub","vis":"public","signature":"Public Sub RunAllTests()"} + ] + }, + { + "name": "Comparisons", + "kind": "module", + "vis": "public", + "file": "Tests/Comparisons.twin", + "signature": "Module Comparisons", + "members": [ + {"name":"RunTests","kind":"sub","vis":"public","signature":"Sub RunTests()"} + ] + }, + { + "name": "Divide", + "kind": "module", + "vis": "public", + "file": "Tests/Divide.twin", + "signature": "Module Divide", + "members": [ + {"name":"RunTests","kind":"sub","vis":"public","signature":"Sub RunTests()"} + ] + }, + { + "name": "GreatestCommonDivisor", + "kind": "module", + "vis": "public", + "file": "Tests/GreatestCommonDivisor.twin", + "signature": "Module GreatestCommonDivisor", + "members": [ + {"name":"RunTests","kind":"sub","vis":"public","signature":"Sub RunTests()"} + ] + }, + { + "name": "LeastCommonMultiple", + "kind": "module", + "vis": "public", + "file": "Tests/LeastCommonMultiple.twin", + "signature": "Module LeastCommonMultiple", + "members": [ + {"name":"RunTests","kind":"sub","vis":"public","signature":"Sub RunTests()"} + ] + }, + { + "name": "ModularMultiplicativeInverse", + "kind": "module", + "vis": "public", + "file": "Tests/ModularMultiplicativeInverse.twin", + "signature": "Module ModularMultiplicativeInverse", + "members": [ + {"name":"RunTests","kind":"sub","vis":"public","signature":"Sub RunTests()"} + ] + }, + { + "name": "Modulus", + "kind": "module", + "vis": "public", + "file": "Tests/Modulus.twin", + "signature": "Module Modulus", + "members": [ + {"name":"RunTests","kind":"sub","vis":"public","signature":"Sub RunTests()"} + ] + }, + { + "name": "Multiply", + "kind": "module", + "vis": "public", + "file": "Tests/Multiply.twin", + "signature": "Module Multiply", + "members": [ + {"name":"RunTests","kind":"sub","vis":"public","signature":"Sub RunTests()"} + ] + }, + { + "name": "MultiplyModulus", + "kind": "module", + "vis": "public", + "file": "Tests/MultiplyModulus.twin", + "signature": "Module MultiplyModulus", + "members": [ + {"name":"RunTests","kind":"sub","vis":"public","signature":"Sub RunTests()"} + ] + }, + { + "name": "Negate", + "kind": "module", + "vis": "public", + "file": "Tests/Negate.twin", + "signature": "Module Negate", + "members": [ + {"name":"RunTests","kind":"sub","vis":"public","signature":"Sub RunTests()"} + ] + }, + { + "name": "ShiftLeft", + "kind": "module", + "vis": "public", + "file": "Tests/ShiftLeft.twin", + "signature": "Module ShiftLeft", + "members": [ + {"name":"RunTests","kind":"sub","vis":"public","signature":"Sub RunTests()"} + ] + }, + { + "name": "ShiftRight", + "kind": "module", + "vis": "public", + "file": "Tests/ShiftRight.twin", + "signature": "Module ShiftRight", + "members": [ + {"name":"RunTests","kind":"sub","vis":"public","signature":"Sub RunTests()"} + ] + }, + { + "name": "Square", + "kind": "module", + "vis": "public", + "file": "Tests/Square.twin", + "signature": "Module Square", + "members": [ + {"name":"RunTests","kind":"sub","vis":"public","signature":"Sub RunTests()"} + ] + }, + { + "name": "SquareModulus", + "kind": "module", + "vis": "public", + "file": "Tests/SquareModulus.twin", + "signature": "Module SquareModulus", + "members": [ + {"name":"RunTests","kind":"sub","vis":"public","signature":"Sub RunTests()"} + ] + }, + { + "name": "Subtract", + "kind": "module", + "vis": "public", + "file": "Tests/Subtract.twin", + "signature": "Module Subtract", + "members": [ + {"name":"RunTests","kind":"sub","vis":"public","signature":"Sub RunTests()"} + ] + }, + { + "name": "SubtractModulus", + "kind": "module", + "vis": "public", + "file": "Tests/SubtractModulus.twin", + "signature": "Module SubtractModulus", + "members": [ + {"name":"RunTests","kind":"sub","vis":"public","signature":"Sub RunTests()"} + ] + }, + { + "name": "ValueBinary", + "kind": "module", + "vis": "public", + "file": "Tests/ValueBinary.twin", + "signature": "Module ValueBinary", + "members": [ + {"name":"RunTests","kind":"sub","vis":"public","signature":"Sub RunTests()"} + ] + }, + { + "name": "ValueHex", + "kind": "module", + "vis": "public", + "file": "Tests/ValueHex.twin", + "signature": "Module ValueHex", + "members": [ + {"name":"RunTests","kind":"sub","vis":"public","signature":"Sub RunTests()"} + ] + }, + { + "name": "ValueOctal", + "kind": "module", + "vis": "public", + "file": "Tests/ValueOctal.twin", + "signature": "Module ValueOctal", + "members": [ + {"name":"RunTests","kind":"sub","vis":"public","signature":"Sub RunTests()"} + ] + }, + { + "name": "ValueString", + "kind": "module", + "vis": "public", + "file": "Tests/ValueString.twin", + "signature": "Module ValueString", + "members": [ + {"name":"RunTests","kind":"sub","vis":"public","signature":"Sub RunTests()"} + ] + } + ], + "aliases": [], + "problems": [] +} diff --git a/indexer/snapshots/contributed/FileProps/api.json b/indexer/snapshots/contributed/FileProps/api.json new file mode 100644 index 000000000..bff776cbb --- /dev/null +++ b/indexer/snapshots/contributed/FileProps/api.json @@ -0,0 +1,128 @@ +{ + "format": 3, + "package": "FileProps", + "project": "FileProps", + "version": "1.7.1.0", + "types": [ + { + "name": "Example", + "kind": "module", + "vis": "public", + "file": "Example.twin", + "signature": "Public Module Example", + "members": [ + {"name":"DisplayInDebugConsole","kind":"sub","vis":"public","signature":"Public Sub DisplayInDebugConsole(Optional FilePath As String)","description":"`FilePath` is optional, if omitted will display a file dialog for choosing the file"} + ] + }, + { + "name": "FileProperties", + "kind": "class", + "vis": "public", + "file": "FileProperties.twin", + "signature": "Public Class FileProperties", + "members": [ + {"name":"Count","kind":"property","vis":"public","signature":"Property Get Count() As Long","returnType":"Long","accessor":"Get","description":"Returns the count of properties defined in the collection"}, + {"name":"FilePath","kind":"property","vis":"public","signature":"Property Get FilePath() As String","returnType":"String","accessor":"Get","description":"Returns a string containing the full file path of the file that was opened"}, + {"name":"Item","kind":"property","vis":"public","signature":"Property Get Item(ByVal IndexOrNameOrID As Variant) As FileProperty","returnType":"FileProperty","accessor":"Get","description":"IndexOrNameOrID can be an integer index (from zero to .Count-1) or can be a name that corresponds to FileProperty.Name or can be an ID that corresponds to FileProperty.ID"}, + {"name":"VCOMObject","kind":"field","vis":"public","signature":"Public VCOMObject As Object"} + ] + }, + { + "name": "FileProperty", + "kind": "class", + "vis": "public", + "file": "FileProperty.twin", + "signature": "Public Class FileProperty", + "members": [ + {"name":"ID","kind":"property","vis":"public","signature":"Property Get ID() As String","returnType":"String","accessor":"Get","description":"This is a unique identity that can always be used to refer to the property. It consists of a GUID (identifying the property schema) followed by an integer (identifying the property index in the schema)."}, + {"name":"Name","kind":"property","vis":"public","signature":"Property Get Name() As String","returnType":"String","accessor":"Get","description":"Returns the system identity name of the property. e.g. 'System.ItemFolderNameDisplay'. This is safe to use as an identity field even on non-English systems. "}, + {"name":"NameDesc","kind":"property","vis":"public","signature":"Property Get NameDesc() As String","returnType":"String","accessor":"Get","description":"This is a localized version of the name, but is not always available"}, + {"name":"VCOMObject","kind":"field","vis":"public","signature":"Public VCOMObject As Object"}, + {"name":"Value","kind":"property","vis":"public","signature":"Property Get Value() As Variant","returnType":"Variant","accessor":"Get","description":"This is a VARIANT value respresenting the current value of the property. TIP: This can be an array for multi-value type properties"}, + {"name":"Value","kind":"property","vis":"public","signature":"Property Let Value(ByVal Value As Variant)","accessor":"Let","description":"This is the write method for the property Value. Requires Vista or newer. Returns a 'Permission Denied' error if the property is not writable"}, + {"name":"ValueDesc","kind":"property","vis":"public","signature":"Property Get ValueDesc() As String","returnType":"String","accessor":"Get","description":"This is a STRING value representing the current value of the property, in LOCALIZED form. Multi-value properties are already combined into a single string"} + ] + }, + { + "name": "FilePropertyExplorer", + "kind": "class", + "vis": "public", + "file": "FilePropertyExplorer.twin", + "signature": "Public Class FilePropertyExplorer", + "attrs": [{"name":"PredeclaredId"}], + "members": [ + {"name":"BrowseAndOpenFile","kind":"function","vis":"public","signature":"Function BrowseAndOpenFile(Optional ByVal WriteSupport As Boolean) As FileProperties","returnType":"FileProperties","description":"Opens a file dialog for the user to select a file, and then returns a FileProperties collection that contains details of the properties available on the file"}, + {"name":"CastToObject","kind":"sub","vis":"private","declare":true,"signatures":[{"cond":"VBA7 = False","signature":"Private Declare Sub CastToObject Lib \"kernel32\" Alias \"RtlMoveMemory\" (ByRef Dest As Object, ByRef Source As Long, ByVal Size As Long)"},{"cond":"Not (VBA7 = False)","signature":"Private Declare PtrSafe Sub CastToObject Lib \"kernel32\" Alias \"RtlMoveMemory\" (ByRef Dest As Object, ByRef Source As LongPtr, ByVal Size As LongPtr)"}]}, + {"name":"Class_Initialize","kind":"sub","vis":"private","signature":"Private Sub Class_Initialize()"}, + {"name":"CopyMemoryAnsi","kind":"sub","vis":"private","declare":true,"signatures":[{"cond":"VBA7 = False","signature":"Private Declare Sub CopyMemoryAnsi Lib \"kernel32\" Alias \"RtlMoveMemory\" (ByVal Dest As Long, ByVal Source As String, ByVal Size As Long)"},{"cond":"Not (VBA7 = False)","signature":"Private Declare PtrSafe Sub CopyMemoryAnsi Lib \"kernel32\" Alias \"RtlMoveMemory\" (ByVal Dest As LongPtr, ByVal Source As String, ByVal Size As LongPtr)"}]}, + {"name":"DECOMPRESSED_EXT","kind":"const","vis":"private","signature":"Private Const DECOMPRESSED_EXT As Long = 56493"}, + {"name":"ERR_OUT_OF_MEMORY","kind":"const","vis":"private","signature":"Private Const ERR_OUT_OF_MEMORY As Long = &H7"}, + {"name":"GetModuleHandleA","kind":"function","vis":"private","declare":true,"signatures":[{"cond":"VBA7 = False","signature":"Private Declare Function GetModuleHandleA Lib \"kernel32\" (ByVal ProcName As String) As Long","returnType":"Long"},{"cond":"Not (VBA7 = False)","signature":"Private Declare PtrSafe Function GetModuleHandleA Lib \"kernel32\" (ByVal ProcName As String) As LongPtr","returnType":"LongPtr"}]}, + {"name":"GetProcAddress","kind":"function","vis":"private","declare":true,"signatures":[{"cond":"VBA7 = False","signature":"Private Declare Function GetProcAddress Lib \"kernel32\" (ByVal Module As Long, ByVal ProcName As String) As Long","returnType":"Long"},{"cond":"Not (VBA7 = False)","signature":"Private Declare PtrSafe Function GetProcAddress Lib \"kernel32\" (ByVal Module As LongPtr, ByVal ProcName As String) As LongPtr","returnType":"LongPtr"}]}, + {"name":"MEM_RESERVE_AND_COMMIT","kind":"const","vis":"private","signature":"Private Const MEM_RESERVE_AND_COMMIT As Long = &H3000"}, + {"name":"OPTION_BASE","kind":"const","vis":"private","signature":"Private Const OPTION_BASE As Long = 0"}, + {"name":"OPTION_DISABLEDCLASSES","kind":"const","vis":"private","signature":"Private Const OPTION_DISABLEDCLASSES As String = \"\""}, + {"name":"OPTION_FLAGS","kind":"const","vis":"private","signature":"Private Const OPTION_FLAGS As Long = 2"}, + {"name":"OPTION_INCLUDE_REFERENCEDOCS","kind":"const","vis":"private","signature":"Private Const OPTION_INCLUDE_REFERENCEDOCS As Long = 0"}, + {"name":"OpenFile","kind":"function","vis":"public","signature":"Function OpenFile(ByVal FilePath As String, Optional ByVal WriteSupport As Boolean) As FileProperties","returnType":"FileProperties","description":"Given the path to a valid file, returns a FileProperties collection that contains details of the properties available on the file"}, + {"name":"PAGE_EXECUTE_RW","kind":"const","vis":"private","signature":"Private Const PAGE_EXECUTE_RW As Long = &H40"}, + {"name":"SIZEOF_PTR32","kind":"const","vis":"private","signature":"Private Const SIZEOF_PTR32 As Long = &H4"}, + {"name":"SIZEOF_PTR64","kind":"const","vis":"private","signature":"Private Const SIZEOF_PTR64 As Long = &H8"}, + {"name":"VirtualAlloc","kind":"function","vis":"private","declare":true,"signatures":[{"cond":"VBA7 = False","signature":"Private Declare Function VirtualAlloc Lib \"kernel32\" (ByVal Address As Long, ByVal Size As Long, ByVal AllocationType As Long, ByVal Protect As Long) As Long","returnType":"Long"},{"cond":"Not (VBA7 = False)","signature":"Private Declare PtrSafe Function VirtualAlloc Lib \"kernel32\" (ByVal Address As LongPtr, ByVal Size As LongPtr, ByVal AllocationType As Long, ByVal Protect As Long) As LongPtr","returnType":"LongPtr"}]}, + {"name":"m_ClassFactory","kind":"field","vis":"private","signature":"Private m_ClassFactory As Object"} + ] + }, + { + "name": "IDispatchVTable", + "kind": "type", + "in": "FilePropertyExplorer", + "vis": "private", + "public": false, + "file": "FilePropertyExplorer.twin", + "signature": "Private Type IDispatchVTable", + "fields": [ + {"name":"QueryInterface","vis":"public","signature":"QueryInterface As Long"}, + {"name":"AddRef","vis":"public","signature":"AddRef As Long"}, + {"name":"Release","vis":"public","signature":"Release As Long"}, + {"name":"GetTypeInfoCount","vis":"public","signature":"GetTypeInfoCount As Long"}, + {"name":"GetTypeInfo","vis":"public","signature":"GetTypeInfo As Long"}, + {"name":"GetIDsOfNames","vis":"public","signature":"GetIDsOfNames As Long"}, + {"name":"Invoke","vis":"public","signature":"Invoke As Long"} + ], + "members": [] + }, + { + "name": "IDispatchVTable", + "kind": "type", + "in": "FilePropertyExplorer", + "vis": "private", + "public": false, + "file": "FilePropertyExplorer.twin", + "signature": "Private Type IDispatchVTable", + "fields": [ + {"name":"QueryInterface","vis":"public","signature":"QueryInterface As LongPtr"}, + {"name":"AddRef","vis":"public","signature":"AddRef As LongPtr"}, + {"name":"Release","vis":"public","signature":"Release As LongPtr"}, + {"name":"GetTypeInfoCount","vis":"public","signature":"GetTypeInfoCount As LongPtr"}, + {"name":"GetTypeInfo","vis":"public","signature":"GetTypeInfo As LongPtr"}, + {"name":"GetIDsOfNames","vis":"public","signature":"GetIDsOfNames As LongPtr"}, + {"name":"Invoke","vis":"public","signature":"Invoke As LongPtr"} + ], + "members": [] + }, + { + "name": "FilePropertyExplorer_Helper", + "kind": "class", + "vis": "private", + "public": false, + "file": "FilePropertyExplorer_Helper.twin", + "signature": "Private Class FilePropertyExplorer_Helper", + "members": [ + {"name":"New_FileProperties","kind":"field","vis":"public","signature":"Public New_FileProperties As New FileProperties"}, + {"name":"New_FileProperty","kind":"field","vis":"public","signature":"Public New_FileProperty As New FileProperty"} + ] + } + ], + "aliases": [], + "problems": [] +} diff --git a/indexer/snapshots/contributed/Fmt/api.json b/indexer/snapshots/contributed/Fmt/api.json new file mode 100644 index 000000000..679cb6d9c --- /dev/null +++ b/indexer/snapshots/contributed/Fmt/api.json @@ -0,0 +1,374 @@ +{ + "format": 3, + "package": "Fmt", + "project": "Fmt", + "version": "1.0.0.0", + "types": [ + { + "name": "CurrencySFI", + "kind": "class", + "vis": "public", + "file": "CurrencySFI.cls", + "signature": "Class CurrencySFI", + "implements": ["IStringFormatIdentifier"], + "members": [ + {"name":"IStringFormatIdentifier_GetFormattedValue","kind":"function","vis":"private","signature":"Private Function IStringFormatIdentifier_GetFormattedValue(ByVal value As Variant, ByVal specifier As StringFormatSpecifier) As String","returnType":"String"}, + {"name":"IStringFormatIdentifier_IsIdentifierMatch","kind":"function","vis":"private","signature":"Private Function IStringFormatIdentifier_IsIdentifierMatch(ByVal specifier As StringFormatSpecifier) As Boolean","returnType":"Boolean"} + ] + }, + { + "name": "DateTimeSFI", + "kind": "class", + "vis": "public", + "file": "DateTimeSFI.cls", + "signature": "Class DateTimeSFI", + "implements": ["IStringFormatIdentifier"], + "members": [ + {"name":"IStringFormatIdentifier_GetFormattedValue","kind":"function","vis":"private","signature":"Private Function IStringFormatIdentifier_GetFormattedValue(ByVal value As Variant, ByVal specifier As StringFormatSpecifier) As String","returnType":"String"}, + {"name":"IStringFormatIdentifier_IsIdentifierMatch","kind":"function","vis":"private","signature":"Private Function IStringFormatIdentifier_IsIdentifierMatch(ByVal specifier As StringFormatSpecifier) As Boolean","returnType":"Boolean"}, + {"name":"formatStringFromIdentifierDict","kind":"property","vis":"private","signature":"Private Static Property Get formatStringFromIdentifierDict() As Dictionary","returnType":"Dictionary","accessor":"Get"} + ] + }, + { + "name": "DecimalSFI", + "kind": "class", + "vis": "public", + "file": "DecimalSFI.cls", + "signature": "Class DecimalSFI", + "implements": ["IStringFormatIdentifier"], + "members": [ + {"name":"IStringFormatIdentifier_GetFormattedValue","kind":"function","vis":"private","signature":"Private Function IStringFormatIdentifier_GetFormattedValue(ByVal value As Variant, ByVal specifier As StringFormatSpecifier) As String","returnType":"String"}, + {"name":"IStringFormatIdentifier_IsIdentifierMatch","kind":"function","vis":"private","signature":"Private Function IStringFormatIdentifier_IsIdentifierMatch(ByVal specifier As StringFormatSpecifier) As Boolean","returnType":"Boolean"} + ] + }, + { + "name": "EscapeSequence", + "kind": "class", + "vis": "public", + "file": "EscapeSequence.cls", + "signature": "Class EscapeSequence", + "members": [ + {"name":"AsciiBase","kind":"property","vis":"public","signature":"Public Property Get AsciiBase() As AsciiEscapeBase","returnType":"AsciiEscapeBase","accessor":"Get"}, + {"name":"AsciiBase","kind":"property","vis":"friend","signature":"Friend Property Let AsciiBase(value As AsciiEscapeBase)","accessor":"Let"}, + {"name":"Create","kind":"function","vis":"public","signature":"Public Function Create(ByVal escape As String, ByVal replacement As String, Optional ByVal isAsciiReplacement As Boolean = False, Optional ByVal base As AsciiEscapeBase = Octal) As EscapeSequence","returnType":"EscapeSequence"}, + {"name":"EscapeString","kind":"property","vis":"public","signature":"Public Property Get EscapeString() As String","returnType":"String","accessor":"Get"}, + {"name":"EscapeString","kind":"property","vis":"friend","signature":"Friend Property Let EscapeString(value As String)","accessor":"Let"}, + {"name":"Execute","kind":"sub","vis":"public","signature":"Public Sub Execute(ByRef string_value As String)"}, + {"name":"IsAsciiCharacter","kind":"property","vis":"public","signature":"Public Property Get IsAsciiCharacter() As Boolean","returnType":"Boolean","accessor":"Get"}, + {"name":"IsAsciiCharacter","kind":"property","vis":"friend","signature":"Friend Property Let IsAsciiCharacter(value As Boolean)","accessor":"Let"}, + {"name":"ProcessAsciiEscape","kind":"sub","vis":"private","signature":"Private Sub ProcessAsciiEscape(ByRef format_string As String, ByVal regexPattern As String)"}, + {"name":"ReplacementString","kind":"property","vis":"public","signature":"Public Property Get ReplacementString() As String","returnType":"String","accessor":"Get"}, + {"name":"ReplacementString","kind":"property","vis":"friend","signature":"Friend Property Let ReplacementString(value As String)","accessor":"Let"}, + {"name":"Self","kind":"property","vis":"friend","signature":"Friend Property Get Self() As EscapeSequence","returnType":"EscapeSequence","accessor":"Get"}, + {"name":"this","kind":"field","vis":"private","signature":"Private this As tEscapeSequence"} + ] + }, + { + "name": "AsciiEscapeBase", + "kind": "enum", + "in": "EscapeSequence", + "vis": "public", + "file": "EscapeSequence.cls", + "signature": "Public Enum AsciiEscapeBase", + "values": [ + {"name":"Octal"}, + {"name":"Hexadecimal"} + ] + }, + { + "name": "tEscapeSequence", + "kind": "type", + "in": "EscapeSequence", + "vis": "private", + "public": false, + "file": "EscapeSequence.cls", + "signature": "Private Type tEscapeSequence", + "fields": [ + {"name":"EscapeString","vis":"public","signature":"EscapeString As String"}, + {"name":"ReplacementString","vis":"public","signature":"ReplacementString As String"}, + {"name":"IsAsciiCharacter","vis":"public","signature":"IsAsciiCharacter As Boolean"}, + {"name":"AsciiBase","vis":"public","signature":"AsciiBase As AsciiEscapeBase"} + ], + "members": [] + }, + { + "name": "ExponentialSFI", + "kind": "class", + "vis": "public", + "file": "ExponentialSFI.cls", + "signature": "Class ExponentialSFI", + "implements": ["IStringFormatIdentifier"], + "members": [ + {"name":"IStringFormatIdentifier_GetFormattedValue","kind":"function","vis":"private","signature":"Private Function IStringFormatIdentifier_GetFormattedValue(ByVal value As Variant, ByVal specifier As StringFormatSpecifier) As String","returnType":"String"}, + {"name":"IStringFormatIdentifier_IsIdentifierMatch","kind":"function","vis":"private","signature":"Private Function IStringFormatIdentifier_IsIdentifierMatch(ByVal specifier As StringFormatSpecifier) As Boolean","returnType":"Boolean"}, + {"name":"ParseExponent","kind":"function","vis":"public","signature":"Public Function ParseExponent(ByVal formattedValue As String) As Long","returnType":"Long"} + ] + }, + { + "name": "FixedPointSFI", + "kind": "class", + "vis": "public", + "file": "FixedPointSFI.cls", + "signature": "Class FixedPointSFI", + "implements": ["IStringFormatIdentifier"], + "members": [ + {"name":"IStringFormatIdentifier_GetFormattedValue","kind":"function","vis":"private","signature":"Private Function IStringFormatIdentifier_GetFormattedValue(ByVal value As Variant, ByVal specifier As StringFormatSpecifier) As String","returnType":"String"}, + {"name":"IStringFormatIdentifier_IsIdentifierMatch","kind":"function","vis":"private","signature":"Private Function IStringFormatIdentifier_IsIdentifierMatch(ByVal specifier As StringFormatSpecifier) As Boolean","returnType":"Boolean"} + ] + }, + { + "name": "FormerEntryPoint", + "kind": "module", + "vis": "public", + "file": "FormerEntryPoint.bas", + "signature": "Module FormerEntryPoint", + "members": [ + {"name":"FormerStringFormat","kind":"function","vis":"public","signature":"Public Function FormerStringFormat(format_string As String, ParamArray values() as variant) As String","returnType":"String"} + ] + }, + { + "name": "FormerEscapeSequence", + "kind": "class", + "vis": "public", + "file": "FormerEscapeSequence.cls", + "signature": "Class FormerEscapeSequence", + "members": [ + {"name":"Create","kind":"function","vis":"public","signature":"Public Function Create(escape As String, replacement As String) As FormerEscapeSequence","returnType":"FormerEscapeSequence"}, + {"name":"EscapeString","kind":"property","vis":"public","signature":"Public Property Get EscapeString() As String","returnType":"String","accessor":"Get"}, + {"name":"EscapeString","kind":"property","vis":"friend","signature":"Friend Property Let EscapeString(value As String)","accessor":"Let"}, + {"name":"ReplacementString","kind":"property","vis":"public","signature":"Public Property Get ReplacementString() As String","returnType":"String","accessor":"Get"}, + {"name":"ReplacementString","kind":"property","vis":"friend","signature":"Friend Property Let ReplacementString(value As String)","accessor":"Let"}, + {"name":"this","kind":"field","vis":"private","signature":"Private this As tFormerEscapeSequence"} + ] + }, + { + "name": "tFormerEscapeSequence", + "kind": "type", + "in": "FormerEscapeSequence", + "vis": "private", + "public": false, + "file": "FormerEscapeSequence.cls", + "signature": "Private Type tFormerEscapeSequence", + "fields": [ + {"name":"EscapeString","vis":"public","signature":"EscapeString As String"}, + {"name":"ReplacementString","vis":"public","signature":"ReplacementString As String"} + ], + "members": [] + }, + { + "name": "GeneralNumericSFI", + "kind": "class", + "vis": "public", + "file": "GeneralNumericSFI.cls", + "signature": "Class GeneralNumericSFI", + "implements": ["IStringFormatIdentifier"], + "members": [ + {"name":"GetFormattedValue","kind":"function","vis":"public","signature":"Public Function GetFormattedValue(ByVal value As Variant, ByVal specifier As StringFormatSpecifier) As String","returnType":"String"}, + {"name":"IStringFormatIdentifier_GetFormattedValue","kind":"function","vis":"private","signature":"Private Function IStringFormatIdentifier_GetFormattedValue(ByVal value As Variant, ByVal specifier As StringFormatSpecifier) As String","returnType":"String"}, + {"name":"IStringFormatIdentifier_IsIdentifierMatch","kind":"function","vis":"private","signature":"Private Function IStringFormatIdentifier_IsIdentifierMatch(ByVal specifier As StringFormatSpecifier) As Boolean","returnType":"Boolean"} + ] + }, + { + "name": "GenericDateTimeSFI", + "kind": "class", + "vis": "public", + "file": "GenericDateTimeSFI.cls", + "signature": "Class GenericDateTimeSFI", + "implements": ["IStringFormatIdentifier"], + "members": [ + {"name":"IStringFormatIdentifier_GetFormattedValue","kind":"function","vis":"private","signature":"Private Function IStringFormatIdentifier_GetFormattedValue(ByVal value As Variant, ByVal specifier As StringFormatSpecifier) As String","returnType":"String"}, + {"name":"IStringFormatIdentifier_IsIdentifierMatch","kind":"function","vis":"private","signature":"Private Function IStringFormatIdentifier_IsIdentifierMatch(ByVal specifier As StringFormatSpecifier) As Boolean","returnType":"Boolean"}, + {"name":"formatStringFromIdentifierDict","kind":"property","vis":"private","signature":"Private Static Property Get formatStringFromIdentifierDict() As Dictionary","returnType":"Dictionary","accessor":"Get"} + ] + }, + { + "name": "HelloWorldClass", + "kind": "class", + "vis": "public", + "file": "HelloWorldClass.twin", + "signature": "Class HelloWorldClass", + "members": [ + {"name":"Show","kind":"sub","vis":"public","signature":"Public Sub Show()"} + ] + }, + { + "name": "HelloWorldModule", + "kind": "module", + "vis": "public", + "file": "HelloWorldModule.twin", + "signature": "Module HelloWorldModule", + "members": [ + {"name":"Show","kind":"sub","vis":"public","signature":"Public Sub Show()"} + ] + }, + { + "name": "HexSFI", + "kind": "class", + "vis": "public", + "file": "HexSFI.cls", + "signature": "Class HexSFI", + "implements": ["IStringFormatIdentifier"], + "members": [ + {"name":"IStringFormatIdentifier_GetFormattedValue","kind":"function","vis":"private","signature":"Private Function IStringFormatIdentifier_GetFormattedValue(ByVal value As Variant, ByVal specifier As StringFormatSpecifier) As String","returnType":"String"}, + {"name":"IStringFormatIdentifier_IsIdentifierMatch","kind":"function","vis":"private","signature":"Private Function IStringFormatIdentifier_IsIdentifierMatch(ByVal specifier As StringFormatSpecifier) As Boolean","returnType":"Boolean"} + ] + }, + { + "name": "IStringFormatIdentifier", + "kind": "class", + "vis": "public", + "file": "IStringFormatIdentifier.cls", + "signature": "Class IStringFormatIdentifier", + "members": [ + {"name":"GetFormattedValue","kind":"function","vis":"public","signature":"Public Function GetFormattedValue(ByVal value As Variant, ByVal specifier As StringFormatSpecifier) As String","returnType":"String"}, + {"name":"IsIdentifierMatch","kind":"function","vis":"public","signature":"Public Function IsIdentifierMatch(ByVal specifier As StringFormatSpecifier) As Boolean","returnType":"Boolean"} + ] + }, + { + "name": "NumericPaddingSFI", + "kind": "class", + "vis": "public", + "file": "NumericPaddingSFI.cls", + "signature": "Class NumericPaddingSFI", + "implements": ["IStringFormatIdentifier"], + "members": [ + {"name":"IStringFormatIdentifier_GetFormattedValue","kind":"function","vis":"private","signature":"Private Function IStringFormatIdentifier_GetFormattedValue(ByVal value As Variant, ByVal specifier As StringFormatSpecifier) As String","returnType":"String"}, + {"name":"IStringFormatIdentifier_IsIdentifierMatch","kind":"function","vis":"private","signature":"Private Function IStringFormatIdentifier_IsIdentifierMatch(ByVal specifier As StringFormatSpecifier) As Boolean","returnType":"Boolean"} + ] + }, + { + "name": "PercentSFI", + "kind": "class", + "vis": "public", + "file": "PercentSFI.cls", + "signature": "Class PercentSFI", + "implements": ["IStringFormatIdentifier"], + "members": [ + {"name":"IStringFormatIdentifier_GetFormattedValue","kind":"function","vis":"private","signature":"Private Function IStringFormatIdentifier_GetFormattedValue(ByVal value As Variant, ByVal specifier As StringFormatSpecifier) As String","returnType":"String"}, + {"name":"IStringFormatIdentifier_IsIdentifierMatch","kind":"function","vis":"private","signature":"Private Function IStringFormatIdentifier_IsIdentifierMatch(ByVal specifier As StringFormatSpecifier) As Boolean","returnType":"Boolean"} + ] + }, + { + "name": "Pootle", + "kind": "module", + "vis": "public", + "file": "Pootle.bas", + "signature": "Module Pootle", + "members": [ + {"name":"SimpleTest","kind":"sub","vis":"public","signature":"Sub SimpleTest()"} + ] + }, + { + "name": "PublicEntryPoints", + "kind": "module", + "vis": "public", + "file": "PublicEntryPoints.bas", + "signature": "Module PublicEntryPoints", + "members": [ + {"name":"StringFormat","kind":"function","vis":"public","signature":"Public Function StringFormat(format_string As String, ParamArray values() as variant) As String","returnType":"String"} + ] + }, + { + "name": "RoundTripSFI", + "kind": "class", + "vis": "public", + "file": "RoundTripSFI.cls", + "signature": "Class RoundTripSFI", + "implements": ["IStringFormatIdentifier"], + "members": [ + {"name":"IStringFormatIdentifier_GetFormattedValue","kind":"function","vis":"private","signature":"Private Function IStringFormatIdentifier_GetFormattedValue(ByVal value As Variant, ByVal specifier As StringFormatSpecifier) As String","returnType":"String"}, + {"name":"IStringFormatIdentifier_IsIdentifierMatch","kind":"function","vis":"private","signature":"Private Function IStringFormatIdentifier_IsIdentifierMatch(ByVal specifier As StringFormatSpecifier) As Boolean","returnType":"Boolean"} + ] + }, + { + "name": "StringFormatSpecifier", + "kind": "class", + "vis": "public", + "file": "StringFormatSpecifier.cls", + "signature": "Class StringFormatSpecifier", + "members": [ + {"name":"Alignment","kind":"property","vis":"public","signature":"Public Property Get Alignment() As Long","returnType":"Long","accessor":"Get"}, + {"name":"Alignment","kind":"property","vis":"public","signature":"Public Property Let Alignment(value As Long)","accessor":"Let"}, + {"name":"CustomSpecifier","kind":"property","vis":"public","signature":"Public Property Get CustomSpecifier() As String","returnType":"String","accessor":"Get"}, + {"name":"CustomSpecifier","kind":"property","vis":"public","signature":"Public Property Let CustomSpecifier(value As String)","accessor":"Let"}, + {"name":"Index","kind":"property","vis":"public","signature":"Public Property Get Index() As Long","returnType":"Long","accessor":"Get"}, + {"name":"Index","kind":"property","vis":"public","signature":"Public Property Let Index(value As Long)","accessor":"Let"}, + {"name":"Precision","kind":"property","vis":"public","signature":"Public Property Get Precision() As Long","returnType":"Long","accessor":"Get"}, + {"name":"ToString","kind":"function","vis":"public","signature":"Public Function ToString() As String","returnType":"String"}, + {"name":"identifier","kind":"property","vis":"public","signature":"Public Property Get identifier() As String","returnType":"String","accessor":"Get"}, + {"name":"identifier","kind":"property","vis":"public","signature":"Public Property Let identifier(value As String)","accessor":"Let"}, + {"name":"this","kind":"field","vis":"private","signature":"Private this As tSpecifier"} + ] + }, + { + "name": "tSpecifier", + "kind": "type", + "in": "StringFormatSpecifier", + "vis": "private", + "public": false, + "file": "StringFormatSpecifier.cls", + "signature": "Private Type tSpecifier", + "fields": [ + {"name":"Index","vis":"public","signature":"Index As Long"}, + {"name":"identifier","vis":"public","signature":"identifier As String"}, + {"name":"alignmentSpecifier","vis":"public","signature":"alignmentSpecifier As Long"}, + {"name":"precisionSpecifier","vis":"public","signature":"precisionSpecifier As Long"}, + {"name":"CustomSpecifier","vis":"public","signature":"CustomSpecifier As String"} + ], + "members": [] + }, + { + "name": "StringHelper", + "kind": "class", + "vis": "public", + "file": "StringHelper.cls", + "signature": "Class StringHelper", + "members": [ + {"name":"Class_Initialize","kind":"sub","vis":"private","signature":"Private Sub Class_Initialize()"}, + {"name":"DEFAULT_PADDING_CHAR","kind":"const","vis":"private","signature":"Private Const DEFAULT_PADDING_CHAR As String * 1 = \" \""}, + {"name":"ERR_FORMAT_EXCEPTION","kind":"const","vis":"private","signature":"Private Const ERR_FORMAT_EXCEPTION As Long = vbObjectError Or 9001"}, + {"name":"ERR_MSG_FORMAT_EXCEPTION","kind":"const","vis":"private","signature":"Private Const ERR_MSG_FORMAT_EXCEPTION As String = \"The number indicating an argument to format is less than zero, or greater than or equal to the length of the args array.\""}, + {"name":"ERR_MSG_INVALID_FORMAT_STRING","kind":"const","vis":"private","signature":"Private Const ERR_MSG_INVALID_FORMAT_STRING As String = \"Invalid format string.\""}, + {"name":"ERR_SOURCE","kind":"const","vis":"private","signature":"Private Const ERR_SOURCE As String = \"StringHelper\""}, + {"name":"GetFormatSpecifiers","kind":"function","vis":"private","signature":"Private Function GetFormatSpecifiers(ByVal format_string As String, valuesCount As Long) As Collection","returnType":"Collection"}, + {"name":"InitDateTimeSpecifiers","kind":"sub","vis":"private","signature":"Private Sub InitDateTimeSpecifiers()"}, + {"name":"InitEscapeSequences","kind":"sub","vis":"private","signature":"Private Sub InitEscapeSequences()"}, + {"name":"InitNumericSpecifiers","kind":"sub","vis":"private","signature":"Private Sub InitNumericSpecifiers()"}, + {"name":"StringFormat","kind":"function","vis":"public","signature":"Public Function StringFormat(format_string As String, values() As Variant) As String","returnType":"String"}, + {"name":"this","kind":"field","vis":"private","signature":"Private this As tString"} + ] + }, + { + "name": "tString", + "kind": "type", + "in": "StringHelper", + "vis": "private", + "public": false, + "file": "StringHelper.cls", + "signature": "Private Type tString", + "fields": [ + {"name":"PaddingCharacter","vis":"public","signature":"PaddingCharacter As String"}, + {"name":"EscapeSequences","vis":"public","signature":"EscapeSequences As Collection"}, + {"name":"NumericSpecifiers","vis":"public","signature":"NumericSpecifiers As Collection"}, + {"name":"DateTimeSpecifiers","vis":"public","signature":"DateTimeSpecifiers As Collection"} + ], + "members": [] + }, + { + "name": "StringValidation", + "kind": "module", + "vis": "public", + "file": "StringValidation.bas", + "signature": "Module StringValidation", + "members": [ + {"name":"CopyCapitalisation","kind":"function","vis":"public","signature":"Public Function CopyCapitalisation(ByVal source As String, ByVal applyTo As String) As String","returnType":"String"}, + {"name":"StringContains","kind":"function","vis":"public","signature":"Public Function StringContains(ByVal haystack As String, ByVal needle As String, Optional ByVal caseSensitive As Boolean = False) As Boolean","returnType":"Boolean"}, + {"name":"StringContainsAny","kind":"function","vis":"public","signature":"Public Function StringContainsAny(ByVal haystack As String, ByVal caseSensitive As Boolean, ParamArray needles() As Variant) As Boolean","returnType":"Boolean"}, + {"name":"StringMatchesAny","kind":"function","vis":"public","signature":"Public Function StringMatchesAny(ByVal searchString As String, ParamArray possibleMatches() As Variant) As Boolean","returnType":"Boolean"}, + {"name":"StringStartsWith","kind":"function","vis":"public","signature":"Public Function StringStartsWith(ByVal startingSequence As String, ByVal source As String) As Boolean","returnType":"Boolean"} + ] + } + ], + "aliases": [], + "problems": [] +} diff --git a/indexer/snapshots/contributed/OLEGuids/api.json b/indexer/snapshots/contributed/OLEGuids/api.json new file mode 100644 index 000000000..bb880a176 --- /dev/null +++ b/indexer/snapshots/contributed/OLEGuids/api.json @@ -0,0 +1,511 @@ +{ + "format": 3, + "package": "OLEGuids", + "project": "OLEGuids", + "version": "1.0.2.0", + "types": [ + { + "name": "IDataObject", + "kind": "interface", + "vis": "public", + "file": "OLEGuids.twin", + "signature": "Interface IDataObject Extends stdole.IUnknown", + "extends": "stdole.IUnknown", + "attrs": [{"name":"InterfaceId","args":"\"0000010E-0000-0000-C000-000000000046\""},{"name":"OleAutomation","args":"False"}], + "description": "Stub: Use tbShellLib for full version", + "members": [] + }, + { + "name": "IDispatch", + "kind": "interface", + "vis": "public", + "file": "OLEGuids.twin", + "signature": "Interface IDispatch Extends stdole.IUnknown", + "extends": "stdole.IUnknown", + "attrs": [{"name":"InterfaceId","args":"\"00020400-0000-0000-C000-000000000046\""},{"name":"OleAutomation","args":"False"}], + "members": [ + {"name":"GetIDsOfNames","kind":"sub","vis":"public","signature":"Sub GetIDsOfNames(ByRef riid As OLEGuids.OLECLSID, ByRef rgszNames As LongPtr, ByVal cNames As Long, ByVal lcid As Long, ByRef rgDispID As Long)"}, + {"name":"GetTypeInfo","kind":"sub","vis":"public","signature":"Sub GetTypeInfo(ByVal itinfo As Long, ByVal lcid As Long, ByRef pptinfo As LongPtr)"}, + {"name":"GetTypeInfoCount","kind":"sub","vis":"public","signature":"Sub GetTypeInfoCount(ByRef pctInfo As Long)"}, + {"name":"Invoke","kind":"sub","vis":"public","signature":"Sub Invoke(ByVal DispIDMember As Long, ByRef riid As OLEGuids.OLECLSID, ByVal lcid As Long, ByVal wFlags As Integer, ByRef pdispparams As stdole.DISPPARAMS, ByRef pvarResult As Variant, ByRef pexcepinfo As stdole.EXCEPINFO, ByRef puArgErr As Long)"} + ] + }, + { + "name": "IEnumVARIANTUnrestricted", + "kind": "interface", + "vis": "public", + "file": "OLEGuids.twin", + "signature": "Interface IEnumVARIANTUnrestricted Extends stdole.IDispatch", + "extends": "stdole.IDispatch", + "attrs": [{"name":"InterfaceId","args":"\"00020404-0000-0000-C000-000000000046\""},{"name":"OleAutomation","args":"False"}], + "members": [ + {"name":"Clone","kind":"sub","vis":"public","signature":"Sub Clone(ByRef ppEnum As stdole.IEnumVARIANT)"}, + {"name":"Next","kind":"sub","vis":"public","signature":"Sub Next(ByVal cElt As Long, ByRef rgVar As Variant, ByVal pcEltFetched As Long)"}, + {"name":"Reset","kind":"sub","vis":"public","signature":"Sub Reset()"}, + {"name":"Skip","kind":"sub","vis":"public","signature":"Sub Skip(ByVal cElt As Long)"} + ] + }, + { + "name": "IObjectSafety", + "kind": "interface", + "vis": "public", + "file": "OLEGuids.twin", + "signature": "Interface IObjectSafety Extends stdole.IUnknown", + "extends": "stdole.IUnknown", + "attrs": [{"name":"InterfaceId","args":"\"CB5BDC81-93C1-11CF-8F20-00805F2CD064\""},{"name":"OleAutomation","args":"False"}], + "members": [ + {"name":"GetInterfaceSafetyOptions","kind":"sub","vis":"public","signature":"Sub GetInterfaceSafetyOptions(ByRef riid As OLEGuids.OLECLSID, ByRef pdwSupportedOptions As Long, ByRef pdwEnabledOptions As Long)"}, + {"name":"SetInterfaceSafetyOptions","kind":"sub","vis":"public","signature":"Sub SetInterfaceSafetyOptions(ByRef riid As OLEGuids.OLECLSID, ByVal dwOptionSetMask As Long, ByVal dwEnabledOptions As Long)"} + ] + }, + { + "name": "IOleClientSite", + "kind": "interface", + "vis": "public", + "file": "OLEGuids.twin", + "signature": "Interface IOleClientSite Extends stdole.IUnknown", + "extends": "stdole.IUnknown", + "attrs": [{"name":"InterfaceId","args":"\"00000118-0000-0000-C000-000000000046\""},{"name":"OleAutomation","args":"False"}], + "description": "Stub: Use tbShellLib for full version", + "members": [] + }, + { + "name": "IOleControl", + "kind": "interface", + "vis": "public", + "file": "OLEGuids.twin", + "signature": "Interface IOleControl Extends stdole.IUnknown", + "extends": "stdole.IUnknown", + "attrs": [{"name":"InterfaceId","args":"\"B196B288-BAB4-101A-B69C-00AA00341D07\""},{"name":"OleAutomation","args":"False"}], + "members": [ + {"name":"FreezeEvents","kind":"sub","vis":"public","signature":"Sub FreezeEvents(ByVal bFreeze As Long)"}, + {"name":"GetControlInfo","kind":"function","vis":"public","signature":"Function GetControlInfo(ByRef pCI As OLECONTROLINFO) As Long","returnType":"Long","attrs":[{"name":"PreserveSig"}]}, + {"name":"OnAmbientPropertyChange","kind":"sub","vis":"public","signature":"Sub OnAmbientPropertyChange(ByVal DispID As Long)"}, + {"name":"OnMnemonic","kind":"function","vis":"public","signature":"Function OnMnemonic(ByRef pMsg As OLEACCELMSG) As Long","returnType":"Long","attrs":[{"name":"PreserveSig"}]} + ] + }, + { + "name": "IOleControlSite", + "kind": "interface", + "vis": "public", + "file": "OLEGuids.twin", + "signature": "Interface IOleControlSite Extends stdole.IUnknown", + "extends": "stdole.IUnknown", + "attrs": [{"name":"InterfaceId","args":"\"B196B289-BAB4-101A-B69C-00AA00341D07\""},{"name":"OleAutomation","args":"False"}], + "members": [ + {"name":"GetExtendedControl","kind":"function","vis":"public","signature":"Function GetExtendedControl() As OLEGuids.IDispatch","returnType":"OLEGuids.IDispatch"}, + {"name":"LockInPlaceActive","kind":"sub","vis":"public","signature":"Sub LockInPlaceActive(ByVal fLock As Long)"}, + {"name":"OnControlInfoChanged","kind":"sub","vis":"public","signature":"Sub OnControlInfoChanged()"}, + {"name":"OnFocus","kind":"sub","vis":"public","signature":"Sub OnFocus(ByVal fGotFocus As Long)"}, + {"name":"ShowPropertyFrame","kind":"sub","vis":"public","signature":"Sub ShowPropertyFrame()"}, + {"name":"TransformCoords","kind":"sub","vis":"public","signature":"Sub TransformCoords(ByVal pPtlHimetric As LongPtr, ByVal pPtfContainer As LongPtr, ByVal dwFlags As Long)"}, + {"name":"TranslateAccelerator","kind":"function","vis":"public","signature":"Function TranslateAccelerator(ByVal lpMsg As LongPtr, ByVal grfModifiers As Long) As Long","returnType":"Long","attrs":[{"name":"PreserveSig"}]} + ] + }, + { + "name": "IOleControlVB", + "kind": "interface", + "vis": "public", + "file": "OLEGuids.twin", + "signature": "Interface IOleControlVB Extends stdole.IDispatch", + "extends": "stdole.IDispatch", + "attrs": [{"name":"InterfaceId","args":"\"C895C8F9-6564-4123-8760-529F72AB9322\""}], + "members": [ + {"name":"GetControlInfo","kind":"sub","vis":"public","signature":"Sub GetControlInfo(ByRef Handled As Boolean, ByRef AccelCount As Integer, ByRef AccelTable As LongPtr, ByRef Flags As Long)","attrs":[{"name":"DispId","args":"1"}]}, + {"name":"OnMnemonic","kind":"sub","vis":"public","signature":"Sub OnMnemonic(ByRef Handled As Boolean, ByVal hWnd As LongPtr, ByVal wMsg As Long, ByVal wParam As LongPtr, ByVal lParam As LongPtr, ByVal Shift As Long)","attrs":[{"name":"DispId","args":"2"}]} + ] + }, + { + "name": "IOleInPlaceActiveObject", + "kind": "interface", + "vis": "public", + "file": "OLEGuids.twin", + "signature": "Interface IOleInPlaceActiveObject Extends OLEGuids.IUnknownUnrestricted", + "extends": "OLEGuids.IUnknownUnrestricted", + "attrs": [{"name":"InterfaceId","args":"\"00000117-0000-0000-C000-000000000046\""},{"name":"OleAutomation","args":"False"}], + "members": [ + {"name":"ContextSensitiveHelp","kind":"function","vis":"public","signature":"Function ContextSensitiveHelp(ByVal fEnterMode As Long) As Long","returnType":"Long","attrs":[{"name":"PreserveSig"}]}, + {"name":"EnableModeless","kind":"function","vis":"public","signature":"Function EnableModeless(ByVal fEnable As Long) As Long","returnType":"Long","attrs":[{"name":"PreserveSig"}]}, + {"name":"GetWindow","kind":"function","vis":"public","signature":"Function GetWindow(ByRef phWnd As LongPtr) As Long","returnType":"Long","attrs":[{"name":"PreserveSig"}]}, + {"name":"OnDocWindowActivate","kind":"function","vis":"public","signature":"Function OnDocWindowActivate(ByVal fActivate As Long) As Long","returnType":"Long","attrs":[{"name":"PreserveSig"}]}, + {"name":"OnFrameWindowActivate","kind":"function","vis":"public","signature":"Function OnFrameWindowActivate(ByVal fActivate As Long) As Long","returnType":"Long","attrs":[{"name":"PreserveSig"}]}, + {"name":"ResizeBorder","kind":"function","vis":"public","signature":"Function ResizeBorder(ByVal prcBorder As LongPtr, ByVal pUIWindow As OLEGuids.IOleInPlaceUIWindow, ByVal fFrameWindow As Long) As Long","returnType":"Long","attrs":[{"name":"PreserveSig"}]}, + {"name":"TranslateAccelerator","kind":"function","vis":"public","signature":"Function TranslateAccelerator(ByVal lpMsg As LongPtr) As Long","returnType":"Long","attrs":[{"name":"PreserveSig"}]} + ] + }, + { + "name": "IOleInPlaceActiveObjectVB", + "kind": "interface", + "vis": "public", + "file": "OLEGuids.twin", + "signature": "Interface IOleInPlaceActiveObjectVB Extends stdole.IDispatch", + "extends": "stdole.IDispatch", + "attrs": [{"name":"InterfaceId","args":"\"38584260-0CFB-45E7-8FBB-5D20B311F5B8\""}], + "members": [ + {"name":"TranslateAccelerator","kind":"sub","vis":"public","signature":"Sub TranslateAccelerator(Handled As Boolean, RetVal As Long, ByVal hWnd As LongPtr, ByVal wMsg As Long, ByVal wParam As LongPtr, ByVal lParam As LongPtr, ByVal Shift As Long)"} + ] + }, + { + "name": "IOleInPlaceFrame", + "kind": "interface", + "vis": "public", + "file": "OLEGuids.twin", + "signature": "Interface IOleInPlaceFrame Extends OLEGuids.IOleInPlaceUIWindow", + "extends": "OLEGuids.IOleInPlaceUIWindow", + "attrs": [{"name":"InterfaceId","args":"\"00000116-0000-0000-C000-000000000046\""},{"name":"OleAutomation","args":"False"}], + "description": "Stub: Use tbShellLib for full version", + "members": [] + }, + { + "name": "IOleInPlaceObject", + "kind": "interface", + "vis": "public", + "file": "OLEGuids.twin", + "signature": "Interface IOleInPlaceObject Extends OLEGuids.IOleWindow", + "extends": "OLEGuids.IOleWindow", + "attrs": [{"name":"InterfaceId","args":"\"00000113-0000-0000-C000-000000000046\""},{"name":"OleAutomation","args":"False"}], + "members": [ + {"name":"InPlaceDeactivate","kind":"sub","vis":"public","signature":"Sub InPlaceDeactivate()"}, + {"name":"ReactivateAndUndo","kind":"sub","vis":"public","signature":"Sub ReactivateAndUndo()"}, + {"name":"SetObjectRects","kind":"sub","vis":"public","signature":"Sub SetObjectRects(ByVal lprcPosRect As LongPtr, ByVal lprcClipRect As LongPtr)"}, + {"name":"UIDeactivate","kind":"sub","vis":"public","signature":"Sub UIDeactivate()"} + ] + }, + { + "name": "IOleInPlaceSite", + "kind": "interface", + "vis": "public", + "file": "OLEGuids.twin", + "signature": "Interface IOleInPlaceSite Extends OLEGuids.IOleWindow", + "extends": "OLEGuids.IOleWindow", + "attrs": [{"name":"InterfaceId","args":"\"00000119-0000-0000-C000-000000000046\""},{"name":"OleAutomation","args":"False"}], + "members": [ + {"name":"CanInPlaceActivate","kind":"function","vis":"public","signature":"Function CanInPlaceActivate() As Long","returnType":"Long","attrs":[{"name":"PreserveSig"}]}, + {"name":"DeactivateAndUndo","kind":"sub","vis":"public","signature":"Sub DeactivateAndUndo()"}, + {"name":"DiscardUndoState","kind":"sub","vis":"public","signature":"Sub DiscardUndoState()"}, + {"name":"GetWindowContext","kind":"sub","vis":"public","signature":"Sub GetWindowContext(ByRef ppFrame As OLEGuids.IOleInPlaceFrame, ByRef ppDoc As OLEGuids.IOleInPlaceUIWindow, ByVal lprcPosRect As LongPtr, ByVal lprcClipRect As LongPtr, ByVal lpFrameInfo As LongPtr)"}, + {"name":"OnInPlaceActivate","kind":"sub","vis":"public","signature":"Sub OnInPlaceActivate()"}, + {"name":"OnInPlaceDeactivate","kind":"sub","vis":"public","signature":"Sub OnInPlaceDeactivate()"}, + {"name":"OnPosRectChange","kind":"sub","vis":"public","signature":"Sub OnPosRectChange(ByVal lprcPosRect As LongPtr)"}, + {"name":"OnUIActivate","kind":"sub","vis":"public","signature":"Sub OnUIActivate()"}, + {"name":"OnUIDeactivate","kind":"sub","vis":"public","signature":"Sub OnUIDeactivate(ByVal fUndoable As Long)"}, + {"name":"Scroll","kind":"sub","vis":"public","signature":"Sub Scroll(ByVal scrollExtant As Currency)"} + ] + }, + { + "name": "IOleInPlaceUIWindow", + "kind": "interface", + "vis": "public", + "file": "OLEGuids.twin", + "signature": "Interface IOleInPlaceUIWindow Extends OLEGuids.IOleWindow", + "extends": "OLEGuids.IOleWindow", + "attrs": [{"name":"InterfaceId","args":"\"00000115-0000-0000-C000-000000000046\""},{"name":"OleAutomation","args":"False"}], + "members": [ + {"name":"GetBorder","kind":"sub","vis":"public","signature":"Sub GetBorder(ByVal lpRectBorder As LongPtr)"}, + {"name":"RequestBorderSpace","kind":"sub","vis":"public","signature":"Sub RequestBorderSpace(ByVal pBorderWidths As LongPtr)"}, + {"name":"SetActiveObject","kind":"sub","vis":"public","signature":"Sub SetActiveObject(ByVal pActiveObject As OLEGuids.IOleInPlaceActiveObject, ByVal lpszObjName As LongPtr)"}, + {"name":"SetBorderSpace","kind":"sub","vis":"public","signature":"Sub SetBorderSpace(ByVal pBorderWidths As LongPtr)"} + ] + }, + { + "name": "IOleObject", + "kind": "interface", + "vis": "public", + "file": "OLEGuids.twin", + "signature": "Interface IOleObject Extends stdole.IUnknown", + "extends": "stdole.IUnknown", + "attrs": [{"name":"InterfaceId","args":"\"00000112-0000-0000-C000-000000000046\""},{"name":"OleAutomation","args":"False"}], + "members": [ + {"name":"Close","kind":"sub","vis":"public","signature":"Sub Close(ByVal dwSaveOption As Long)"}, + {"name":"DoVerb","kind":"function","vis":"public","signature":"Function DoVerb(ByVal iVerb As Long, ByVal lpMsg As LongPtr, ByVal pActiveSite As OLEGuids.IOleClientSite, ByVal Index As Long, ByVal hWndParent As LongPtr, ByVal lprcPosRect As LongPtr) As Long","returnType":"Long","attrs":[{"name":"PreserveSig"}]}, + {"name":"GetClientSite","kind":"function","vis":"public","signature":"Function GetClientSite() As OLEGuids.IOleClientSite","returnType":"OLEGuids.IOleClientSite"}, + {"name":"GetClipboardData","kind":"function","vis":"public","signature":"Function GetClipboardData(ByVal dwReserved As Long) As LongPtr","returnType":"LongPtr"}, + {"name":"GetMoniker","kind":"function","vis":"public","signature":"Function GetMoniker(ByVal dwAssign As Long, ByVal dwWhichMoniker As Long) As LongPtr","returnType":"LongPtr"}, + {"name":"InitFromData","kind":"sub","vis":"public","signature":"Sub InitFromData(ByVal lpDataObject As LongPtr, ByVal fCreation As Long, ByVal dwReserved As Long)"}, + {"name":"SetClientSite","kind":"sub","vis":"public","signature":"Sub SetClientSite(ByVal pClientSite As OLEGuids.IOleClientSite)"}, + {"name":"SetHostNames","kind":"sub","vis":"public","signature":"Sub SetHostNames(ByVal lpszContainerApp As LongPtr, ByVal lpszContainerObj As LongPtr)"}, + {"name":"SetMoniker","kind":"sub","vis":"public","signature":"Sub SetMoniker(ByVal dwWhichMoniker As Long, ByVal lpmk As LongPtr)"} + ] + }, + { + "name": "IOleWindow", + "kind": "interface", + "vis": "public", + "file": "OLEGuids.twin", + "signature": "Interface IOleWindow Extends IUnknown", + "extends": "IUnknown", + "attrs": [{"name":"InterfaceId","args":"\"00000114-0000-0000-C000-000000000046\""},{"name":"OleAutomation","args":"False"}], + "members": [ + {"name":"ContextSensitiveHelp","kind":"sub","vis":"public","signature":"Sub ContextSensitiveHelp(ByVal fEnterMode As Long)"}, + {"name":"GetWindow","kind":"function","vis":"public","signature":"Function GetWindow() As LongPtr","returnType":"LongPtr"} + ] + }, + { + "name": "IPerPropertyBrowsing", + "kind": "interface", + "vis": "public", + "file": "OLEGuids.twin", + "signature": "Interface IPerPropertyBrowsing Extends stdole.IUnknown", + "extends": "stdole.IUnknown", + "attrs": [{"name":"InterfaceId","args":"\"376BD3AA-3845-101B-84ED-08002B2EC713\""},{"name":"OleAutomation","args":"False"}], + "members": [ + {"name":"GetDisplayString","kind":"function","vis":"public","signature":"Function GetDisplayString(ByVal DispID As Long, ByRef lpDisplayName As LongPtr) As Long","returnType":"Long","attrs":[{"name":"PreserveSig"}]}, + {"name":"GetPredefinedStrings","kind":"function","vis":"public","signature":"Function GetPredefinedStrings(ByVal DispID As Long, ByRef pCaStringsOut As OLEGuids.OLECALPOLESTR, ByRef pCaCookiesOut As OLEGuids.OLECADWORD) As Long","returnType":"Long","attrs":[{"name":"PreserveSig"}]}, + {"name":"GetPredefinedValue","kind":"function","vis":"public","signature":"Function GetPredefinedValue(ByVal DispID As Long, ByVal dwCookie As Long, ByRef pVarOut As Variant) As Long","returnType":"Long","attrs":[{"name":"PreserveSig"}]}, + {"name":"MapPropertyToPage","kind":"function","vis":"public","signature":"Function MapPropertyToPage(ByVal DispID As Long, ByRef pCLSID As OLEGuids.OLECLSID) As Long","returnType":"Long","attrs":[{"name":"PreserveSig"}]} + ] + }, + { + "name": "IPerPropertyBrowsingVB", + "kind": "interface", + "vis": "public", + "file": "OLEGuids.twin", + "signature": "Interface IPerPropertyBrowsingVB Extends stdole.IDispatch", + "extends": "stdole.IDispatch", + "attrs": [{"name":"InterfaceId","args":"\"D5D3BBE3-DB60-4522-AF5B-D767FE736DDB\""}], + "members": [ + {"name":"GetDisplayString","kind":"sub","vis":"public","signature":"Sub GetDisplayString(ByRef Handled As Boolean, ByVal DispID As Long, ByRef DisplayName As String)","attrs":[{"name":"DispId","args":"1"}]}, + {"name":"GetPredefinedStrings","kind":"sub","vis":"public","signature":"Sub GetPredefinedStrings(ByRef Handled As Boolean, ByVal DispID As Long, ByRef StringsOut As String(), ByRef CookiesOut As Long())","attrs":[{"name":"DispId","args":"2"}]}, + {"name":"GetPredefinedValue","kind":"sub","vis":"public","signature":"Sub GetPredefinedValue(ByRef Handled As Boolean, ByVal DispID As Long, ByVal Cookie As Long, ByRef Value As Variant)","attrs":[{"name":"DispId","args":"3"}]} + ] + }, + { + "name": "IRichEditOle", + "kind": "interface", + "vis": "public", + "file": "OLEGuids.twin", + "signature": "Interface IRichEditOle Extends stdole.IUnknown", + "extends": "stdole.IUnknown", + "attrs": [{"name":"InterfaceId","args":"\"00020D00-0000-0000-C000-000000000046\""},{"name":"OleAutomation","args":"False"}], + "members": [ + {"name":"ActivateAs","kind":"function","vis":"public","signature":"Function ActivateAs(ByRef pCLSID As OLEGuids.OLECLSID, ByRef pCLSIDAs As OLEGuids.OLECLSID) As Long","returnType":"Long","attrs":[{"name":"PreserveSig"}]}, + {"name":"ContextSensitiveHelp","kind":"function","vis":"public","signature":"Function ContextSensitiveHelp(ByVal fEnterMode As Long) As Long","returnType":"Long","attrs":[{"name":"PreserveSig"}]}, + {"name":"ConvertObject","kind":"function","vis":"public","signature":"Function ConvertObject(ByVal iob As Long, ByRef pCLSIDNew As OLEGuids.OLECLSID, ByVal lpstrUserTypeNew As LongPtr ) As Long","returnType":"Long","attrs":[{"name":"PreserveSig"}]}, + {"name":"GetClientSite","kind":"function","vis":"public","signature":"Function GetClientSite() As OLEGuids.IOleClientSite","returnType":"OLEGuids.IOleClientSite"}, + {"name":"GetClipboardData","kind":"function","vis":"public","signature":"Function GetClipboardData(ByVal lpCharRange As LongPtr, ByVal RECO As Long, ByRef ppDataObject As OLEGuids.IDataObject) As Long","returnType":"Long","attrs":[{"name":"PreserveSig"}]}, + {"name":"GetLinkCount","kind":"function","vis":"public","signature":"Function GetLinkCount() As Long","returnType":"Long","attrs":[{"name":"PreserveSig"}]}, + {"name":"GetObject","kind":"function","vis":"public","signature":"Function GetObject(ByVal iob As Long, ByRef pREOBJECT As Any, ByVal dwFlags As Long) As Long","returnType":"Long","attrs":[{"name":"PreserveSig"}]}, + {"name":"GetObjectCount","kind":"function","vis":"public","signature":"Function GetObjectCount() As Long","returnType":"Long","attrs":[{"name":"PreserveSig"}]}, + {"name":"HandsOffStorage","kind":"function","vis":"public","signature":"Function HandsOffStorage(ByVal iob As Long) As Long","returnType":"Long","attrs":[{"name":"PreserveSig"}]}, + {"name":"ImportDataObject","kind":"function","vis":"public","signature":"Function ImportDataObject(ByVal pDataObject As OLEGuids.IDataObject, ByVal CF As Integer, ByVal hMetaPict As LongPtr) As Long","returnType":"Long","attrs":[{"name":"PreserveSig"}]}, + {"name":"InPlaceDeactivate","kind":"function","vis":"public","signature":"Function InPlaceDeactivate() As Long","returnType":"Long","attrs":[{"name":"PreserveSig"}]}, + {"name":"InsertObject","kind":"function","vis":"public","signature":"Function InsertObject(ByRef pREOBJECT As Any) As Long","returnType":"Long","attrs":[{"name":"PreserveSig"}]}, + {"name":"SaveCompleted","kind":"function","vis":"public","signature":"Function SaveCompleted(ByVal iob As Long, ByVal pStorage As OLEGuids.IStorage) As Long","returnType":"Long","attrs":[{"name":"PreserveSig"}]}, + {"name":"SetDvaspect","kind":"function","vis":"public","signature":"Function SetDvaspect(ByVal iob As Long, ByVal dvAspect As Long) As Long","returnType":"Long","attrs":[{"name":"PreserveSig"}]}, + {"name":"SetHostNames","kind":"function","vis":"public","signature":"Function SetHostNames(ByVal lpstrContainerApp As LongPtr , ByVal lpstrContainerObj As LongPtr ) As Long","returnType":"Long","attrs":[{"name":"PreserveSig"}]}, + {"name":"SetLinkAvailable","kind":"function","vis":"public","signature":"Function SetLinkAvailable(ByVal iob As Long, ByVal fAvailable As Long) As Long","returnType":"Long","attrs":[{"name":"PreserveSig"}]} + ] + }, + { + "name": "IRichEditOleCallback", + "kind": "interface", + "vis": "public", + "file": "OLEGuids.twin", + "signature": "Interface IRichEditOleCallback Extends stdole.IUnknown", + "extends": "stdole.IUnknown", + "attrs": [{"name":"InterfaceId","args":"\"00020D03-0000-0000-C000-000000000046\""},{"name":"OleAutomation","args":"False"}], + "members": [ + {"name":"ContextSensitiveHelp","kind":"sub","vis":"public","signature":"Sub ContextSensitiveHelp(ByVal fEnterMode As Long)"}, + {"name":"DeleteObject","kind":"sub","vis":"public","signature":"Sub DeleteObject(ByVal LpOleObject As LongPtr)"}, + {"name":"GetClipboardData","kind":"sub","vis":"public","signature":"Sub GetClipboardData(ByVal lpCharRange As LongPtr, ByVal RECO As Long, ByRef ppDataObject As OLEGuids.IDataObject)"}, + {"name":"GetContextMenu","kind":"sub","vis":"public","signature":"Sub GetContextMenu(ByVal SelType As Integer, ByVal LpOleObject As LongPtr, ByVal lpCharRange As LongPtr, ByRef hMenu As LongPtr)"}, + {"name":"GetDragDropEffect","kind":"sub","vis":"public","signature":"Sub GetDragDropEffect(ByVal fDrag As Long, ByVal KeyState As Long, ByRef dwEffect As Long)"}, + {"name":"GetInPlaceContext","kind":"sub","vis":"public","signature":"Sub GetInPlaceContext(ByRef ppFrame As OLEGuids.IOleInPlaceFrame, ByRef ppDoc As OLEGuids.IOleInPlaceUIWindow, ByRef pFrameInfo As OLEGuids.OLEINPLACEFRAMEINFO)"}, + {"name":"GetNewStorage","kind":"sub","vis":"public","signature":"Sub GetNewStorage(ByRef ppStorage As OLEGuids.IStorage)"}, + {"name":"QueryAcceptData","kind":"sub","vis":"public","signature":"Sub QueryAcceptData(ByVal pDataObject As OLEGuids.IDataObject, ByRef CF As Integer, ByVal RECO As Long, ByVal fReally As Long, ByVal hMetaPict As LongPtr)"}, + {"name":"QueryInsertObject","kind":"sub","vis":"public","signature":"Sub QueryInsertObject(ByRef pCLSID As OLEGuids.OLECLSID, ByVal pStorage As OLEGuids.IStorage, ByVal CharPos As Long)"}, + {"name":"ShowContainerUI","kind":"sub","vis":"public","signature":"Sub ShowContainerUI(ByVal fShow As Long)"} + ] + }, + { + "name": "ISpecifyPropertyPages", + "kind": "interface", + "vis": "public", + "file": "OLEGuids.twin", + "signature": "Interface ISpecifyPropertyPages Extends stdole.IUnknown", + "extends": "stdole.IUnknown", + "attrs": [{"name":"InterfaceId","args":"\"B196B28B-BAB4-101A-B69C-00AA00341D07\""},{"name":"OleAutomation","args":"False"}], + "members": [ + {"name":"GetPages","kind":"sub","vis":"public","signature":"Sub GetPages(ByRef pPages As OLEGuids.OLECAUUID)"} + ] + }, + { + "name": "IStorage", + "kind": "interface", + "vis": "public", + "file": "OLEGuids.twin", + "signature": "Interface IStorage Extends stdole.IUnknown", + "extends": "stdole.IUnknown", + "attrs": [{"name":"InterfaceId","args":"\"0000000B-0000-0000-C000-000000000046\""},{"name":"OleAutomation","args":"False"}], + "description": "Stub: Use tbShellLib for full version", + "members": [] + }, + { + "name": "IUnknownUnrestricted", + "kind": "interface", + "vis": "public", + "file": "OLEGuids.twin", + "signature": "Interface IUnknownUnrestricted Extends Nothing", + "extends": "Nothing", + "attrs": [{"name":"InterfaceId","args":"\"00000000-0000-0000-C000-000000000046\""},{"name":"OleAutomation","args":"False"}], + "members": [ + {"name":"AddRef","kind":"function","vis":"public","signature":"Function AddRef() As Long","returnType":"Long","attrs":[{"name":"PreserveSig"}]}, + {"name":"QueryInterface","kind":"function","vis":"public","signature":"Function QueryInterface(ByVal priid As LongPtr, ppvObject As LongPtr) As Long","returnType":"Long","attrs":[{"name":"PreserveSig"}]}, + {"name":"Release","kind":"function","vis":"public","signature":"Function Release() As Long","returnType":"Long","attrs":[{"name":"PreserveSig"}]} + ] + }, + { + "name": "OLEGuids", + "kind": "module", + "vis": "public", + "file": "OLEGuids.twin", + "signature": "Module OLEGuids", + "members": [] + }, + { + "name": "OLEACCELMSG", + "kind": "type", + "in": "OLEGuids", + "vis": "public", + "file": "OLEGuids.twin", + "signature": "Public Type OLEACCELMSG", + "fields": [ + {"name":"hWnd","vis":"public","signature":"hWnd As LongPtr"}, + {"name":"Message","vis":"public","signature":"Message As Long"}, + {"name":"wParam","vis":"public","signature":"wParam As LongPtr"}, + {"name":"lParam","vis":"public","signature":"lParam As LongPtr"}, + {"name":"Time","vis":"public","signature":"Time As Long"}, + {"name":"PT","vis":"public","signature":"PT As OLEPOINT"} + ], + "members": [] + }, + { + "name": "OLECADWORD", + "kind": "type", + "in": "OLEGuids", + "vis": "public", + "file": "OLEGuids.twin", + "signature": "Public Type OLECADWORD", + "fields": [ + {"name":"cElems","vis":"public","signature":"cElems As Long"}, + {"name":"pElems","vis":"public","signature":"pElems As LongPtr"} + ], + "members": [] + }, + { + "name": "OLECALPOLESTR", + "kind": "type", + "in": "OLEGuids", + "vis": "public", + "file": "OLEGuids.twin", + "signature": "Public Type OLECALPOLESTR", + "fields": [ + {"name":"cElems","vis":"public","signature":"cElems As Long"}, + {"name":"pElems","vis":"public","signature":"pElems As LongPtr"} + ], + "members": [] + }, + { + "name": "OLECAUUID", + "kind": "type", + "in": "OLEGuids", + "vis": "public", + "file": "OLEGuids.twin", + "signature": "Public Type OLECAUUID", + "fields": [ + {"name":"cElems","vis":"public","signature":"cElems As Long"}, + {"name":"pElems","vis":"public","signature":"pElems As LongPtr"} + ], + "members": [] + }, + { + "name": "OLECLSID", + "kind": "type", + "in": "OLEGuids", + "vis": "public", + "file": "OLEGuids.twin", + "signature": "Public Type OLECLSID", + "fields": [ + {"name":"Data1","vis":"public","signature":"Data1 As Long"}, + {"name":"Data2","vis":"public","signature":"Data2 As Integer"}, + {"name":"Data3","vis":"public","signature":"Data3 As Integer"}, + {"name":"Data4","vis":"public","signature":"Data4(0 To 7) As Byte"} + ], + "members": [] + }, + { + "name": "OLECONTROLINFO", + "kind": "type", + "in": "OLEGuids", + "vis": "public", + "file": "OLEGuids.twin", + "signature": "Public Type OLECONTROLINFO", + "fields": [ + {"name":"cb","vis":"public","signature":"cb As Long"}, + {"name":"hAccel","vis":"public","signature":"hAccel As LongPtr"}, + {"name":"cAccel","vis":"public","signature":"cAccel As Integer"}, + {"name":"dwFlags","vis":"public","signature":"dwFlags As Long"} + ], + "members": [] + }, + { + "name": "OLEINPLACEFRAMEINFO", + "kind": "type", + "in": "OLEGuids", + "vis": "public", + "file": "OLEGuids.twin", + "signature": "Public Type OLEINPLACEFRAMEINFO", + "fields": [ + {"name":"cb","vis":"public","signature":"cb As Long"}, + {"name":"fMDIApp","vis":"public","signature":"fMDIApp As Long"}, + {"name":"hWndFrame","vis":"public","signature":"hWndFrame As LongPtr"}, + {"name":"hAccel","vis":"public","signature":"hAccel As LongPtr"}, + {"name":"cAccelEntries","vis":"public","signature":"cAccelEntries As Long"} + ], + "members": [] + }, + { + "name": "OLEPOINT", + "kind": "type", + "in": "OLEGuids", + "vis": "public", + "file": "OLEGuids.twin", + "signature": "Public Type OLEPOINT", + "fields": [ + {"name":"X","vis":"public","signature":"X As Long"}, + {"name":"Y","vis":"public","signature":"Y As Long"} + ], + "members": [] + }, + { + "name": "OLERECT", + "kind": "type", + "in": "OLEGuids", + "vis": "public", + "file": "OLEGuids.twin", + "signature": "Public Type OLERECT", + "fields": [ + {"name":"Left","vis":"public","signature":"Left As Long"}, + {"name":"Top","vis":"public","signature":"Top As Long"}, + {"name":"Right","vis":"public","signature":"Right As Long"}, + {"name":"Bottom","vis":"public","signature":"Bottom As Long"} + ], + "members": [] + }, + { + "name": "OLESIZE", + "kind": "type", + "in": "OLEGuids", + "vis": "public", + "file": "OLEGuids.twin", + "signature": "Public Type OLESIZE", + "fields": [ + {"name":"CX","vis":"public","signature":"CX As Long"}, + {"name":"CY","vis":"public","signature":"CY As Long"} + ], + "members": [] + } + ], + "aliases": [], + "problems": [] +} diff --git a/indexer/snapshots/contributed/TBMANLIB_ListBoxHScroll/api.json b/indexer/snapshots/contributed/TBMANLIB_ListBoxHScroll/api.json new file mode 100644 index 000000000..5c881a498 --- /dev/null +++ b/indexer/snapshots/contributed/TBMANLIB_ListBoxHScroll/api.json @@ -0,0 +1,127 @@ +{ + "format": 3, + "package": "TBMANLIB_ListBoxHScroll", + "project": "TBMANLIB_ListBoxHScroll", + "version": "1.0.0.0", + "types": [ + { + "name": "cListboxHScroll", + "kind": "class", + "vis": "public", + "file": "cListboxHScroll.twin", + "signature": "Class cListboxHScroll", + "members": [ + {"name":"AutoSetHorizontalExtent","kind":"sub","vis":"private","signature":"Private Sub AutoSetHorizontalExtent(ByVal ctrl As Object)"}, + {"name":"Class_Initialize","kind":"sub","vis":"private","signature":"Private Sub Class_Initialize()"}, + {"name":"Class_Terminate","kind":"sub","vis":"private","signature":"Private Sub Class_Terminate()"}, + {"name":"Ctl","kind":"field","vis":"private","signature":"Dim Ctl As ListBox"}, + {"name":"DefSubclassProc","kind":"function","vis":"private","declare":true,"signature":"Private Declare PtrSafe Function DefSubclassProc Lib \"comctl32\" ( ByVal hWnd As LongPtr, ByVal uMsg As Long, ByVal wParam As LongPtr, ByVal lParam As LongPtr ) As LongPtr","returnType":"LongPtr"}, + {"name":"GetClientRect","kind":"function","vis":"private","declare":true,"signature":"Private Declare PtrSafe Function GetClientRect Lib \"user32\" ( ByVal hWnd As LongPtr, ByRef lpRect As RECT ) As Long","returnType":"Long"}, + {"name":"GetControlHandle","kind":"function","vis":"private","signature":"Private Function GetControlHandle(ByVal ctrl As Object) As LongPtr","returnType":"LongPtr"}, + {"name":"GetDC","kind":"function","vis":"private","declare":true,"signature":"Private Declare PtrSafe Function GetDC Lib \"user32\" (ByVal hWnd As LongPtr) As LongPtr","returnType":"LongPtr"}, + {"name":"GetScrollInfo","kind":"function","vis":"private","declare":true,"signature":"Private Declare PtrSafe Function GetScrollInfo Lib \"user32\" ( ByVal hWnd As LongPtr, ByVal nBar As Long, ByRef lpScrollInfo As SCROLLINFO ) As Long","returnType":"Long"}, + {"name":"GetScrollPos","kind":"function","vis":"private","declare":true,"signature":"Private Declare PtrSafe Function GetScrollPos Lib \"user32\" ( ByVal hWnd As LongPtr, ByVal nBar As Long ) As Long","returnType":"Long"}, + {"name":"GetTextExtentPoint32","kind":"function","vis":"private","declare":true,"signature":"Private Declare PtrSafe Function GetTextExtentPoint32 Lib \"gdi32\" Alias \"GetTextExtentPoint32W\" ( ByVal hDC As LongPtr, ByVal lpString As LongPtr, ByVal cbString As Long, ByRef lpSize As SIZE ) As Long","returnType":"Long"}, + {"name":"HideHorizontalScrollbar","kind":"sub","vis":"private","signature":"Private Sub HideHorizontalScrollbar(ByVal ctrl As Object)"}, + {"name":"InitListBoxSubclass","kind":"sub","vis":"private","signature":"Private Sub InitListBoxSubclass(ByVal ctrl As Object)"}, + {"name":"LB_GETCOUNT","kind":"const","vis":"private","signature":"Private Const LB_GETCOUNT As Long = &H18B"}, + {"name":"LB_GETHORIZONTALEXTENT","kind":"const","vis":"private","signature":"Private Const LB_GETHORIZONTALEXTENT As Long = &H193"}, + {"name":"LB_GETTEXT","kind":"const","vis":"private","signature":"Private Const LB_GETTEXT As Long = &H189"}, + {"name":"LB_GETTEXTLEN","kind":"const","vis":"private","signature":"Private Const LB_GETTEXTLEN As Long = &H18A"}, + {"name":"LB_SETHORIZONTALEXTENT","kind":"const","vis":"private","signature":"Private Const LB_SETHORIZONTALEXTENT As Long = &H194"}, + {"name":"ListBoxSubclassProc","kind":"function","vis":"private","signature":"Private Function ListBoxSubclassProc(ByVal hWnd As LongPtr, ByVal uMsg As Long, ByVal wParam As LongPtr, ByVal lParam As LongPtr, ByVal uIdSubclass As LongPtr, ByVal dwRefData As LongPtr) As LongPtr","returnType":"LongPtr"}, + {"name":"ReleaseDC","kind":"function","vis":"private","declare":true,"signature":"Private Declare PtrSafe Function ReleaseDC Lib \"user32\" (ByVal hWnd As LongPtr, ByVal hDC As LongPtr) As Long","returnType":"Long"}, + {"name":"RemoveListBoxSubclass","kind":"sub","vis":"private","signature":"Private Sub RemoveListBoxSubclass(ByVal ctrl As Object)"}, + {"name":"RemoveWindowSubclass","kind":"function","vis":"private","declare":true,"signature":"Private Declare PtrSafe Function RemoveWindowSubclass Lib \"comctl32\" ( ByVal hWnd As LongPtr, ByVal pfnSubclass As LongPtr, ByVal uIdSubclass As LongPtr ) As Long","returnType":"Long"}, + {"name":"SB_BOTH","kind":"const","vis":"private","signature":"Private Const SB_BOTH As Long = 3"}, + {"name":"SB_CTL","kind":"const","vis":"private","signature":"Private Const SB_CTL As Long = 2"}, + {"name":"SB_ENDSCROLL","kind":"const","vis":"private","signature":"Private Const SB_ENDSCROLL As Long = 8"}, + {"name":"SB_HORZ","kind":"const","vis":"private","signature":"Private Const SB_HORZ As Long = 0"}, + {"name":"SB_LEFT","kind":"const","vis":"private","signature":"Private Const SB_LEFT As Long = 6"}, + {"name":"SB_LINELEFT","kind":"const","vis":"private","signature":"Private Const SB_LINELEFT As Long = 0"}, + {"name":"SB_LINERIGHT","kind":"const","vis":"private","signature":"Private Const SB_LINERIGHT As Long = 1"}, + {"name":"SB_PAGELEFT","kind":"const","vis":"private","signature":"Private Const SB_PAGELEFT As Long = 2"}, + {"name":"SB_PAGERIGHT","kind":"const","vis":"private","signature":"Private Const SB_PAGERIGHT As Long = 3"}, + {"name":"SB_RIGHT","kind":"const","vis":"private","signature":"Private Const SB_RIGHT As Long = 7"}, + {"name":"SB_THUMBPOSITION","kind":"const","vis":"private","signature":"Private Const SB_THUMBPOSITION As Long = 4"}, + {"name":"SB_THUMBTRACK","kind":"const","vis":"private","signature":"Private Const SB_THUMBTRACK As Long = 5"}, + {"name":"SB_VERT","kind":"const","vis":"private","signature":"Private Const SB_VERT As Long = 1"}, + {"name":"SIF_ALL","kind":"const","vis":"private","signature":"Private Const SIF_ALL As Long = SIF_RANGE Or SIF_PAGE Or SIF_POS Or SIF_TRACKPOS"}, + {"name":"SIF_PAGE","kind":"const","vis":"private","signature":"Private Const SIF_PAGE As Long = &H2"}, + {"name":"SIF_POS","kind":"const","vis":"private","signature":"Private Const SIF_POS As Long = &H4"}, + {"name":"SIF_RANGE","kind":"const","vis":"private","signature":"Private Const SIF_RANGE As Long = &H1"}, + {"name":"SIF_TRACKPOS","kind":"const","vis":"private","signature":"Private Const SIF_TRACKPOS As Long = &H10"}, + {"name":"SUBCLASS_ID","kind":"const","vis":"private","signature":"Private Const SUBCLASS_ID As LongPtr = 1"}, + {"name":"SelectObject","kind":"function","vis":"private","declare":true,"signature":"Private Declare PtrSafe Function SelectObject Lib \"gdi32\" (ByVal hDC As LongPtr, ByVal hObject As LongPtr) As LongPtr","returnType":"LongPtr"}, + {"name":"SendHorizontalScroll","kind":"sub","vis":"private","signature":"Private Sub SendHorizontalScroll(ByVal ctrl As Object, ByVal scrollType As Long)"}, + {"name":"SendMessage","kind":"function","vis":"private","declare":true,"signature":"Private Declare PtrSafe Function SendMessage Lib \"user32\" Alias \"SendMessageW\" ( ByVal hWnd As LongPtr, ByVal wMsg As Long, ByVal wParam As LongPtr, ByVal lParam As LongPtr ) As LongPtr","returnType":"LongPtr"}, + {"name":"SetListBoxHorizontalExtent","kind":"sub","vis":"private","signature":"Private Sub SetListBoxHorizontalExtent(ByVal ctrl As Object, ByVal extent As Long)"}, + {"name":"SetScrollBarInfo","kind":"sub","vis":"private","signature":"Private Sub SetScrollBarInfo(ByVal ctrl As Object, ByVal contentWidth As Long)"}, + {"name":"SetScrollInfo","kind":"function","vis":"private","declare":true,"signature":"Private Declare PtrSafe Function SetScrollInfo Lib \"user32\" ( ByVal hWnd As LongPtr, ByVal nBar As Long, ByRef lpScrollInfo As SCROLLINFO, ByVal bRedraw As Long ) As Long","returnType":"Long"}, + {"name":"SetScrollPos","kind":"function","vis":"private","declare":true,"signature":"Private Declare PtrSafe Function SetScrollPos Lib \"user32\" ( ByVal hWnd As LongPtr, ByVal nBar As Long, ByVal nPos As Long, ByVal bRedraw As Long ) As Long","returnType":"Long"}, + {"name":"SetWindowSubclass","kind":"function","vis":"private","declare":true,"signature":"Private Declare PtrSafe Function SetWindowSubclass Lib \"comctl32\" ( ByVal hWnd As LongPtr, ByVal pfnSubclass As LongPtr, ByVal uIdSubclass As LongPtr, ByVal dwRefData As LongPtr ) As Long","returnType":"Long"}, + {"name":"Show","kind":"sub","vis":"public","signature":"Public Sub Show(ByRef ListBoxInst As Object)"}, + {"name":"ShowHorizontalScrollbar","kind":"sub","vis":"private","signature":"Private Sub ShowHorizontalScrollbar(ByVal ctrl As Object)"}, + {"name":"ShowScrollBar","kind":"function","vis":"private","declare":true,"signature":"Private Declare PtrSafe Function ShowScrollBar Lib \"user32\" ( ByVal hWnd As LongPtr, ByVal wBar As Long, ByVal bShow As Long ) As Long","returnType":"Long"}, + {"name":"UnShow","kind":"sub","vis":"public","signature":"Public Sub UnShow()"}, + {"name":"WM_DESTROY","kind":"const","vis":"private","signature":"Private Const WM_DESTROY As Long = &H2"}, + {"name":"WM_GETFONT","kind":"const","vis":"private","signature":"Private Const WM_GETFONT As Long = &H31"}, + {"name":"WM_HSCROLL","kind":"const","vis":"private","signature":"Private Const WM_HSCROLL As Long = &H114"}, + {"name":"m_ListBoxHwnd","kind":"field","vis":"private","signature":"Private m_ListBoxHwnd As LongPtr"}, + {"name":"m_MaxContentWidth","kind":"field","vis":"private","signature":"Private m_MaxContentWidth As Long"}, + {"name":"m_VisibleWidth","kind":"field","vis":"private","signature":"Private m_VisibleWidth As Long"} + ] + }, + { + "name": "RECT", + "kind": "type", + "in": "cListboxHScroll", + "vis": "private", + "public": false, + "file": "cListboxHScroll.twin", + "signature": "Private Type RECT", + "fields": [ + {"name":"Left","vis":"public","signature":"Left As Long"}, + {"name":"Top","vis":"public","signature":"Top As Long"}, + {"name":"Right","vis":"public","signature":"Right As Long"}, + {"name":"Bottom","vis":"public","signature":"Bottom As Long"} + ], + "members": [] + }, + { + "name": "SCROLLINFO", + "kind": "type", + "in": "cListboxHScroll", + "vis": "private", + "public": false, + "file": "cListboxHScroll.twin", + "signature": "Private Type SCROLLINFO", + "fields": [ + {"name":"cbSize","vis":"public","signature":"cbSize As Long"}, + {"name":"fMask","vis":"public","signature":"fMask As Long"}, + {"name":"nMin","vis":"public","signature":"nMin As Long"}, + {"name":"nMax","vis":"public","signature":"nMax As Long"}, + {"name":"nPage","vis":"public","signature":"nPage As Long"}, + {"name":"nPos","vis":"public","signature":"nPos As Long"}, + {"name":"nTrackPos","vis":"public","signature":"nTrackPos As Long"} + ], + "members": [] + }, + { + "name": "SIZE", + "kind": "type", + "in": "cListboxHScroll", + "vis": "private", + "public": false, + "file": "cListboxHScroll.twin", + "signature": "Private Type SIZE", + "fields": [ + {"name":"cx","vis":"public","signature":"cx As Long"}, + {"name":"cy","vis":"public","signature":"cy As Long"} + ], + "members": [] + } + ], + "aliases": [], + "problems": [] +} diff --git a/indexer/snapshots/contributed/TBMANLIB_RES/api.json b/indexer/snapshots/contributed/TBMANLIB_RES/api.json new file mode 100644 index 000000000..44c9d69d2 --- /dev/null +++ b/indexer/snapshots/contributed/TBMANLIB_RES/api.json @@ -0,0 +1,59 @@ +{ + "format": 3, + "package": "TBMANLIB_RES", + "project": "TBMANLIB_RES", + "version": "1.0.0.0", + "types": [ + { + "name": "TBMAN", + "kind": "module", + "vis": "public", + "file": "TBMAN.twin", + "signature": "Module TBMAN", + "members": [ + {"name":"Res","kind":"field","vis":"public","signature":"Public Res As new cRes"} + ] + }, + { + "name": "cRes", + "kind": "class", + "vis": "public", + "file": "cRes.twin", + "signature": "Class cRes", + "members": [ + {"name":"Read","kind":"function","vis":"public","signature":"Public Function Read(ByVal id As Variant, ByVal Type As Variant) As cRes","returnType":"cRes"}, + {"name":"ReturnBase64","kind":"function","vis":"public","signature":"Public Function ReturnBase64(Optional ByVal Prefix As Base64Prefix = Base64Prefix_None) As String","returnType":"String"}, + {"name":"ReturnBytes","kind":"function","vis":"public","signature":"Public Function ReturnBytes() As Byte()","returnType":"Byte()"}, + {"name":"ReturnHex","kind":"function","vis":"public","signature":"Public Function ReturnHex(Optional ByVal Separator As String = \"\", Optional ByVal LineBreak As Long = 0) As String","returnType":"String"}, + {"name":"ReturnPicture","kind":"function","vis":"public","signature":"Public Function ReturnPicture() As IPictureDisp","returnType":"IPictureDisp"}, + {"name":"ReturnString","kind":"function","vis":"public","signature":"Public Function ReturnString(Optional ByVal Conversion As VbStrConv = vbUnicode) As String","returnType":"String"}, + {"name":"m_Bytes","kind":"field","vis":"private","signature":"Private m_Bytes() As Byte"} + ] + }, + { + "name": "Base64Prefix", + "kind": "enum", + "in": "cRes", + "vis": "public", + "file": "cRes.twin", + "signature": "Public Enum Base64Prefix", + "values": [ + {"name":"Base64Prefix_None"}, + {"name":"Base64Prefix_ImagePNG"}, + {"name":"Base64Prefix_ImageJPEG"}, + {"name":"Base64Prefix_ImageGIF"}, + {"name":"Base64Prefix_ImageBMP"}, + {"name":"Base64Prefix_ImageICO"}, + {"name":"Base64Prefix_ImageWebP"}, + {"name":"Base64Prefix_VideoMP4"}, + {"name":"Base64Prefix_VideoWebM"}, + {"name":"Base64Prefix_VideoOGG"}, + {"name":"Base64Prefix_AudioMP3"}, + {"name":"Base64Prefix_AudioWAV"}, + {"name":"Base64Prefix_AudioOGG"} + ] + } + ], + "aliases": [], + "problems": [] +} diff --git a/indexer/snapshots/contributed/TwinTimerPackage/api.json b/indexer/snapshots/contributed/TwinTimerPackage/api.json new file mode 100644 index 000000000..d75939c44 --- /dev/null +++ b/indexer/snapshots/contributed/TwinTimerPackage/api.json @@ -0,0 +1,37 @@ +{ + "format": 3, + "package": "TwinTimerPackage", + "project": "TwinTimerPackage", + "version": "1.0.0.0", + "types": [ + { + "name": "TwinTimer", + "kind": "class", + "vis": "public", + "file": "TwinTimer.cls", + "signature": "Class TwinTimer", + "members": [ + {"name":"CLngToULng","kind":"function","vis":"private","signature":"Private Function CLngToULng(ByVal Value As Long) As LongLong","returnType":"LongLong"}, + {"name":"Class_Initialize","kind":"sub","vis":"private","signature":"Private Sub Class_Initialize()"}, + {"name":"Class_Terminate","kind":"sub","vis":"private","signature":"Private Sub Class_Terminate()"}, + {"name":"CreateTimer","kind":"sub","vis":"private","signature":"Private Sub CreateTimer()"}, + {"name":"DestroyTimer","kind":"sub","vis":"private","signature":"Private Sub DestroyTimer()"}, + {"name":"Enabled","kind":"property","vis":"public","signature":"Public Property Get Enabled() As Boolean","returnType":"Boolean","accessor":"Get"}, + {"name":"Enabled","kind":"property","vis":"public","signature":"Public Property Let Enabled(ByVal Value As Long)","accessor":"Let"}, + {"name":"GetTickCount","kind":"function","vis":"private","declare":true,"signature":"Private Declare PtrSafe Function GetTickCount Lib \"kernel32\" () As Long","returnType":"Long"}, + {"name":"Interval","kind":"property","vis":"public","signature":"Public Property Get Interval() As Long","returnType":"Long","accessor":"Get"}, + {"name":"Interval","kind":"property","vis":"public","signature":"Public Property Let Interval(ByVal Value As Long)","accessor":"Let"}, + {"name":"KillTimer","kind":"function","vis":"private","declare":true,"signature":"Private Declare PtrSafe Function KillTimer Lib \"user32\" (ByVal hWnd As LongPtr, ByVal nIDEvent As Long) As Long","returnType":"Long"}, + {"name":"PropEnabled","kind":"field","vis":"private","signature":"Private PropEnabled As Boolean"}, + {"name":"PropID","kind":"field","vis":"private","signature":"Private PropID As Long"}, + {"name":"PropInterval","kind":"field","vis":"private","signature":"Private PropInterval As Long"}, + {"name":"PropStartTime","kind":"field","vis":"private","signature":"Private PropStartTime As LongLong"}, + {"name":"SetTimer","kind":"function","vis":"private","declare":true,"signature":"Private Declare PtrSafe Function SetTimer Lib \"user32\" (ByVal hWnd As LongPtr, ByVal nIDEvent As Long, ByVal uElapse As Long, ByVal lpTimerFunc As LongPtr) As Long","returnType":"Long"}, + {"name":"Timer","kind":"event","vis":"public","signature":"Public Event Timer(ByVal ElapsedTime As LongLong)"}, + {"name":"TimerProc","kind":"sub","vis":"private","signature":"Private Sub TimerProc(ByVal hWnd As LongPtr, ByVal uMsg As Long, ByVal nIDEvent As Long, ByVal dwTime As Long)"} + ] + } + ], + "aliases": [], + "problems": [] +} diff --git a/indexer/snapshots/contributed/VBA_JSON/api.json b/indexer/snapshots/contributed/VBA_JSON/api.json new file mode 100644 index 000000000..057cc8869 --- /dev/null +++ b/indexer/snapshots/contributed/VBA_JSON/api.json @@ -0,0 +1,149 @@ +{ + "format": 3, + "package": "VBA_JSON", + "project": "VBA_JSON", + "version": "2.3.0.1", + "types": [ + { + "name": "Dictionary", + "kind": "class", + "vis": "public", + "file": "Dictionary.twin", + "signature": "Public Class Dictionary", + "attrs": [{"name":"ClassId","args":"\"6DB2FF1D-F9BE-4C3E-9D7F-515E46E36EAC\""},{"name":"InterfaceId","args":"\"217032FB-B259-4633-BED0-34C7C21DF57E\""}], + "members": [ + {"name":"Item","kind":"property","vis":"public","signature":"Public Property Get Item(Key As String) As Variant","returnType":"Variant","accessor":"Get","attrs":[{"name":"DefaultMember"}]}, + {"name":"Item","kind":"property","vis":"public","signature":"Public Property Let Item(Key As String, Value As Variant)","accessor":"Let"}, + {"name":"Item","kind":"property","vis":"public","signature":"Public Property Set Item(Key As String, Value As Variant)","accessor":"Set"}, + {"name":"Keys","kind":"property","vis":"public","signature":"Public Property Get Keys() As Variant","returnType":"Variant","accessor":"Get"}, + {"name":"_NewEnum","kind":"function","vis":"private","signature":"Private Function _NewEnum() As Variant","returnType":"Variant","attrs":[{"name":"Enumerator"}]}, + {"name":"m_Collection","kind":"field","vis":"private","signature":"Private m_Collection As Collection = New Collection"} + ] + }, + { + "name": "JsonConverter", + "kind": "module", + "vis": "public", + "file": "JsonConverter.twin", + "signature": "Public Module JsonConverter", + "members": [ + {"name":"ConvertToIso","kind":"function","vis":"public","signature":"Public Function ConvertToIso(utc_LocalDate As Date) As String","returnType":"String"}, + {"name":"ConvertToJson","kind":"function","vis":"public","signature":"Public Function ConvertToJson(ByVal JsonValue As Variant, Optional ByVal Whitespace As Variant, Optional ByVal json_CurrentIndentation As Long = 0) As String","returnType":"String"}, + {"name":"ConvertToUtc","kind":"function","vis":"public","signature":"Public Function ConvertToUtc(utc_LocalDate As Date) As Date","returnType":"Date"}, + {"name":"JsonOptions","kind":"field","vis":"public","signature":"Public JsonOptions As json_Options"}, + {"name":"ParseIso","kind":"function","vis":"public","signature":"Public Function ParseIso(utc_IsoString As String) As Date","returnType":"Date"}, + {"name":"ParseJson","kind":"function","vis":"public","signature":"Public Function ParseJson(ByVal JsonString As String) As Object","returnType":"Object"}, + {"name":"ParseUtc","kind":"function","vis":"public","signature":"Public Function ParseUtc(utc_UtcDate As Date) As Date","returnType":"Date"}, + {"name":"json_BufferAppend","kind":"sub","vis":"private","signature":"Private Sub json_BufferAppend(ByRef json_Buffer As String, ByRef json_Append As Variant, ByRef json_BufferPosition As Long, ByRef json_BufferLength As Long)"}, + {"name":"json_BufferToString","kind":"function","vis":"private","signature":"Private Function json_BufferToString(ByRef json_Buffer As String, ByVal json_BufferPosition As Long) As String","returnType":"String"}, + {"name":"json_Encode","kind":"function","vis":"private","signature":"Private Function json_Encode(ByVal json_Text As Variant) As String","returnType":"String"}, + {"name":"json_IsUndefined","kind":"function","vis":"private","signature":"Private Function json_IsUndefined(ByVal json_Value As Variant) As Boolean","returnType":"Boolean"}, + {"name":"json_ParseArray","kind":"function","vis":"private","signature":"Private Function json_ParseArray(json_String As String, ByRef json_Index As Long) As Collection","returnType":"Collection"}, + {"name":"json_ParseErrorMessage","kind":"function","vis":"private","signature":"Private Function json_ParseErrorMessage(json_String As String, ByRef json_Index As Long, ErrorMessage As String) As Variant","returnType":"Variant"}, + {"name":"json_ParseKey","kind":"function","vis":"private","signature":"Private Function json_ParseKey(json_String As String, ByRef json_Index As Long) As String","returnType":"String"}, + {"name":"json_ParseNumber","kind":"function","vis":"private","signature":"Private Function json_ParseNumber(json_String As String, ByRef json_Index As Long) As Variant","returnType":"Variant"}, + {"name":"json_ParseObject","kind":"function","vis":"private","signature":"Private Function json_ParseObject(json_String As String, ByRef json_Index As Long) As Dictionary","returnType":"Dictionary"}, + {"name":"json_ParseString","kind":"function","vis":"private","signature":"Private Function json_ParseString(json_String As String, ByRef json_Index As Long) As String","returnType":"String"}, + {"name":"json_ParseValue","kind":"function","vis":"private","signature":"Private Function json_ParseValue(json_String As String, ByRef json_Index As Long) As Variant","returnType":"Variant"}, + {"name":"json_Peek","kind":"function","vis":"private","signature":"Private Function json_Peek(json_String As String, ByVal json_Index As Long, Optional json_NumberOfCharacters As Long = 1) As String","returnType":"String"}, + {"name":"json_SkipSpaces","kind":"sub","vis":"private","signature":"Private Sub json_SkipSpaces(json_String As String, ByRef json_Index As Long)"}, + {"name":"json_StringIsLargeNumber","kind":"function","vis":"private","signature":"Private Function json_StringIsLargeNumber(json_String As Variant) As Boolean","returnType":"Boolean"}, + {"name":"utc_ConvertDate","kind":"function","vis":"private","signature":"Private Function utc_ConvertDate(utc_Value As Date, Optional utc_ConvertToUtc As Boolean = False) As Date","returnType":"Date"}, + {"name":"utc_DateToSystemTime","kind":"function","vis":"private","signature":"Private Function utc_DateToSystemTime(utc_Value As Date) As utc_SYSTEMTIME","returnType":"utc_SYSTEMTIME"}, + {"name":"utc_ExecuteInShell","kind":"function","vis":"private","signature":"Private Function utc_ExecuteInShell(utc_ShellCommand As String) As utc_ShellResult","returnType":"utc_ShellResult"}, + {"name":"utc_GetTimeZoneInformation","kind":"function","vis":"private","declare":true,"returnType":"Long","signatures":[{"cond":"Not (Mac) And VBA7","signature":"Private Declare PtrSafe Function utc_GetTimeZoneInformation Lib \"kernel32\" Alias \"GetTimeZoneInformation\" (utc_lpTimeZoneInformation As utc_TIME_ZONE_INFORMATION) As Long"},{"cond":"Not (Mac) And Not (VBA7)","signature":"Private Declare Function utc_GetTimeZoneInformation Lib \"kernel32\" Alias \"GetTimeZoneInformation\" (utc_lpTimeZoneInformation As utc_TIME_ZONE_INFORMATION) As Long"}]}, + {"name":"utc_SystemTimeToDate","kind":"function","vis":"private","signature":"Private Function utc_SystemTimeToDate(utc_Value As utc_SYSTEMTIME) As Date","returnType":"Date"}, + {"name":"utc_SystemTimeToTzSpecificLocalTime","kind":"function","vis":"private","declare":true,"returnType":"Long","signatures":[{"cond":"Not (Mac) And VBA7","signature":"Private Declare PtrSafe Function utc_SystemTimeToTzSpecificLocalTime Lib \"kernel32\" Alias \"SystemTimeToTzSpecificLocalTime\" (utc_lpTimeZoneInformation As utc_TIME_ZONE_INFORMATION, utc_lpUniversalTime As utc_SYSTEMTIME, utc_lpLocalTime As utc_SYSTEMTIME) As Long"},{"cond":"Not (Mac) And Not (VBA7)","signature":"Private Declare Function utc_SystemTimeToTzSpecificLocalTime Lib \"kernel32\" Alias \"SystemTimeToTzSpecificLocalTime\" (utc_lpTimeZoneInformation As utc_TIME_ZONE_INFORMATION, utc_lpUniversalTime As utc_SYSTEMTIME, utc_lpLocalTime As utc_SYSTEMTIME) As Long"}]}, + {"name":"utc_TzSpecificLocalTimeToSystemTime","kind":"function","vis":"private","declare":true,"returnType":"Long","signatures":[{"cond":"Not (Mac) And VBA7","signature":"Private Declare PtrSafe Function utc_TzSpecificLocalTimeToSystemTime Lib \"kernel32\" Alias \"TzSpecificLocalTimeToSystemTime\" (utc_lpTimeZoneInformation As utc_TIME_ZONE_INFORMATION, utc_lpLocalTime As utc_SYSTEMTIME, utc_lpUniversalTime As utc_SYSTEMTIME) As Long"},{"cond":"Not (Mac) And Not (VBA7)","signature":"Private Declare Function utc_TzSpecificLocalTimeToSystemTime Lib \"kernel32\" Alias \"TzSpecificLocalTimeToSystemTime\" (utc_lpTimeZoneInformation As utc_TIME_ZONE_INFORMATION, utc_lpLocalTime As utc_SYSTEMTIME, utc_lpUniversalTime As utc_SYSTEMTIME) As Long"}]}, + {"name":"utc_feof","kind":"function","vis":"private","declare":true,"signatures":[{"cond":"Mac And VBA7","signature":"Private Declare PtrSafe Function utc_feof Lib \"/usr/lib/libc.dylib\" Alias \"feof\" (ByVal utc_File As LongPtr) As LongPtr","returnType":"LongPtr"},{"cond":"Mac And Not (VBA7)","signature":"Private Declare Function utc_feof Lib \"libc.dylib\" Alias \"feof\" (ByVal utc_File As Long) As Long","returnType":"Long"}]}, + {"name":"utc_fread","kind":"function","vis":"private","declare":true,"signatures":[{"cond":"Mac And VBA7","signature":"Private Declare PtrSafe Function utc_fread Lib \"/usr/lib/libc.dylib\" Alias \"fread\" (ByVal utc_Buffer As String, ByVal utc_Size As LongPtr, ByVal utc_Number As LongPtr, ByVal utc_File As LongPtr) As LongPtr","returnType":"LongPtr"},{"cond":"Mac And Not (VBA7)","signature":"Private Declare Function utc_fread Lib \"libc.dylib\" Alias \"fread\" (ByVal utc_Buffer As String, ByVal utc_Size As Long, ByVal utc_Number As Long, ByVal utc_File As Long) As Long","returnType":"Long"}]}, + {"name":"utc_pclose","kind":"function","vis":"private","declare":true,"signatures":[{"cond":"Mac And VBA7","signature":"Private Declare PtrSafe Function utc_pclose Lib \"/usr/lib/libc.dylib\" Alias \"pclose\" (ByVal utc_File As LongPtr) As LongPtr","returnType":"LongPtr"},{"cond":"Mac And Not (VBA7)","signature":"Private Declare Function utc_pclose Lib \"libc.dylib\" Alias \"pclose\" (ByVal utc_File As Long) As Long","returnType":"Long"}]}, + {"name":"utc_popen","kind":"function","vis":"private","declare":true,"signatures":[{"cond":"Mac And VBA7","signature":"Private Declare PtrSafe Function utc_popen Lib \"/usr/lib/libc.dylib\" Alias \"popen\" (ByVal utc_Command As String, ByVal utc_Mode As String) As LongPtr","returnType":"LongPtr"},{"cond":"Mac And Not (VBA7)","signature":"Private Declare Function utc_popen Lib \"libc.dylib\" Alias \"popen\" (ByVal utc_Command As String, ByVal utc_Mode As String) As Long","returnType":"Long"}]} + ] + }, + { + "name": "json_Options", + "kind": "type", + "in": "JsonConverter", + "vis": "private", + "public": false, + "file": "JsonConverter.twin", + "signature": "Private Type json_Options", + "fields": [ + {"name":"UseDoubleForLargeNumbers","vis":"public","signature":"UseDoubleForLargeNumbers As Boolean"}, + {"name":"AllowUnquotedKeys","vis":"public","signature":"AllowUnquotedKeys As Boolean"}, + {"name":"EscapeSolidus","vis":"public","signature":"EscapeSolidus As Boolean"} + ], + "members": [] + }, + { + "name": "utc_SYSTEMTIME", + "kind": "type", + "in": "JsonConverter", + "vis": "private", + "public": false, + "file": "JsonConverter.twin", + "signature": "Private Type utc_SYSTEMTIME", + "fields": [ + {"name":"utc_wYear","vis":"public","signature":"utc_wYear As Integer"}, + {"name":"utc_wMonth","vis":"public","signature":"utc_wMonth As Integer"}, + {"name":"utc_wDayOfWeek","vis":"public","signature":"utc_wDayOfWeek As Integer"}, + {"name":"utc_wDay","vis":"public","signature":"utc_wDay As Integer"}, + {"name":"utc_wHour","vis":"public","signature":"utc_wHour As Integer"}, + {"name":"utc_wMinute","vis":"public","signature":"utc_wMinute As Integer"}, + {"name":"utc_wSecond","vis":"public","signature":"utc_wSecond As Integer"}, + {"name":"utc_wMilliseconds","vis":"public","signature":"utc_wMilliseconds As Integer"} + ], + "members": [] + }, + { + "name": "utc_ShellResult", + "kind": "type", + "in": "JsonConverter", + "vis": "private", + "public": false, + "file": "JsonConverter.twin", + "signature": "Private Type utc_ShellResult", + "fields": [ + {"name":"utc_Output","vis":"public","signature":"utc_Output As String"}, + {"name":"utc_ExitCode","vis":"public","signature":"utc_ExitCode As LongPtr"} + ], + "members": [] + }, + { + "name": "utc_ShellResult", + "kind": "type", + "in": "JsonConverter", + "vis": "private", + "public": false, + "file": "JsonConverter.twin", + "signature": "Private Type utc_ShellResult", + "fields": [ + {"name":"utc_Output","vis":"public","signature":"utc_Output As String"}, + {"name":"utc_ExitCode","vis":"public","signature":"utc_ExitCode As Long"} + ], + "members": [] + }, + { + "name": "utc_TIME_ZONE_INFORMATION", + "kind": "type", + "in": "JsonConverter", + "vis": "private", + "public": false, + "file": "JsonConverter.twin", + "signature": "Private Type utc_TIME_ZONE_INFORMATION", + "fields": [ + {"name":"utc_Bias","vis":"public","signature":"utc_Bias As Long"}, + {"name":"utc_StandardName","vis":"public","signature":"utc_StandardName(0 To 31) As Integer"}, + {"name":"utc_StandardDate","vis":"public","signature":"utc_StandardDate As utc_SYSTEMTIME"}, + {"name":"utc_StandardBias","vis":"public","signature":"utc_StandardBias As Long"}, + {"name":"utc_DaylightName","vis":"public","signature":"utc_DaylightName(0 To 31) As Integer"}, + {"name":"utc_DaylightDate","vis":"public","signature":"utc_DaylightDate As utc_SYSTEMTIME"}, + {"name":"utc_DaylightBias","vis":"public","signature":"utc_DaylightBias As Long"} + ], + "members": [] + } + ], + "aliases": [], + "problems": [] +} diff --git a/indexer/snapshots/contributed/VBComDlg/api.json b/indexer/snapshots/contributed/VBComDlg/api.json new file mode 100644 index 000000000..a393fe1c0 --- /dev/null +++ b/indexer/snapshots/contributed/VBComDlg/api.json @@ -0,0 +1,1624 @@ +{ + "format": 3, + "package": "VBComDlg", + "project": "VBComDlg", + "version": "1.0.3.0", + "types": [ + { + "name": "CommonDialog", + "kind": "class", + "vis": "public", + "file": "CommonDialog.cls", + "signature": "Class CommonDialog", + "members": [ + {"name":"Action","kind":"property","vis":"public","signature":"Public Property Get Action() As Integer","returnType":"Integer","accessor":"Get"}, + {"name":"Action","kind":"property","vis":"public","signature":"Public Property Let Action(ByVal Value As Integer)","accessor":"Let"}, + {"name":"BIF_BROWSEFILEJUNCTIONS","kind":"const","vis":"private","signature":"Private Const BIF_BROWSEFILEJUNCTIONS As Long = &H10000"}, + {"name":"BIF_BROWSEFORCOMPUTER","kind":"const","vis":"private","signature":"Private Const BIF_BROWSEFORCOMPUTER As Long = &H1000"}, + {"name":"BIF_BROWSEFORPRINTER","kind":"const","vis":"private","signature":"Private Const BIF_BROWSEFORPRINTER As Long = &H2000"}, + {"name":"BIF_BROWSEINCLUDEFILES","kind":"const","vis":"private","signature":"Private Const BIF_BROWSEINCLUDEFILES As Long = &H4000"}, + {"name":"BIF_BROWSEINCLUDEURLS","kind":"const","vis":"private","signature":"Private Const BIF_BROWSEINCLUDEURLS As Long = &H80"}, + {"name":"BIF_DONTGOBELOWDOMAIN","kind":"const","vis":"private","signature":"Private Const BIF_DONTGOBELOWDOMAIN As Long = &H2"}, + {"name":"BIF_EDITBOX","kind":"const","vis":"private","signature":"Private Const BIF_EDITBOX As Long = &H10"}, + {"name":"BIF_NEWDIALOGSTYLE","kind":"const","vis":"private","signature":"Private Const BIF_NEWDIALOGSTYLE As Long = &H40"}, + {"name":"BIF_NONEWFOLDERBUTTON","kind":"const","vis":"private","signature":"Private Const BIF_NONEWFOLDERBUTTON As Long = &H200"}, + {"name":"BIF_NOTRANSLATETARGETS","kind":"const","vis":"private","signature":"Private Const BIF_NOTRANSLATETARGETS As Long = &H400"}, + {"name":"BIF_RETURNFSANCESTORS","kind":"const","vis":"private","signature":"Private Const BIF_RETURNFSANCESTORS As Long = &H8"}, + {"name":"BIF_RETURNONLYFSDIRS","kind":"const","vis":"private","signature":"Private Const BIF_RETURNONLYFSDIRS As Long = &H1"}, + {"name":"BIF_SHAREABLE","kind":"const","vis":"private","signature":"Private Const BIF_SHAREABLE As Long = &H8000&"}, + {"name":"BIF_STATUSTEXT","kind":"const","vis":"private","signature":"Private Const BIF_STATUSTEXT As Long = &H4"}, + {"name":"BIF_UAHINT","kind":"const","vis":"private","signature":"Private Const BIF_UAHINT As Long = &H100"}, + {"name":"BIF_USENEWUI","kind":"const","vis":"private","signature":"Private Const BIF_USENEWUI As Long = BIF_EDITBOX Or BIF_NEWDIALOGSTYLE"}, + {"name":"BIF_VALIDATE","kind":"const","vis":"private","signature":"Private Const BIF_VALIDATE As Long = &H20"}, + {"name":"BN_CLICKED","kind":"const","vis":"private","signature":"Private Const BN_CLICKED As Long = 0"}, + {"name":"CCHDEVICENAME","kind":"const","vis":"private","signature":"Private Const CCHDEVICENAME As Long = 32"}, + {"name":"CCHDEVNAMESEXTRA","kind":"const","vis":"private","signature":"Private Const CCHDEVNAMESEXTRA As Long = 200"}, + {"name":"CCHFORMNAME","kind":"const","vis":"private","signature":"Private Const CCHFORMNAME As Long = 32"}, + {"name":"CC_ANYCOLOR","kind":"const","vis":"private","signature":"Private Const CC_ANYCOLOR As Long = &H100"}, + {"name":"CC_ENABLEHOOK","kind":"const","vis":"private","signature":"Private Const CC_ENABLEHOOK As Long = &H10"}, + {"name":"CC_FULLOPEN","kind":"const","vis":"private","signature":"Private Const CC_FULLOPEN As Long = &H2"}, + {"name":"CC_PREVENTFULLOPEN","kind":"const","vis":"private","signature":"Private Const CC_PREVENTFULLOPEN As Long = &H4"}, + {"name":"CC_RGBINIT","kind":"const","vis":"private","signature":"Private Const CC_RGBINIT As Long = &H1"}, + {"name":"CC_SHOWHELP","kind":"const","vis":"private","signature":"Private Const CC_SHOWHELP As Long = &H8"}, + {"name":"CC_SOLIDCOLOR","kind":"const","vis":"private","signature":"Private Const CC_SOLIDCOLOR As Long = &H80"}, + {"name":"CFERR_MAXLESSTHANMIN","kind":"const","vis":"private","signature":"Private Const CFERR_MAXLESSTHANMIN As Long = &H2002"}, + {"name":"CFERR_NOFONTS","kind":"const","vis":"private","signature":"Private Const CFERR_NOFONTS As Long = &H2001"}, + {"name":"CF_APPLY","kind":"const","vis":"private","signature":"Private Const CF_APPLY As Long = &H200"}, + {"name":"CF_EFFECTS","kind":"const","vis":"private","signature":"Private Const CF_EFFECTS As Long = &H100"}, + {"name":"CF_ENABLEHOOK","kind":"const","vis":"private","signature":"Private Const CF_ENABLEHOOK As Long = &H8"}, + {"name":"CF_FIXEDPITCHONLY","kind":"const","vis":"private","signature":"Private Const CF_FIXEDPITCHONLY As Long = &H4000"}, + {"name":"CF_FORCEFONTEXIST","kind":"const","vis":"private","signature":"Private Const CF_FORCEFONTEXIST As Long = &H10000"}, + {"name":"CF_INITTOLOGFONTSTRUCT","kind":"const","vis":"private","signature":"Private Const CF_INITTOLOGFONTSTRUCT As Long = &H40"}, + {"name":"CF_LIMITSIZE","kind":"const","vis":"private","signature":"Private Const CF_LIMITSIZE As Long = &H2000"}, + {"name":"CF_NOFACESEL","kind":"const","vis":"private","signature":"Private Const CF_NOFACESEL As Long = &H80000"}, + {"name":"CF_NOSCRIPTSEL","kind":"const","vis":"private","signature":"Private Const CF_NOSCRIPTSEL As Long = &H800000"}, + {"name":"CF_NOSIZESEL","kind":"const","vis":"private","signature":"Private Const CF_NOSIZESEL As Long = &H200000"}, + {"name":"CF_NOSTYLESEL","kind":"const","vis":"private","signature":"Private Const CF_NOSTYLESEL As Long = &H100000"}, + {"name":"CF_NOVECTORFONTS","kind":"const","vis":"private","signature":"Private Const CF_NOVECTORFONTS As Long = &H800"}, + {"name":"CF_NOVERTFONTS","kind":"const","vis":"private","signature":"Private Const CF_NOVERTFONTS As Long = &H1000000"}, + {"name":"CF_PRINTERFONTS","kind":"const","vis":"private","signature":"Private Const CF_PRINTERFONTS As Long = &H2"}, + {"name":"CF_SCALABLEONLY","kind":"const","vis":"private","signature":"Private Const CF_SCALABLEONLY As Long = &H20000"}, + {"name":"CF_SCREENFONTS","kind":"const","vis":"private","signature":"Private Const CF_SCREENFONTS As Long = &H1"}, + {"name":"CF_SCRIPTSONLY","kind":"const","vis":"private","signature":"Private Const CF_SCRIPTSONLY As Long = &H400"}, + {"name":"CF_SELECTSCRIPT","kind":"const","vis":"private","signature":"Private Const CF_SELECTSCRIPT As Long = &H400000"}, + {"name":"CF_SHOWHELP","kind":"const","vis":"private","signature":"Private Const CF_SHOWHELP As Long = &H4"}, + {"name":"CF_TTONLY","kind":"const","vis":"private","signature":"Private Const CF_TTONLY As Long = &H40000"}, + {"name":"CIntToUInt","kind":"function","vis":"private","signature":"Private Function CIntToUInt(ByVal Value As Integer) As Long","returnType":"Long"}, + {"name":"COLOROKSTRING","kind":"const","vis":"private","signature":"Private Const COLOROKSTRING As String = \"commdlg_ColorOK\""}, + {"name":"CUIntToInt","kind":"function","vis":"private","signature":"Private Function CUIntToInt(ByVal Value As Long) As Integer","returnType":"Integer"}, + {"name":"CallbackProcDialog","kind":"function","vis":"private","signature":"Private Function CallbackProcDialog(ByVal hDlg As LongPtr, ByVal wMsg As Long, ByVal wParam As LongPtr, ByVal lParam As LongPtr, ByVal dwRefData As LongPtr) As LongPtr","returnType":"LongPtr"}, + {"name":"CancelError","kind":"property","vis":"public","signature":"Public Property Get CancelError() As Boolean","returnType":"Boolean","accessor":"Get"}, + {"name":"CancelError","kind":"property","vis":"public","signature":"Public Property Let CancelError(ByVal Value As Boolean)","accessor":"Let"}, + {"name":"CdlBIFBrowseFileJunctions","kind":"field","vis":"private","signature":"Private CdlBIFBrowseFileJunctions"}, + {"name":"CdlBIFBrowseForComputer","kind":"field","vis":"private","signature":"Private CdlBIFBrowseForComputer"}, + {"name":"CdlBIFBrowseForPrinter","kind":"field","vis":"private","signature":"Private CdlBIFBrowseForPrinter"}, + {"name":"CdlBIFBrowseIncludeFiles","kind":"field","vis":"private","signature":"Private CdlBIFBrowseIncludeFiles"}, + {"name":"CdlBIFBrowseIncludeURLs","kind":"field","vis":"private","signature":"Private CdlBIFBrowseIncludeURLs"}, + {"name":"CdlBIFDontGoBelowDomain","kind":"field","vis":"private","signature":"Private CdlBIFDontGoBelowDomain"}, + {"name":"CdlBIFEditBox","kind":"field","vis":"private","signature":"Private CdlBIFEditBox"}, + {"name":"CdlBIFNewDialogStyle","kind":"field","vis":"private","signature":"Private CdlBIFNewDialogStyle"}, + {"name":"CdlBIFNoNewFolderButton","kind":"field","vis":"private","signature":"Private CdlBIFNoNewFolderButton"}, + {"name":"CdlBIFNoTranslateTargets","kind":"field","vis":"private","signature":"Private CdlBIFNoTranslateTargets"}, + {"name":"CdlBIFReturnFSAncestors","kind":"field","vis":"private","signature":"Private CdlBIFReturnFSAncestors"}, + {"name":"CdlBIFReturnOnlyFSDirs","kind":"field","vis":"private","signature":"Private CdlBIFReturnOnlyFSDirs"}, + {"name":"CdlBIFShareable","kind":"field","vis":"private","signature":"Private CdlBIFShareable"}, + {"name":"CdlBIFStatusText","kind":"field","vis":"private","signature":"Private CdlBIFStatusText"}, + {"name":"CdlBIFUAHint","kind":"field","vis":"private","signature":"Private CdlBIFUAHint"}, + {"name":"CdlBIFUseNewUI","kind":"field","vis":"private","signature":"Private CdlBIFUseNewUI"}, + {"name":"CdlBIFValidate","kind":"field","vis":"private","signature":"Private CdlBIFValidate"}, + {"name":"CdlBufferLengthZero","kind":"field","vis":"private","signature":"Private CdlBufferLengthZero"}, + {"name":"CdlBufferTooSmall","kind":"field","vis":"private","signature":"Private CdlBufferTooSmall"}, + {"name":"CdlCCAnyColor","kind":"field","vis":"private","signature":"Private CdlCCAnyColor"}, + {"name":"CdlCCFullOpen","kind":"field","vis":"private","signature":"Private CdlCCFullOpen"}, + {"name":"CdlCCHelpButton","kind":"field","vis":"private","signature":"Private CdlCCHelpButton"}, + {"name":"CdlCCPreventFullOpen","kind":"field","vis":"private","signature":"Private CdlCCPreventFullOpen"}, + {"name":"CdlCCRGBInit","kind":"field","vis":"private","signature":"Private CdlCCRGBInit"}, + {"name":"CdlCCSolidColor","kind":"field","vis":"private","signature":"Private CdlCCSolidColor"}, + {"name":"CdlCFApply","kind":"field","vis":"private","signature":"Private CdlCFApply"}, + {"name":"CdlCFEffects","kind":"field","vis":"private","signature":"Private CdlCFEffects"}, + {"name":"CdlCFFixedPitchOnly","kind":"field","vis":"private","signature":"Private CdlCFFixedPitchOnly"}, + {"name":"CdlCFForceFontExist","kind":"field","vis":"private","signature":"Private CdlCFForceFontExist"}, + {"name":"CdlCFHelpButton","kind":"field","vis":"private","signature":"Private CdlCFHelpButton"}, + {"name":"CdlCFLimitSize","kind":"field","vis":"private","signature":"Private CdlCFLimitSize"}, + {"name":"CdlCFNoFaceSel","kind":"field","vis":"private","signature":"Private CdlCFNoFaceSel"}, + {"name":"CdlCFNoScriptSel","kind":"field","vis":"private","signature":"Private CdlCFNoScriptSel"}, + {"name":"CdlCFNoSizeSel","kind":"field","vis":"private","signature":"Private CdlCFNoSizeSel"}, + {"name":"CdlCFNoStyleSel","kind":"field","vis":"private","signature":"Private CdlCFNoStyleSel"}, + {"name":"CdlCFNoVectorFonts","kind":"field","vis":"private","signature":"Private CdlCFNoVectorFonts"}, + {"name":"CdlCFNoVertFonts","kind":"field","vis":"private","signature":"Private CdlCFNoVertFonts"}, + {"name":"CdlCFPrinterFonts","kind":"field","vis":"private","signature":"Private CdlCFPrinterFonts"}, + {"name":"CdlCFScalableOnly","kind":"field","vis":"private","signature":"Private CdlCFScalableOnly"}, + {"name":"CdlCFScreenFonts","kind":"field","vis":"private","signature":"Private CdlCFScreenFonts"}, + {"name":"CdlCFScriptsOnly","kind":"field","vis":"private","signature":"Private CdlCFScriptsOnly"}, + {"name":"CdlCFSelectScript","kind":"field","vis":"private","signature":"Private CdlCFSelectScript"}, + {"name":"CdlCFTTOnly","kind":"field","vis":"private","signature":"Private CdlCFTTOnly"}, + {"name":"CdlCancel","kind":"field","vis":"private","signature":"Private CdlCancel"}, + {"name":"CdlCreateICFailure","kind":"field","vis":"private","signature":"Private CdlCreateICFailure"}, + {"name":"CdlDndmMismatch","kind":"field","vis":"private","signature":"Private CdlDndmMismatch"}, + {"name":"CdlFRDown","kind":"field","vis":"private","signature":"Private CdlFRDown"}, + {"name":"CdlFRFindNext","kind":"field","vis":"private","signature":"Private CdlFRFindNext"}, + {"name":"CdlFRHelpButton","kind":"field","vis":"private","signature":"Private CdlFRHelpButton"}, + {"name":"CdlFRHideMatchCase","kind":"field","vis":"private","signature":"Private CdlFRHideMatchCase"}, + {"name":"CdlFRHideUpDown","kind":"field","vis":"private","signature":"Private CdlFRHideUpDown"}, + {"name":"CdlFRHideWholeWord","kind":"field","vis":"private","signature":"Private CdlFRHideWholeWord"}, + {"name":"CdlFRMatchCase","kind":"field","vis":"private","signature":"Private CdlFRMatchCase"}, + {"name":"CdlFRNoMatchCase","kind":"field","vis":"private","signature":"Private CdlFRNoMatchCase"}, + {"name":"CdlFRNoUpDown","kind":"field","vis":"private","signature":"Private CdlFRNoUpDown"}, + {"name":"CdlFRNoWholeWord","kind":"field","vis":"private","signature":"Private CdlFRNoWholeWord"}, + {"name":"CdlFRReplace","kind":"field","vis":"private","signature":"Private CdlFRReplace"}, + {"name":"CdlFRReplaceAll","kind":"field","vis":"private","signature":"Private CdlFRReplaceAll"}, + {"name":"CdlFRWholeWord","kind":"field","vis":"private","signature":"Private CdlFRWholeWord"}, + {"name":"CdlGetDevModeFail","kind":"field","vis":"private","signature":"Private CdlGetDevModeFail"}, + {"name":"CdlHelp","kind":"field","vis":"private","signature":"Private CdlHelp"}, + {"name":"CdlHelpCommandHelp","kind":"field","vis":"private","signature":"Private CdlHelpCommandHelp"}, + {"name":"CdlHelpContents","kind":"field","vis":"private","signature":"Private CdlHelpContents"}, + {"name":"CdlHelpContext","kind":"field","vis":"private","signature":"Private CdlHelpContext"}, + {"name":"CdlHelpContextPopup","kind":"field","vis":"private","signature":"Private CdlHelpContextPopup"}, + {"name":"CdlHelpForceFile","kind":"field","vis":"private","signature":"Private CdlHelpForceFile"}, + {"name":"CdlHelpHelpOnHelp","kind":"field","vis":"private","signature":"Private CdlHelpHelpOnHelp"}, + {"name":"CdlHelpIndex","kind":"field","vis":"private","signature":"Private CdlHelpIndex"}, + {"name":"CdlHelpKey","kind":"field","vis":"private","signature":"Private CdlHelpKey"}, + {"name":"CdlHelpPartialKey","kind":"field","vis":"private","signature":"Private CdlHelpPartialKey"}, + {"name":"CdlHelpQuit","kind":"field","vis":"private","signature":"Private CdlHelpQuit"}, + {"name":"CdlHelpSetContents","kind":"field","vis":"private","signature":"Private CdlHelpSetContents"}, + {"name":"CdlHelpSetIndex","kind":"field","vis":"private","signature":"Private CdlHelpSetIndex"}, + {"name":"CdlInitFailure","kind":"field","vis":"private","signature":"Private CdlInitFailure"}, + {"name":"CdlInvalidFileName","kind":"field","vis":"private","signature":"Private CdlInvalidFileName"}, + {"name":"CdlLoadDrvFailure","kind":"field","vis":"private","signature":"Private CdlLoadDrvFailure"}, + {"name":"CdlMaxLessThanMin","kind":"field","vis":"private","signature":"Private CdlMaxLessThanMin"}, + {"name":"CdlNoDefaultPrn","kind":"field","vis":"private","signature":"Private CdlNoDefaultPrn"}, + {"name":"CdlNoDevices","kind":"field","vis":"private","signature":"Private CdlNoDevices"}, + {"name":"CdlNoFonts","kind":"field","vis":"private","signature":"Private CdlNoFonts"}, + {"name":"CdlOAIFAllowRegistration","kind":"field","vis":"private","signature":"Private CdlOAIFAllowRegistration"}, + {"name":"CdlOAIFExecute","kind":"field","vis":"private","signature":"Private CdlOAIFExecute"}, + {"name":"CdlOAIFForceRegistration","kind":"field","vis":"private","signature":"Private CdlOAIFForceRegistration"}, + {"name":"CdlOAIFHideRegistration","kind":"field","vis":"private","signature":"Private CdlOAIFHideRegistration"}, + {"name":"CdlOAIFRegisterExt","kind":"field","vis":"private","signature":"Private CdlOAIFRegisterExt"}, + {"name":"CdlOAIFURLProtocol","kind":"field","vis":"private","signature":"Private CdlOAIFURLProtocol"}, + {"name":"CdlOFNAllowMultiSelect","kind":"field","vis":"private","signature":"Private CdlOFNAllowMultiSelect"}, + {"name":"CdlOFNCreatePrompt","kind":"field","vis":"private","signature":"Private CdlOFNCreatePrompt"}, + {"name":"CdlOFNDontAddToRecent","kind":"field","vis":"private","signature":"Private CdlOFNDontAddToRecent"}, + {"name":"CdlOFNExplorer","kind":"field","vis":"private","signature":"Private CdlOFNExplorer"}, + {"name":"CdlOFNExtensionDifferent","kind":"field","vis":"private","signature":"Private CdlOFNExtensionDifferent"}, + {"name":"CdlOFNFileMustExist","kind":"field","vis":"private","signature":"Private CdlOFNFileMustExist"}, + {"name":"CdlOFNForcesShowHidden","kind":"field","vis":"private","signature":"Private CdlOFNForcesShowHidden"}, + {"name":"CdlOFNHelpButton","kind":"field","vis":"private","signature":"Private CdlOFNHelpButton"}, + {"name":"CdlOFNHideReadOnly","kind":"field","vis":"private","signature":"Private CdlOFNHideReadOnly"}, + {"name":"CdlOFNNoChangeDir","kind":"field","vis":"private","signature":"Private CdlOFNNoChangeDir"}, + {"name":"CdlOFNNoDereferenceLinks","kind":"field","vis":"private","signature":"Private CdlOFNNoDereferenceLinks"}, + {"name":"CdlOFNNoNetworkButton","kind":"field","vis":"private","signature":"Private CdlOFNNoNetworkButton"}, + {"name":"CdlOFNNoReadOnlyReturn","kind":"field","vis":"private","signature":"Private CdlOFNNoReadOnlyReturn"}, + {"name":"CdlOFNNoValidate","kind":"field","vis":"private","signature":"Private CdlOFNNoValidate"}, + {"name":"CdlOFNOverwritePrompt","kind":"field","vis":"private","signature":"Private CdlOFNOverwritePrompt"}, + {"name":"CdlOFNPathMustExist","kind":"field","vis":"private","signature":"Private CdlOFNPathMustExist"}, + {"name":"CdlOFNReadOnly","kind":"field","vis":"private","signature":"Private CdlOFNReadOnly"}, + {"name":"CdlOFNShareAware","kind":"field","vis":"private","signature":"Private CdlOFNShareAware"}, + {"name":"CdlOFNShareViResultFallThrough","kind":"field","vis":"private","signature":"Private CdlOFNShareViResultFallThrough"}, + {"name":"CdlOFNShareViResultNoWarn","kind":"field","vis":"private","signature":"Private CdlOFNShareViResultNoWarn"}, + {"name":"CdlOFNShareViResultWarn","kind":"field","vis":"private","signature":"Private CdlOFNShareViResultWarn"}, + {"name":"CdlPDAllPages","kind":"field","vis":"private","signature":"Private CdlPDAllPages"}, + {"name":"CdlPDCollate","kind":"field","vis":"private","signature":"Private CdlPDCollate"}, + {"name":"CdlPDCurrentPage","kind":"field","vis":"private","signature":"Private CdlPDCurrentPage"}, + {"name":"CdlPDDisablePrintToFile","kind":"field","vis":"private","signature":"Private CdlPDDisablePrintToFile"}, + {"name":"CdlPDHelpButton","kind":"field","vis":"private","signature":"Private CdlPDHelpButton"}, + {"name":"CdlPDHidePrintToFile","kind":"field","vis":"private","signature":"Private CdlPDHidePrintToFile"}, + {"name":"CdlPDNoCurrentPage","kind":"field","vis":"private","signature":"Private CdlPDNoCurrentPage"}, + {"name":"CdlPDNoNetworkButton","kind":"field","vis":"private","signature":"Private CdlPDNoNetworkButton"}, + {"name":"CdlPDNoPageNums","kind":"field","vis":"private","signature":"Private CdlPDNoPageNums"}, + {"name":"CdlPDNoSelection","kind":"field","vis":"private","signature":"Private CdlPDNoSelection"}, + {"name":"CdlPDNoWarning","kind":"field","vis":"private","signature":"Private CdlPDNoWarning"}, + {"name":"CdlPDPageNums","kind":"field","vis":"private","signature":"Private CdlPDPageNums"}, + {"name":"CdlPDPrintSetup","kind":"field","vis":"private","signature":"Private CdlPDPrintSetup"}, + {"name":"CdlPDPrintToFile","kind":"field","vis":"private","signature":"Private CdlPDPrintToFile"}, + {"name":"CdlPDResultApply","kind":"field","vis":"private","signature":"Private CdlPDResultApply"}, + {"name":"CdlPDResultCancel","kind":"field","vis":"private","signature":"Private CdlPDResultCancel"}, + {"name":"CdlPDResultPrint","kind":"field","vis":"private","signature":"Private CdlPDResultPrint"}, + {"name":"CdlPDReturnDC","kind":"field","vis":"private","signature":"Private CdlPDReturnDC"}, + {"name":"CdlPDReturnDefault","kind":"field","vis":"private","signature":"Private CdlPDReturnDefault"}, + {"name":"CdlPDReturnIC","kind":"field","vis":"private","signature":"Private CdlPDReturnIC"}, + {"name":"CdlPDSelection","kind":"field","vis":"private","signature":"Private CdlPDSelection"}, + {"name":"CdlPDUseDevModeCopies","kind":"field","vis":"private","signature":"Private CdlPDUseDevModeCopies"}, + {"name":"CdlPDUseDevModeCopiesAndCollate","kind":"field","vis":"private","signature":"Private CdlPDUseDevModeCopiesAndCollate"}, + {"name":"CdlPRBNAuto","kind":"field","vis":"private","signature":"Private CdlPRBNAuto"}, + {"name":"CdlPRBNCassette","kind":"field","vis":"private","signature":"Private CdlPRBNCassette"}, + {"name":"CdlPRBNEnvManual","kind":"field","vis":"private","signature":"Private CdlPRBNEnvManual"}, + {"name":"CdlPRBNEnvelope","kind":"field","vis":"private","signature":"Private CdlPRBNEnvelope"}, + {"name":"CdlPRBNLargeCapacity","kind":"field","vis":"private","signature":"Private CdlPRBNLargeCapacity"}, + {"name":"CdlPRBNLargeFmt","kind":"field","vis":"private","signature":"Private CdlPRBNLargeFmt"}, + {"name":"CdlPRBNLower","kind":"field","vis":"private","signature":"Private CdlPRBNLower"}, + {"name":"CdlPRBNManual","kind":"field","vis":"private","signature":"Private CdlPRBNManual"}, + {"name":"CdlPRBNMiddle","kind":"field","vis":"private","signature":"Private CdlPRBNMiddle"}, + {"name":"CdlPRBNSmallFmt","kind":"field","vis":"private","signature":"Private CdlPRBNSmallFmt"}, + {"name":"CdlPRBNTractor","kind":"field","vis":"private","signature":"Private CdlPRBNTractor"}, + {"name":"CdlPRBNUpper","kind":"field","vis":"private","signature":"Private CdlPRBNUpper"}, + {"name":"CdlPRCMColor","kind":"field","vis":"private","signature":"Private CdlPRCMColor"}, + {"name":"CdlPRCMMonochrome","kind":"field","vis":"private","signature":"Private CdlPRCMMonochrome"}, + {"name":"CdlPRDPHorizontal","kind":"field","vis":"private","signature":"Private CdlPRDPHorizontal"}, + {"name":"CdlPRDPSimplex","kind":"field","vis":"private","signature":"Private CdlPRDPSimplex"}, + {"name":"CdlPRDPVertical","kind":"field","vis":"private","signature":"Private CdlPRDPVertical"}, + {"name":"CdlPRORLandscape","kind":"field","vis":"private","signature":"Private CdlPRORLandscape"}, + {"name":"CdlPRORPortrait","kind":"field","vis":"private","signature":"Private CdlPRORPortrait"}, + {"name":"CdlPRPQDraft","kind":"field","vis":"private","signature":"Private CdlPRPQDraft"}, + {"name":"CdlPRPQHigh","kind":"field","vis":"private","signature":"Private CdlPRPQHigh"}, + {"name":"CdlPRPQLow","kind":"field","vis":"private","signature":"Private CdlPRPQLow"}, + {"name":"CdlPRPQMedium","kind":"field","vis":"private","signature":"Private CdlPRPQMedium"}, + {"name":"CdlPRPS10x14","kind":"field","vis":"private","signature":"Private CdlPRPS10x14"}, + {"name":"CdlPRPS11x17","kind":"field","vis":"private","signature":"Private CdlPRPS11x17"}, + {"name":"CdlPRPSA3","kind":"field","vis":"private","signature":"Private CdlPRPSA3"}, + {"name":"CdlPRPSA4","kind":"field","vis":"private","signature":"Private CdlPRPSA4"}, + {"name":"CdlPRPSA4Small","kind":"field","vis":"private","signature":"Private CdlPRPSA4Small"}, + {"name":"CdlPRPSA5","kind":"field","vis":"private","signature":"Private CdlPRPSA5"}, + {"name":"CdlPRPSB4","kind":"field","vis":"private","signature":"Private CdlPRPSB4"}, + {"name":"CdlPRPSB5","kind":"field","vis":"private","signature":"Private CdlPRPSB5"}, + {"name":"CdlPRPSCSheet","kind":"field","vis":"private","signature":"Private CdlPRPSCSheet"}, + {"name":"CdlPRPSDSheet","kind":"field","vis":"private","signature":"Private CdlPRPSDSheet"}, + {"name":"CdlPRPSESheet","kind":"field","vis":"private","signature":"Private CdlPRPSESheet"}, + {"name":"CdlPRPSEnv10","kind":"field","vis":"private","signature":"Private CdlPRPSEnv10"}, + {"name":"CdlPRPSEnv11","kind":"field","vis":"private","signature":"Private CdlPRPSEnv11"}, + {"name":"CdlPRPSEnv12","kind":"field","vis":"private","signature":"Private CdlPRPSEnv12"}, + {"name":"CdlPRPSEnv14","kind":"field","vis":"private","signature":"Private CdlPRPSEnv14"}, + {"name":"CdlPRPSEnv9","kind":"field","vis":"private","signature":"Private CdlPRPSEnv9"}, + {"name":"CdlPRPSEnvB4","kind":"field","vis":"private","signature":"Private CdlPRPSEnvB4"}, + {"name":"CdlPRPSEnvB5","kind":"field","vis":"private","signature":"Private CdlPRPSEnvB5"}, + {"name":"CdlPRPSEnvB6","kind":"field","vis":"private","signature":"Private CdlPRPSEnvB6"}, + {"name":"CdlPRPSEnvC3","kind":"field","vis":"private","signature":"Private CdlPRPSEnvC3"}, + {"name":"CdlPRPSEnvC4","kind":"field","vis":"private","signature":"Private CdlPRPSEnvC4"}, + {"name":"CdlPRPSEnvC5","kind":"field","vis":"private","signature":"Private CdlPRPSEnvC5"}, + {"name":"CdlPRPSEnvC6","kind":"field","vis":"private","signature":"Private CdlPRPSEnvC6"}, + {"name":"CdlPRPSEnvC65","kind":"field","vis":"private","signature":"Private CdlPRPSEnvC65"}, + {"name":"CdlPRPSEnvDL","kind":"field","vis":"private","signature":"Private CdlPRPSEnvDL"}, + {"name":"CdlPRPSEnvItaly","kind":"field","vis":"private","signature":"Private CdlPRPSEnvItaly"}, + {"name":"CdlPRPSEnvMonarch","kind":"field","vis":"private","signature":"Private CdlPRPSEnvMonarch"}, + {"name":"CdlPRPSEnvPersonal","kind":"field","vis":"private","signature":"Private CdlPRPSEnvPersonal"}, + {"name":"CdlPRPSExecutive","kind":"field","vis":"private","signature":"Private CdlPRPSExecutive"}, + {"name":"CdlPRPSFanfoldLglGerman","kind":"field","vis":"private","signature":"Private CdlPRPSFanfoldLglGerman"}, + {"name":"CdlPRPSFanfoldStdGerman","kind":"field","vis":"private","signature":"Private CdlPRPSFanfoldStdGerman"}, + {"name":"CdlPRPSFanfoldUS","kind":"field","vis":"private","signature":"Private CdlPRPSFanfoldUS"}, + {"name":"CdlPRPSFolio","kind":"field","vis":"private","signature":"Private CdlPRPSFolio"}, + {"name":"CdlPRPSLedger","kind":"field","vis":"private","signature":"Private CdlPRPSLedger"}, + {"name":"CdlPRPSLegal","kind":"field","vis":"private","signature":"Private CdlPRPSLegal"}, + {"name":"CdlPRPSLetter","kind":"field","vis":"private","signature":"Private CdlPRPSLetter"}, + {"name":"CdlPRPSLetterSmall","kind":"field","vis":"private","signature":"Private CdlPRPSLetterSmall"}, + {"name":"CdlPRPSNote","kind":"field","vis":"private","signature":"Private CdlPRPSNote"}, + {"name":"CdlPRPSQuarto","kind":"field","vis":"private","signature":"Private CdlPRPSQuarto"}, + {"name":"CdlPRPSStatement","kind":"field","vis":"private","signature":"Private CdlPRPSStatement"}, + {"name":"CdlPRPSTabloid","kind":"field","vis":"private","signature":"Private CdlPRPSTabloid"}, + {"name":"CdlPRPSUser","kind":"field","vis":"private","signature":"Private CdlPRPSUser"}, + {"name":"CdlPSDDefaultMinMargins","kind":"field","vis":"private","signature":"Private CdlPSDDefaultMinMargins"}, + {"name":"CdlPSDDisableMargins","kind":"field","vis":"private","signature":"Private CdlPSDDisableMargins"}, + {"name":"CdlPSDDisableOrientation","kind":"field","vis":"private","signature":"Private CdlPSDDisableOrientation"}, + {"name":"CdlPSDDisablePagePainting","kind":"field","vis":"private","signature":"Private CdlPSDDisablePagePainting"}, + {"name":"CdlPSDDisablePaper","kind":"field","vis":"private","signature":"Private CdlPSDDisablePaper"}, + {"name":"CdlPSDDisablePrinter","kind":"field","vis":"private","signature":"Private CdlPSDDisablePrinter"}, + {"name":"CdlPSDHelpButton","kind":"field","vis":"private","signature":"Private CdlPSDHelpButton"}, + {"name":"CdlPSDInHundredthsOfMillimeters","kind":"field","vis":"private","signature":"Private CdlPSDInHundredthsOfMillimeters"}, + {"name":"CdlPSDInThousandthsOfInches","kind":"field","vis":"private","signature":"Private CdlPSDInThousandthsOfInches"}, + {"name":"CdlPSDMargins","kind":"field","vis":"private","signature":"Private CdlPSDMargins"}, + {"name":"CdlPSDMinMargins","kind":"field","vis":"private","signature":"Private CdlPSDMinMargins"}, + {"name":"CdlPSDNoNetworkButton","kind":"field","vis":"private","signature":"Private CdlPSDNoNetworkButton"}, + {"name":"CdlPSDNoWarning","kind":"field","vis":"private","signature":"Private CdlPSDNoWarning"}, + {"name":"CdlPSDReturnDefault","kind":"field","vis":"private","signature":"Private CdlPSDReturnDefault"}, + {"name":"CdlParseFailure","kind":"field","vis":"private","signature":"Private CdlParseFailure"}, + {"name":"CdlPrinterNotFound","kind":"field","vis":"private","signature":"Private CdlPrinterNotFound"}, + {"name":"CdlRetDefFailure","kind":"field","vis":"private","signature":"Private CdlRetDefFailure"}, + {"name":"CdlSubclassFailure","kind":"field","vis":"private","signature":"Private CdlSubclassFailure"}, + {"name":"ChooseColor","kind":"function","vis":"private","declare":true,"returnType":"Long","signatures":[{"cond":"VBA7","signature":"Private Declare PtrSafe Function ChooseColor Lib \"comdlg32\" Alias \"ChooseColorW\" (ByRef lpChooseColor As TCHOOSECOLOR) As Long"},{"cond":"Not (VBA7)","signature":"Private Declare Function ChooseColor Lib \"comdlg32\" Alias \"ChooseColorW\" (ByRef lpChooseColor As TCHOOSECOLOR) As Long"}]}, + {"name":"ChooseFont","kind":"function","vis":"private","declare":true,"returnType":"Long","signatures":[{"cond":"VBA7","signature":"Private Declare PtrSafe Function ChooseFont Lib \"comdlg32\" Alias \"ChooseFontW\" (ByRef lpChooseFont As TCHOOSEFONT) As Long"},{"cond":"Not (VBA7)","signature":"Private Declare Function ChooseFont Lib \"comdlg32\" Alias \"ChooseFontW\" (ByRef lpChooseFont As TCHOOSEFONT) As Long"}]}, + {"name":"Class_Initialize","kind":"sub","vis":"private","signature":"Private Sub Class_Initialize()"}, + {"name":"Class_Terminate","kind":"sub","vis":"private","signature":"Private Sub Class_Terminate()"}, + {"name":"ClosePrinter","kind":"function","vis":"private","declare":true,"returnType":"Long","signatures":[{"cond":"VBA7","signature":"Private Declare PtrSafe Function ClosePrinter Lib \"winspool.drv\" (ByVal hPrinter As LongPtr) As Long"},{"cond":"Not (VBA7)","signature":"Private Declare Function ClosePrinter Lib \"winspool.drv\" (ByVal hPrinter As Long) As Long"}]}, + {"name":"CoTaskMemFree","kind":"sub","vis":"private","declare":true,"signatures":[{"cond":"VBA7","signature":"Private Declare PtrSafe Sub CoTaskMemFree Lib \"ole32\" (ByVal hMem As LongPtr)"},{"cond":"Not (VBA7)","signature":"Private Declare Sub CoTaskMemFree Lib \"ole32\" (ByVal hMem As Long)"}]}, + {"name":"Color","kind":"property","vis":"public","signature":"Public Property Get Color() As Long","returnType":"Long","accessor":"Get"}, + {"name":"Color","kind":"property","vis":"public","signature":"Public Property Let Color(ByVal Value As Long)","accessor":"Let"}, + {"name":"ColorMode","kind":"property","vis":"public","signature":"Public Property Get ColorMode() As CdlPRCMConstants","returnType":"CdlPRCMConstants","accessor":"Get"}, + {"name":"ColorMode","kind":"property","vis":"public","signature":"Public Property Let ColorMode(ByVal Value As CdlPRCMConstants)","accessor":"Let"}, + {"name":"ColorValidate","kind":"event","vis":"public","signature":"Public Event ColorValidate(ByRef RGBColor As Long, ByRef Cancel As Boolean, ByVal hDlg As Long)"}, + {"name":"CommDlgExtendedError","kind":"function","vis":"private","declare":true,"returnType":"Long","signatures":[{"cond":"VBA7","signature":"Private Declare PtrSafe Function CommDlgExtendedError Lib \"comdlg32\" () As Long"},{"cond":"Not (VBA7)","signature":"Private Declare Function CommDlgExtendedError Lib \"comdlg32\" () As Long"}]}, + {"name":"CommonDialogColorOKMsg","kind":"field","vis":"private","signature":"Private CommonDialogColorOKMsg As Long"}, + {"name":"CommonDialogDMFieldsExclusion","kind":"field","vis":"private","signature":"Private CommonDialogDMFieldsExclusion As Long"}, + {"name":"CommonDialogFR","kind":"field","vis":"private","signature":"Private CommonDialogFR As FINDREPLACE"}, + {"name":"CommonDialogFRBufferFindWhat","kind":"field","vis":"private","signature":"Private CommonDialogFRBufferFindWhat As String"}, + {"name":"CommonDialogFRBufferReplaceWith","kind":"field","vis":"private","signature":"Private CommonDialogFRBufferReplaceWith As String"}, + {"name":"CommonDialogFRDialogHandle","kind":"field","vis":"private","signature":"Private CommonDialogFRDialogHandle As LongPtr"}, + {"name":"CommonDialogFileOKMsg","kind":"field","vis":"private","signature":"Private CommonDialogFileOKMsg As Long"}, + {"name":"CommonDialogFindMsg","kind":"field","vis":"private","signature":"Private CommonDialogFindMsg As Long"}, + {"name":"CommonDialogHelpMsg","kind":"field","vis":"private","signature":"Private CommonDialogHelpMsg As Long"}, + {"name":"CommonDialogILCreateFromPathW2K","kind":"field","vis":"private","signature":"Private CommonDialogILCreateFromPathW2K As Integer"}, + {"name":"CommonDialogSetRGBMsg","kind":"field","vis":"private","signature":"Private CommonDialogSetRGBMsg As Long"}, + {"name":"CommonDialogShareViMsg","kind":"field","vis":"private","signature":"Private CommonDialogShareViMsg As Long"}, + {"name":"Copies","kind":"property","vis":"public","signature":"Public Property Get Copies() As Integer","returnType":"Integer","accessor":"Get"}, + {"name":"Copies","kind":"property","vis":"public","signature":"Public Property Let Copies(ByVal Value As Integer)","accessor":"Let"}, + {"name":"CopyMemory","kind":"sub","vis":"private","declare":true,"signatures":[{"cond":"VBA7","signature":"Private Declare PtrSafe Sub CopyMemory Lib \"kernel32\" Alias \"RtlMoveMemory\" (ByRef Destination As Any, ByRef Source As Any, ByVal Length As Long)"},{"cond":"Not (VBA7)","signature":"Private Declare Sub CopyMemory Lib \"kernel32\" Alias \"RtlMoveMemory\" (ByRef Destination As Any, ByRef Source As Any, ByVal Length As Long)"}]}, + {"name":"CustomColors","kind":"property","vis":"public","signature":"Public Property Get CustomColors() As Variant","returnType":"Variant","accessor":"Get"}, + {"name":"CustomColors","kind":"property","vis":"public","signature":"Public Property Let CustomColors(ByVal ArgList As Variant)","accessor":"Let"}, + {"name":"DEFAULT_QUALITY","kind":"const","vis":"private","signature":"Private Const DEFAULT_QUALITY As Long = 0"}, + {"name":"DMCOLLATE_FALSE","kind":"const","vis":"private","signature":"Private Const DMCOLLATE_FALSE As Long = 0"}, + {"name":"DMCOLLATE_TRUE","kind":"const","vis":"private","signature":"Private Const DMCOLLATE_TRUE As Long = 1"}, + {"name":"DM_COLLATE","kind":"const","vis":"private","signature":"Private Const DM_COLLATE As Long = &H8000&"}, + {"name":"DM_COLOR","kind":"const","vis":"private","signature":"Private Const DM_COLOR As Long = &H800"}, + {"name":"DM_COPIES","kind":"const","vis":"private","signature":"Private Const DM_COPIES As Long = &H100"}, + {"name":"DM_DEFAULTSOURCE","kind":"const","vis":"private","signature":"Private Const DM_DEFAULTSOURCE As Long = &H200"}, + {"name":"DM_DUPLEX","kind":"const","vis":"private","signature":"Private Const DM_DUPLEX As Long = &H1000"}, + {"name":"DM_IN_BUFFER","kind":"const","vis":"private","signature":"Private Const DM_IN_BUFFER As Long = 8"}, + {"name":"DM_ORIENTATION","kind":"const","vis":"private","signature":"Private Const DM_ORIENTATION As Long = &H1"}, + {"name":"DM_OUT_BUFFER","kind":"const","vis":"private","signature":"Private Const DM_OUT_BUFFER As Long = 2"}, + {"name":"DM_PAPERSIZE","kind":"const","vis":"private","signature":"Private Const DM_PAPERSIZE As Long = &H2"}, + {"name":"DM_PRINTQUALITY","kind":"const","vis":"private","signature":"Private Const DM_PRINTQUALITY As Long = &H400"}, + {"name":"DN_DEFAULTPRN","kind":"const","vis":"private","signature":"Private Const DN_DEFAULTPRN As Long = 1"}, + {"name":"DPI_Y","kind":"function","vis":"private","signature":"Private Function DPI_Y() As Long","returnType":"Long"}, + {"name":"DWL_MSGRESULT","kind":"const","vis":"private","signature":"Private Const DWL_MSGRESULT As Long = 0"}, + {"name":"DefaultExt","kind":"property","vis":"public","signature":"Public Property Get DefaultExt() As String","returnType":"String","accessor":"Get"}, + {"name":"DefaultExt","kind":"property","vis":"public","signature":"Public Property Let DefaultExt(ByVal Value As String)","accessor":"Let"}, + {"name":"DeleteObject","kind":"function","vis":"private","declare":true,"returnType":"Long","signatures":[{"cond":"VBA7","signature":"Private Declare PtrSafe Function DeleteObject Lib \"gdi32\" (ByVal hObject As LongPtr) As Long"},{"cond":"Not (VBA7)","signature":"Private Declare Function DeleteObject Lib \"gdi32\" (ByVal hObject As Long) As Long"}]}, + {"name":"DialogTitle","kind":"property","vis":"public","signature":"Public Property Get DialogTitle() As String","returnType":"String","accessor":"Get"}, + {"name":"DialogTitle","kind":"property","vis":"public","signature":"Public Property Let DialogTitle(ByVal Value As String)","accessor":"Let"}, + {"name":"DocumentProperties","kind":"function","vis":"private","declare":true,"returnType":"Long","signatures":[{"cond":"VBA7","signature":"Private Declare PtrSafe Function DocumentProperties Lib \"winspool.drv\" Alias \"DocumentPropertiesW\" (ByVal hWnd As LongPtr, ByVal hPrinter As LongPtr, ByVal lpszDeviceName As LongPtr, ByVal lpDevModeOutput As LongPtr, ByVal lpDevModeInput As LongPtr, ByVal fMode As Long) As Long"},{"cond":"Not (VBA7)","signature":"Private Declare Function DocumentProperties Lib \"winspool.drv\" Alias \"DocumentPropertiesW\" (ByVal hWnd As Long, ByVal hPrinter As Long, ByVal lpszDeviceName As Long, ByVal lpDevModeOutput As Long, ByVal lpDevModeInput As Long, ByVal fMode As Long) As Long"}]}, + {"name":"Duplex","kind":"property","vis":"public","signature":"Public Property Get Duplex() As CdlPRDPConstants","returnType":"CdlPRDPConstants","accessor":"Get"}, + {"name":"Duplex","kind":"property","vis":"public","signature":"Public Property Let Duplex(ByVal Value As CdlPRDPConstants)","accessor":"Let"}, + {"name":"FILEOKSTRING","kind":"const","vis":"private","signature":"Private Const FILEOKSTRING As String = \"commdlg_FileNameOK\""}, + {"name":"FINDMSGSTRING","kind":"const","vis":"private","signature":"Private Const FINDMSGSTRING As String = \"commdlg_FindReplace\""}, + {"name":"FMessage","kind":"function","vis":"friend","signatures":[{"cond":"VBA7","signature":"Friend Function FMessage(ByVal hWnd As LongPtr, ByVal wMsg As Long, ByVal wParam As LongPtr, ByVal lParam As LongPtr, ByVal dwRefData As LongPtr) As LongPtr","returnType":"LongPtr"},{"cond":"Not (VBA7)","signature":"Friend Function FMessage(ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long, ByVal dwRefData As Long) As Long","returnType":"Long"}]}, + {"name":"FNERR_BUFFERTOOSMALL","kind":"const","vis":"private","signature":"Private Const FNERR_BUFFERTOOSMALL As Long = &H3003"}, + {"name":"FNERR_INVALIDFILENAME","kind":"const","vis":"private","signature":"Private Const FNERR_INVALIDFILENAME As Long = &H3002"}, + {"name":"FNERR_SUBCLASSFAILURE","kind":"const","vis":"private","signature":"Private Const FNERR_SUBCLASSFAILURE As Long = &H3001"}, + {"name":"FRERR_BUFFERLENGTHZERO","kind":"const","vis":"private","signature":"Private Const FRERR_BUFFERLENGTHZERO As Long = &H4001"}, + {"name":"FR_DIALOGTERM","kind":"const","vis":"private","signature":"Private Const FR_DIALOGTERM As Long = &H40"}, + {"name":"FR_DOWN","kind":"const","vis":"private","signature":"Private Const FR_DOWN As Long = &H1"}, + {"name":"FR_ENABLEHOOK","kind":"const","vis":"private","signature":"Private Const FR_ENABLEHOOK As Long = &H100"}, + {"name":"FR_FINDNEXT","kind":"const","vis":"private","signature":"Private Const FR_FINDNEXT As Long = &H8"}, + {"name":"FR_HIDEMATCHCASE","kind":"const","vis":"private","signature":"Private Const FR_HIDEMATCHCASE As Long = &H8000&"}, + {"name":"FR_HIDEUPDOWN","kind":"const","vis":"private","signature":"Private Const FR_HIDEUPDOWN As Long = &H4000"}, + {"name":"FR_HIDEWHOLEWORD","kind":"const","vis":"private","signature":"Private Const FR_HIDEWHOLEWORD As Long = &H10000"}, + {"name":"FR_MATCHCASE","kind":"const","vis":"private","signature":"Private Const FR_MATCHCASE As Long = &H4"}, + {"name":"FR_NOMATCHCASE","kind":"const","vis":"private","signature":"Private Const FR_NOMATCHCASE As Long = &H800"}, + {"name":"FR_NOUPDOWN","kind":"const","vis":"private","signature":"Private Const FR_NOUPDOWN As Long = &H400"}, + {"name":"FR_NOWHOLEWORD","kind":"const","vis":"private","signature":"Private Const FR_NOWHOLEWORD As Long = &H1000"}, + {"name":"FR_REPLACE","kind":"const","vis":"private","signature":"Private Const FR_REPLACE As Long = &H10"}, + {"name":"FR_REPLACEALL","kind":"const","vis":"private","signature":"Private Const FR_REPLACEALL As Long = &H20"}, + {"name":"FR_SHOWHELP","kind":"const","vis":"private","signature":"Private Const FR_SHOWHELP As Long = &H80"}, + {"name":"FR_WHOLEWORD","kind":"const","vis":"private","signature":"Private Const FR_WHOLEWORD As Long = &H2"}, + {"name":"FW_BOLD","kind":"const","vis":"private","signature":"Private Const FW_BOLD As Long = 700"}, + {"name":"FW_DONTCARE","kind":"const","vis":"private","signature":"Private Const FW_DONTCARE As Long = 0"}, + {"name":"FW_EXTRABOLD","kind":"const","vis":"private","signature":"Private Const FW_EXTRABOLD As Long = 800"}, + {"name":"FW_EXTRALIGHT","kind":"const","vis":"private","signature":"Private Const FW_EXTRALIGHT As Long = 200"}, + {"name":"FW_HEAVY","kind":"const","vis":"private","signature":"Private Const FW_HEAVY As Long = 900"}, + {"name":"FW_LIGHT","kind":"const","vis":"private","signature":"Private Const FW_LIGHT As Long = 300"}, + {"name":"FW_MEDIUM","kind":"const","vis":"private","signature":"Private Const FW_MEDIUM As Long = 500"}, + {"name":"FW_NORMAL","kind":"const","vis":"private","signature":"Private Const FW_NORMAL As Long = 400"}, + {"name":"FW_SEMIBOLD","kind":"const","vis":"private","signature":"Private Const FW_SEMIBOLD As Long = 600"}, + {"name":"FW_THIN","kind":"const","vis":"private","signature":"Private Const FW_THIN As Long = 100"}, + {"name":"FileName","kind":"property","vis":"public","signature":"Public Property Get FileName() As String","returnType":"String","accessor":"Get"}, + {"name":"FileName","kind":"property","vis":"public","signature":"Public Property Let FileName(ByVal Value As String)","accessor":"Let"}, + {"name":"FileOffset","kind":"property","vis":"public","signature":"Public Property Get FileOffset() As Integer","returnType":"Integer","accessor":"Get"}, + {"name":"FileOffset","kind":"property","vis":"public","signature":"Public Property Let FileOffset(ByVal Value As Integer)","accessor":"Let"}, + {"name":"FileShareViolation","kind":"event","vis":"public","signature":"Public Event FileShareViolation(ByVal FileName As String, ByRef Result As CdlOFNShareViResultConstants, ByVal hDlg As Long)"}, + {"name":"FileTitle","kind":"property","vis":"public","signature":"Public Property Get FileTitle() As String","returnType":"String","accessor":"Get"}, + {"name":"FileTitle","kind":"property","vis":"public","signature":"Public Property Let FileTitle(ByVal Value As String)","accessor":"Let"}, + {"name":"FileValidate","kind":"event","vis":"public","signature":"Public Event FileValidate(ByVal FileName As String, ByVal FileTitle As String, ByVal FileOffset As Integer, ByRef Cancel As Boolean, ByVal hDlg As Long)"}, + {"name":"Filter","kind":"property","vis":"public","signature":"Public Property Get Filter() As String","returnType":"String","accessor":"Get"}, + {"name":"Filter","kind":"property","vis":"public","signature":"Public Property Let Filter(ByVal Value As String)","accessor":"Let"}, + {"name":"FilterIndex","kind":"property","vis":"public","signature":"Public Property Get FilterIndex() As Long","returnType":"Long","accessor":"Get"}, + {"name":"FilterIndex","kind":"property","vis":"public","signature":"Public Property Let FilterIndex(ByVal Value As Long)","accessor":"Let"}, + {"name":"FinalizeDevModeBuffer","kind":"sub","vis":"private","signature":"Private Sub FinalizeDevModeBuffer(ByRef hPrinter As LongPtr, ByVal DeviceName As String, ByRef DMODE_B() As Byte, ByVal dwBytes As Long)"}, + {"name":"FindNext","kind":"event","vis":"public","signature":"Public Event FindNext()"}, + {"name":"FindText","kind":"function","vis":"private","declare":true,"returnType":"Long","signatures":[{"cond":"VBA7","signature":"Private Declare PtrSafe Function FindText Lib \"comdlg32\" Alias \"FindTextW\" (ByRef lpFindReplace As FINDREPLACE) As Long"},{"cond":"Not (VBA7)","signature":"Private Declare Function FindText Lib \"comdlg32\" Alias \"FindTextW\" (ByRef lpFindReplace As FINDREPLACE) As Long"}]}, + {"name":"FindWhat","kind":"property","vis":"public","signature":"Public Property Get FindWhat() As String","returnType":"String","accessor":"Get"}, + {"name":"FindWhat","kind":"property","vis":"public","signature":"Public Property Let FindWhat(ByVal Value As String)","accessor":"Let"}, + {"name":"FindWindowEx","kind":"function","vis":"private","declare":true,"signatures":[{"cond":"VBA7","signature":"Private Declare PtrSafe Function FindWindowEx Lib \"user32\" Alias \"FindWindowExW\" (ByVal hWndParent As LongPtr, ByVal hWndChildAfter As LongPtr, ByVal lpszClass As LongPtr, ByVal lpszWindow As LongPtr) As LongPtr","returnType":"LongPtr"},{"cond":"Not (VBA7)","signature":"Private Declare Function FindWindowEx Lib \"user32\" Alias \"FindWindowExW\" (ByVal hWndParent As Long, ByVal hWndChildAfter As Long, ByVal lpszClass As Long, ByVal lpszWindow As Long) As Long","returnType":"Long"}]}, + {"name":"Flags","kind":"property","vis":"public","signature":"Public Property Get Flags() As Long","returnType":"Long","accessor":"Get"}, + {"name":"Flags","kind":"property","vis":"public","signature":"Public Property Let Flags(ByVal Value As Long)","accessor":"Let"}, + {"name":"FolderBrowserValidateFailed","kind":"event","vis":"public","signature":"Public Event FolderBrowserValidateFailed(ByVal Text As String, ByRef Cancel As Boolean, ByVal hDlg As Long)"}, + {"name":"FontApply","kind":"event","vis":"public","signature":"Public Event FontApply(ByVal Flags As Long, ByVal FontName As String, ByVal FontSize As Single, ByVal FontBold As Boolean, ByVal FontItalic As Boolean, ByVal FontStrikethru As Boolean, ByVal FontUnderline As Boolean, ByVal FontCharset As Integer, ByVal RGBColor As Long, ByVal hDlg As Long)"}, + {"name":"FontBold","kind":"property","vis":"public","signature":"Public Property Get FontBold() As Boolean","returnType":"Boolean","accessor":"Get"}, + {"name":"FontBold","kind":"property","vis":"public","signature":"Public Property Let FontBold(ByVal Value As Boolean)","accessor":"Let"}, + {"name":"FontCharset","kind":"property","vis":"public","signature":"Public Property Get FontCharset() As Integer","returnType":"Integer","accessor":"Get"}, + {"name":"FontCharset","kind":"property","vis":"public","signature":"Public Property Let FontCharset(ByVal Value As Integer)","accessor":"Let"}, + {"name":"FontItalic","kind":"property","vis":"public","signature":"Public Property Get FontItalic() As Boolean","returnType":"Boolean","accessor":"Get"}, + {"name":"FontItalic","kind":"property","vis":"public","signature":"Public Property Let FontItalic(ByVal Value As Boolean)","accessor":"Let"}, + {"name":"FontName","kind":"property","vis":"public","signature":"Public Property Get FontName() As String","returnType":"String","accessor":"Get"}, + {"name":"FontName","kind":"property","vis":"public","signature":"Public Property Let FontName(ByVal Value As String)","accessor":"Let"}, + {"name":"FontSize","kind":"property","vis":"public","signature":"Public Property Get FontSize() As Single","returnType":"Single","accessor":"Get"}, + {"name":"FontSize","kind":"property","vis":"public","signature":"Public Property Let FontSize(ByVal Value As Single)","accessor":"Let"}, + {"name":"FontStrikethru","kind":"property","vis":"public","signature":"Public Property Get FontStrikethru() As Boolean","returnType":"Boolean","accessor":"Get"}, + {"name":"FontStrikethru","kind":"property","vis":"public","signature":"Public Property Let FontStrikethru(ByVal Value As Boolean)","accessor":"Let"}, + {"name":"FontUnderline","kind":"property","vis":"public","signature":"Public Property Get FontUnderline() As Boolean","returnType":"Boolean","accessor":"Get"}, + {"name":"FontUnderline","kind":"property","vis":"public","signature":"Public Property Let FontUnderline(ByVal Value As Boolean)","accessor":"Let"}, + {"name":"FontWeight","kind":"property","vis":"public","signature":"Public Property Get FontWeight() As Integer","returnType":"Integer","accessor":"Get"}, + {"name":"FontWeight","kind":"property","vis":"public","signature":"Public Property Let FontWeight(ByVal Value As Integer)","accessor":"Let"}, + {"name":"FreeLibrary","kind":"function","vis":"private","declare":true,"returnType":"Long","signatures":[{"cond":"VBA7","signature":"Private Declare PtrSafe Function FreeLibrary Lib \"kernel32\" (ByVal hLibModule As LongPtr) As Long"},{"cond":"Not (VBA7)","signature":"Private Declare Function FreeLibrary Lib \"kernel32\" (ByVal hLibModule As Long) As Long"}]}, + {"name":"FromPage","kind":"property","vis":"public","signature":"Public Property Get FromPage() As Long","returnType":"Long","accessor":"Get"}, + {"name":"FromPage","kind":"property","vis":"public","signature":"Public Property Let FromPage(ByVal Value As Long)","accessor":"Let"}, + {"name":"GMEM_MOVEABLE","kind":"const","vis":"private","signature":"Private Const GMEM_MOVEABLE As Long = &H2"}, + {"name":"GMEM_ZEROINIT","kind":"const","vis":"private","signature":"Private Const GMEM_ZEROINIT As Long = &H40"}, + {"name":"GetActiveWindow","kind":"function","vis":"private","declare":true,"signatures":[{"cond":"VBA7","signature":"Private Declare PtrSafe Function GetActiveWindow Lib \"user32\" () As LongPtr","returnType":"LongPtr"},{"cond":"Not (VBA7)","signature":"Private Declare Function GetActiveWindow Lib \"user32\" () As Long","returnType":"Long"}]}, + {"name":"GetDC","kind":"function","vis":"private","declare":true,"signatures":[{"cond":"VBA7","signature":"Private Declare PtrSafe Function GetDC Lib \"user32\" (ByVal hWnd As LongPtr) As LongPtr","returnType":"LongPtr"},{"cond":"Not (VBA7)","signature":"Private Declare Function GetDC Lib \"user32\" (ByVal hWnd As Long) As Long","returnType":"Long"}]}, + {"name":"GetDefaultPrinter","kind":"function","vis":"private","declare":true,"returnType":"Long","signatures":[{"cond":"VBA7","signature":"Private Declare PtrSafe Function GetDefaultPrinter Lib \"winspool.drv\" Alias \"GetDefaultPrinterW\" (ByVal lpszPrinterName As LongPtr, ByRef cch As Long) As Long"},{"cond":"Not (VBA7)","signature":"Private Declare Function GetDefaultPrinter Lib \"winspool.drv\" Alias \"GetDefaultPrinterW\" (ByVal lpszPrinterName As Long, ByRef cch As Long) As Long"}]}, + {"name":"GetDesktopWindow","kind":"function","vis":"private","declare":true,"signatures":[{"cond":"VBA7","signature":"Private Declare PtrSafe Function GetDesktopWindow Lib \"user32\" () As LongPtr","returnType":"LongPtr"},{"cond":"Not (VBA7)","signature":"Private Declare Function GetDesktopWindow Lib \"user32\" () As Long","returnType":"Long"}]}, + {"name":"GetDeviceCaps","kind":"function","vis":"private","declare":true,"returnType":"Long","signatures":[{"cond":"VBA7","signature":"Private Declare PtrSafe Function GetDeviceCaps Lib \"gdi32\" (ByVal hDC As LongPtr, ByVal nIndex As Long) As Long"},{"cond":"Not (VBA7)","signature":"Private Declare Function GetDeviceCaps Lib \"gdi32\" (ByVal hDC As Long, ByVal nIndex As Long) As Long"}]}, + {"name":"GetFocus","kind":"function","vis":"private","declare":true,"signatures":[{"cond":"VBA7","signature":"Private Declare PtrSafe Function GetFocus Lib \"user32\" () As LongPtr","returnType":"LongPtr"},{"cond":"Not (VBA7)","signature":"Private Declare Function GetFocus Lib \"user32\" () As Long","returnType":"Long"}]}, + {"name":"GetLocaleInfo","kind":"function","vis":"private","declare":true,"returnType":"Long","signatures":[{"cond":"VBA7","signature":"Private Declare PtrSafe Function GetLocaleInfo Lib \"kernel32\" Alias \"GetLocaleInfoW\" (ByVal LCID As Long, ByVal LCType As Long, ByVal lpLCData As LongPtr, ByVal cchData As Long) As Long"},{"cond":"Not (VBA7)","signature":"Private Declare Function GetLocaleInfo Lib \"kernel32\" Alias \"GetLocaleInfoW\" (ByVal Locale As Long, ByVal LCType As Long, ByVal lpLCData As Long, ByVal cchData As Long) As Long"}]}, + {"name":"GetOpenFileName","kind":"function","vis":"private","declare":true,"returnType":"Long","signatures":[{"cond":"VBA7","signature":"Private Declare PtrSafe Function GetOpenFileName Lib \"comdlg32\" Alias \"GetOpenFileNameW\" (ByRef lpOpenFileName As OPENFILENAME) As Long"},{"cond":"Not (VBA7)","signature":"Private Declare Function GetOpenFileName Lib \"comdlg32\" Alias \"GetOpenFileNameW\" (ByRef lpOpenFileName As OPENFILENAME) As Long"}]}, + {"name":"GetOwnerWindow","kind":"function","vis":"private","signature":"Private Function GetOwnerWindow() As LongPtr","returnType":"LongPtr"}, + {"name":"GetPrinterDefault","kind":"function","vis":"private","signature":"Private Function GetPrinterDefault() As String","returnType":"String"}, + {"name":"GetProcAddress","kind":"function","vis":"private","declare":true,"signatures":[{"cond":"VBA7","signature":"Private Declare PtrSafe Function GetProcAddress Lib \"kernel32\" (ByVal hModule As LongPtr, ByVal lpProcName As Any) As LongPtr","returnType":"LongPtr"},{"cond":"Not (VBA7)","signature":"Private Declare Function GetProcAddress Lib \"kernel32\" (ByVal hModule As Long, ByVal lpProcName As Any) As Long","returnType":"Long"}]}, + {"name":"GetSaveFileName","kind":"function","vis":"private","declare":true,"returnType":"Long","signatures":[{"cond":"VBA7","signature":"Private Declare PtrSafe Function GetSaveFileName Lib \"comdlg32\" Alias \"GetSaveFileNameW\" (ByRef lpOpenFileName As OPENFILENAME) As Long"},{"cond":"Not (VBA7)","signature":"Private Declare Function GetSaveFileName Lib \"comdlg32\" Alias \"GetSaveFileNameW\" (ByRef lpOpenFileName As OPENFILENAME) As Long"}]}, + {"name":"GlobalAlloc","kind":"function","vis":"private","declare":true,"signatures":[{"cond":"VBA7","signature":"Private Declare PtrSafe Function GlobalAlloc Lib \"kernel32\" (ByVal wFlags As Long, ByVal dwBytes As LongPtr) As LongPtr","returnType":"LongPtr"},{"cond":"Not (VBA7)","signature":"Private Declare Function GlobalAlloc Lib \"kernel32\" (ByVal wFlags As Long, ByVal dwBytes As Long) As Long","returnType":"Long"}]}, + {"name":"GlobalFree","kind":"function","vis":"private","declare":true,"signatures":[{"cond":"VBA7","signature":"Private Declare PtrSafe Function GlobalFree Lib \"kernel32\" (ByVal hMem As LongPtr) As LongPtr","returnType":"LongPtr"},{"cond":"Not (VBA7)","signature":"Private Declare Function GlobalFree Lib \"kernel32\" (ByVal hMem As Long) As Long","returnType":"Long"}]}, + {"name":"GlobalLock","kind":"function","vis":"private","declare":true,"signatures":[{"cond":"VBA7","signature":"Private Declare PtrSafe Function GlobalLock Lib \"kernel32\" (ByVal hMem As LongPtr) As LongPtr","returnType":"LongPtr"},{"cond":"Not (VBA7)","signature":"Private Declare Function GlobalLock Lib \"kernel32\" (ByVal hMem As Long) As Long","returnType":"Long"}]}, + {"name":"GlobalSize","kind":"function","vis":"private","declare":true,"signatures":[{"cond":"VBA7","signature":"Private Declare PtrSafe Function GlobalSize Lib \"kernel32\" (ByVal hMem As LongPtr) As LongPtr","returnType":"LongPtr"},{"cond":"Not (VBA7)","signature":"Private Declare Function GlobalSize Lib \"kernel32\" (ByVal hMem As Long) As Long","returnType":"Long"}]}, + {"name":"GlobalUnlock","kind":"function","vis":"private","declare":true,"returnType":"Long","signatures":[{"cond":"VBA7","signature":"Private Declare PtrSafe Function GlobalUnlock Lib \"kernel32\" (ByVal hMem As LongPtr) As Long"},{"cond":"Not (VBA7)","signature":"Private Declare Function GlobalUnlock Lib \"kernel32\" (ByVal hMem As Long) As Long"}]}, + {"name":"HELPMSGSTRING","kind":"const","vis":"private","signature":"Private Const HELPMSGSTRING As String = \"commdlg_help\""}, + {"name":"HELP_COMMAND","kind":"const","vis":"private","signature":"Private Const HELP_COMMAND As Long = &H102"}, + {"name":"HELP_CONTENTS","kind":"const","vis":"private","signature":"Private Const HELP_CONTENTS As Long = &H3"}, + {"name":"HELP_CONTEXT","kind":"const","vis":"private","signature":"Private Const HELP_CONTEXT As Long = &H1"}, + {"name":"HELP_CONTEXTPOPUP","kind":"const","vis":"private","signature":"Private Const HELP_CONTEXTPOPUP As Long = &H8"}, + {"name":"HELP_FORCEFILE","kind":"const","vis":"private","signature":"Private Const HELP_FORCEFILE As Long = &H9"}, + {"name":"HELP_HELPONHELP","kind":"const","vis":"private","signature":"Private Const HELP_HELPONHELP As Long = &H4"}, + {"name":"HELP_INDEX","kind":"const","vis":"private","signature":"Private Const HELP_INDEX As Long = &H3"}, + {"name":"HELP_KEY","kind":"const","vis":"private","signature":"Private Const HELP_KEY As Long = &H101"}, + {"name":"HELP_PARTIALKEY","kind":"const","vis":"private","signature":"Private Const HELP_PARTIALKEY As Long = &H105"}, + {"name":"HELP_QUIT","kind":"const","vis":"private","signature":"Private Const HELP_QUIT As Long = &H2"}, + {"name":"HELP_SETCONTENTS","kind":"const","vis":"private","signature":"Private Const HELP_SETCONTENTS As Long = &H5"}, + {"name":"HELP_SETINDEX","kind":"const","vis":"private","signature":"Private Const HELP_SETINDEX As Long = &H5"}, + {"name":"Help","kind":"event","vis":"public","signature":"Public Event Help(ByRef Handled As Boolean, ByVal Action As Integer, ByVal hDlg As Long)"}, + {"name":"HelpCommand","kind":"property","vis":"public","signature":"Public Property Get HelpCommand() As CdlHelpConstants","returnType":"CdlHelpConstants","accessor":"Get"}, + {"name":"HelpCommand","kind":"property","vis":"public","signature":"Public Property Let HelpCommand(ByVal Value As CdlHelpConstants)","accessor":"Let"}, + {"name":"HelpContext","kind":"property","vis":"public","accessor":"Get","signatures":[{"cond":"VBA7","signature":"Public Property Get HelpContext() As LongPtr","returnType":"LongPtr"},{"cond":"Not (VBA7)","signature":"Public Property Get HelpContext() As Long","returnType":"Long"}]}, + {"name":"HelpContext","kind":"property","vis":"public","accessor":"Let","signatures":[{"cond":"VBA7","signature":"Public Property Let HelpContext(ByVal Value As LongPtr)"},{"cond":"Not (VBA7)","signature":"Public Property Let HelpContext(ByVal Value As Long)"}]}, + {"name":"HelpFile","kind":"property","vis":"public","signature":"Public Property Get HelpFile() As String","returnType":"String","accessor":"Get"}, + {"name":"HelpFile","kind":"property","vis":"public","signature":"Public Property Let HelpFile(ByVal Value As String)","accessor":"Let"}, + {"name":"HelpKey","kind":"property","vis":"public","signature":"Public Property Get HelpKey() As String","returnType":"String","accessor":"Get"}, + {"name":"HelpKey","kind":"property","vis":"public","signature":"Public Property Let HelpKey(ByVal Value As String)","accessor":"Let"}, + {"name":"HiWord","kind":"function","vis":"private","signature":"Private Function HiWord(ByVal DWord As Long) As Integer","returnType":"Integer"}, + {"name":"HookEvents","kind":"property","vis":"public","signature":"Public Property Get HookEvents() As Boolean","returnType":"Boolean","accessor":"Get"}, + {"name":"HookEvents","kind":"property","vis":"public","signature":"Public Property Let HookEvents(ByVal Value As Boolean)","accessor":"Let"}, + {"name":"IDOK","kind":"const","vis":"private","signature":"Private Const IDOK As Long = 1"}, + {"name":"ILCreateFromPath","kind":"function","vis":"private","declare":true,"signatures":[{"cond":"VBA7","signature":"Private Declare PtrSafe Function ILCreateFromPath Lib \"shell32\" (ByVal lpszPath As LongPtr) As LongPtr","returnType":"LongPtr"},{"cond":"Not (VBA7)","signature":"Private Declare Function ILCreateFromPath Lib \"shell32\" (ByVal lpszPath As Long) As Long","returnType":"Long"}]}, + {"name":"ILCreateFromPathW2K","kind":"function","vis":"private","declare":true,"signature":"Private Declare Function ILCreateFromPathW2K Lib \"shell32\" Alias \"#157\" (ByVal lpszPath As Long) As Long","returnType":"Long"}, + {"name":"InitDialog","kind":"event","vis":"public","signature":"Public Event InitDialog(ByVal Action As Integer, ByVal hDlg As Long)"}, + {"name":"InitDir","kind":"property","vis":"public","signature":"Public Property Get InitDir() As String","returnType":"String","accessor":"Get"}, + {"name":"InitDir","kind":"property","vis":"public","signature":"Public Property Let InitDir(ByVal Value As String)","accessor":"Let"}, + {"name":"IsWindow","kind":"function","vis":"private","declare":true,"returnType":"Long","signatures":[{"cond":"VBA7","signature":"Private Declare PtrSafe Function IsWindow Lib \"user32\" (ByVal hWnd As LongPtr) As Long"},{"cond":"Not (VBA7)","signature":"Private Declare Function IsWindow Lib \"user32\" (ByVal hWnd As Long) As Long"}]}, + {"name":"LF_FACESIZE","kind":"const","vis":"private","signature":"Private Const LF_FACESIZE As Long = 32"}, + {"name":"LoWord","kind":"function","vis":"private","signature":"Private Function LoWord(ByVal DWord As Long) As Integer","returnType":"Integer"}, + {"name":"LoadLibrary","kind":"function","vis":"private","declare":true,"signatures":[{"cond":"VBA7","signature":"Private Declare PtrSafe Function LoadLibrary Lib \"kernel32\" Alias \"LoadLibraryW\" (ByVal lpLibFileName As LongPtr) As LongPTr","returnType":"LongPTr"},{"cond":"Not (VBA7)","signature":"Private Declare Function LoadLibrary Lib \"kernel32\" Alias \"LoadLibraryW\" (ByVal lpLibFileName As Long) As Long","returnType":"Long"}]}, + {"name":"MAXINT_2","kind":"const","vis":"private","signature":"Private Const MAXINT_2 As Integer = 32767"}, + {"name":"MAX_PATH","kind":"const","vis":"private","signature":"Private Const MAX_PATH As Long = 260"}, + {"name":"Max","kind":"property","vis":"public","signature":"Public Property Get Max() As Long","returnType":"Long","accessor":"Get"}, + {"name":"Max","kind":"property","vis":"public","signature":"Public Property Let Max(ByVal Value As Long)","accessor":"Let"}, + {"name":"MaxFileSize","kind":"property","vis":"public","signature":"Public Property Get MaxFileSize() As Long","returnType":"Long","accessor":"Get"}, + {"name":"MaxFileSize","kind":"property","vis":"public","signature":"Public Property Let MaxFileSize(ByVal Value As Long)","accessor":"Let"}, + {"name":"Min","kind":"property","vis":"public","signature":"Public Property Get Min() As Long","returnType":"Long","accessor":"Get"}, + {"name":"Min","kind":"property","vis":"public","signature":"Public Property Let Min(ByVal Value As Long)","accessor":"Let"}, + {"name":"MulDiv","kind":"function","vis":"private","declare":true,"returnType":"Long","signatures":[{"cond":"VBA7","signature":"Private Declare PtrSafe Function MulDiv Lib \"kernel32\" (ByVal nNumber As Long, ByVal nNumerator As Long, ByVal nDenominator As Long) As Long"},{"cond":"Not (VBA7)","signature":"Private Declare Function MulDiv Lib \"kernel32\" (ByVal nNumber As Long, ByVal nNumerator As Long, ByVal nDenominator As Long) As Long"}]}, + {"name":"NULL_PTR","kind":"const","vis":"private","signatures":[{"cond":"Win64","signature":"Private Const NULL_PTR As LongPtr = 0"},{"cond":"Not (Win64)","signature":"Private Const NULL_PTR As Long = 0"}]}, + {"name":"OFN_ALLOWMULTISELECT","kind":"const","vis":"private","signature":"Private Const OFN_ALLOWMULTISELECT As Long = &H200"}, + {"name":"OFN_CREATEPROMPT","kind":"const","vis":"private","signature":"Private Const OFN_CREATEPROMPT As Long = &H2000"}, + {"name":"OFN_DONTADDTORECENT","kind":"const","vis":"private","signature":"Private Const OFN_DONTADDTORECENT As Long = &H2000000"}, + {"name":"OFN_ENABLEHOOK","kind":"const","vis":"private","signature":"Private Const OFN_ENABLEHOOK As Long = &H20"}, + {"name":"OFN_ENABLESIZING","kind":"const","vis":"private","signature":"Private Const OFN_ENABLESIZING As Long = &H800000"}, + {"name":"OFN_EXPLORER","kind":"const","vis":"private","signature":"Private Const OFN_EXPLORER As Long = &H80000"}, + {"name":"OFN_EXTENSIONDIFFERENT","kind":"const","vis":"private","signature":"Private Const OFN_EXTENSIONDIFFERENT As Long = &H400"}, + {"name":"OFN_FILEMUSTEXIST","kind":"const","vis":"private","signature":"Private Const OFN_FILEMUSTEXIST As Long = &H1000"}, + {"name":"OFN_FORCESHOWHIDDEN","kind":"const","vis":"private","signature":"Private Const OFN_FORCESHOWHIDDEN As Long = &H10000000"}, + {"name":"OFN_HIDEREADONLY","kind":"const","vis":"private","signature":"Private Const OFN_HIDEREADONLY As Long = &H4"}, + {"name":"OFN_NOCHANGEDIR","kind":"const","vis":"private","signature":"Private Const OFN_NOCHANGEDIR As Long = &H8"}, + {"name":"OFN_NODEREFERENCELINKS","kind":"const","vis":"private","signature":"Private Const OFN_NODEREFERENCELINKS As Long = &H100000"}, + {"name":"OFN_NONETWORKBUTTON","kind":"const","vis":"private","signature":"Private Const OFN_NONETWORKBUTTON As Long = &H20000"}, + {"name":"OFN_NOREADONLYRETURN","kind":"const","vis":"private","signature":"Private Const OFN_NOREADONLYRETURN As Long = &H8000&"}, + {"name":"OFN_NOVALIDATE","kind":"const","vis":"private","signature":"Private Const OFN_NOVALIDATE As Long = &H100"}, + {"name":"OFN_OVERWRITEPROMPT","kind":"const","vis":"private","signature":"Private Const OFN_OVERWRITEPROMPT As Long = &H2"}, + {"name":"OFN_PATHMUSTEXIST","kind":"const","vis":"private","signature":"Private Const OFN_PATHMUSTEXIST As Long = &H800"}, + {"name":"OFN_READONLY","kind":"const","vis":"private","signature":"Private Const OFN_READONLY As Long = &H1"}, + {"name":"OFN_SHAREAWARE","kind":"const","vis":"private","signature":"Private Const OFN_SHAREAWARE As Long = &H4000"}, + {"name":"OFN_SHAREFALLTHROUGH","kind":"const","vis":"private","signature":"Private Const OFN_SHAREFALLTHROUGH As Long = &H2"}, + {"name":"OFN_SHARENOWARN","kind":"const","vis":"private","signature":"Private Const OFN_SHARENOWARN As Long = &H1"}, + {"name":"OFN_SHAREWARN","kind":"const","vis":"private","signature":"Private Const OFN_SHAREWARN As Long = &H0"}, + {"name":"OFN_SHOWHELP","kind":"const","vis":"private","signature":"Private Const OFN_SHOWHELP As Long = &H10"}, + {"name":"Object","kind":"property","vis":"public","signature":"Public Property Get Object() As Object","returnType":"Object","accessor":"Get"}, + {"name":"OleTranslateColor","kind":"function","vis":"private","declare":true,"returnType":"Long","signatures":[{"cond":"VBA7","signature":"Private Declare PtrSafe Function OleTranslateColor Lib \"oleaut32\" (ByVal Color As Long, ByVal hPal As LongPtr, ByRef RGBResult As Long) As Long"},{"cond":"Not (VBA7)","signature":"Private Declare Function OleTranslateColor Lib \"oleaut32\" (ByVal Color As Long, ByVal hPal As Long, ByRef RGBResult As Long) As Long"}]}, + {"name":"OpenPrinter","kind":"function","vis":"private","declare":true,"returnType":"Long","signatures":[{"cond":"VBA7","signature":"Private Declare PtrSafe Function OpenPrinter Lib \"winspool.drv\" Alias \"OpenPrinterW\" (ByVal lpszPrinterName As LongPtr, ByRef hPrinter As LongPtr, ByVal lpDefault As LongPtr) As Long"},{"cond":"Not (VBA7)","signature":"Private Declare Function OpenPrinter Lib \"winspool.drv\" Alias \"OpenPrinterW\" (ByVal lpszPrinterName As Long, ByRef hPrinter As Long, ByVal lpDefault As Long) As Long"}]}, + {"name":"Orientation","kind":"property","vis":"public","signature":"Public Property Get Orientation() As CdlPRORConstants","returnType":"CdlPRORConstants","accessor":"Get"}, + {"name":"Orientation","kind":"property","vis":"public","signature":"Public Property Let Orientation(ByVal Value As CdlPRORConstants)","accessor":"Let"}, + {"name":"PDERR_CREATEICFAILURE","kind":"const","vis":"private","signature":"Private Const PDERR_CREATEICFAILURE As Long = &H100A"}, + {"name":"PDERR_DNDMMISMATCH","kind":"const","vis":"private","signature":"Private Const PDERR_DNDMMISMATCH As Long = &H1009"}, + {"name":"PDERR_GETDEVMODEFAIL","kind":"const","vis":"private","signature":"Private Const PDERR_GETDEVMODEFAIL As Long = &H1005"}, + {"name":"PDERR_INITFAILURE","kind":"const","vis":"private","signature":"Private Const PDERR_INITFAILURE As Long = &H1006"}, + {"name":"PDERR_LOADDRVFAILURE","kind":"const","vis":"private","signature":"Private Const PDERR_LOADDRVFAILURE As Long = &H1004"}, + {"name":"PDERR_NODEFAULTPRN","kind":"const","vis":"private","signature":"Private Const PDERR_NODEFAULTPRN As Long = &H1008"}, + {"name":"PDERR_NODEVICES","kind":"const","vis":"private","signature":"Private Const PDERR_NODEVICES As Long = &H1007"}, + {"name":"PDERR_PARSEFAILURE","kind":"const","vis":"private","signature":"Private Const PDERR_PARSEFAILURE As Long = &H1002"}, + {"name":"PDERR_PRINTERNOTFOUND","kind":"const","vis":"private","signature":"Private Const PDERR_PRINTERNOTFOUND As Long = &H100B"}, + {"name":"PDERR_RETDEFFAILURE","kind":"const","vis":"private","signature":"Private Const PDERR_RETDEFFAILURE As Long = &H1003"}, + {"name":"PD_ALLPAGES","kind":"const","vis":"private","signature":"Private Const PD_ALLPAGES As Long = &H0"}, + {"name":"PD_COLLATE","kind":"const","vis":"private","signature":"Private Const PD_COLLATE As Long = &H10"}, + {"name":"PD_CURRENTPAGE","kind":"const","vis":"private","signature":"Private Const PD_CURRENTPAGE As Long = &H400000"}, + {"name":"PD_DISABLEPRINTTOFILE","kind":"const","vis":"private","signature":"Private Const PD_DISABLEPRINTTOFILE As Long = &H80000"}, + {"name":"PD_ENABLEPRINTHOOK","kind":"const","vis":"private","signature":"Private Const PD_ENABLEPRINTHOOK As Long = &H1000"}, + {"name":"PD_ENABLESETUPHOOK","kind":"const","vis":"private","signature":"Private Const PD_ENABLESETUPHOOK As Long = &H2000"}, + {"name":"PD_HIDEPRINTTOFILE","kind":"const","vis":"private","signature":"Private Const PD_HIDEPRINTTOFILE As Long = &H100000"}, + {"name":"PD_NOCURRENTPAGE","kind":"const","vis":"private","signature":"Private Const PD_NOCURRENTPAGE As Long = &H800000"}, + {"name":"PD_NONETWORKBUTTON","kind":"const","vis":"private","signature":"Private Const PD_NONETWORKBUTTON As Long = &H200000"}, + {"name":"PD_NOPAGENUMS","kind":"const","vis":"private","signature":"Private Const PD_NOPAGENUMS As Long = &H8"}, + {"name":"PD_NOSELECTION","kind":"const","vis":"private","signature":"Private Const PD_NOSELECTION As Long = &H4"}, + {"name":"PD_NOWARNING","kind":"const","vis":"private","signature":"Private Const PD_NOWARNING As Long = &H80"}, + {"name":"PD_PAGENUMS","kind":"const","vis":"private","signature":"Private Const PD_PAGENUMS As Long = &H2"}, + {"name":"PD_PRINTSETUP","kind":"const","vis":"private","signature":"Private Const PD_PRINTSETUP As Long = &H40"}, + {"name":"PD_PRINTTOFILE","kind":"const","vis":"private","signature":"Private Const PD_PRINTTOFILE As Long = &H20"}, + {"name":"PD_RESULT_APPLY","kind":"const","vis":"private","signature":"Private Const PD_RESULT_APPLY As Long = &H2"}, + {"name":"PD_RESULT_CANCEL","kind":"const","vis":"private","signature":"Private Const PD_RESULT_CANCEL As Long = &H0"}, + {"name":"PD_RESULT_PRINT","kind":"const","vis":"private","signature":"Private Const PD_RESULT_PRINT As Long = &H1"}, + {"name":"PD_RETURNDC","kind":"const","vis":"private","signature":"Private Const PD_RETURNDC As Long = &H100"}, + {"name":"PD_RETURNDEFAULT","kind":"const","vis":"private","signature":"Private Const PD_RETURNDEFAULT As Long = &H400"}, + {"name":"PD_RETURNIC","kind":"const","vis":"private","signature":"Private Const PD_RETURNIC As Long = &H200"}, + {"name":"PD_SELECTION","kind":"const","vis":"private","signature":"Private Const PD_SELECTION As Long = &H1"}, + {"name":"PD_SHOWHELP","kind":"const","vis":"private","signature":"Private Const PD_SHOWHELP As Long = &H800"}, + {"name":"PD_USEDEVMODECOPIES","kind":"const","vis":"private","signature":"Private Const PD_USEDEVMODECOPIES As Long = &H40000"}, + {"name":"PD_USEDEVMODECOPIESANDCOLLATE","kind":"const","vis":"private","signature":"Private Const PD_USEDEVMODECOPIESANDCOLLATE As Long = &H40000"}, + {"name":"PSD_DEFAULTMINMARGINS","kind":"const","vis":"private","signature":"Private Const PSD_DEFAULTMINMARGINS As Long = &H0"}, + {"name":"PSD_DISABLEMARGINS","kind":"const","vis":"private","signature":"Private Const PSD_DISABLEMARGINS As Long = &H10"}, + {"name":"PSD_DISABLEORIENTATION","kind":"const","vis":"private","signature":"Private Const PSD_DISABLEORIENTATION As Long = &H100"}, + {"name":"PSD_DISABLEPAGEPAINTING","kind":"const","vis":"private","signature":"Private Const PSD_DISABLEPAGEPAINTING As Long = &H80000"}, + {"name":"PSD_DISABLEPAPER","kind":"const","vis":"private","signature":"Private Const PSD_DISABLEPAPER As Long = &H200"}, + {"name":"PSD_DISABLEPRINTER","kind":"const","vis":"private","signature":"Private Const PSD_DISABLEPRINTER As Long = &H20"}, + {"name":"PSD_ENABLEPAGESETUPHOOK","kind":"const","vis":"private","signature":"Private Const PSD_ENABLEPAGESETUPHOOK As Long = &H2000"}, + {"name":"PSD_INHUNDREDTHSOFMILLIMETERS","kind":"const","vis":"private","signature":"Private Const PSD_INHUNDREDTHSOFMILLIMETERS As Long = &H8"}, + {"name":"PSD_INTHOUSANDTHSOFINCHES","kind":"const","vis":"private","signature":"Private Const PSD_INTHOUSANDTHSOFINCHES As Long = &H4"}, + {"name":"PSD_MARGINS","kind":"const","vis":"private","signature":"Private Const PSD_MARGINS As Long = &H2"}, + {"name":"PSD_MINMARGINS","kind":"const","vis":"private","signature":"Private Const PSD_MINMARGINS As Long = &H1"}, + {"name":"PSD_NONETWORKBUTTON","kind":"const","vis":"private","signature":"Private Const PSD_NONETWORKBUTTON As Long = &H200000"}, + {"name":"PSD_NOWARNING","kind":"const","vis":"private","signature":"Private Const PSD_NOWARNING As Long = &H80"}, + {"name":"PSD_RETURNDEFAULT","kind":"const","vis":"private","signature":"Private Const PSD_RETURNDEFAULT As Long = &H400"}, + {"name":"PSD_SHOWHELP","kind":"const","vis":"private","signature":"Private Const PSD_SHOWHELP As Long = &H800"}, + {"name":"PTR_SIZE","kind":"const","vis":"private","signatures":[{"cond":"Win64","signature":"Private Const PTR_SIZE As Long = 8"},{"cond":"Not (Win64)","signature":"Private Const PTR_SIZE As Long = 4"}]}, + {"name":"PageBottomMargin","kind":"property","vis":"public","signature":"Public Property Get PageBottomMargin() As Long","returnType":"Long","accessor":"Get"}, + {"name":"PageBottomMargin","kind":"property","vis":"public","signature":"Public Property Let PageBottomMargin(ByVal Value As Long)","accessor":"Let"}, + {"name":"PageBottomMinMargin","kind":"property","vis":"public","signature":"Public Property Get PageBottomMinMargin() As Long","returnType":"Long","accessor":"Get"}, + {"name":"PageBottomMinMargin","kind":"property","vis":"public","signature":"Public Property Let PageBottomMinMargin(ByVal Value As Long)","accessor":"Let"}, + {"name":"PageLeftMargin","kind":"property","vis":"public","signature":"Public Property Get PageLeftMargin() As Long","returnType":"Long","accessor":"Get"}, + {"name":"PageLeftMargin","kind":"property","vis":"public","signature":"Public Property Let PageLeftMargin(ByVal Value As Long)","accessor":"Let"}, + {"name":"PageLeftMinMargin","kind":"property","vis":"public","signature":"Public Property Get PageLeftMinMargin() As Long","returnType":"Long","accessor":"Get"}, + {"name":"PageLeftMinMargin","kind":"property","vis":"public","signature":"Public Property Let PageLeftMinMargin(ByVal Value As Long)","accessor":"Let"}, + {"name":"PageRightMargin","kind":"property","vis":"public","signature":"Public Property Get PageRightMargin() As Long","returnType":"Long","accessor":"Get"}, + {"name":"PageRightMargin","kind":"property","vis":"public","signature":"Public Property Let PageRightMargin(ByVal Value As Long)","accessor":"Let"}, + {"name":"PageRightMinMargin","kind":"property","vis":"public","signature":"Public Property Get PageRightMinMargin() As Long","returnType":"Long","accessor":"Get"}, + {"name":"PageRightMinMargin","kind":"property","vis":"public","signature":"Public Property Let PageRightMinMargin(ByVal Value As Long)","accessor":"Let"}, + {"name":"PageSetupDialog","kind":"function","vis":"private","declare":true,"returnType":"Long","signatures":[{"cond":"VBA7","signature":"Private Declare PtrSafe Function PageSetupDialog Lib \"comdlg32\" Alias \"PageSetupDlgW\" (ByRef lpPageSetupDlg As PAGESETUPDLG) As Long"},{"cond":"Not (VBA7)","signature":"Private Declare Function PageSetupDialog Lib \"comdlg32\" Alias \"PageSetupDlgW\" (ByRef lpPageSetupDlg As PAGESETUPDLG) As Long"}]}, + {"name":"PageTopMargin","kind":"property","vis":"public","signature":"Public Property Get PageTopMargin() As Long","returnType":"Long","accessor":"Get"}, + {"name":"PageTopMargin","kind":"property","vis":"public","signature":"Public Property Let PageTopMargin(ByVal Value As Long)","accessor":"Let"}, + {"name":"PageTopMinMargin","kind":"property","vis":"public","signature":"Public Property Get PageTopMinMargin() As Long","returnType":"Long","accessor":"Get"}, + {"name":"PageTopMinMargin","kind":"property","vis":"public","signature":"Public Property Let PageTopMinMargin(ByVal Value As Long)","accessor":"Let"}, + {"name":"PaperBin","kind":"property","vis":"public","signature":"Public Property Get PaperBin() As CdlPRBNConstants","returnType":"CdlPRBNConstants","accessor":"Get"}, + {"name":"PaperBin","kind":"property","vis":"public","signature":"Public Property Let PaperBin(ByVal Value As CdlPRBNConstants)","accessor":"Let"}, + {"name":"PaperSize","kind":"property","vis":"public","signature":"Public Property Get PaperSize() As CdlPRPSConstants","returnType":"CdlPRPSConstants","accessor":"Get"}, + {"name":"PaperSize","kind":"property","vis":"public","signature":"Public Property Let PaperSize(ByVal Value As CdlPRPSConstants)","accessor":"Let"}, + {"name":"PrepareDevModeBuffer","kind":"function","vis":"private","signature":"Private Function PrepareDevModeBuffer(ByRef hPrinter As LongPtr, ByVal DeviceName As String, ByRef DMODE_B() As Byte) As Long","returnType":"Long"}, + {"name":"PrintDialog","kind":"function","vis":"private","declare":true,"returnType":"Long","signatures":[{"cond":"VBA7","signature":"Private Declare PtrSafe Function PrintDialog Lib \"comdlg32\" Alias \"PrintDlgW\" (ByRef lpPrintDlg As PRINTDLG) As Long"},{"cond":"Not (VBA7)","signature":"Private Declare Function PrintDialog Lib \"comdlg32\" Alias \"PrintDlgW\" (ByRef lpPrintDlg As PRINTDLG) As Long"}]}, + {"name":"PrintDialogEx","kind":"function","vis":"private","declare":true,"returnType":"Long","signatures":[{"cond":"VBA7","signature":"Private Declare PtrSafe Function PrintDialogEx Lib \"comdlg32\" Alias \"PrintDlgExW\" (ByRef lpPrintDlgEx As PRINTDLGEX) As Long"},{"cond":"Not (VBA7)","signature":"Private Declare Function PrintDialogEx Lib \"comdlg32\" Alias \"PrintDlgExW\" (ByRef lpPrintDlgEx As PRINTDLGEX) As Long"}]}, + {"name":"PrintQuality","kind":"property","vis":"public","signature":"Public Property Get PrintQuality() As CdlPRPQConstants","returnType":"CdlPRPQConstants","accessor":"Get"}, + {"name":"PrintQuality","kind":"property","vis":"public","signature":"Public Property Let PrintQuality(ByVal Value As CdlPRPQConstants)","accessor":"Let"}, + {"name":"PrinterDefault","kind":"property","vis":"public","signature":"Public Property Get PrinterDefault() As Boolean","returnType":"Boolean","accessor":"Get"}, + {"name":"PrinterDefault","kind":"property","vis":"public","signature":"Public Property Let PrinterDefault(ByVal Value As Boolean)","accessor":"Let"}, + {"name":"PrinterDefaultInit","kind":"property","vis":"public","signature":"Public Property Get PrinterDefaultInit() As Boolean","returnType":"Boolean","accessor":"Get"}, + {"name":"PrinterDefaultInit","kind":"property","vis":"public","signature":"Public Property Let PrinterDefaultInit(ByVal Value As Boolean)","accessor":"Let"}, + {"name":"PrinterDriver","kind":"property","vis":"public","signature":"Public Property Get PrinterDriver() As String","returnType":"String","accessor":"Get"}, + {"name":"PrinterDriver","kind":"property","vis":"public","signature":"Public Property Let PrinterDriver(ByVal Value As String)","accessor":"Let"}, + {"name":"PrinterName","kind":"property","vis":"public","signature":"Public Property Get PrinterName() As String","returnType":"String","accessor":"Get"}, + {"name":"PrinterName","kind":"property","vis":"public","signature":"Public Property Let PrinterName(ByVal Value As String)","accessor":"Let"}, + {"name":"PrinterPort","kind":"property","vis":"public","signature":"Public Property Get PrinterPort() As String","returnType":"String","accessor":"Get"}, + {"name":"PrinterPort","kind":"property","vis":"public","signature":"Public Property Let PrinterPort(ByVal Value As String)","accessor":"Let"}, + {"name":"ProcPtr","kind":"function","vis":"private","signature":"Private Function ProcPtr(ByVal Address As LongPtr) As LongPtr","returnType":"LongPtr"}, + {"name":"PropCancelError","kind":"field","vis":"private","signature":"Private PropCancelError As Boolean"}, + {"name":"PropColor","kind":"field","vis":"private","signature":"Private PropColor As Long"}, + {"name":"PropColorMode","kind":"field","vis":"private","signature":"Private PropColorMode As CdlPRCMConstants"}, + {"name":"PropCopies","kind":"field","vis":"private","signature":"Private PropCopies As Integer"}, + {"name":"PropCustomColors","kind":"field","vis":"private","signature":"Private PropCustomColors(0 To 15) As Long"}, + {"name":"PropDC","kind":"field","vis":"private","signature":"Private PropDC As LongPtr"}, + {"name":"PropDefaultExt","kind":"field","vis":"private","signature":"Private PropDefaultExt As String"}, + {"name":"PropDialogTitle","kind":"field","vis":"private","signature":"Private PropDialogTitle As String"}, + {"name":"PropDuplex","kind":"field","vis":"private","signature":"Private PropDuplex As CdlPRDPConstants"}, + {"name":"PropFileName","kind":"field","vis":"private","signature":"Private PropFileName As String"}, + {"name":"PropFileOffset","kind":"field","vis":"private","signature":"Private PropFileOffset As Integer"}, + {"name":"PropFileTitle","kind":"field","vis":"private","signature":"Private PropFileTitle As String"}, + {"name":"PropFilter","kind":"field","vis":"private","signature":"Private PropFilter As String"}, + {"name":"PropFilterIndex","kind":"field","vis":"private","signature":"Private PropFilterIndex As Long"}, + {"name":"PropFindWhat","kind":"field","vis":"private","signature":"Private PropFindWhat As String"}, + {"name":"PropFlags","kind":"field","vis":"private","signature":"Private PropFlags As Long"}, + {"name":"PropFontCharset","kind":"field","vis":"private","signature":"Private PropFontCharset As Integer"}, + {"name":"PropFontItalic","kind":"field","vis":"private","signature":"Private PropFontItalic As Boolean"}, + {"name":"PropFontName","kind":"field","vis":"private","signature":"Private PropFontName As String"}, + {"name":"PropFontSize","kind":"field","vis":"private","signature":"Private PropFontSize As Single"}, + {"name":"PropFontStrikethru","kind":"field","vis":"private","signature":"Private PropFontStrikethru As Boolean"}, + {"name":"PropFontUnderline","kind":"field","vis":"private","signature":"Private PropFontUnderline As Boolean"}, + {"name":"PropFontWeight","kind":"field","vis":"private","signature":"Private PropFontWeight As Integer"}, + {"name":"PropFromPage","kind":"field","vis":"private","signature":"Private PropFromPage As Long"}, + {"name":"PropHelpCommand","kind":"field","vis":"private","signature":"Private PropHelpCommand As CdlHelpConstants"}, + {"name":"PropHelpContext","kind":"field","vis":"private","signature":"Private PropHelpContext As LongPtr"}, + {"name":"PropHelpFile","kind":"field","vis":"private","signature":"Private PropHelpFile As String"}, + {"name":"PropHelpKey","kind":"field","vis":"private","signature":"Private PropHelpKey As String"}, + {"name":"PropHookEvents","kind":"field","vis":"private","signature":"Private PropHookEvents As Boolean"}, + {"name":"PropInitDir","kind":"field","vis":"private","signature":"Private PropInitDir As String"}, + {"name":"PropMax","kind":"field","vis":"private","signature":"Private PropMax As Long"}, + {"name":"PropMaxFileSize","kind":"field","vis":"private","signature":"Private PropMaxFileSize As Long"}, + {"name":"PropMin","kind":"field","vis":"private","signature":"Private PropMin As Long"}, + {"name":"PropOrientation","kind":"field","vis":"private","signature":"Private PropOrientation As CdlPRORConstants"}, + {"name":"PropPageBottomMargin","kind":"field","vis":"private","signature":"Private PropPageBottomMargin As Long"}, + {"name":"PropPageBottomMinMargin","kind":"field","vis":"private","signature":"Private PropPageBottomMinMargin As Long"}, + {"name":"PropPageLeftMargin","kind":"field","vis":"private","signature":"Private PropPageLeftMargin As Long"}, + {"name":"PropPageLeftMinMargin","kind":"field","vis":"private","signature":"Private PropPageLeftMinMargin As Long"}, + {"name":"PropPageRightMargin","kind":"field","vis":"private","signature":"Private PropPageRightMargin As Long"}, + {"name":"PropPageRightMinMargin","kind":"field","vis":"private","signature":"Private PropPageRightMinMargin As Long"}, + {"name":"PropPageTopMargin","kind":"field","vis":"private","signature":"Private PropPageTopMargin As Long"}, + {"name":"PropPageTopMinMargin","kind":"field","vis":"private","signature":"Private PropPageTopMinMargin As Long"}, + {"name":"PropPaperBin","kind":"field","vis":"private","signature":"Private PropPaperBin As CdlPRBNConstants"}, + {"name":"PropPaperSize","kind":"field","vis":"private","signature":"Private PropPaperSize As CdlPRPSConstants"}, + {"name":"PropPrintQuality","kind":"field","vis":"private","signature":"Private PropPrintQuality As CdlPRPQConstants"}, + {"name":"PropPrinterDefault","kind":"field","vis":"private","signature":"Private PropPrinterDefault As Boolean"}, + {"name":"PropPrinterDefaultInit","kind":"field","vis":"private","signature":"Private PropPrinterDefaultInit As Boolean"}, + {"name":"PropPrinterDriver","kind":"field","vis":"private","signature":"Private PropPrinterDriver As String"}, + {"name":"PropPrinterName","kind":"field","vis":"private","signature":"Private PropPrinterName As String"}, + {"name":"PropPrinterPort","kind":"field","vis":"private","signature":"Private PropPrinterPort As String"}, + {"name":"PropReplaceWith","kind":"field","vis":"private","signature":"Private PropReplaceWith As String"}, + {"name":"PropRootFolder","kind":"field","vis":"private","signature":"Private PropRootFolder As Variant"}, + {"name":"PropTag","kind":"field","vis":"private","signature":"Private PropTag As String"}, + {"name":"PropToPage","kind":"field","vis":"private","signature":"Private PropToPage As Long"}, + {"name":"ProperFilter","kind":"function","vis":"private","signature":"Private Function ProperFilter(ByVal Filter As String) As String","returnType":"String"}, + {"name":"RegisterWindowMessage","kind":"function","vis":"private","declare":true,"returnType":"Long","signatures":[{"cond":"VBA7","signature":"Private Declare PtrSafe Function RegisterWindowMessage Lib \"user32\" Alias \"RegisterWindowMessageW\" (ByVal lpString As LongPtr) As Long"},{"cond":"Not (VBA7)","signature":"Private Declare Function RegisterWindowMessage Lib \"user32\" Alias \"RegisterWindowMessageW\" (ByVal lpString As Long) As Long"}]}, + {"name":"ReleaseDC","kind":"function","vis":"private","declare":true,"returnType":"Long","signatures":[{"cond":"VBA7","signature":"Private Declare PtrSafe Function ReleaseDC Lib \"user32\" (ByVal hWnd As LongPtr, ByVal hDC As LongPtr) As Long"},{"cond":"Not (VBA7)","signature":"Private Declare Function ReleaseDC Lib \"user32\" (ByVal hWnd As Long, ByVal hDC As Long) As Long"}]}, + {"name":"Replace","kind":"event","vis":"public","signature":"Public Event Replace()"}, + {"name":"ReplaceAll","kind":"event","vis":"public","signature":"Public Event ReplaceAll()"}, + {"name":"ReplaceText","kind":"function","vis":"private","declare":true,"returnType":"Long","signatures":[{"cond":"VBA7","signature":"Private Declare PtrSafe Function ReplaceText Lib \"comdlg32\" Alias \"ReplaceTextW\" (ByRef lpFindReplace As FINDREPLACE) As Long"},{"cond":"Not (VBA7)","signature":"Private Declare Function ReplaceText Lib \"comdlg32\" Alias \"ReplaceTextW\" (ByRef lpFindReplace As FINDREPLACE) As Long"}]}, + {"name":"ReplaceWith","kind":"property","vis":"public","signature":"Public Property Get ReplaceWith() As String","returnType":"String","accessor":"Get"}, + {"name":"ReplaceWith","kind":"property","vis":"public","signature":"Public Property Let ReplaceWith(ByVal Value As String)","accessor":"Let"}, + {"name":"RootFolder","kind":"property","vis":"public","signature":"Public Property Get RootFolder() As Variant","returnType":"Variant","accessor":"Get"}, + {"name":"RootFolder","kind":"property","vis":"public","signature":"Public Property Let RootFolder(ByVal Value As Variant)","accessor":"Let"}, + {"name":"SETRGBSTRING","kind":"const","vis":"private","signature":"Private Const SETRGBSTRING As String = \"commdlg_SetRGBColor\""}, + {"name":"SHAREVISTRING","kind":"const","vis":"private","signature":"Private Const SHAREVISTRING As String = \"commdlg_ShareViolation\""}, + {"name":"SHBrowseForFolder","kind":"function","vis":"private","declare":true,"signatures":[{"cond":"VBA7","signature":"Private Declare PtrSafe Function SHBrowseForFolder Lib \"shell32\" Alias \"SHBrowseForFolderW\" (ByRef lpBrowseInfo As BROWSEINFO) As LongPtr","returnType":"LongPtr"},{"cond":"Not (VBA7)","signature":"Private Declare Function SHBrowseForFolder Lib \"shell32\" Alias \"SHBrowseForFolderW\" (ByRef lpBrowseInfo As BROWSEINFO) As Long","returnType":"Long"}]}, + {"name":"SHGetFolderLocation","kind":"function","vis":"private","declare":true,"returnType":"Long","signatures":[{"cond":"VBA7","signature":"Private Declare PtrSafe Function SHGetFolderLocation Lib \"shell32\" (ByVal hWndOwner As LongPtr, ByVal nFolder As Long, ByVal hToken As LongPtr, ByVal dwReserved As Long, ByRef lpIDList As LongPtr) As Long"},{"cond":"Not (VBA7)","signature":"Private Declare Function SHGetFolderLocation Lib \"shell32\" (ByVal hWndOwner As Long, ByVal nFolder As Long, ByVal hToken As Long, ByVal dwReserved As Long, ByRef lpIDList As Long) As Long"}]}, + {"name":"SHGetPathFromIDList","kind":"function","vis":"private","declare":true,"returnType":"Long","signatures":[{"cond":"VBA7","signature":"Private Declare PtrSafe Function SHGetPathFromIDList Lib \"shell32\" Alias \"SHGetPathFromIDListW\" (ByVal lpIDList As LongPtr, ByVal lpBuffer As LongPtr) As Long"},{"cond":"Not (VBA7)","signature":"Private Declare Function SHGetPathFromIDList Lib \"shell32\" Alias \"SHGetPathFromIDListW\" (ByVal lpIDList As Long, ByVal lpBuffer As Long) As Long"}]}, + {"name":"S_OK","kind":"const","vis":"private","signature":"Private Const S_OK As Long = &H0"}, + {"name":"SendDlgItemMessage","kind":"function","vis":"private","declare":true,"signatures":[{"cond":"VBA7","signature":"Private Declare PtrSafe Function SendDlgItemMessage Lib \"user32\" Alias \"SendDlgItemMessageW\" (ByVal hDlg As LongPtr, ByVal nIDDlgItem As Long, ByVal wMsg As Long, ByVal wParam As LongPtr, ByRef lParam As Any) As LongPtr","returnType":"LongPtr"},{"cond":"Not (VBA7)","signature":"Private Declare Function SendDlgItemMessage Lib \"user32\" Alias \"SendDlgItemMessageW\" (ByVal hDlg As Long, ByVal nIDDlgItem As Long, ByVal wMsg As Long, ByVal wParam As Long, ByRef lParam As Any) As Long","returnType":"Long"}]}, + {"name":"SendMessage","kind":"function","vis":"private","declare":true,"signatures":[{"cond":"VBA7","signature":"Private Declare PtrSafe Function SendMessage Lib \"user32\" Alias \"SendMessageW\" (ByVal hWnd As LongPtr, ByVal wMsg As Long, ByVal wParam As LongPtr, ByRef lParam As Any) As LongPtr","returnType":"LongPtr"},{"cond":"Not (VBA7)","signature":"Private Declare Function SendMessage Lib \"user32\" Alias \"SendMessageW\" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByRef lParam As Any) As Long","returnType":"Long"}]}, + {"name":"SetDefaultPrinter","kind":"function","vis":"private","declare":true,"returnType":"Long","signatures":[{"cond":"VBA7","signature":"Private Declare PtrSafe Function SetDefaultPrinter Lib \"winspool.drv\" Alias \"SetDefaultPrinterW\" (ByVal lpszPrinterName As LongPtr) As Long"},{"cond":"Not (VBA7)","signature":"Private Declare Function SetDefaultPrinter Lib \"winspool.drv\" Alias \"SetDefaultPrinterW\" (ByVal lpszPrinterName As Long) As Long"}]}, + {"name":"SetFocusAPI","kind":"function","vis":"private","declare":true,"signatures":[{"cond":"VBA7","signature":"Private Declare PtrSafe Function SetFocusAPI Lib \"user32\" Alias \"SetFocus\" (ByVal hWnd As LongPtr) As LongPtr","returnType":"LongPtr"},{"cond":"Not (VBA7)","signature":"Private Declare Function SetFocusAPI Lib \"user32\" Alias \"SetFocus\" (ByVal hWnd As Long) As Long","returnType":"Long"}]}, + {"name":"SetPrinterDefault","kind":"sub","vis":"private","signature":"Private Sub SetPrinterDefault(ByVal NewPrinterName As String)"}, + {"name":"SetWindowLong","kind":"function","vis":"private","declare":true,"returnType":"Long","signatures":[{"cond":"VBA7","signature":"Private Declare PtrSafe Function SetWindowLong Lib \"user32\" Alias \"SetWindowLongW\" (ByVal hWnd As LongPtr, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long"},{"cond":"Not (VBA7)","signature":"Private Declare Function SetWindowLong Lib \"user32\" Alias \"SetWindowLongW\" (ByVal hWnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long"}]}, + {"name":"ShowColor","kind":"function","vis":"public","signature":"Public Function ShowColor() As Boolean","returnType":"Boolean"}, + {"name":"ShowFind","kind":"function","vis":"public","signatures":[{"cond":"VBA7","signature":"Public Function ShowFind() As LongPtr","returnType":"LongPtr"},{"cond":"Not (VBA7)","signature":"Public Function ShowFind() As Long","returnType":"Long"}]}, + {"name":"ShowFolderBrowser","kind":"function","vis":"public","signature":"Public Function ShowFolderBrowser() As Boolean","returnType":"Boolean"}, + {"name":"ShowFont","kind":"function","vis":"public","signature":"Public Function ShowFont() As Boolean","returnType":"Boolean"}, + {"name":"ShowHelp","kind":"sub","vis":"public","signature":"Public Sub ShowHelp()"}, + {"name":"ShowOpen","kind":"function","vis":"public","signature":"Public Function ShowOpen() As Boolean","returnType":"Boolean"}, + {"name":"ShowPageSetup","kind":"function","vis":"public","signature":"Public Function ShowPageSetup() As Boolean","returnType":"Boolean"}, + {"name":"ShowPrinter","kind":"function","vis":"public","signature":"Public Function ShowPrinter() As Boolean","returnType":"Boolean"}, + {"name":"ShowPrinterEx","kind":"function","vis":"public","signature":"Public Function ShowPrinterEx() As CdlPDResultConstants","returnType":"CdlPDResultConstants"}, + {"name":"ShowReplace","kind":"function","vis":"public","signatures":[{"cond":"VBA7","signature":"Public Function ShowReplace() As LongPtr","returnType":"LongPtr"},{"cond":"Not (VBA7)","signature":"Public Function ShowReplace() As Long","returnType":"Long"}]}, + {"name":"ShowSave","kind":"function","vis":"public","signature":"Public Function ShowSave() As Boolean","returnType":"Boolean"}, + {"name":"Tag","kind":"property","vis":"public","signature":"Public Property Get Tag() As String","returnType":"String","accessor":"Get"}, + {"name":"Tag","kind":"property","vis":"public","signature":"Public Property Let Tag(ByVal Value As String)","accessor":"Let"}, + {"name":"ToPage","kind":"property","vis":"public","signature":"Public Property Get ToPage() As Long","returnType":"Long","accessor":"Get"}, + {"name":"ToPage","kind":"property","vis":"public","signature":"Public Property Let ToPage(ByVal Value As Long)","accessor":"Let"}, + {"name":"UnsignedAdd","kind":"function","vis":"private","signature":"Private Function UnsignedAdd(ByVal Start As LongPtr, ByVal Incr As LongPtr) As LongPtr","returnType":"LongPtr"}, + {"name":"WM_COMMAND","kind":"const","vis":"private","signature":"Private Const WM_COMMAND As Long = &H111"}, + {"name":"WM_INITDIALOG","kind":"const","vis":"private","signature":"Private Const WM_INITDIALOG As Long = &H110"}, + {"name":"WM_NOTIFY","kind":"const","vis":"private","signature":"Private Const WM_NOTIFY As Long = &H4E"}, + {"name":"WM_USER","kind":"const","vis":"private","signature":"Private Const WM_USER As Long = &H400"}, + {"name":"WinColor","kind":"function","vis":"private","signature":"Private Function WinColor(ByVal Color As Long, Optional ByVal hPal As LongPtr) As Long","returnType":"Long"}, + {"name":"WinHelp","kind":"function","vis":"private","declare":true,"returnType":"Long","signatures":[{"cond":"VBA7","signature":"Private Declare PtrSafe Function WinHelp Lib \"user32\" Alias \"WinHelpW\" (ByVal hWnd As LongPtr, ByVal lpHelpFile As LongPtr, ByVal wCommand As Long, ByVal dwData As LongPtr) As Long"},{"cond":"Not (VBA7)","signature":"Private Declare Function WinHelp Lib \"user32\" Alias \"WinHelpW\" (ByVal hWnd As Long, ByVal lpHelpFile As Long, ByVal wCommand As Long, ByVal dwData As Long) As Long"}]}, + {"name":"WindowProcOwner","kind":"function","vis":"private","signature":"Private Function WindowProcOwner(ByVal hWnd As LongPtr, ByVal wMsg As Long, ByVal wParam As LongPtr, ByVal lParam As LongPtr, ByVal dwRefData As LongPtr) As LongPtr","returnType":"LongPtr"}, + {"name":"hDC","kind":"property","vis":"public","accessor":"Get","signatures":[{"cond":"VBA7","signature":"Public Property Get hDC() As LongPtr","returnType":"LongPtr"},{"cond":"Not (VBA7)","signature":"Public Property Get hDC() As Long","returnType":"Long"}]}, + {"name":"hDC","kind":"property","vis":"public","accessor":"Let","signatures":[{"cond":"VBA7","signature":"Public Property Let hDC(ByVal Value As LongPtr)"},{"cond":"Not (VBA7)","signature":"Public Property Let hDC(ByVal Value As Long)"}]}, + {"name":"hDlg32","kind":"function","vis":"private","signature":"Private Function hDlg32(ByVal hDlg As LongPtr) As Long","returnType":"Long"}, + {"name":"lstrlen","kind":"function","vis":"private","declare":true,"returnType":"Long","signatures":[{"cond":"VBA7","signature":"Private Declare PtrSafe Function lstrlen Lib \"kernel32\" Alias \"lstrlenW\" (ByVal lpString As LongPtr) As Long"},{"cond":"Not (VBA7)","signature":"Private Declare Function lstrlen Lib \"kernel32\" Alias \"lstrlenW\" (ByVal lpString As Long) As Long"}]} + ] + }, + { + "name": "BROWSEINFO", + "kind": "type", + "in": "CommonDialog", + "vis": "private", + "public": false, + "file": "CommonDialog.cls", + "signature": "Private Type BROWSEINFO", + "fields": [ + {"name":"hWndOwner","vis":"public","signature":"hWndOwner As LongPtr"}, + {"name":"pIDLRoot","vis":"public","signature":"pIDLRoot As LongPtr"}, + {"name":"pszDisplayName","vis":"public","signature":"pszDisplayName As LongPtr"}, + {"name":"lpszTitle","vis":"public","signature":"lpszTitle As LongPtr"}, + {"name":"ulFlags","vis":"public","signature":"ulFlags As Long"}, + {"name":"lpfnCallback","vis":"public","signature":"lpfnCallback As LongPtr"}, + {"name":"lParam","vis":"public","signature":"lParam As LongPtr"}, + {"name":"iImage","vis":"public","signature":"iImage As Long"} + ], + "members": [] + }, + { + "name": "CdlBIFConstants", + "kind": "enum", + "in": "CommonDialog", + "vis": "public", + "file": "CommonDialog.cls", + "signature": "Public Enum CdlBIFConstants", + "values": [ + {"name":"CdlBIFReturnOnlyFSDirs","value":"BIF_RETURNONLYFSDIRS"}, + {"name":"CdlBIFDontGoBelowDomain","value":"BIF_DONTGOBELOWDOMAIN"}, + {"name":"CdlBIFStatusText","value":"BIF_STATUSTEXT"}, + {"name":"CdlBIFReturnFSAncestors","value":"BIF_RETURNFSANCESTORS"}, + {"name":"CdlBIFEditBox","value":"BIF_EDITBOX"}, + {"name":"CdlBIFValidate","value":"BIF_VALIDATE"}, + {"name":"CdlBIFNewDialogStyle","value":"BIF_NEWDIALOGSTYLE"}, + {"name":"CdlBIFBrowseIncludeURLs","value":"BIF_BROWSEINCLUDEURLS"}, + {"name":"CdlBIFUseNewUI","value":"BIF_USENEWUI"}, + {"name":"CdlBIFUAHint","value":"BIF_UAHINT"}, + {"name":"CdlBIFNoNewFolderButton","value":"BIF_NONEWFOLDERBUTTON"}, + {"name":"CdlBIFNoTranslateTargets","value":"BIF_NOTRANSLATETARGETS"}, + {"name":"CdlBIFBrowseForComputer","value":"BIF_BROWSEFORCOMPUTER"}, + {"name":"CdlBIFBrowseForPrinter","value":"BIF_BROWSEFORPRINTER"}, + {"name":"CdlBIFBrowseIncludeFiles","value":"BIF_BROWSEINCLUDEFILES"}, + {"name":"CdlBIFShareable","value":"BIF_SHAREABLE"}, + {"name":"CdlBIFBrowseFileJunctions","value":"BIF_BROWSEFILEJUNCTIONS"} + ] + }, + { + "name": "CdlCCConstants", + "kind": "enum", + "in": "CommonDialog", + "vis": "public", + "file": "CommonDialog.cls", + "signature": "Public Enum CdlCCConstants", + "values": [ + {"name":"CdlCCRGBInit","value":"CC_RGBINIT"}, + {"name":"CdlCCFullOpen","value":"CC_FULLOPEN"}, + {"name":"CdlCCPreventFullOpen","value":"CC_PREVENTFULLOPEN"}, + {"name":"CdlCCHelpButton","value":"CC_SHOWHELP"}, + {"name":"CdlCCSolidColor","value":"CC_SOLIDCOLOR"}, + {"name":"CdlCCAnyColor","value":"CC_ANYCOLOR"} + ] + }, + { + "name": "CdlCFConstants", + "kind": "enum", + "in": "CommonDialog", + "vis": "public", + "file": "CommonDialog.cls", + "signature": "Public Enum CdlCFConstants", + "values": [ + {"name":"CdlCFScreenFonts","value":"CF_SCREENFONTS"}, + {"name":"CdlCFPrinterFonts","value":"CF_PRINTERFONTS"}, + {"name":"CdlCFHelpButton","value":"CF_SHOWHELP"}, + {"name":"CdlCFEffects","value":"CF_EFFECTS"}, + {"name":"CdlCFApply","value":"CF_APPLY"}, + {"name":"CdlCFScriptsOnly","value":"CF_SCRIPTSONLY"}, + {"name":"CdlCFNoVectorFonts","value":"CF_NOVECTORFONTS"}, + {"name":"CdlCFLimitSize","value":"CF_LIMITSIZE"}, + {"name":"CdlCFFixedPitchOnly","value":"CF_FIXEDPITCHONLY"}, + {"name":"CdlCFForceFontExist","value":"CF_FORCEFONTEXIST"}, + {"name":"CdlCFScalableOnly","value":"CF_SCALABLEONLY"}, + {"name":"CdlCFTTOnly","value":"CF_TTONLY"}, + {"name":"CdlCFNoFaceSel","value":"CF_NOFACESEL"}, + {"name":"CdlCFNoStyleSel","value":"CF_NOSTYLESEL"}, + {"name":"CdlCFNoSizeSel","value":"CF_NOSIZESEL"}, + {"name":"CdlCFSelectScript","value":"CF_SELECTSCRIPT"}, + {"name":"CdlCFNoScriptSel","value":"CF_NOSCRIPTSEL"}, + {"name":"CdlCFNoVertFonts","value":"CF_NOVERTFONTS"} + ] + }, + { + "name": "CdlErrorConstants", + "kind": "enum", + "in": "CommonDialog", + "vis": "public", + "file": "CommonDialog.cls", + "signature": "Public Enum CdlErrorConstants", + "values": [ + {"name":"CdlCancel","value":"32755"}, + {"name":"CdlBufferTooSmall","value":"20476"}, + {"name":"CdlInvalidFileName","value":"20477"}, + {"name":"CdlSubclassFailure","value":"20478"}, + {"name":"CdlMaxLessThanMin","value":"24573"}, + {"name":"CdlNoFonts","value":"24574"}, + {"name":"CdlPrinterNotFound","value":"28660"}, + {"name":"CdlCreateICFailure","value":"28661"}, + {"name":"CdlDndmMismatch","value":"28662"}, + {"name":"CdlNoDefaultPrn","value":"28663"}, + {"name":"CdlNoDevices","value":"28664"}, + {"name":"CdlInitFailure","value":"28665"}, + {"name":"CdlGetDevModeFail","value":"28666"}, + {"name":"CdlLoadDrvFailure","value":"28667"}, + {"name":"CdlRetDefFailure","value":"28668"}, + {"name":"CdlParseFailure","value":"28669"}, + {"name":"CdlHelp","value":"32751"}, + {"name":"CdlBufferLengthZero","value":"36848"} + ] + }, + { + "name": "CdlFRConstants", + "kind": "enum", + "in": "CommonDialog", + "vis": "public", + "file": "CommonDialog.cls", + "signature": "Public Enum CdlFRConstants", + "values": [ + {"name":"CdlFRDown","value":"FR_DOWN"}, + {"name":"CdlFRWholeWord","value":"FR_WHOLEWORD"}, + {"name":"CdlFRMatchCase","value":"FR_MATCHCASE"}, + {"name":"CdlFRFindNext","value":"FR_FINDNEXT"}, + {"name":"CdlFRReplace","value":"FR_REPLACE"}, + {"name":"CdlFRReplaceAll","value":"FR_REPLACEALL"}, + {"name":"CdlFRHelpButton","value":"FR_SHOWHELP"}, + {"name":"CdlFRNoUpDown","value":"FR_NOUPDOWN"}, + {"name":"CdlFRNoMatchCase","value":"FR_NOMATCHCASE"}, + {"name":"CdlFRNoWholeWord","value":"FR_NOWHOLEWORD"}, + {"name":"CdlFRHideUpDown","value":"FR_HIDEUPDOWN"}, + {"name":"CdlFRHideMatchCase","value":"FR_HIDEMATCHCASE"}, + {"name":"CdlFRHideWholeWord","value":"FR_HIDEWHOLEWORD"} + ] + }, + { + "name": "CdlHelpConstants", + "kind": "enum", + "in": "CommonDialog", + "vis": "public", + "file": "CommonDialog.cls", + "signature": "Public Enum CdlHelpConstants", + "values": [ + {"name":"CdlHelpContext","value":"HELP_CONTEXT"}, + {"name":"CdlHelpQuit","value":"HELP_QUIT"}, + {"name":"CdlHelpIndex","value":"HELP_INDEX"}, + {"name":"CdlHelpContents","value":"HELP_CONTENTS"}, + {"name":"CdlHelpHelpOnHelp","value":"HELP_HELPONHELP"}, + {"name":"CdlHelpSetIndex","value":"HELP_SETINDEX"}, + {"name":"CdlHelpSetContents","value":"HELP_SETCONTENTS"}, + {"name":"CdlHelpContextPopup","value":"HELP_CONTEXTPOPUP"}, + {"name":"CdlHelpForceFile","value":"HELP_FORCEFILE"}, + {"name":"CdlHelpKey","value":"HELP_KEY"}, + {"name":"CdlHelpCommandHelp","value":"HELP_COMMAND"}, + {"name":"CdlHelpPartialKey","value":"HELP_PARTIALKEY"} + ] + }, + { + "name": "CdlOFNConstants", + "kind": "enum", + "in": "CommonDialog", + "vis": "public", + "file": "CommonDialog.cls", + "signature": "Public Enum CdlOFNConstants", + "values": [ + {"name":"CdlOFNReadOnly","value":"OFN_READONLY"}, + {"name":"CdlOFNOverwritePrompt","value":"OFN_OVERWRITEPROMPT"}, + {"name":"CdlOFNHideReadOnly","value":"OFN_HIDEREADONLY"}, + {"name":"CdlOFNNoChangeDir","value":"OFN_NOCHANGEDIR"}, + {"name":"CdlOFNHelpButton","value":"OFN_SHOWHELP"}, + {"name":"CdlOFNNoValidate","value":"OFN_NOVALIDATE"}, + {"name":"CdlOFNAllowMultiSelect","value":"OFN_ALLOWMULTISELECT"}, + {"name":"CdlOFNExtensionDifferent","value":"OFN_EXTENSIONDIFFERENT"}, + {"name":"CdlOFNPathMustExist","value":"OFN_PATHMUSTEXIST"}, + {"name":"CdlOFNFileMustExist","value":"OFN_FILEMUSTEXIST"}, + {"name":"CdlOFNCreatePrompt","value":"OFN_CREATEPROMPT"}, + {"name":"CdlOFNShareAware","value":"OFN_SHAREAWARE"}, + {"name":"CdlOFNNoReadOnlyReturn","value":"OFN_NOREADONLYRETURN"}, + {"name":"CdlOFNNoNetworkButton","value":"OFN_NONETWORKBUTTON"}, + {"name":"CdlOFNExplorer","value":"OFN_EXPLORER"}, + {"name":"CdlOFNNoDereferenceLinks","value":"OFN_NODEREFERENCELINKS"}, + {"name":"CdlOFNDontAddToRecent","value":"OFN_DONTADDTORECENT"}, + {"name":"CdlOFNForcesShowHidden","value":"OFN_FORCESHOWHIDDEN"} + ] + }, + { + "name": "CdlOFNShareViResultConstants", + "kind": "enum", + "in": "CommonDialog", + "vis": "public", + "file": "CommonDialog.cls", + "signature": "Public Enum CdlOFNShareViResultConstants", + "values": [ + {"name":"CdlOFNShareViResultWarn","value":"OFN_SHAREWARN"}, + {"name":"CdlOFNShareViResultNoWarn","value":"OFN_SHARENOWARN"}, + {"name":"CdlOFNShareViResultFallThrough","value":"OFN_SHAREFALLTHROUGH"} + ] + }, + { + "name": "CdlPDConstants", + "kind": "enum", + "in": "CommonDialog", + "vis": "public", + "file": "CommonDialog.cls", + "signature": "Public Enum CdlPDConstants", + "values": [ + {"name":"CdlPDAllPages","value":"PD_ALLPAGES"}, + {"name":"CdlPDSelection","value":"PD_SELECTION"}, + {"name":"CdlPDPageNums","value":"PD_PAGENUMS"}, + {"name":"CdlPDNoSelection","value":"PD_NOSELECTION"}, + {"name":"CdlPDNoPageNums","value":"PD_NOPAGENUMS"}, + {"name":"CdlPDCollate","value":"PD_COLLATE"}, + {"name":"CdlPDPrintToFile","value":"PD_PRINTTOFILE"}, + {"name":"CdlPDPrintSetup","value":"PD_PRINTSETUP"}, + {"name":"CdlPDNoWarning","value":"PD_NOWARNING"}, + {"name":"CdlPDReturnDC","value":"PD_RETURNDC"}, + {"name":"CdlPDReturnIC","value":"PD_RETURNIC"}, + {"name":"CdlPDReturnDefault","value":"PD_RETURNDEFAULT"}, + {"name":"CdlPDHelpButton","value":"PD_SHOWHELP"}, + {"name":"CdlPDUseDevModeCopies","value":"PD_USEDEVMODECOPIES"}, + {"name":"CdlPDUseDevModeCopiesAndCollate","value":"PD_USEDEVMODECOPIESANDCOLLATE"}, + {"name":"CdlPDDisablePrintToFile","value":"PD_DISABLEPRINTTOFILE"}, + {"name":"CdlPDCurrentPage","value":"PD_CURRENTPAGE"}, + {"name":"CdlPDHidePrintToFile","value":"PD_HIDEPRINTTOFILE"}, + {"name":"CdlPDNoNetworkButton","value":"PD_NONETWORKBUTTON"}, + {"name":"CdlPDNoCurrentPage","value":"PD_NOCURRENTPAGE"} + ] + }, + { + "name": "CdlPDResultConstants", + "kind": "enum", + "in": "CommonDialog", + "vis": "public", + "file": "CommonDialog.cls", + "signature": "Public Enum CdlPDResultConstants", + "values": [ + {"name":"CdlPDResultCancel","value":"PD_RESULT_CANCEL"}, + {"name":"CdlPDResultPrint","value":"PD_RESULT_PRINT"}, + {"name":"CdlPDResultApply","value":"PD_RESULT_APPLY"} + ] + }, + { + "name": "CdlPRBNConstants", + "kind": "enum", + "in": "CommonDialog", + "vis": "public", + "file": "CommonDialog.cls", + "signature": "Public Enum CdlPRBNConstants", + "values": [ + {"name":"CdlPRBNUpper","value":"vbPRBNUpper"}, + {"name":"CdlPRBNLower","value":"vbPRBNLower"}, + {"name":"CdlPRBNMiddle","value":"vbPRBNMiddle"}, + {"name":"CdlPRBNManual","value":"vbPRBNManual"}, + {"name":"CdlPRBNEnvelope","value":"vbPRBNEnvelope"}, + {"name":"CdlPRBNEnvManual","value":"vbPRBNEnvManual"}, + {"name":"CdlPRBNAuto","value":"vbPRBNAuto"}, + {"name":"CdlPRBNTractor","value":"vbPRBNTractor"}, + {"name":"CdlPRBNSmallFmt","value":"vbPRBNSmallFmt"}, + {"name":"CdlPRBNLargeFmt","value":"vbPRBNLargeFmt"}, + {"name":"CdlPRBNLargeCapacity","value":"vbPRBNLargeCapacity"}, + {"name":"CdlPRBNCassette","value":"vbPRBNCassette"} + ] + }, + { + "name": "CdlPRCMConstants", + "kind": "enum", + "in": "CommonDialog", + "vis": "public", + "file": "CommonDialog.cls", + "signature": "Public Enum CdlPRCMConstants", + "values": [ + {"name":"CdlPRCMMonochrome","value":"vbPRCMMonochrome"}, + {"name":"CdlPRCMColor","value":"vbPRCMColor"} + ] + }, + { + "name": "CdlPRDPConstants", + "kind": "enum", + "in": "CommonDialog", + "vis": "public", + "file": "CommonDialog.cls", + "signature": "Public Enum CdlPRDPConstants", + "values": [ + {"name":"CdlPRDPSimplex","value":"vbPRDPSimplex"}, + {"name":"CdlPRDPHorizontal","value":"vbPRDPHorizontal"}, + {"name":"CdlPRDPVertical","value":"vbPRDPVertical"} + ] + }, + { + "name": "CdlPRORConstants", + "kind": "enum", + "in": "CommonDialog", + "vis": "public", + "file": "CommonDialog.cls", + "signature": "Public Enum CdlPRORConstants", + "values": [ + {"name":"CdlPRORPortrait","value":"vbPRORPortrait"}, + {"name":"CdlPRORLandscape","value":"vbPRORLandscape"} + ] + }, + { + "name": "CdlPRPQConstants", + "kind": "enum", + "in": "CommonDialog", + "vis": "public", + "file": "CommonDialog.cls", + "signature": "Public Enum CdlPRPQConstants", + "values": [ + {"name":"CdlPRPQHigh","value":"vbPRPQHigh"}, + {"name":"CdlPRPQMedium","value":"vbPRPQMedium"}, + {"name":"CdlPRPQLow","value":"vbPRPQLow"}, + {"name":"CdlPRPQDraft","value":"vbPRPQDraft"} + ] + }, + { + "name": "CdlPRPSConstants", + "kind": "enum", + "in": "CommonDialog", + "vis": "public", + "file": "CommonDialog.cls", + "signature": "Public Enum CdlPRPSConstants", + "values": [ + {"name":"CdlPRPSLetter","value":"vbPRPSLetter"}, + {"name":"CdlPRPSLetterSmall","value":"vbPRPSLetterSmall"}, + {"name":"CdlPRPSTabloid","value":"vbPRPSTabloid"}, + {"name":"CdlPRPSLedger","value":"vbPRPSLedger"}, + {"name":"CdlPRPSLegal","value":"vbPRPSLegal"}, + {"name":"CdlPRPSStatement","value":"vbPRPSStatement"}, + {"name":"CdlPRPSExecutive","value":"vbPRPSExecutive"}, + {"name":"CdlPRPSA3","value":"vbPRPSA3"}, + {"name":"CdlPRPSA4","value":"vbPRPSA4"}, + {"name":"CdlPRPSA4Small","value":"vbPRPSA4Small"}, + {"name":"CdlPRPSA5","value":"vbPRPSA5"}, + {"name":"CdlPRPSB4","value":"vbPRPSB4"}, + {"name":"CdlPRPSB5","value":"vbPRPSB5"}, + {"name":"CdlPRPSFolio","value":"vbPRPSFolio"}, + {"name":"CdlPRPSQuarto","value":"vbPRPSQuarto"}, + {"name":"CdlPRPS10x14","value":"vbPRPS10x14"}, + {"name":"CdlPRPS11x17","value":"vbPRPS11x17"}, + {"name":"CdlPRPSNote","value":"vbPRPSNote"}, + {"name":"CdlPRPSEnv9","value":"vbPRPSEnv9"}, + {"name":"CdlPRPSEnv10","value":"vbPRPSEnv10"}, + {"name":"CdlPRPSEnv11","value":"vbPRPSEnv11"}, + {"name":"CdlPRPSEnv12","value":"vbPRPSEnv12"}, + {"name":"CdlPRPSEnv14","value":"vbPRPSEnv14"}, + {"name":"CdlPRPSCSheet","value":"vbPRPSCSheet"}, + {"name":"CdlPRPSDSheet","value":"vbPRPSDSheet"}, + {"name":"CdlPRPSESheet","value":"vbPRPSESheet"}, + {"name":"CdlPRPSEnvDL","value":"vbPRPSEnvDL"}, + {"name":"CdlPRPSEnvC5","value":"vbPRPSEnvC5"}, + {"name":"CdlPRPSEnvC3","value":"vbPRPSEnvC3"}, + {"name":"CdlPRPSEnvC4","value":"vbPRPSEnvC4"}, + {"name":"CdlPRPSEnvC6","value":"vbPRPSEnvC6"}, + {"name":"CdlPRPSEnvC65","value":"vbPRPSEnvC65"}, + {"name":"CdlPRPSEnvB4","value":"vbPRPSEnvB4"}, + {"name":"CdlPRPSEnvB5","value":"vbPRPSEnvB5"}, + {"name":"CdlPRPSEnvB6","value":"vbPRPSEnvB6"}, + {"name":"CdlPRPSEnvItaly","value":"vbPRPSEnvItaly"}, + {"name":"CdlPRPSEnvMonarch","value":"vbPRPSEnvMonarch"}, + {"name":"CdlPRPSEnvPersonal","value":"vbPRPSEnvPersonal"}, + {"name":"CdlPRPSFanfoldUS","value":"vbPRPSFanfoldUS"}, + {"name":"CdlPRPSFanfoldStdGerman","value":"vbPRPSFanfoldStdGerman"}, + {"name":"CdlPRPSFanfoldLglGerman","value":"vbPRPSFanfoldLglGerman"}, + {"name":"CdlPRPSUser","value":"vbPRPSUser"} + ] + }, + { + "name": "CdlPSDConstants", + "kind": "enum", + "in": "CommonDialog", + "vis": "public", + "file": "CommonDialog.cls", + "signature": "Public Enum CdlPSDConstants", + "values": [ + {"name":"CdlPSDDefaultMinMargins","value":"PSD_DEFAULTMINMARGINS"}, + {"name":"CdlPSDMinMargins","value":"PSD_MINMARGINS"}, + {"name":"CdlPSDMargins","value":"PSD_MARGINS"}, + {"name":"CdlPSDInThousandthsOfInches","value":"PSD_INTHOUSANDTHSOFINCHES"}, + {"name":"CdlPSDInHundredthsOfMillimeters","value":"PSD_INHUNDREDTHSOFMILLIMETERS"}, + {"name":"CdlPSDDisableMargins","value":"PSD_DISABLEMARGINS"}, + {"name":"CdlPSDDisablePrinter","value":"PSD_DISABLEPRINTER"}, + {"name":"CdlPSDNoWarning","value":"PSD_NOWARNING"}, + {"name":"CdlPSDDisableOrientation","value":"PSD_DISABLEORIENTATION"}, + {"name":"CdlPSDDisablePaper","value":"PSD_DISABLEPAPER"}, + {"name":"CdlPSDReturnDefault","value":"PSD_RETURNDEFAULT"}, + {"name":"CdlPSDHelpButton","value":"PSD_SHOWHELP"}, + {"name":"CdlPSDDisablePagePainting","value":"PSD_DISABLEPAGEPAINTING"}, + {"name":"CdlPSDNoNetworkButton","value":"PSD_NONETWORKBUTTON"} + ] + }, + { + "name": "DEVMODE", + "kind": "type", + "in": "CommonDialog", + "vis": "private", + "public": false, + "file": "CommonDialog.cls", + "signature": "Private Type DEVMODE", + "fields": [ + {"name":"DMDeviceName","vis":"public","signature":"DMDeviceName(0 To ((CCHDEVICENAME * 2) - 1)) As Byte"}, + {"name":"DMSpecVersion","vis":"public","signature":"DMSpecVersion As Integer"}, + {"name":"DMDriverVersion","vis":"public","signature":"DMDriverVersion As Integer"}, + {"name":"DMSize","vis":"public","signature":"DMSize As Integer"}, + {"name":"DMDriverExtra","vis":"public","signature":"DMDriverExtra As Integer"}, + {"name":"DMFields","vis":"public","signature":"DMFields As Long"}, + {"name":"DMOrientation","vis":"public","signature":"DMOrientation As Integer"}, + {"name":"DMPaperSize","vis":"public","signature":"DMPaperSize As Integer"}, + {"name":"DMPaperLength","vis":"public","signature":"DMPaperLength As Integer"}, + {"name":"DMPaperWidth","vis":"public","signature":"DMPaperWidth As Integer"}, + {"name":"DMScale","vis":"public","signature":"DMScale As Integer"}, + {"name":"DMCopies","vis":"public","signature":"DMCopies As Integer"}, + {"name":"DMDefaultSource","vis":"public","signature":"DMDefaultSource As Integer"}, + {"name":"DMPrintQuality","vis":"public","signature":"DMPrintQuality As Integer"}, + {"name":"DMColor","vis":"public","signature":"DMColor As Integer"}, + {"name":"DMDuplex","vis":"public","signature":"DMDuplex As Integer"}, + {"name":"DMYResolution","vis":"public","signature":"DMYResolution As Integer"}, + {"name":"DMTTOption","vis":"public","signature":"DMTTOption As Integer"}, + {"name":"DMCollate","vis":"public","signature":"DMCollate As Integer"}, + {"name":"DMFormName","vis":"public","signature":"DMFormName(0 To ((CCHFORMNAME * 2) - 1)) As Byte"}, + {"name":"DMLogPixels","vis":"public","signature":"DMLogPixels As Integer"}, + {"name":"DMBitsPerPel","vis":"public","signature":"DMBitsPerPel As Long"}, + {"name":"DMPelsWidth","vis":"public","signature":"DMPelsWidth As Long"}, + {"name":"DMPelsHeight","vis":"public","signature":"DMPelsHeight As Long"}, + {"name":"DMDisplayFlags","vis":"public","signature":"DMDisplayFlags As Long"}, + {"name":"DMDisplayFrequency","vis":"public","signature":"DMDisplayFrequency As Long"}, + {"name":"DMICMMethod","vis":"public","signature":"DMICMMethod As Long"}, + {"name":"DMICMIntent","vis":"public","signature":"DMICMIntent As Long"}, + {"name":"DMMediaType","vis":"public","signature":"DMMediaType As Long"}, + {"name":"DMDitherType","vis":"public","signature":"DMDitherType As Long"}, + {"name":"DMReserved1","vis":"public","signature":"DMReserved1 As Long"}, + {"name":"DMReserved2","vis":"public","signature":"DMReserved2 As Long"}, + {"name":"DMPanningWidth","vis":"public","signature":"DMPanningWidth As Long"}, + {"name":"DMPanningHeight","vis":"public","signature":"DMPanningHeight As Long"} + ], + "members": [] + }, + { + "name": "DEVNAMES", + "kind": "type", + "in": "CommonDialog", + "vis": "private", + "public": false, + "file": "CommonDialog.cls", + "signature": "Private Type DEVNAMES", + "fields": [ + {"name":"wDriverOffset","vis":"public","signature":"wDriverOffset As Integer"}, + {"name":"wDeviceOffset","vis":"public","signature":"wDeviceOffset As Integer"}, + {"name":"wOutputOffset","vis":"public","signature":"wOutputOffset As Integer"}, + {"name":"wDefault","vis":"public","signature":"wDefault As Integer"}, + {"name":"wExtra","vis":"public","signature":"wExtra(0 To ((CCHDEVNAMESEXTRA * 2) - 1)) As Byte"} + ], + "members": [] + }, + { + "name": "FINDREPLACE", + "kind": "type", + "in": "CommonDialog", + "vis": "private", + "public": false, + "file": "CommonDialog.cls", + "signature": "Private Type FINDREPLACE", + "fields": [ + {"name":"lStructSize","vis":"public","signature":"lStructSize As Long"}, + {"name":"hWndOwner","vis":"public","signature":"hWndOwner As LongPtr"}, + {"name":"hInstance","vis":"public","signature":"hInstance As LongPtr"}, + {"name":"Flags","vis":"public","signature":"Flags As Long"}, + {"name":"lpstrFindWhat","vis":"public","signature":"lpstrFindWhat As LongPtr"}, + {"name":"lpstrReplaceWith","vis":"public","signature":"lpstrReplaceWith As LongPtr"}, + {"name":"wFindWhatLen","vis":"public","signature":"wFindWhatLen As Integer"}, + {"name":"wReplaceWithLen","vis":"public","signature":"wReplaceWithLen As Integer"}, + {"name":"lCustData","vis":"public","signature":"lCustData As LongPtr"}, + {"name":"lpfnHook","vis":"public","signature":"lpfnHook As LongPtr"}, + {"name":"lpTemplateName","vis":"public","signature":"lpTemplateName As LongPtr"} + ], + "members": [] + }, + { + "name": "LOGFONT", + "kind": "type", + "in": "CommonDialog", + "vis": "private", + "public": false, + "file": "CommonDialog.cls", + "signature": "Private Type LOGFONT", + "fields": [ + {"name":"LFHeight","vis":"public","signature":"LFHeight As Long"}, + {"name":"LFWidth","vis":"public","signature":"LFWidth As Long"}, + {"name":"LFEscapement","vis":"public","signature":"LFEscapement As Long"}, + {"name":"LFOrientation","vis":"public","signature":"LFOrientation As Long"}, + {"name":"LFWeight","vis":"public","signature":"LFWeight As Long"}, + {"name":"LFItalic","vis":"public","signature":"LFItalic As Byte"}, + {"name":"LFUnderline","vis":"public","signature":"LFUnderline As Byte"}, + {"name":"LFStrikeOut","vis":"public","signature":"LFStrikeOut As Byte"}, + {"name":"LFCharset","vis":"public","signature":"LFCharset As Byte"}, + {"name":"LFOutPrecision","vis":"public","signature":"LFOutPrecision As Byte"}, + {"name":"LFClipPrecision","vis":"public","signature":"LFClipPrecision As Byte"}, + {"name":"LFQuality","vis":"public","signature":"LFQuality As Byte"}, + {"name":"LFPitchAndFamily","vis":"public","signature":"LFPitchAndFamily As Byte"}, + {"name":"LFFaceName","vis":"public","signature":"LFFaceName(0 To ((LF_FACESIZE * 2) - 1)) As Byte"} + ], + "members": [] + }, + { + "name": "LongPtr", + "kind": "enum", + "in": "CommonDialog", + "vis": "private", + "public": false, + "file": "CommonDialog.cls", + "signature": "Private Enum LongPtr", + "values": [ + {"name":"_"} + ] + }, + { + "name": "NMHDR", + "kind": "type", + "in": "CommonDialog", + "vis": "private", + "public": false, + "file": "CommonDialog.cls", + "signature": "Private Type NMHDR", + "fields": [ + {"name":"hWndFrom","vis":"public","signature":"hWndFrom As LongPtr"}, + {"name":"IDFrom","vis":"public","signature":"IDFrom As LongPtr"}, + {"name":"Code","vis":"public","signature":"Code As Long"} + ], + "members": [] + }, + { + "name": "NMOFNOTIFY", + "kind": "type", + "in": "CommonDialog", + "vis": "private", + "public": false, + "file": "CommonDialog.cls", + "signature": "Private Type NMOFNOTIFY", + "fields": [ + {"name":"hdr","vis":"public","signature":"hdr As NMHDR"}, + {"name":"lpOFN","vis":"public","signature":"lpOFN As LongPtr"}, + {"name":"lpszFileShareVi","vis":"public","signature":"lpszFileShareVi As LongPtr"} + ], + "members": [] + }, + { + "name": "OPENFILENAME", + "kind": "type", + "in": "CommonDialog", + "vis": "private", + "public": false, + "file": "CommonDialog.cls", + "signature": "Private Type OPENFILENAME", + "fields": [ + {"name":"lStructSize","vis":"public","signature":"lStructSize As Long"}, + {"name":"hWndOwner","vis":"public","signature":"hWndOwner As LongPtr"}, + {"name":"hInstance","vis":"public","signature":"hInstance As LongPtr"}, + {"name":"lpstrFilter","vis":"public","signature":"lpstrFilter As LongPtr"}, + {"name":"lpstrCustomFilter","vis":"public","signature":"lpstrCustomFilter As LongPtr"}, + {"name":"nMaxCustFilter","vis":"public","signature":"nMaxCustFilter As Long"}, + {"name":"nFilterIndex","vis":"public","signature":"nFilterIndex As Long"}, + {"name":"lpstrFile","vis":"public","signature":"lpstrFile As LongPtr"}, + {"name":"nMaxFile","vis":"public","signature":"nMaxFile As Long"}, + {"name":"lpstrFileTitle","vis":"public","signature":"lpstrFileTitle As LongPtr"}, + {"name":"nMaxFileTitle","vis":"public","signature":"nMaxFileTitle As Long"}, + {"name":"lpstrInitialDir","vis":"public","signature":"lpstrInitialDir As LongPtr"}, + {"name":"lpstrTitle","vis":"public","signature":"lpstrTitle As LongPtr"}, + {"name":"Flags","vis":"public","signature":"Flags As Long"}, + {"name":"nFileOffset","vis":"public","signature":"nFileOffset As Integer"}, + {"name":"nFileExtension","vis":"public","signature":"nFileExtension As Integer"}, + {"name":"lpstrDefExt","vis":"public","signature":"lpstrDefExt As LongPtr"}, + {"name":"lCustData","vis":"public","signature":"lCustData As LongPtr"}, + {"name":"lpfnHook","vis":"public","signature":"lpfnHook As LongPtr"}, + {"name":"lpTemplateName","vis":"public","signature":"lpTemplateName As LongPtr"}, + {"name":"pvReserved","vis":"public","signature":"pvReserved As Long"}, + {"name":"dwReserved","vis":"public","signature":"dwReserved As Long"}, + {"name":"FlagsEx","vis":"public","signature":"FlagsEx As Long"} + ], + "members": [] + }, + { + "name": "PAGESETUPDLG", + "kind": "type", + "in": "CommonDialog", + "vis": "private", + "public": false, + "file": "CommonDialog.cls", + "signature": "Private Type PAGESETUPDLG", + "fields": [ + {"name":"lStructSize","vis":"public","signature":"lStructSize As Long"}, + {"name":"hWndOwner","vis":"public","signature":"hWndOwner As LongPtr"}, + {"name":"hDevMode","vis":"public","signature":"hDevMode As LongPtr"}, + {"name":"hDevNames","vis":"public","signature":"hDevNames As LongPtr"}, + {"name":"Flags","vis":"public","signature":"Flags As Long"}, + {"name":"PTPaperSize","vis":"public","signature":"PTPaperSize As POINTAPI"}, + {"name":"RCMinMargin","vis":"public","signature":"RCMinMargin As RECT"}, + {"name":"RCMargin","vis":"public","signature":"RCMargin As RECT"}, + {"name":"hInstance","vis":"public","signature":"hInstance As LongPtr"}, + {"name":"lCustData","vis":"public","signature":"lCustData As LongPtr"}, + {"name":"lpfnPageSetupHook","vis":"public","signature":"lpfnPageSetupHook As LongPtr"}, + {"name":"lpfnPagePaintHook","vis":"public","signature":"lpfnPagePaintHook As LongPtr"}, + {"name":"lpPageSetupTemplateName","vis":"public","signature":"lpPageSetupTemplateName As LongPtr"}, + {"name":"hPageSetupTemplate","vis":"public","signature":"hPageSetupTemplate As LongPtr"} + ], + "members": [] + }, + { + "name": "POINTAPI", + "kind": "type", + "in": "CommonDialog", + "vis": "private", + "public": false, + "file": "CommonDialog.cls", + "signature": "Private Type POINTAPI", + "fields": [ + {"name":"X","vis":"public","signature":"X As Long"}, + {"name":"Y","vis":"public","signature":"Y As Long"} + ], + "members": [] + }, + { + "name": "PRINTDLG", + "kind": "type", + "in": "CommonDialog", + "vis": "private", + "public": false, + "file": "CommonDialog.cls", + "signature": "Private Type PRINTDLG", + "fields": [ + {"name":"lStructSize","vis":"public","signature":"lStructSize As Long"}, + {"name":"hWndOwner","vis":"public","signature":"hWndOwner As LongPtr"}, + {"name":"hDevMode","vis":"public","signature":"hDevMode As LongPtr"}, + {"name":"hDevNames","vis":"public","signature":"hDevNames As LongPtr"}, + {"name":"hDC","vis":"public","signature":"hDC As LongPtr"}, + {"name":"Flags","vis":"public","signature":"Flags As Long"}, + {"name":"nFromPage","vis":"public","signature":"nFromPage As Integer"}, + {"name":"nToPage","vis":"public","signature":"nToPage As Integer"}, + {"name":"nMinPage","vis":"public","signature":"nMinPage As Integer"}, + {"name":"nMaxPage","vis":"public","signature":"nMaxPage As Integer"}, + {"name":"nCopies","vis":"public","signature":"nCopies As Integer"}, + {"name":"hInstance","vis":"public","signature":"hInstance As LongPtr"}, + {"name":"lCustData","vis":"public","signature":"lCustData As LongPtr"}, + {"name":"lpfnPrintHook","vis":"public","signature":"lpfnPrintHook As LongPtr"}, + {"name":"lpfnSetupHook","vis":"public","signature":"lpfnSetupHook As LongPtr"}, + {"name":"lpPrintTemplateName","vis":"public","signature":"lpPrintTemplateName As LongPtr"}, + {"name":"lpSetupTemplateName","vis":"public","signature":"lpSetupTemplateName As LongPtr"}, + {"name":"hPrintTemplate","vis":"public","signature":"hPrintTemplate As LongPtr"}, + {"name":"hSetupTemplate","vis":"public","signature":"hSetupTemplate As LongPtr"}, + {"name":"hInstanceLo","vis":"public","signature":"hInstanceLo As Integer"}, + {"name":"hInstanceHi","vis":"public","signature":"hInstanceHi As Integer"}, + {"name":"lCustDataLo","vis":"public","signature":"lCustDataLo As Integer"}, + {"name":"lCustDataHi","vis":"public","signature":"lCustDataHi As Integer"}, + {"name":"lpfnPrintHookLo","vis":"public","signature":"lpfnPrintHookLo As Integer"}, + {"name":"lpfnPrintHookHi","vis":"public","signature":"lpfnPrintHookHi As Integer"}, + {"name":"lpfnSetupHookLo","vis":"public","signature":"lpfnSetupHookLo As Integer"}, + {"name":"lpfnSetupHookHi","vis":"public","signature":"lpfnSetupHookHi As Integer"}, + {"name":"lpPrintTemplateNameLo","vis":"public","signature":"lpPrintTemplateNameLo As Integer"}, + {"name":"lpPrintTemplateNameHi","vis":"public","signature":"lpPrintTemplateNameHi As Integer"}, + {"name":"lpSetupTemplateNameLo","vis":"public","signature":"lpSetupTemplateNameLo As Integer"}, + {"name":"lpSetupTemplateNameHi","vis":"public","signature":"lpSetupTemplateNameHi As Integer"}, + {"name":"hPrintTemplateLo","vis":"public","signature":"hPrintTemplateLo As Integer"}, + {"name":"hPrintTemplateHi","vis":"public","signature":"hPrintTemplateHi As Integer"}, + {"name":"hSetupTemplateLo","vis":"public","signature":"hSetupTemplateLo As Integer"}, + {"name":"hSetupTemplateHi","vis":"public","signature":"hSetupTemplateHi As Integer"} + ], + "members": [] + }, + { + "name": "PRINTDLGEX", + "kind": "type", + "in": "CommonDialog", + "vis": "private", + "public": false, + "file": "CommonDialog.cls", + "signature": "Private Type PRINTDLGEX", + "fields": [ + {"name":"lStructSize","vis":"public","signature":"lStructSize As Long"}, + {"name":"hWndOwner","vis":"public","signature":"hWndOwner As LongPtr"}, + {"name":"hDevMode","vis":"public","signature":"hDevMode As LongPtr"}, + {"name":"hDevNames","vis":"public","signature":"hDevNames As LongPtr"}, + {"name":"hDC","vis":"public","signature":"hDC As LongPtr"}, + {"name":"Flags","vis":"public","signature":"Flags As Long"}, + {"name":"Flags2","vis":"public","signature":"Flags2 As Long"}, + {"name":"ExclusionFlags","vis":"public","signature":"ExclusionFlags As Long"}, + {"name":"nPageRanges","vis":"public","signature":"nPageRanges As Long"}, + {"name":"nMaxPageRanges","vis":"public","signature":"nMaxPageRanges As Long"}, + {"name":"lpPageRanges","vis":"public","signature":"lpPageRanges As LongPtr"}, + {"name":"nMinPage","vis":"public","signature":"nMinPage As Long"}, + {"name":"nMaxPage","vis":"public","signature":"nMaxPage As Long"}, + {"name":"nCopies","vis":"public","signature":"nCopies As Long"}, + {"name":"hInstance","vis":"public","signature":"hInstance As LongPtr"}, + {"name":"lpPrintTemplateName","vis":"public","signature":"lpPrintTemplateName As LongPtr"}, + {"name":"lpCallback","vis":"public","signature":"lpCallback As LongPtr"}, + {"name":"nPropertyPages","vis":"public","signature":"nPropertyPages As Long"}, + {"name":"lphPropertyPages","vis":"public","signature":"lphPropertyPages As LongPtr"}, + {"name":"nStartPage","vis":"public","signature":"nStartPage As Long"}, + {"name":"dwResultAction","vis":"public","signature":"dwResultAction As Long"} + ], + "members": [] + }, + { + "name": "PRINTPAGERANGE", + "kind": "type", + "in": "CommonDialog", + "vis": "private", + "public": false, + "file": "CommonDialog.cls", + "signature": "Private Type PRINTPAGERANGE", + "fields": [ + {"name":"nFromPage","vis":"public","signature":"nFromPage As Long"}, + {"name":"nToPage","vis":"public","signature":"nToPage As Long"} + ], + "members": [] + }, + { + "name": "RECT", + "kind": "type", + "in": "CommonDialog", + "vis": "private", + "public": false, + "file": "CommonDialog.cls", + "signature": "Private Type RECT", + "fields": [ + {"name":"Left","vis":"public","signature":"Left As Long"}, + {"name":"Top","vis":"public","signature":"Top As Long"}, + {"name":"Right","vis":"public","signature":"Right As Long"}, + {"name":"Bottom","vis":"public","signature":"Bottom As Long"} + ], + "members": [] + }, + { + "name": "TCHOOSECOLOR", + "kind": "type", + "in": "CommonDialog", + "vis": "private", + "public": false, + "file": "CommonDialog.cls", + "signature": "Private Type TCHOOSECOLOR", + "fields": [ + {"name":"lStructSize","vis":"public","signature":"lStructSize As Long"}, + {"name":"hWndOwner","vis":"public","signature":"hWndOwner As LongPtr"}, + {"name":"hInstance","vis":"public","signature":"hInstance As LongPtr"}, + {"name":"RGBResult","vis":"public","signature":"RGBResult As Long"}, + {"name":"lpCustColors","vis":"public","signature":"lpCustColors As LongPtr"}, + {"name":"Flags","vis":"public","signature":"Flags As Long"}, + {"name":"lCustData","vis":"public","signature":"lCustData As LongPtr"}, + {"name":"lpfnHook","vis":"public","signature":"lpfnHook As LongPtr"}, + {"name":"lpTemplateName","vis":"public","signature":"lpTemplateName As LongPtr"} + ], + "members": [] + }, + { + "name": "TCHOOSEFONT", + "kind": "type", + "in": "CommonDialog", + "vis": "private", + "public": false, + "file": "CommonDialog.cls", + "signature": "Private Type TCHOOSEFONT", + "fields": [ + {"name":"lStructSize","vis":"public","signature":"lStructSize As Long"}, + {"name":"hWndOwner","vis":"public","signature":"hWndOwner As LongPtr"}, + {"name":"hDC","vis":"public","signature":"hDC As LongPtr"}, + {"name":"lpLogFont","vis":"public","signature":"lpLogFont As LongPtr"}, + {"name":"iPointSize","vis":"public","signature":"iPointSize As Long"}, + {"name":"Flags","vis":"public","signature":"Flags As Long"}, + {"name":"RGBColor","vis":"public","signature":"RGBColor As Long"}, + {"name":"lCustData","vis":"public","signature":"lCustData As LongPtr"}, + {"name":"lpfnHook","vis":"public","signature":"lpfnHook As LongPtr"}, + {"name":"lpTemplateName","vis":"public","signature":"lpTemplateName As LongPtr"}, + {"name":"hInstance","vis":"public","signature":"hInstance As LongPtr"}, + {"name":"lpszStyle","vis":"public","signature":"lpszStyle As LongPtr"}, + {"name":"nFontType","vis":"public","signature":"nFontType As Integer"}, + {"name":"nSizeMin","vis":"public","signature":"nSizeMin As Long"}, + {"name":"nSizeMax","vis":"public","signature":"nSizeMax As Long"} + ], + "members": [] + }, + { + "name": "CommonDialogBase", + "kind": "module", + "vis": "public", + "file": "CommonDialogBase.bas", + "signature": "Module CommonDialogBase", + "members": [ + {"name":"CallNextHookEx","kind":"function","vis":"private","declare":true,"signatures":[{"cond":"VBA7","signature":"Private Declare PtrSafe Function CallNextHookEx Lib \"user32\" (ByVal hHook As LongPtr, ByVal nCode As Long, ByVal wParam As LongPtr, ByVal lParam As LongPtr) As LongPtr","returnType":"LongPtr"},{"cond":"Not (VBA7)","signature":"Private Declare Function CallNextHookEx Lib \"user32\" (ByVal hHook As Long, ByVal nCode As Long, ByVal wParam As Long, ByVal lParam As Long) As Long","returnType":"Long"}]}, + {"name":"CdlBIFCallbackProc","kind":"function","vis":"public","returnType":"Long","signatures":[{"cond":"VBA7","signature":"Public Function CdlBIFCallbackProc(ByVal hDlg As LongPtr, ByVal wMsg As Long, ByVal lParam As LongPtr, ByVal This As CommonDialog) As Long"},{"cond":"Not (VBA7)","signature":"Public Function CdlBIFCallbackProc(ByVal hDlg As Long, ByVal wMsg As Long, ByVal lParam As Long, ByVal This As CommonDialog) As Long"}]}, + {"name":"CdlCCCallbackProc","kind":"function","vis":"public","signatures":[{"cond":"VBA7","signature":"Public Function CdlCCCallbackProc(ByVal hDlg As LongPtr, ByVal wMsg As Long, ByVal wParam As LongPtr, ByVal lParam As LongPtr) As LongPtr","returnType":"LongPtr"},{"cond":"Not (VBA7)","signature":"Public Function CdlCCCallbackProc(ByVal hDlg As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long","returnType":"Long"}]}, + {"name":"CdlCFCallbackProc","kind":"function","vis":"public","signatures":[{"cond":"VBA7","signature":"Public Function CdlCFCallbackProc(ByVal hDlg As LongPtr, ByVal wMsg As Long, ByVal wParam As LongPtr, ByVal lParam As LongPtr) As LongPtr","returnType":"LongPtr"},{"cond":"Not (VBA7)","signature":"Public Function CdlCFCallbackProc(ByVal hDlg As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long","returnType":"Long"}]}, + {"name":"CdlDefaultProc","kind":"function","vis":"public","signatures":[{"cond":"VBA7","signature":"Public Function CdlDefaultProc(ByVal hWnd As LongPtr, ByVal wMsg As Long, ByVal wParam As LongPtr, ByVal lParam As LongPtr) As LongPtr","returnType":"LongPtr"},{"cond":"Not (VBA7)","signature":"Public Function CdlDefaultProc(ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long","returnType":"Long"}]}, + {"name":"CdlFR1CallbackProc","kind":"function","vis":"public","signatures":[{"cond":"VBA7","signature":"Public Function CdlFR1CallbackProc(ByVal hDlg As LongPtr, ByVal wMsg As Long, ByVal wParam As LongPtr, ByVal lParam As LongPtr) As LongPtr","returnType":"LongPtr"},{"cond":"Not (VBA7)","signature":"Public Function CdlFR1CallbackProc(ByVal hDlg As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long","returnType":"Long"}]}, + {"name":"CdlFR2CallbackProc","kind":"function","vis":"public","signatures":[{"cond":"VBA7","signature":"Public Function CdlFR2CallbackProc(ByVal hDlg As LongPtr, ByVal wMsg As Long, ByVal wParam As LongPtr, ByVal lParam As LongPtr) As LongPtr","returnType":"LongPtr"},{"cond":"Not (VBA7)","signature":"Public Function CdlFR2CallbackProc(ByVal hDlg As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long","returnType":"Long"}]}, + {"name":"CdlFRAddHook","kind":"sub","vis":"public","signatures":[{"cond":"VBA7","signature":"Public Sub CdlFRAddHook(ByVal hDlg As LongPtr)"},{"cond":"Not (VBA7)","signature":"Public Sub CdlFRAddHook(ByVal hDlg As Long)"}]}, + {"name":"CdlFRDialogCount","kind":"field","vis":"private","signature":"Private CdlFRDialogCount As Long"}, + {"name":"CdlFRDialogHandle","kind":"field","vis":"private","signature":"Private CdlFRDialogHandle() As LongPtr"}, + {"name":"CdlFRHookHandle","kind":"field","vis":"private","signature":"Private CdlFRHookHandle As LongPtr"}, + {"name":"CdlFRHookProc","kind":"function","vis":"private","signature":"Private Function CdlFRHookProc(ByVal nCode As Long, ByVal wParam As LongPtr, ByVal lParam As LongPtr) As LongPtr","returnType":"LongPtr"}, + {"name":"CdlFRReleaseHook","kind":"sub","vis":"public","signatures":[{"cond":"VBA7","signature":"Public Sub CdlFRReleaseHook(ByVal hDlg As LongPtr)"},{"cond":"Not (VBA7)","signature":"Public Sub CdlFRReleaseHook(ByVal hDlg As Long)"}]}, + {"name":"CdlOFN1CallbackProc","kind":"function","vis":"public","signatures":[{"cond":"VBA7","signature":"Public Function CdlOFN1CallbackProc(ByVal hDlg As LongPtr, ByVal wMsg As Long, ByVal wParam As LongPtr, ByVal lParam As LongPtr) As LongPtr","returnType":"LongPtr"},{"cond":"Not (VBA7)","signature":"Public Function CdlOFN1CallbackProc(ByVal hDlg As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long","returnType":"Long"}]}, + {"name":"CdlOFN1CallbackProcOldStyle","kind":"function","vis":"public","signatures":[{"cond":"VBA7","signature":"Public Function CdlOFN1CallbackProcOldStyle(ByVal hDlg As LongPtr, ByVal wMsg As Long, ByVal wParam As LongPtr, ByVal lParam As LongPtr) As LongPtr","returnType":"LongPtr"},{"cond":"Not (VBA7)","signature":"Public Function CdlOFN1CallbackProcOldStyle(ByVal hDlg As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long","returnType":"Long"}]}, + {"name":"CdlOFN2CallbackProc","kind":"function","vis":"public","signatures":[{"cond":"VBA7","signature":"Public Function CdlOFN2CallbackProc(ByVal hDlg As LongPtr, ByVal wMsg As Long, ByVal wParam As LongPtr, ByVal lParam As LongPtr) As LongPtr","returnType":"LongPtr"},{"cond":"Not (VBA7)","signature":"Public Function CdlOFN2CallbackProc(ByVal hDlg As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long","returnType":"Long"}]}, + {"name":"CdlOFN2CallbackProcOldStyle","kind":"function","vis":"public","signatures":[{"cond":"VBA7","signature":"Public Function CdlOFN2CallbackProcOldStyle(ByVal hDlg As LongPtr, ByVal wMsg As Long, ByVal wParam As LongPtr, ByVal lParam As LongPtr) As LongPtr","returnType":"LongPtr"},{"cond":"Not (VBA7)","signature":"Public Function CdlOFN2CallbackProcOldStyle(ByVal hDlg As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long","returnType":"Long"}]}, + {"name":"CdlPDCallbackProc","kind":"function","vis":"public","signatures":[{"cond":"VBA7","signature":"Public Function CdlPDCallbackProc(ByVal hDlg As LongPtr, ByVal wMsg As Long, ByVal wParam As LongPtr, ByVal lParam As LongPtr) As LongPtr","returnType":"LongPtr"},{"cond":"Not (VBA7)","signature":"Public Function CdlPDCallbackProc(ByVal hDlg As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long","returnType":"Long"}]}, + {"name":"CdlPDEXCallbackPtr","kind":"function","vis":"public","signatures":[{"cond":"VBA7","signature":"Public Function CdlPDEXCallbackPtr(ByVal This As CommonDialog) As LongPtr","returnType":"LongPtr"},{"cond":"Not (VBA7)","signature":"Public Function CdlPDEXCallbackPtr(ByVal This As CommonDialog) As Long","returnType":"Long"}]}, + {"name":"CdlPDEXVTableIPDCB","kind":"field","vis":"private","signature":"Private CdlPDEXVTableIPDCB(0 To 5) As LongPtr"}, + {"name":"CdlPSDCallbackProc","kind":"function","vis":"public","signatures":[{"cond":"VBA7","signature":"Public Function CdlPSDCallbackProc(ByVal hDlg As LongPtr, ByVal wMsg As Long, ByVal wParam As LongPtr, ByVal lParam As LongPtr) As LongPtr","returnType":"LongPtr"},{"cond":"Not (VBA7)","signature":"Public Function CdlPSDCallbackProc(ByVal hDlg As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long","returnType":"Long"}]}, + {"name":"CdlRemoveSubclass","kind":"sub","vis":"public","signatures":[{"cond":"VBA7","signature":"Public Sub CdlRemoveSubclass(ByVal hWnd As LongPtr, Optional ByVal Name As String)"},{"cond":"Not (VBA7)","signature":"Public Sub CdlRemoveSubclass(ByVal hWnd As Long, Optional ByVal Name As String)"}]}, + {"name":"CdlSetSubclass","kind":"sub","vis":"public","signatures":[{"cond":"VBA7","signature":"Public Sub CdlSetSubclass(ByVal hWnd As LongPtr, ByVal This As CommonDialog, ByVal dwRefData As LongPtr, Optional ByVal Name As String)"},{"cond":"Not (VBA7)","signature":"Public Sub CdlSetSubclass(ByVal hWnd As Long, ByVal This As CommonDialog, ByVal dwRefData As Long, Optional ByVal Name As String)"}]}, + {"name":"CdlSubclassProc","kind":"function","vis":"public","signatures":[{"cond":"VBA7","signature":"Public Function CdlSubclassProc(ByVal hWnd As LongPtr, ByVal wMsg As Long, ByVal wParam As LongPtr, ByVal lParam As LongPtr, ByVal uIdSubclass As LongPtr, ByVal dwRefData As LongPtr) As LongPtr","returnType":"LongPtr"},{"cond":"Not (VBA7)","signature":"Public Function CdlSubclassProc(ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long, ByVal uIdSubclass As Long, ByVal dwRefData As Long) As Long","returnType":"Long"}]}, + {"name":"CdlSubclassProcPtr","kind":"field","vis":"private","signature":"Private CdlSubclassProcPtr As LongPtr"}, + {"name":"CoTaskMemAlloc","kind":"function","vis":"private","declare":true,"signatures":[{"cond":"VBA7","signature":"Private Declare PtrSafe Function CoTaskMemAlloc Lib \"ole32\" (ByVal cBytes As Long) As LongPtr","returnType":"LongPtr"},{"cond":"Not (VBA7)","signature":"Private Declare Function CoTaskMemAlloc Lib \"ole32\" (ByVal cBytes As Long) As Long","returnType":"Long"}]}, + {"name":"CoTaskMemFree","kind":"sub","vis":"private","declare":true,"signatures":[{"cond":"VBA7","signature":"Private Declare PtrSafe Sub CoTaskMemFree Lib \"ole32\" (ByVal hMem As LongPtr)"},{"cond":"Not (VBA7)","signature":"Private Declare Sub CoTaskMemFree Lib \"ole32\" (ByVal hMem As Long)"}]}, + {"name":"CopyMemory","kind":"sub","vis":"private","declare":true,"signatures":[{"cond":"VBA7","signature":"Private Declare PtrSafe Sub CopyMemory Lib \"kernel32\" Alias \"RtlMoveMemory\" (ByRef Destination As Any, ByRef Source As Any, ByVal Length As Long)"},{"cond":"Not (VBA7)","signature":"Private Declare Sub CopyMemory Lib \"kernel32\" Alias \"RtlMoveMemory\" (ByRef Destination As Any, ByRef Source As Any, ByVal Length As Long)"}]}, + {"name":"DefSubclassProc","kind":"function","vis":"private","declare":true,"signatures":[{"cond":"VBA7","signature":"Private Declare PtrSafe Function DefSubclassProc Lib \"comctl32\" (ByVal hWnd As LongPtr, ByVal wMsg As Long, ByVal wParam As LongPtr, ByVal lParam As LongPtr) As LongPtr","returnType":"LongPtr"},{"cond":"Not (VBA7)","signature":"Private Declare Function DefSubclassProc Lib \"comctl32\" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long","returnType":"Long"}]}, + {"name":"E_NOINTERFACE","kind":"const","vis":"private","signature":"Private Const E_NOINTERFACE As Long = &H80004002"}, + {"name":"E_POINTER","kind":"const","vis":"private","signature":"Private Const E_POINTER As Long = &H80004003"}, + {"name":"GetProp","kind":"function","vis":"private","declare":true,"signatures":[{"cond":"VBA7","signature":"Private Declare PtrSafe Function GetProp Lib \"user32\" Alias \"GetPropW\" (ByVal hWnd As LongPtr, ByVal lpString As LongPtr) As LongPtr","returnType":"LongPtr"},{"cond":"Not (VBA7)","signature":"Private Declare Function GetProp Lib \"user32\" Alias \"GetPropW\" (ByVal hWnd As Long, ByVal lpString As Long) As Long","returnType":"Long"}]}, + {"name":"GetVTableIPDCB","kind":"function","vis":"private","signature":"Private Function GetVTableIPDCB() As LongPtr","returnType":"LongPtr"}, + {"name":"IPDCB_AddRef","kind":"function","vis":"private","signature":"Private Function IPDCB_AddRef(ByVal Ptr As LongPtr) As Long","returnType":"Long"}, + {"name":"IPDCB_HandleMessage","kind":"function","vis":"private","signature":"Private Function IPDCB_HandleMessage(ByVal Ptr As LongPtr, ByVal hDlg As LongPtr, ByVal wMsg As Long, ByVal wParam As LongPtr, ByVal lParam As LongPtr, ByRef Result As LongPtr) As Long","returnType":"Long"}, + {"name":"IPDCB_InitDone","kind":"function","vis":"private","signature":"Private Function IPDCB_InitDone(ByVal Ptr As LongPtr) As Long","returnType":"Long"}, + {"name":"IPDCB_QueryInterface","kind":"function","vis":"private","signature":"Private Function IPDCB_QueryInterface(ByVal Ptr As LongPtr, ByRef IID As CLSID, ByRef pvObj As LongPtr) As Long","returnType":"Long"}, + {"name":"IPDCB_Release","kind":"function","vis":"private","signature":"Private Function IPDCB_Release(ByVal Ptr As LongPtr) As Long","returnType":"Long"}, + {"name":"IPDCB_SelectionChange","kind":"function","vis":"private","signature":"Private Function IPDCB_SelectionChange(ByVal Ptr As LongPtr) As Long","returnType":"Long"}, + {"name":"IsDialogMessage","kind":"function","vis":"private","declare":true,"returnType":"Long","signatures":[{"cond":"VBA7","signature":"Private Declare PtrSafe Function IsDialogMessage Lib \"user32\" Alias \"IsDialogMessageW\" (ByVal hDlg As LongPtr, ByRef lpMsg As TMSG) As Long"},{"cond":"Not (VBA7)","signature":"Private Declare Function IsDialogMessage Lib \"user32\" Alias \"IsDialogMessageW\" (ByVal hDlg As Long, ByRef lpMsg As TMSG) As Long"}]}, + {"name":"NULL_PTR","kind":"const","vis":"private","signatures":[{"cond":"Win64","signature":"Private Const NULL_PTR As LongPtr = 0"},{"cond":"Not (Win64)","signature":"Private Const NULL_PTR As Long = 0"}]}, + {"name":"PTR_SIZE","kind":"const","vis":"private","signatures":[{"cond":"Win64","signature":"Private Const PTR_SIZE As Long = 8"},{"cond":"Not (Win64)","signature":"Private Const PTR_SIZE As Long = 4"}]}, + {"name":"ProcPtr","kind":"function","vis":"private","signature":"Private Function ProcPtr(ByVal Address As LongPtr) As LongPtr","returnType":"LongPtr"}, + {"name":"PtrToObj","kind":"function","vis":"private","signature":"Private Function PtrToObj(ByVal ObjectPointer As LongPtr) As Object","returnType":"Object"}, + {"name":"RemoveProp","kind":"function","vis":"private","declare":true,"signatures":[{"cond":"VBA7","signature":"Private Declare PtrSafe Function RemoveProp Lib \"user32\" Alias \"RemovePropW\" (ByVal hWnd As LongPtr, ByVal lpString As LongPtr) As LongPtr","returnType":"LongPtr"},{"cond":"Not (VBA7)","signature":"Private Declare Function RemoveProp Lib \"user32\" Alias \"RemovePropW\" (ByVal hWnd As Long, ByVal lpString As Long) As Long","returnType":"Long"}]}, + {"name":"RemoveWindowSubclass","kind":"function","vis":"private","declare":true,"returnType":"Long","signatures":[{"cond":"VBA7","signature":"Private Declare PtrSafe Function RemoveWindowSubclass Lib \"comctl32\" (ByVal hWnd As LongPtr, ByVal pfnSubclass As LongPtr, ByVal uIdSubclass As LongPtr) As Long"},{"cond":"Not (VBA7)","signature":"Private Declare Function RemoveWindowSubclass Lib \"comctl32\" (ByVal hWnd As Long, ByVal pfnSubclass As Long, ByVal uIdSubclass As Long) As Long"}]}, + {"name":"S_FALSE","kind":"const","vis":"private","signature":"Private Const S_FALSE As Long = &H1"}, + {"name":"S_OK","kind":"const","vis":"private","signature":"Private Const S_OK As Long = &H0"}, + {"name":"SetProp","kind":"function","vis":"private","declare":true,"returnType":"Long","signatures":[{"cond":"VBA7","signature":"Private Declare PtrSafe Function SetProp Lib \"user32\" Alias \"SetPropW\" (ByVal hWnd As LongPtr, ByVal lpString As LongPtr, ByVal hData As LongPtr) As Long"},{"cond":"Not (VBA7)","signature":"Private Declare Function SetProp Lib \"user32\" Alias \"SetPropW\" (ByVal hWnd As Long, ByVal lpString As Long, ByVal hData As Long) As Long"}]}, + {"name":"SetWindowSubclass","kind":"function","vis":"private","declare":true,"returnType":"Long","signatures":[{"cond":"VBA7","signature":"Private Declare PtrSafe Function SetWindowSubclass Lib \"comctl32\" (ByVal hWnd As LongPtr, ByVal pfnSubclass As LongPtr, ByVal uIdSubclass As LongPtr, ByVal dwRefData As LongPtr) As Long"},{"cond":"Not (VBA7)","signature":"Private Declare Function SetWindowSubclass Lib \"comctl32\" (ByVal hWnd As Long, ByVal pfnSubclass As Long, ByVal uIdSubclass As Long, ByVal dwRefData As Long) As Long"}]}, + {"name":"SetWindowsHookEx","kind":"function","vis":"private","declare":true,"signatures":[{"cond":"VBA7","signature":"Private Declare PtrSafe Function SetWindowsHookEx Lib \"user32\" Alias \"SetWindowsHookExW\" (ByVal IDHook As Long, ByVal lpfn As LongPtr, ByVal hMod As LongPtr, ByVal dwThreadID As Long) As LongPtr","returnType":"LongPtr"},{"cond":"Not (VBA7)","signature":"Private Declare Function SetWindowsHookEx Lib \"user32\" Alias \"SetWindowsHookExW\" (ByVal IDHook As Long, ByVal lpfn As Long, ByVal hMod As Long, ByVal dwThreadID As Long) As Long","returnType":"Long"}]}, + {"name":"UnhookWindowsHookEx","kind":"function","vis":"private","declare":true,"returnType":"Long","signatures":[{"cond":"VBA7","signature":"Private Declare PtrSafe Function UnhookWindowsHookEx Lib \"user32\" (ByVal hHook As LongPtr) As Long"},{"cond":"Not (VBA7)","signature":"Private Declare Function UnhookWindowsHookEx Lib \"user32\" (ByVal hHook As Long) As Long"}]}, + {"name":"UnsignedAdd","kind":"function","vis":"private","signature":"Private Function UnsignedAdd(ByVal Start As LongPtr, ByVal Incr As LongPtr) As LongPtr","returnType":"LongPtr"}, + {"name":"WM_DESTROY","kind":"const","vis":"private","signature":"Private Const WM_DESTROY As Long = &H2"}, + {"name":"WM_INITDIALOG","kind":"const","vis":"private","signature":"Private Const WM_INITDIALOG As Long = &H110"}, + {"name":"WM_NCDESTROY","kind":"const","vis":"private","signature":"Private Const WM_NCDESTROY As Long = &H82"}, + {"name":"WM_UAHDESTROYWINDOW","kind":"const","vis":"private","signature":"Private Const WM_UAHDESTROYWINDOW As Long = &H90"} + ] + }, + { + "name": "CLSID", + "kind": "type", + "in": "CommonDialogBase", + "vis": "private", + "public": false, + "file": "CommonDialogBase.bas", + "signature": "Private Type CLSID", + "fields": [ + {"name":"Data1","vis":"public","signature":"Data1 As Long"}, + {"name":"Data2","vis":"public","signature":"Data2 As Integer"}, + {"name":"Data3","vis":"public","signature":"Data3 As Integer"}, + {"name":"Data4","vis":"public","signature":"Data4(0 To 7) As Byte"} + ], + "members": [] + }, + { + "name": "LongPtr", + "kind": "enum", + "in": "CommonDialogBase", + "vis": "private", + "public": false, + "file": "CommonDialogBase.bas", + "signature": "Private Enum LongPtr", + "values": [ + {"name":"_"} + ] + }, + { + "name": "POINTAPI", + "kind": "type", + "in": "CommonDialogBase", + "vis": "private", + "public": false, + "file": "CommonDialogBase.bas", + "signature": "Private Type POINTAPI", + "fields": [ + {"name":"X","vis":"public","signature":"X As Long"}, + {"name":"Y","vis":"public","signature":"Y As Long"} + ], + "members": [] + }, + { + "name": "TMSG", + "kind": "type", + "in": "CommonDialogBase", + "vis": "private", + "public": false, + "file": "CommonDialogBase.bas", + "signature": "Private Type TMSG", + "fields": [ + {"name":"hWnd","vis":"public","signature":"hWnd As LongPtr"}, + {"name":"Message","vis":"public","signature":"Message As Long"}, + {"name":"wParam","vis":"public","signature":"wParam As LongPtr"}, + {"name":"lParam","vis":"public","signature":"lParam As LongPtr"}, + {"name":"Time","vis":"public","signature":"Time As Long"}, + {"name":"PT","vis":"public","signature":"PT As POINTAPI"} + ], + "members": [] + }, + { + "name": "VTablePDEXCallbackDataStruct", + "kind": "type", + "in": "CommonDialogBase", + "vis": "private", + "public": false, + "file": "CommonDialogBase.bas", + "signature": "Private Type VTablePDEXCallbackDataStruct", + "fields": [ + {"name":"VTable","vis":"public","signature":"VTable As LongPtr"}, + {"name":"RefCount","vis":"public","signature":"RefCount As Long"}, + {"name":"ObjectPointer","vis":"public","signature":"ObjectPointer As LongPtr"} + ], + "members": [] + } + ], + "aliases": [], + "problems": [] +} diff --git a/indexer/snapshots/contributed/WinReg/api.json b/indexer/snapshots/contributed/WinReg/api.json new file mode 100644 index 000000000..a96db6201 --- /dev/null +++ b/indexer/snapshots/contributed/WinReg/api.json @@ -0,0 +1,33 @@ +{ + "format": 3, + "package": "WinReg", + "project": "WinReg", + "version": "0.0.0.0", + "types": [ + { + "name": "RegCls", + "kind": "class", + "vis": "public", + "file": "RegCls.twin", + "signature": "Class RegCls", + "members": [ + {"name":"ConvertValueToString","kind":"function","vis":"public","signature":"Function ConvertValueToString(ByVal hKey As Long, ByVal subkey As String, ByVal lType As Long) As String","returnType":"String"}, + {"name":"ConvertValueToString","kind":"function","vis":"public","signature":"Function ConvertValueToString(buf() As Byte, ByVal lType As Long) As String","returnType":"String"}, + {"name":"CreateKey","kind":"function","vis":"public","signature":"Public Function CreateKey(ByVal RootKey As RegKeyspace, ByVal KeyPath As String) As BOOL","returnType":"BOOL"}, + {"name":"DeleteKey","kind":"function","vis":"public","signature":"Public Function DeleteKey(ByVal RootKey As RegKeyspace, ByVal KeyPath As String) As BOOL","returnType":"BOOL"}, + {"name":"DeleteKeyEx","kind":"function","vis":"public","signature":"Public Function DeleteKeyEx(ByVal RootKey As RegKeyspace, ByVal KeyPath As String) As BOOL","returnType":"BOOL"}, + {"name":"DeleteValue","kind":"function","vis":"public","signature":"Public Function DeleteValue(ByVal RootKey As RegKeyspace, ByVal KeyPath As String, ByVal ValueName As String) As BOOL","returnType":"BOOL"}, + {"name":"EnumValues","kind":"function","vis":"public","signature":"Public Function EnumValues(ByVal RootKey As Long, ByVal KeyPath As String) As Dictionary","returnType":"Dictionary"}, + {"name":"GetRegistryValueType","kind":"function","vis":"public","signature":"Function GetRegistryValueType(ByVal hKey As Long, ByVal subKey As String, ByVal valueName As String) As REGTYPES","returnType":"REGTYPES"}, + {"name":"KeyExists","kind":"function","vis":"public","signature":"Public Function KeyExists(ByVal RootKey As RegKeyspace, ByVal KeyPath As String) As Boolean","returnType":"Boolean"}, + {"name":"ReadDWORD","kind":"function","vis":"public","signature":"Public Function ReadDWORD(ByVal RootKey As RegKeyspace, ByVal KeyPath As String, ByVal ValueName As String, Optional DefaultValue As Long = -1) As Long","returnType":"Long"}, + {"name":"ReadString","kind":"function","vis":"public","signature":"Public Function ReadString(ByVal RootKey As RegKeyspace, ByVal KeyPath As String, ByVal ValueName As String, Optional DefaultValue As String = \"\") As String","returnType":"String"}, + {"name":"ValueExists","kind":"function","vis":"public","signature":"Public Function ValueExists(ByVal RootKey As RegKeyspace, ByVal KeyPath As String, ByVal ValueName As String) As Boolean","returnType":"Boolean"}, + {"name":"WriteDWORD","kind":"function","vis":"public","signature":"Public Function WriteDWORD(ByVal RootKey As RegKeyspace, ByVal KeyPath As String, ByVal ValueName As String, ByVal ValueData As Long) As BOOL","returnType":"BOOL"}, + {"name":"WriteString","kind":"function","vis":"public","signature":"Public Function WriteString(ByVal RootKey As RegKeyspace, ByVal KeyPath As String, ByVal ValueName As String, ByVal ValueData As String) As BOOL","returnType":"BOOL"} + ] + } + ], + "aliases": [], + "problems": [] +} diff --git a/indexer/twin-index.mjs b/indexer/twin-index.mjs index 83dfe07fa..babeb7d14 100644 --- a/indexer/twin-index.mjs +++ b/indexer/twin-index.mjs @@ -32,8 +32,9 @@ import { } from "./lib/store.mjs"; import { indexerFingerprint } from "./lib/fingerprint.mjs"; import { diffApi, auditCoverage } from "./lib/differ.mjs"; -import { documentedPackages } from "./lib/doc-pages.mjs"; +import { documentedPackages, groupFolder, sectionPages } from "./lib/doc-pages.mjs"; import { derivePackageApi } from "./lib/package-api.mjs"; +import { batchTasks, newLandingFor, planPackage } from "./lib/draft-plan.mjs"; exitOnCrash(); @@ -142,7 +143,7 @@ async function walkDir(dir) { // --- CLI --- -const COMMANDS = ["sync", "analyze", "derive"]; +const COMMANDS = ["sync", "analyze", "draft", "derive"]; const USAGE = `Usage: node indexer/twin-index.mjs [options] @@ -152,6 +153,8 @@ documentation still has to say about them. Commands: sync Read packages, extract sources, generate api.json snapshots analyze Diff API snapshots against documented baseline + draft Place the pages analyze's report asks for: the file of each, its + parent and its permalink, in indexer/.packages/draft/ derive Write builder/package-api.json, the package half of the symbol index, from the built-in and default packages @@ -162,7 +165,8 @@ needs no sync first. analyze covers the packages the reference documents, those with a section in docs/Reference (a landing page, index.md), and no others: --package or --packages names the ones to analyze, documented or not, and --all takes every -package in the store. +package in the store. draft reads the report analyze wrote last, and places +the pages of its packages, or of those --package or --packages names. Options: --package Process only the specified package @@ -183,13 +187,15 @@ Options: Exit codes: 0 the command finished: sync wrote every package it was asked for, or found - it up to date; analyze wrote its report; derive wrote the file, or with - --check found it up to date + it up to date; analyze wrote its report; draft placed its pages; derive + wrote the file, or with --check found it up to date 1 a package named by --package or --packages failed to sync, or does not - exist; the others were done; with derive --check, the file is stale + exist, or is not in the report (draft); the others were done; with + derive --check, the file is stale 2 a refused command line, no twinBASIC install found, no snapshots to - analyze (run sync first), packages that declare different APIs under one - project name (derive), or a crash + analyze (run sync first), no report to draft from (run analyze first), + packages that declare different APIs under one project name (derive), or + a crash `; // The twinBASIC install the built-in and default packages are read from, as @@ -282,8 +288,8 @@ withUsageError(() => { const applies = { ide: ["sync", "derive"], release: ["sync", "derive"], - package: ["sync", "analyze"], - packages: ["sync", "analyze"], + package: ["sync", "analyze", "draft"], + packages: ["sync", "analyze", "draft"], check: ["derive"], out: ["derive"], }; @@ -303,6 +309,9 @@ switch (command) { case "analyze": process.exitCode = await runAnalyze(cli.filter, cli.values.all); break; + case "draft": + process.exitCode = await runDraft(cli.filter); + break; case "derive": { const install = cli.values.release ? null : (cli.install ?? withUsageError(() => resolveInstall())); process.exitCode = await runDerive(install, { check: cli.values.check, out: cli.values.out }); @@ -774,6 +783,102 @@ async function analyzeAudit(name, group, current, docsDir, exclusions) { }; } +// --- draft command --- + +// Places the pages of the report analyze wrote last. indexer/.packages/draft/, +// emptied first, gets the plan of each package (`.json`), a file for +// each batch of pages one agent of the doc-draft workflow writes +// (`batch-.json`), and `manifest.json`, which lists them and is what the +// workflow is given. +async function runDraft(filter) { + let reports; + try { + reports = JSON.parse(await fs.readFile(path.join(STORE_PATH, "report.json"), "utf-8")); + } catch { + die(2, "No report to draft from. Run analyze first."); + } + const chosen = filter ? reports.filter((r) => filter.includes(r.package)) : reports; + const documented = await documentedPackages(DOCS_REF_DIR); + const outDir = path.join(STORE_PATH, "draft"); + await fs.rm(outDir, { recursive: true, force: true }); + await fs.mkdir(outDir, { recursive: true }); + const rel = (p) => path.relative(REPO_ROOT, p).split(path.sep).join("/"); + const writeJson = (file, value) => fs.writeFile(file, `${JSON.stringify(value, null, 2)}\n`); + + const manifest = { packages: [] }; + let batchNo = 0; + for (const report of chosen) { + // A package with no section yet gets one in its group's folder, by its name, + // with a landing page like those of the group's other sections. + const section = documented.get(`${report.group}/${report.package}`); + const groupDir = path.join(DOCS_REF_DIR, groupFolder(report.group)); + const sectionDir = section?.dir ?? path.join(groupDir, report.package); + let newLanding = null; + if (!section) { + const siblings = []; + for (const dir of new Set([...documented.values()].map((s) => s.dir))) { + if (path.dirname(dir) !== groupDir) continue; + const landing = (await sectionPages(dir)).find((p) => p.rel === "index.md"); + if (landing) siblings.push({ folder: path.basename(dir), ...landing }); + } + newLanding = newLandingFor(report.package, siblings); + // A contributed package's landing page opens with its author: the publisher TWINSERV lists. + if (report.group === "contributed") { + const listed = Object.values((await readManifest("contributed"))?.packages ?? {}); + newLanding.author = listed.find((p) => p.symbol === report.package)?.publisher ?? null; + } + } + const storeDir = path.join(STORE_PATH, report.group, report.package); + const api = JSON.parse(await fs.readFile(path.join(storeDir, "api.json"), "utf-8")); + const plan = planPackage({ + report, + api, + pages: await sectionPages(sectionDir), + sectionDir: rel(sectionDir), + sourceDir: rel(path.join(storeDir, "sources")), + newLanding, + }); + const planFile = path.join(outDir, `${report.package}.json`); + await writeJson(planFile, plan); + + const batches = []; + for (const batch of batchTasks(plan)) { + const file = path.join(outDir, `batch-${batchNo++}.json`); + const { package: name, sectionDir: dir, landing, permalinks } = plan; + await writeJson(file, { package: name, sectionDir: dir, landing, permalinks, ...batch }); + batches.push({ file: rel(file), container: batch.container, pages: batch.tasks.length }); + } + manifest.packages.push({ + package: plan.package, + group: plan.group, + mode: plan.mode, + version: plan.version, + sectionDir: plan.sectionDir, + landing: plan.landing, + plan: rel(planFile), + batches, + unplaced: plan.unplaced.length, + flagged: plan.flagged.length, + }); + + const created = plan.tasks.filter((t) => t.new).length; + console.log( + `${plan.package}: ${created} page(s) to write, ${plan.tasks.length - created} to change, in ${batches.length} batch(es)`, + ); + for (const t of plan.unplaced) + console.log(` unplaced: ${t.kind} ${t.container ? `${t.container}.` : ""}${t.symbol} (${t.reason})`); + for (const t of plan.flagged) + console.log(` no longer declared: ${t.kind} ${t.symbol}${t.file ? ` (${t.file})` : ""}`); + } + const manifestFile = path.join(outDir, "manifest.json"); + await writeJson(manifestFile, manifest); + console.log(`\nPlan written to ${rel(outDir)}/; the workflow takes ${rel(manifestFile)}`); + + const missing = (filter ?? []).filter((name) => !chosen.some((r) => r.package === name)); + for (const name of missing) console.warn(` The report has no package named ${name}`); + return missing.length ? 1 : 0; +} + // --- derive command --- // Writes builder/package-api.json from every built-in and default package of the diff --git a/scripts/check_examples.mjs b/scripts/check_examples.mjs index 9f5f23051..6f62a447b 100644 --- a/scripts/check_examples.mjs +++ b/scripts/check_examples.mjs @@ -75,7 +75,16 @@ // and the rest without it, a crash that names none bisects, O(log n) builds, and // one that needs several samples at once is reported with all of them. -import { cpSync, mkdirSync, promises as fs, readdirSync, readFileSync, rmSync, writeFileSync } from "node:fs"; +import { + cpSync, + existsSync, + mkdirSync, + promises as fs, + readdirSync, + readFileSync, + rmSync, + writeFileSync, +} from "node:fs"; import { tmpdir } from "node:os"; import path from "node:path"; @@ -111,13 +120,16 @@ import { canaryProblem, crashedIn, diagKind, + embeddedPackages, joinConcatGroups, makeBatches, runBatch, runProbes, sectionOf, + splitPackageFaults, templateChain, templateResolves, + templateSettingsPath, unresolvedName, } from "./lib/example-batches.mjs"; import { @@ -135,7 +147,8 @@ import { import { compileProject } from "./lib/tb-build.mjs"; import { wantShow } from "./lib/tb-ide.mjs"; import { buildNumber, findIde } from "./lib/tb-install.mjs"; -import { packTree } from "./lib/tb-project.mjs"; +import { packTree, unpackProject } from "./lib/tb-project.mjs"; +import { downloadPackage } from "../indexer/lib/twinserv-client.mjs"; import { finishTidy, startTidy } from "./lib/tb-registry.mjs"; import { DOCS_DIR, REPO_ROOT } from "../lib/repo-paths.mjs"; @@ -276,6 +289,10 @@ function defaultProject(rel) { if (/^(Tutorials|Reference\/Built-In)\/CEF\//.test(rel)) return "cef"; if (/^(Tutorials|Reference\/Built-In)\/WebView2\//.test(rel)) return "webview2"; if (/^Reference\/Built-In\//.test(rel)) return "packages"; + // A contributed package's page: a project referencing that package alone, + // embedded in it (fetchEmbedded). + const contributed = /^Reference\/Contributed\/([^/]+)\//.exec(rel); + if (contributed) return `contributed-${contributed[1]}`; // A tutorial about a package needs that package. Most are a folder named // after one; Testing-with-Assert is a single file, so it is named here. if (/^Tutorials\/CustomControls\//.test(rel)) return "packages"; @@ -512,6 +529,38 @@ function checkGroups(all, selected) { let stageCounter = 0; +// The packages a template embeds (embeddedPackages): downloaded from TWINSERV +// once for each version and unpacked into a cache outside the repository, which +// stageBatch copies into each batch's Packages/ folder. A download needs the +// network the first time only; a version is never downloaded again. +const TWINSERV_CACHE = path.join(tmpdir(), "tb-twinserv"); +const embeddedOf = new Map(); // template name -> its embedded packages + +async function fetchEmbedded(templates) { + for (const name of templates) { + const settingsPath = templateSettingsPath(TEMPLATES, name); + const list = settingsPath ? embeddedPackages(JSON.parse(readFileSync(settingsPath, "utf8"))) : []; + for (const p of list) { + const tree = path.join(TWINSERV_CACHE, p.key); + if (existsSync(path.join(tree, "Settings"))) continue; + const file = `${tree}.twinpack`; + if (!existsSync(file)) { + say(`check_examples: downloading ${p.folder} (${p.key}) from TWINSERV`); + let bytes; + try { + bytes = await downloadPackage(p.id, p.version); + } catch (e) { + throw new Error(`cannot download ${p.folder} for the ${name} template from TWINSERV: ${e.message}`); + } + mkdirSync(TWINSERV_CACHE, { recursive: true }); + writeFileSync(file, bytes); + } + unpackProject(file, tree); + } + embeddedOf.set(name, list); + } +} + /** Stage a batch into its own tree, pack it, and return the .twinproj path. */ function stageBatch(batch, work) { const index = stageCounter++; @@ -522,6 +571,9 @@ function stageBatch(batch, work) { for (const name of templateChain(batch.project)) { cpSync(path.join(TEMPLATES, name), dir, { recursive: true }); } + for (const p of embeddedOf.get(batch.project) ?? []) { + cpSync(path.join(TWINSERV_CACHE, p.key), path.join(dir, "Packages", p.folder), { recursive: true }); + } // The sample brings the project's Main (see makeBatches' `alone`). if (batch.noMain) rmSync(path.join(dir, "Sources", "tbxMain.twin"), { force: true }); @@ -1063,6 +1115,7 @@ async function main() { process.exit(2); } mkdirSync(work, { recursive: true }); + await fetchEmbedded(new Set(batches.map((b) => b.project))); const staged = selected.length - samples.length; say( @@ -1177,10 +1230,18 @@ async function main() { }); } - if (templateFaults.length) { + // A row inside a package a template embeds is the package's (splitPackageFaults). + const embeddedFolders = new Set([...embeddedOf.values()].flat().map((p) => p.folder)); + const { byPackage, own: ownFaults } = splitPackageFaults([...new Set(templateFaults)], embeddedFolders); + for (const [folder, rows] of byPackage) { + say(`\nnote the embedded package ${folder} does not compile on this build: ${rows.length} error(s)`); + say(" in its own source, which no sample is blamed for and which fail nothing:"); + for (const row of rows.slice(0, 5)) say(` ${row}`); + } + if (ownFaults.length) { say("\nFAIL diagnostics no sample can be blamed for -- rows the template"); say(" produces with nothing in it, or rows in a shape this cannot read:"); - for (const row of [...new Set(templateFaults)].slice(0, 10)) say(` ${row}`); + for (const row of ownFaults.slice(0, 10)) say(` ${row}`); } if (MODE_PROPOSE) { @@ -1203,7 +1264,7 @@ async function main() { // A broken template fails the run. It is not a finding against any one page, // so it would otherwise print and be ignored -- which is the worst outcome, // because a template that does not compile makes every sample in it fail. - const real = findings.filter((f) => !f.advisory).length + (templateFaults.length ? 1 : 0); + const real = findings.filter((f) => !f.advisory).length + (ownFaults.length ? 1 : 0); if (AS_JSON) { console.log(JSON.stringify({ selected: samples.length, passed: passed.length, findings }, null, 2)); } else { diff --git a/scripts/check_regex_safety.mjs b/scripts/check_regex_safety.mjs index 8b6bade59..27ea39092 100644 --- a/scripts/check_regex_safety.mjs +++ b/scripts/check_regex_safety.mjs @@ -304,7 +304,8 @@ async function extractRegexes() { for (const rel of files) { const src = await readFile(path.join(REPO_ROOT, rel), "utf8"); try { - // allowReturnOutsideFunction: wisdom/extract/workflow.mjs has a + // allowReturnOutsideFunction: the Workflow scripts, + // wisdom/extract/workflow.mjs and indexer/draft/workflow.mjs, have a // top-level return. A file skipped because it would not parse is // a file whose regexes are never checked, which is the exact // failure mode this gate exists to prevent -- so collect it and diff --git a/scripts/lib/cli-cases.mjs b/scripts/lib/cli-cases.mjs index bd9dff8d8..87cb0807e 100644 --- a/scripts/lib/cli-cases.mjs +++ b/scripts/lib/cli-cases.mjs @@ -996,6 +996,12 @@ bad("eval/nav_hops.mjs", ["Reference", "[a-"], REGEX_REASON("", "[a-" bad(tool, ["derive", "--check", "--all"], "--all does not apply to derive\n"); bad(tool, ["derive", "--check", "--out"], "--out needs a value\n"); bad(tool, ["derive", "--check=1"], "--check takes no value\n"); + // draft places the pages of the report analyze wrote, for the packages in it; + // if one of these refusals stopped firing, it would rewrite only the store's + // own indexer/.packages/draft/. + bad(tool, ["draft", "--all"], "--all does not apply to draft\n"); + bad(tool, ["draft", "--release"], "--release does not apply to draft\n"); + bad(tool, ["draft", "--check"], "--check does not apply to draft\n"); bad(tool, ["analyze", "--check"], "--check does not apply to analyze\n"); bad(tool, ["analyze", "--out", "x.json"], "--out does not apply to analyze\n"); } diff --git a/scripts/lib/example-batches.mjs b/scripts/lib/example-batches.mjs index 4c4588819..e15ad95ca 100644 --- a/scripts/lib/example-batches.mjs +++ b/scripts/lib/example-batches.mjs @@ -8,7 +8,7 @@ // run. The lane that stages and builds for real stays in check_examples.mjs, // with everything else that reads the command line. -import { existsSync, readFileSync } from "node:fs"; +import { existsSync, readdirSync, readFileSync } from "node:fs"; import path from "node:path"; import { REPO_ROOT } from "../../lib/repo-paths.mjs"; import { @@ -70,6 +70,16 @@ export const TEMPLATE_BASE = { webview2: "packages", }; +// One template for each contributed package the reference documents, +// `contributed-`: one Settings over `console`, referencing that package +// alone, as a reader's project does, so that two packages' names cannot meet +// (VBA_JSON's Dictionary class would hide the Scripting.Dictionary WinReg's +// samples name). The directories say which there are. +const TEMPLATES_DIR = path.join(REPO_ROOT, "test", "example-projects"); +for (const name of existsSync(TEMPLATES_DIR) ? readdirSync(TEMPLATES_DIR) : []) { + if (name.startsWith("contributed-")) TEMPLATE_BASE[name] = "console"; +} + /** A template and everything it inherits from, base first. */ export function templateChain(name) { const chain = []; @@ -80,6 +90,63 @@ export function templateChain(name) { return chain; } +/** + * The packages a template's Settings references inside the project rather than + * from the install: a reference whose path is `/Packages/`, which the + * IDE resolves to the package embedded in that folder. The `contributed-` + * templates reference the documented TWINSERV packages this way. Their code is + * not this repository's to commit -- some ship no licence, and WinReg embeds + * WinDevLib, 14 MB -- so check_examples downloads each at the version its + * reference names and embeds it in every batch staged from the template. + * + * `key` names the package's download in a cache: its id without braces and its + * version, as TWINSERV writes a version, Major.Minor.Revision.Build. + */ +export function embeddedPackages(settings) { + const out = []; + for (const r of settings["project.references"] ?? []) { + const m = /^\/Packages\/([^/\\]+)$/.exec(typeof r.path32 === "string" ? r.path32 : ""); + if (!m) continue; + const version = { + versionMajor: Number(r.versionMajor), + versionMinor: Number(r.versionMinor), + versionRevision: Number(r.versionRevision), + versionBuild: Number(r.versionBuild), + }; + const v = `${version.versionMajor}.${version.versionMinor}.${version.versionRevision}.${version.versionBuild}`; + out.push({ id: r.id, folder: m[1], version, key: `${String(r.id).replace(/[{}]/g, "")}_${v}` }); + } + return out; +} + +/** + * A template's own rows split by whose they are. A row inside a package the + * template embeds -- `{ERROR} /Packages//...`, a nested package's + * included -- is that package's defect: third-party code the reference documents + * and cannot fix, whose page says it does not compile. It is reported, under the + * package's name, and does not fail the run. Every other row, an unreadable one + * included, is still the template's. + * + * @param {string[]} rows the template faults of a run + * @param {Set} folders the folders the run's templates embed packages in + */ +export function splitPackageFaults(rows, folders) { + const byPackage = new Map(); + const own = []; + for (const row of rows) { + const folder = /^\{\w+\} \/Packages\/([^/]+)\//.exec(row)?.[1]; + if (folder && folders.has(folder)) byPackage.set(folder, [...(byPackage.get(folder) ?? []), row]); + else own.push(row); + } + return { byPackage, own }; +} + +/** The Settings a template stages with: the last one along its chain. */ +export function templateSettingsPath(templatesDir, name) { + const withSettings = templateChain(name).filter((n) => existsSync(path.join(templatesDir, n, "Settings"))); + return withSettings.length ? path.join(templatesDir, withSettings.at(-1), "Settings") : null; +} + /** Does this template resolve to a project with a Settings anywhere in its chain? */ export function templateResolves(templatesDir, name) { if (!existsSync(path.join(templatesDir, name))) return false; @@ -749,7 +816,7 @@ export async function runBatch(batch, lane) { */ export function sectionOf(rel) { const parts = rel.split(/[\\/]/); - if (parts[0] === "Reference" && (parts[1] === "Default" || parts[1] === "Built-In")) { + if (parts[0] === "Reference" && ["Default", "Built-In", "Contributed"].includes(parts[1])) { return parts.slice(0, 3).join("/"); } if (parts[0] === "Reference") return parts.slice(0, 2).join("/"); @@ -1696,6 +1763,54 @@ export async function runProbes(say) { delete TEMPLATE_BASE["probe-b"]; } expect(cycleThrown, "templates: a cycle in TEMPLATE_BASE did not throw"); + // An embedded package is a reference at /Packages/, keyed by id and version in TWINSERV's + // order; a type library or an installed package is not one. `contributed-WinReg` embeds WinReg and + // the WinDevLib its samples name, is a delta over `console`, and `console` embeds nothing. + const made = embeddedPackages({ + "project.references": [ + { + id: "{AB-12}", + path32: "/Packages/Pkg", + versionMajor: "2", + versionMinor: "3", + versionRevision: "0", + versionBuild: "1", + }, + { id: "{00020430-0000-0000-C000-000000000046}", path32: "C:\\Windows\\SysWOW64\\stdole2.tlb" }, + { id: "{C192FB39-64CA-4D9B-B477-A5502F48EFCC}", isCompilerPackage: true, path32: "" }, + ], + }); + expect( + made.length === 1 && + made[0].folder === "Pkg" && + made[0].key === "AB-12_2.3.0.1" && + made[0].version.versionBuild === 1, + `templates: embeddedPackages read ${JSON.stringify(made)}`, + ); + const settingsOf = (name) => JSON.parse(readFileSync(templateSettingsPath(templates, name), "utf8")); + // A row inside an embedded package is that package's; one in a package the run does not embed, + // in the project's own sources or in no readable shape stays the template's. + const split = splitPackageFaults( + [ + "{ERROR} /Packages/Pkg/Sources/A.twin [1,2]: TB5001 x", + "{ERROR} /Packages/Pkg/Packages/Dep/Sources/B.twin [3,4]: TB5001 y", + "{ERROR} /Packages/Other/Sources/C.twin [5,6]: TB5001 z", + "{ERROR} /Sources/tbxStage.twin [7,8]: TB5079 w", + "something unreadable", + ], + new Set(["Pkg"]), + ); + expect( + [...split.byPackage.keys()].join() === "Pkg" && split.byPackage.get("Pkg").length === 2 && split.own.length === 3, + `templates: splitPackageFaults gave ${JSON.stringify({ packages: [...split.byPackage], own: split.own })}`, + ); + const winReg = embeddedPackages(settingsOf("contributed-WinReg")).map((p) => p.folder); + expect( + winReg.join() === "WinReg,WinDevLib" && + templateChain("contributed-WinReg").join() === "console,contributed-WinReg" && + embeddedPackages(settingsOf("console")).length === 0, + `templates: contributed-WinReg embeds ${winReg}, or is not over console, or console embeds a package`, + ); const readTemplate = (name, file) => readFileSync(path.join(templates, name, "Sources", file), "utf8"); // The declarations of a stage set: its lines that are neither blank nor a comment. const declarationsOf = (text) => text.split(/\r?\n/).filter((l) => l.trim() && !l.trim().startsWith("'")); diff --git a/test/example-projects/contributed-AutoCompleteLib/Settings b/test/example-projects/contributed-AutoCompleteLib/Settings new file mode 100644 index 000000000..d1f58ca0d --- /dev/null +++ b/test/example-projects/contributed-AutoCompleteLib/Settings @@ -0,0 +1,74 @@ +{ + "configuration.inherits": "Defaults", + "project.appTitle": "Documentation samples", + "project.buildPath": "${SourcePath}\\Build\\${ProjectName}_${Architecture}.${FileExtension}", + "project.buildType": "Standard EXE", + "project.description": "Template for scripts/check_examples.mjs. project.id, project.name and project.buildPath are rewritten in the staged copy, one per batch.", + "project.exportPathIsV2": true, + "project.id": "{7B247400-0000-4000-9000-7B2474000000}", + "project.name": "DocSamples", + "project.optionExplicit": true, + "project.references": [ + { + "id": "{00020430-0000-0000-C000-000000000046}", + "lcid": 0, + "name": "OLE Automation", + "path32": "C:\\Windows\\SysWOW64\\stdole2.tlb", + "path64": "C:\\Windows\\System32\\stdole2.tlb", + "symbolId": "stdole", + "versionMajor": 2, + "versionMinor": 0 + }, + { + "id": "{F50B82D0-DCAB-43FE-9631-11959D4A4728}", + "isCompilerPackage": true, + "licence": "MIT", + "name": "[COMPILER PACKAGE] twinBASIC - VB Compatibility Package (Forms)", + "path32": "", + "path64": "", + "publisher": "TWINBASIC-COMPILER", + "symbolId": "VB", + "versionBuild": 0, + "versionMajor": 0, + "versionMinor": 0, + "versionRevision": 31 + }, + { + "id": "{C192FB39-64CA-4D9B-B477-A5502F48EFCC}", + "isCompilerPackage": true, + "licence": "MIT", + "name": "[COMPILER PACKAGE] twinBASIC - App global class object", + "path32": "", + "path64": "", + "publisher": "TWINBASIC-COMPILER", + "symbolId": "AppGlobalClassProject", + "versionBuild": 0, + "versionMajor": 1, + "versionMinor": 0, + "versionRevision": 0 + }, + { + "autoCtlExt": true, + "id": "{4B564E12-3F01-4223-B93D-E89EECAD3035}", + "licence": "MIT", + "name": "[IMPORTED] AutoComplete Class for 32-bit and 64-bit", + "path32": "/Packages/AutoCompleteLib", + "path64": "/Packages/AutoCompleteLib", + "symbolId": "AutoCompleteLib", + "versionBuild": "0", + "versionMajor": "1", + "versionMinor": "0", + "versionRevision": "0" + } + ], + "project.settingsVersion": 1, + "project.startupObject": "Sub Main", + "project.warnings": { + "errors": [], + "hints": [], + "ignored": [], + "info": [], + "warnings": [] + }, + "runtime.useUnicodeStandardLibrary": true +} diff --git a/test/example-projects/contributed-BigNumberLib/Settings b/test/example-projects/contributed-BigNumberLib/Settings new file mode 100644 index 000000000..8287aadfd --- /dev/null +++ b/test/example-projects/contributed-BigNumberLib/Settings @@ -0,0 +1,74 @@ +{ + "configuration.inherits": "Defaults", + "project.appTitle": "Documentation samples", + "project.buildPath": "${SourcePath}\\Build\\${ProjectName}_${Architecture}.${FileExtension}", + "project.buildType": "Standard EXE", + "project.description": "Template for scripts/check_examples.mjs. project.id, project.name and project.buildPath are rewritten in the staged copy, one per batch.", + "project.exportPathIsV2": true, + "project.id": "{7B247400-0000-4000-9000-7B2474000000}", + "project.name": "DocSamples", + "project.optionExplicit": true, + "project.references": [ + { + "id": "{00020430-0000-0000-C000-000000000046}", + "lcid": 0, + "name": "OLE Automation", + "path32": "C:\\Windows\\SysWOW64\\stdole2.tlb", + "path64": "C:\\Windows\\System32\\stdole2.tlb", + "symbolId": "stdole", + "versionMajor": 2, + "versionMinor": 0 + }, + { + "id": "{F50B82D0-DCAB-43FE-9631-11959D4A4728}", + "isCompilerPackage": true, + "licence": "MIT", + "name": "[COMPILER PACKAGE] twinBASIC - VB Compatibility Package (Forms)", + "path32": "", + "path64": "", + "publisher": "TWINBASIC-COMPILER", + "symbolId": "VB", + "versionBuild": 0, + "versionMajor": 0, + "versionMinor": 0, + "versionRevision": 31 + }, + { + "id": "{C192FB39-64CA-4D9B-B477-A5502F48EFCC}", + "isCompilerPackage": true, + "licence": "MIT", + "name": "[COMPILER PACKAGE] twinBASIC - App global class object", + "path32": "", + "path64": "", + "publisher": "TWINBASIC-COMPILER", + "symbolId": "AppGlobalClassProject", + "versionBuild": 0, + "versionMajor": 1, + "versionMinor": 0, + "versionRevision": 0 + }, + { + "autoCtlExt": true, + "id": "{C8320E09-7273-4873-9646-DD1155EC9500}", + "licence": "LibTom (Pubic Domain)", + "name": "[IMPORTED] BigNumberLib (Experimental)", + "path32": "/Packages/BigNumberLib", + "path64": "/Packages/BigNumberLib", + "symbolId": "BigNumberLib", + "versionBuild": "0", + "versionMajor": "0", + "versionMinor": "0", + "versionRevision": "0" + } + ], + "project.settingsVersion": 1, + "project.startupObject": "Sub Main", + "project.warnings": { + "errors": [], + "hints": [], + "ignored": [], + "info": [], + "warnings": [] + }, + "runtime.useUnicodeStandardLibrary": true +} diff --git a/test/example-projects/contributed-FileProps/Settings b/test/example-projects/contributed-FileProps/Settings new file mode 100644 index 000000000..916821858 --- /dev/null +++ b/test/example-projects/contributed-FileProps/Settings @@ -0,0 +1,74 @@ +{ + "configuration.inherits": "Defaults", + "project.appTitle": "Documentation samples", + "project.buildPath": "${SourcePath}\\Build\\${ProjectName}_${Architecture}.${FileExtension}", + "project.buildType": "Standard EXE", + "project.description": "Template for scripts/check_examples.mjs. project.id, project.name and project.buildPath are rewritten in the staged copy, one per batch.", + "project.exportPathIsV2": true, + "project.id": "{7B247400-0000-4000-9000-7B2474000000}", + "project.name": "DocSamples", + "project.optionExplicit": true, + "project.references": [ + { + "id": "{00020430-0000-0000-C000-000000000046}", + "lcid": 0, + "name": "OLE Automation", + "path32": "C:\\Windows\\SysWOW64\\stdole2.tlb", + "path64": "C:\\Windows\\System32\\stdole2.tlb", + "symbolId": "stdole", + "versionMajor": 2, + "versionMinor": 0 + }, + { + "id": "{F50B82D0-DCAB-43FE-9631-11959D4A4728}", + "isCompilerPackage": true, + "licence": "MIT", + "name": "[COMPILER PACKAGE] twinBASIC - VB Compatibility Package (Forms)", + "path32": "", + "path64": "", + "publisher": "TWINBASIC-COMPILER", + "symbolId": "VB", + "versionBuild": 0, + "versionMajor": 0, + "versionMinor": 0, + "versionRevision": 31 + }, + { + "id": "{C192FB39-64CA-4D9B-B477-A5502F48EFCC}", + "isCompilerPackage": true, + "licence": "MIT", + "name": "[COMPILER PACKAGE] twinBASIC - App global class object", + "path32": "", + "path64": "", + "publisher": "TWINBASIC-COMPILER", + "symbolId": "AppGlobalClassProject", + "versionBuild": 0, + "versionMajor": 1, + "versionMinor": 0, + "versionRevision": 0 + }, + { + "autoCtlExt": true, + "id": "{4EE417B6-689D-44E5-88DF-258DD6A51C94}", + "licence": "MIT", + "name": "[IMPORTED] FilePropertyExplorer", + "path32": "/Packages/FileProps", + "path64": "/Packages/FileProps", + "symbolId": "FileProps", + "versionBuild": "0", + "versionMajor": "1", + "versionMinor": "7", + "versionRevision": "1" + } + ], + "project.settingsVersion": 1, + "project.startupObject": "Sub Main", + "project.warnings": { + "errors": [], + "hints": [], + "ignored": [], + "info": [], + "warnings": [] + }, + "runtime.useUnicodeStandardLibrary": true +} diff --git a/test/example-projects/contributed-Fmt/Settings b/test/example-projects/contributed-Fmt/Settings new file mode 100644 index 000000000..2b99c7063 --- /dev/null +++ b/test/example-projects/contributed-Fmt/Settings @@ -0,0 +1,74 @@ +{ + "configuration.inherits": "Defaults", + "project.appTitle": "Documentation samples", + "project.buildPath": "${SourcePath}\\Build\\${ProjectName}_${Architecture}.${FileExtension}", + "project.buildType": "Standard EXE", + "project.description": "Template for scripts/check_examples.mjs. project.id, project.name and project.buildPath are rewritten in the staged copy, one per batch.", + "project.exportPathIsV2": true, + "project.id": "{7B247400-0000-4000-9000-7B2474000000}", + "project.name": "DocSamples", + "project.optionExplicit": true, + "project.references": [ + { + "id": "{00020430-0000-0000-C000-000000000046}", + "lcid": 0, + "name": "OLE Automation", + "path32": "C:\\Windows\\SysWOW64\\stdole2.tlb", + "path64": "C:\\Windows\\System32\\stdole2.tlb", + "symbolId": "stdole", + "versionMajor": 2, + "versionMinor": 0 + }, + { + "id": "{F50B82D0-DCAB-43FE-9631-11959D4A4728}", + "isCompilerPackage": true, + "licence": "MIT", + "name": "[COMPILER PACKAGE] twinBASIC - VB Compatibility Package (Forms)", + "path32": "", + "path64": "", + "publisher": "TWINBASIC-COMPILER", + "symbolId": "VB", + "versionBuild": 0, + "versionMajor": 0, + "versionMinor": 0, + "versionRevision": 31 + }, + { + "id": "{C192FB39-64CA-4D9B-B477-A5502F48EFCC}", + "isCompilerPackage": true, + "licence": "MIT", + "name": "[COMPILER PACKAGE] twinBASIC - App global class object", + "path32": "", + "path64": "", + "publisher": "TWINBASIC-COMPILER", + "symbolId": "AppGlobalClassProject", + "versionBuild": 0, + "versionMajor": 1, + "versionMinor": 0, + "versionRevision": 0 + }, + { + "autoCtlExt": true, + "id": "{D4B278FA-FE6F-4947-8461-6ECB35BD770A}", + "licence": "As per Code Review publication", + "name": "[IMPORTED] CSharpishStringFormater", + "path32": "/Packages/Fmt", + "path64": "/Packages/Fmt", + "symbolId": "Fmt", + "versionBuild": "0", + "versionMajor": "1", + "versionMinor": "0", + "versionRevision": "0" + } + ], + "project.settingsVersion": 1, + "project.startupObject": "Sub Main", + "project.warnings": { + "errors": [], + "hints": [], + "ignored": [], + "info": [], + "warnings": [] + }, + "runtime.useUnicodeStandardLibrary": true +} diff --git a/test/example-projects/contributed-OLEGuids/Settings b/test/example-projects/contributed-OLEGuids/Settings new file mode 100644 index 000000000..d94e2c77a --- /dev/null +++ b/test/example-projects/contributed-OLEGuids/Settings @@ -0,0 +1,74 @@ +{ + "configuration.inherits": "Defaults", + "project.appTitle": "Documentation samples", + "project.buildPath": "${SourcePath}\\Build\\${ProjectName}_${Architecture}.${FileExtension}", + "project.buildType": "Standard EXE", + "project.description": "Template for scripts/check_examples.mjs. project.id, project.name and project.buildPath are rewritten in the staged copy, one per batch.", + "project.exportPathIsV2": true, + "project.id": "{7B247400-0000-4000-9000-7B2474000000}", + "project.name": "DocSamples", + "project.optionExplicit": true, + "project.references": [ + { + "id": "{00020430-0000-0000-C000-000000000046}", + "lcid": 0, + "name": "OLE Automation", + "path32": "C:\\Windows\\SysWOW64\\stdole2.tlb", + "path64": "C:\\Windows\\System32\\stdole2.tlb", + "symbolId": "stdole", + "versionMajor": 2, + "versionMinor": 0 + }, + { + "id": "{F50B82D0-DCAB-43FE-9631-11959D4A4728}", + "isCompilerPackage": true, + "licence": "MIT", + "name": "[COMPILER PACKAGE] twinBASIC - VB Compatibility Package (Forms)", + "path32": "", + "path64": "", + "publisher": "TWINBASIC-COMPILER", + "symbolId": "VB", + "versionBuild": 0, + "versionMajor": 0, + "versionMinor": 0, + "versionRevision": 31 + }, + { + "id": "{C192FB39-64CA-4D9B-B477-A5502F48EFCC}", + "isCompilerPackage": true, + "licence": "MIT", + "name": "[COMPILER PACKAGE] twinBASIC - App global class object", + "path32": "", + "path64": "", + "publisher": "TWINBASIC-COMPILER", + "symbolId": "AppGlobalClassProject", + "versionBuild": 0, + "versionMajor": 1, + "versionMinor": 0, + "versionRevision": 0 + }, + { + "autoCtlExt": true, + "id": "{7E880520-9F56-45E1-9772-DF9FFE246715}", + "licence": "MIT", + "name": "[IMPORTED] OLE Guid and interface definitions for 32-bit and 64-bit", + "path32": "/Packages/OLEGuids", + "path64": "/Packages/OLEGuids", + "symbolId": "OLEGuids", + "versionBuild": "0", + "versionMajor": "1", + "versionMinor": "0", + "versionRevision": "2" + } + ], + "project.settingsVersion": 1, + "project.startupObject": "Sub Main", + "project.warnings": { + "errors": [], + "hints": [], + "ignored": [], + "info": [], + "warnings": [] + }, + "runtime.useUnicodeStandardLibrary": true +} diff --git a/test/example-projects/contributed-TBMANLIB_ListBoxHScroll/Settings b/test/example-projects/contributed-TBMANLIB_ListBoxHScroll/Settings new file mode 100644 index 000000000..7a3542a54 --- /dev/null +++ b/test/example-projects/contributed-TBMANLIB_ListBoxHScroll/Settings @@ -0,0 +1,74 @@ +{ + "configuration.inherits": "Defaults", + "project.appTitle": "Documentation samples", + "project.buildPath": "${SourcePath}\\Build\\${ProjectName}_${Architecture}.${FileExtension}", + "project.buildType": "Standard EXE", + "project.description": "Template for scripts/check_examples.mjs. project.id, project.name and project.buildPath are rewritten in the staged copy, one per batch.", + "project.exportPathIsV2": true, + "project.id": "{7B247400-0000-4000-9000-7B2474000000}", + "project.name": "DocSamples", + "project.optionExplicit": true, + "project.references": [ + { + "id": "{00020430-0000-0000-C000-000000000046}", + "lcid": 0, + "name": "OLE Automation", + "path32": "C:\\Windows\\SysWOW64\\stdole2.tlb", + "path64": "C:\\Windows\\System32\\stdole2.tlb", + "symbolId": "stdole", + "versionMajor": 2, + "versionMinor": 0 + }, + { + "id": "{F50B82D0-DCAB-43FE-9631-11959D4A4728}", + "isCompilerPackage": true, + "licence": "MIT", + "name": "[COMPILER PACKAGE] twinBASIC - VB Compatibility Package (Forms)", + "path32": "", + "path64": "", + "publisher": "TWINBASIC-COMPILER", + "symbolId": "VB", + "versionBuild": 0, + "versionMajor": 0, + "versionMinor": 0, + "versionRevision": 31 + }, + { + "id": "{C192FB39-64CA-4D9B-B477-A5502F48EFCC}", + "isCompilerPackage": true, + "licence": "MIT", + "name": "[COMPILER PACKAGE] twinBASIC - App global class object", + "path32": "", + "path64": "", + "publisher": "TWINBASIC-COMPILER", + "symbolId": "AppGlobalClassProject", + "versionBuild": 0, + "versionMajor": 1, + "versionMinor": 0, + "versionRevision": 0 + }, + { + "autoCtlExt": true, + "id": "{9DCDACC6-9E5C-4034-A93A-5D0335102C78}", + "licence": "MIT", + "name": "[IMPORTED] TBMANLIB_ListBoxHScroll", + "path32": "/Packages/TBMANLIB_ListBoxHScroll", + "path64": "/Packages/TBMANLIB_ListBoxHScroll", + "symbolId": "TBMANLIB_ListBoxHScroll", + "versionBuild": "0", + "versionMajor": "1", + "versionMinor": "0", + "versionRevision": "0" + } + ], + "project.settingsVersion": 1, + "project.startupObject": "Sub Main", + "project.warnings": { + "errors": [], + "hints": [], + "ignored": [], + "info": [], + "warnings": [] + }, + "runtime.useUnicodeStandardLibrary": true +} diff --git a/test/example-projects/contributed-TBMANLIB_RES/Settings b/test/example-projects/contributed-TBMANLIB_RES/Settings new file mode 100644 index 000000000..24c5eedb9 --- /dev/null +++ b/test/example-projects/contributed-TBMANLIB_RES/Settings @@ -0,0 +1,74 @@ +{ + "configuration.inherits": "Defaults", + "project.appTitle": "Documentation samples", + "project.buildPath": "${SourcePath}\\Build\\${ProjectName}_${Architecture}.${FileExtension}", + "project.buildType": "Standard EXE", + "project.description": "Template for scripts/check_examples.mjs. project.id, project.name and project.buildPath are rewritten in the staged copy, one per batch.", + "project.exportPathIsV2": true, + "project.id": "{7B247400-0000-4000-9000-7B2474000000}", + "project.name": "DocSamples", + "project.optionExplicit": true, + "project.references": [ + { + "id": "{00020430-0000-0000-C000-000000000046}", + "lcid": 0, + "name": "OLE Automation", + "path32": "C:\\Windows\\SysWOW64\\stdole2.tlb", + "path64": "C:\\Windows\\System32\\stdole2.tlb", + "symbolId": "stdole", + "versionMajor": 2, + "versionMinor": 0 + }, + { + "id": "{F50B82D0-DCAB-43FE-9631-11959D4A4728}", + "isCompilerPackage": true, + "licence": "MIT", + "name": "[COMPILER PACKAGE] twinBASIC - VB Compatibility Package (Forms)", + "path32": "", + "path64": "", + "publisher": "TWINBASIC-COMPILER", + "symbolId": "VB", + "versionBuild": 0, + "versionMajor": 0, + "versionMinor": 0, + "versionRevision": 31 + }, + { + "id": "{C192FB39-64CA-4D9B-B477-A5502F48EFCC}", + "isCompilerPackage": true, + "licence": "MIT", + "name": "[COMPILER PACKAGE] twinBASIC - App global class object", + "path32": "", + "path64": "", + "publisher": "TWINBASIC-COMPILER", + "symbolId": "AppGlobalClassProject", + "versionBuild": 0, + "versionMajor": 1, + "versionMinor": 0, + "versionRevision": 0 + }, + { + "autoCtlExt": true, + "id": "{86D452C1-BB0C-4CED-9427-C0615CF459CA}", + "licence": "MIT", + "name": "[IMPORTED] [TBMAN] Easy to use ResourcesFiles with Res object", + "path32": "/Packages/TBMANLIB_RES", + "path64": "/Packages/TBMANLIB_RES", + "symbolId": "TBMANLIB_RES", + "versionBuild": "0", + "versionMajor": "1", + "versionMinor": "0", + "versionRevision": "0" + } + ], + "project.settingsVersion": 1, + "project.startupObject": "Sub Main", + "project.warnings": { + "errors": [], + "hints": [], + "ignored": [], + "info": [], + "warnings": [] + }, + "runtime.useUnicodeStandardLibrary": true +} diff --git a/test/example-projects/contributed-TwinTimerPackage/Settings b/test/example-projects/contributed-TwinTimerPackage/Settings new file mode 100644 index 000000000..4f2f2c997 --- /dev/null +++ b/test/example-projects/contributed-TwinTimerPackage/Settings @@ -0,0 +1,74 @@ +{ + "configuration.inherits": "Defaults", + "project.appTitle": "Documentation samples", + "project.buildPath": "${SourcePath}\\Build\\${ProjectName}_${Architecture}.${FileExtension}", + "project.buildType": "Standard EXE", + "project.description": "Template for scripts/check_examples.mjs. project.id, project.name and project.buildPath are rewritten in the staged copy, one per batch.", + "project.exportPathIsV2": true, + "project.id": "{7B247400-0000-4000-9000-7B2474000000}", + "project.name": "DocSamples", + "project.optionExplicit": true, + "project.references": [ + { + "id": "{00020430-0000-0000-C000-000000000046}", + "lcid": 0, + "name": "OLE Automation", + "path32": "C:\\Windows\\SysWOW64\\stdole2.tlb", + "path64": "C:\\Windows\\System32\\stdole2.tlb", + "symbolId": "stdole", + "versionMajor": 2, + "versionMinor": 0 + }, + { + "id": "{F50B82D0-DCAB-43FE-9631-11959D4A4728}", + "isCompilerPackage": true, + "licence": "MIT", + "name": "[COMPILER PACKAGE] twinBASIC - VB Compatibility Package (Forms)", + "path32": "", + "path64": "", + "publisher": "TWINBASIC-COMPILER", + "symbolId": "VB", + "versionBuild": 0, + "versionMajor": 0, + "versionMinor": 0, + "versionRevision": 31 + }, + { + "id": "{C192FB39-64CA-4D9B-B477-A5502F48EFCC}", + "isCompilerPackage": true, + "licence": "MIT", + "name": "[COMPILER PACKAGE] twinBASIC - App global class object", + "path32": "", + "path64": "", + "publisher": "TWINBASIC-COMPILER", + "symbolId": "AppGlobalClassProject", + "versionBuild": 0, + "versionMajor": 1, + "versionMinor": 0, + "versionRevision": 0 + }, + { + "autoCtlExt": true, + "id": "{8113CC0A-F2B5-4226-AF6D-C80883BD8138}", + "licence": "MIT", + "name": "[IMPORTED] TwinTimer class for 32-bit and 64-bit", + "path32": "/Packages/TwinTimerPackage", + "path64": "/Packages/TwinTimerPackage", + "symbolId": "TwinTimerPackage", + "versionBuild": "0", + "versionMajor": "1", + "versionMinor": "0", + "versionRevision": "0" + } + ], + "project.settingsVersion": 1, + "project.startupObject": "Sub Main", + "project.warnings": { + "errors": [], + "hints": [], + "ignored": [], + "info": [], + "warnings": [] + }, + "runtime.useUnicodeStandardLibrary": true +} diff --git a/test/example-projects/contributed-VBA_JSON/Settings b/test/example-projects/contributed-VBA_JSON/Settings new file mode 100644 index 000000000..a258d56ff --- /dev/null +++ b/test/example-projects/contributed-VBA_JSON/Settings @@ -0,0 +1,74 @@ +{ + "configuration.inherits": "Defaults", + "project.appTitle": "Documentation samples", + "project.buildPath": "${SourcePath}\\Build\\${ProjectName}_${Architecture}.${FileExtension}", + "project.buildType": "Standard EXE", + "project.description": "Template for scripts/check_examples.mjs. project.id, project.name and project.buildPath are rewritten in the staged copy, one per batch.", + "project.exportPathIsV2": true, + "project.id": "{7B247400-0000-4000-9000-7B2474000000}", + "project.name": "DocSamples", + "project.optionExplicit": true, + "project.references": [ + { + "id": "{00020430-0000-0000-C000-000000000046}", + "lcid": 0, + "name": "OLE Automation", + "path32": "C:\\Windows\\SysWOW64\\stdole2.tlb", + "path64": "C:\\Windows\\System32\\stdole2.tlb", + "symbolId": "stdole", + "versionMajor": 2, + "versionMinor": 0 + }, + { + "id": "{F50B82D0-DCAB-43FE-9631-11959D4A4728}", + "isCompilerPackage": true, + "licence": "MIT", + "name": "[COMPILER PACKAGE] twinBASIC - VB Compatibility Package (Forms)", + "path32": "", + "path64": "", + "publisher": "TWINBASIC-COMPILER", + "symbolId": "VB", + "versionBuild": 0, + "versionMajor": 0, + "versionMinor": 0, + "versionRevision": 31 + }, + { + "id": "{C192FB39-64CA-4D9B-B477-A5502F48EFCC}", + "isCompilerPackage": true, + "licence": "MIT", + "name": "[COMPILER PACKAGE] twinBASIC - App global class object", + "path32": "", + "path64": "", + "publisher": "TWINBASIC-COMPILER", + "symbolId": "AppGlobalClassProject", + "versionBuild": 0, + "versionMajor": 1, + "versionMinor": 0, + "versionRevision": 0 + }, + { + "autoCtlExt": true, + "id": "{B6D18003-5F93-49A0-A060-AB1A5F4C5B3B}", + "licence": "MIT", + "name": "[IMPORTED] VBA-JSON library by Tim Hall", + "path32": "/Packages/VBA_JSON", + "path64": "/Packages/VBA_JSON", + "symbolId": "VBA_JSON", + "versionBuild": "1", + "versionMajor": "2", + "versionMinor": "3", + "versionRevision": "0" + } + ], + "project.settingsVersion": 1, + "project.startupObject": "Sub Main", + "project.warnings": { + "errors": [], + "hints": [], + "ignored": [], + "info": [], + "warnings": [] + }, + "runtime.useUnicodeStandardLibrary": true +} diff --git a/test/example-projects/contributed-VBComDlg/Settings b/test/example-projects/contributed-VBComDlg/Settings new file mode 100644 index 000000000..d68b4b9cd --- /dev/null +++ b/test/example-projects/contributed-VBComDlg/Settings @@ -0,0 +1,74 @@ +{ + "configuration.inherits": "Defaults", + "project.appTitle": "Documentation samples", + "project.buildPath": "${SourcePath}\\Build\\${ProjectName}_${Architecture}.${FileExtension}", + "project.buildType": "Standard EXE", + "project.description": "Template for scripts/check_examples.mjs. project.id, project.name and project.buildPath are rewritten in the staged copy, one per batch.", + "project.exportPathIsV2": true, + "project.id": "{7B247400-0000-4000-9000-7B2474000000}", + "project.name": "DocSamples", + "project.optionExplicit": true, + "project.references": [ + { + "id": "{00020430-0000-0000-C000-000000000046}", + "lcid": 0, + "name": "OLE Automation", + "path32": "C:\\Windows\\SysWOW64\\stdole2.tlb", + "path64": "C:\\Windows\\System32\\stdole2.tlb", + "symbolId": "stdole", + "versionMajor": 2, + "versionMinor": 0 + }, + { + "id": "{F50B82D0-DCAB-43FE-9631-11959D4A4728}", + "isCompilerPackage": true, + "licence": "MIT", + "name": "[COMPILER PACKAGE] twinBASIC - VB Compatibility Package (Forms)", + "path32": "", + "path64": "", + "publisher": "TWINBASIC-COMPILER", + "symbolId": "VB", + "versionBuild": 0, + "versionMajor": 0, + "versionMinor": 0, + "versionRevision": 31 + }, + { + "id": "{C192FB39-64CA-4D9B-B477-A5502F48EFCC}", + "isCompilerPackage": true, + "licence": "MIT", + "name": "[COMPILER PACKAGE] twinBASIC - App global class object", + "path32": "", + "path64": "", + "publisher": "TWINBASIC-COMPILER", + "symbolId": "AppGlobalClassProject", + "versionBuild": 0, + "versionMajor": 1, + "versionMinor": 0, + "versionRevision": 0 + }, + { + "autoCtlExt": true, + "id": "{B00CAB91-2215-4123-9768-F33903B4A788}", + "licence": "MIT", + "name": "[IMPORTED] CommonDialog class for 32-bit and 64-bit", + "path32": "/Packages/VBComDlg", + "path64": "/Packages/VBComDlg", + "symbolId": "VBComDlg", + "versionBuild": "0", + "versionMajor": "1", + "versionMinor": "0", + "versionRevision": "3" + } + ], + "project.settingsVersion": 1, + "project.startupObject": "Sub Main", + "project.warnings": { + "errors": [], + "hints": [], + "ignored": [], + "info": [], + "warnings": [] + }, + "runtime.useUnicodeStandardLibrary": true +} diff --git a/test/example-projects/contributed-WinReg/Settings b/test/example-projects/contributed-WinReg/Settings new file mode 100644 index 000000000..657925563 --- /dev/null +++ b/test/example-projects/contributed-WinReg/Settings @@ -0,0 +1,101 @@ +{ + "configuration.inherits": "Defaults", + "project.appTitle": "Documentation samples", + "project.buildPath": "${SourcePath}\\Build\\${ProjectName}_${Architecture}.${FileExtension}", + "project.buildType": "Standard EXE", + "project.description": "Template for scripts/check_examples.mjs. project.id, project.name and project.buildPath are rewritten in the staged copy, one per batch.", + "project.exportPathIsV2": true, + "project.id": "{7B247400-0000-4000-9000-7B2474000000}", + "project.name": "DocSamples", + "project.optionExplicit": true, + "project.references": [ + { + "id": "{00020430-0000-0000-C000-000000000046}", + "lcid": 0, + "name": "OLE Automation", + "path32": "C:\\Windows\\SysWOW64\\stdole2.tlb", + "path64": "C:\\Windows\\System32\\stdole2.tlb", + "symbolId": "stdole", + "versionMajor": 2, + "versionMinor": 0 + }, + { + "id": "{F50B82D0-DCAB-43FE-9631-11959D4A4728}", + "isCompilerPackage": true, + "licence": "MIT", + "name": "[COMPILER PACKAGE] twinBASIC - VB Compatibility Package (Forms)", + "path32": "", + "path64": "", + "publisher": "TWINBASIC-COMPILER", + "symbolId": "VB", + "versionBuild": 0, + "versionMajor": 0, + "versionMinor": 0, + "versionRevision": 31 + }, + { + "id": "{C192FB39-64CA-4D9B-B477-A5502F48EFCC}", + "isCompilerPackage": true, + "licence": "MIT", + "name": "[COMPILER PACKAGE] twinBASIC - App global class object", + "path32": "", + "path64": "", + "publisher": "TWINBASIC-COMPILER", + "symbolId": "AppGlobalClassProject", + "versionBuild": 0, + "versionMajor": 1, + "versionMinor": 0, + "versionRevision": 0 + }, + { + "autoCtlExt": true, + "id": "{CA836295-929F-463F-A565-C913C5569B6E}", + "licence": "MIT", + "name": "[IMPORTED] WinReg", + "path32": "/Packages/WinReg", + "path64": "/Packages/WinReg", + "symbolId": "WinReg", + "versionBuild": "0", + "versionMajor": "0", + "versionMinor": "0", + "versionRevision": "0" + }, + { + "autoCtlExt": true, + "id": "{1FCDB98D-617D-4995-9736-2ED0E4746A10}", + "licence": "CC0 1.0 Universal", + "name": "[IMPORTED] Windows Development Library for twinBASIC v8.8.507", + "path32": "/Packages/WinDevLib", + "path64": "/Packages/WinDevLib", + "publishedDate": "17-MAR-2025", + "publishedTime": "08:21:53", + "publisher": "fafalone", + "symbolId": "WinDevLib", + "versionBuild": "507", + "versionMajor": "8", + "versionMinor": "8", + "versionRevision": "0" + }, + { + "autoCtlExt": true, + "id": "{420B2830-E718-11CF-893D-00A0C9054228}", + "lcid": 0, + "name": "Microsoft Scripting Runtime", + "path32": "C:\\Windows\\SysWOW64\\scrrun.dll", + "path64": "C:\\Windows\\System32\\scrrun.dll", + "symbolId": "Scripting", + "versionMajor": 1, + "versionMinor": 0 + } + ], + "project.settingsVersion": 1, + "project.startupObject": "Sub Main", + "project.warnings": { + "errors": [], + "hints": [], + "ignored": [], + "info": [], + "warnings": [] + }, + "runtime.useUnicodeStandardLibrary": true +} diff --git a/test/indexer.test.mjs b/test/indexer.test.mjs index e0b743c9e..1c70e363b 100644 --- a/test/indexer.test.mjs +++ b/test/indexer.test.mjs @@ -33,7 +33,16 @@ import { frontmatterValue, packageNames, readSection, + sectionPages, } from "../indexer/lib/doc-pages.mjs"; +import { + batchTasks, + followsFolders, + newLandingFor, + PAGES_PER_BATCH, + permalinkByFolder, + planPackage, +} from "../indexer/lib/draft-plan.mjs"; import { FINGERPRINTED, fingerprintOf, indexerFingerprint } from "../indexer/lib/fingerprint.mjs"; import { derivePackageApi } from "../indexer/lib/package-api.mjs"; import { readPackageFiles } from "../indexer/lib/package-files.mjs"; @@ -1583,3 +1592,278 @@ describe("documentedPackages", () => { assert.equal((await documentedPackages(path.join(tmp, "no-such-reference"))).size, 0); }); }); + +describe("sectionPages", () => { + test("reads each page's title, parent and permalink, quoted or not, in path order", async () => { + const dir = mkdtempSync(path.join(tmp, "section-")); + mkdirSync(path.join(dir, "Widget")); + writeFileSync(path.join(dir, "index.md"), page('title: "Toy Package"\npermalink: /tB/Toy/')); + writeFileSync(path.join(dir, "Widget", "index.md"), page("title: Widget\nparent: 'Toy Package'")); + writeFileSync(path.join(dir, "notes.txt"), "not a page"); + writeFileSync(path.join(dir, "Draft.md"), "no frontmatter"); + assert.deepEqual(await sectionPages(dir), [ + { rel: "Widget/index.md", title: "Widget", parent: "Toy Package", permalink: null }, + { rel: "index.md", title: "Toy Package", parent: null, permalink: "/tB/Toy/" }, + ]); + assert.deepEqual(await sectionPages(path.join(dir, "missing")), []); + }); +}); + +describe("planning the pages of a report", () => { + const member = (name, kind) => ({ name, kind, vis: "public", signature: `Public ${kind} ${name}()` }); + const api = { + types: [ + { + name: "Widget", + kind: "class", + file: "Widget.twin", + members: [member("Size", "property"), member("Grow", "sub")], + }, + { name: "Helpers", kind: "module", file: "Helpers.twin", members: [member("Twice", "function")] }, + { name: "Gadget", kind: "class", file: "Gadget.twin", members: [member("Spin", "sub")] }, + { name: "Shade", kind: "enum", file: "Enums.twin" }, + { name: "Hue", kind: "enum", file: "Enums.twin" }, + ], + }; + const toy = (rel, title, parent, link) => ({ rel, title, parent, permalink: `/tB/Packages/Toy/${link}` }); + const pages = [ + toy("Enumerations/Shade.md", "Shade", "Enumerations", "Enumerations/Shade"), + toy("Enumerations/index.md", "Enumerations", "Toy Package", "Enumerations/"), + toy("Helpers.md", "Helpers", "Toy Package", "Helpers"), + toy("Widget/Size.md", "Size", "Widget", "Widget/Size"), + toy("Widget/index.md", "Widget", "Toy Package", "Widget/"), + toy("index.md", "Toy Package", "Built-In Packages", ""), + ]; + const task = (action, symbol, kind, module, extra = {}) => ({ + action, + symbol, + kind, + module, + file: "X.twin", + ...extra, + }); + const report = { + package: "Toy", + group: "built-in", + mode: "update", + to: "beta-x-1005", + tasks: [ + task("create", "Grow", "Sub", "Widget"), + task("create", "Twice", "Function", "Helpers"), + task("create", "Hue", "Enum", "Hue"), + task("create", "Spin", "Sub", "Gadget"), + task("create", "Gadget", "Class", "Gadget"), + task("create", "Lost", "Sub", "Missing"), + task("update", "Size", "Property", "Widget", { reason: "signature_changed", changes: ["signature"] }), + task("flag_removal", "Shrink", "Sub", "Widget"), + ], + }; + const plan = planPackage({ report, api, pages, sectionDir: "docs/Toy", sourceDir: "store/Toy/sources" }); + const of = (symbol) => plan.tasks.find((t) => t.symbol === symbol); + + test("a member of a type with a folder gets a page in it, beside a model page, and a permalink by folder", () => { + assert.equal(plan.permalinks, true); + assert.deepEqual(of("Grow"), { + action: "create", + symbol: "Grow", + kind: "Sub", + container: "Widget", + signature: null, + source: "store/Toy/sources/X.twin", + file: "docs/Toy/Widget/Grow.md", + new: true, + inline: false, + parent: "Widget", + permalink: "/tB/Packages/Toy/Widget/Grow", + containerPage: "docs/Toy/Widget/index.md", + model: "docs/Toy/Widget/Size.md", + }); + }); + + test("a member of a type on one page goes on that page, with no permalink", () => { + const t = of("Twice"); + assert.equal(t.file, "docs/Toy/Helpers.md"); + assert.equal(t.inline, true); + assert.equal(t.new, false); + assert.equal(t.permalink, null); + }); + + test("a new type goes in the folder its kind is kept in, under that folder's page", () => { + const t = of("Hue"); + assert.equal(t.file, "docs/Toy/Enumerations/Hue.md"); + assert.equal(t.parent, "Enumerations"); + assert.equal(t.permalink, "/tB/Packages/Toy/Enumerations/Hue"); + assert.equal(t.model, "docs/Toy/Enumerations/Shade.md"); + }); + + test("a new type with new members gets a folder, and its members pages in it", () => { + assert.equal(of("Gadget").file, "docs/Toy/Gadget/index.md"); + assert.equal(of("Gadget").parent, "Toy Package"); + assert.equal(of("Gadget").permalink, "/tB/Packages/Toy/Gadget/"); + assert.equal(of("Spin").file, "docs/Toy/Gadget/Spin.md"); + assert.equal(of("Spin").parent, "Gadget"); + assert.deepEqual( + plan.tasks.map((t) => t.symbol), + ["Hue", "Gadget", "Grow", "Twice", "Spin", "Size"], + ); + }); + + test("a change is to the page that documents the symbol; a member of a type with no page is unplaced", () => { + assert.equal(of("Size").file, "docs/Toy/Widget/Size.md"); + assert.equal(of("Size").reason, "signature_changed"); + assert.deepEqual( + plan.unplaced.map((t) => [t.symbol, t.reason]), + [["Lost", "Missing has no page"]], + ); + assert.deepEqual( + plan.flagged.map((t) => [t.symbol, t.file]), + [["Shrink", null]], + ); + }); + + test("a batch is a type with its new members, or one type's members", () => { + assert.deepEqual( + batchTasks(plan).map((b) => [b.container, b.tasks.map((t) => t.symbol)]), + [ + ["Hue", ["Hue"]], + ["Gadget", ["Gadget", "Spin"]], + ["Widget", ["Grow", "Size"]], + ["Helpers", ["Twice"]], + ], + ); + }); + + test("a batch holds PAGES_PER_BATCH pages at most, unless they go on one page", () => { + const many = (container, inline) => + Array.from({ length: PAGES_PER_BATCH + 1 }, (_, i) => ({ container, symbol: `M${i}`, inline })); + const sizes = (tasks) => batchTasks({ tasks }).map((b) => b.tasks.length); + assert.deepEqual(sizes(many("A", false)), [PAGES_PER_BATCH, 1]); + assert.deepEqual(sizes(many("B", true)), [PAGES_PER_BATCH + 1]); + }); + + test("permalinks are computed only when every page's follows its folder, X/X.md as a folder's page", () => { + const at = (rel, permalink) => ({ rel, title: rel, parent: null, permalink }); + const landing = at("index.md", "/tB/X/"); + const app = [landing, at("_App/_App.md", "/tB/X/_App/"), at("_App/Build.md", "/tB/X/_App/Build")]; + assert.equal(followsFolders(app, landing), true); + // A member named like its folder, beside the folder's index.md, is a page of its own. + const timer = [landing, at("Timer/index.md", "/tB/X/Timer/"), at("Timer/Timer.md", "/tB/X/Timer/Timer")]; + assert.equal(followsFolders(timer, landing), true); + assert.equal(followsFolders([landing, at("A.md", "/tB/Modules/A")], landing), false); + assert.equal(permalinkByFolder("/tB/X", "A/index.md"), "/tB/X/A/"); + }); + + test("a section's own habits decide: members on the folder's index.md, by kind, and sub-objects in their owner's folder", () => { + const sig = (name, kind, as) => ({ name, kind, vis: "public", signature: `Public ${kind} ${name}() As ${as}` }); + const vbApi = { + types: [ + { + name: "Grid", + kind: "class", + file: "G.twin", + members: [ + sig("Rows", "property", "Long"), + sig("Count", "function", "Long"), + sig("Width", "property", "Long"), + ], + }, + { name: "Pane", kind: "class", file: "P.twin", members: [sig("Height", "property", "Long")] }, + { name: "Cells", kind: "class", file: "C.twin", members: [sig("Item", "function", "Cell")] }, + { name: "Cell", kind: "class", file: "C.twin", members: [] }, + { name: "Picker", kind: "class", file: "K.twin", attrs: [{ name: "WindowsControl", args: '"x.png"' }] }, + { name: "Dial", kind: "class", file: "D.twin", attrs: [{ name: "WindowsControl", args: '"y.png"' }] }, + ], + }; + const at = (rel, title, parent) => ({ rel, title, parent, permalink: null }); + const vbPages = [ + at("index.md", "Kit Package", null), + // Grid keeps its properties on pages of their own and its functions on its index.md. + at("Grid/index.md", "Grid", "Kit Package"), + at("Grid/Rows.md", "Rows", "Grid"), + at("Grid/Width.md", "Width", "Grid"), + at("Grid/Cells.md", "Cells", "Grid"), + // Pane keeps its members on its index.md, as VB's classes do. + at("Pane/index.md", "Pane", "Kit Package"), + at("Picker/index.md", "Picker", "Kit Package"), + ]; + const tasks = [ + task("create", "Height2", "Property", "Pane"), + task("create", "Total", "Function", "Grid"), + task("create", "Depth", "Property", "Grid"), + task("create", "Cell", "Class", "Cell"), + task("create", "Dial", "Class", "Dial"), + ]; + vbApi.types[1].members.push(sig("Height2", "property", "Long")); + vbApi.types[0].members.push(sig("Total", "function", "Long"), sig("Depth", "property", "Long")); + const vb = planPackage({ + report: { ...report, tasks }, + api: vbApi, + pages: vbPages, + sectionDir: "K", + sourceDir: "s", + }); + const file = (symbol) => vb.tasks.find((t) => t.symbol === symbol); + assert.deepEqual([file("Height2").file, file("Height2").inline], ["K/Pane/index.md", true]); + assert.deepEqual([file("Total").file, file("Total").inline], ["K/Grid/index.md", true]); + assert.deepEqual([file("Depth").file, file("Depth").model], ["K/Grid/Depth.md", "K/Grid/Rows.md"]); + // Cells, in Grid's folder, returns Cell: Cell goes beside it. + assert.deepEqual([file("Cell").file, file("Cell").parent], ["K/Grid/Cell.md", "Grid"]); + // A control goes as the section's other control does, not as its classes. + assert.equal(file("Dial").file, "K/Dial/index.md"); + }); + + test("a page named Index is named by its kind as well, never Index.md beside a folder's index.md", () => { + const withIndex = { + types: [ + { ...api.types[0], members: [...api.types[0].members, member("Index", "property")] }, + ...api.types.slice(1), + ], + }; + const indexed = planPackage({ + report: { ...report, tasks: [task("create", "Index", "Property", "Widget")] }, + api: withIndex, + pages, + sectionDir: "docs/Toy", + sourceDir: "s", + }); + assert.equal(indexed.tasks[0].file, "docs/Toy/Widget/IndexProperty.md"); + assert.equal(indexed.tasks[0].permalink, "/tB/Packages/Toy/Widget/IndexProperty"); + }); + + test("a section with no landing page gets one like its group's others", () => { + const sibling = (folder) => ({ + folder, + title: `${folder} Package`, + parent: "Contributed Packages", + permalink: `/tB/Packages/Contributed/${folder}/`, + }); + assert.deepEqual(newLandingFor("New", [sibling("A"), sibling("B")]), { + title: "New Package", + parent: "Contributed Packages", + permalink: "/tB/Packages/Contributed/New/", + }); + const odd = { ...sibling("C"), permalink: "/elsewhere/" }; + assert.equal(newLandingFor("New", [sibling("A"), odd]).permalink, null); + assert.deepEqual(newLandingFor("New", []), { title: "New Package", parent: null, permalink: null }); + + const fresh = planPackage({ + report: { ...report, tasks: [task("create", "Gadget", "Class", "Gadget")] }, + api, + pages: [], + sectionDir: "docs/New", + sourceDir: "s", + newLanding: { ...newLandingFor("New", [sibling("A")]), author: "Someone" }, + }); + assert.deepEqual(fresh.landing, { + file: "docs/New/index.md", + title: "New Package", + parent: "Contributed Packages", + permalink: "/tB/Packages/Contributed/New/", + new: true, + author: "Someone", + }); + assert.equal(fresh.tasks[0].file, "docs/New/Gadget.md"); + assert.equal(fresh.tasks[0].parent, "New Package"); + assert.equal(fresh.tasks[0].permalink, "/tB/Packages/Contributed/New/Gadget"); + }); +});