malwoden
Version:
   
25 lines (24 loc) • 832 B
TypeScript
import { Color } from "../terminal";
import { BorderStyles } from "./util/draw-borders";
import { Widget, WidgetConfig } from "./widget";
export interface PanelWidgetState {
/** The width of the panel */
width: number;
/** The height of the panel */
height: number;
/** The color of any border. Default White. */
foreColor?: Color;
/** The color of the panel. Default Black */
backColor?: Color;
/** An optional border style. Default undefined for none. */
borderStyle?: BorderStyles;
}
/**
* Represents a rectangle drawn on the screen, often with a border.
*/
export declare class PanelWidget extends Widget<PanelWidgetState> {
constructor(config: WidgetConfig<PanelWidgetState>);
private getAbsTopLeft;
private getAbsBottomRight;
onDraw(): void;
}