Operating System Simulator Plugin  3.5.1
Unreal Engine plugin that simulates an Operating System Environment
Loading...
Searching...
No Matches
UOperatingSystemWidgetBase Class Reference

#include "OperatingSystemWidgetBase.h"

Inheritance diagram for UOperatingSystemWidgetBase:
[legend]
Collaboration diagram for UOperatingSystemWidgetBase:
[legend]

Public Member Functions

 UOperatingSystemWidgetBase ()
 
void SetOperatingSystem (UOperatingSystem *NewOS)
 
void DestroyOperatingSystemBaseWidget ()
 Destroys the operating system base widget.
 
void ThemeChanged (UOperatingSystemSettingModule_Theme *ThemePayload)
 Callback function for handling theme changes in the operating system widget.
 
- Public Member Functions inherited from IOperatingSystemThemeInterface
void K2_OnOperatingSystemThemeChanged (UOperatingSystemSettingModule_Theme *ThemePayload)
 Callback function for handling theme changes in the operating system widget.
 

Protected Member Functions

virtual void NativeConstruct () override
 
virtual OPERATINGSYSTEMSIMULATOR_API void OnDestroyWidget ()
 
void K2_OnSetOperatingSystem ()
 Blueprint event called when the operating system is set.
 

Protected Attributes

TObjectPtr< UOperatingSystemParentOS
 A pointer to the parent operating system of the operating system widget.
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ UOperatingSystemWidgetBase()

UOperatingSystemWidgetBase::UOperatingSystemWidgetBase ( )

Member Function Documentation

◆ DestroyOperatingSystemBaseWidget()

void UOperatingSystemWidgetBase::DestroyOperatingSystemBaseWidget ( )

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()
UOperatingSystemWidgetBase::RemoveFromParent()
Here is the call graph for this function:

◆ K2_OnSetOperatingSystem()

void UOperatingSystemWidgetBase::K2_OnSetOperatingSystem ( )
protected

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.

Note
This is a BlueprintImplementableEvent, meaning it can be implemented in blueprint.
See also
UOperatingSystemWidgetBase::SetOperatingSystem()
Here is the caller graph for this function:

◆ NativeConstruct()

void UOperatingSystemWidgetBase::NativeConstruct ( )
overrideprotectedvirtual
Here is the call graph for this function:

◆ OnDestroyWidget()

virtual OPERATINGSYSTEMSIMULATOR_API void UOperatingSystemWidgetBase::OnDestroyWidget ( )
inlineprotectedvirtual

Reimplemented in UOperatingSystemWindowWidgetBase.

Here is the caller graph for this function:

◆ SetOperatingSystem()

void UOperatingSystemWidgetBase::SetOperatingSystem ( UOperatingSystem * NewOS)

Sets the given new Operating System as Parent OS and calls OnSetOperatingSystem event in Blueprint

Parameters
NewOSNew OS to set.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ThemeChanged()

void UOperatingSystemWidgetBase::ThemeChanged ( UOperatingSystemSettingModule_Theme * ThemePayload)

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
ThemePayloadA pointer to the theme payload object that contains information about the new theme.

Member Data Documentation

◆ ParentOS

UOperatingSystemWidgetBase::ParentOS
protected

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
UOperatingSystemWidgetBase::SetOperatingSystem()
UOperatingSystemWidgetBase::OnSetOperatingSystem()

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