|
KiCad PCB EDA Suite
|
RAII owner of a single VIEW_OVERLAY. More...
#include <view_overlay_holder.h>
Public Member Functions | |
| VIEW_OVERLAY_HOLDER (KIGFX::VIEW *aView) | |
| virtual | ~VIEW_OVERLAY_HOLDER () |
| VIEW_OVERLAY_HOLDER (const VIEW_OVERLAY_HOLDER &)=delete | |
| VIEW_OVERLAY_HOLDER & | operator= (const VIEW_OVERLAY_HOLDER &)=delete |
Protected Attributes | |
| KIGFX::VIEW * | m_view |
| std::shared_ptr< KIGFX::VIEW_OVERLAY > | m_overlay |
RAII owner of a single VIEW_OVERLAY.
VIEW::MakeOverlay() already registers the overlay with the view, so it must be removed exactly once and never Add()ed again. Getting that wrong leaves a dangling R-tree entry that the next repaint dereferences. Centralising the make/remove pair here keeps the invariant in one place. Derive from this to own a diagnostics or marker overlay.
Definition at line 39 of file view_overlay_holder.h.
| VIEW_OVERLAY_HOLDER::VIEW_OVERLAY_HOLDER | ( | KIGFX::VIEW * | aView | ) |
Definition at line 26 of file view_overlay_holder.cpp.
References m_overlay, and m_view.
Referenced by CONSTRAINT_OVERLAY::CONSTRAINT_OVERLAY(), operator=(), and VIEW_OVERLAY_HOLDER().
|
virtual |
Definition at line 33 of file view_overlay_holder.cpp.
|
delete |
References VIEW_OVERLAY_HOLDER().
|
delete |
References VIEW_OVERLAY_HOLDER().
|
protected |
Definition at line 50 of file view_overlay_holder.h.
Referenced by CONSTRAINT_OVERLAY::Clear(), CONSTRAINT_OVERLAY::render(), CONSTRAINT_OVERLAY::Update(), VIEW_OVERLAY_HOLDER(), and ~VIEW_OVERLAY_HOLDER().
|
protected |
Definition at line 49 of file view_overlay_holder.h.
Referenced by CONSTRAINT_OVERLAY::Clear(), CONSTRAINT_OVERLAY::CONSTRAINT_OVERLAY(), CONSTRAINT_OVERLAY::render(), VIEW_OVERLAY_HOLDER(), CONSTRAINT_OVERLAY::~CONSTRAINT_OVERLAY(), and ~VIEW_OVERLAY_HOLDER().