Пример #1
0
 public override bool hitTest(SliverHitTestResult result, float mainAxisPosition = 0, float crossAxisPosition = 0)
 {
     return(!ignoring && base.hitTest(
                result,
                mainAxisPosition: mainAxisPosition,
                crossAxisPosition: crossAxisPosition
                ));
 }
Пример #2
0
 protected override bool hitTestChildren(SliverHitTestResult result, float mainAxisPosition = 0, float crossAxisPosition = 0)
 {
     return(child != null &&
            child.geometry.hitTestExtent > 0 &&
            child.hitTest(
                result,
                mainAxisPosition: mainAxisPosition,
                crossAxisPosition: crossAxisPosition));
 }
Пример #3
0
        protected override bool hitTestChildren(SliverHitTestResult result, float mainAxisPosition = 0.0f, float crossAxisPosition = 0.0f)
        {
            D.assert(geometry.hitTestExtent > 0.0f);
            if (child != null)
            {
                return(RenderSliverHelpers.hitTestBoxChild(this, new BoxHitTestResult(result), child, mainAxisPosition: mainAxisPosition,
                                                           crossAxisPosition: crossAxisPosition));
            }

            return(false);
        }
Пример #4
0
 protected override bool hitTestChildren(SliverHitTestResult result, float mainAxisPosition = 0.0f, float crossAxisPosition = 0.0f)
 {
     if (child != null && child.geometry.hitTestExtent > 0.0)
     {
         SliverPhysicalParentData childParentData = child.parentData as SliverPhysicalParentData;
         result.addWithAxisOffset(
             mainAxisPosition: mainAxisPosition,
             crossAxisPosition: crossAxisPosition,
             mainAxisOffset: childMainAxisPosition(child) ?? 0.0f,
             crossAxisOffset: (float)childCrossAxisPosition(child),
             paintOffset: childParentData.paintOffset,
             hitTest: child.hitTest
             );
     }
     return(false);
 }
Пример #5
0
        protected override bool hitTestChildren(SliverHitTestResult result, float mainAxisPosition = 0.0f,
                                                float crossAxisPosition = 0.0f)
        {
            RenderBox        child     = this.lastChild;
            BoxHitTestResult boxResult = new BoxHitTestResult(result);

            while (child != null)
            {
                if (this.hitTestBoxChild(boxResult, child, mainAxisPosition: mainAxisPosition,
                                         crossAxisPosition: crossAxisPosition))
                {
                    return(true);
                }

                child = this.childBefore(child);
            }

            return(false);
        }
Пример #6
0
        public bool hitTest(SliverHitTestResult result, float mainAxisPosition = 0, float crossAxisPosition = 0)
        {
            if (mainAxisPosition >= 0.0f && mainAxisPosition < this.geometry.hitTestExtent &&
                crossAxisPosition >= 0.0f && crossAxisPosition < this.constraints.crossAxisExtent)
            {
                if (this.hitTestChildren(result, mainAxisPosition: mainAxisPosition,
                                         crossAxisPosition: crossAxisPosition) ||
                    this.hitTestSelf(mainAxisPosition: mainAxisPosition, crossAxisPosition: crossAxisPosition))
                {
                    result.add(new SliverHitTestEntry(
                                   this,
                                   mainAxisPosition: mainAxisPosition,
                                   crossAxisPosition: crossAxisPosition
                                   ));
                    return(true);
                }
            }

            return(false);
        }
Пример #7
0
 protected virtual bool hitTestChildren(SliverHitTestResult result, float mainAxisPosition = 0,
                                        float crossAxisPosition = 0)
 {
     return(false);
 }