# Examples

Each file is a standalone executable with its main function. Examples vary from basic hello world simplicity to some more complex things. They may contain logic bugs, however their purpose is for demonstration and for testing UI elements. If you would like to contribute fixes, improvements or more examples, you're very welcome to do so.
Some examples using drawing primitives like (paint and pong) might not work on MacOS since MacOS requires drawing to be done using Quartz drawing primitives.
Regarding animations, the buffering and event loops work differently on Windows than on other systems, so switching to a DoubleWindow and removing the sleep in the examples works better on windows.

To run the examples: 
```
$ cargo run --example editor
$ cargo run --example calculator
$ cargo run --example gallery
$ cargo run --example terminal
$ cargo run --example counter
$ cargo run --example hello
$ cargo run --example hello_button
$ cargo run --example paint
$ cargo run --example glwindow
$ cargo run --example pong
$ cargo run --example <filename>
```
