Files
wow_Meta/ui/EditBox.lua
2025-05-04 22:50:42 +02:00

213 lines
6.9 KiB
Lua

---@meta
---@class EditBox : Frame, FontInstance
EditBox = {
--- Adds text to the edit history.
--- @param text string The text to add to the history.
--- @example
--- myEditBox:AddHistoryLine("Previous input")
AddHistoryLine = function(self, text) end,
--- Removes text input focus from this edit box.
--- @example
--- myEditBox:ClearFocus()
ClearFocus = function(self) end,
--- Returns the value of the ignoreArrows attribute.
--- @return boolean ignoreArrows True if arrow keys are ignored.
--- @example
--- local ignoreArrows = myEditBox:GetAltArrowKeyMode()
GetAltArrowKeyMode = function(self) end,
--- Returns the blink speed of the cursor.
--- @return number blinkSpeed The blink speed of the cursor.
--- @example
--- local blinkSpeed = myEditBox:GetBlinkSpeed()
GetBlinkSpeed = function(self) end,
--- Gets the number of history lines for this edit box.
--- @return number historyLines The number of history lines.
--- @example
--- local historyLines = myEditBox:GetHistoryLines()
GetHistoryLines = function(self) end,
--- Gets the input language (locale based, not in-game).
--- @return string inputLanguage The current input language.
--- @example
--- local inputLanguage = myEditBox:GetInputLanguage()
GetInputLanguage = function(self) end,
--- Returns the maximum byte size for entered text.
--- @return number maxBytes The maximum byte size.
--- @example
--- local maxBytes = myEditBox:GetMaxBytes()
GetMaxBytes = function(self) end,
--- Returns the maximum number of letters for entered text.
--- @return number maxLetters The maximum number of letters.
--- @example
--- local maxLetters = myEditBox:GetMaxLetters()
GetMaxLetters = function(self) end,
--- Gets the number of letters in the box.
--- @return number numLetters The number of letters.
--- @example
--- local numLetters = myEditBox:GetNumLetters()
GetNumLetters = function(self) end,
--- Returns the number entered in the edit box, or 0 if the text is not a number.
--- @return number number The number entered.
--- @example
--- local number = myEditBox:GetNumber()
GetNumber = function(self) end,
--- Gets the current text contained in the edit box.
--- @return string text The current text.
--- @example
--- local text = myEditBox:GetText()
GetText = function(self) end,
--- Returns the text insets for the edit box.
--- @return number left The left inset.
--- @return number right The right inset.
--- @return number top The top inset.
--- @return number bottom The bottom inset.
--- @example
--- local left, right, top, bottom = myEditBox:GetTextInsets()
GetTextInsets = function(self) end,
--- Returns true if the edit box has focus.
--- @return boolean hasFocus True if the edit box has focus.
--- @example
--- local hasFocus = myEditBox:HasFocus()
HasFocus = function(self) end,
--- Sets the highlight to all or some of the edit box text.
--- @param startPos number? Optional. The start position of the highlight.
--- @param endPos number? Optional. The end position of the highlight.
--- @example
--- myEditBox:HighlightText(1, 5) -- Highlight first 5 characters
HighlightText = function(self, startPos, endPos) end,
--- Inserts text into the edit box.
--- @param text string The text to insert.
--- @example
--- myEditBox:Insert("Hello")
Insert = function(self, text) end,
--- Returns true if the edit box is set to auto focus.
--- @return boolean autoFocus True if auto focus is enabled.
--- @example
--- local autoFocus = myEditBox:IsAutoFocus()
IsAutoFocus = function(self) end,
--- Returns true if the edit box is multi-line.
--- @return boolean multiLine True if multi-line is enabled.
--- @example
--- local multiLine = myEditBox:IsMultiLine()
IsMultiLine = function(self) end,
--- Returns true if the edit box is numeric.
--- @return boolean numeric True if numeric input is enabled.
--- @example
--- local numeric = myEditBox:IsNumeric()
IsNumeric = function(self) end,
--- Returns true if the edit box is a password field.
--- @return boolean password True if password input is enabled.
--- @example
--- local password = myEditBox:IsPassword()
IsPassword = function(self) end,
--- Sets the mode for the Alt arrow key.
--- @param ignoreArrows boolean True to ignore arrow keys.
--- @example
--- myEditBox:SetAltArrowKeyMode(true)
SetAltArrowKeyMode = function(self, ignoreArrows) end,
--- Sets the auto focus mode for the edit box.
--- @param autoFocus boolean True to enable auto focus.
--- @example
--- myEditBox:SetAutoFocus(true)
SetAutoFocus = function(self, autoFocus) end,
--- Sets the blink speed of the cursor.
--- @param blinkSpeed number The blink speed to set.
--- @example
--- myEditBox:SetBlinkSpeed(0.5)
SetBlinkSpeed = function(self, blinkSpeed) end,
--- Sets focus to the edit box.
--- @example
--- myEditBox:SetFocus()
SetFocus = function(self) end,
--- Sets the number of history lines to remember.
--- @param historyLines number The number of history lines.
--- @example
--- myEditBox:SetHistoryLines(10)
SetHistoryLines = function(self, historyLines) end,
--- Sets the maximum byte size for entered text.
--- @param maxBytes number The maximum byte size.
--- @example
--- myEditBox:SetMaxBytes(255)
SetMaxBytes = function(self, maxBytes) end,
--- Sets the maximum number of letters for entered text.
--- @param maxLetters number The maximum number of letters.
--- @example
--- myEditBox:SetMaxLetters(100)
SetMaxLetters = function(self, maxLetters) end,
--- Sets the edit box to multi-line mode.
--- @param multiLine boolean True to enable multi-line.
--- @example
--- myEditBox:SetMultiLine(true)
SetMultiLine = function(self, multiLine) end,
--- Sets the number in the edit box.
--- @param number number The number to set.
--- @example
--- myEditBox:SetNumber(42)
SetNumber = function(self, number) end,
--- Sets the edit box to numeric mode.
--- @param numeric boolean True to enable numeric input.
--- @example
--- myEditBox:SetNumeric(true)
SetNumeric = function(self, numeric) end,
--- Sets the edit box to password mode.
--- @param password boolean True to enable password input.
--- @example
--- myEditBox:SetPassword(true)
SetPassword = function(self, password) end,
--- Sets the spacing between multiple lines.
--- @param spacing number The spacing value to set.
--- @example
--- myEditBox:SetSpacing(2)
SetSpacing = function(self, spacing) end,
--- Sets the text contained in the edit box.
--- @param text string The text to set.
--- @example
--- myEditBox:SetText("Hello World")
SetText = function(self, text) end,
--- Sets the text insets for the edit box.
--- @param left number The left inset.
--- @param right number The right inset.
--- @param top number The top inset.
--- @param bottom number The bottom inset.
--- @example
--- myEditBox:SetTextInsets(5, 5, 5, 5)
SetTextInsets = function(self, left, right, top, bottom) end,
--- Toggles the input language for the edit box.
--- @example
--- myEditBox:ToggleInputLanguage()
ToggleInputLanguage = function(self) end,
}