Showing the changes to interface/src/scripting/WindowScriptingInterface.h (1 of 2 files). Show all
Unified · Split
| @@ -87,7 +87,7 @@ public slots: · 86 unmodified lines | ||
| 87 | 87 | * Display a dialog with the specified message and an "OK" button. The dialog is non-modal; the script continues without |
| 88 | 88 | * waiting for a user response. |
| 89 | 89 | * @function Window.alert |
| 90 | − * @param {string} message="" - The message to display. | |
| 90 | + * @param {string} [message=""] - The message to display. | |
| 91 | 91 | * @example <caption>Display a friendly greeting.</caption> |
| 92 | 92 | * Window.alert("Welcome!"); |
| 93 | 93 | * print("Script continues without waiting"); |
| @@ -98,7 +98,7 @@ public slots: · 4 unmodified lines | ||
| 98 | 98 | * Prompt the user to confirm something. Displays a modal dialog with a message plus "Yes" and "No" buttons. |
| 99 | 99 | * responds. |
| 100 | 100 | * @function Window.confirm |
| 101 | − * @param {string} message="" - The question to display. | |
| 101 | + * @param {string} [message=""] - The question to display. | |
| 102 | 102 | * @returns {boolean} <code>true</code> if the user selects "Yes", otherwise <code>false</code>. |
| 103 | 103 | * @example <caption>Ask the user a question requiring a yes/no answer.</caption> |
| 104 | 104 | * var answer = Window.confirm("Are you sure?"); |
| @@ -128,8 +128,8 @@ public slots: · 23 unmodified lines | ||
| 128 | 128 | * buttons. A {@link Window.promptTextChanged|promptTextChanged} signal is emitted when the user OKs the dialog; no signal |
| 129 | 129 | * is emitted if the user cancels the dialog. |
| 130 | 130 | * @function Window.promptAsync |
| 131 | − * @param {string} message - The question to display. | |
| 132 | − * @param {string} defaultText - The default answer text. | |
| 131 | + * @param {string} [message=""] - The question to display. | |
| 132 | + * @param {string} [defaultText=""] - The default answer text. | |
| 133 | 133 | * @example <caption>Ask the user a question requiring a text answer without waiting for the answer.</caption> |
| 134 | 134 | * function onPromptTextChanged(text) { |
| 135 | 135 | * print("User answer: " + text); |
| @@ -144,8 +144,8 @@ public slots: · 8 unmodified lines | ||
| 144 | 144 | /**jsdoc |
| 145 | 145 | * Prompt the user to choose a directory. Displays a modal dialog that navigates the directory tree. |
| 146 | 146 | * @function Window.browseDir |
| 147 | − * @param {string} title="" - The title to display at the top of the dialog. | |
| 148 | − * @param {string} directory="" - The initial directory to start browsing at. | |
| 147 | + * @param {string} [title=""] - The title to display at the top of the dialog. | |
| 148 | + * @param {string} [directory=""] - The initial directory to start browsing at. | |
| 149 | 149 | * @returns {string} The path of the directory if one is chosen, otherwise <code>null</code>. |
| 150 | 150 | * @example <caption>Ask the user to choose a directory.</caption> |
| 151 | 151 | * var directory = Window.browseDir("Select Directory", Paths.resources); |
| @@ -158,8 +158,8 @@ public slots: · 6 unmodified lines | ||
| 158 | 158 | * {@link Window.browseDirChanged|browseDirChanged} signal is emitted when a directory is chosen; no signal is emitted if |
| 159 | 159 | * the user cancels the dialog. |
| 160 | 160 | * @function Window.browseDirAsync |
| 161 | − * @param {string} title="" - The title to display at the top of the dialog. | |
| 162 | − * @param {string} directory="" - The initial directory to start browsing at. | |
| 161 | + * @param {string} [title=""] - The title to display at the top of the dialog. | |
| 162 | + * @param {string} [directory=""] - The initial directory to start browsing at. | |
| 163 | 163 | * @example <caption>Ask the user to choose a directory without waiting for the answer.</caption> |
| 164 | 164 | * function onBrowseDirChanged(directory) { |
| 165 | 165 | * print("Directory: " + directory); |
| @@ -174,9 +174,9 @@ public slots: · 8 unmodified lines | ||
| 174 | 174 | /**jsdoc |
| 175 | 175 | * Prompt the user to choose a file. Displays a modal dialog that navigates the directory tree. |
| 176 | 176 | * @function Window.browse |
| 177 | − * @param {string} title="" - The title to display at the top of the dialog. | |
| 178 | − * @param {string} directory="" - The initial directory to start browsing at. | |
| 179 | − * @param {string} nameFilter="" - The types of files to display. Examples: <code>"*.json"</code> and | |
| 177 | + * @param {string} [title=""] - The title to display at the top of the dialog. | |
| 178 | + * @param {string} [directory=""] - The initial directory to start browsing at. | |
| 179 | + * @param {string} [nameFilter=""] - The types of files to display. Examples: <code>"*.json"</code> and | |
| 180 | 180 | * <code>"Images (*.png *.jpg *.svg)"</code>. All files are displayed if a filter isn't specified. |
| 181 | 181 | * @returns {string} The path and name of the file if one is chosen, otherwise <code>null</code>. |
| 182 | 182 | * @example <caption>Ask the user to choose an image file.</caption> |
| @@ -190,9 +190,9 @@ public slots: · 7 unmodified lines | ||
| 190 | 190 | * {@link Window.browseChanged|browseChanged} signal is emitted when a file is chosen; no signal is emitted if the user |
| 191 | 191 | * cancels the dialog. |
| 192 | 192 | * @function Window.browseAsync |
| 193 | − * @param {string} title="" - The title to display at the top of the dialog. | |
| 194 | − * @param {string} directory="" - The initial directory to start browsing at. | |
| 195 | − * @param {string} nameFilter="" - The types of files to display. Examples: <code>"*.json"</code> and | |
| 193 | + * @param {string} [title=""] - The title to display at the top of the dialog. | |
| 194 | + * @param {string} [directory=""] - The initial directory to start browsing at. | |
| 195 | + * @param {string} [nameFilter=""] - The types of files to display. Examples: <code>"*.json"</code> and | |
| 196 | 196 | * <code>"Images (*.png *.jpg *.svg)"</code>. All files are displayed if a filter isn't specified. |
| 197 | 197 | * @example <caption>Ask the user to choose an image file without waiting for the answer.</caption> |
| 198 | 198 | * function onBrowseChanged(filename) { |
| @@ -209,9 +209,9 @@ public slots: · 10 unmodified lines | ||
| 209 | 209 | * Prompt the user to specify the path and name of a file to save to. Displays a model dialog that navigates the directory |
| 210 | 210 | * tree and allows the user to type in a file name. |
| 211 | 211 | * @function Window.save |
| 212 | − * @param {string} title="" - The title to display at the top of the dialog. | |
| 213 | − * @param {string} directory="" - The initial directory to start browsing at. | |
| 214 | − * @param {string} nameFilter="" - The types of files to display. Examples: <code>"*.json"</code> and | |
| 212 | + * @param {string} [title=""] - The title to display at the top of the dialog. | |
| 213 | + * @param {string} [directory=""] - The initial directory to start browsing at. | |
| 214 | + * @param {string} [nameFilter=""] - The types of files to display. Examples: <code>"*.json"</code> and | |
| 215 | 215 | * <code>"Images (*.png *.jpg *.svg)"</code>. All files are displayed if a filter isn't specified. |
| 216 | 216 | * @returns {string} The path and name of the file if one is specified, otherwise <code>null</code>. If a single file type |
| 217 | 217 | * is specified in the nameFilter, that file type extension is automatically appended to the result when appropriate. |
| @@ -226,9 +226,9 @@ public slots: · 8 unmodified lines | ||
| 226 | 226 | * directory tree and allows the user to type in a file name. A {@link Window.saveFileChanged|saveFileChanged} signal is |
| 227 | 227 | * emitted when a file is specified; no signal is emitted if the user cancels the dialog. |
| 228 | 228 | * @function Window.saveAsync |
| 229 | − * @param {string} title="" - The title to display at the top of the dialog. | |
| 230 | − * @param {string} directory="" - The initial directory to start browsing at. | |
| 231 | − * @param {string} nameFilter="" - The types of files to display. Examples: <code>"*.json"</code> and | |
| 229 | + * @param {string} [title=""] - The title to display at the top of the dialog. | |
| 230 | + * @param {string} [directory=""] - The initial directory to start browsing at. | |
| 231 | + * @param {string} [nameFilter=""] - The types of files to display. Examples: <code>"*.json"</code> and | |
| 232 | 232 | * <code>"Images (*.png *.jpg *.svg)"</code>. All files are displayed if a filter isn't specified. |
| 233 | 233 | * @example <caption>Ask the user to specify a file to save to without waiting for an answer.</caption> |
| 234 | 234 | * function onSaveFileChanged(filename) { |
| @@ -245,9 +245,9 @@ public slots: · 10 unmodified lines | ||
| 245 | 245 | * Prompt the user to choose an Asset Server item. Displays a modal dialog that navigates the tree of assets on the Asset |
| 246 | 246 | * Server. |
| 247 | 247 | * @function Window.browseAssets |
| 248 | − * @param {string} title="" - The title to display at the top of the dialog. | |
| 249 | − * @param {string} directory="" - The initial directory to start browsing at. | |
| 250 | − * @param {string} nameFilter="" - The types of files to display. Examples: <code>"*.json"</code> and | |
| 248 | + * @param {string} [title=""] - The title to display at the top of the dialog. | |
| 249 | + * @param {string} [directory=""] - The initial directory to start browsing at. | |
| 250 | + * @param {string} [nameFilter=""] - The types of files to display. Examples: <code>"*.json"</code> and | |
| 251 | 251 | * <code>"Images (*.png *.jpg *.svg)"</code>. All files are displayed if a filter isn't specified. |
| 252 | 252 | * @returns {string} The path and name of the asset if one is chosen, otherwise <code>null</code>. |
| 253 | 253 | * @example <caption>Ask the user to select an FBX asset.</caption> |
| @@ -261,9 +261,9 @@ public slots: · 7 unmodified lines | ||
| 261 | 261 | * Asset Server. A {@link Window.assetsDirChanged|assetsDirChanged} signal is emitted when an asset is chosen; no signal is |
| 262 | 262 | * emitted if the user cancels the dialog. |
| 263 | 263 | * @function Window.browseAssetsAsync |
| 264 | − * @param {string} title="" - The title to display at the top of the dialog. | |
| 265 | − * @param {string} directory="" - The initial directory to start browsing at. | |
| 266 | − * @param {string} nameFilter="" - The types of files to display. Examples: <code>"*.json"</code> and | |
| 264 | + * @param {string} [title=""] - The title to display at the top of the dialog. | |
| 265 | + * @param {string} [directory=""] - The initial directory to start browsing at. | |
| 266 | + * @param {string} [nameFilter=""] - The types of files to display. Examples: <code>"*.json"</code> and | |
| 267 | 267 | * <code>"Images (*.png *.jpg *.svg)"</code>. All files are displayed if a filter isn't specified. |
| 268 | 268 | * @example |
| 269 | 269 | * function onAssetsDirChanged(asset) { |
| @@ -280,7 +280,7 @@ public slots: · 10 unmodified lines | ||
| 280 | 280 | * Open the Asset Browser dialog. If a file to upload is specified, the user is prompted to enter the folder and name to |
| 281 | 281 | * map the file to on the asset server. |
| 282 | 282 | * @function Window.showAssetServer |
| 283 | − * @param {string} uploadFile="" - The path and name of a file to upload to the asset server. | |
| 283 | + * @param {string} [uploadFile=""] - The path and name of a file to upload to the asset server. | |
| 284 | 284 | * @example <caption>Upload a file to the asset server.</caption> |
| 285 | 285 | * var filename = Window.browse("Select File to Add to Asset Server", Paths.resources); |
| 286 | 286 | * print("File: " + filename); |
| @@ -317,14 +317,14 @@ public slots: · 30 unmodified lines | ||
| 317 | 317 | * NOTE: to provide a non-default value - all previous parameters must be provided. |
| 318 | 318 | * General > Snapshots. |
| 319 | 319 | * @function Window.takeSnapshot |
| 320 | − * @param {boolean} notify=true - This value is passed on through the {@link Window.stillSnapshotTaken|stillSnapshotTaken} | |
| 320 | + * @param {boolean} [notify=true] - This value is passed on through the {@link Window.stillSnapshotTaken|stillSnapshotTaken} | |
| 321 | 321 | * signal. |
| 322 | − * @param {boolean} includeAnimated=false - If <code>true</code>, a moving image is captured as an animated GIF in addition | |
| 322 | + * @param {boolean} [includeAnimated=false] - If <code>true</code>, a moving image is captured as an animated GIF in addition | |
| 323 | 323 | * to a still image. |
| 324 | − * @param {number} aspectRatio=0 - The width/height ratio of the snapshot required. If the value is <code>0</code> the | |
| 324 | + * @param {number} [aspectRatio=0] - The width/height ratio of the snapshot required. If the value is <code>0</code> the | |
| 325 | 325 | * full resolution is used (window dimensions in desktop mode; HMD display dimensions in HMD mode), otherwise one of the |
| 326 | 326 | * dimensions is adjusted in order to match the aspect ratio. |
| 327 | − * @param {string} filename="" - If this parameter is not given, the image will be saved as 'hifi-snap-by-<user name>-YYYY-MM-DD_HH-MM-SS'. | |
| 327 | + * @param {string} [filename=""] - If this parameter is not given, the image will be saved as 'hifi-snap-by-<user name>-YYYY-MM-DD_HH-MM-SS'. | |
| 328 | 328 | * If this parameter is <code>""</code> then the image will be saved as ".jpg". |
| 329 | 329 | * Otherwise, the image will be saved to this filename, with an appended ".jpg". |
| 330 | 330 | * |
| @@ -358,7 +358,7 @@ public slots: · 27 unmodified lines | ||
| 358 | 358 | * Takes a still snapshot of the current view from the secondary camera that can be set up through the {@link Render} API. |
| 359 | 359 | * NOTE: to provide a non-default value - all previous parameters must be provided. |
| 360 | 360 | * @function Window.takeSecondaryCameraSnapshot |
| 361 | − * @param {string} filename="" - If this parameter is not given, the image will be saved as 'hifi-snap-by-<user name>-YYYY-MM-DD_HH-MM-SS'. | |
| 361 | + * @param {string} [filename=""] - If this parameter is not given, the image will be saved as 'hifi-snap-by-<user name>-YYYY-MM-DD_HH-MM-SS'. | |
| 362 | 362 | * If this parameter is <code>""</code> then the image will be saved as ".jpg". |
| 363 | 363 | * Otherwise, the image will be saved to this filename, with an appended ".jpg". |
| 364 | 364 | * |
| @@ -397,7 +397,7 @@ public slots: · 32 unmodified lines | ||
| 397 | 397 | * has been prepared. |
| 398 | 398 | * @function Window.shareSnapshot |
| 399 | 399 | * @param {string} path - The path and name of the image file to share. |
| 400 | − * @param {string} href="" - The metaverse location where the snapshot was taken. | |
| 400 | + * @param {string} [href=""] - The metaverse location where the snapshot was taken. | |
| 401 | 401 | */ |
| 402 | 402 | void shareSnapshot(const QString& path, const QUrl& href = QUrl("")); |
| 403 | 403 | |