---@meta
---@diagnostic disable

--$Factorio 1.1.70
--$Overlay 5
--$Section LuaGuiElement
-- This file is automatically generated. Edits will be overwritten.

---An element of a custom GUI. This type is used to represent any kind of a GUI element - labels, buttons and frames are all instances of this type. Just like [LuaEntity](https://lua-api.factorio.com/latest/LuaEntity.html), different kinds of elements support different attributes; attempting to access an attribute on an element that doesn't support it (for instance, trying to access the `column_count` of a `textfield`) will result in a runtime error.
---
---The following types of GUI element are supported:
---
---- `"button"`: A clickable element. Relevant event: [on_gui_click](https://lua-api.factorio.com/latest/events.html#on_gui_click)  
---- `"sprite-button"`: A `button` that displays a sprite rather than text. Relevant event: [on_gui_click](https://lua-api.factorio.com/latest/events.html#on_gui_click)  
---- `"checkbox"`: A clickable element with a check mark that can be turned off or on. Relevant event: [on_gui_checked_state_changed](https://lua-api.factorio.com/latest/events.html#on_gui_checked_state_changed)  
---- `"flow"`: An invisible container that lays out its children either horizontally or vertically.  
---- `"frame"`: A non-transparent box that contains other elements. It can have a title (set via the `caption` attribute). Just like a `flow`, it lays out its children either horizontally or vertically. Relevant event: [on_gui_location_changed](https://lua-api.factorio.com/latest/events.html#on_gui_location_changed)  
---- `"label"`: A piece of text.  
---- `"line"`: A horizontal or vertical separation line.  
---- `"progressbar"`: A partially filled bar that can be used to indicate progress.  
---- `"table"`: An invisible container that lays out its children in a specific number of columns. The width of each column is determined by the widest element it contains.  
---- `"textfield"`: A single-line box the user can type into. Relevant events: [on_gui_text_changed](https://lua-api.factorio.com/latest/events.html#on_gui_text_changed), [on_gui_confirmed](https://lua-api.factorio.com/latest/events.html#on_gui_confirmed)  
---- `"radiobutton"`: A clickable element that is functionally identical to a `checkbox`, but has a circular appearance. Relevant event: [on_gui_checked_state_changed](https://lua-api.factorio.com/latest/events.html#on_gui_checked_state_changed)  
---- `"sprite"`: An element that shows an image.  
---- `"scroll-pane"`: An invisible element that is similar to a `flow`, but has the ability to show and use scroll bars.  
---- `"drop-down"`: A drop-down containing strings of text. Relevant event: [on_gui_selection_state_changed](https://lua-api.factorio.com/latest/events.html#on_gui_selection_state_changed)  
---- `"list-box"`: A list of strings, only one of which can be selected at a time. Shows a scroll bar if necessary. Relevant event: [on_gui_selection_state_changed](https://lua-api.factorio.com/latest/events.html#on_gui_selection_state_changed)  
---- `"camera"`: A camera that shows the game at the given position on the given surface. It can visually track an [entity](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.entity) that is set after the element has been created.  
---- `"choose-elem-button"`: A button that lets the player pick from a certain kind of prototype, with optional filtering. Relevant event: [on_gui_elem_changed](https://lua-api.factorio.com/latest/events.html#on_gui_elem_changed)  
---- `"text-box"`: A multi-line `textfield`. Relevant event: [on_gui_text_changed](https://lua-api.factorio.com/latest/events.html#on_gui_text_changed)  
---- `"slider"`: A horizontal number line which can be used to choose a number. Relevant event: [on_gui_value_changed](https://lua-api.factorio.com/latest/events.html#on_gui_value_changed)  
---- `"minimap"`: A minimap preview, similar to the normal player minimap. It can visually track an [entity](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.entity) that is set after the element has been created.  
---- `"entity-preview"`: A preview of an entity. The [entity](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.entity) has to be set after the element has been created.  
---- `"empty-widget"`: An empty element that just exists. The root GUI elements `screen` and `relative` are `empty-widget`s.  
---- `"tabbed-pane"`: A collection of `tab`s and their contents. Relevant event: [on_gui_selected_tab_changed](https://lua-api.factorio.com/latest/events.html#on_gui_selected_tab_changed)  
---- `"tab"`: A tab for use in a `tabbed-pane`.  
---- `"switch"`: A switch with three possible states. Can have labels attached to either side. Relevant event: [on_gui_switch_state_changed](https://lua-api.factorio.com/latest/events.html#on_gui_switch_state_changed)
---
---Each GUI element allows access to its children by having them as attributes. Thus, one can use the `parent.child` syntax to refer to children. Lua also supports the `parent["child"]` syntax to refer to the same element. This can be used in cases where the child has a name that isn't a valid Lua identifier.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html)
---
---### Example  
---This will add a label called `greeting` to the top flow. Immediately after, it will change its text to illustrate accessing child elements. 
---```
---game.player.gui.top.add{type="label", name="greeting", caption="Hi"}
---game.player.gui.top.greeting.caption = "Hello there!"
---game.player.gui.top["greeting"].caption = "Actually, never mind, I don't like your face"
---```
---
---### Example  
---This will add a tabbed-pane and 2 tabs with contents. 
---```
---local tabbed_pane = game.player.gui.top.add{type="tabbed-pane"}
---local tab1 = tabbed_pane.add{type="tab", caption="Tab 1"}
---local tab2 = tabbed_pane.add{type="tab", caption="Tab 2"}
---local label1 = tabbed_pane.add{type="label", caption="Label 1"}
---local label2 = tabbed_pane.add{type="label", caption="Label 2"}
---tabbed_pane.add_tab(tab1, label1)
---tabbed_pane.add_tab(tab2, label2)
---```
---@class LuaGuiElement:LuaObject
---[RW]  
---Whether this textfield (when in numeric mode) allows decimal numbers.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.allow_decimal)
---
---_Can only be used if this is textfield_
---@field allow_decimal boolean 
---[RW]  
---Whether this textfield (when in numeric mode) allows negative numbers.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.allow_negative)
---
---_Can only be used if this is textfield_
---@field allow_negative boolean 
---[RW]  
---Whether the `"none"` state is allowed for this switch.
---
---**Note:** This can't be set to false if the current switch_state is 'none'.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.allow_none_state)
---
---_Can only be used if this is switch_
---@field allow_none_state boolean 
---[RW]  
---The anchor for this relative widget, if any. Setting `nil` clears the anchor.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.anchor)
---@field anchor? GuiAnchor 
---[RW]  
---Whether this frame auto-centers on window resize when stored in [LuaGui::screen](https://lua-api.factorio.com/latest/LuaGui.html#LuaGui.screen).
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.auto_center)
---
---_Can only be used if this is frame_
---@field auto_center boolean 
---[RW]  
---The text to display after the normal tab text (designed to work with numbers)
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.badge_text)
---
---_Can only be used if this is tab_
---@field badge_text LocalisedString 
---[RW]  
---The text displayed on this element. For frames, this is the "heading". For other elements, like buttons or labels, this is the content.
---
---**Note:** Whilst this attribute may be used on all elements without producing an error, it doesn't make sense for tables and flows as they won't display it.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.caption)
---@field caption LocalisedString 
---[R]  
---The child-elements of this GUI element.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.children)
---@field children LuaGuiElement[] 
---[R]  
---Names of all the children of this element. These are the identifiers that can be used to access the child as an attribute of this element.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.children_names)
---@field children_names string[] 
---[RW]  
---Makes it so right-clicking on this textfield clears and focuses it.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.clear_and_focus_on_right_click)
---
---_Can only be used if this is textfield or text-box_
---@field clear_and_focus_on_right_click boolean 
---[RW]  
---The sprite to display on this sprite-button when it is clicked.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.clicked_sprite)
---
---_Can only be used if this is sprite-button_
---@field clicked_sprite SpritePath 
---[R]  
---The number of columns in this table.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.column_count)
---
---_Can only be used if this is table_
---@field column_count uint 
---[R]  
---Direction of this element's layout. May be either `"horizontal"` or `"vertical"`.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.direction)
---
---_Can only be used if this is frame, flow or line_
---@field direction string 
---[RW]  
---The `frame` that is being moved when dragging this GUI element, if any. This element needs to be a child of the `drag_target` at some level.
---
---**Note:** Only top-level elements in [LuaGui::screen](https://lua-api.factorio.com/latest/LuaGui.html#LuaGui.screen) can be `drag_target`s.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.drag_target)
---
---### Example  
---This creates a frame that contains a dragging handle which can move the frame. 
---```
---local frame = player.gui.screen.add{type="frame", direction="vertical"}
---local dragger = frame.add{type="empty-widget", style="draggable_space"}
---dragger.style.size = {128, 24}
---dragger.drag_target = frame
---```
---
---_Can only be used if this is flow, frame, label, table or empty-widget_
---@field drag_target? LuaGuiElement 
---[RW]  
---Whether this table should draw a horizontal grid line below the first table row.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.draw_horizontal_line_after_headers)
---
---_Can only be used if this is table_
---@field draw_horizontal_line_after_headers boolean 
---[RW]  
---Whether this table should draw horizontal grid lines.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.draw_horizontal_lines)
---
---_Can only be used if this is table_
---@field draw_horizontal_lines boolean 
---[RW]  
---Whether this table should draw vertical grid lines.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.draw_vertical_lines)
---
---_Can only be used if this is table_
---@field draw_vertical_lines boolean 
---[RW]  
---The elem filters of this choose-elem-button, if any. The compatible type of filter is determined by `elem_type`.
---
---**Note:** Writing to this field does not change or clear the currently selected element.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.elem_filters)
---
---### Example  
---This will configure a choose-elem-button of type `"entity"` to only show items of type `"furnace"`. 
---```
---button.elem_filters = {{filter = "type", type = "furnace"}}
---```
---
---### Example  
---Then, there are some types of filters that work on a specific kind of attribute. The following will configure a choose-elem-button of type `"entity"` to only show entities that have their `"hidden"` [flags](https://lua-api.factorio.com/latest/Concepts.html#EntityPrototypeFlags) set. 
---```
---button.elem_filters = {{filter = "hidden"}}
---```
---
---### Example  
---Lastly, these filters can be combined at will, taking care to specify how they should be combined (either `"and"` or `"or"`. The following will filter for any `"entities"` that are `"furnaces"` and that are not `"hidden"`. 
---```
---button.elem_filters = {{filter = "type", type = "furnace"}, {filter = "hidden", invert = true, mode = "and"}}
---```
---
---_Can only be used if this is choose-elem-button_
---@field elem_filters? PrototypeFilter 
---[R]  
---The elem type of this choose-elem-button.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.elem_type)
---
---_Can only be used if this is choose-elem-button_
---@field elem_type string 
---[RW]  
---The elem value of this choose-elem-button, if any.
---
---**Note:** The `"signal"` type operates with [SignalID](https://lua-api.factorio.com/latest/Concepts.html#SignalID), while all other types use strings.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.elem_value)
---
---_Can only be used if this is choose-elem-button_
---@field elem_value? string|SignalID 
---[RW]  
---Whether this GUI element is enabled. Disabled GUI elements don't trigger events when clicked.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.enabled)
---@field enabled boolean 
---[RW]  
---The entity associated with this entity-preview, camera, minimap, if any.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.entity)
---
---_Can only be used if this is entity-preview, camera or minimap_
---@field entity? LuaEntity 
---[RW]  
---The force this minimap is using, if any.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.force)
---
---_Can only be used if this is minimap_
---@field force? string 
---[R]  
---The GUI this element is a child of.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.gui)
---@field gui LuaGui 
---[RW]  
---Policy of the horizontal scroll bar. Possible values are `"auto"`, `"never"`, `"always"`, `"auto-and-reserve-space"`, `"dont-show-but-allow-scrolling"`.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.horizontal_scroll_policy)
---
---_Can only be used if this is scroll-pane_
---@field horizontal_scroll_policy string 
---[RW]  
---The sprite to display on this sprite-button when it is hovered.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.hovered_sprite)
---
---_Can only be used if this is sprite-button_
---@field hovered_sprite SpritePath 
---[RW]  
---Whether this GUI element is ignored by interaction. This makes clicks on this element 'go through' to the GUI element or even the game surface below it.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.ignored_by_interaction)
---@field ignored_by_interaction boolean 
---[R]  
---The index of this GUI element (unique amongst the GUI elements of a LuaPlayer).
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.index)
---@field index uint 
---[RW]  
---Whether this textfield displays as a password field, which renders all characters as `*`.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.is_password)
---
---_Can only be used if this is textfield_
---@field is_password boolean 
---[RW]  
---The items in this dropdown or listbox.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.items)
---
---_Can only be used if this is drop-down or list-box_
---@field items LocalisedString[] 
---[RW]  
---The text shown for the left switch label.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.left_label_caption)
---
---_Can only be used if this is switch_
---@field left_label_caption LocalisedString 
---[RW]  
---The tooltip shown on the left switch label.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.left_label_tooltip)
---
---_Can only be used if this is switch_
---@field left_label_tooltip LocalisedString 
---[RW]  
---The location of this widget when stored in [LuaGui::screen](https://lua-api.factorio.com/latest/LuaGui.html#LuaGui.screen). `nil` if not set or not in [LuaGui::screen](https://lua-api.factorio.com/latest/LuaGui.html#LuaGui.screen).
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.location)
---@field location? GuiLocation 
---[RW]  
---Whether this choose-elem-button can be changed by the player.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.locked)
---
---_Can only be used if this is choose-elem-button_
---@field locked boolean 
---[RW]  
---Whether this textfield loses focus after [defines.events.on_gui_confirmed](https://lua-api.factorio.com/latest/defines.html#defines.events.on_gui_confirmed) is fired.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.lose_focus_on_confirm)
---
---_Can only be used if this is textfield_
---@field lose_focus_on_confirm boolean 
---[RW]  
---The player index this minimap is using.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.minimap_player_index)
---
---_Can only be used if this is minimap_
---@field minimap_player_index uint 
---[RW]  
---The mouse button filters for this button or sprite-button.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.mouse_button_filter)
---
---_Can only be used if this is button or sprite-button_
---@field mouse_button_filter MouseButtonFlags 
---[RW]  
---The name of this element. `""` if no name was set.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.name)
---
---### Example
---```
---game.player.gui.top.greeting.name == "greeting"
---```
---@field name string 
---[RW]  
---The number to be shown in the bottom right corner of this sprite-button. Set this to `nil` to show nothing.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.number)
---
---_Can only be used if this is sprite-button_
---@field number double 
---[RW]  
---Whether this textfield is limited to only numberic characters.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.numeric)
---
---_Can only be used if this is textfield_
---@field numeric boolean 
---[R]  
---The class name of this object. Available even when `valid` is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.object_name)
---@field object_name string 
---[R]  
---The direct parent of this element. `nil` if this is a top-level element.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.parent)
---@field parent? LuaGuiElement 
---[R]  
---Index into [LuaGameScript::players](https://lua-api.factorio.com/latest/LuaGameScript.html#LuaGameScript.players) specifying the player who owns this element.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.player_index)
---@field player_index uint 
---[RW]  
---The position this camera or minimap is focused on, if any.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.position)
---
---_Can only be used if this is camera or minimap_
---@field position MapPosition 
---[RW]  
---Whether this text-box is read-only. Defaults to `false`.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.read_only)
---
---_Can only be used if this is text-box_
---@field read_only boolean 
---[RW]  
---Whether the sprite widget should resize according to the sprite in it. Defaults to `true`.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.resize_to_sprite)
---
---_Can only be used if this is sprite_
---@field resize_to_sprite boolean 
---[RW]  
---The text shown for the right switch label.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.right_label_caption)
---
---_Can only be used if this is switch_
---@field right_label_caption LocalisedString 
---[RW]  
---The tooltip shown on the right switch label.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.right_label_tooltip)
---
---_Can only be used if this is switch_
---@field right_label_tooltip LocalisedString 
---[RW]  
---Whether the contents of this text-box are selectable. Defaults to `true`.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.selectable)
---
---_Can only be used if this is text-box_
---@field selectable boolean 
---[RW]  
---The selected index for this dropdown or listbox. Returns `0` if none is selected.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.selected_index)
---
---_Can only be used if this is drop-down or list-box_
---@field selected_index uint 
---[RW]  
---The selected tab index for this tabbed pane, if any.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.selected_tab_index)
---
---_Can only be used if this is tabbed-pane_
---@field selected_tab_index? uint 
---[RW]  
---Related to the number to be shown in the bottom right corner of this sprite-button. When set to `true`, numbers that are non-zero and smaller than one are shown as a percentage rather than the value. For example, `0.5` will be shown as `50%` instead.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.show_percent_for_small_numbers)
---
---_Can only be used if this is sprite-button_
---@field show_percent_for_small_numbers boolean 
---[RW]  
---The value of this slider element.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.slider_value)
---
---_Can only be used if this is slider_
---@field slider_value double 
---[RW]  
---The sprite to display on this sprite-button or sprite in the default state.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.sprite)
---
---_Can only be used if this is sprite-button or sprite_
---@field sprite SpritePath 
---[RW]  
---Is this checkbox or radiobutton checked?
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.state)
---
---_Can only be used if this is checkbox or radiobutton_
---@field state boolean 
---[RW]  
---The style of this element. When read, this evaluates to a [LuaStyle](https://lua-api.factorio.com/latest/LuaStyle.html). For writing, it only accepts a string that specifies the textual identifier (prototype name) of the desired style.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.style)
---@field style LuaStyle|string 
---[RW]  
---The surface index this camera or minimap is using.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.surface_index)
---
---_Can only be used if this is camera or minimap_
---@field surface_index uint 
---[RW]  
---The switch state (left, none, right) for this switch.
---
---**Note:** If [LuaGuiElement::allow_none_state](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.allow_none_state) is false this can't be set to `"none"`.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.switch_state)
---
---_Can only be used if this is switch_
---@field switch_state string 
---[R]  
---The tabs and contents being shown in this tabbed-pane.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.tabs)
---
---_Can only be used if this is tabbed-pane_
---@field tabs TabAndContent[] 
---[RW]  
---The tags associated with this LuaGuiElement.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.tags)
---@field tags Tags 
---[RW]  
---The text contained in this textfield or text-box.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.text)
---
---_Can only be used if this is textfield or text-box_
---@field text string 
---[RW]
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.tooltip)
---@field tooltip LocalisedString 
---[R]  
---The type of this GUI element.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.type)
---@field type string 
---[R]  
---Is this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be `false`. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.valid)
---@field valid boolean 
---[RW]  
---How much this progress bar is filled. It is a value in the range [0, 1].
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.value)
---
---_Can only be used if this is progressbar_
---@field value double 
---[RW]  
---Whether the content of this table should be vertically centered. Overrides [LuaStyle::column_alignments](https://lua-api.factorio.com/latest/LuaStyle.html#LuaStyle.column_alignments). Defaults to `true`.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.vertical_centering)
---
---_Can only be used if this is table_
---@field vertical_centering boolean 
---[RW]  
---Policy of the vertical scroll bar. Possible values are `"auto"`, `"never"`, `"always"`, `"auto-and-reserve-space"`, `"dont-show-but-allow-scrolling"`.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.vertical_scroll_policy)
---
---_Can only be used if this is scroll-pane_
---@field vertical_scroll_policy string 
---[RW]  
---Sets whether this GUI element is visible or completely hidden, taking no space in the layout.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.visible)
---@field visible boolean 
---[RW]  
---Whether this text-box will word-wrap automatically. Defaults to `false`.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.word_wrap)
---
---_Can only be used if this is text-box_
---@field word_wrap boolean 
---[RW]  
---The zoom this camera or minimap is using. This value must be positive.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.zoom)
---
---_Can only be used if this is camera or minimap_
---@field zoom double 
---[R]  
---The indexing operator. Gets children by name.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.index)
---@field [string|uint]? LuaGuiElement 
local LuaGuiElement={
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add)
---@class LuaGuiElement.add_param
---The kind of element to add. Has to be one of the GUI element types listed at the top of this page.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add)
---@field type string 
---Name of the child element. It must be unique within the parent element.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add)
---@field name? string 
---Text displayed on the child element. For frames, this is their title. For other elements, like buttons or labels, this is the content. Whilst this attribute may be used on all elements, it doesn't make sense for tables and flows as they won't display it.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add)
---@field caption? LocalisedString 
---Tooltip of the child element.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add)
---@field tooltip? LocalisedString 
---Whether the child element is enabled. Defaults to `true`.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add)
---@field enabled? boolean 
---Whether the child element is visible. Defaults to `true`.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add)
---@field visible? boolean 
---Whether the child element is ignored by interaction. Defaults to `false`.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add)
---@field ignored_by_interaction? boolean 
---The name of the style prototype to apply to the new element.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add)
---@field style? string 
---[Tags](https://lua-api.factorio.com/latest/Concepts.html#Tags) associated with the child element.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add)
---@field tags? Tags 
---Location in its parent that the child element should slot into. By default, the child will be appended onto the end.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add)
---@field index? uint 
---Where to position the child element when in the `relative` element.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add)
---@field anchor? GuiAnchor 
---Applies to **"button"**: (optional)  
---Which mouse buttons the button responds to. Defaults to `"left-and-right"`.
---
---Applies to **"sprite-button"**: (optional)  
---The mouse buttons that the button responds to. Defaults to `"left-and-right"`.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add)
---@field mouse_button_filter? MouseButtonFlags 
---Applies to **"flow"**: (optional)  
---The initial direction of the flow's layout. See [LuaGuiElement::direction](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.direction). Defaults to `"horizontal"`.
---
---Applies to **"frame"**: (optional)  
---The initial direction of the frame's layout. See [LuaGuiElement::direction](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.direction). Defaults to `"horizontal"`.
---
---Applies to **"line"**: (optional)  
---The initial direction of the line. Defaults to `"horizontal"`.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add)
---@field direction? string 
---Applies to **"table"**: (required)  
---Number of columns. This can't be changed after the table is created.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add)
---@field column_count uint 
---Applies to **"table"**: (optional)  
---Whether the table should draw vertical grid lines. Defaults to `false`.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add)
---@field draw_vertical_lines? boolean 
---Applies to **"table"**: (optional)  
---Whether the table should draw horizontal grid lines. Defaults to `false`.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add)
---@field draw_horizontal_lines? boolean 
---Applies to **"table"**: (optional)  
---Whether the table should draw a single horizontal grid line after the headers. Defaults to `false`.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add)
---@field draw_horizontal_line_after_headers? boolean 
---Applies to **"table"**: (optional)  
---Whether the content of the table should be vertically centered. Defaults to `true`.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add)
---@field vertical_centering? boolean 
---Applies to **"textfield"**: (optional)  
---The initial text contained in the textfield.
---
---Applies to **"text-box"**: (optional)  
---The initial text contained in the text-box.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add)
---@field text? string 
---Applies to **"textfield"**: (optional)  
---Defaults to `false`.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add)
---@field numeric? boolean 
---Applies to **"textfield"**: (optional)  
---Defaults to `false`.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add)
---@field allow_decimal? boolean 
---Applies to **"textfield"**: (optional)  
---Defaults to `false`.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add)
---@field allow_negative? boolean 
---Applies to **"textfield"**: (optional)  
---Defaults to `false`.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add)
---@field is_password? boolean 
---Applies to **"textfield"**: (optional)  
---Defaults to `false`.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add)
---@field lose_focus_on_confirm? boolean 
---Applies to **"textfield"**: (optional)  
---Defaults to `false`.
---
---Applies to **"text-box"**: (optional)  
---Defaults to `false`.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add)
---@field clear_and_focus_on_right_click? boolean 
---Applies to **"progressbar"**: (optional)  
---The initial value of the progressbar, in the range [0, 1]. Defaults to `0`.
---
---Applies to **"slider"**: (optional)  
---The initial value for the slider. Defaults to `minimum_value`.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add)
---@field value? double 
---Applies to **"checkbox"**: (required)  
---The initial checked-state of the checkbox.
---
---Applies to **"radiobutton"**: (required)  
---The initial checked-state of the radiobutton.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add)
---@field state boolean 
---Applies to **"sprite-button"**: (optional)  
---Path to the image to display on the button.
---
---Applies to **"sprite"**: (optional)  
---Path to the image to display.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add)
---@field sprite? SpritePath 
---Applies to **"sprite-button"**: (optional)  
---Path to the image to display on the button when it is hovered.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add)
---@field hovered_sprite? SpritePath 
---Applies to **"sprite-button"**: (optional)  
---Path to the image to display on the button when it is clicked.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add)
---@field clicked_sprite? SpritePath 
---Applies to **"sprite-button"**: (optional)  
---The number shown on the button.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add)
---@field number? double 
---Applies to **"sprite-button"**: (optional)  
---Formats small numbers as percentages. Defaults to `false`.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add)
---@field show_percent_for_small_numbers? boolean 
---Applies to **"sprite"**: (optional)  
---Whether the widget should resize according to the sprite in it. Defaults to `true`.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add)
---@field resize_to_sprite? boolean 
---Applies to **"scroll-pane"**: (optional)  
---Policy of the horizontal scroll bar. Possible values are `"auto"`, `"never"`, `"always"`, `"auto-and-reserve-space"`, `"dont-show-but-allow-scrolling"`. Defaults to `"auto"`.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add)
---@field horizontal_scroll_policy? string 
---Applies to **"scroll-pane"**: (optional)  
---Policy of the vertical scroll bar. Possible values are `"auto"`, `"never"`, `"always"`, `"auto-and-reserve-space"`, `"dont-show-but-allow-scrolling"`. Defaults to `"auto"`.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add)
---@field vertical_scroll_policy? string 
---Applies to **"drop-down"**: (optional)  
---The initial items in the dropdown.
---
---Applies to **"list-box"**: (optional)  
---The initial items in the listbox.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add)
---@field items? LocalisedString[] 
---Applies to **"drop-down"**: (optional)  
---The index of the initially selected item. Defaults to 0.
---
---Applies to **"list-box"**: (optional)  
---The index of the initially selected item. Defaults to 0.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add)
---@field selected_index? uint 
---Applies to **"camera"**: (required)  
---The position the camera centers on.
---
---Applies to **"minimap"**: (optional)  
---The position the minimap centers on. Defaults to the player's current position.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add)
---@field position MapPosition 
---Applies to **"camera"**: (optional)  
---The surface that the camera will render. Defaults to the player's current surface.
---
---Applies to **"minimap"**: (optional)  
---The surface the camera will render. Defaults to the player's current surface.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add)
---@field surface_index? uint 
---Applies to **"camera"**: (optional)  
---The initial camera zoom. Defaults to `0.75`.
---
---Applies to **"minimap"**: (optional)  
---The initial camera zoom. Defaults to `0.75`.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add)
---@field zoom? double 
---Applies to **"choose-elem-button"**: (required)  
---The type of the button - one of the following values.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add)
---@field elem_type string 
---Applies to **"choose-elem-button"**: (optional)  
---If type is `"item"` - the default value for the button.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add)
---@field item? string 
---Applies to **"choose-elem-button"**: (optional)  
---If type is `"tile"` - the default value for the button.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add)
---@field tile? string 
---Applies to **"choose-elem-button"**: (optional)  
---If type is `"entity"` - the default value for the button.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add)
---@field entity? string 
---Applies to **"choose-elem-button"**: (optional)  
---If type is `"signal"` - the default value for the button.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add)
---@field signal? SignalID 
---Applies to **"choose-elem-button"**: (optional)  
---If type is `"fluid"` - the default value for the button.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add)
---@field fluid? string 
---Applies to **"choose-elem-button"**: (optional)  
---If type is `"recipe"` - the default value for the button.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add)
---@field recipe? string 
---Applies to **"choose-elem-button"**: (optional)  
---If type is `"decorative"` - the default value for the button.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add)
---@field decorative? string 
---Applies to **"choose-elem-button"**: (optional)  
---If type is `"item-group"` - the default value for the button.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add)
---@field item-group? string 
---Applies to **"choose-elem-button"**: (optional)  
---If type is `"achievement"` - the default value for the button.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add)
---@field achievement? string 
---Applies to **"choose-elem-button"**: (optional)  
---If type is `"equipment"` - the default value for the button.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add)
---@field equipment? string 
---Applies to **"choose-elem-button"**: (optional)  
---If type is `"technology"` - the default value for the button.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add)
---@field technology? string 
---Applies to **"choose-elem-button"**: (optional)  
---Filters describing what to show in the selection window. The applicable filter depends on the `elem_type`.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add)
---@field elem_filters? PrototypeFilter 
---Applies to **"slider"**: (optional)  
---The minimum value for the slider. Defaults to `0`.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add)
---@field minimum_value? double 
---Applies to **"slider"**: (optional)  
---The maximum value for the slider. Defaults to `30`.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add)
---@field maximum_value? double 
---Applies to **"slider"**: (optional)  
---The minimum value the slider can move. Defaults to `1`.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add)
---@field value_step? double 
---Applies to **"slider"**: (optional)  
---Defaults to `false`.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add)
---@field discrete_slider? boolean 
---Applies to **"slider"**: (optional)  
---Defaults to `true`.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add)
---@field discrete_values? boolean 
---Applies to **"minimap"**: (optional)  
---The player index the map should use. Defaults to the current player.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add)
---@field chart_player_index? uint 
---Applies to **"minimap"**: (optional)  
---The force this minimap should use. Defaults to the player's current force.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add)
---@field force? string 
---Applies to **"tab"**: (optional)  
---The text to display after the normal tab text (designed to work with numbers).
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add)
---@field badge_text? LocalisedString 
---Applies to **"switch"**: (optional)  
---Possible values are `"left"`, `"right"`, or `"none"`. If set to "none", `allow_none_state` must be `true`. Defaults to `"left"`.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add)
---@field switch_state? string 
---Applies to **"switch"**: (optional)  
---Whether the switch can be set to a middle state. Defaults to `false`.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add)
---@field allow_none_state? boolean 
---Applies to **"switch"**: (optional)
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add)
---@field left_label_caption? LocalisedString 
---Applies to **"switch"**: (optional)
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add)
---@field left_label_tooltip? LocalisedString 
---Applies to **"switch"**: (optional)
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add)
---@field right_label_caption? LocalisedString 
---Applies to **"switch"**: (optional)
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add)
---@field right_label_tooltip? LocalisedString 


---Add a new child element to this GuiElement.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add)
---@param param LuaGuiElement.add_param
---@return LuaGuiElement@The GUI element that was added.
add=function(param)end,
---Inserts a string at the end or at the given index of this dropdown or listbox.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add_item)
---
---_Can only be used if this is drop-down or list-box_
---@param string LocalisedString@The text to insert.
---@param index uint?@The index at which to insert the item.
add_item=function(string,index)end,
---Adds the given tab and content widgets to this tabbed pane as a new tab.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.add_tab)
---
---_Can only be used if this is tabbed-pane_
---@param tab LuaGuiElement@The tab to add, must be a GUI element of type "tab".
---@param content LuaGuiElement@The content to show when this tab is selected. Can be any type of GUI element.
add_tab=function(tab,content)end,
---Moves this GUI element to the "front" so it will draw over other elements.
---
---**Note:** Only works for elements in [LuaGui::screen](https://lua-api.factorio.com/latest/LuaGui.html#LuaGui.screen)
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.bring_to_front)
bring_to_front=function()end,
---Remove children of this element. Any [LuaGuiElement](https://lua-api.factorio.com/latest/LuaGuiElement.html) objects referring to the destroyed elements become invalid after this operation.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.clear)
---
---### Example
---```
---game.player.gui.top.clear()
---```
clear=function()end,
---Removes the items in this dropdown or listbox.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.clear_items)
---
---_Can only be used if this is drop-down or list-box_
clear_items=function()end,
---Remove this element, along with its children. Any [LuaGuiElement](https://lua-api.factorio.com/latest/LuaGuiElement.html) objects referring to the destroyed elements become invalid after this operation.
---
---**Note:** The top-level GUI elements - [LuaGui::top](https://lua-api.factorio.com/latest/LuaGui.html#LuaGui.top), [LuaGui::left](https://lua-api.factorio.com/latest/LuaGui.html#LuaGui.left), [LuaGui::center](https://lua-api.factorio.com/latest/LuaGui.html#LuaGui.center) and [LuaGui::screen](https://lua-api.factorio.com/latest/LuaGui.html#LuaGui.screen) - can't be destroyed.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.destroy)
---
---### Example
---```
---game.player.gui.top.greeting.destroy()
---```
destroy=function()end,
---Focuses this GUI element if possible.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.focus)
focus=function()end,
---Forces this frame to re-auto-center. Only works on frames stored directly in [LuaGui::screen](https://lua-api.factorio.com/latest/LuaGui.html#LuaGui.screen).
---
---**Events:**  
--- * Will raise [on_gui_location_changed](https://lua-api.factorio.com/latest/events.html#on_gui_location_changed) in a future tick.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.force_auto_center)
---
---_Can only be used if this is frame_
force_auto_center=function()end,
---Gets the index that this element has in its parent element.
---
---**Note:** This iterates through the children of the parent of this element, meaning this has a non-free cost to get, but is faster than doing the equivalent in Lua.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.get_index_in_parent)
---@return uint
get_index_in_parent=function()end,
---Gets the item at the given index from this dropdown or listbox.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.get_item)
---
---_Can only be used if this is drop-down or list-box_
---@param index uint@The index to get
---@return LocalisedString
get_item=function(index)end,
---The mod that owns this Gui element or `nil` if it's owned by the scenario script.
---
---**Note:** This has a not-super-expensive, but non-free cost to get.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.get_mod)
---@return string?
get_mod=function()end,
---Returns whether this slider only allows being moved to discrete positions.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.get_slider_discrete_slider)
---@return boolean
get_slider_discrete_slider=function()end,
---Returns whether this slider only allows discrete values.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.get_slider_discrete_values)
---@return boolean
get_slider_discrete_values=function()end,
---Gets this sliders maximum value.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.get_slider_maximum)
---@return double
get_slider_maximum=function()end,
---Gets this sliders minimum value.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.get_slider_minimum)
---@return double
get_slider_minimum=function()end,
---Gets the minimum distance this slider can move.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.get_slider_value_step)
---@return double
get_slider_value_step=function()end,
---All methods and properties that this object supports.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.help)
---@return string
help=function()end,
---Removes the item at the given index from this dropdown or listbox.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.remove_item)
---
---_Can only be used if this is drop-down or list-box_
---@param index uint@The index
remove_item=function(index)end,
---Removes the given tab and its associated content from this tabbed pane.
---
---**Note:** Removing a tab does not destroy the tab or the tab contents. It just removes them from the view.
---
---**Note:** When removing tabs, [LuaGuiElement::selected_tab_index](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.selected_tab_index) needs to be manually updated.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.remove_tab)
---
---_Can only be used if this is tabbed-pane_
---@param tab LuaGuiElement@The tab to remove. If not given, it removes all tabs.
remove_tab=function(tab)end,
---Scrolls this scroll bar to the bottom.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.scroll_to_bottom)
---
---_Can only be used if this is scroll-pane or text-box_
scroll_to_bottom=function()end,
---Scrolls this scroll bar such that the specified GUI element is visible to the player.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.scroll_to_element)
---
---_Can only be used if this is scroll-pane_
---@param element LuaGuiElement@The element to scroll to.
---@param scroll_mode string?@Where the element should be positioned in the scroll-pane. Must be either `"in-view"` or `"top-third"`. Defaults to `"in-view"`.
scroll_to_element=function(element,scroll_mode)end,
---Scrolls the scroll bar such that the specified listbox item is visible to the player.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.scroll_to_item)
---
---_Can only be used if this is list-box_
---@param index int@The item index to scroll to.
---@param scroll_mode string?@Where the item should be positioned in the list-box. Must be either `"in-view"` or `"top-third"`. Defaults to `"in-view"`.
scroll_to_item=function(index,scroll_mode)end,
---Scrolls this scroll bar to the left.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.scroll_to_left)
---
---_Can only be used if this is scroll-pane or text-box_
scroll_to_left=function()end,
---Scrolls this scroll bar to the right.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.scroll_to_right)
---
---_Can only be used if this is scroll-pane or text-box_
scroll_to_right=function()end,
---Scrolls this scroll bar to the top.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.scroll_to_top)
---
---_Can only be used if this is scroll-pane or text-box_
scroll_to_top=function()end,
---Selects a range of text in this textbox.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.select)
---
---### Example  
---Select the characters `amp` from `example`: 
---```
---textbox.select(3, 5)
---```
---
---### Example  
---Move the cursor to the start of the text box: 
---```
---textbox.select(1, 0)
---```
---
---_Can only be used if this is textfield or text-box_
---@param start int@The index of the first character to select
---@param end_ int@The index of the last character to select
select=function(start,end_)end,
---Selects all the text in this textbox.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.select_all)
---
---_Can only be used if this is textfield or text-box_
select_all=function()end,
---Sets the given string at the given index in this dropdown or listbox.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.set_item)
---
---_Can only be used if this is drop-down or list-box_
---@param index uint@The index whose text to replace.
---@param string LocalisedString@The text to set at the given index.
set_item=function(index,string)end,
---Sets whether this slider only allows being moved to discrete positions.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.set_slider_discrete_slider)
---@param value boolean
set_slider_discrete_slider=function(value)end,
---Sets whether this slider only allows discrete values.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.set_slider_discrete_values)
---@param value boolean
set_slider_discrete_values=function(value)end,
---Sets this sliders minimum and maximum values.
---
---**Note:** The minimum can't be >= the maximum.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.set_slider_minimum_maximum)
---@param minimum double
---@param maximum double
set_slider_minimum_maximum=function(minimum,maximum)end,
---Sets the minimum distance this slider can move.
---
---**Note:** The minimum distance can't be > (max - min).
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.set_slider_value_step)
---@param value double
set_slider_value_step=function(value)end,
---Swaps the children at the given indices in this element.
---
---[View documentation](https://lua-api.factorio.com/latest/LuaGuiElement.html#LuaGuiElement.swap_children)
---@param index_1 uint@The index of the first child.
---@param index_2 uint@The index of the second child.
swap_children=function(index_1,index_2)end,
}


