There is a timer callback in IGraphicsWin.cpp, IGraphicsCocoa.mm, and IGraphicsCarbon.cpp that checks pGraphics->IsDirty(). If it returns true (which means one or more controls are dirty), then it tells the OS that the rectangle containing the dirty controls needs redrawing. Then IPlug gets a callback from the OS to redraw (Windows: WM_PAINT; Cocoa: drawRect; Carbon: kEventControlDraw), which calls pGraphics->Draw() with the rectangle that needs redrawing. In strict mode IPlug then simply redraws everything within that rectangle, dirty or not. It also calls pControl->SetClean() for each control, so after pGraphics->Draw() all controls will be clean.
|