| 1234 | } |
| 1235 | |
| 1236 | void CellularPanel::Draw( TrackPanelDrawingContext &context, unsigned nPasses ) |
| 1237 | { |
| 1238 | const auto panelRect = GetClientRect(); |
| 1239 | auto lastCell = LastCell(); |
| 1240 | for ( unsigned iPass = 0; iPass < nPasses; ++iPass ) { |
| 1241 | |
| 1242 | VisitPostorder( [&]( const wxRect &rect, TrackPanelNode &node ) { |
| 1243 | |
| 1244 | // Draw the node |
| 1245 | const auto newRect = node.DrawingArea( |
| 1246 | context, rect, panelRect, iPass ); |
| 1247 | if ( newRect.Intersects( panelRect ) ) |
| 1248 | node.Draw( context, newRect, iPass ); |
| 1249 | |
| 1250 | // Draw the current handle if it is associated with the node |
| 1251 | if ( &node == lastCell.get() ) { |
| 1252 | auto target = Target(); |
| 1253 | if ( target ) { |
| 1254 | const auto targetRect = |
| 1255 | target->DrawingArea( context, rect, panelRect, iPass ); |
| 1256 | if ( targetRect.Intersects( panelRect ) ) |
| 1257 | target->Draw( context, targetRect, iPass ); |
| 1258 | } |
| 1259 | } |
| 1260 | |
| 1261 | } ); // nodes |
| 1262 | |
| 1263 | } // passes |
| 1264 | } |
nothing calls this directly
no test coverage detected