import {Glyph} from "./Glyph"; import {ReportItemBase} from "../../items/ReportItemBase"; import {RectF, PointF} from "../../drawing/Unit"; import {Cursor} from "../../drawing/Cursor"; import {SelectionRules} from "./Enums"; import {Behavior} from "./Behavior"; export abstract class SelectionGlyphBase extends Glyph { private _item:ReportItemBase; private _bounds:RectF; private _cursor:Cursor; private _rules:SelectionRules; constructor(item:ReportItemBase, bounds:RectF, cursor:Cursor, rules:SelectionRules, behavior:Behavior) { super(behavior); this._item = item; this._bounds = bounds; this._rules = rules; this._cursor = cursor; } get item():ReportItemBase { return this._item; } get bounds():RectF { return this._bounds; } get cursor():Cursor { return this._cursor; } get rules():SelectionRules { return this._rules; } set item(value:ReportItemBase) { this._item = value; } set bounds(value:RectF) { this._bounds = value; } set cursor(value:Cursor) { this._cursor = value; } set rules(value:SelectionRules) { this._rules = value; } hitTest(pt:PointF):Cursor { if (this.bounds.contains(pt)) { return this._cursor; } return null; } }