-
Notifications
You must be signed in to change notification settings - Fork 3
/
Annotations.lua
238 lines (200 loc) · 7.16 KB
/
Annotations.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
---@meta
-------------------------------------------------
-- MARK: External Annotations
-------------------------------------------------
---@class LibGroupInfo
---@field GetCachedInfo function
-------------------------------------------------
-- MARK: Cell Annotations
-------------------------------------------------
---@class CellDBGeneral
---@field menuPosition "top_bottom" | "left_right"
---@field locked boolean
---@field fadeOut boolean
---@class CellDBAppearance
---@field outOfRangeAlpha number
---@field barAlpha number
---@field lossAlpha number
---@field healPrediction table<number, table<number, number>>
---@field barAnimation "Smooth" | "Flash"
---@class CellDB
---@field layouts Layouts
---@field general CellDBGeneral
---@field appearance CellDBAppearance
---@class CellAnimationGroup: AnimationGroup
---@field alpha Animation
---@class CellAnimation
---@field fadeIn CellAnimationGroup
---@field fadeOut CellAnimationGroup
---@class CellDropdown: Frame, BackdropTemplate
---@field SetItems function
---@field SetEnabled function
---@field SetSelectedValue function
---@field SetLabel function
---@field SetSelected function
---@field SetFont function
---@field button button
---@field ClearSelected function
---@field GetSelected function
---@field AddItem function
---@field ClearItems function
---@field text FontString
---@class CellColorPicker: Frame, BackdropTemplate
---@field SetColor fun(self: CellColorPicker, r: number|table, g: number?, b: number?, a: number?)
---@field label FontString
---@field onChange fun(r: number, g: number, b: number, a: number)
---@class CellSlider: Slider
---@field afterValueChangedFn function
---@field currentEditBox Frame
---@field SetLabel fun(self: CellSlider, text: string)
---@field UpdateMinMaxValues fun(self: CellSlider, min: number, max: number)
---@class CellUnknowFrame: Frame
---@field title FontString
---@field GetSelected function
---@class CellCombatFrame: Frame
---@field mask Frame
---@field combatMask Frame
---@alias Layouts table<string, LayoutTable>
---@class LayoutTable
---@field CUFUnits UnitLayoutTable
---@field barOrientation table
---@field powerFilters table<string, boolean|string>
---@field groupFilter table<number, boolean>
---@class CellScrollFrame: ScrollFrame
---@field content Frame
---@field SetScrollStep fun(self: CellScrollFrame, step: number)
---@field ResetScroll fun(self: CellScrollFrame)
---@field SetContentHeight fun(self: CellScrollFrame, height: number, num: number?, spacing: number?)
---@field Reset fun(self: CellScrollFrame)
---@class CellCheckButton: CheckButton
---@field label FontString
---@class CellButton: Button
---@field SetTextColor fun(self: CellButton, r: number, g: number, b: number, a: number)
---@class CellSizeOpt
---@field [1] number
---@field [2] number
-------------------------------------------------
-- MARK: CUF Frames
-------------------------------------------------
---@class SmoothStatusBar: StatusBar
---@field SetMinMaxSmoothedValue number
---@field ResetSmoothedValue number
---@field SetSmoothedValue number
-------------------------------------------------
-- MARK: Misc
-------------------------------------------------
---@class stringlib
---@field utf8charbytes fun(text: string, index: number): number
---@field utf8len fun(text: string): number
---@field utf8sub fun(text: string, start: number, end_: number): string
---@field utf8replace fun(text: string, mapping: table): string
---@field utf8upper fun(text: string): string
---@field utf8lower fun(text: string): string
---@field utf8reverse fun(text: string): string
-------------------------------------------------
-- MARK: Help Tip
-------------------------------------------------
-- Internal
---@class HelpTips.Info
---@field text string -- also acts as a key for various API, MUST BE SET
---@field dbKey string
---@field alignment HelpTip.Alignment Alignment of the helptip relative to the parent/relativeRegion (basically where the arrow is located)
---@field targetPoint HelpTip.Point Where at the parent/relativeRegion the helptip should point
---@field buttonStyle HelpTip.ButtonStyle?
---@field textColor any? HIGHLIGHT_FONT_COLOR
---@field textJustifyH FramePoint? "LEFT"
---@field hideArrow boolean?
---@field offsetX number?
---@field offsetY number?
---@field autoEdgeFlipping boolean? on: will flip helptip to opposite edge based on relative region's center vs helptip's center during OnUpdate
---@field autoHorizontalSlide boolean? on: will change the alignment to fit helptip on screen during OnUpdate
---@field useParentStrata boolean?
---@field extraRightMarginPadding number? extra padding on the right side of the helptip
---@field acknowledgeOnHide boolean? whether to treat a hide as an acknowledge
---@field appendFrame Frame? if a helptip needs a custom display you can append your own frame to the text
---@field appendFrameYOffset number? the offset for the vertical anchor for appendFrame
---@field system string? reference string
---@field systemPriority number? if a system and a priority is specified, higher priority helptips will close another helptip in that system
---@field onHideCallback fun(acknowledged: boolean, ...)? callback whenever the helptip is closed
---@field onAcknowledgeCallback fun(...)? callback whenever the helptip is closed by the user clicking its button
---@class HelpTips.Frame: Frame
---@field width number
---@field info HelpTips.Info
---@field acknowledged boolean
---@field Close fun(self: HelpTips.Frame)
---@field Init fun(self: HelpTips.Frame, parent: Frame, info: table, relativeRegion: Frame?)
---@field Matches fun(self: HelpTips.Frame, parent: Frame, text: string): boolean
-- Blizzard
HelpTip = {}
---@enum HelpTip.Point
HelpTip.Point = {
TopEdgeLeft = 1,
TopEdgeCenter = 2,
TopEdgeRight = 3,
BottomEdgeLeft = 4,
BottomEdgeCenter = 5,
BottomEdgeRight = 6,
RightEdgeTop = 7,
RightEdgeCenter = 8,
RightEdgeBottom = 9,
LeftEdgeTop = 10,
LeftEdgeCenter = 11,
LeftEdgeBottom = 12,
}
---@enum HelpTip.Alignment
HelpTip.Alignment = {
Left = 1,
Center = 2,
Right = 3,
Top = 1,
Bottom = 3,
}
---@enum HelpTip.ButtonStyle
HelpTip.ButtonStyle = {
None = 1,
Close = 2,
Okay = 3,
GotIt = 4,
Next = 5,
}
-------------------------------------------------
-- MARK: AuraUtil
-------------------------------------------------
---@class AuraData
---@field refreshing boolean
---@enum AuraUtil.AuraFilters
AuraUtil.AuraFilters = {
Helpful = "HELPFUL",
Harmful = "HARMFUL",
Raid = "RAID",
IncludeNameplateOnly = "INCLUDE_NAME_PLATE_ONLY",
Player = "PLAYER",
Cancelable = "CANCELABLE",
NotCancelable = "NOT_CANCELABLE",
Maw = "MAW",
}
---@enum AuraUtil.DispellableDebuffTypes
AuraUtil.DispellableDebuffTypes = {
Magic = true,
Curse = true,
Disease = true,
Poison = true
}
---@enum AuraUtil.AuraUpdateChangedType
AuraUtil.AuraUpdateChangedType = {
None = 1,
Debuff = 2,
Buff = 3,
Dispel = 4
}
---@enum AuraUtil.UnitFrameDebuffType
AuraUtil.UnitFrameDebuffType = {
BossDebuff = 1,
BossBuff = 2,
PriorityDebuff = 3,
NonBossRaidDebuff = 4,
NonBossDebuff = 5
}
---@param ... AuraUtil.AuraFilters
---@return string
function AuraUtil.CreateFilterString(...) end