Commit b5923f92 authored by Adam Barth's avatar Adam Barth

[rename fixit] Painter -> RenderObjectPainter

Fixes #774
parent d78b78c4
...@@ -239,7 +239,7 @@ class RenderBlockViewport extends RenderBlockBase { ...@@ -239,7 +239,7 @@ class RenderBlockViewport extends RenderBlockBase {
ExtentCallback totalExtentCallback, ExtentCallback totalExtentCallback,
ExtentCallback maxCrossAxisDimensionCallback, ExtentCallback maxCrossAxisDimensionCallback,
ExtentCallback minCrossAxisDimensionCallback, ExtentCallback minCrossAxisDimensionCallback,
Painter overlayPainter, RenderObjectPainter overlayPainter,
Axis mainAxis: Axis.vertical, Axis mainAxis: Axis.vertical,
double itemExtent, double itemExtent,
double minExtent: 0.0, double minExtent: 0.0,
...@@ -309,9 +309,9 @@ class RenderBlockViewport extends RenderBlockBase { ...@@ -309,9 +309,9 @@ class RenderBlockViewport extends RenderBlockBase {
markNeedsLayout(); markNeedsLayout();
} }
Painter get overlayPainter => _overlayPainter; RenderObjectPainter get overlayPainter => _overlayPainter;
Painter _overlayPainter; RenderObjectPainter _overlayPainter;
void set overlayPainter(Painter value) { void set overlayPainter(RenderObjectPainter value) {
if (_overlayPainter == value) if (_overlayPainter == value)
return; return;
if (attached) if (attached)
......
...@@ -358,7 +358,7 @@ class RenderGrid extends RenderVirtualViewport<GridParentData> { ...@@ -358,7 +358,7 @@ class RenderGrid extends RenderVirtualViewport<GridParentData> {
int virtualChildBase: 0, int virtualChildBase: 0,
int virtualChildCount, int virtualChildCount,
Offset paintOffset: Offset.zero, Offset paintOffset: Offset.zero,
Painter overlayPainter, RenderObjectPainter overlayPainter,
LayoutCallback callback LayoutCallback callback
}) : _delegate = delegate, _virtualChildBase = virtualChildBase, super( }) : _delegate = delegate, _virtualChildBase = virtualChildBase, super(
virtualChildCount: virtualChildCount, virtualChildCount: virtualChildCount,
......
...@@ -20,7 +20,7 @@ class RenderList extends RenderVirtualViewport<ListParentData> { ...@@ -20,7 +20,7 @@ class RenderList extends RenderVirtualViewport<ListParentData> {
Offset paintOffset: Offset.zero, Offset paintOffset: Offset.zero,
Axis mainAxis: Axis.vertical, Axis mainAxis: Axis.vertical,
ViewportAnchor anchor: ViewportAnchor.start, ViewportAnchor anchor: ViewportAnchor.start,
Painter overlayPainter, RenderObjectPainter overlayPainter,
LayoutCallback callback LayoutCallback callback
}) : _itemExtent = itemExtent, }) : _itemExtent = itemExtent,
_padding = padding, _padding = padding,
......
...@@ -323,7 +323,7 @@ class PaintingContext { ...@@ -323,7 +323,7 @@ class PaintingContext {
/// ///
/// A renderer may allow its paint() method to be augmented or redefined by /// A renderer may allow its paint() method to be augmented or redefined by
/// providing a Painter. See for example overlayPainter in BlockViewport. /// providing a Painter. See for example overlayPainter in BlockViewport.
abstract class Painter { abstract class RenderObjectPainter {
RenderObject get renderObject => _renderObject; RenderObject get renderObject => _renderObject;
RenderObject _renderObject; RenderObject _renderObject;
......
...@@ -86,7 +86,7 @@ class RenderViewportBase extends RenderBox implements HasMainAxis { ...@@ -86,7 +86,7 @@ class RenderViewportBase extends RenderBox implements HasMainAxis {
Offset paintOffset, Offset paintOffset,
Axis mainAxis, Axis mainAxis,
ViewportAnchor anchor, ViewportAnchor anchor,
Painter overlayPainter RenderObjectPainter overlayPainter
) : _paintOffset = paintOffset, ) : _paintOffset = paintOffset,
_mainAxis = mainAxis, _mainAxis = mainAxis,
_anchor = anchor, _anchor = anchor,
...@@ -150,9 +150,9 @@ class RenderViewportBase extends RenderBox implements HasMainAxis { ...@@ -150,9 +150,9 @@ class RenderViewportBase extends RenderBox implements HasMainAxis {
markNeedsSemanticsUpdate(); markNeedsSemanticsUpdate();
} }
Painter get overlayPainter => _overlayPainter; RenderObjectPainter get overlayPainter => _overlayPainter;
Painter _overlayPainter; RenderObjectPainter _overlayPainter;
void set overlayPainter(Painter value) { void set overlayPainter(RenderObjectPainter value) {
if (_overlayPainter == value) if (_overlayPainter == value)
return; return;
if (attached) if (attached)
...@@ -220,7 +220,7 @@ class RenderViewport extends RenderViewportBase with RenderObjectWithChildMixin< ...@@ -220,7 +220,7 @@ class RenderViewport extends RenderViewportBase with RenderObjectWithChildMixin<
Offset paintOffset: Offset.zero, Offset paintOffset: Offset.zero,
Axis mainAxis: Axis.vertical, Axis mainAxis: Axis.vertical,
ViewportAnchor anchor: ViewportAnchor.start, ViewportAnchor anchor: ViewportAnchor.start,
Painter overlayPainter, RenderObjectPainter overlayPainter,
this.onPaintOffsetUpdateNeeded this.onPaintOffsetUpdateNeeded
}) : super(paintOffset, mainAxis, anchor, overlayPainter) { }) : super(paintOffset, mainAxis, anchor, overlayPainter) {
this.child = child; this.child = child;
...@@ -340,7 +340,7 @@ abstract class RenderVirtualViewport<T extends ContainerBoxParentDataMixin<Rende ...@@ -340,7 +340,7 @@ abstract class RenderVirtualViewport<T extends ContainerBoxParentDataMixin<Rende
Offset paintOffset: Offset.zero, Offset paintOffset: Offset.zero,
Axis mainAxis: Axis.vertical, Axis mainAxis: Axis.vertical,
ViewportAnchor anchor: ViewportAnchor.start, ViewportAnchor anchor: ViewportAnchor.start,
Painter overlayPainter RenderObjectPainter overlayPainter
}) : _virtualChildCount = virtualChildCount, }) : _virtualChildCount = virtualChildCount,
_callback = callback, _callback = callback,
super(paintOffset, mainAxis, anchor, overlayPainter); super(paintOffset, mainAxis, anchor, overlayPainter);
......
...@@ -28,7 +28,7 @@ export 'package:flutter/rendering.dart' show ...@@ -28,7 +28,7 @@ export 'package:flutter/rendering.dart' show
MaxTileWidthGridDelegate, MaxTileWidthGridDelegate,
MultiChildLayoutDelegate, MultiChildLayoutDelegate,
OneChildLayoutDelegate, OneChildLayoutDelegate,
Painter, RenderObjectPainter,
PaintingContext, PaintingContext,
PlainTextSpan, PlainTextSpan,
PointerCancelEvent, PointerCancelEvent,
...@@ -859,7 +859,7 @@ class Viewport extends OneChildRenderObjectWidget { ...@@ -859,7 +859,7 @@ class Viewport extends OneChildRenderObjectWidget {
/// Paints an overlay over the viewport. /// Paints an overlay over the viewport.
/// ///
/// Often used to paint scroll bars. /// Often used to paint scroll bars.
final Painter overlayPainter; final RenderObjectPainter overlayPainter;
final ViewportDimensionsChangeCallback onPaintOffsetUpdateNeeded; final ViewportDimensionsChangeCallback onPaintOffsetUpdateNeeded;
......
...@@ -239,7 +239,7 @@ class PageViewport extends VirtualViewportFromIterable { ...@@ -239,7 +239,7 @@ class PageViewport extends VirtualViewportFromIterable {
final Axis mainAxis; final Axis mainAxis;
final ViewportAnchor anchor; final ViewportAnchor anchor;
final bool itemsWrap; final bool itemsWrap;
final Painter overlayPainter; final RenderObjectPainter overlayPainter;
final Iterable<Widget> children; final Iterable<Widget> children;
RenderList createRenderObject(BuildContext context) => new RenderList(); RenderList createRenderObject(BuildContext context) => new RenderList();
......
...@@ -706,7 +706,7 @@ class Block extends StatelessComponent { ...@@ -706,7 +706,7 @@ class Block extends StatelessComponent {
} }
} }
abstract class ScrollableListPainter extends Painter { abstract class ScrollableListPainter extends RenderObjectPainter {
void attach(RenderObject renderObject) { void attach(RenderObject renderObject) {
assert(renderObject is RenderBox); assert(renderObject is RenderBox);
assert(renderObject is HasMainAxis); assert(renderObject is HasMainAxis);
......
...@@ -111,7 +111,7 @@ class _VirtualListViewport extends VirtualViewport { ...@@ -111,7 +111,7 @@ class _VirtualListViewport extends VirtualViewport {
final double itemExtent; final double itemExtent;
final bool itemsWrap; final bool itemsWrap;
final EdgeDims padding; final EdgeDims padding;
final Painter overlayPainter; final RenderObjectPainter overlayPainter;
double get _leadingPadding { double get _leadingPadding {
switch (mainAxis) { switch (mainAxis) {
...@@ -251,7 +251,7 @@ class ListViewport extends _VirtualListViewport with VirtualViewportFromIterable ...@@ -251,7 +251,7 @@ class ListViewport extends _VirtualListViewport with VirtualViewportFromIterable
double itemExtent, double itemExtent,
bool itemsWrap: false, bool itemsWrap: false,
EdgeDims padding, EdgeDims padding,
Painter overlayPainter, RenderObjectPainter overlayPainter,
this.children this.children
}) : super( }) : super(
onExtentsChanged, onExtentsChanged,
...@@ -360,7 +360,7 @@ class LazyListViewport extends _VirtualListViewport with VirtualViewportFromBuil ...@@ -360,7 +360,7 @@ class LazyListViewport extends _VirtualListViewport with VirtualViewportFromBuil
ViewportAnchor anchor: ViewportAnchor.start, ViewportAnchor anchor: ViewportAnchor.start,
double itemExtent, double itemExtent,
EdgeDims padding, EdgeDims padding,
Painter overlayPainter, RenderObjectPainter overlayPainter,
this.itemCount, this.itemCount,
this.itemBuilder this.itemBuilder
}) : super( }) : super(
......
...@@ -8,7 +8,7 @@ import 'package:test/test.dart'; ...@@ -8,7 +8,7 @@ import 'package:test/test.dart';
import 'rendering_tester.dart'; import 'rendering_tester.dart';
class TestBlockPainter extends Painter { class TestBlockPainter extends RenderObjectPainter {
void paint(PaintingContext context, Offset offset) { } void paint(PaintingContext context, Offset offset) { }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment