OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
Slic3r::anonymous_namespace{PluginHostUi.cpp}::PlaterShownWaiter Class Reference
Inheritance diagram for Slic3r::anonymous_namespace{PluginHostUi.cpp}::PlaterShownWaiter:
Collaboration diagram for Slic3r::anonymous_namespace{PluginHostUi.cpp}::PlaterShownWaiter:

Public Member Functions

 PlaterShownWaiter (std::function< void(GUI::Plater *)> fn)
bool try_run ()
void Notify () override

Private Attributes

std::function< void(GUI::Plater *)> m_fn

Detailed Description

Constructor & Destructor Documentation

◆ PlaterShownWaiter()

Slic3r::anonymous_namespace{PluginHostUi.cpp}::PlaterShownWaiter::PlaterShownWaiter ( std::function< void(GUI::Plater *)> fn)
inlineexplicit
455: m_fn(std::move(fn)) {}
std::function< void(GUI::Plater *)> m_fn
Definition PluginHostUi.cpp:474

References m_fn.

Member Function Documentation

◆ Notify()

void Slic3r::anonymous_namespace{PluginHostUi.cpp}::PlaterShownWaiter::Notify ( )
inlineoverride
471{ try_run(); }

References try_run().

Here is the call graph for this function:

◆ try_run()

bool Slic3r::anonymous_namespace{PluginHostUi.cpp}::PlaterShownWaiter::try_run ( )
inline
459 {
460 const bool closing = GUI::wxGetApp().is_closing();
461 GUI::Plater* plater = closing ? nullptr : GUI::wxGetApp().plater();
462 if (!closing && (plater == nullptr || !plater->IsShownOnScreen()))
463 return false;
464 Stop();
465 m_fn(plater);
466 // Off the timer callback's stack: wxGTK's timeout callback still reads the timer after Notify().
467 GUI::wxGetApp().CallAfter([this]() { delete this; });
468 return true;
469 }
@ Plater
Definition Shortcuts.hpp:21
Slic3r::Polygons closing(const Slic3r::Polygons &polygons, const float delta1, const float delta2, JoinType joinType, double miterLimit)
Definition ClipperUtils.cpp:670

References Slic3r::closing(), and m_fn.

Referenced by Notify().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ m_fn

std::function<void(GUI::Plater*)> Slic3r::anonymous_namespace{PluginHostUi.cpp}::PlaterShownWaiter::m_fn
private

Referenced by PlaterShownWaiter(), and try_run().


The documentation for this class was generated from the following file:
  • /home/runner/work/OrcaSlicer/OrcaSlicer/src/slic3r/plugin/host/PluginHostUi.cpp