Open 3D Engine LyShine Gem API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
UiDynamicScrollBoxInterface Class Referenceabstract

#include <UiDynamicScrollBoxBus.h>

Inherits AZ::ComponentBus.

Public Member Functions

virtual void RefreshContent ()=0
 
virtual void AddElementsToEnd (int numElementsToAdd, bool scrollToEndIfWasAtEnd)=0
 
virtual void RemoveElementsFromFront (int numElementsToRemove)=0
 
virtual void ScrollToEnd ()=0
 Scroll to the end of the list.
 
virtual int GetElementIndexOfChild (AZ::EntityId childElement)=0
 
virtual int GetSectionIndexOfChild (AZ::EntityId childElement)=0
 
virtual AZ::EntityId GetChildAtElementIndex (int index)=0
 
virtual AZ::EntityId GetChildAtSectionAndElementIndex (int sectionIndex, int index)=0
 
virtual bool GetAutoRefreshOnPostActivate ()=0
 Get whether the list should automatically prepare and refresh its content post activation.
 
virtual void SetAutoRefreshOnPostActivate (bool autoRefresh)=0
 Set whether the list should automatically prepare and refresh its content post activation.
 
virtual AZ::EntityId GetPrototypeElement ()=0
 Get the prototype entity used for the elements.
 
virtual void SetPrototypeElement (AZ::EntityId prototypeElement)=0
 Set the prototype entity used for the elements.
 
virtual bool GetElementsVaryInSize ()=0
 Get whether the elements vary in size.
 
virtual void SetElementsVaryInSize (bool varyInSize)=0
 Set whether the elements vary in size.
 
virtual bool GetAutoCalculateVariableElementSize ()=0
 Get whether to auto calculate the elements when they vary in size.
 
virtual void SetAutoCalculateVariableElementSize (bool autoCalculateSize)=0
 Set whether to auto calculate the elements when they vary in size.
 
virtual float GetEstimatedVariableElementSize ()=0
 
virtual void SetEstimatedVariableElementSize (float estimatedSize)=0
 
virtual bool GetSectionsEnabled ()=0
 Get whether the list is divided into sections with headers.
 
virtual void SetSectionsEnabled (bool enabled)=0
 Set whether the list is divided into sections with headers.
 
virtual AZ::EntityId GetPrototypeHeader ()=0
 Get the prototype entity used for the headers.
 
virtual void SetPrototypeHeader (AZ::EntityId prototypeHeader)=0
 Set the prototype entity used for the headers.
 
virtual bool GetHeadersSticky ()=0
 Get whether headers stick to the beginning of the visible list area.
 
virtual void SetHeadersSticky (bool stickyHeaders)=0
 Set whether headers stick to the beginning of the visible list area.
 
virtual bool GetHeadersVaryInSize ()=0
 Get whether the headers vary in size.
 
virtual void SetHeadersVaryInSize (bool varyInSize)=0
 Set whether the headers vary in size.
 
virtual bool GetAutoCalculateVariableHeaderSize ()=0
 Get whether to auto calculate the headers when they vary in size.
 
virtual void SetAutoCalculateVariableHeaderSize (bool autoCalculateSize)=0
 Set whether to auto calculate the headers when they vary in size.
 
virtual float GetEstimatedVariableHeaderSize ()=0
 
virtual void SetEstimatedVariableHeaderSize (float estimatedSize)=0
 

Static Public Attributes

static const AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Single
 Only one component on a entity can implement the events.
 

Detailed Description

Interface class that a dynamic scrollbox component needs to implement. A dynamic scrollbox component sets up scrollbox content as a horizontal or vertical list of elements that are cloned from prototype entities. Only the minimum number of entities are created for efficient scrolling

Member Function Documentation

◆ AddElementsToEnd()

virtual void UiDynamicScrollBoxInterface::AddElementsToEnd ( int  numElementsToAdd,
bool  scrollToEndIfWasAtEnd 
)
pure virtual

Add elements to the end of the list. Used with lists that are not divided into sections

◆ GetChildAtElementIndex()

virtual AZ::EntityId UiDynamicScrollBoxInterface::GetChildAtElementIndex ( int  index)
pure virtual

Get the child element at the specified element index. Used with lists that are not divided into sections

◆ GetChildAtSectionAndElementIndex()

virtual AZ::EntityId UiDynamicScrollBoxInterface::GetChildAtSectionAndElementIndex ( int  sectionIndex,
int  index 
)
pure virtual

Get the child element at the specified section index and element index. Used with lists that are divided into sections

◆ GetElementIndexOfChild()

virtual int UiDynamicScrollBoxInterface::GetElementIndexOfChild ( AZ::EntityId  childElement)
pure virtual

Get the element index of the specified child element. Returns -1 if not found. If the list is divided into sections, the index is local to the section

◆ GetEstimatedVariableElementSize()

virtual float UiDynamicScrollBoxInterface::GetEstimatedVariableElementSize ( )
pure virtual

Get the estimated size for the variable elements. If set to 0, then element sizes are calculated up front rather than when becoming visible

◆ GetEstimatedVariableHeaderSize()

virtual float UiDynamicScrollBoxInterface::GetEstimatedVariableHeaderSize ( )
pure virtual

Get the estimated size for the variable headers. If set to 0, then header sizes are calculated up front rather than when becoming visible

◆ GetSectionIndexOfChild()

virtual int UiDynamicScrollBoxInterface::GetSectionIndexOfChild ( AZ::EntityId  childElement)
pure virtual

Get the section index of the specified child element. Returns -1 if not found. Used with lists that are divided into sections

◆ RefreshContent()

virtual void UiDynamicScrollBoxInterface::RefreshContent ( )
pure virtual

Refresh the content. Should be called when list size or element content has changed. This will reset any cached information such as element sizes, so it is recommended to use AddElementsToEnd and RemoveElementsFromFront if possible when elements vary in size. AddElementsToEnd and RemoveElementsFromFront will also ensure that the scroll offset is adjusted to keep the visible elements in place

◆ RemoveElementsFromFront()

virtual void UiDynamicScrollBoxInterface::RemoveElementsFromFront ( int  numElementsToRemove)
pure virtual

Remove elements from the front of the list. Used with lists that are not divided into sections

◆ SetEstimatedVariableElementSize()

virtual void UiDynamicScrollBoxInterface::SetEstimatedVariableElementSize ( float  estimatedSize)
pure virtual

Set the estimated size for the variable elements. If set to 0, then element sizes are calculated up front rather than when becoming visible

◆ SetEstimatedVariableHeaderSize()

virtual void UiDynamicScrollBoxInterface::SetEstimatedVariableHeaderSize ( float  estimatedSize)
pure virtual

Set the estimated size for the variable headers. If set to 0, then header sizes are calculated up front rather than when becoming visible


The documentation for this class was generated from the following file: