UNPKG

@kieler/klighd-core

Version:

Core KLighD diagram visualization with Sprotty

41 lines 1.93 kB
import { VNode } from 'snabbdom'; import { IActionDispatcher } from 'sprotty'; import { DisplayedActionData, LayoutOptionUIData, SynthesisOption, RenderOption } from './option-models'; import { RenderOptionsRegistry } from './render-options-registry'; interface AllOptions { actions: DisplayedActionData[]; layoutOptions: LayoutOptionUIData[]; synthesisOptions: SynthesisOption[]; } /** Renderer that is capable of rendering different option models to jsx. */ export declare class OptionsRenderer { actionDispatcher: IActionDispatcher; renderOptionsRegistry: RenderOptionsRegistry; /** * Renders all diagram options that are provided by the server. This includes * the synthesis and layout options as well as performable actions. */ renderServerOptions(options: AllOptions): VNode; private renderActions; private handleActionClick; /** * Renders all synthesis options that are part of a given category. Renders all * synthesisOptions that belong to no category if the category is null. */ private renderSynthesisOptions; /** Handler for synthesis options onChange. */ private handleSynthesisOptionChange; /** Handler for synthesis options onInput, e.g. while a slider is being dragged. */ private handleSynthesisOptionInput; private renderLayoutOptions; /** Handler for layout options onChange. */ private handleLayoutOptionChange; /** Handler for layout options onInput, e.g. while a slider is being dragged. */ private handleLayoutOptionInput; /** Renders render options that are stored in the client. An example would be "show constraints" */ renderRenderOptions(renderOptions: RenderOption[], debug: boolean, renderCategory?: RenderOption): (VNode | '')[] | ''; /** Handler for render options onChange. */ private handleRenderOptionChange; } export {}; //# sourceMappingURL=options-renderer.d.ts.map