@compass-framework/worksheet-layout 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/@types/HorizontalSegment.ts +13 -0
- package/@types/VerticalSegment.ts +13 -0
- package/@types/WorksheetLayout.d.ts +95 -0
- package/package.json +17 -0
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import {
|
|
2
|
+
AbsoluteLayout,
|
|
3
|
+
View,
|
|
4
|
+
MotionEvent,
|
|
5
|
+
Rect,
|
|
6
|
+
Configuration,
|
|
7
|
+
Canvas,
|
|
8
|
+
ViewParent
|
|
9
|
+
} from "@compass-framework/core"
|
|
10
|
+
|
|
11
|
+
import {
|
|
12
|
+
InterfaceTemplate
|
|
13
|
+
} from "@compass-framework/library";
|
|
14
|
+
|
|
15
|
+
import {VerticalSegment} from "./VerticalSegment";
|
|
16
|
+
import {HorizontalSegment} from "./HorizontalSegment";
|
|
17
|
+
|
|
18
|
+
export declare abstract class WorksheetLayout extends AbsoluteLayout implements View.OnGenericMotionListener {
|
|
19
|
+
public abstract sumRowHeight(start: number, end: number): number;
|
|
20
|
+
|
|
21
|
+
public abstract sumColumnWidth(start: number, end: number): number;
|
|
22
|
+
|
|
23
|
+
public abstract getRowHeight(index: number): number;
|
|
24
|
+
|
|
25
|
+
public abstract getColumnWidth(index: number): number;
|
|
26
|
+
|
|
27
|
+
public abstract getMaximumColumnCount(): number;
|
|
28
|
+
|
|
29
|
+
public abstract getMaximumRowCount(): number;
|
|
30
|
+
|
|
31
|
+
public abstract getCumulativeRowHeight(index: number): number;
|
|
32
|
+
|
|
33
|
+
public abstract getCumulativeColumnWidth(index: number): number;
|
|
34
|
+
|
|
35
|
+
public onGenericMotion(v: View, event: MotionEvent): boolean;
|
|
36
|
+
|
|
37
|
+
public onConfigurationChanged(newConfig: Configuration): void;
|
|
38
|
+
|
|
39
|
+
public onLayout(changed: boolean, left: number, top: number, right: number, bottom: number): void;
|
|
40
|
+
|
|
41
|
+
public scrollTo(x: number, y: number): void;
|
|
42
|
+
|
|
43
|
+
public invalidateChildInParent(location: number[], dirty: Rect): ViewParent;
|
|
44
|
+
|
|
45
|
+
public freezeTo(freezeStartRowNumber: number, freezeStartColumnNumber: number, freezeEndRowNumber: number, freezeEndColumnNumber: number): void;
|
|
46
|
+
|
|
47
|
+
public addOnViewportChangeListener(listener: WorksheetLayout.OnViewportChangeListener): void;
|
|
48
|
+
|
|
49
|
+
public addOnScrollChangeListener(listener: WorksheetLayout.OnScrollChangeListener): void;
|
|
50
|
+
|
|
51
|
+
public removeOnScrollChangeListener(listener: WorksheetLayout.OnScrollChangeListener): void;
|
|
52
|
+
|
|
53
|
+
public removeOnViewportChangeListener(listener: WorksheetLayout.OnViewportChangeListener): void;
|
|
54
|
+
|
|
55
|
+
public dispatchDraw(canvas: Canvas): void;
|
|
56
|
+
|
|
57
|
+
public dispatchPointerEvent(event: MotionEvent): boolean;
|
|
58
|
+
|
|
59
|
+
public dispatchTouchEvent(event: MotionEvent): boolean;
|
|
60
|
+
|
|
61
|
+
public dispatchHoverEvent(event: MotionEvent): boolean;
|
|
62
|
+
|
|
63
|
+
public dispatchGenericMotionEvent(event: MotionEvent): boolean;
|
|
64
|
+
|
|
65
|
+
public dispatchGenericPointerEvent(event: MotionEvent): boolean;
|
|
66
|
+
|
|
67
|
+
public getViewType(): WorksheetLayout.ViewType;
|
|
68
|
+
|
|
69
|
+
public setViewType(type: WorksheetLayout.ViewType): void;
|
|
70
|
+
|
|
71
|
+
public getVerticalSegment(): VerticalSegment[];
|
|
72
|
+
|
|
73
|
+
public getHorizontalSegment(): HorizontalSegment[]
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export namespace WorksheetLayout {
|
|
77
|
+
export enum ViewType {
|
|
78
|
+
Normal,
|
|
79
|
+
PageBreak,
|
|
80
|
+
Page,
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export interface OnScrollChangeListener {
|
|
84
|
+
onScroll(x: number, y: number): void;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export class OnScrollChangeListener extends InterfaceTemplate { }
|
|
88
|
+
|
|
89
|
+
export interface OnViewportChangeListener {
|
|
90
|
+
onChange(width:
|
|
91
|
+
number, height: number): void
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export class OnViewportChangeListener extends InterfaceTemplate { }
|
|
95
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@compass-framework/worksheet-layout",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "@compass-framework/worksheet-layout public api",
|
|
5
|
+
"types": "./index.d.ts",
|
|
6
|
+
"main": "./index.js",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"publish-core": "npm publish"
|
|
9
|
+
},
|
|
10
|
+
"publishConfig": {
|
|
11
|
+
"access": "public"
|
|
12
|
+
},
|
|
13
|
+
"dependencies": {
|
|
14
|
+
"@compass-framework/core": "1.2.9",
|
|
15
|
+
"@compass-framework/library": "1.0.9"
|
|
16
|
+
}
|
|
17
|
+
}
|