updated as of: April 1, 2015
last author: Andy Theuninck
The latest documentation can be found on the Project Wiki. The information below may be out of date.
The classes in gui-class-lib provide a structured way to draw screen output. All subclasses follow a nearly identical path; the variations on BasicPage just automatically fill in some common variations.

How a page is generated

  1. The preprocess() method is called. If the return is False, nothing is drawn. Preprocess is typically used to deal with session and/or form data, and to redirect to other pages when applicable. Setting headers to redirect is really the only reason I can think of to return false.
  2. Doctype, html and head tags, the default css, and jquery are all output automatically, then head_content() is called. If a store.css file is present, it will also be included after the default pos.css. Use head_content() to add more javascript or custom CSS.
  3. A closing head tag and opening body tag are output, then body_content() is called. Print the main contents here.
  4. Closing tags are added and all javascript specified by calls to the add_onload_commands() method are called. These stack; you can call add_onload_commands() multiple times to execute multiple actions on page-load.

Variants