Documentation
¶
Overview ¶
Package TabContainer provides methods for working with TabContainer object instances.
Index ¶
- type Advanced
- type Any
- type Instance
- func (self Instance) AllTabsInFront() bool
- func (self Instance) AsCanvasItem() CanvasItem.Instance
- func (self Instance) AsContainer() Container.Instance
- func (self Instance) AsControl() Control.Instance
- func (self Instance) AsNode() Node.Instance
- func (self Instance) AsObject() [1]gd.Object
- func (self Instance) AsTabContainer() Instance
- func (self Instance) ClipTabs() bool
- func (self Instance) CurrentTab() int
- func (self Instance) DeselectEnabled() bool
- func (self Instance) DragToRearrangeEnabled() bool
- func (self Instance) GetCurrentTabControl() [1]gdclass.Control
- func (self Instance) GetPopup() [1]gdclass.Popup
- func (self Instance) GetPreviousTab() int
- func (self Instance) GetTabBar() [1]gdclass.TabBar
- func (self Instance) GetTabButtonIcon(tab_idx int) [1]gdclass.Texture2D
- func (self Instance) GetTabControl(tab_idx int) [1]gdclass.Control
- func (self Instance) GetTabCount() int
- func (self Instance) GetTabIcon(tab_idx int) [1]gdclass.Texture2D
- func (self Instance) GetTabIconMaxWidth(tab_idx int) int
- func (self Instance) GetTabIdxAtPoint(point Vector2.XY) int
- func (self Instance) GetTabIdxFromControl(control [1]gdclass.Control) int
- func (self Instance) GetTabMetadata(tab_idx int) any
- func (self Instance) GetTabTitle(tab_idx int) string
- func (self Instance) GetTabTooltip(tab_idx int) string
- func (self Instance) IsTabDisabled(tab_idx int) bool
- func (self Instance) IsTabHidden(tab_idx int) bool
- func (self Instance) OnActiveTabRearranged(cb func(idx_to int))
- func (self Instance) OnPrePopupPressed(cb func())
- func (self Instance) OnTabButtonPressed(cb func(tab int))
- func (self Instance) OnTabChanged(cb func(tab int))
- func (self Instance) OnTabClicked(cb func(tab int))
- func (self Instance) OnTabHovered(cb func(tab int))
- func (self Instance) OnTabSelected(cb func(tab int))
- func (self Instance) SelectNextAvailable() bool
- func (self Instance) SelectPreviousAvailable() bool
- func (self Instance) SetAllTabsInFront(value bool)
- func (self Instance) SetClipTabs(value bool)
- func (self Instance) SetCurrentTab(value int)
- func (self Instance) SetDeselectEnabled(value bool)
- func (self Instance) SetDragToRearrangeEnabled(value bool)
- func (self Instance) SetPopup(popup [1]gdclass.Node)
- func (self Instance) SetTabAlignment(value gdclass.TabBarAlignmentMode)
- func (self Instance) SetTabButtonIcon(tab_idx int, icon [1]gdclass.Texture2D)
- func (self Instance) SetTabDisabled(tab_idx int, disabled bool)
- func (self Instance) SetTabFocusMode(value gdclass.ControlFocusMode)
- func (self Instance) SetTabHidden(tab_idx int, hidden bool)
- func (self Instance) SetTabIcon(tab_idx int, icon [1]gdclass.Texture2D)
- func (self Instance) SetTabIconMaxWidth(tab_idx int, width int)
- func (self Instance) SetTabMetadata(tab_idx int, metadata any)
- func (self Instance) SetTabTitle(tab_idx int, title string)
- func (self Instance) SetTabTooltip(tab_idx int, tooltip string)
- func (self Instance) SetTabsPosition(value gdclass.TabContainerTabPosition)
- func (self Instance) SetTabsRearrangeGroup(value int)
- func (self Instance) SetTabsVisible(value bool)
- func (self Instance) SetUseHiddenTabsForMinSize(value bool)
- func (self Instance) TabAlignment() gdclass.TabBarAlignmentMode
- func (self Instance) TabFocusMode() gdclass.ControlFocusMode
- func (self Instance) TabsPosition() gdclass.TabContainerTabPosition
- func (self Instance) TabsRearrangeGroup() int
- func (self Instance) TabsVisible() bool
- func (self *Instance) UnsafePointer() unsafe.Pointer
- func (self Instance) UseHiddenTabsForMinSize() bool
- func (self Instance) Virtual(name string) reflect.Value
- type TabPosition
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Advanced ¶
type Advanced = class
Advanced exposes a 1:1 low-level instance of the class, undocumented, for those who know what they are doing.
type Instance ¶
type Instance [1]gdclass.TabContainer
Arranges child controls into a tabbed view, creating a tab for each one. The active tab's corresponding control is made visible, while all other child controls are hidden. Ignores non-control children. [b]Note:[/b] The drawing of the clickable tabs is handled by this node; [TabBar] is not needed.
var Nil Instance
Nil is a nil/null instance of the class. Equivalent to the zero value.
func (Instance) AllTabsInFront ¶
func (Instance) AsCanvasItem ¶
func (self Instance) AsCanvasItem() CanvasItem.Instance
func (Instance) AsContainer ¶
func (Instance) AsTabContainer ¶
func (Instance) CurrentTab ¶
func (Instance) DeselectEnabled ¶
func (Instance) DragToRearrangeEnabled ¶
func (Instance) GetCurrentTabControl ¶
Returns the child [Control] node located at the active tab index.
func (Instance) GetPopup ¶
Returns the [Popup] node instance if one has been set already with [method set_popup]. [b]Warning:[/b] This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their [member Window.visible] property.
func (Instance) GetPreviousTab ¶
Returns the previously active tab index.
func (Instance) GetTabBar ¶
Returns the [TabBar] contained in this container. [b]Warning:[/b] This is a required internal node, removing and freeing it or editing its tabs may cause a crash. If you wish to edit the tabs, use the methods provided in [TabContainer].
func (Instance) GetTabButtonIcon ¶
Returns the button icon from the tab at index [param tab_idx].
func (Instance) GetTabControl ¶
Returns the [Control] node from the tab at index [param tab_idx].
func (Instance) GetTabIcon ¶
Returns the [Texture2D] for the tab at index [param tab_idx] or [code]null[/code] if the tab has no [Texture2D].
func (Instance) GetTabIconMaxWidth ¶
Returns the maximum allowed width of the icon for the tab at index [param tab_idx].
func (Instance) GetTabIdxAtPoint ¶
Returns the index of the tab at local coordinates [param point]. Returns [code]-1[/code] if the point is outside the control boundaries or if there's no tab at the queried position.
func (Instance) GetTabIdxFromControl ¶
Returns the index of the tab tied to the given [param control]. The control must be a child of the [TabContainer].
func (Instance) GetTabMetadata ¶
Returns the metadata value set to the tab at index [param tab_idx] using [method set_tab_metadata]. If no metadata was previously set, returns [code]null[/code] by default.
func (Instance) GetTabTitle ¶
Returns the title of the tab at index [param tab_idx]. Tab titles default to the name of the indexed child node, but this can be overridden with [method set_tab_title].
func (Instance) GetTabTooltip ¶
Returns the tooltip text of the tab at index [param tab_idx].
func (Instance) IsTabDisabled ¶
Returns [code]true[/code] if the tab at index [param tab_idx] is disabled.
func (Instance) IsTabHidden ¶
Returns [code]true[/code] if the tab at index [param tab_idx] is hidden.
func (Instance) OnActiveTabRearranged ¶
func (Instance) OnPrePopupPressed ¶
func (self Instance) OnPrePopupPressed(cb func())
func (Instance) OnTabButtonPressed ¶
func (Instance) OnTabChanged ¶
func (Instance) OnTabClicked ¶
func (Instance) OnTabHovered ¶
func (Instance) OnTabSelected ¶
func (Instance) SelectNextAvailable ¶
Selects the first available tab with greater index than the currently selected. Returns [code]true[/code] if tab selection changed.
func (Instance) SelectPreviousAvailable ¶
Selects the first available tab with lower index than the currently selected. Returns [code]true[/code] if tab selection changed.
func (Instance) SetAllTabsInFront ¶
func (Instance) SetClipTabs ¶
func (Instance) SetCurrentTab ¶
func (Instance) SetDeselectEnabled ¶
func (Instance) SetDragToRearrangeEnabled ¶
func (Instance) SetPopup ¶
If set on a [Popup] node instance, a popup menu icon appears in the top-right corner of the [TabContainer] (setting it to [code]null[/code] will make it go away). Clicking it will expand the [Popup] node.
func (Instance) SetTabAlignment ¶
func (self Instance) SetTabAlignment(value gdclass.TabBarAlignmentMode)
func (Instance) SetTabButtonIcon ¶
Sets the button icon from the tab at index [param tab_idx].
func (Instance) SetTabDisabled ¶
If [param disabled] is [code]true[/code], disables the tab at index [param tab_idx], making it non-interactable.
func (Instance) SetTabFocusMode ¶
func (self Instance) SetTabFocusMode(value gdclass.ControlFocusMode)
func (Instance) SetTabHidden ¶
If [param hidden] is [code]true[/code], hides the tab at index [param tab_idx], making it disappear from the tab area.
func (Instance) SetTabIcon ¶
Sets an icon for the tab at index [param tab_idx].
func (Instance) SetTabIconMaxWidth ¶
Sets the maximum allowed width of the icon for the tab at index [param tab_idx]. This limit is applied on top of the default size of the icon and on top of [theme_item icon_max_width]. The height is adjusted according to the icon's ratio.
func (Instance) SetTabMetadata ¶
Sets the metadata value for the tab at index [param tab_idx], which can be retrieved later using [method get_tab_metadata].
func (Instance) SetTabTitle ¶
Sets a custom title for the tab at index [param tab_idx] (tab titles default to the name of the indexed child node). Set it back to the child's name to make the tab default to it again.
func (Instance) SetTabTooltip ¶
Sets a custom tooltip text for tab at index [param tab_idx]. [b]Note:[/b] By default, if the [param tooltip] is empty and the tab text is truncated (not all characters fit into the tab), the title will be displayed as a tooltip. To hide the tooltip, assign [code]" "[/code] as the [param tooltip] text.
func (Instance) SetTabsPosition ¶
func (self Instance) SetTabsPosition(value gdclass.TabContainerTabPosition)
func (Instance) SetTabsRearrangeGroup ¶
func (Instance) SetTabsVisible ¶
func (Instance) SetUseHiddenTabsForMinSize ¶
func (Instance) TabAlignment ¶
func (self Instance) TabAlignment() gdclass.TabBarAlignmentMode
func (Instance) TabFocusMode ¶
func (self Instance) TabFocusMode() gdclass.ControlFocusMode
func (Instance) TabsPosition ¶
func (self Instance) TabsPosition() gdclass.TabContainerTabPosition
func (Instance) TabsRearrangeGroup ¶
func (Instance) TabsVisible ¶
func (*Instance) UnsafePointer ¶
func (Instance) UseHiddenTabsForMinSize ¶
type TabPosition ¶
type TabPosition = gdclass.TabContainerTabPosition //gd:TabContainer.TabPosition
const ( /*Places the tab bar at the top.*/ PositionTop TabPosition = 0 /*Places the tab bar at the bottom. The tab bar's [StyleBox] will be flipped vertically.*/ PositionBottom TabPosition = 1 /*Represents the size of the [enum TabPosition] enum.*/ PositionMax TabPosition = 2 )