UOperatingSystemWidgetBase
#include <OperatingSystemSimulator/Public/Widgets/Common/OperatingSystemWidgetBase.h>class UOperatingSystemWidgetBaseDefined in OperatingSystemWidgetBase.h:21
Inherits:
UCommonUserWidget,IOperatingSystemThemeInterfaceSubclassed by:UOperatingSystemMailContentWidget,UOperatingSystemSettingModuleWidget,UOperatingSystemTaskbarButton,UOperatingSystemWindowWidgetBase
Inheritance diagram
Section titled “Inheritance diagram”---
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
Collaboration diagram
Section titled “Collaboration diagram”---
config:
class:
hideEmptyMembersBox: true
---
classDiagram
class UOperatingSystemWidgetBase["UOperatingSystemWidgetBase"]
class UOperatingSystem["UOperatingSystem"]
UOperatingSystemWidgetBase *-- UOperatingSystem
Class detail
Section titled “Class detail”---
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
}
Caller impact — SetOperatingSystem
Section titled “Caller impact — SetOperatingSystem”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.
Public Methods
Section titled “Public Methods”| Return | Name | Description |
|---|---|---|
UOperatingSystemWidgetBase | ||
void | SetOperatingSystem | Sets the given new Operating System as Parent OS and calls OnSetOperatingSystem event in Blueprint |
void | DestroyOperatingSystemBaseWidget | Destroys the operating system base widget. |
void | ThemeChanged | Callback function for handling theme changes in the operating system widget. |
UOperatingSystemWidgetBase
Section titled “UOperatingSystemWidgetBase”UOperatingSystemWidgetBase()Defined in OperatingSystemWidgetBase.h:53
References
Section titled “References”CHECK_IN_BPIMPLEMENTED_IN_BP_LAMBDA
SetOperatingSystem
Section titled “SetOperatingSystem”void SetOperatingSystem(UOperatingSystem * NewOS)Defined in OperatingSystemWidgetBase.h:61 Sets the given new Operating System as Parent OS and calls OnSetOperatingSystem event in Blueprint
Parameters
Section titled “Parameters”NewOSNew OS to set.
Referenced by
Section titled “Referenced by”References
Section titled “References”DestroyOperatingSystemBaseWidget
Section titled “DestroyOperatingSystemBaseWidget”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:
-
Calls the OnDestroyWidget() virtual function.
-
Sets the ParentOS pointer to nullptr.
-
Removes the widget from its parent.
See also: UOperatingSystemWidgetBase::OnDestroyWidget()
See also: UOperatingSystemWidgetBase::RemoveFromParent()
References
Section titled “References”ThemeChanged
Section titled “ThemeChanged”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.
Parameters
Section titled “Parameters”ThemePayloadA pointer to the theme payload object that contains information about the new theme.
References
Section titled “References”Protected Attributes
Section titled “Protected Attributes”| Return | Name | Description |
|---|---|---|
TObjectPtr< UOperatingSystem > | ParentOS | A pointer to the parent operating system of the operating system widget. |
ParentOS
Section titled “ParentOS”TObjectPtr< UOperatingSystem > ParentOSDefined 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()
Referenced by
Section titled “Referenced by”BringWindowToFrontDestroyOperatingSystemBaseWidgetInternal_OnCreatedNativeConstructRemoveFromTaskbarSetOperatingSystemToggleState
Protected Methods
Section titled “Protected Methods”| Return | Name | Description |
|---|---|---|
void | NativeConstruct virtual override | |
void | OnDestroyWidget virtual inline | |
void | K2_OnSetOperatingSystem | Blueprint event called when the operating system is set. |
NativeConstruct
Section titled “NativeConstruct”virtual override
virtual void NativeConstruct() overrideDefined in OperatingSystemWidgetBase.h:93
References
Section titled “References”OnDestroyWidget
Section titled “OnDestroyWidget”virtual inline
virtual inline void OnDestroyWidget()Defined in OperatingSystemWidgetBase.h:95
Referenced by
Section titled “Referenced by”Reimplemented by
Section titled “Reimplemented by”K2_OnSetOperatingSystem
Section titled “K2_OnSetOperatingSystem”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()
Referenced by
Section titled “Referenced by”Private Attributes
Section titled “Private Attributes”| Return | Name | Description |
|---|---|---|
uint8 | bHasBlueprintOnSetOperatingSystem | |
uint8 | bHasBlueprintOnOperatingSystemThemeChanged |
bHasBlueprintOnSetOperatingSystem
Section titled “bHasBlueprintOnSetOperatingSystem”uint8 bHasBlueprintOnSetOperatingSystemDefined in OperatingSystemWidgetBase.h:25
Referenced by
Section titled “Referenced by”bHasBlueprintOnOperatingSystemThemeChanged
Section titled “bHasBlueprintOnOperatingSystemThemeChanged”uint8 bHasBlueprintOnOperatingSystemThemeChangedDefined in OperatingSystemWidgetBase.h:26