import { Message } from '@phosphor/messaging'; import { ISignal } from '@phosphor/signaling'; import { Token } from '@phosphor/application'; import { Panel, TabPanel } from '@phosphor/widgets'; import { Widget } from '@phosphor/widgets'; /** * The inspector panel token. */ export declare const IInspector: Token; /** * An interface for an inspector panel. */ export interface IInspector { /** * The source of events the inspector panel listens for. */ source: Inspector.IInspectable; } /** * A panel which contains a set of inspectors. */ export declare class Inspector extends TabPanel implements IInspector { /** * Construct an inspector. */ constructor(options: Inspector.IOptions); /** * The source of events the inspector panel listens for. */ source: Inspector.IInspectable; /** * Dispose of the resources held by the widget. */ dispose(): void; /** * Handle `'activate-request'` messages. */ protected onActivateRequest(msg: Message): void; /** * Handle `'close-request'` messages. */ protected onCloseRequest(msg: Message): void; /** * Handle inspector update signals. */ protected onInspectorUpdate(sender: any, args: Inspector.IInspectorUpdate): void; /** * Handle source disposed signals. */ protected onSourceDisposed(sender: any, args: void): void; private _items; private _source; } /** * A namespace for Inspector statics. */ export declare namespace Inspector { /** * The definition of an inspector. */ interface IInspectable { /** * A signal emitted when the handler is disposed. */ disposed: ISignal; /** * A signal emitted when inspector should clear all items with no history. */ ephemeralCleared: ISignal; /** * A signal emitted when an inspector value is generated. */ inspected: ISignal; } /** * An update value for code inspectors. */ interface IInspectorUpdate { /** * The content being sent to the inspector for display. */ content: Widget; /** * The type of the inspector being updated. */ type: string; } /** * The definition of a child item of an inspector panel. */ interface IInspectorItem { /** * The optional class name added to the inspector child widget. */ className?: string; /** * The display name of the inspector child. */ name: string; /** * The rank order of display priority for inspector updates. A lower rank * denotes a higher display priority. */ rank: number; /** * A flag that indicates whether the inspector remembers history. * * The default value is `false`. */ remembers?: boolean; /** * The type of the inspector. */ type: string; /** * The optional inspector child item instance. */ widget?: InspectorItem; } /** * The initialization options for an inspector panel. */ interface IOptions { /** * The list of available child inspectors items for code introspection. * * #### Notes * The order of items in the inspectors array is the order in which they * will be rendered in the inspectors tab panel. */ items?: IInspectorItem[]; } } /** * A code inspector child widget. */ export declare class InspectorItem extends Panel { /** * Construct an inspector widget. */ constructor(); /** * The text of the inspector. */ content: Widget; /** * A flag that indicates whether the inspector remembers history. */ remembers: boolean; /** * The display rank of the inspector. */ rank: number; /** * Dispose of the resources held by the widget. */ dispose(): void; /** * Navigate back in history. */ private _back(); /** * Clear history. */ private _clear(); /** * Navigate forward in history. */ private _forward(); /** * Create a history toolbar. */ private _createToolbar(); /** * Navigate to a known index in history. */ private _navigateTo(index); private _content; private _history; private _index; private _rank; private _remembers; private _toolbar; }