20#ifndef PANEL_DRC_RULE_EDITOR_H
21#define PANEL_DRC_RULE_EDITOR_H
47 wxString* aConstraintTitle,
48 std::shared_ptr<DRC_RE_BASE_CONSTRAINT_DATA> aConstraintData );
74 std::function<
bool(
int aNodeId, wxString aRuleName )> aCallbackRuleNameValidation )
90 bool ValidateInputs(
int* aErrorCount, std::string* aValidationMessage )
override;
94 void Save( wxCommandEvent& aEvent );
96 void Cancel( wxCommandEvent& aEvent );
Information pertinent to a Pcbnew printed circuit board.
Container panel that manages multiple condition rows with boolean operators.
DRC_RULE_EDITOR_CONTENT_PANEL_BASE()=default
LSEQ is a sequence (and therefore also a set) of PCB_LAYER_IDs.
PANEL_DRC_RULE_EDITOR_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxTAB_TRAVERSAL, const wxString &name=wxEmptyString)
std::shared_ptr< DRC_RE_BASE_CONSTRAINT_DATA > m_constraintData
void onCloseButtonClicked(wxCommandEvent &aEvent)
Handles the close button click event, invoking the close callback.
wxString GenerateRule(const RULE_GENERATION_CONTEXT &aContext) override
void ResetShowMatchesButton()
PANEL_DRC_RULE_EDITOR(wxWindow *aParent, BOARD *aBoard, DRC_RULE_EDITOR_CONSTRAINT_NAME aConstraintType, wxString *aConstraintTitle, std::shared_ptr< DRC_RE_BASE_CONSTRAINT_DATA > aConstraintData)
void SetRuleNameValidationCallback(std::function< bool(int aNodeId, wxString aRuleName)> aCallbackRuleNameValidation)
void onScintillaCharAdded(wxStyledTextEvent &aEvent)
Handles character addition in the Scintilla text control, performing auto-complete and context-sensit...
void SetCloseCallback(std::function< void(int aNodeId)> aCallBackClose)
void onShowMatchesButtonClicked(wxCommandEvent &aEvent)
void SetSaveCallback(std::function< void(int aNodeId)> aCallBackSave)
void onCheckSyntax(wxCommandEvent &aEvent) override
Checks the syntax of the DRC rule condition and reports any errors.
std::function< void(int aNodeId)> m_callBackSave
HTML_MESSAGE_BOX * m_helpWindow
bool ValidateInputs(int *aErrorCount, std::string *aValidationMessage) override
void onContextMenu(wxMouseEvent &aEvent) override
Handles right-click context menu actions for text editing (undo, redo, cut, copy, paste,...
bool TransferDataFromWindow() override
bool GetIsValidationSucceeded()
void onRemoveButtonClicked(wxCommandEvent &aEvent)
Handles the remove button click event, invoking the remove callback.
wxString * m_constraintTitle
wxButton * m_btnShowMatches
std::function< bool(int aNodeId, wxString aRuleName)> m_callBackRuleNameValidation
void onSyntaxHelp(wxHyperlinkEvent &aEvent) override
Displays a modeless help window with syntax and rule documentation.
~PANEL_DRC_RULE_EDITOR() override
wxChoice * m_layerListChoiceCtrl
wxRegEx m_zoneConnStyleRegex
void SetShowMatchesCallBack(std::function< int(int aNodeId)> aCallBackShowMatches)
std::string GetValidationMessage()
void Cancel(wxCommandEvent &aEvent)
wxRegEx m_padConnectionsRegex
bool m_validationSucceeded
void onErrorLinkClicked(wxHtmlLinkEvent &aEvent) override
Handles clicks on error links in the syntax error report and navigates to the error location.
std::function< void(int aNodeId)> m_callBackRemove
std::function< int(int aNodeId)> m_callBackShowMatches
bool TransferDataToWindow() override
DRC_RE_CONDITION_GROUP_PANEL * m_conditionGroupPanel
std::unique_ptr< SCINTILLA_TRICKS > m_scintillaTricks
void Save(wxCommandEvent &aEvent)
std::vector< PCB_LAYER_ID > m_layerIDs
void onSaveButtonClicked(wxCommandEvent &aEvent)
Handles the save button click event, validating inputs and invoking the save callback if valid.
std::vector< int > m_validLayers
DRC_RULE_EDITOR_CONTENT_PANEL_BASE * getConstraintPanel(wxWindow *aParent, const DRC_RULE_EDITOR_CONSTRAINT_NAME &aConstraintType)
void setSelectedLayers(const std::vector< PCB_LAYER_ID > &aLayers)
void SetRemoveCallback(std::function< void(int aNodeId)> aCallBackRemove)
std::vector< PCB_LAYER_ID > getSelectedLayers()
wxString buildLayerClause() const
std::function< void(int aNodeId)> m_callBackClose
std::string m_validationMessage
DRC_RULE_EDITOR_CONTENT_PANEL_BASE * m_constraintPanel
Add cut/copy/paste, dark theme, autocomplete and brace highlighting to a wxStyleTextCtrl instance.
DRC_RULE_EDITOR_CONSTRAINT_NAME