()
| 428 | |
| 429 | /// <inheritdoc /> |
| 430 | protected override void DrawChildren() |
| 431 | { |
| 432 | // Draw child controls that are not arranged (pined to the header, etc.) |
| 433 | for (int i = 0; i < _children.Count; i++) |
| 434 | { |
| 435 | var child = _children[i]; |
| 436 | if (!child.IsScrollable && child.Visible) |
| 437 | { |
| 438 | Render2D.PushTransform(ref child._cachedTransform); |
| 439 | child.Draw(); |
| 440 | Render2D.PopTransform(); |
| 441 | } |
| 442 | } |
| 443 | |
| 444 | // Check if isn't fully closed |
| 445 | if (!_isClosed || _animationProgress < 0.998f) |
| 446 | { |
| 447 | // Draw children with clipping mask (so none of the controls will override the header) |
| 448 | Rectangle clipMask = new Rectangle(0, HeaderHeight, Width, Height - HeaderHeight); |
| 449 | Render2D.PushClip(ref clipMask); |
| 450 | if (CullChildren) |
| 451 | { |
| 452 | Render2D.PeekClip(out var globalClipping); |
| 453 | Render2D.PeekTransform(out var globalTransform); |
| 454 | for (int i = 0; i < _children.Count; i++) |
| 455 | { |
| 456 | var child = _children[i]; |
| 457 | if (child.IsScrollable && child.Visible) |
| 458 | { |
| 459 | Matrix3x3.Multiply(ref child._cachedTransform, ref globalTransform, out var globalChildTransform); |
| 460 | var childGlobalRect = new Rectangle(globalChildTransform.M31, globalChildTransform.M32, child.Width * globalChildTransform.M11, child.Height * globalChildTransform.M22); |
| 461 | if (globalClipping.Intersects(ref childGlobalRect)) |
| 462 | { |
| 463 | Render2D.PushTransform(ref child._cachedTransform); |
| 464 | child.Draw(); |
| 465 | Render2D.PopTransform(); |
| 466 | } |
| 467 | } |
| 468 | } |
| 469 | } |
| 470 | else |
| 471 | { |
| 472 | for (int i = 0; i < _children.Count; i++) |
| 473 | { |
| 474 | var child = _children[i]; |
| 475 | if (child.IsScrollable && child.Visible) |
| 476 | { |
| 477 | Render2D.PushTransform(ref child._cachedTransform); |
| 478 | child.Draw(); |
| 479 | Render2D.PopTransform(); |
| 480 | } |
| 481 | } |
| 482 | } |
| 483 | |
| 484 | Render2D.PopClip(); |
| 485 | } |
| 486 | } |
| 487 |
nothing calls this directly
no test coverage detected