import controls = require("./controls"); export interface ILayoutPart { splitHorizontal(sizes: number[]): ILayoutPart[]; splitVertical(sizes: number[]): ILayoutPart[]; element(): Element; } export import IMenu = controls.IMenu; export import IContributionItem = controls.IContributionItem; export import ToolbarRenderer = controls.ToolbarRenderer; export import Context = controls.Context; export import DrowpdownMenu = controls.DrowpdownMenu; export declare class LayoutPart implements ILayoutPart { private _el; constructor(_el: Element); splitHorizontal(sizes: number[]): ILayoutPart[]; splitVertical(sizes: number[]): ILayoutPart[]; element(): Element; } export interface IPartHolder { setViewMenu(m: IMenu): any; setToolbar(m: IMenu): any; setContextMenu(m: IMenu): any; setStatusMessage(message: string): any; updateTitle(t: string): any; } export interface IWorkbenchPart extends controls.IControl { id(): string; title(): string; render(e: Element): any; searchable?: boolean; onSearch?(searchStr: string): any; init?(h: IPartHolder): any; } export declare class Pane implements IPartHolder { _part: ILayoutPart; _v: IWorkbenchPart; menuContentElement: Element; contextMenuElement: Element; viewMenuButton: Element; _application: Application; setStatusMessage(m: string): void; toolbarContentElement: Element; setContextMenu(m: IMenu): void; setViewMenu(m: IMenu): void; setToolbar(m: IMenu): void; constructor(_part: ILayoutPart); addPart(v: IWorkbenchPart): void; hid: string; render(): void; titleId: string; updateTitle(newTitle: string): void; private updateHeader(searchId, tid, mid, menuId); } export declare class ContributionManager { private onChange; menu: IMenu; constructor(onChange: (m: IMenu) => void); add(item: IContributionItem): void; remove(item: IContributionItem): void; } export declare abstract class ViewPart implements IWorkbenchPart, ISelectionProvider { private _id; private _title; addSelectionConsumer(t: { setInput(c: any); }): void; protected selectionListeners: ISelectionListener[]; protected contentElement: Element; protected holder: IPartHolder; protected selection: any[]; protected contextMenu: ContributionManager; protected toolbar: ContributionManager; protected viewMenu: ContributionManager; protected setStatusMessage(m: string): void; getContextMenu(): ContributionManager; getToolbar(): ContributionManager; getViewMenu(): ContributionManager; getHolder(): IPartHolder; addSelectionListener(l: ISelectionListener): void; setTitle(t: string): void; removeSelectionListener(l: ISelectionListener): void; getSelection(): any[]; protected onSelection(v: any[]): void; constructor(_id: any, _title: any); title(): any; id(): any; init(holder: IPartHolder): void; render(e: Element): void; hide(): void; show(): void; refresh(): void; abstract innerRender(e: Element): any; dispose(): void; } export declare function getView(e: Element): ViewPart; export interface ILabelProvider { label(e: any): string; icon?(e: any): string; } export interface ITreeContentProvider { elements(i: any): any[]; children(i: any): any[]; } export interface ISelectionListener { selectionChanged(newSelection: any[]): any; } export interface ISelectionProvider { addSelectionListener(l: ISelectionListener): any; removeSelectionListener(l: ISelectionListener): any; getSelection(): any[]; } export declare class ArrayContentProvider implements ITreeContentProvider { children(x: any): any[]; elements(x: any): any; } export interface IFilter { accept(x: any): any; } export interface IComparator { compare(a: any, b: any): number; init?(view: any): any; } export declare class ContentProviderProxy implements ITreeContentProvider { private _inner; filters: IFilter[]; sorter: IComparator; constructor(_inner: ITreeContentProvider); elements(x: any): any[]; children(x: any): any[]; } export declare class BasicSorter implements IComparator { _labelProvider: ILabelProvider; constructor(); init(v: TreeView): void; compare(a: any, b: any): number; } export interface INode { nodes: INode[]; original: any; } export declare class TreeView extends ViewPart { treeId: string; contentProvider: ContentProviderProxy; labelProvider: ILabelProvider; input: any; treeNodes: INode[]; searchable: boolean; asyncRender: boolean; setSorter(s: IComparator): void; addFilter(f: IFilter): void; removeFilter(f: IFilter): void; select(model: any): void; expand(l: number): void; hasModel(model: any): boolean; pattern: string; onSearch(s: string): boolean; private afterSearch(s); setContentProvider(i: ITreeContentProvider): void; setLabelProvider(l: ILabelProvider): void; getInput(): any; setInput(x: any): void; styleString: string; innerRender(e: Element): void; autoExpand: number; private renderTreeControl(treeId, view); getTree(): any[]; } export declare enum Relation { LEFT = 0, RIGHT = 1, BOTTOM = 2, TOP = 3, STACk = 4, } export declare class Page { panes: Pane[]; root: ILayoutPart; app: Application; constructor(r: string); addView(v: IWorkbenchPart, relatedTo: string, ratio: number, r: Relation): void; createPane(relatedTo: string, ratio: number, r: Relation): Pane; findPane(s: string): Pane; } export declare abstract class AccorditionTreeView extends ViewPart { protected node: any; constructor(title: string); createTree(name: string): TreeView; seachable: boolean; protected control: controls.Accordition; protected trees: TreeView[]; protected addTree(label: string, at: any): void; onSearch(searchStr: string): void; setSelection(o: any): void; protected abstract load(): any; protected abstract customizeAccordition(root: controls.Accordition, node: any): any; protected abstract customize(tree: TreeView): any; showTab(title: string): void; innerRender(e: Element): void; } export interface INavBarTheme { style: string; brandImage: string; brandImageHeight: string; brandImageStyle: string; } export declare class NavBar implements controls.IControl { _title: string; id(): string; _theme: INavBarTheme; title(): string; globalMenuElement: Element; private globalMenu; getMenuBar(): ContributionManager; private element; homeDisplay: boolean; setTitle(t: string): void; render(e: Element): void; private renderMenu(); } export interface IViewRef { view: any; ref: string; ratio: number; relation: Relation; } export interface IPerspective { title: string; actions: IContributionItem[]; views: IViewRef[]; onOpen?: () => void; } export declare class Application implements controls.IControl { private _title; private initialPerspective; title(): string; id(): string; private nb; private page; private status; private perspective; constructor(_title: string, initialPerspective: IPerspective, element?: Element | string, currentP?: IPerspective); currentPerspective(): IPerspective; homePerspective(): IPerspective; home(): void; setStatusMessage(m: string): void; getMenuBar(): ContributionManager; openPerspective(perspective: IPerspective): void; element: Element; render(e: Element): void; private openViews(); } export declare class ShowDialogAction implements IContributionItem { title: any; private control; private buttons; constructor(title: any, control: controls.IControl | string, buttons?: IContributionItem[]); run(): void; } export declare function showInDialog(title: string, control: controls.IControl | string, btns?: IContributionItem[]): void; export declare function selectDialog(title: string, description: string, func: (x: any) => void, root: any[], lp?: ILabelProvider, cp?: ITreeContentProvider): void; export interface StateRecord { hash: string; } export interface UrlHandler { (s: string): boolean; } export declare function registerHandler(f: UrlHandler): void; export declare function unregisterHandler(f: UrlHandler): void; export declare function back(): void; export declare function addCommand(ci: IContributionItem): void; export declare function processUrl(url: string): void; export declare function processState(s: StateRecord): void; export declare var notifyState: (s: StateRecord) => void; export declare function setState(s: StateRecord): void; export declare function exportGlobalHandler(name: string, handler: () => void): void; export declare class BackAction implements IContributionItem { title: string; constructor(); run(): void; }