mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-01 06:11:16 +00:00
Split up ComponentWindow::run() into show(), hide() and sixtyfps::run_event_loop()
This allows creating multiple windows for example, and it will allow for showing windows in those tests that require a mapped window. As a bonus, the run() function on generated components is not consuming anymore.
This commit is contained in:
parent
2b7a1eebcd
commit
5f265ffc09
23 changed files with 186 additions and 32 deletions
|
@ -9,7 +9,11 @@ file. This header file will contain a `class` with the same name as the componen
|
|||
This class will have the following public member functions:
|
||||
|
||||
- A default constructor and a destructor.
|
||||
- A `run` function which will show the component and starts the event loop
|
||||
- A `show` function, which will show the component on the screen. Note that in order to render
|
||||
and react to user input, it's still necessary to spin the event loop, by calling `sixtyfps::run_event_loop()`
|
||||
or using the convenience `fun` function in this class.
|
||||
- A `hide` function, which de-registers the component from the windowing system.
|
||||
- A `run` convenience function, which will show the component and starts the event loop.
|
||||
- for each properties:
|
||||
* A getter `get_<property_name>` returning the property type.
|
||||
* A setter `set_<property_name>` taking the new value of the property by const reference
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue