2025-03-18 20:08:23 +04:00
|
|
|
# Widget GUI view {#js_gui__widget}
|
2025-02-13 12:50:38 +04:00
|
|
|
|
2025-03-18 20:08:23 +04:00
|
|
|
Displays a combination of custom elements on one screen.
|
2025-02-13 12:50:38 +04:00
|
|
|
|
|
|
|
|
<img src="widget.png" width="200" alt="Sample screenshot of the view" />
|
|
|
|
|
|
|
|
|
|
```js
|
|
|
|
|
let eventLoop = require("event_loop");
|
|
|
|
|
let gui = require("gui");
|
|
|
|
|
let widgetView = require("gui/widget");
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
This module depends on the `gui` module, which in turn depends on the
|
2025-03-26 17:29:26 +03:00
|
|
|
`event_loop` module, so they **must** be imported in this order. It is also
|
2025-02-13 12:50:38 +04:00
|
|
|
recommended to conceptualize these modules first before using this one.
|
|
|
|
|
|
2025-03-26 17:29:26 +03:00
|
|
|
## Example
|
2025-03-18 20:08:23 +04:00
|
|
|
For an example, refer to the `gui.js` example script.
|
2025-02-13 12:50:38 +04:00
|
|
|
|
2025-03-26 17:29:26 +03:00
|
|
|
## View props
|
2025-02-13 12:50:38 +04:00
|
|
|
This view does not have any props.
|
|
|
|
|
|
2025-03-26 17:29:26 +03:00
|
|
|
## Children
|
2025-02-13 12:50:38 +04:00
|
|
|
This view has the elements as its children.
|