This repository has been archived by the owner on Dec 11, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 18
More
Alexis Lozano edited this page Sep 21, 2019
·
1 revision
Neutrino is full of suprise ! You can do other things not written in the first parts of this tutorial. Let us dive in some other features.
Let say you want to count the seconds elapsed since the launch your application.
You can ! Just use the set_timer(1000)
function on your Window object :
// ...
let mut window = Window::new();
window.set_title("Timer");
window.set_size(320, 240);
window.set_child(Box::new(button));
window.set_timer(1000); // period in ms
window.set_listener(Box::new(wlistener));
App::run(window);
Here, a Tick
event will be emitted every 1000ms = 1s. Look at the result of
the timer
example :
You can create a Sidepane very easily with Neutrino ! You just have to add tabs
with Direction::Vertical
. Here is the result on demo_fluent
:
- Preamble
- Install
- Examples
- Preamble
- Your first window
- Add a label
- Conclusion
- Preamble
- What is MVC ?
- A simple counter
- Conclusion
- Preamble
- Display an image
- Add the previous and next buttons
- Add the menu bar
- Add keyboard shortcuts
- Conclusion
- Preamble
- User-defined styles
- Neutrino-defined themes
- Icons
- Conclusion
- Preamble
- Time generated events
- Side Pane