Skip to content

UOperatingSystemWidgetBase

#include <OperatingSystemSimulator/Public/Widgets/Common/OperatingSystemWidgetBase.h>
class UOperatingSystemWidgetBase

Defined in OperatingSystemWidgetBase.h:21

Inherits: UCommonUserWidget, IOperatingSystemThemeInterface Subclassed by: UOperatingSystemMailContentWidget, UOperatingSystemSettingModuleWidget, UOperatingSystemTaskbarButton, UOperatingSystemWindowWidgetBase

---
config:
  class:
    hideEmptyMembersBox: true
---
classDiagram
  class UOperatingSystemWidgetBase["UOperatingSystemWidgetBase"]
  class UCommonUserWidget["UCommonUserWidget"]
  UCommonUserWidget <|-- UOperatingSystemWidgetBase
  class IOperatingSystemThemeInterface["IOperatingSystemThemeInterface"]
  IOperatingSystemThemeInterface <|-- UOperatingSystemWidgetBase
  class UOperatingSystemMailContentWidget["UOperatingSystemMailContentWidget"]
  UOperatingSystemWidgetBase <|-- UOperatingSystemMailContentWidget
  class UOperatingSystemSettingModuleWidget["UOperatingSystemSettingModuleWidget"]
  UOperatingSystemWidgetBase <|-- UOperatingSystemSettingModuleWidget
  class UOperatingSystemTaskbarButton["UOperatingSystemTaskbarButton"]
  UOperatingSystemWidgetBase <|-- UOperatingSystemTaskbarButton
  class UOperatingSystemWindowWidgetBase["UOperatingSystemWindowWidgetBase"]
  UOperatingSystemWidgetBase <|-- UOperatingSystemWindowWidgetBase
---
config:
  class:
    hideEmptyMembersBox: true
---
classDiagram
  class UOperatingSystemWidgetBase["UOperatingSystemWidgetBase"]
  class UOperatingSystem["UOperatingSystem"]
  UOperatingSystemWidgetBase *-- UOperatingSystem
---
config:
  class:
    hideEmptyMembersBox: true
