KiCad PCB EDA Suite
Loading...
Searching...
No Matches
EDA_CURSOR_BROADCASTER Class Reference

Process-wide registry of every live EDA_CURSOR_OWNER: on a genuine enter, tells every other owner the pointer left them. More...

#include <eda_cursor_broadcaster.h>

Public Member Functions

void Register (EDA_CURSOR_OWNER *aOwner)
 
void Unregister (EDA_CURSOR_OWNER *aOwner)
 
void NotifyCursorEntered (EDA_CURSOR_OWNER *aEnteredOwner)
 Hide the cursor in every registered owner other than aEnteredOwner.
 

Static Public Member Functions

static EDA_CURSOR_BROADCASTER & Instance ()
 

Private Member Functions

 EDA_CURSOR_BROADCASTER ()=default
 

Private Attributes

std::vector< EDA_CURSOR_OWNER * > m_owners
 

Detailed Description

Process-wide registry of every live EDA_CURSOR_OWNER: on a genuine enter, tells every other owner the pointer left them.

Must live in shared kicommon, not static common – static duplicates one copy per module (kicad, eeschema.kiface, pcbnew.kiface, ...), breaking the process-wide part.

Definition at line 52 of file eda_cursor_broadcaster.h.

Constructor & Destructor Documentation

◆ EDA_CURSOR_BROADCASTER()

EDA_CURSOR_BROADCASTER::EDA_CURSOR_BROADCASTER ( )
privatedefault

Referenced by Instance().

Member Function Documentation

◆ Instance()

◆ NotifyCursorEntered()

void EDA_CURSOR_BROADCASTER::NotifyCursorEntered ( EDA_CURSOR_OWNER * aEnteredOwner)

Hide the cursor in every registered owner other than aEnteredOwner.

Definition at line 44 of file eda_cursor_broadcaster.cpp.

References EDA_CURSOR_OWNER::IsCursorInCanvas(), and m_owners.

Referenced by BOOST_AUTO_TEST_CASE(), and EDA_DRAW_PANEL_GAL::SetCursorInCanvas().

◆ Register()

void EDA_CURSOR_BROADCASTER::Register ( EDA_CURSOR_OWNER * aOwner)

◆ Unregister()

void EDA_CURSOR_BROADCASTER::Unregister ( EDA_CURSOR_OWNER * aOwner)

Member Data Documentation

◆ m_owners

std::vector<EDA_CURSOR_OWNER*> EDA_CURSOR_BROADCASTER::m_owners
private

Definition at line 66 of file eda_cursor_broadcaster.h.

Referenced by NotifyCursorEntered(), Register(), and Unregister().


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