ref: 1ad8d13d0f99c508d3a2528dfe349f3313acc7c5 gio-example/7gui/README.md -rw-r--r-- 1.2 KiB
1ad8d13dChris Waldon windows,multiwindow: rename package for clarity 4 months ago

#7 GUIs

This demonstrates several classic GUI problems based on 7GUIs. They show different ways of using Gio framework.

The examples show one way of implementing of things, of course, there are many more.

The examples are over-commented to help understand the structure better, in practice, you don't need that many comments.


Counter shows basic usage of Gio and how to write interactions.

It displays a count value that increases when you press a button.


#Temperature Converter

Temperature conversion shows bidirectional data flow between two editable fields.

It implements a bordered field that can be used to propagate values back to another field without causing update loops.



Timer shows how to react to external signals.

It implements a timer that is running in a separate goroutine and the UI interacts with it. The same effect can be implemented in shorter ways without goroutines, however it nicely demonstrates how you would interact with information that comes in asynchronously.

The UI shows a slider to change the duration of the timer and there is a button to reset the counter.

UI, Timer