import { GObject } from "./g_object"; import { GVertex } from "./g_vertex"; import { GEdge } from "./g_edge"; import { Rectangle } from "../common/vline"; import * as GOptions from "./g_options"; import { ShapeObjectType, VertexObjectType, VertexOrder, Direction } from "../common/enums"; import { LogicTree } from "../logics/logic_tree"; import { LogicGraph } from "../logics/logic_graph"; import { LogicTable } from "../logics/logic_table"; /** グラフを表します。 */ export declare class GGraph extends GObject { constructor(box: SVGElement | string); protected setBasicOption(option: GOptions.GGraphAttributes): void; setOption(option: GOptions.GGraphAttributes): void; get graphAllocateFunction(): GOptions.GraphAllocateFunction | undefined; set graphAllocateFunction(value: GOptions.GraphAllocateFunction | undefined); get isCenterBased(): boolean; get vertices(): GVertex[]; get edges(): GEdge[]; get roots(): GVertex[]; get vertexXInterval(): number | null; set vertexXInterval(value: number | null); get vertexYInterval(): number | null; get direction(): Direction | null; set direction(value: Direction | null); set vertexYInterval(value: number | null); /** 根を返します。 */ get rootVertex(): GVertex | null; /** * 頂点もしくは辺をグラフに追加します。 * @param item */ add(item: GVertex | GEdge): void; /** * 頂点もしくは辺を削除します。 * @param item */ remove(item: GVertex | GEdge): void; clear(): void; /** * 与えられた二つの頂点と辺を接続します。 * @param beginVertex 開始節 * @param edge 接続する辺 * @param endVertex 終了節 * @param option 接続オプション * @param option.incomingInsertIndex endVertexのincomingEdgeの配列に今回の辺をどの位置に挿入するか * @param option.outcomingInsertIndex beginVertexのoutcomingEdgeの配列に今回の辺をどの位置に挿入するか * @param option.beginConnectorType beginVertexの接続位置 * @param option.endConnectorType endVertexの接続位置 */ connect(beginVertex: GVertex, edge: GEdge, endVertex: GVertex, option?: GOptions.ConnecterOption): void; getOrderedVertices(order: VertexOrder, node?: GVertex | null): GVertex[]; /** * 親ノードに子ノードを追加します。 * @param parent * @param child * @param option */ get relocateStyle(): string | null; set relocateStyle(value: string | null); relocate(): void; get width(): number; get height(): number; set width(value: number); set height(value: number); Noderegion(): Rectangle; moveInCanvas(): void; build(logicGraph: LogicGraph | LogicTree): void; removeGraph(svg: SVGElement): void; /** * グラフの領域を表すRectangleを返します。位置の基準はグラフが追加されているNodeです。 */ getRegion(): Rectangle; /** * 入力のVertexを親として、入力のLogicTreeを子とした部分木を作成します。 * @param parent 親にするVertex * @param logicVertex 子にするLogicTree * @param option 作成オプション * @returns logicVertexを表すVertex */ createVBACode(id: number): string[]; get VBAObjectNum(): number; getStyleValue(className: string, valueName: string): string | null; protected dispatchVertexCreatedEvent(vertex: GVertex): void; private objectCreatedFunction; setRootIndex(vertex: GVertex, rootIndex: number): void; protected observerFunction(x: MutationRecord[]): void; get type(): ShapeObjectType; update(): void; getUpdateFlag(): boolean; private static createVertex2; private static getParent; static createVertex(parent: SVGElement | string | GObject, type: VertexObjectType, option?: any): GVertex; static createVertexTable(parent: SVGElement | string | GObject, obj: LogicTable): GVertex; static createEdge(parent: SVGElement | string | GObject, option?: any): GEdge; updateSurfaceWithoutSVGText(): boolean; }