Pyrogenesis  trunk
Public Member Functions | Public Attributes | List of all members
CGUIManager::SGUIPage Struct Reference

Public Member Functions

 SGUIPage (const CStrW &pageName, const Script::StructuredClone initData)
 Initializes the data that will be used to create the CGUI page one or multiple times (hotloading). More...
 
void LoadPage (std::shared_ptr< ScriptContext > scriptContext)
 Create the CGUI with it's own ScriptInterface. More...
 
void SetCallbackFunction (ScriptInterface &scriptInterface, JS::HandleValue callbackFunc)
 Sets the callback handler when a new page is opened that will be performed when the page is closed. More...
 
void PerformCallbackFunction (Script::StructuredClone args)
 Execute the stored callback function with the given arguments. More...
 

Public Attributes

CStrW m_Name
 
std::unordered_set< VfsPathinputs
 
Script::StructuredClone initData
 
std::shared_ptr< CGUIgui
 
std::shared_ptr< JS::PersistentRootedValue > callbackFunction
 Function executed by this parent GUI page when the child GUI page it pushed is popped. More...
 

Constructor & Destructor Documentation

◆ SGUIPage()

CGUIManager::SGUIPage::SGUIPage ( const CStrW &  pageName,
const Script::StructuredClone  initData 
)

Initializes the data that will be used to create the CGUI page one or multiple times (hotloading).

Member Function Documentation

◆ LoadPage()

void CGUIManager::SGUIPage::LoadPage ( std::shared_ptr< ScriptContext scriptContext)

Create the CGUI with it's own ScriptInterface.

Deletes the previous CGUI if it existed.

◆ PerformCallbackFunction()

void CGUIManager::SGUIPage::PerformCallbackFunction ( Script::StructuredClone  args)

Execute the stored callback function with the given arguments.

◆ SetCallbackFunction()

void CGUIManager::SGUIPage::SetCallbackFunction ( ScriptInterface scriptInterface,
JS::HandleValue  callbackFunc 
)

Sets the callback handler when a new page is opened that will be performed when the page is closed.

Member Data Documentation

◆ callbackFunction

std::shared_ptr<JS::PersistentRootedValue> CGUIManager::SGUIPage::callbackFunction

Function executed by this parent GUI page when the child GUI page it pushed is popped.

Notice that storing it in the SGUIPage instead of CGUI means that it will survive the hotloading CGUI reset.

◆ gui

std::shared_ptr<CGUI> CGUIManager::SGUIPage::gui

◆ initData

Script::StructuredClone CGUIManager::SGUIPage::initData

◆ inputs

std::unordered_set<VfsPath> CGUIManager::SGUIPage::inputs

◆ m_Name

CStrW CGUIManager::SGUIPage::m_Name

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