Summary
Use the main function for:
- Creating all windows, buttons etc.
- Initialise your application
- Then run mainloop
Use callbacks for:
- Making things happen
- Use show to show already created windows
- Use hide to hide windows without destorying them
- Don't create windows inside callbacks unless there is a very good reason
Use drawing:
- Only draw something if you want graphics
- Don't use gprintf unless there is a very good reason
- Labels, text fields and textboxes will usually do for text