|
KiCad PCB EDA Suite
|
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 |
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.
|
privatedefault |
Referenced by Instance().
|
static |
Definition at line 25 of file eda_cursor_broadcaster.cpp.
References EDA_CURSOR_BROADCASTER().
Referenced by BOOST_AUTO_TEST_CASE(), EDA_DRAW_PANEL_GAL::EDA_DRAW_PANEL_GAL(), EDA_DRAW_PANEL_GAL::SetCursorInCanvas(), TEST_CURSOR_OWNER::TEST_CURSOR_OWNER(), EDA_DRAW_PANEL_GAL::~EDA_DRAW_PANEL_GAL(), and TEST_CURSOR_OWNER::~TEST_CURSOR_OWNER().
| 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().
| void EDA_CURSOR_BROADCASTER::Register | ( | EDA_CURSOR_OWNER * | aOwner | ) |
Definition at line 32 of file eda_cursor_broadcaster.cpp.
References m_owners.
Referenced by EDA_DRAW_PANEL_GAL::EDA_DRAW_PANEL_GAL(), and TEST_CURSOR_OWNER::TEST_CURSOR_OWNER().
| void EDA_CURSOR_BROADCASTER::Unregister | ( | EDA_CURSOR_OWNER * | aOwner | ) |
Definition at line 38 of file eda_cursor_broadcaster.cpp.
References m_owners.
Referenced by EDA_DRAW_PANEL_GAL::~EDA_DRAW_PANEL_GAL(), and TEST_CURSOR_OWNER::~TEST_CURSOR_OWNER().
|
private |
Definition at line 66 of file eda_cursor_broadcaster.h.
Referenced by NotifyCursorEntered(), Register(), and Unregister().