OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
Slic3r::GUI::EventGuard Class Reference

#include </home/runner/work/OrcaSlicer/OrcaSlicer/src/slic3r/GUI/GUI_Utils.hpp>

Collaboration diagram for Slic3r::GUI::EventGuard:

Classes

struct  EventStorageBase
struct  EventStorageFun
struct  EventStorageMethod

Public Member Functions

 EventGuard ()
 EventGuard (const EventGuard &)=delete
 EventGuard (EventGuard &&other)
template<class EvTag, class Fun>
 EventGuard (wxEvtHandler *emitter, const EvTag &tag, Fun fun)
template<typename EvTag, typename Class, typename EvArg, typename EvHandler>
 EventGuard (wxEvtHandler *emitter, const EvTag &tag, void(Class::*method)(EvArg &), EvHandler *handler)
EventGuard & operator= (const EventGuard &)=delete
EventGuard & operator= (EventGuard &&other)
void unbind ()
 operator bool () const

Private Attributes

std::unique_ptr< EventStorageBase > event_storage

Detailed Description

Constructor & Destructor Documentation

◆ EventGuard() [1/5]

Slic3r::GUI::EventGuard::EventGuard ( )
inline
374{}

Referenced by EventGuard(), EventGuard(), operator=(), and operator=().

Here is the caller graph for this function:

◆ EventGuard() [2/5]

Slic3r::GUI::EventGuard::EventGuard ( const EventGuard & )
delete

References EventGuard().

Here is the call graph for this function:

◆ EventGuard() [3/5]

Slic3r::GUI::EventGuard::EventGuard ( EventGuard && other)
inline
376: event_storage(std::move(other.event_storage)) {}
std::unique_ptr< EventStorageBase > event_storage
Definition GUI_Utils.hpp:372

References EventGuard(), and event_storage.

Here is the call graph for this function:

◆ EventGuard() [4/5]

template<class EvTag, class Fun>
Slic3r::GUI::EventGuard::EventGuard ( wxEvtHandler * emitter,
const EvTag & tag,
Fun fun )
inline
380 :event_storage(new EventStorageFun<EvTag, Fun>(emitter, tag, std::move(fun)))
381 {}
Definition GUI_Utils.hpp:335

References event_storage.

◆ EventGuard() [5/5]

template<typename EvTag, typename Class, typename EvArg, typename EvHandler>
Slic3r::GUI::EventGuard::EventGuard ( wxEvtHandler * emitter,
const EvTag & tag,
void(Class::* method )(EvArg &),
EvHandler * handler )
inline
385 :event_storage(new EventStorageMethod<EvTag, Class, EvArg, EvHandler>(emitter, tag, method, handler))
386 {}

References event_storage.

Member Function Documentation

◆ operator bool()

Slic3r::GUI::EventGuard::operator bool ( ) const
inlineexplicit
396{ return !!event_storage; }

References event_storage.

◆ operator=() [1/2]

EventGuard & Slic3r::GUI::EventGuard::operator= ( const EventGuard & )
delete

References EventGuard().

Here is the call graph for this function:

◆ operator=() [2/2]

EventGuard & Slic3r::GUI::EventGuard::operator= ( EventGuard && other)
inline
390 {
391 event_storage = std::move(other.event_storage);
392 return *this;
393 }

References EventGuard(), and event_storage.

Here is the call graph for this function:

◆ unbind()

void Slic3r::GUI::EventGuard::unbind ( )
inline
395{ event_storage.reset(nullptr); }

References event_storage.

Member Data Documentation

◆ event_storage

std::unique_ptr<EventStorageBase> Slic3r::GUI::EventGuard::event_storage
private

The documentation for this class was generated from the following file:
  • /home/runner/work/OrcaSlicer/OrcaSlicer/src/slic3r/GUI/GUI_Utils.hpp