import type { _NSSplitView } from "./NSSplitView.js";
import type { _NSView } from "./NSView.js";
import type { _NSNotification } from "../Foundation/NSNotification.js";
import type { CGRect } from "../structs/CGRect.js";
import type { CGSize } from "../structs/CGSize.js";
export interface _NSSplitViewDelegate {
    /**
     * Return YES if a subview can be collapsed, NO otherwise. If a split view has no delegate, or if its delegate does not respond to this message, none of the split view's subviews can be collapsed. If a split view has a delegate, and the delegate responds to this message, it will be sent at least twice when the user clicks or double-clicks on one of the split view's dividers, once per subview on either side of the divider, and may be resent as the user continues to drag the divider. If a subview is collapsible, the current implementation of NSSplitView will collapse it when the user has dragged the divider more than halfway between the position that would make the subview its minimum size and the position that would make it zero size. The subview will become uncollapsed if the user drags the divider back past that point. The comments for -splitView:constrainMinCoordinate:ofSubviewAt: and -splitView:constrainMaxCoordinate:ofSubviewAt: describe how subviews' minimum sizes are determined. Collapsed subviews are hidden but retained by the split view. Collapsing of a subview will not change its bounds, but may set its frame to zero pixels high (in horizontal split views) or zero pixels wide (vertical).
     * @deprecated NSSplitView no longer supports collapsing sections via double-click. This delegate method is never called.
     */
    splitView$canCollapseSubview$?(splitView: _NSSplitView, subview: _NSView): boolean;
    /**
     * Return YES if the subview should be collapsed because the user has double-clicked on an adjacent divider. If a split view has a delegate, and the delegate responds to this message, it will be sent once for the subview before a divider when the user double-clicks on that divider, and again for the subview after the divider, but only if the delegate returned YES when sent -splitView:canCollapseSubview: for the subview in question. When the delegate indicates that both subviews should be collapsed NSSplitView's behavior is undefined.
     * @deprecated NSSplitView no longer supports collapsing sections via double-click. This delegate method is never called.
     */
    splitView$shouldCollapseSubview$forDoubleClickOnDividerAtIndex$?(splitView: _NSSplitView, subview: _NSView, dividerIndex: number): boolean;
    /**
     * Given a proposed minimum allowable position for one of the dividers of a split view, return the minimum allowable position for the divider. If a split view has no delegate, or if its delegate does not respond to this message, the split view behaves as if it has a delegate that responds to this message by merely returning the proposed minimum. If a split view has a delegate, and the delegate responds to this message, it will be sent at least once when the user begins dragging one of the split view's dividers, and may be resent as the user continues to drag the divider. Delegates that respond to this message and return a number larger than the proposed minimum position effectively declare a minimum size for the subview above or to the left of the divider in question, the minimum size being the difference between the proposed and returned minimum positions. This minimum size is only effective for the divider-dragging operation during which the -splitView:constrainMinCoordinate:ofSubviewAt: message is sent. NSSplitView's behavior is undefined when a delegate responds to this message by returning a number smaller than the proposed minimum.
     */
    splitView$constrainMinCoordinate$ofSubviewAt$?(splitView: _NSSplitView, proposedMinimumPosition: number, dividerIndex: number): number;
    /**
     * Given a proposed maximum allowable position for one of the dividers of a split view, return the maximum allowable position for the divider. If a split view has no delegate, or if its delegate does not respond to this message, the split view behaves as if it has a delegate that responds to this message by merely returning the proposed maximum. If a split view has a delegate, and the delegate responds to this message, it will be sent at least once when the user begins dragging one of the split view's dividers, and may be resent as the user continues to drag the divider. Delegates that respond to this message and return a number smaller than the proposed maximum position effectively declare a minimum size for the subview below or to the right of the divider in question, the minimum size being the difference between the proposed and returned maximum positions. This minimum size is only effective for the divider-dragging operation during which the -splitView:constrainMaxCoordinate:ofSubviewAt: message is sent. NSSplitView's behavior is undefined when a delegate responds to this message by returning a number larger than the proposed maximum.
     */
    splitView$constrainMaxCoordinate$ofSubviewAt$?(splitView: _NSSplitView, proposedMaximumPosition: number, dividerIndex: number): number;
    /**
     * Given a proposed position for one of the dividers of a split view, return a position at which the divider should be placed as the user drags it. If a split view has no delegate, or if its delegate does not respond to this message, the split view behaves as if it has a delegate that responds to this message by merely returning the proposed position. If a split view has a delegate, and the delegate responds to this message, it will be sent repeatedly as the user drags one of the split view's dividers.
     */
    splitView$constrainSplitPosition$ofSubviewAt$?(splitView: _NSSplitView, proposedPosition: number, dividerIndex: number): number;
    /**
     * Given that a split view has been resized but has not yet adjusted its subviews to accommodate the new size, and given the former size of the split view, adjust the subviews to accommodate the new size of the split view. If a split view has no delegate, or if its delegate does not respond to this message, the split view behaves as if it has a delegate that responds to this message by merely sending the split view an -adjustSubviews message. Delegates that respond to this message should adjust the frames of the uncollapsed subviews so that they exactly fill the split view with room for dividers in between, taking its new size into consideration. The thickness of dividers can be determined by sending the split view a -dividerThickness message.
     */
    splitView$resizeSubviewsWithOldSize$?(splitView: _NSSplitView, oldSize: CGSize): void;
    /**
     * Given that a split view has been resized and is adjusting its subviews to accommodate the new size, return YES if -adjustSubviews can change the size of the indexed subview, NO otherwise. -adjustSubviews may change the origin of the indexed subview regardless of what this method returns. -adjustSubviews may also resize otherwise nonresizable subviews to prevent an invalid subview layout. If a split view has no delegate, or if its delegate does not respond to this message, the split view behaves as if it has a delegate that returns YES when sent this message.
     */
    splitView$shouldAdjustSizeOfSubview$?(splitView: _NSSplitView, view: _NSView): boolean;
    /**
     * Given that a split view has been resized and is adjusting its subviews to accommodate the new size, or that the user is dragging a divider, return YES to allow the divider to be dragged or adjusted off the edge of the split view where it will not be visible. If a split view has no delegate, or if its delegate does not respond to this message, the split view behaves as if it has a delegate that returns NO when sent this message.
     */
    splitView$shouldHideDividerAtIndex$?(splitView: _NSSplitView, dividerIndex: number): boolean;
    /**
     * Given the drawn frame of a divider (in the coordinate system established by the split view's bounds), return the frame in which mouse clicks should initiate divider dragging. If a split view has no delegate, or if its delegate does not respond to this message, the split view behaves as if it has a delegate that returns proposedEffectiveRect when sent this message. A split view with thick dividers proposes the drawn frame as the effective frame. A split view with thin dividers proposes an effective frame that's a little larger than the drawn frame, to make it easier for the user to actually grab the divider.
     */
    splitView$effectiveRect$forDrawnRect$ofDividerAtIndex$?(splitView: _NSSplitView, proposedEffectiveRect: CGRect, drawnRect: CGRect, dividerIndex: number): CGRect;
    /**
     * Given a divider index, return an additional rectangular area (in the coordinate system established by the split view's bounds) in which mouse clicks should also initiate divider dragging, or NSZeroRect to not add one. If a split view has no delegate, or if its delegate does not respond to this message, only mouse clicks within the effective frame of a divider initiate divider dragging.
     */
    splitView$additionalEffectiveRectOfDividerAtIndex$?(splitView: _NSSplitView, dividerIndex: number): CGRect;
    /**
     * Respond as if the delegate had registered for the NSSplitViewDidResizeSubviewsNotification or NSSplitViewWillResizeSubviewsNotification notification, described below. A split view's behavior is not explicitly affected by a delegate's ability or inability to respond to these messages, though the delegate may send messages to the split view in response to these messages.
     */
    splitViewWillResizeSubviews$?(notification: _NSNotification): void;
    splitViewDidResizeSubviews$?(notification: _NSNotification): void;
}
