1/* 2 * Copyright (C) 2022 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16import {BaseStruct} from "../../../bean/BaseStruct.js"; 17import {Rect} from "../timer-shaft/Rect.js"; 18import {TraceRow} from "./TraceRow.js"; 19 20export class TraceRowObject<T extends BaseStruct> { 21 public rowId: string | undefined; 22 public rowType: string | undefined; 23 public rowParentId: string | undefined; 24 public rowHidden: boolean = false; 25 public rowHeight: number = 40; 26 public name: string | undefined; 27 public must: boolean = true; 28 public folder: boolean = false; 29 public isLoading: boolean = false; 30 public children: boolean = false; 31 public expansion: boolean = false; 32 public dataList: Array<T> | undefined; 33 public dataListCache: Array<T> = []; 34 public color: string | undefined; 35 public frame: Rect | undefined; 36 public supplier: (() => Promise<Array<T>>) | undefined | null 37 public onThreadHandler: ((row: TraceRow<T>, ctx: ImageBitmapRenderingContext | CanvasRenderingContext2D | WebGLRenderingContext | WebGL2RenderingContext | null | undefined) => void) | undefined | null 38 public onDrawHandler: ((ctx: ImageBitmapRenderingContext | CanvasRenderingContext2D | WebGLRenderingContext | WebGL2RenderingContext | null | undefined) => void) | undefined | null 39 public top: number = 0; 40 public rowIndex: number = 0; 41 public preObject: TraceRowObject<T> | undefined | null; 42 public nextObject: TraceRowObject<T> | undefined | null; 43} 44