Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
188 changes: 182 additions & 6 deletions WIP.md

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/Features/GUI-Components/Windowless.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,12 @@ redirect_from:
1. **Render the Entire Form to a Bitmap**

* In VB6: Use `BitBlt` or `PaintPicture` to copy the form’s visible area.
* In TwinBASIC: Use the form’s `Canvas` or `ICustomControl.Paint` logic to manually render windowless elements to a bitmap.
* In TwinBASIC: Use the form’s [`Canvas`](../../tB/Packages/CustomControls/Framework/Canvas) or [`ICustomControl.Paint`](../../tB/Packages/CustomControls/Framework/ICustomControl#paint) logic to manually render windowless elements to a bitmap. See the [CustomControls package reference](../../tB/Packages/CustomControls/) for the full framework surface.

2. **Ensure Windowless Controls Are Painted**

* For custom controls using `ICustomControl.Paint`, call their paint routines manually into the same bitmap or `DC`.
* If using `Canvas.AddElement`, simulate a paint pass with the same layout logic used during runtime.
* For [custom controls](../../tB/Packages/CustomControls/) using [`ICustomControl.Paint`](../../tB/Packages/CustomControls/Framework/ICustomControl#paint), call their paint routines manually into the same bitmap or `DC`.
* If using [`Canvas.RuntimeUICCCanvasAddElement`](../../tB/Packages/CustomControls/Framework/Canvas#runtimeuicccanvasaddelement), simulate a paint pass with the same layout logic used during runtime.

3. **Send the Bitmap to the Printer**

Expand Down
4 changes: 2 additions & 2 deletions docs/Reference/Core/And.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ vba_attribution: true
# And operator
{: .no_toc }

Used to perform a logical conjunction on two expressions.
Used to perform a bitwise conjunction on two expressions.

Syntax:
> *result* **=** *expression1* **And** *expression2*
Expand All @@ -33,7 +33,7 @@ If both expressions evaluate to **True**, *result* is **True**. If either expres
| **Null** | **False** | **False** |
| **Null** | **Null** | **Null** |

The **And** operator also performs a bitwise comparison of identically positioned bits in two numeric expressions and sets the corresponding bit in *result* according to the following table:
The **And** operator performs a bitwise comparison of identically positioned bits in two numeric expressions and sets the corresponding bit in *result* according to the following table:

| If bit in *expression1* is | And bit in *expression2* is | The *result* is |
|:-----:|:-----:|:-----:|
Expand Down
4 changes: 2 additions & 2 deletions docs/Reference/Core/Eqv.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ vba_attribution: true
# Eqv operator
{: .no_toc }

Used to perform a logical equivalence on two expressions — the logical inverse of [**Xor**](Xor).
Used to perform a bitwise equivalence on two expressions — the logical inverse of [**Xor**](Xor).

Syntax:
> *result* **=** *expression1* **Eqv** *expression2*
Expand All @@ -28,7 +28,7 @@ If either expression is **Null**, *result* is also **Null**. When neither expres
| **False** | **True** | **False** |
| **False** | **False** | **True** |

The **Eqv** operator also performs a bitwise comparison of identically positioned bits in two numeric expressions and sets the corresponding bit in *result* according to the following table:
The **Eqv** operator performs a bitwise comparison of identically positioned bits in two numeric expressions and sets the corresponding bit in *result* according to the following table:

| If bit in *expression1* is | And bit in *expression2* is | The *result* is |
|:-----:|:-----:|:-----:|
Expand Down
4 changes: 2 additions & 2 deletions docs/Reference/Core/Imp.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ vba_attribution: true
# Imp operator
{: .no_toc }

Used to perform a logical implication on two expressions. *expression1* **Imp** *expression2* is **False** only when *expression1* is **True** and *expression2* is **False**; in every other non-**Null** case the result is **True**.
Used to perform a bitwise implication on two expressions. *expression1* **Imp** *expression2* is **False** only when *expression1* is **True** and *expression2* is **False**; in every other non-**Null** case the result is **True**.

Syntax:
> *result* **=** *expression1* **Imp** *expression2*
Expand All @@ -33,7 +33,7 @@ The following table illustrates how *result* is determined:
| **Null** | **False** | **Null** |
| **Null** | **Null** | **Null** |

The **Imp** operator also performs a bitwise comparison of identically positioned bits in two numeric expressions and sets the corresponding bit in *result* according to the following table:
The **Imp** operator performs a bitwise comparison of identically positioned bits in two numeric expressions and sets the corresponding bit in *result* according to the following table:

| If bit in *expression1* is | And bit in *expression2* is | The *result* is |
|:-----:|:-----:|:-----:|
Expand Down
4 changes: 2 additions & 2 deletions docs/Reference/Core/Not.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ vba_attribution: true
# Not operator
{: .no_toc }

Used to perform logical negation on an expression.
Used to perform bitwise negation on an expression.

Syntax:
> *result* **=** **Not** *expression*
Expand All @@ -27,7 +27,7 @@ The following table illustrates how *result* is determined:
| **False** | **True** |
| **Null** | **Null** |

In addition, the **Not** operator inverts the bit values of its operand and sets the corresponding bit in *result* according to the following table:
The **Not** operator inverts the bit values of its operand and sets the corresponding bit in *result* according to the following table:

| If bit in *expression* is | Then bit in *result* is |
|:-----:|:-----:|
Expand Down
4 changes: 2 additions & 2 deletions docs/Reference/Core/Or.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ vba_attribution: true
# Or operator
{: .no_toc }

Used to perform a logical disjunction on two expressions.
Used to perform a bitwise disjunction on two expressions.

Syntax:
> *result* **=** *expression1* **Or** *expression2*
Expand All @@ -33,7 +33,7 @@ If either or both expressions evaluate to **True**, *result* is **True**. The fo
| **Null** | **False** | **Null** |
| **Null** | **Null** | **Null** |

The **Or** operator also performs a bitwise comparison of identically positioned bits in two numeric expressions and sets the corresponding bit in *result* according to the following table:
The **Or** operator performs a bitwise comparison of identically positioned bits in two numeric expressions and sets the corresponding bit in *result* according to the following table:

| If bit in *expression1* is | And bit in *expression2* is | Then *result* is |
|:-----:|:-----:|:-----:|
Expand Down
4 changes: 2 additions & 2 deletions docs/Reference/Core/Xor.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ vba_attribution: true
# Xor operator
{: .no_toc }

Used to perform a logical exclusion (exclusive-or) on two expressions.
Used to perform a bitwise exclusion (exclusive-or) on two expressions.

Syntax:
> *result* **=** *expression1* **Xor** *expression2*
Expand All @@ -28,7 +28,7 @@ If one — and only one — of the expressions evaluates to **True**, *result* i
| **False** | **True** | **True** |
| **False** | **False** | **False** |

The **Xor** operator also performs a bitwise comparison of identically positioned bits in two numeric expressions and sets the corresponding bit in *result* according to the following table:
The **Xor** operator performs a bitwise comparison of identically positioned bits in two numeric expressions and sets the corresponding bit in *result* according to the following table:

| If bit in *expression1* is | And bit in *expression2* is | Then *result* is |
|:-----:|:-----:|:-----:|
Expand Down
21 changes: 21 additions & 0 deletions docs/Reference/CustomControls/Enumerations/BorderStyle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
title: BorderStyle
parent: Enumerations
grand_parent: CustomControls Package
permalink: /tB/Packages/CustomControls/Enumerations/BorderStyle
---
# BorderStyle
{: .no_toc }

The Win32 frame style used by a [**WaynesForm**](../WaynesForm/) window. Determines whether the window has a thick or thin border, whether it can be resized by dragging an edge, and whether it shows a normal title bar or the smaller tool-window title bar. Carried by [**WindowsFormOptions.BorderStyle**](../WaynesForm/WindowsFormOptions#borderstyle).

| Constant | Value | Description |
|----------|-------|-------------|
| **tbNone**{: #tbNone } | 0 | No border at all — the form is a borderless, captionless rectangle. |
| **tbFixedSingle**{: #tbFixedSingle } | 1 | Thin single-line border; size is fixed at run time. |
| **tbFixedSizable**{: #tbFixedSizable } | 2 | Standard resizable border with a normal title bar. The default for newly-constructed [**WindowsFormOptions**](../WaynesForm/WindowsFormOptions). |
| **tbFixedDialog**{: #tbFixedDialog } | 3 | Dialog-frame border; size is fixed and the system menu offers only **Move** / **Close**. |
| **tbFixedToolWindow**{: #tbFixedToolWindow } | 4 | Tool-window border with the smaller title bar; size is fixed. |
| **tbSizableToolWindow**{: #tbSizableToolWindow } | 5 | Tool-window border with the smaller title bar; the window is resizable. |

Most border styles cannot be combined with **MinimizeButton** or **MaximizeButton** — only **tbFixedSizable** shows full sizing controls. Setting [**MinimizeButton**](../WaynesForm/WindowsFormOptions#minimizebutton) or [**MaximizeButton**](../WaynesForm/WindowsFormOptions#maximizebutton) to **True** on a window style that does not include them has no effect.
19 changes: 19 additions & 0 deletions docs/Reference/CustomControls/Enumerations/ColorRGBA.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
title: ColorRGBA
parent: Enumerations
grand_parent: CustomControls Package
permalink: /tB/Packages/CustomControls/Enumerations/ColorRGBA
---
# ColorRGBA
{: .no_toc }

> [!NOTE]
> **ColorRGBA** is declared as an empty `Enum` block (with a placeholder `[_MAX] = 0` member) only because twinBASIC has not yet exposed a type-alias syntax such as `Type ColorRGBA = Long`. The source carries a `FIXME` comment noting the stand-in. Treat **ColorRGBA** as a **Long**-compatible type alias rather than as an enumeration with named members; when alias syntax becomes available, the enum stand-in will be replaced.

A **Long**-compatible type alias used wherever a 32-bit ABGR colour value is expected. The high byte is the alpha channel — `&HFF000000` is fully opaque, `&H00000000` is fully transparent — and the low three bytes follow the standard `vbBlue`/`vbGreen`/`vbRed` order used by the [**ColorConstants**](../../VBRUN/Constants/ColorConstants) `Long`-coloured constants. Carried by [**FillColorPoint.Color**](../Styles/Fill#color) and by the **RGBA** parameter of [**FillColorPoints.SetSolidColorRGBA**](../Styles/Fill#setsolidcolorrgba) / [**Borders.SetSimpleBorderRGBA**](../Styles/Borders#setsimpleborderrgba).

To write a fully-opaque colour, OR-in the opaque alpha mask: `&HFF000000 Or vbBlue`. The convenience setters [**FillColorPoints.SetSolidColor**](../Styles/Fill#setsolidcolor) and [**Borders.SetSimpleBorder**](../Styles/Borders#setsimpleborder) take a normal three-byte **Long** colour and apply the opaque mask for you; only the `*RGBA` variants take a raw **ColorRGBA**.

```tb
Dim translucentRed As ColorRGBA = &H800000FF& ' 50% alpha, full red
```
16 changes: 16 additions & 0 deletions docs/Reference/CustomControls/Enumerations/CornerShape.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
title: CornerShape
parent: Enumerations
grand_parent: CustomControls Package
permalink: /tB/Packages/CustomControls/Enumerations/CornerShape
---
# CornerShape
{: .no_toc }

Determines how a single corner of a control is shaped. Carried by [**Corner.Shape**](../Styles/Corners#shape), which is set independently for each of the four corners of any control that exposes a [**Corners**](../Styles/Corners) style object. The numeric value of the radius is supplied separately by [**Corner.Radius**](../Styles/Corners#radius).

| Constant | Value | Description |
|----------|-------|-------------|
| **tbCurve**{: #tbCurve } | 0 | Quarter-circle round corner; the radius gives the curve. |
| **tbNotched**{: #tbNotched } | 1 | Diagonal notch across the corner; the radius gives the cut depth. |
| **tbCutOut**{: #tbCutOut } | 2 | Inverse round-corner — the corner area is carved *out* of the control. |
19 changes: 19 additions & 0 deletions docs/Reference/CustomControls/Enumerations/Customtate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
title: Customtate
parent: Enumerations
grand_parent: CustomControls Package
permalink: /tB/Packages/CustomControls/Enumerations/Customtate
---
# Customtate
{: .no_toc }

> [!NOTE]
> The name **Customtate** appears to be a typo for "CustomState" preserved from an early draft of the package. The enum is not referenced by any of the eight concrete `Waynes…` controls; the actual minimized / normal / maximized state of a [**WaynesForm**](../WaynesForm/) is driven by the parallel [**WindowState**](WindowState) enum, which carries identical members. Treat **Customtate** as reserved.

A reserved enumeration with the same three members as [**WindowState**](WindowState). Defined in `Module Constants` of the **CustomControls DESIGNER** library, exported as **Public**, but otherwise unused inside the package.

| Constant | Value | Description |
|----------|-------|-------------|
| **tbNormal**{: #tbNormal } | 0 | Same value as [**WindowState.tbNormal**](WindowState#tbNormal). |
| **tbMinimized**{: #tbMinimized } | 1 | Same value as [**WindowState.tbMinimized**](WindowState#tbMinimized). |
| **tbMaximized**{: #tbMaximized } | 2 | Same value as [**WindowState.tbMaximized**](WindowState#tbMaximized). |
19 changes: 19 additions & 0 deletions docs/Reference/CustomControls/Enumerations/DockMode.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
title: DockMode
parent: Enumerations
grand_parent: CustomControls Package
permalink: /tB/Packages/CustomControls/Enumerations/DockMode
---
# DockMode
{: .no_toc }

How a control is positioned relative to its container — pinned to one edge, filling the whole client area, or not docked at all (positioned absolutely by [**Left**](../#controls) / [**Top**](../#controls) / [**Width**](../#controls) / [**Height**](../#controls)). Carried by the **Dock** property that every concrete custom control inherits.

| Constant | Value | Description |
|----------|-------|-------------|
| **tbDockNone**{: #tbDockNone } | 0 | Not docked. The control's **Left**, **Top**, **Width**, and **Height** are used directly, modulated by the control's [**Anchors**](../Styles/Anchors) when the container resizes. |
| **tbDockLeft**{: #tbDockLeft } | 1 | Pinned to the container's left edge. Width is preserved; height is stretched to the container's client area. |
| **tbDockTop**{: #tbDockTop } | 2 | Pinned to the container's top edge. Height is preserved; width is stretched. |
| **tbDockRight**{: #tbDockRight } | 3 | Pinned to the container's right edge. Width is preserved; height is stretched. |
| **tbDockBottom**{: #tbDockBottom } | 4 | Pinned to the container's bottom edge. Height is preserved; width is stretched. |
| **tbDockFill**{: #tbDockFill } | 5 | Fills the entire remaining client area, after other docked siblings have claimed their edges. |
36 changes: 36 additions & 0 deletions docs/Reference/CustomControls/Enumerations/FillPattern.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
title: FillPattern
parent: Enumerations
grand_parent: CustomControls Package
permalink: /tB/Packages/CustomControls/Enumerations/FillPattern
---
# FillPattern
{: .no_toc }

Identifies how the colour table held by a [**Fill**](../Styles/Fill) is applied across the area being painted. The same colour stops produce very different results depending on the pattern — a north-to-south gradient with two stops paints a top-to-bottom transition, while a corner gradient with the same stops paints from one corner outward. Carried by [**Fill.Pattern**](../Styles/Fill#pattern).

| Constant | Value | Description |
|----------|-------|-------------|
| **tbPatternNone**{: #tbPatternNone } | 0 | No fill — leaves the region transparent. |
| **tbGradientNorthToSouth**{: #tbGradientNorthToSouth } | 1 | Linear gradient from the top edge down to the bottom edge. |
| **tbGradientSouthToNorth**{: #tbGradientSouthToNorth } | 2 | Linear gradient from the bottom edge up to the top edge. |
| **tbGradientWestToEast**{: #tbGradientWestToEast } | 3 | Linear gradient from the left edge across to the right edge. |
| **tbGradientEastToWest**{: #tbGradientEastToWest } | 4 | Linear gradient from the right edge across to the left edge. |
| **tbGradientNorthWestToSouthEast**{: #tbGradientNorthWestToSouthEast } | 5 | Linear diagonal gradient from the top-left corner to the bottom-right. |
| **tbGradientNorthWestToSouthEastAlt**{: #tbGradientNorthWestToSouthEastAlt } | 6 | Alternate diagonal: same axis as **tbGradientNorthWestToSouthEast** but with the stops mirrored about the centre. |
| **tbGradientNorthEastToSouthWest**{: #tbGradientNorthEastToSouthWest } | 7 | Linear diagonal gradient from the top-right corner to the bottom-left. |
| **tbGradientNorthEastToSouthWestAlt**{: #tbGradientNorthEastToSouthWestAlt } | 8 | Alternate diagonal: same axis as **tbGradientNorthEastToSouthWest** but mirrored. |
| **tbGradientSouthWestToNorthEast**{: #tbGradientSouthWestToNorthEast } | 9 | Linear diagonal gradient from the bottom-left corner to the top-right. |
| **tbGradientSouthWestToNorthEastAlt**{: #tbGradientSouthWestToNorthEastAlt } | 10 | Alternate diagonal: same axis as **tbGradientSouthWestToNorthEast** but mirrored. |
| **tbGradientSouthEastToNorthWest**{: #tbGradientSouthEastToNorthWest } | 11 | Linear diagonal gradient from the bottom-right corner to the top-left. |
| **tbGradientSouthEastToNorthWestAlt**{: #tbGradientSouthEastToNorthWestAlt } | 12 | Alternate diagonal: same axis as **tbGradientSouthEastToNorthWest** but mirrored. |
| **tbGradientCornerTopLeft**{: #tbGradientCornerTopLeft } | 13 | Radial-style gradient emanating from the top-left corner outward. |
| **tbGradientCornerTopRight**{: #tbGradientCornerTopRight } | 14 | Radial-style gradient emanating from the top-right corner outward. |
| **tbGradientCornerBottomLeft**{: #tbGradientCornerBottomLeft } | 15 | Radial-style gradient emanating from the bottom-left corner outward. |
| **tbGradientCornerBottomRight**{: #tbGradientCornerBottomRight } | 16 | Radial-style gradient emanating from the bottom-right corner outward. |
| **tbGradientCornerTopLeftAlt**{: #tbGradientCornerTopLeftAlt } | 17 | Alternate top-left corner gradient with the stops mirrored. |
| **tbGradientCornerTopRightAlt**{: #tbGradientCornerTopRightAlt } | 18 | Alternate top-right corner gradient with the stops mirrored. |
| **tbGradientCornerBottomLeftAlt**{: #tbGradientCornerBottomLeftAlt } | 19 | Alternate bottom-left corner gradient with the stops mirrored. |
| **tbGradientCornerBottomRightAlt**{: #tbGradientCornerBottomRightAlt } | 20 | Alternate bottom-right corner gradient with the stops mirrored. |

The colour table itself comes from the array of [**FillColorPoint**](../Styles/Fill#fillcolorpoint-class) values inside [**Fill.ColorPoints**](../Styles/Fill#colorpoints), interpolated to the configured [**Granularity**](../Styles/Fill#granularity).
22 changes: 22 additions & 0 deletions docs/Reference/CustomControls/Enumerations/FontWeight.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
title: FontWeight
parent: Enumerations
grand_parent: CustomControls Package
permalink: /tB/Packages/CustomControls/Enumerations/FontWeight
---
# FontWeight
{: .no_toc }

The weight of a font face, on the standard 100 – 900 scale used by OpenType's `wght` axis and by CSS's `font-weight`. Carried by [**FontStyle.Weight**](../Styles/TextRendering#weight); availability of each weight depends on which faces are installed for the chosen font family.

| Constant | Value | Description |
|----------|-------|-------------|
| **tbThin**{: #tbThin } | 100 | The thinnest weight (also called Hairline). |
| **tbExtraLight**{: #tbExtraLight } | 200 | Also known as Ultra Light. |
| **tbLight**{: #tbLight } | 300 | A noticeably thinner stroke than the regular weight. |
| **tbNormal**{: #tbNormal } | 400 | The default weight. Also known as Regular. Newly-constructed [**FontStyle**](../Styles/TextRendering) objects start here. |
| **tbMedium**{: #tbMedium } | 500 | Slightly heavier than **tbNormal**. |
| **tbSemiBold**{: #tbSemiBold } | 600 | Heavier still; also known as Demi Bold. |
| **tbBold**{: #tbBold } | 700 | The standard bold weight. |
| **tbExtraBold**{: #tbExtraBold } | 800 | Also known as Ultra Bold. |
| **tbHeavy**{: #tbHeavy } | 900 | The heaviest weight. Also known as Black. |
Loading