FuncDoodle
Loading...
Searching...
No Matches
FuncDoodle::PopupRegistry Class Reference

Stores all popups used in FuncDoodle. More...

#include <PopupRegistry.h>

Public Member Functions

 PopupRegistry ()=default
 ~PopupRegistry ()=default
void Register (std::string_view id)
 Registers a popup identifier in the registry.
void Open (std::string_view id)
 Marks a popup as open.
void Close (std::string_view id)
 Marks a popup as closed.
bool IsOpen (std::string_view id) const
 Returns whether a popup is currently open.
bool * Get (std::string_view id)
 Returns direct access to a popup open-state flag.
void CloseAll ()
 Closes every registered popup.
void CloseAllExcept (std::string_view exception)
 Closes every popup except one.

Private Attributes

std::map< std::string_view, bool, std::less<> > m_Popups

Detailed Description

Stores all popups used in FuncDoodle.

Handles fetching and setting popup state.

See also
KeybindsRegistry

Constructor & Destructor Documentation

◆ PopupRegistry()

FuncDoodle::PopupRegistry::PopupRegistry ( )
default

◆ ~PopupRegistry()

FuncDoodle::PopupRegistry::~PopupRegistry ( )
default

Member Function Documentation

◆ Close()

void FuncDoodle::PopupRegistry::Close ( std::string_view id)

Marks a popup as closed.

Parameters
idPopup identifier to close.

◆ CloseAll()

void FuncDoodle::PopupRegistry::CloseAll ( )

Closes every registered popup.

◆ CloseAllExcept()

void FuncDoodle::PopupRegistry::CloseAllExcept ( std::string_view exception)

Closes every popup except one.

Parameters
exceptionPopup identifier to keep open.

◆ Get()

bool * FuncDoodle::PopupRegistry::Get ( std::string_view id)

Returns direct access to a popup open-state flag.

Parameters
idPopup identifier to query.
Returns
Pointer to the popup flag, or nullptr if missing.

◆ IsOpen()

bool FuncDoodle::PopupRegistry::IsOpen ( std::string_view id) const
nodiscard

Returns whether a popup is currently open.

Parameters
idPopup identifier to query.
Returns
Whether the popup is open.

◆ Open()

void FuncDoodle::PopupRegistry::Open ( std::string_view id)

Marks a popup as open.

Parameters
idPopup identifier to open.

◆ Register()

void FuncDoodle::PopupRegistry::Register ( std::string_view id)

Registers a popup identifier in the registry.

Parameters
idPopup identifier to track.

Member Data Documentation

◆ m_Popups

std::map<std::string_view, bool, std::less<> > FuncDoodle::PopupRegistry::m_Popups
private

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