@sheetxl/models
Version:
Models - A Headless javascript spreadsheet library.
69 lines • 1.84 kB
TypeScript
import { JSONSerializable, RemoveListener } from "@sheetxl/common";
import { SerializableProperties } from "../primitives";
export interface IWorkbookViewListener {
/**
* Called when the workbookView changes.
* @param update
*/
onViewChange?(update: IWorkbookView | null | undefined): void;
}
/**
* View settings for a single workbook.
*
*/
export interface IWorkbookView extends JSONSerializable<SerializableProperties<IWorkbookView> | null> {
/**
* Shows the formula bar
* @defaultValue true;
*/
showFormulaBar: boolean;
/**
* Shows the workbook tabs
* @defaultValue true;
*/
showTabs: boolean;
/**
* Specifies ratio between the workbook tabs and the horizontal scroll bar.
*
* @remarks
*
* This is expressed as a percent * 1000.
*
* @defaultValue 600;
*/
tabRatio: number;
/**
* show the horizontal scrollbar.
*
* @defaultValue true;
*/
showHorizontalScrollbar: boolean;
/**
* show the vertical scrollbar.
*
* @defaultValue true;
*/
showVerticalScrollbar: boolean;
/**
* Show the status bar
* @defaultValue true
*/
showStatusBar: boolean;
/**
* The id of of the activeSheet.
*
* @remarks
*
* This is NOT the index of the sheet but instead the id (1 based)
* If the sheets have been reordered then these won't match.
*/
activeSheetId: number | null;
/**
* Add a listener for workbook view events
* @param listener
*/
addListener: (listener: IWorkbookViewListener) => RemoveListener;
toJSON(): SerializableProperties<IWorkbookView> | null;
fromJSON(json: SerializableProperties<IWorkbookView>, notify?: boolean): void;
}
//# sourceMappingURL=IWorkbookView.d.ts.map