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

Simple panel used for editing custom rule text. More...

#include <drc_re_custom_rule_panel.h>

Inheritance diagram for DRC_RE_CUSTOM_RULE_PANEL:
DRC_RULE_EDITOR_CONTENT_PANEL_BASE

Public Member Functions

 DRC_RE_CUSTOM_RULE_PANEL (wxWindow *aParent, std::shared_ptr< DRC_RE_CUSTOM_RULE_CONSTRAINT_DATA > aConstraintData)
 
 ~DRC_RE_CUSTOM_RULE_PANEL () override
 
bool TransferDataToWindow () override
 
bool TransferDataFromWindow () override
 
bool ValidateInputs (int *aErrorCount, wxString *aValidationMessage) override
 
wxString GenerateRule (const RULE_GENERATION_CONTEXT &aContext) override
 
void UpdateRuleName (const wxString &aName)
 

Private Member Functions

void onScintillaCharAdded (wxStyledTextEvent &aEvent)
 
void onCheckSyntax (wxCommandEvent &aEvent)
 

Private Attributes

std::shared_ptr< DRC_RE_CUSTOM_RULE_CONSTRAINT_DATAm_constraintData
 
wxStyledTextCtrl * m_textCtrl
 
wxButton * m_checkSyntaxBtn
 
wxTipWindow * m_tipWindow = nullptr
 
std::unique_ptr< SCINTILLA_TRICKSm_scintillaTricks
 

Detailed Description

Simple panel used for editing custom rule text.

The panel consists of a single wxStyledTextCtrl allowing free-form rule entry.

Definition at line 43 of file drc_re_custom_rule_panel.h.

Constructor & Destructor Documentation

◆ DRC_RE_CUSTOM_RULE_PANEL()

DRC_RE_CUSTOM_RULE_PANEL::DRC_RE_CUSTOM_RULE_PANEL ( wxWindow * aParent,
std::shared_ptr< DRC_RE_CUSTOM_RULE_CONSTRAINT_DATA > aConstraintData )

◆ ~DRC_RE_CUSTOM_RULE_PANEL()

DRC_RE_CUSTOM_RULE_PANEL::~DRC_RE_CUSTOM_RULE_PANEL ( )
override

Definition at line 74 of file drc_re_custom_rule_panel.cpp.

Member Function Documentation

◆ GenerateRule()

wxString DRC_RE_CUSTOM_RULE_PANEL::GenerateRule ( const RULE_GENERATION_CONTEXT & aContext)
overridevirtual

◆ onCheckSyntax()

◆ onScintillaCharAdded()

void DRC_RE_CUSTOM_RULE_PANEL::onScintillaCharAdded ( wxStyledTextEvent & aEvent)
private

Definition at line 158 of file drc_re_custom_rule_panel.cpp.

References m_scintillaTricks, m_textCtrl, NONE, and STRING.

Referenced by DRC_RE_CUSTOM_RULE_PANEL().

◆ TransferDataFromWindow()

bool DRC_RE_CUSTOM_RULE_PANEL::TransferDataFromWindow ( )
overridevirtual

Implements DRC_RULE_EDITOR_CONTENT_PANEL_BASE.

Definition at line 97 of file drc_re_custom_rule_panel.cpp.

References m_constraintData, and m_textCtrl.

◆ TransferDataToWindow()

bool DRC_RE_CUSTOM_RULE_PANEL::TransferDataToWindow ( )
overridevirtual

Implements DRC_RULE_EDITOR_CONTENT_PANEL_BASE.

Definition at line 79 of file drc_re_custom_rule_panel.cpp.

References m_constraintData, m_textCtrl, and text.

◆ UpdateRuleName()

void DRC_RE_CUSTOM_RULE_PANEL::UpdateRuleName ( const wxString & aName)

◆ ValidateInputs()

bool DRC_RE_CUSTOM_RULE_PANEL::ValidateInputs ( int * aErrorCount,
wxString * aValidationMessage )
overridevirtual

Implements DRC_RULE_EDITOR_CONTENT_PANEL_BASE.

Definition at line 106 of file drc_re_custom_rule_panel.cpp.

Member Data Documentation

◆ m_checkSyntaxBtn

wxButton* DRC_RE_CUSTOM_RULE_PANEL::m_checkSyntaxBtn
private

Definition at line 62 of file drc_re_custom_rule_panel.h.

Referenced by DRC_RE_CUSTOM_RULE_PANEL().

◆ m_constraintData

std::shared_ptr<DRC_RE_CUSTOM_RULE_CONSTRAINT_DATA> DRC_RE_CUSTOM_RULE_PANEL::m_constraintData
private

◆ m_scintillaTricks

std::unique_ptr<SCINTILLA_TRICKS> DRC_RE_CUSTOM_RULE_PANEL::m_scintillaTricks
private

Definition at line 70 of file drc_re_custom_rule_panel.h.

Referenced by DRC_RE_CUSTOM_RULE_PANEL(), and onScintillaCharAdded().

◆ m_textCtrl

wxStyledTextCtrl* DRC_RE_CUSTOM_RULE_PANEL::m_textCtrl
private

◆ m_tipWindow

wxTipWindow* DRC_RE_CUSTOM_RULE_PANEL::m_tipWindow = nullptr
private

Definition at line 67 of file drc_re_custom_rule_panel.h.

Referenced by onCheckSyntax().


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