@itwin/frontend-devtools
Version:
Debug menu and supporting UI widgets
146 lines • 5.5 kB
TypeScript
/** @packageDocumentation
* @module Tools
*/
import { ViewFlags } from "@itwin/core-common";
import { Tool, Viewport } from "@itwin/core-frontend";
/** Modifies the selected viewport's DisplayStyleState.
* @beta
*/
export declare abstract class DisplayStyleTool extends Tool {
protected get require3d(): boolean;
protected abstract execute(vp: Viewport): Promise<boolean>;
protected abstract parse(args: string[], vp: Viewport): Promise<boolean>;
run(): Promise<boolean>;
parseAndRun(...args: string[]): Promise<boolean>;
}
/** Modifies the selected viewport's ViewFlags.
* The keyin syntax is as follows:
* fdt change viewflags flag=value
* Where 'flag' is one of the BooleanFlagName values, or "renderMode"; and value is an integer.
* For boolean flags, value is 0 for false or 1 for true. For renderMode, value is one of the RenderMode enum values.
* Flag names are case-insensitive.
* @beta
*/
export declare class ChangeViewFlagsTool extends Tool {
static toolId: string;
static get maxArgs(): undefined;
static get minArgs(): number;
run(vf: ViewFlags, vp?: Viewport): Promise<boolean>;
parseAndRun(...args: string[]): Promise<boolean>;
}
/** Toggles the skybox.
* @beta
*/
export declare class ToggleSkyboxTool extends DisplayStyleTool {
static toolId: string;
get require3d(): boolean;
parse(_args: string[]): Promise<boolean>;
execute(vp: Viewport): Promise<boolean>;
}
/** Defines a [SkySphere]($common) to apply to the current view.
* @beta
*/
export declare class SkySphereTool extends DisplayStyleTool {
private _image?;
static toolId: string;
static get minArgs(): number;
static get maxArgs(): number;
get require3d(): boolean;
parse(args: string[]): Promise<boolean>;
execute(vp: Viewport): Promise<boolean>;
}
/** Defines a [SkyCube]($common) to apply to the current view.
* @beta
*/
export declare class SkyCubeTool extends DisplayStyleTool {
private _images;
static toolId: string;
static get minArgs(): number;
static get maxArgs(): number;
get require3d(): boolean;
parse(args: string[]): Promise<boolean>;
execute(vp: Viewport): Promise<boolean>;
}
/** Outputs (and optionally copies to the clipboard) a "rendering style" as a partial DisplayStyle3dSettingsProps JSON object based
* on the current view's display style settings.
* All arguments are optional, of the form "name=value" where `value` is 0 for false or 1 for true. All arguments default to `false` if omitted.
* @see [DisplayStyleSettings.toOverrides]($common) for details.
* Arguments:
* * `all`: include all settings.
* * `imodel`: include iModel-specific settings.
* * `project`: include iTwin-specific (formerly known as project) settings.
* * `map`: include background map settings.
* * `drawingaids`: include drawing aid decoration settings.
* * `copy`: copy result to system clipboard.
* * `quote`: format the JSON so it can be parsed directly by [ApplyRenderingStyleTool].
* @beta
*/
export declare class SaveRenderingStyleTool extends DisplayStyleTool {
private _options;
private _copyToClipboard;
private _quote;
static toolId: string;
static get minArgs(): number;
static get maxArgs(): number;
parse(inputArgs: string[]): Promise<boolean>;
execute(vp: Viewport): Promise<boolean>;
}
/** Given a "rendering style" as a partial DisplayStyle3dSettingsProperties JSON string, apply it to the selected viewport's display style.
* @see [DisplayStyleSettings.applyOverrides]($common) for details.
* @beta
*/
export declare class ApplyRenderingStyleTool extends DisplayStyleTool {
private _overrides?;
static toolId: string;
static get minArgs(): number;
static get maxArgs(): number;
parse(args: string[]): Promise<boolean>;
execute(vp: Viewport): Promise<boolean>;
}
/** Apply appearance overrides to one or more subcategories in the active viewport.
* @beta
*/
export declare class OverrideSubCategoryTool extends DisplayStyleTool {
private _overrideProps;
private _subcategoryIds;
static toolId: string;
static get minArgs(): number;
static get maxArgs(): number;
parse(inArgs: string[]): Promise<boolean>;
execute(vp: Viewport): Promise<boolean>;
}
/** Set whether background color is ignored when applying white-on-white reversal.
* @beta
*/
export declare class WoWIgnoreBackgroundTool extends DisplayStyleTool {
private _ignore?;
static toolId: string;
static get minArgs(): number;
static get maxArgs(): number;
parse(args: string[]): Promise<boolean>;
execute(vp: Viewport): Promise<boolean>;
}
/** Toggle whether surfaces display with overlaid wiremesh in the active viewport.
* @see [ViewFlags.wiremesh]($common).
* @beta
*/
export declare class ToggleWiremeshTool extends DisplayStyleTool {
private _enable?;
static toolId: string;
static get minArgs(): number;
static get maxArgs(): number;
parse(args: string[]): Promise<boolean>;
execute(vp: Viewport): Promise<boolean>;
}
/** Change the background color of the active viewport and optionally its transparency.
* @beta
*/
export declare class ChangeBackgroundColorTool extends DisplayStyleTool {
private _color?;
static toolId: string;
static get minArgs(): number;
static get maxArgs(): number;
parse(args: string[]): Promise<boolean>;
execute(vp: Viewport): Promise<boolean>;
}
//# sourceMappingURL=DisplayStyleTools.d.ts.map