FifeGUI 0.3.0
A C++ GUI library designed for games.
fcn::FocusHandler::ModalScope Class Reference

#include <focushandler.hpp>

Public Member Functions

 ModalScope (FocusHandler *handler, Widget *focusOwner, Widget *mouseOwner=nullptr)
 ModalScope (ModalScope &&)=delete
 ModalScope (ModalScope const &)=delete
ModalScopeoperator= (ModalScope &&)=delete
ModalScopeoperator= (ModalScope const &)=delete
void release ()

Detailed Description

Modal scope management (RAII guard).

Automatically pops the modal when destroyed, unless release() is called.

Definition at line 111 of file focushandler.hpp.

Constructor & Destructor Documentation

◆ ModalScope()

fcn::FocusHandler::ModalScope::ModalScope ( FocusHandler * handler,
Widget * focusOwner,
Widget * mouseOwner = nullptr )
inline

RAII helper that pushes a modal state on construction and pops it on destruction unless release() is called.

Parameters
handlerThe focus handler managing modal states.
focusOwnerWidget that will receive modal focus.
mouseOwnerOptional widget for modal mouse input focus.

Definition at line 122 of file focushandler.hpp.

◆ ~ModalScope()

fcn::FocusHandler::ModalScope::~ModalScope ( )
inlinenoexcept

Definition at line 130 of file focushandler.hpp.

Member Function Documentation

◆ release()

void fcn::FocusHandler::ModalScope::release ( )
inline

Release ownership so the modal is not popped during destruction.

After calling release() the ModalScope destructor will not call popModal().

Definition at line 158 of file focushandler.hpp.


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