---
classDiagram
  class UOperatingSystemWidgetBase {
    +UOperatingSystemWidgetBase()
    +SetOperatingSystem(UOperatingSystem *NewOS)
    +DestroyOperatingSystemBaseWidget()
    +ThemeChanged(UOperatingSystemSettingModule_Theme *ThemeP
    +ParentOS : TObjectPtr< UOperatingSystem() >
    +NativeConstruct() override
    +OnDestroyWidget()
    +K2_OnSetOperatingSystem()
    +bHasBlueprintOnSetOperatingSystem : uint8
    +bHasBlueprintOnOperatingSystemThemeChanged : uint8
  }

Documented call sites inside the plugin (3):

flowchart LR
  UOperatingSystemWidgetBase__SetOperatingSystem["UOperatingSystemWidgetBase::SetOperatingSystem"]
  UOperatingSystemWidget__CreateNewWindow["UOperatingSystemWidget::CreateNewWindow"]
  UOperatingSystemWidget__CreateNewWindow --> UOperatingSystemWidgetBase__SetOperatingSystem
  UOperatingSystemSettingModuleWidget__Internal_SetOperatingSystem["UOperatingSystemSettingModuleWidget::Internal_SetOperatingSystem"]
  UOperatingSystemSettingModuleWidget__Internal_SetOperatingSystem --> UOperatingSystemWidgetBase__SetOperatingSystem
  UOperatingSystemWidgetBase__NativeConstruct["UOperatingSystemWidgetBase::NativeConstruct"]
  UOperatingSystemWidgetBase__NativeConstruct --> UOperatingSystemWidgetBase__SetOperatingSystem

This is an abstract base class that represents an operating system widget. It inherits from UCommonUserWidget and IOperatingSystemThemeInterface. It provides functionality to set the operating system, handle theme changes, and call blueprint events.

ReturnNameDescription
UOperatingSystemWidgetBase
voidSetOperatingSystemSets the given new Operating System as Parent OS and calls OnSetOperatingSystem event in Blueprint
voidDestroyOperatingSystemBaseWidgetDestroys the operating system base widget.
voidThemeChangedCallback function for handling theme changes in the operating system widget.

UOperatingSystemWidgetBase()

Defined in OperatingSystemWidgetBase.h:53

  • CHECK_IN_BP
  • IMPLEMENTED_IN_BP_LAMBDA

void SetOperatingSystem(UOperatingSystem * NewOS)

Defined in OperatingSystemWidgetBase.h:61 Sets the given new Operating System as Parent OS and calls OnSetOperatingSystem event in Blueprint

  • NewOS New OS to set.

void DestroyOperatingSystemBaseWidget()

Defined in OperatingSystemWidgetBase.h:75 Destroys the operating system base widget.

This function is called to destroy the operating system base widget. It performs the following actions:

  1. Calls the OnDestroyWidget() virtual function.

  2. Sets the ParentOS pointer to nullptr.

  3. Removes the widget from its parent.

See also: UOperatingSystemWidgetBase::OnDestroyWidget()

See also: UOperatingSystemWidgetBase::RemoveFromParent()


void ThemeChanged(UOperatingSystemSettingModule_Theme * ThemePayload)

Defined in OperatingSystemWidgetBase.h:89 Callback function for handling theme changes in the operating system widget.

This function is invoked when the operating system theme is changed. It takes a ThemePayload parameter, which is an instance of the UOperatingSystemSettingModule_Theme class. ThemePayload contains information about the new theme that is being applied.

The function first checks if there are any blueprint events registered for handling theme changes. If there are, it calls the Execute_K2_OnOperatingSystemThemeChanged() function, passing this widget instance and the ThemePayload.

  • ThemePayload A pointer to the theme payload object that contains information about the new theme.
ReturnNameDescription
TObjectPtr< UOperatingSystem >ParentOSA pointer to the parent operating system of the operating system widget.

TObjectPtr< UOperatingSystem > ParentOS

Defined in OperatingSystemWidgetBase.h:49 A pointer to the parent operating system of the operating system widget.

This variable is a UObjectPtr that points to a UOperatingSystem object. It is marked as BlueprintReadOnly, which means it can be read from blueprints but not modified. It belongs to the OperatingSystemWidgetBase category and is exposed on spawn.

This variable is used to set and retrieve the operating system for the widget. The SetOperatingSystem() function can be called to set a new operating system, which will trigger the OnSetOperatingSystem event in the blueprint. The ParentOS variable is checked against the new OS to avoid unnecessary updates. If the ParentOS is invalid, the widget will be destroyed.

See also: UOperatingSystem

See also: UOperatingSystemWidgetBase::SetOperatingSystem()

See also: UOperatingSystemWidgetBase::OnSetOperatingSystem()

ReturnNameDescription
voidNativeConstruct virtual override
voidOnDestroyWidget virtual inline
voidK2_OnSetOperatingSystemBlueprint event called when the operating system is set.

virtual override

virtual void NativeConstruct() override

Defined in OperatingSystemWidgetBase.h:93


virtual inline

virtual inline void OnDestroyWidget()

Defined in OperatingSystemWidgetBase.h:95


void K2_OnSetOperatingSystem()

Defined in OperatingSystemWidgetBase.h:107 Blueprint event called when the operating system is set.

This event is called when the operating system for the widget is set using the SetOperatingSystem() function. Blueprint implementations can override this event to perform additional actions or handle the operating system change.

See also: UOperatingSystemWidgetBase::SetOperatingSystem()

ReturnNameDescription
uint8bHasBlueprintOnSetOperatingSystem
uint8bHasBlueprintOnOperatingSystemThemeChanged

uint8 bHasBlueprintOnSetOperatingSystem

Defined in OperatingSystemWidgetBase.h:25


bHasBlueprintOnOperatingSystemThemeChanged

Section titled “bHasBlueprintOnOperatingSystemThemeChanged”
uint8 bHasBlueprintOnOperatingSystemThemeChanged

Defined in OperatingSystemWidgetBase.h:26