Skip to content

Commit 5a50d26

Browse files
committed
Use twiddle wakkas to indicate minimum versions
Each API page was given and "Applies to: ~>2.x" twiddle-wakka to indicate the versions of HotLabel that apply to the page. Replaced all v2.2 superscripts with "[~>2.2]" Removed supperscripting from dagger footnote symbols. Some content changes to clarify version resitrictions.
1 parent 4af0ff1 commit 5a50d26

20 files changed

+54
-20
lines changed

HotLabel/2/API/EPJURLError.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
**Unit:** _PJHotLabel_.
66

7+
**Applies to:** ~>2.0
8+
79
Exceptions of this class are used to report URL related errors by _[TPJHotLabel](../API/TPJHotLabel.md)_. The exceptions are raised either when URLs fail validation or when default browsers or mail clients can't be started.
810

911
_EPJURLError_ inherits directly from _Exception_ and adds no new methods, properties or events.

HotLabel/2/API/TPJHotLabel-Caption.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66

77
**Class:** _[TPJHotLabel](../API/TPJHotLabel.md)_
88

9+
**Applies to:** ~>2.0
10+
911
```pascal
1012
property Caption: TCaption;
1113
```

HotLabel/2/API/TPJHotLabel-CaptionIsURL.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66

77
**Class:** _[TPJHotLabel](../API/TPJHotLabel.md)_
88

9+
**Applies to:** ~>2.0
10+
911
```pascal
1012
property CaptionIsURL: Boolean;
1113
```

HotLabel/2/API/TPJHotLabel-Cursor.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66

77
**Class:** _[TPJHotLabel](../API/TPJHotLabel.md)_
88

9+
**Applies to:** ~>2.0
10+
911
```pascal
1012
property Cursor: TCursor;
1113
```

HotLabel/2/API/TPJHotLabel-Font.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66

77
**Class:** _[TPJHotLabel](../API/TPJHotLabel.md)_
88

9+
**Applies to:** ~>2.0
10+
911
```pascal
1012
property Font: TFont;
1113
```
@@ -14,7 +16,7 @@ property Font: TFont;
1416

1517
_Font_ controls the attributes font used to display the label when it is not highlighted.
1618

17-
<sup>[v2.2]</sup> At run-time the _Font_ property is only displayed if the _[Visited](../API/TPJHotLabel-Visited.md)_<sup>[v2.2]</sup> property is `False`, otherwise the label's display font is that specified by the _[VisitedFont](../API/TPJHotLabel-VisitedFont.md)_<sup>[v2.2]</sup> property.
19+
[~>2.2] At run-time the _Font_ property is only displayed if the _[Visited](../API/TPJHotLabel-Visited.md)_ [~>2.2] property is `False`, otherwise the label's display font is that specified by the _[VisitedFont](../API/TPJHotLabel-VisitedFont.md)_ [~>2.2] property.
1820

1921
To change to a new font, specify a new _TFont_ object. To modify a font, change the value of the _Color_, _Height_, _Name_, _Pitch_, _Size_, or _Style_ of the _TFont_ object.
2022

HotLabel/2/API/TPJHotLabel-HighlightFont.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66

77
**Class:** _[TPJHotLabel](../API/TPJHotLabel.md)_
88

9+
**Applies to:** ~>2.0
10+
911
```pascal
1012
property HighlightFont: TFont;
1113
```

HotLabel/2/API/TPJHotLabel-HighlightURL.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66

77
**Class:** _[TPJHotLabel](../API/TPJHotLabel.md)_
88

9+
**Applies to:** ~>2.0
10+
911
```pascal
1012
property HighlightURL: Boolean;
1113
```

HotLabel/2/API/TPJHotLabel-Hint.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66

77
**Class:** _[TPJHotLabel](../API/TPJHotLabel.md)_
88

9+
**Applies to:** ~>2.0
10+
911
```pascal
1012
property Hint: string;
1113
```

