import { ObjectManager } from "../ObjectManager"; import { ObjectBase } from "../ObjectBase"; import { DestinationBase } from "./Destination"; import { PdfCollection } from "./PdfCollection"; import { type PdfDocument } from "./PdfDocument"; import { ActionBase } from "./Action"; import type { DestinationProperties } from "./Destination"; import type { ActionProperties } from "./Action"; import type { Color } from "../Types"; import { OutlineNodeFontStyle } from "../Enums"; /** * Defines the collection of {@link OutlineNode} objects. **/ export declare class OutlineNodeCollection extends PdfCollection { private constructor(); static innerCreate(om: ObjectManager, id: number): OutlineNodeCollection; get count(): number; getAt(index: number): OutlineNode; setAt(index: number, item: OutlineNode): void; insert(index: number, item: OutlineNode): void; contains(item: OutlineNode): boolean; remove(item: OutlineNode): boolean; removeAt(index: number): void; clear(): void; /** * Gets the {@link PdfDocument} object that owns this collection. */ get doc(): PdfDocument; /** * Adds an item to the end of the collection. * @param item - The outline node specified as {@link OutlineNodeProperties} or {@link OutlineNode}. */ add(item: OutlineNodeProperties | OutlineNode): void; } /** * Defines properties of the outline node within PDF document. * See {@link OutlineNode}. */ export type OutlineNodeProperties = { /** * The title of the outline node. */ title: string; /** * The text color of the outline node. */ textColor?: Color; /** * The text style of the outline node. */ textStyle?: OutlineNodeFontStyle; /** * The {@link DestinationBase} to be displayed when this {@link OutlineNode} is activated. */ dest?: DestinationProperties; /** * The {@link ActionBase} to be performed when this {@link OutlineNode} is activated. */ action?: ActionProperties; /** * Indicates whether this {@link OutlineNode} expanded and its child nodes are visible. */ expanded?: boolean; /** * The child nodes. */ children?: OutlineNodeProperties[]; }; /** * Defines the outline node within PDF document. */ export declare class OutlineNode extends ObjectBase { /** * Initialize a new instance of the {@link OutlineNode} class. * * @param om - {@link ObjectManager} that controls the lifetime of the {@link OutlineNode}. * @param title - The title of {@link OutlineNode}. * @param action - The action which should be performed or destination defining the new document view. * @param expanded - Indicates whether the node should be expanded. */ constructor(om: ObjectManager, title?: string, action?: DestinationBase | DestinationProperties | ActionBase | ActionProperties, expanded?: boolean); /** * Initialize a new instance of the {@link OutlineNode} class. * * @param title - The title of {@link OutlineNode}. * @param action - The action which should be performed or destination defining the new document view. * @param expanded - Indicates whether the node should be expanded. */ constructor(title?: string, action?: DestinationBase | DestinationProperties | ActionBase | ActionProperties, expanded?: boolean); /** * Gets the {@link PdfDocument} owning this object. */ get doc(): PdfDocument | null; /** * Gets the {@link OutlineNodeCollection} collection containing this object. */ get owner(): OutlineNodeCollection | null; /** * Gets the parent {@link OutlineNode}. */ get parent(): OutlineNode | null; /** * Gets or sets the title of the outline node. */ get title(): string | null; /** * Gets or sets the title of the outline node. */ set title(value: string | null); /** * Gets or sets the text color of the outline node. */ get textColor(): Color; /** * Gets or sets the text color of the outline node. */ set textColor(value: Color); /** * Gets or sets the text style of the outline node. */ get textStyle(): OutlineNodeFontStyle; /** * Gets or sets the text style of the outline node. */ set textStyle(value: OutlineNodeFontStyle); /** * Gets or sets the {@link DestinationBase} to be displayed when this {@link OutlineNode} is activated. * If both 'dest' and 'action' are specified, * the viewer application will determine the behavior, which may be unpredictable. * For consistent results, specify only one. */ get dest(): DestinationBase | null; /** * Gets or sets the {@link DestinationBase} to be displayed when this {@link OutlineNode} is activated. * If both 'dest' and 'action' are specified, * the viewer application will determine the behavior, which may be unpredictable. * For consistent results, specify only one. */ set dest(value: DestinationBase | DestinationProperties | null); /** * Gets or sets the {@link ActionBase} to be performed when this {@link OutlineNode} is activated. * If both 'dest' and 'action' are specified, * the viewer application will determine the behavior, which may be unpredictable. * For consistent results, specify only one. */ get action(): ActionBase | null; /** * Gets or sets the {@link ActionBase} to be performed when this {@link OutlineNode} is activated. * If both 'dest' and 'action' are specified, * the viewer application will determine the behavior, which may be unpredictable. * For consistent results, specify only one. */ set action(value: ActionProperties | ActionBase | null); /** * Gets or sets a value indicating whether this {@link OutlineNode} expanded and its child nodes are visible. */ get expanded(): boolean; /** * Gets or sets a value indicating whether this {@link OutlineNode} expanded and its child nodes are visible. */ set expanded(value: boolean); /** * Gets a value indicating whether {@link children} collection is not empty. */ get hasChildren(): boolean; /** * Gets the {@link OutlineNodeCollection} collection containing child nodes. */ get children(): OutlineNodeCollection; }