Approximate Implementation Notes
class EngagementManager : UIView
struct SInterUnit
(base functions and data needed by all InterUnits
to interface with the EngagementManager)
protocol PInterUnit
(additional functions required for all concrete InterUnits.
All concrete InterUnits are SInterUnits that implement PInterUnit)
1. Frame-buffer access
override UIView::draw(_:)
{
UIGraphicsGetCurrentContext()
UIGraphicsPushContext(_:)
(draw the InterUnit stack in back to front order)
UIGraphicsPopContext()
}
--- x --- x ---
2. User-input response
UIPress
(UIKit sends this general purpose descriptive object to the UIView
for keyboard, mouse and touch events)
UIView::setNeedsDisplay(_:)
(request for a draw, full or partial)