import { Annotation, AnnotationView } from "./annotation"; import { Model } from "../../model"; import { AreaVisuals } from "./area_visuals"; import type { AutoRanged } from "../ranges/data_range1d"; import { auto_ranged } from "../ranges/data_range1d"; import type { ViewOf, BuildResult } from "../../core/build_views"; import * as mixins from "../../core/property_mixins"; import type * as visuals from "../../core/visuals"; import { CoordinateUnits } from "../../core/enums"; import type * as p from "../../core/properties"; import type { LRTB, Corners, CoordinateMapper } from "../../core/util/bbox"; import { BBox } from "../../core/util/bbox"; import type { Context2d } from "../../core/util/canvas"; import type { PanEvent, PinchEvent, Pannable, Pinchable, MoveEvent, Moveable, KeyModifiers } from "../../core/ui_events"; import { Signal } from "../../core/signaling"; import type { Rect } from "../../core/types"; import { BorderRadius } from "../common/kinds"; import * as Box from "../common/box_kinds"; import { Node } from "../coordinates/node"; import { Coordinate } from "../coordinates/coordinate"; import type { Renderer } from "../renderers/renderer"; declare const CoordinateLike: import("../../core/kinds").Kinds.Or<[number, string | number | [string, string] | [string, string, string] | [string, number] | [string, string, number] | [string, string, string, number], Coordinate]>; type CoordinateLike = typeof CoordinateLike["__type__"]; export declare const EDGE_TOLERANCE = 2.5; export declare namespace BoxInteractionHandles { type Attrs = p.AttrsOf; type Props = Model.Props & { all: p.Property; move: p.Property; resize: p.Property; sides: p.Property; corners: p.Property; left: p.Property; right: p.Property; top: p.Property; bottom: p.Property; top_left: p.Property; top_right: p.Property; bottom_left: p.Property; bottom_right: p.Property; }; } export interface BoxInteractionHandles extends BoxInteractionHandles.Attrs { } export declare class BoxInteractionHandles extends Model { properties: BoxInteractionHandles.Props; __view_type__: BoxAnnotationView; constructor(attrs?: Partial); } export declare class BoxAnnotationView extends AnnotationView implements Pannable, Pinchable, Moveable, AutoRanged { model: BoxAnnotation; visuals: BoxAnnotation.Visuals; protected _bbox: BBox; get bbox(): BBox; protected _handles: { [key in Box.HitTarget]: BoxAnnotation | null; }; protected _handles_views: { [key in Box.HitTarget]?: ViewOf; }; initialize(): void; protected _update_handles(): void; get computed_renderers(): Renderer[]; connect_signals(): void; protected _build_renderers(): Promise>; private _synthetic_lrtb; readonly [auto_ranged] = true; bounds(): Rect; log_bounds(): Rect; get mappers(): LRTB; get border_radius(): Corners; compute_geometry(): void; protected _paint(ctx: Context2d): void; interactive_bbox(): BBox; interactive_hit(sx: number, sy: number): boolean; private _hit_test; get resizable(): LRTB & Corners; get movable(): boolean; private _hittable; private _can_hit; private _pan_state; on_pan_start(ev: PanEvent): boolean; on_pan(ev: PanEvent): void; on_pan_end(ev: PanEvent): void; private _pinch_state; on_pinch_start(ev: PinchEvent): boolean; on_pinch(ev: PinchEvent): void; on_pinch_end(ev: PinchEvent): void; private get _has_hover(); private _is_hovered; on_enter(_ev: MoveEvent): boolean; on_move(_ev: MoveEvent): void; on_leave(_ev: MoveEvent): void; cursor(sx: number, sy: number): string | null; } export declare namespace BoxAnnotation { type Attrs = p.AttrsOf; type Props = Annotation.Props & { top: p.Property; bottom: p.Property; left: p.Property; right: p.Property; top_units: p.Property; bottom_units: p.Property; left_units: p.Property; right_units: p.Property; top_limit: p.Property; bottom_limit: p.Property; left_limit: p.Property; right_limit: p.Property; min_width: p.Property; min_height: p.Property; max_width: p.Property; max_height: p.Property; border_radius: p.Property; editable: p.Property; resizable: p.Property; movable: p.Property; symmetric: p.Property; use_handles: p.Property; handles: p.Property; is_handle: p.Property; inverted: p.Property; tl_cursor: p.Property; tr_cursor: p.Property; bl_cursor: p.Property; br_cursor: p.Property; ew_cursor: p.Property; ns_cursor: p.Property; in_cursor: p.Property; } & Mixins; type Mixins = mixins.Line & mixins.Fill & mixins.Hatch & mixins.HoverLine & mixins.HoverFill & mixins.HoverHatch; type Visuals = Annotation.Visuals & { line: visuals.Line; fill: visuals.Fill; hatch: visuals.Hatch; hover_line: visuals.Line; hover_fill: visuals.Fill; hover_hatch: visuals.Hatch; }; } export interface BoxAnnotation extends BoxAnnotation.Attrs { } export declare class BoxAnnotation extends Annotation { properties: BoxAnnotation.Props; __view_type__: BoxAnnotationView; constructor(attrs?: Partial); clone(attrs?: Partial): this; readonly pan: Signal<["pan" | "pan:start" | "pan:end", KeyModifiers], this>; update({ left, right, top, bottom }: LRTB): void; clear(): void; readonly nodes: { readonly left: Node; readonly right: Node; readonly top: Node; readonly bottom: Node; readonly top_left: Node; readonly top_center: Node; readonly top_right: Node; readonly center_left: Node; readonly center: Node; readonly center_right: Node; readonly bottom_left: Node; readonly bottom_center: Node; readonly bottom_right: Node; readonly width: Node; readonly height: Node; }; } export {}; //# sourceMappingURL=box_annotation.d.ts.map