Interface TParentElement

All Superinterfaces:
IEnableStateProvider
All Known Subinterfaces:
IMenuPanelItem
All Known Implementing Classes:
AbstractFileListPanel, ActionBar, ActionBar.FileNameInputField, FileListItem, FileListPanel, NavigationBar, SidebarPanel, TBlankElement, TButtonWidget, TCheckboxWidget, TClickableWidget, TContextMenuPanel, TElement, TEntityRendererElement, TestTScreen, TestTWidgetHudScreen, TFileChooserScreen, TFileExplorerPanel, TFillColorElement, TitleBar, TitleBar.TitleBarSquareButton, TLabelElement, TMenuBarPanel, TMenuPanel, TMenuPanelButton, TMenuPanelSeparator, TPanelElement, TRefreshablePanelElement, TScreen, TScreenPlus, TScrollBarWidget, TSelectEnumWidget, TSelectFileFilterWidget, TSelectWidget, TSliderWidget, TStackTraceScreen, TTextFieldWidget, TTextureElement, TWidgetHudScreen

public interface TParentElement extends IEnableStateProvider
The TParentElement interface represents a GUI element in the TCDCommons framework. Implementations of this interface can act as parent elements for other GUI elements, providing a structural hierarchy for GUI representation and interaction.

Each TParentElement has an X and Y coordinate, as well as a width and height. These attributes define the element's position and size within the GUI layout.

Implementing classes should ensure these properties are correctly maintained to ensure accurate representation and interaction within the GUI.

See Also:
  • Field Details

    • MAX_CHILD_NESTING_DEPTH

      static final int MAX_CHILD_NESTING_DEPTH
      The maximum depth of nested children that can be iterated over by the __findChild(TParentElement, Predicate, boolean, int) method.

      This limit is enforced to prevent several potential issues:

      • Stack overflow due to excessive recursion
      • Performance degradation from handling an excessive number of nested children
      • Infinite recursion resulting from a child element containing itself as one of its children
      If the iteration depth exceeds this limit, the __findChild(TParentElement, Predicate, boolean, int) method will return null.
      See Also:
  • Method Details