HotLabel/2/API/TPJHotLabel-HintStyle.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66

77
**Class:** _[TPJHotLabel](../API/TPJHotLabel.md)_
88

9+
**Applies to:** ~>2.0
10+
911
```pascal
1012
type
1113
TPJHLHintStyle = (hsNormal, hsURL, hsCustom);

HotLabel/2/API/TPJHotLabel-OnCustomHint.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66

77
**Class:** _[TPJHotLabel](../API/TPJHotLabel.md)_
88

9+
**Applies to:** ~>2.0
10+
911
```pascal
1012
type
1113
TPJHLCustomHintEvent = procedure(

HotLabel/2/API/TPJHotLabel-ParentFont.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66

77
**Class:** _[TPJHotLabel](../API/TPJHotLabel.md)_
88

9+
**Applies to:** ~>2.0
10+
911
```pascal
1012
property ParentFont: Boolean;
1113
```

HotLabel/2/API/TPJHotLabel-TrackVisits.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,16 @@
66

77
**Class:** _[TPJHotLabel](../API/TPJHotLabel.md)_
88

9-
**Introduced:** v2.2
9+
**Applies to:** ~>2.2
1010

1111
```pascal
1212
property TrackVisits: Boolean;
1313
```
1414

1515
## Description
1616

17-
The component has the ability to detect when its URL is visited<sup>†</sup>, and to automatically set its _[Visited](../API/TPJHotLabel-Visited.md)_<sup>[v2.2]</sup> property to `True` when that happens. This then changes the font used when the label is not highlighted to that specified by the _[VisitedFont](../API/TPJHotLabel-VisitedFont.md)_<sup>[v2.2]</sup> property.
17+
The component has the ability to detect when its URL is visited, and to automatically set its _[Visited](../API/TPJHotLabel-Visited.md)_ [~>2.2] property to `True` when that happens. This then changes the font used when the label is not highlighted to that specified by the _[VisitedFont](../API/TPJHotLabel-VisitedFont.md)_ [~>2.2] property.
1818

1919
_TrackVists_ determines whether this feature is enabled (`True`) or not (`False`). The default value is `False`.
2020

21-
† The component deems its URL to be visited if the label is clicked **and** the navigation to the URL succeeded. If the navigation fails the _[Visited](../API/TPJHotLabel-Visited.md)_<sup>[v2.2]</sup> property is not set to `True`. When navigation to succeeds it does not mean the URL exists, it simply means that the component was able to resolve the URL and execute it in a linked application such and a web browser.
21+
† The component deems its URL to be visited if the label is clicked **and** the navigation to the URL succeeded. If the navigation fails the _[Visited](../API/TPJHotLabel-Visited.md)_ [~>2.2] property is not set to `True`. When navigation to succeeds it does not mean the URL exists, it simply means that the component was able to resolve the URL and execute it in a linked application such and a web browser.

HotLabel/2/API/TPJHotLabel-URL.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66

77
**Class:** _[TPJHotLabel](../API/TPJHotLabel.md)_
88

9+
**Applies to:** ~>2.0
10+
911
```pascal
1012
property URL: string;
1113
```
@@ -20,4 +22,4 @@ When the _[CaptionIsURL](../API/TPJHotLabel-CaptionIsURL.md)_ property is `True`
2022

2123
The URL can be displayed in the component's _[Hint](../API/TPJHotLabel-Hint.md)_ property by setting the _[HintStyle](../API/TPJHotLabel-HintStyle.md)_ property to `hsURL`.
2224

23-
The default value of this property is either `http://localhost`<sup>[v2.0]</sup> or `http://example.com/`<sup>[v2.2]</sup>
25+
The default value of this property is either `http://localhost` [2.0 to ~>2.1.0] or `http://example.com/` [~>2.2].

HotLabel/2/API/TPJHotLabel-ValidateURL.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66

77
**Class:** _[TPJHotLabel](../API/TPJHotLabel.md)_
88

9+
**Applies to:** ~>2.0
10+
911
```pascal
1012
property ValidateURL: Boolean;
1113
```

HotLabel/2/API/TPJHotLabel-Visited.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,19 @@
66

77
**Class:** _[TPJHotLabel](../API/TPJHotLabel.md)_
88

9-
**Introduced:** v2.2
9+
**Applies to:** ~>2.2
1010

1111
```pascal
1212
property Visited: Boolean;
1313
```
1414

1515
## Description
1616

17-
This property indicates whether the label is in its "visited" state (`True`) or not (`False`). When _Visited_ is `True` the label is displayed using the font specified by the _[VisitedFont](../API/TPJHotLabel-VisitedFont.md)_<sup>[v2.2]</sup>, whenever the label is not highlighted. When the property is `False` the display font reverts to that given by the _[Font](../API/TPJHotLabel-Font.md)_ property.
17+
This property indicates whether the label is in its "visited" state (`True`) or not (`False`). When _Visited_ is `True` the label is displayed using the font specified by the _[VisitedFont](../API/TPJHotLabel-VisitedFont.md)_ [~>2.2], whenever the label is not highlighted. When the property is `False` the display font reverts to that given by the _[Font](../API/TPJHotLabel-Font.md)_ property.
1818

1919
Writing the property changes the "visited" state. The default value is `False`.
2020

21-
The property can also be set automatically each time the component's URL is navigated to. This feature is enabled by setting the _[TrackVisits](../API/TPJHotLabel-TrackVisits.md)_<sup>[v2.2]</sup> property to `True`.
21+
The property can also be set automatically each time the component's URL is navigated to. This feature is enabled by setting the _[TrackVisits](../API/TPJHotLabel-TrackVisits.md)_ [~>2.2] property to `True`.
2222

2323
Note that, unlike in a browser, the value of _Visited_ does not persist between program executions.
2424

HotLabel/2/API/TPJHotLabel-VisitedFont.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@
66

77
**Class:** _[TPJHotLabel](../API/TPJHotLabel.md)_
88

9-
**Introduced:** v2.2
9+
**Applies to:** ~>2.2
1010

1111
```pascal
1212
property VisitedFont: TFont;
1313
```
1414

1515
## Description
1616

17-
_VisitedFont_ controls the attributes font used to display the label when the _[Visited](../API/TPJHotLabel-Visited.md)_<sup>[v2.2]</sup> property is `True` and the label is not highlighted.
17+
_VisitedFont_ controls the attributes font used to display the label when the _[Visited](../API/TPJHotLabel-Visited.md)_ [~>2.2] property is `True` and the label is not highlighted.
1818

1919
To change to a new font, specify a new _TFont_ object. To modify a font, change the value of the _Color_, _Height_, _Name_, _Pitch_, _Size_, or _Style_ of the _TFont_ object.
2020

HotLabel/2/API/TPJHotLabel.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
**Unit:** _PJHotLabel_.
66

7+
**Applies to:** ~>2.0
8+
79
This component provides a label that can access a user-defined URL when clicked. The URL is displayed in the default browser or email client.
810

911
In addition to the properties of _TLabel_, from which this component descends, additional properties for working with URLs are provided. The effect of some of _TLabel_'s properties is modified in _TPJHotLabel_.
@@ -45,10 +47,10 @@ _TPJHotLabel_ defines no new methods over and above those inherited from _TLabel
4547
| _[Hint](../API/TPJHotLabel-Hint.md)_ | Contains the text string that can appear when the user moves the mouse over the control. How _[Hint](../API/TPJHotLabel-Hint.md)_ is used depends on the _[HintStyle](../API/TPJHotLabel-HintStyle.md)_ property. |
4648
| _[HintStyle](../API/TPJHotLabel-HintStyle.md)_ | Determines the source of the text displayed in the component's hint. |
4749
| _[ParentFont](../API/TPJHotLabel-ParentFont.md)_ | Determines where the control looks for its font information. |
48-
| _[TrackVisits](../API/TPJHotLabel-TrackVisits.md)_<sup>[v2.2]</sup> | Determines whether or not the label automatically displays in its visible state when the user clicks the link. |
50+
| _[TrackVisits](../API/TPJHotLabel-TrackVisits.md) [~>2.2]_ | Determines whether or not the label automatically displays in its visible state when the user clicks the link. |
4951
| _[URL](../API/TPJHotLabel-URL.md)_ | Stores the URL that is to be accessed when the label is clicked. |
50-
| _[Visited](../API/TPJHotLabel-Visited.md)_<sup>[v2.2]</sup> | Determines whether or not the label is in its visited state. |
51-
| _[VisitedFont](../API/TPJHotLabel-VisitedFont.md)_<sup>[v2.2]</sup> | Specifies the label's font when in its visited state and not highlighted. |
52+
| _[Visited](../API/TPJHotLabel-Visited.md) [~>2.2]_ | Determines whether or not the label is in its visited state. |
53+
| _[VisitedFont](../API/TPJHotLabel-VisitedFont.md) [~>2.2]_ | Specifies the label's font when in its visited state and not highlighted. |
5254
| _[ValidateURL](../API/TPJHotLabel-ValidateURL.md)_ | Determines whether the URL stored in the component is validated or not. |
5355

5456
## Events

HotLabel/2/Examples/Example1.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Examples: Using Highlighting
22

3+
**Applies to:** ~>2.0
4+
35
These examples present two possible designs for _[TPJHotLabel](../API/TPJHotLabel.md)_ components that use text highlighting to indicate that the label is clickable.
46

57
## Example 1

HotLabel/2/Examples/Example2.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Examples: Using the OnCustomHint Event
22

3+
**Applies to:** ~>2.0
4+
35
These examples show how to use the _[OnCustomHint](../API/TPJHotLabel-OnCustomHint.md)_ event of _[TPJHotLabel](../API/TPJHotLabel.md)_. We handle the event to display a hint containing some descriptive text along with the URL in brackets.
46

57
## Example 1

HotLabel/2/Examples/Example3.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
1-
# Example: Tracking visits to URLs<sup>[v2.2]</sup>
1+
# Example: Tracking Visits to URLs
22

3-
The component provides the _[Visited](../API/TPJHotLabel-Visited.md)_<sup>[v2.2]</sup> property to enable visits to the URLs associated with hot label components to be tracked. Furthermore, the _[TrackVisits](../API/TPJHotLabel-TrackVisits.md)_<sup>[v2.2]</sup> property enables the tracking to be done automatically whenever the label is clicked and the underlying action completes successfully.
3+
**Applies to:** ~>2.2
44

5-
So, assuming we have a number of _[TPJHotLabel](../API/TPJHotLabel.md)_ components on a form, each of which has the _[URL](../API/TPJHotLabel-URL.md)_ property set to some valid URL and their _[TrackVisits](../API/TPJHotLabel-TrackVisits.md)_<sup>[v2.2]</sup> property set to `True` then simply by running the application and clicking a few links we will see that each label changes colour when visited.
5+
The component provides the _[Visited](../API/TPJHotLabel-Visited.md)_ [~>2.2] property to enable visits to the URLs associated with hot label components to be tracked. Furthermore, the _[TrackVisits](../API/TPJHotLabel-TrackVisits.md)_ [~>2.2] property enables the tracking to be done automatically whenever the label is clicked and the underlying action completes successfully.
66

7-
However when the application is restarted we find that the tracking information is lost and all labels are reset to their un-visited state. This behaviour is to be epected because the _[Visited](../API/TPJHotLabel-Visited.md)_<sup>[v2.2]</sup> does not maintain state.
7+
So, assuming we have a number of _[TPJHotLabel](../API/TPJHotLabel.md)_ components on a form, each of which has the _[URL](../API/TPJHotLabel-URL.md)_ property set to some valid URL and their _[TrackVisits](../API/TPJHotLabel-TrackVisits.md)_ [~>2.2] property set to `True` then simply by running the application and clicking a few links we will see that each label changes colour when visited.
8+
9+
However when the application is restarted we find that the tracking information is lost and all labels are reset to their un-visited state. This behaviour is to be epected because the _[Visited](../API/TPJHotLabel-Visited.md)_ [~>2.2] does not maintain state.
810

911
In this example we will implement a scheme that persists the visited state of the hot label controls between executions.
1012

11-
Start a new VCL forms application and drop a few _[TPJHotLabel](../API/TPJHotLabel.md)_ components on the form. Give each component's _[URL](../API/TPJHotLabel-URL.md)_ property a valid value and set all the component's _[TrackVisits](../API/TPJHotLabel-TrackVisits.md)_<sup>[v2.2]</sup> properties to `True`.
13+
Start a new VCL forms application and drop a few _[TPJHotLabel](../API/TPJHotLabel.md)_ components on the form. Give each component's _[URL](../API/TPJHotLabel-URL.md)_ property a valid value and set all the component's _[TrackVisits](../API/TPJHotLabel-TrackVisits.md)_ [~>2.2] properties to `True`.
1214

1315
In this example we will use an ini file to persist the visited state of the hot label controls and we will use the hot label component's _Name_ property to uniquely identify the individual controls. If there is no ini file present we will assume that no hot labels have been visited.
1416

@@ -35,7 +37,7 @@ begin
3537
end;
3638
```
3739

38-
This simply creates an ini file with the name given by _IniFileName_ (which we'll come back to) then loops across all components on the form and, whenever a _[TPJHotLabel](../API/TPJHotLabel.md)_ is found, writes its name and the value of its _[Visited](../API/TPJHotLabel-Visited.md)_<sup>[v2.2]</sup> property to the ini file.
40+
This simply creates an ini file with the name given by _IniFileName_ (which we'll come back to) then loops across all components on the form and, whenever a _[TPJHotLabel](../API/TPJHotLabel.md)_ is found, writes its name and the value of its _[Visited](../API/TPJHotLabel-Visited.md)_ [~>2.2] property to the ini file.
3941

4042
Having recorded the information all we need to do is to read it in when the program starts and set the visited state of the required hot label components. We do this in the form's _OnCreate_ handler:
4143

@@ -61,7 +63,7 @@ begin
6163
end;
6264
```
6365

64-
This code is the inverse of the code we used to write the file. It loops through every component as before, looking for hot label components. When it finds one it tries to read a value from the ini file that matches the component's name. If it finds the required value the component's _[Visited](../API/TPJHotLabel-Visited.md)_<sup>[v2.2]</sup> property is set to the value read from the ini file. If the component's name is not in the ini file then its _[Visited](../API/TPJHotLabel-Visited.md)_<sup>[v2.2]</sup> property is set to `False`. Note that this code works even if there is no ini file.
66+
This code is the inverse of the code we used to write the file. It loops through every component as before, looking for hot label components. When it finds one it tries to read a value from the ini file that matches the component's name. If it finds the required value the component's _[Visited](../API/TPJHotLabel-Visited.md)_ [~>2.2] property is set to the value read from the ini file. If the component's name is not in the ini file then its _[Visited](../API/TPJHotLabel-Visited.md)_ [~>2.2] property is set to `False`. Note that this code works even if there is no ini file.
6567

6668
That just leaves _IniFileName_. You can implement this as a function or method that returns the required file name. For example, you could store the file in the same directory as the executable by implementing _IniFileName_ as a private form method follows:
6769

0 commit comments

Comments
 (0)