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

#include <spnav_2d_plugin.h>

Inheritance diagram for SPNAV_2D_PLUGIN:
SPACEMOUSE_HANDLER

Public Member Functions

 SPNAV_2D_PLUGIN (EDA_DRAW_PANEL_GAL *aCanvas)
 
 ~SPNAV_2D_PLUGIN ()
 
void SetFocus (bool aFocus=true)
 
void SetCanvas (EDA_DRAW_PANEL_GAL *aCanvas)
 
void SetScale (double aScale)
 
void OnPan (double x, double y, double z) override
 Handle translation (pan) events.
 
void OnRotate (double rx, double ry, double rz) override
 Handle rotational events.
 
void OnButton (int button, bool pressed) override
 Handle button press/release events.
 

Private Member Functions

void onPollTimer (wxTimerEvent &evt)
 

Private Attributes

std::unique_ptr< SPACENAV_DRIVERm_driver
 
wxTimer m_timer
 
EDA_DRAW_PANEL_GALm_canvas
 
KIGFX::VIEWm_view
 
double m_scale
 
bool m_focused
 

Detailed Description

Definition at line 41 of file spnav_2d_plugin.h.

Constructor & Destructor Documentation

◆ SPNAV_2D_PLUGIN()

SPNAV_2D_PLUGIN::SPNAV_2D_PLUGIN ( EDA_DRAW_PANEL_GAL * aCanvas)
explicit

◆ ~SPNAV_2D_PLUGIN()

SPNAV_2D_PLUGIN::~SPNAV_2D_PLUGIN ( )

Definition at line 51 of file spnav_2d_plugin.cpp.

References m_driver, and m_timer.

Member Function Documentation

◆ OnButton()

void SPNAV_2D_PLUGIN::OnButton ( int button,
bool pressed )
overridevirtual

Handle button press/release events.

Implements SPACEMOUSE_HANDLER.

Definition at line 135 of file spnav_2d_plugin.cpp.

◆ OnPan()

◆ onPollTimer()

void SPNAV_2D_PLUGIN::onPollTimer ( wxTimerEvent & evt)
private

Definition at line 70 of file spnav_2d_plugin.cpp.

References m_driver, and m_focused.

Referenced by SPNAV_2D_PLUGIN().

◆ OnRotate()

void SPNAV_2D_PLUGIN::OnRotate ( double rx,
double ry,
double rz )
overridevirtual

Handle rotational events.

Units are driver dependent.

Implements SPACEMOUSE_HANDLER.

Definition at line 130 of file spnav_2d_plugin.cpp.

◆ SetCanvas()

void SPNAV_2D_PLUGIN::SetCanvas ( EDA_DRAW_PANEL_GAL * aCanvas)

Definition at line 64 of file spnav_2d_plugin.cpp.

References EDA_DRAW_PANEL_GAL::GetView(), m_canvas, and m_view.

◆ SetFocus()

void SPNAV_2D_PLUGIN::SetFocus ( bool aFocus = true)

Definition at line 59 of file spnav_2d_plugin.cpp.

References m_focused.

◆ SetScale()

void SPNAV_2D_PLUGIN::SetScale ( double aScale)
inline

Definition at line 51 of file spnav_2d_plugin.h.

References m_scale.

Member Data Documentation

◆ m_canvas

EDA_DRAW_PANEL_GAL* SPNAV_2D_PLUGIN::m_canvas
private

Definition at line 65 of file spnav_2d_plugin.h.

Referenced by OnPan(), SetCanvas(), and SPNAV_2D_PLUGIN().

◆ m_driver

std::unique_ptr<SPACENAV_DRIVER> SPNAV_2D_PLUGIN::m_driver
private

Definition at line 63 of file spnav_2d_plugin.h.

Referenced by onPollTimer(), SPNAV_2D_PLUGIN(), and ~SPNAV_2D_PLUGIN().

◆ m_focused

bool SPNAV_2D_PLUGIN::m_focused
private

Definition at line 68 of file spnav_2d_plugin.h.

Referenced by onPollTimer(), SetFocus(), and SPNAV_2D_PLUGIN().

◆ m_scale

double SPNAV_2D_PLUGIN::m_scale
private

Definition at line 67 of file spnav_2d_plugin.h.

Referenced by SetScale(), and SPNAV_2D_PLUGIN().

◆ m_timer

wxTimer SPNAV_2D_PLUGIN::m_timer
private

Definition at line 64 of file spnav_2d_plugin.h.

Referenced by SPNAV_2D_PLUGIN(), and ~SPNAV_2D_PLUGIN().

◆ m_view

KIGFX::VIEW* SPNAV_2D_PLUGIN::m_view
private

Definition at line 66 of file spnav_2d_plugin.h.

Referenced by OnPan(), SetCanvas(), and SPNAV_2D_PLUGIN().


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