Advertisement
Guest User

Untitled

a guest
Jun 10th, 2011
1,164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 17.97 KB | None | 0 0
  1. Basic globals:
  2. Development.Documentation
  3. Provide documentation on items in the addon environment. Called with no parameters, it returns a table listing all documentation. Can provide both human-readable and computer-readable documentation.
  4. documentables = Development.Documentation() -- table <- void
  5. documentation = Development.Documentation(item) -- string <- variant
  6. documentation = Development.Documentation(item, parseable = false) -- string <- variant, boolean
  7. documentationTable = Development.Documentation(item, parseable = true) -- table <- variant, boolean
  8. Parameters:
  9. parseable: Whether to return in a computer-readable format, as opposed to the normal human-readable format.
  10. item: The item to get documentation on. May be either the item itself or a string identifier.
  11. Results:
  12. documentables: List of all items that documentation can be retrieved for. In {["itemname"] = true} format.
  13. documentationTable: Computer-readable documentation for the requested item. Format may change without warning.
  14. documentation: Documentation for the requested item.
  15. UI.CreateContext
  16. Creates a new UI context. A UI context must be created in order to create any frames.
  17. context = UI.CreateContext(name) -- Context <- string
  18. Parameters:
  19. name: A descriptive name for this element. Used for error reports and performance information. May be shown to end-users.
  20. Results:
  21. context: A new context. Contexts are guaranteed to have at least the capabilities of a Frame.
  22. UI.CreateFrame
  23. Creates a new frame. Frames are the blocks that all addon UIs are made out of. Since all frames must have a parent, you'll need to create a Context before any frames. See UI.CreateContext.
  24. frame = UI.CreateFrame(type, name, parent) -- Frame <- string, string, Frame
  25. Parameters:
  26. type: The type of your new frame. Current supported types: Frame, Text, Texture.
  27. name: A descriptive name for this element. Used for error reports and performance information. May be shown to end-users.
  28. parent: The new parent for this frame.
  29. Results:
  30. frame: Your new frame.
  31. _VERSION
  32. assert
  33. bit.arshift
  34. bit.band
  35. bit.bnot
  36. bit.bor
  37. bit.bswap
  38. bit.bxor
  39. bit.lshift
  40. bit.rol
  41. bit.ror
  42. bit.rshift
  43. bit.tobit
  44. bit.tohex
  45. collectgarbage
  46. coroutine.create
  47. coroutine.resume
  48. coroutine.running
  49. coroutine.status
  50. coroutine.wrap
  51. coroutine.yield
  52. debug.traceback
  53. error
  54. gcinfo
  55. getfenv
  56. getmetatable
  57. ipairs
  58. load
  59. loadstring
  60. math.abs
  61. math.acos
  62. math.asin
  63. math.atan
  64. math.atan2
  65. math.ceil
  66. math.cos
  67. math.cosh
  68. math.deg
  69. math.exp
  70. math.floor
  71. math.fmod
  72. math.frexp
  73. math.huge
  74. math.ldexp
  75. math.log
  76. math.log10
  77. math.max
  78. math.min
  79. math.mod
  80. math.modf
  81. math.pi
  82. math.pow
  83. math.rad
  84. math.random
  85. math.randomseed
  86. math.sin
  87. math.sinh
  88. math.sqrt
  89. math.tan
  90. math.tanh
  91. newproxy
  92. next
  93. pairs
  94. pcall
  95. print
  96. print_console
  97. rawequal
  98. rawget
  99. rawset
  100. select
  101. setfenv
  102. setmetatable
  103. string.byte
  104. string.char
  105. string.find
  106. string.format
  107. string.gfind
  108. string.gmatch
  109. string.gsub
  110. string.len
  111. string.lower
  112. string.match
  113. string.rep
  114. string.reverse
  115. string.sub
  116. string.upper
  117. table.concat
  118. table.foreach
  119. table.foreachi
  120. table.getn
  121. table.insert
  122. table.maxn
  123. table.remove
  124. table.sort
  125. tonumber
  126. tostring
  127. type
  128. unpack
  129. xpcall
  130. Inspectors:
  131. Inspect.Ability.Detail
  132. Provides detailed information about abilities.
  133. detail = Inspect.Ability.Detail(ability) -- table <- string
  134. details = Inspect.Ability.Detail(abilities) -- table <- table
  135. Parameters:
  136. ability: The identifier of the ability to retrieve detail for.
  137. abilities: A lookup table of identifiers of abilities to retrieve detail for.
  138. Results:
  139. detail: Detail table for a single ability. May include members: name, icon, castingTime, channeled, continuous, autoattack, stealthRequired, rangeMin, rangeMax, cooldown, currentCooldown, currentCooldownExpired, currentCooldownRemaining, racial, passive, positioned, target, outOfRange, unusable, costPlanarCharge, costPower, costMana, costEnergy, costCharge, gainCharge, weapon.
  140. details: Detail tables for all requested abilities. The key is the ability ID, the value is the ability's detail table.
  141. Inspect.Ability.List
  142. List available abilities.
  143. abilities = Inspect.Ability.List() -- table <- void
  144. Results:
  145. abilities: A lookup table of IDs of the available abilities.
  146. Inspect.Addon.Cpu
  147. Returns recent CPU usage information. This is calculated using an exponential-falloff method.
  148. data = Inspect.Addon.Cpu() -- table <- void
  149. Results:
  150. data: Recent CPU usage. This takes the format { AddonIdentifier = { SubIdentifier = cpu_used_as_a_fraction_of_one } }. SubIdentifiers are generated by Rift and the format may change without notice.
  151. Inspect.Addon.Current
  152. Returns the current addon. This information is used internally for counting CPU usage and determining frame ownership.
  153. addonIdentifier = Inspect.Addon.Current() -- string <- void
  154. Results:
  155. addonIdentifier: The addon's identifier, as written in its TOC file.
  156. Inspect.Buff.Detail
  157. Provides detailed information about the buffs on a unit.
  158. detail = Inspect.Buff.Detail(unit, buff) -- table <- string, string
  159. details = Inspect.Buff.Detail(unit, buffs) -- table <- string, table
  160. Parameters:
  161. buff: An identifier for the buff to retrieve detail for.
  162. buffs: A lookup table containing buff identifiers to retrieve details for.
  163. unit: The unit to inspect.
  164. Results:
  165. detail: Detail table for a single buff. May include members: name, buff, debuff, noncancelable, duration, remaining, expired, stack, caster, icon.
  166. details: Detail tables for all requested buffs. The key is the buff ID, the value is the buff's detail table.
  167. Inspect.Buff.List
  168. List buffs on a unit.
  169. buffs = Inspect.Buff.List(unit) -- table <- string
  170. Parameters:
  171. unit: The unit to inspect.
  172. Results:
  173. buffs: A lookup table of the IDs of the buffs on the unit.
  174. Inspect.System.Time
  175. A high-resolution timer.
  176. time = Inspect.System.Time() -- number <- void
  177. Results:
  178. time: Time in seconds. Counted from an arbitrary point in the past. Guaranteed to be non-negative.
  179. Commands:
  180. Command.Buff.Cancel
  181. Cancels a buff on the player. Not all buffs are cancelable.
  182. Command.Buff.Cancel(buff) -- string
  183. Parameters:
  184. buff: The ID of the buff to cancel.
  185. Command.Slash.Register
  186. Registers a new chat slash command, inserts a new event table into the Event.Slash hierarchy, and returns that table. If called multiple times with the same slash command, will return the same table each time.
  187. eventTable = Command.Slash.Register(slashCommand) -- table <- string
  188. Parameters:
  189. slashCommand: The name of the slash command to register.
  190. Results:
  191. eventTable: The event table for your slash command. nil if the slash command could not be registered (usually because it conflicts with a built-in slash command.)
  192. Events:
  193. Event.Ability.AvailabilityChange
  194. Event.Ability.Cooldown.Begin
  195. Event.Ability.Cooldown.End
  196. Event.Addon.Finalizing
  197. Event.Addon.Load.Begin
  198. Event.Addon.Load.End
  199. Event.Addon.SavedVariables.Load.Begin
  200. Event.Addon.SavedVariables.Load.End
  201. Event.Addon.SavedVariables.Save.Begin
  202. Event.Addon.SavedVariables.Save.End
  203. Event.Addon.Shutdown
  204. Event.Addon.Starting
  205. Event.Slash (category for dynamically-created events)
  206. Event.Slash.dump
  207. (1 handler)
  208. Event.System.Error
  209. (1 handler)
  210. Event.System.Update.Begin
  211. Event.System.Update.End
  212. (1 handler)
  213. UI:
  214. Layout:
  215. Members:
  216. GetBottom
  217. Retrieves the Y position of the bottom edge of this element.
  218. bottom = Layout:GetBottom() -- number <- void
  219. Results:
  220. bottom: The Y position of the bottom edge of this element.
  221. GetBounds
  222. Retrieves the complete bounds of this element.
  223. left, top, right, bottom = Layout:GetBounds() -- number, number, number, number <- void
  224. Results:
  225. right: The X position of the right edge of this element.
  226. left: The X position of the left edge of this element.
  227. bottom: The Y position of the bottom edge of this element.
  228. top: The Y position of the top edge of this element.
  229. GetEventTable
  230. Retrieves the event table of this element. By default, this value is also stored in "this.Event".
  231. eventTable = Layout:GetEventTable() -- table <- void
  232. Results:
  233. eventTable: The event table of this element.
  234. GetHeight
  235. Retrieves the height of this element.
  236. height = Layout:GetHeight() -- number <- void
  237. Results:
  238. height: The height of this element.
  239. GetLeft
  240. Retrieves the X position of the left edge of this element.
  241. left = Layout:GetLeft() -- number <- void
  242. Results:
  243. left: The X position of the left edge of this element.
  244. GetName
  245. Retrieves the name of this element.
  246. name = Layout:GetName() -- string <- void
  247. Results:
  248. name: The name of this element, as provided by the addon that created it.
  249. GetOwner
  250. Retrieves the owner of this element.
  251. owner = Layout:GetOwner() -- string <- void
  252. Results:
  253. owner: The owner of this element. Given as an addon identifier.
  254. GetRight
  255. Retrieves the X position of the right edge of this element.
  256. right = Layout:GetRight() -- number <- void
  257. Results:
  258. right: The X position of the right edge of this element.
  259. GetTop
  260. Retrieves the Y position of the top edge of this element.
  261. top = Layout:GetTop() -- number <- void
  262. Results:
  263. top: The Y position of the top edge of this element.
  264. GetWidth
  265. Retrieves the width of this element.
  266. width = Layout:GetWidth() -- number <- void
  267. Results:
  268. width: The width of this element.
  269. Events:
  270. Move
  271. Size
  272. Frame: Inherits from Layout
  273. Members:
  274. GetAlpha
  275. Gets the alpha multiplier of this frame.
  276. alpha = Frame:GetAlpha() -- number <- void
  277. Results:
  278. alpha: The alpha multiplier of this frame. 1 is fully opaque, 0 is fully transparent. This does not include multiplied alphas from this frame's parent - it's the exact value passed to SetAlpha.
  279. GetBackgroundColor
  280. Retrieves the background color of this frame.
  281. r, g, b, a = Frame:GetBackgroundColor() -- number, number, number, number <- void
  282. Results:
  283. b: Blue.
  284. r: Red.
  285. a: Alpha. 1 is fully opaque, 0 is fully transparent.
  286. g: Green.
  287. GetLayer
  288. Gets the frame's layer order.
  289. layer = Frame:GetLayer() -- number <- void
  290. Results:
  291. layer: The render layer of this frame. See Frame:SetLayer for details.
  292. GetParent
  293. Gets the parent of this frame.
  294. parent = Frame:GetParent() -- Frame <- void
  295. Results:
  296. parent: The parent element of this frame.
  297. GetVisible
  298. Gets the visibility flag for this frame.
  299. visible = Frame:GetVisible() -- boolean <- void
  300. Results:
  301. visible: This frame's visibility flag, as set by SetVisible. Does not check the visibility flags of the frame's parents.
  302. SetAllPoints
  303. Pins all the edges of this frame to the edges of a different frame.
  304. Frame:SetAllPoints(target) -- Layout
  305. Parameters:
  306. target: Target Layout to pin this frame's edges to.
  307. SetAlpha
  308. Sets the alpha transparency multiplier for this frame and its children.
  309. Frame:SetAlpha(alpha) -- number
  310. Parameters:
  311. alpha: The new alpha multiplier. 1 is fully opaque, 0 is fully transparent.
  312. SetBackgroundColor
  313. Sets the background color of this frame.
  314. Frame:SetBackgroundColor(r, g, b) -- number, number, number
  315. Frame:SetBackgroundColor(r, g, b, a) -- number, number, number, number
  316. Parameters:
  317. b: Blue.
  318. r: Red.
  319. a: Alpha. 1 is fully opaque, 0 is fully transparent. Defaults to 1.
  320. g: Green.
  321. SetHeight
  322. Sets the height of this frame. Undefined results if the frame already has two pinned Y coordinates.
  323. Frame:SetHeight(height) -- number
  324. Parameters:
  325. height: The new height of this frame.
  326. SetLayer
  327. Sets the frame layer for this frame. This can be any number. Frames are drawn in ascending order. If two frames have the same layer number, then the order of those frames is undefined, but stable during a single play session. Frames are always drawn after their parents.
  328. Frame:SetLayer(layer) -- number
  329. Parameters:
  330. layer: The new layer for this frame.
  331. SetParent
  332. Sets the parent of this frame. Circular dependencies result in undefined behavior.
  333. Frame:SetParent(parent) -- Frame
  334. Parameters:
  335. parent: The new parent for this frame.
  336. SetPoint
  337. Pins a point on this frame to a location on another frame. This is a rather complex function and you should look at examples to see how to use it. Better documentation will be forthcoming.
  338. Frame:SetPoint(...) -- ...
  339. Parameters:
  340. ...: This function's parameters are complicated. More details will be forthcoming.
  341. SetVisible
  342. Sets the frame's visibility flag. If set to false, then this frame and all its children will not be rendered or accept mouse input.
  343. Frame:SetVisible(visible) -- boolean
  344. Parameters:
  345. visible: The new visibility flag.
  346. SetWidth
  347. Sets the width of this frame. Undefined results if the frame already has two pinned X coordinates.
  348. Frame:SetWidth(width) -- number
  349. Parameters:
  350. width: The new width of this frame.
  351. Events:
  352. LeftDown
  353. LeftUp
  354. Context: Inherits from Frame
  355. Members:
  356. (No extra members)
  357. Events:
  358. (No extra events)
  359. Text: Inherits from Frame
  360. Members:
  361. GetFont
  362. Gets the current font used for this element.
  363. source, font = Text:GetFont() -- string, string <- void
  364. Results:
  365. font: The actual font identifier. Either a resource identifier or a filename.
  366. source: The source of the resource. "Rift" will take the resource from Rift's internal data. Anything else will take the resource from the addon with that identifier.
  367. GetFontColor
  368. Gets the current font color for this element.
  369. r, g, b, a = Text:GetFontColor() -- number, number, number, number <- void
  370. Results:
  371. b: Blue.
  372. r: Red.
  373. a: Alpha. 1 is fully opaque, 0 is fully transparent.
  374. g: Green.
  375. GetFontSize
  376. Gets the font size of the current element.
  377. fontsize = Text:GetFontSize() -- number <- void
  378. Results:
  379. fontsize: The current font size of this element.
  380. GetFullHeight
  381. Get the height that would be required for this element to display all lines of text.
  382. height = Text:GetFullHeight() -- number <- void
  383. Results:
  384. height: The element height needed to display all lines of text.
  385. GetFullWidth
  386. Get the width that would be required for this element to avoid word wrapping or truncation.
  387. width = Text:GetFullWidth() -- number <- void
  388. Results:
  389. width: The element width needed to avoid word wrapping or truncation.
  390. GetText
  391. Get the current text for this element.
  392. text = Text:GetText() -- string <- void
  393. Results:
  394. text: The current text of the element.
  395. GetWordwrap
  396. Gets the wordwrap flag for this element.
  397. wordwrap = Text:GetWordwrap() -- boolean <- void
  398. Results:
  399. wordwrap: The current wordwrap flag for this element. If false, long lines will be truncated. Defaults to false.
  400. ResizeToText
  401. Sets the element's width and height to display all text without wordwrapping or truncation.
  402. Text:ResizeToText() -- void
  403. SetFont
  404. Sets the current font used for this element.
  405. Text:SetFont(source, font) -- string, string
  406. Parameters:
  407. font: The actual font identifier. Either a resource identifier or a filename.
  408. source: The source of the resource. "Rift" will take the resource from Rift's internal data. Anything else will take the resource from the addon with that identifier.
  409. SetFontColor
  410. Sets the current font color for this element.
  411. Text:SetFontColor(r, g, b) -- number, number, number
  412. Text:SetFontColor(r, g, b, a) -- number, number, number, number
  413. Parameters:
  414. b: Blue.
  415. r: Red.
  416. a: Alpha. 1 is fully opaque, 0 is fully transparent. Defaults to 1.
  417. g: Green.
  418. SetFontSize
  419. Sets the current font size of this element.
  420. Text:SetFontSize(fontsize) -- number
  421. Parameters:
  422. fontsize: The new font size of this element.
  423. SetText
  424. Sets the current text for this element.
  425. Text:SetText(text) -- string
  426. Parameters:
  427. text: The new text for the element.
  428. SetWordwrap
  429. Sets the wordwrap flag for this element.
  430. Text:SetWordwrap(wordwrap) -- boolean
  431. Parameters:
  432. wordwrap: The new wordwrap flag for this element. If false, long lines will be truncated. Defaults to false.
  433. Events:
  434. (No extra events)
  435. Texture: Inherits from Frame
  436. Members:
  437. GetTexture
  438. Gets the current texture used for this element.
  439. source, texture = Texture:GetTexture() -- string, string <- void
  440. Results:
  441. source: The source of the resource. "Rift" will take the resource from Rift's internal data. Anything else will take the resource from the addon with that identifier.
  442. texture: The actual texture identifier. Either a resource identifier or a filename.
  443. GetTextureHeight
  444. Returns the actual pixel height of the current texture.
  445. height = Texture:GetTextureHeight() -- number <- void
  446. Results:
  447. height: The height of the current texture in pixels.
  448. GetTextureWidth
  449. Returns the actual pixel width of the current texture.
  450. width = Texture:GetTextureWidth() -- number <- void
  451. Results:
  452. width: The width of the current texture in pixels.
  453. ResizeToTexture
  454. Sets the element's width and height to the exact pixel size of the texture.
  455. Texture:ResizeToTexture() -- void
  456. SetTexture
  457. Sets the current texture used for this element.
  458. Texture:SetTexture(source, texture) -- string, string
  459. Parameters:
  460. source: The source of the resource. "Rift" will take the resource from Rift's internal data. Anything else will take the resource from the addon with that identifier.
  461. texture: The actual texture identifier. Either a resource identifier or a filename.
  462. Events:
  463. (No extra events)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement