Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit 4f71ffe

Browse files
committed
[[ Docs ]] Complete docs for all extensions' handlers and props
1 parent 2a52144 commit 4f71ffe

File tree

10 files changed

+425
-9
lines changed

10 files changed

+425
-9
lines changed

extensions/libraries/canvas/canvas.lcb

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ variable sCanvas as optional Canvas
5454

5555
/**
5656
Summary: Creates a canvas of the given size for the other handlers to use.
57+
58+
Parameters:
5759
pWidth: The width of the created canvas.
5860
pHeight: The height of the created canvas.
5961

@@ -82,6 +84,8 @@ end handler
8284

8385
/**
8486
Summary: Sets the current color of the canvas to the given RGBA value.
87+
88+
Parameters:
8589
pRed: The red component of the color to set.
8690
pGreen: The green component of the color to set.
8791
pBlue: The blue component of the color to set.
@@ -96,9 +100,12 @@ end handler
96100

97101
/**
98102
Summary: Draws a filled circle.
103+
104+
Parameters:
99105
pX: The x-coordinate of the centre of the circle.
100106
pY: The y-coordinate of the centre of the circle.
101107
pRadius: The radius of the circle.
108+
102109
Description:
103110
Fills a circle of the given radius at the given position in the canvas.
104111
*/
@@ -108,6 +115,8 @@ end handler
108115

109116
/**
110117
Summary: Copies the current contents of the canvas to the specified image object.
118+
119+
Parameters:
111120
pObjectId: A string which is an object chunk referring to an image.
112121

113122
Description:
@@ -129,9 +138,12 @@ public handler canvasApplyToImage(in pObjectId as String) returns nothing
129138
set property "imageData" of tObject to the pixel data of sCanvas
130139
end handler
131140

132-
/*
141+
/**
133142
Summary: Returns the bounding box of an SVG path.
134-
pPath: The SVG Path string to process
143+
144+
Parameters:
145+
pPathString: The SVG Path string to process
146+
135147
Description:
136148
Parses the SVG path string and computes the tight bounding box.
137149
*/

extensions/widgets/colorswatch/colorswatch.lcb

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,16 @@ for more details.
1515
You should have received a copy of the GNU General Public License
1616
along with LiveCode. If not see <http://www.gnu.org/licenses/>. */
1717

18-
/*
18+
/**
1919
This widget displays a color with optional alpha channel.
20+
21+
Name: mouseUp
22+
23+
Summary: Sent when the color swatch is clicked
24+
25+
Syntax: mouseUp
26+
27+
Type: message
2028
*/
2129
widget com.livecode.widget.colorswatch
2230
--
@@ -41,7 +49,7 @@ metadata _ide is "true"
4149

4250
-- property declarations
4351

44-
/*
52+
/**
4553
Syntax:
4654
set the swatchColor of <widget> to <pColor>
4755
get the swatchColor of <widget>

extensions/widgets/gradientrampeditor/gradientrampeditor.lcb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Name: gradientStopsChanged
2222

2323
Type: message
2424

25-
Syntax: on gradientStopsChanged
25+
Syntax: gradientStopsChanged
2626

2727
Summary: Sent when the gradientStops property of the widget changes
2828

extensions/widgets/header/header.lcb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ References: firstItemLeft (property), itemIcons (property),
4141

4242
Name: mouseUp
4343
Type: message
44-
Syntax: on mouseUp
44+
Syntax: mouseUp
4545

4646
Summary: Sent when the header bar is clicked
4747

extensions/widgets/iconpicker/iconpicker.lcb

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ for more details.
1515
You should have received a copy of the GNU General Public License
1616
along with LiveCode. If not see <http://www.gnu.org/licenses/>. */
1717

18+
/**
19+
This widget is an icon picker, using icons from the iconSVG library.
20+
*/
1821
widget com.livecode.widget.iconpicker
1922

2023
use com.livecode.canvas
@@ -56,13 +59,74 @@ private variable mShowNames as Boolean
5659
private variable mIconSize as Number
5760
private variable mFilterString as String
5861

62+
/**
63+
The preferred size of the widget.
64+
65+
Syntax:
66+
get the preferredSize of <widget>
67+
68+
Value:
69+
A two-item list with the width and height needed to display the widget
70+
with the current display preferences.
71+
72+
Description:
73+
The <preferredSize> property is used when the icon widget is popped up
74+
using the 'popup widget' syntax
75+
*/
5976
property preferredSize get getPreferredSize
6077
metadata preferredSize.user_visible is "false"
6178

79+
/**
80+
The selected icon name
81+
82+
Syntax:
83+
set the selectedIcon of <widget> to pIcon
84+
get the selectedIcon of <widget>
85+
86+
Value:
87+
An icon name, from the IconSVG library
88+
89+
*/
6290
property selectedIcon get mSelectedElement set setSelectedElement
91+
92+
/**
93+
Whether the icon picker has a border or not
94+
95+
Syntax:
96+
set the showFrameBorder of <widget> to {true | false}
97+
get the showFrameBorder of <widget>
98+
99+
*/
63100
property showFrameBorder get mFrameBorder set setFrameBorder
101+
102+
/**
103+
Whether to display the names of the icons or not
104+
105+
Syntax:
106+
set the showNames of <widget> to {true | false}
107+
get the showNames of <widget>
108+
*/
64109
property showNames get mShowNames set SetShowNames
110+
111+
/**
112+
The width and height of the rectangles in which the icons are rendered
113+
114+
Syntax:
115+
set the iconSize of <widget> to pSize
116+
get the iconSize of <widget>
117+
118+
Value:
119+
A two-item list with the width and height of the rect in which the icons are rendered
120+
*/
65121
property iconSize get mIconSize set SetIconSize
122+
123+
/**
124+
Filters the list of icons to display according to a string
125+
126+
Syntax:
127+
set the filterString of <widget> to pString
128+
get the filterString of <widget>
129+
*/
66130
property filterString get mFilterString set SetFilterString
67131

68132
constant kIconColor is [0,0,0]

extensions/widgets/navbar/navbar.lcb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ itemNames(property), itemStyle(property)
3636

3737
Name: hiliteChanged
3838
Type: message
39-
Syntax: on hiliteChanged
39+
Syntax: hiliteChanged
4040
Summary: Sent when a navigation item is selected
4141

4242
Example:

0 commit comments

Comments
 (0)