diff --git a/interface/src/scripting/DesktopScriptingInterface.cpp b/interface/src/scripting/DesktopScriptingInterface.cpp index ae4af48cd6..f78f7853ca 100644 --- a/interface/src/scripting/DesktopScriptingInterface.cpp +++ b/interface/src/scripting/DesktopScriptingInterface.cpp @@ -30,21 +30,6 @@ * @property {InteractiveWindow.DockArea} LEFT - Dock to the left edge of the Interface window. * @property {InteractiveWindow.DockArea} RIGHT - Dock to the right edge of the Interface window. */ -/**jsdoc - *
A docking location of an InteractiveWindow
.
Value | Name | Description |
---|---|---|
0 | TOP | Dock to the top edge of the Interface window. |
1 | BOTTOM | Dock to the bottom edge of the Interface window. |
2 | LEFT | Dock to the left edge of the Interface window. |
3 | RIGHT | Dock to the right edge of the Interface window. |
InteractiveWindow
. Used when defining the `relativePosition` property of an `InteractiveWindow`.
+ * The possible relative position anchors of an InteractiveWindow
relative to the Interface window.
* @typedef {object} InteractiveWindow.RelativePositionAnchors
- * @property {InteractiveWindow.RelativePositionAnchor} NO_ANCHOR - Specifies that the position of the `InteractiveWindow` will not be relative to any part of the Interface window.
- * @property {InteractiveWindow.RelativePositionAnchor} TOP_LEFT - Specifies that the `relativePosition` of the `InteractiveWindow` will be offset from the top left of the Interface window.
- * @property {InteractiveWindow.RelativePositionAnchor} TOP_RIGHT - Specifies that the `relativePosition` of the `InteractiveWindow` will be offset from the top right of the Interface window.
- * @property {InteractiveWindow.RelativePositionAnchor} BOTTOM_RIGHT - Specifies that the `relativePosition` of the `InteractiveWindow` will be offset from the bottom right of the Interface window.
- * @property {InteractiveWindow.RelativePositionAnchor} BOTTOM_LEFT - Specifies that the `relativePosition` of the `InteractiveWindow` will be offset from the bottom left of the Interface window.
+ * @property {InteractiveWindow.RelativePositionAnchor} NO_ANCHOR - Position is not relative to any part of the Interface
+ * window.
+ * @property {InteractiveWindow.RelativePositionAnchor} TOP_LEFT - Position is offset from the top left of the Interface window.
+ * @property {InteractiveWindow.RelativePositionAnchor} TOP_RIGHT - Position is offset from the top right of the Interface
+ * window.
+ * @property {InteractiveWindow.RelativePositionAnchor} BOTTOM_RIGHT - Position offset from the bottom right of the Interface
+ * window.
+ * @property {InteractiveWindow.RelativePositionAnchor} BOTTOM_LEFT - Position is offset from the bottom left of the Interface
+ * window.
*/
static const QVariantMap RELATIVE_POSITION_ANCHOR {
{ "NO_ANCHOR", RelativePositionAnchor::NO_ANCHOR },
@@ -89,21 +78,6 @@ int DesktopScriptingInterface::getHeight() {
* @property {InteractiveWindow.PresentationMode} NATIVE - The window is displayed separately from the Interface window, as its
* own separate window.
*/
-/**jsdoc
- * A display mode for an InteractiveWindow
.
Value | Name | Description |
---|---|---|
0 | VIRTUAL | The window is displayed inside Interface: in the desktop window in - * desktop mode or on the HUD surface in HMD mode. |
1 | NATIVE | The window is displayed separately from the Interface window, as its - * own separate window. |
WebView
* control (defined by "WebView.qml" included in the Interface install) to embed an HTML web page (complete with
* EventBridge
object).
- * @param {InteractiveWindow.Properties} [properties] - Initial window properties.
+ * @param {InteractiveWindow.WindowProperties} [properties] - Initial window properties.
* @returns {InteractiveWindow} A new window object.
* @example InteractiveWindow
.
- * @typedef {object} InteractiveWindow.Properties
+ * Property values used when creating an InteractiveWindow
.
+ * @typedef {object} InteractiveWindow.WindowProperties
* @property {string} [title="InteractiveWindow] - The title of the window.
* @property {Vec2} [position] - The initial position of the window, in pixels.
* @property {Vec2} [size] - The initial size of the window, in pixels
@@ -142,13 +142,36 @@ void InteractiveWindow::emitMainWindowResizeEvent() {
* @property {InteractiveWindow.PresentationWindowInfo} [presentationWindowInfo] - Controls how a NATIVE
window is
* displayed. If used, the window is docked to the specified edge of the Interface window, otherwise the window is
* displayed as its own separate window.
- * @property {InteractiveWindow.AdditionalFlags} [additionalFlags=0] - Window behavior flags in addition to "native window flags" (minimize/maximize/close),
- * set at window creation. Possible flag values are provided as {@link Desktop|Desktop.ALWAYS_ON_TOP} and {@link Desktop|Desktop.CLOSE_BUTTON_HIDES}.
- * Additional flag values can be found on Qt's website at https://doc.qt.io/qt-5/qt.html#WindowType-enum.
- * @property {InteractiveWindow.OverrideFlags} [overrideFlags=0] - Window behavior flags instead of the default window flags.
- * Set at window creation. Possible flag values are provided as {@link Desktop|Desktop.ALWAYS_ON_TOP} and {@link Desktop|Desktop.CLOSE_BUTTON_HIDES}.
- * Additional flag values can be found on Qt's website at https://doc.qt.io/qt-5/qt.html#WindowType-enum.
+ * @property {InteractiveWindow.Flags} [additionalFlags=0] - Customizes window behavior.
+ * @property {InteractiveWindow.OverrideFlags} [overrideFlags=0] - Customizes window controls.
+
+ * @property {InteractiveWindow.RelativePositionAnchor} [relativePositionAnchor] - he anchor for the
+ * relativePosition
, if used.
+ * @property {Vec2} [relativePosition] - The position of the window, relative to the relativePositionAnchor
, in
+ * pixels. Excludes the window frame.
+ * @property {boolean} [isFullScreenWindow] - true
to make the window full screen.
*/
+/**jsdoc
+ * A set of flags customizing InteractiveWindow
controls. The value is constructed by using the |
+ * (bitwise OR) operator on the individual flag values..
Value | Name | Description | |
---|---|---|---|
0x00000001 | Window | Displays the window as a window rather than a dialog. | |
0x00001000 | WindowTitleHint | Adds a title bar. | + * |
0x00002000 | WindowSystemMenuHint | Adds a window system menu. | + * |
0x00004000 | WindowMinimizeButtonHint | Adds a minimize button. | + * |
0x00008000 | WindowMaximizeButtonHint | Adds a maximize button. | + * |
0x00040000 | WindowStaysOnTopHint | The window stays on top of other windows. + * Not used on Windows. + * | |
0x08000000 | WindowCloseButtonHint | Adds a close button. | + * |
A display mode for an InteractiveWindow
.
Value | Name | Description |
---|---|---|
0 | VIRTUAL | The window is displayed inside Interface: in the desktop window in + * desktop mode or on the HUD surface in HMD mode. |
1 | NATIVE | The window is displayed separately from the Interface window, as its + * own separate window. |
A docking location of an InteractiveWindow
.
Value | Name | Description |
---|---|---|
0 | TOP | Dock to the top edge of the Interface window. |
1 | BOTTOM | Dock to the bottom edge of the Interface window. |
2 | LEFT | Dock to the left edge of the Interface window. |
3 | RIGHT | Dock to the right edge of the Interface window. |
The anchor for a relative position of an InteractiveWindow
.
Value | Name | Description |
---|---|---|
0 | NO_ANCHOR | Position is not relative to any part of the Interface window. |
1 | TOP_LEFT | Position is offset from the top left of the Interface window. |
2 | TOP_RIGHT | Position is offset from the top right of the Interface window. |
3 | BOTTOM_RIGHT | Position offset from the bottom right of the Interface + * window. |
4 | BOTTOM_LEFFT | Position is offset from the bottom left of the Interface + * window. |
relativePosition
, if used.
+ * @property {Vec2} relativePosition - The position of the window, relative to the relativePositionAnchor
, in
+ * pixels. Excludes the window frame.
* @property {Vec2} size - The size of the window, in pixels.
* @property {boolean} visible - true
if the window is visible, false
if it isn't.
* @property {InteractiveWindow.PresentationMode} presentationMode - The presentation mode of the window: