Hybris Program Structure as of 0.5.0:

1. Class Hierarchy

Object
  Event
    Key


2. Files, DataTypes, and Procedures

display
 `- display procedures
     |- begin (initialise screen)
     |- clear (clear screen)
     |- end (deinitialise screen)
     |- goto (set cursor position)
     |- print (overwrite screen characters from cursor position)
     |- clreol (erase till right side of screen)
     |- global_remap (key translation)
     `- getch (get next key)

event
 |- typedef int32 (32-bit signed integer on all platforms supported)
 |- typedef struct Event (User IO Event)
 |   |- #enumeration DT_* (Event types)
 |   |- #enumeration DKM_* (Keyboard Modifier types)
 |   |- #enumeration DK_* (Key names)
 |   |- loop (event loop)
 |   |- send (send event)
 |   `- tolower (convert alpha key event to lowercase)
 `- typedef Reflex (function pointer with context)

hybris
 |- procedures
 |   |- init_tree
 |   `- main
 `- variables
     `- top

menu
 |- typedef struct KeyBinding
 |- typedef struct Menu
 `- typedef struct WTopMenu
     |- new
     |- reflex
     |- paint
     `- set

node
 `- typedef struct Node (nary-Tree node)
     |- new (create node)
     |- gettext (read text from here)
     |- deltext (delete characters)
     |- settext (rewrite whole text)
     |- lentext (find out length of text)
     |- insnode (insert a subnode)
     |- delnode (delete a subnode)
     |- nnodes (find out length of subnode list)
     |- parent (find out the supernode of this node)
     `- inparent (find out the number of this node in its supernode)

vtext
 `- typedef struct VText
     |- new
     |- exit
     |- backspace
     `- otherkey

vtree
 `- typedef struct VTree
     |- new
     |- paint
     |- vmove (move cursor inside list of nodes)
     |- outwards (move cursor to parent)
     `- inwards (move cursor to first child)

window
 `- typedef struct Widget

