BackgroundWithBorder |
|
|
BorderInsideBox CalcBorderBox CalcInsidePart CalcOpaqueBox Draw DrawBackground |
|
Border |
Define Class BackgroundWithBorder; mixes in with Viewable; // note: if you inherit from BackgroundWithBorder, you must call DrawBackground from your Draw method (otherwise OpaqueBox is wrong) attribute Border: Border, readOnly; // return border (default to no border) // drawing overrides Draw; // call DrawBackground operation DrawBackground(); // fill content with content color, draw border, and shadow // geometry and hit testing operation BorderInsideBox(var insideBorder: Box); // return inherited border box; override to control where border is drawn overrides CalcBorderBox; // return outer edge of border (border inside box outset by border Thickness) overrides CalcInsidePart; // return partContent if probe is in the content, partBorder if probe is on the border overrides CalcOpaqueBox; // return content if opaque end class;