Crash course

This is a crash course on writing apps for ZPUI, with links to more in-depth explanations.

Basics

Showing things on the screen

  • Want to display some text real quick? Use display_data.
  • Want to display some text in a more user-friendly fashion, with UX bells&whistles? Use PrettyPrinter.
  • Want to display an image? Use display_image.
  • Want to display an image in a more user-friendly fashion, with UX bells&whistles? Use GraphicsPrinter.
  • Want to construct an image dynamically? Use Canvas.

Interactivity

  • Want some very basic interactivity? Setup some input callbacks and start an input thread.
  • How do callbacks work, what’s a keymap and how do you set one? Read here.
  • Want to make a very basic loop and allow the user to interrupt it? Use ExitHelper.
  • Want to make a menu for your application? Use a Menu.
  • Want to make a “pick any items out of many and accept” choice? Use a Checkbox.
  • Want to make a “pick one out of many” choice? Use a Listbox.
  • Want to make a “Yes”/”No”[/”Cancel”] choice? Use DialogBox.
  • Want to make a status screen? Use a Refresher.
  • Want to input some text? Use UniversalInput.
  • Want to adjust a number? Use IntegerAdjustInput.
  • Want to pick a directory/file? Use PathPicker.
  • Want to pick a date from the calendar? Use DatePicker.
  • Want to pick a time? Use TimePicker.
  • Want to show a lot of text on the screen? Use TextReader.
  • Want to indicate that some task is in progress? Use LoadingBar.
  • Want to indicate a task is in progress, with a progress estimate? Use ProgressBar.
  • Want to make an UI element react to more buttons? Here’s how you do that.

App internals