Add UIObject

This commit is contained in:
2025-01-02 17:00:31 +01:00
parent 6d2643d709
commit 94afae9679

21
ui/UIObject.lua Normal file
View File

@@ -0,0 +1,21 @@
---@meta
---UIObject is an abstract UI object type that is used to group together methods that are common to all user interface types. All of the various user interface elements in World of Warcraft are derived from UIObject.
---@class UIObject
UIObject = {
---Returns the widget object's name
---@param self UIObject
---@return string Name of the object
GetName = function(self) end,
---Returns the widget object's widget type
---@param self UIObject
---@return string Name of the object's type (e.g. Frame, Button, FontString, etc.)
GetObjectType = function(self) end,
--- Returns whether the object belongs to a given widget type
---@param self UIObject
---@param type string Name of the object's type (e.g. Frame, Button, FontString, etc.)
---@return number|nil 1 if the object belongs to the given type (or a subtype thereof); otherwise nil
IsObjectType = function(self, type) end
}