History

Interim JSDoc for Selection

David Rowe committed 8 years ago

Commit 497cb4d1 parent 96ddeb42 files · +132 −71Browse files

Showing the changes to interface/src/scripting/SelectionScriptingInterface.cpp (1 of 2 files). Show all

Unified · Split

interface/src/scripting/SelectionScriptingInterface.cpp+33−0
@@ -56,6 +56,19 @@ bool GameplayObjects::removeFromGameplayObjects(const OverlayID& overlayID) { · 55 unmodified lines
5656 SelectionScriptingInterface::SelectionScriptingInterface() {
5757 }
5858
59+/**jsdoc
60+ * <table>
61+ * <thead>
62+ * <tr><th>Value</th><th>Description</th></tr>
63+ * </thead>
64+ * <tbody>
65+ * <tr><td><code>"avatar"</code></td><td></td></tr>
66+ * <tr><td><code>"entity"</code></td><td></td></tr>
67+ * <tr><td><code>"overlay"</code></td><td></td></tr>
68+ * </tbody>
69+ * </table>
70+ * @typedef {string} Selection.ItemType
71+ */
5972 bool SelectionScriptingInterface::addToSelectedItemsList(const QString& listName, const QString& itemType, const QUuid& id) {
6073 if (itemType == "avatar") {
6174 return addToGameplayObjects(listName, (QUuid)id);
@@ -255,6 +268,12 @@ void SelectionScriptingInterface::printList(const QString& listName) { · 193 unmodified lines
255268 }
256269 }
257270
271+/**jsdoc
272+ * @typedef {object} Selection.SelectedItemsList
273+ * @property {Uuid[]} avatars - The IDs of the avatars in the selection.
274+ * @property {Uuid[]} entities - The IDs of the entities in the selection.
275+ * @property {Uuid[]} overlays - The IDs of the overlays in the selection.
276+ */
258277 QVariantMap SelectionScriptingInterface::getSelectedItemsList(const QString& listName) const {
259278 QReadLocker lock(&_selectionListsLock);
260279 QVariantMap list;
@@ -461,6 +480,20 @@ bool SelectionHighlightStyle::fromVariantMap(const QVariantMap& properties) { · 200 unmodified lines
461480 return true;
462481 }
463482
483+/**jsdoc
484+ * @typedef {object} Selection.HighlightStyle
485+ * @property {Color} outlineUnoccludedColor - Color of the specified highlight region.
486+ * @property {Color} outlineOccludedColor - ""
487+ * @property {Color} fillUnoccludedColor- ""
488+ * @property {Color} fillOccludedColor- ""
489+ * @property {number} outlineUnoccludedAlpha - Alpha value ranging from <code>0.0</code> (not visible) to <code>1.0</code>
490+ * (fully opaque) for the specified highlight region.
491+ * @property {number} outlineOccludedAlpha - ""
492+ * @property {number} fillUnoccludedAlpha - ""
493+ * @property {number} fillOccludedAlpha - ""
494+ * @property {number} outlineWidth - Width of the outline, in pixels.
495+ * @property {boolean} isOutlineSmooth - <code>true</code> to enable outline smooth fall-off.
496+ */
464497 QVariantMap SelectionHighlightStyle::toVariantMap() const {
465498 QVariantMap properties;
466499