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

#include <pg_editors.h>

Inheritance diagram for PG_UNIT_EDITOR:

Public Member Functions

 PG_UNIT_EDITOR (EDA_DRAW_FRAME *aFrame)
 
virtual ~PG_UNIT_EDITOR ()
 
wxString GetName () const override
 
wxPGWindowList CreateControls (wxPropertyGrid *aPropGrid, wxPGProperty *aProperty, const wxPoint &aPos, const wxSize &aSize) const override
 
bool GetValueFromControl (wxVariant &aVariant, wxPGProperty *aProperty, wxWindow *aCtrl) const override
 
void UpdateControl (wxPGProperty *aProperty, wxWindow *aCtrl) const override
 
bool OnEvent (wxPropertyGrid *aPropGrid, wxPGProperty *aProperty, wxWindow *aCtrl, wxEvent &aEvent) const override
 
void UpdateFrame (EDA_DRAW_FRAME *aFrame)
 When restarting an editor, the instance of PG_UNIT_EDITOR may be the same but the referenced frame is different.
 

Static Public Member Functions

static wxString BuildEditorName (EDA_DRAW_FRAME *aFrame)
 

Static Public Attributes

static const wxString EDITOR_NAME = wxS( "KiCadUnitEditor" )
 

Protected Attributes

EDA_DRAW_FRAMEm_frame
 
std::unique_ptr< PROPERTY_EDITOR_UNIT_BINDERm_unitBinder
 
wxString m_editorName
 

Detailed Description

Definition at line 31 of file pg_editors.h.

Constructor & Destructor Documentation

◆ PG_UNIT_EDITOR()

PG_UNIT_EDITOR::PG_UNIT_EDITOR ( EDA_DRAW_FRAME aFrame)

◆ ~PG_UNIT_EDITOR()

PG_UNIT_EDITOR::~PG_UNIT_EDITOR ( )
virtual

Definition at line 47 of file pg_editors.cpp.

Member Function Documentation

◆ BuildEditorName()

wxString PG_UNIT_EDITOR::BuildEditorName ( EDA_DRAW_FRAME aFrame)
static

◆ CreateControls()

wxPGWindowList PG_UNIT_EDITOR::CreateControls ( wxPropertyGrid *  aPropGrid,
wxPGProperty *  aProperty,
const wxPoint &  aPos,
const wxSize &  aSize 
) const
override

◆ GetName()

wxString PG_UNIT_EDITOR::GetName ( ) const
inlineoverride

Definition at line 40 of file pg_editors.h.

References m_editorName.

◆ GetValueFromControl()

bool PG_UNIT_EDITOR::GetValueFromControl ( wxVariant &  aVariant,
wxPGProperty *  aProperty,
wxWindow *  aCtrl 
) const
override

◆ OnEvent()

bool PG_UNIT_EDITOR::OnEvent ( wxPropertyGrid *  aPropGrid,
wxPGProperty *  aProperty,
wxWindow *  aCtrl,
wxEvent &  aEvent 
) const
override

Definition at line 149 of file pg_editors.cpp.

◆ UpdateControl()

void PG_UNIT_EDITOR::UpdateControl ( wxPGProperty *  aProperty,
wxWindow *  aCtrl 
) const
override

Definition at line 112 of file pg_editors.cpp.

References EDA_ANGLE_VARIANT_DATA::Angle(), and m_unitBinder.

Referenced by CreateControls().

◆ UpdateFrame()

void PG_UNIT_EDITOR::UpdateFrame ( EDA_DRAW_FRAME aFrame)

When restarting an editor, the instance of PG_UNIT_EDITOR may be the same but the referenced frame is different.

This re-binds the frame to the editor and associated controls

Parameters
aFrameNew frame to bind

Definition at line 58 of file pg_editors.cpp.

References UNITS_PROVIDER::GetUserUnits(), m_frame, and m_unitBinder.

Referenced by PCB_PROPERTIES_PANEL::PCB_PROPERTIES_PANEL(), SCH_PROPERTIES_PANEL::SCH_PROPERTIES_PANEL(), PCB_PROPERTIES_PANEL::~PCB_PROPERTIES_PANEL(), and SCH_PROPERTIES_PANEL::~SCH_PROPERTIES_PANEL().

Member Data Documentation

◆ EDITOR_NAME

const wxString PG_UNIT_EDITOR::EDITOR_NAME = wxS( "KiCadUnitEditor" )
static

Definition at line 34 of file pg_editors.h.

Referenced by BuildEditorName().

◆ m_editorName

wxString PG_UNIT_EDITOR::m_editorName
protected

Definition at line 68 of file pg_editors.h.

Referenced by GetName(), and PG_UNIT_EDITOR().

◆ m_frame

EDA_DRAW_FRAME* PG_UNIT_EDITOR::m_frame
protected

Definition at line 64 of file pg_editors.h.

Referenced by CreateControls(), PG_UNIT_EDITOR(), and UpdateFrame().

◆ m_unitBinder

std::unique_ptr<PROPERTY_EDITOR_UNIT_BINDER> PG_UNIT_EDITOR::m_unitBinder
protected

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