# DVX Widget Modules

Individual widget types, each built as a separate plugin module loaded
at shell startup.  The set is extensible: adding a new widget means
adding a new subdirectory with its `.c`, `.dhs`, `.bhs`, and Makefile
target -- no core changes required.

## Documentation

The overall widget system -- `WidgetT`, `WidgetClassT`, `WgtIfaceT`, the
prop/method/event descriptor tables, registration, and the paint /
layout / event pipeline -- is documented in `wgtsys.dhs` in this
directory.

Each widget has its own two-part documentation:

- `<widget>/<short>.dhs` -- SDK C reference (how to create the widget
  from C: constructor, API struct, flags, handler functions).
- `<widget>/<short>.bhs` -- DVX BASIC reference (properties, methods,
  events, example BASIC code).

Both compile into the DVX System / BASIC References respectively.  Open
via the Help Viewer app, or read `docs/dvx_system_reference.html` and
`docs/dvx_basic_reference.html` after `make`.

## Widget Directory

One subdirectory per widget.  Each subdirectory contains:

- `widget<Name>.c`   -- implementation (defines `sApi`, `sIface`,
  `sProps`, `sMethods`, `sEvents`, `sClass`).
- `<name>.h`         -- public C API (where applicable).
- `<short>.dhs`      -- SDK C help source.
- `<short>.bhs`      -- BASIC help source.
- Optional icons (`icon.bmp`, `icon32.bmp`) and resource file.

Widgets shipped: ansiTerm, box, button, canvas, checkbox, comboBox,
dataCtrl, dbGrid, dropdown, image, imageButton, label, listBox,
listView, progressBar, radio, scrollPane, separator, slider, spacer,
spinner, splitter, statusBar, tabControl, textInput, timer, toolbar,
treeView, wrapBox.

## Build

`make -C src/widgets` (invoked by the top-level `make`).  Produces one
`.wgt` per subdirectory under `bin/widgets/kpunch/`.
