KiCad PCB EDA Suite
Loading...
Searching...
No Matches
panel_setup_pinmap.h
Go to the documentation of this file.
1/*
2 * This program source code file is part of KiCad, a free EDA CAD application.
3 *
4 * Copyright (C) 2007 Jean-Pierre Charras, jp.charras at wanadoo.fr
5 * Copyright The KiCad Developers, see AUTHORS.txt for contributors.
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version 2
10 * of the License, or (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <https://www.gnu.org/licenses/>.
19 */
20
21#pragma once
22
23#include <sch_pin.h> // For PINTYPE_COUNT definition
24#include <erc/erc_settings.h>
26
27
28class SCH_EDIT_FRAME;
29class SCHEMATIC;
30class BITMAP_BUTTON;
31class wxColour;
32
33
35{
36public:
37 PANEL_SETUP_PINMAP( wxWindow* aWindow, SCH_EDIT_FRAME* aParent );
39
41
42 void ResetPanel() override;
43
44 bool TransferDataToWindow() override;
45 bool TransferDataFromWindow() override;
46
47 void OnMouseEnter( wxMouseEvent& aEvent );
48 void OnMouseLeave( wxMouseEvent& aEvent );
49
50private:
51 void changeErrorLevel( wxCommandEvent& event );
52 void reBuildMatrixPanel();
53 void setDRCMatrixButtonState( wxWindow *aButton, PIN_ERROR aState );
54
55 DECLARE_EVENT_TABLE()
56
57private:
64};
65
A bitmap button widget that behaves like an AUI toolbar item's button when it is drawn.
PANEL_SETUP_PINMAP_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)
bool TransferDataToWindow() override
wxWindow * m_buttonList[ELECTRICAL_PINTYPES_TOTAL][ELECTRICAL_PINTYPES_TOTAL]
void changeErrorLevel(wxCommandEvent &event)
SCH_EDIT_FRAME * m_parent
void ImportSettingsFrom(PIN_ERROR aPinMap[][ELECTRICAL_PINTYPES_TOTAL])
void setDRCMatrixButtonState(wxWindow *aButton, PIN_ERROR aState)
void OnMouseEnter(wxMouseEvent &aEvent)
PANEL_SETUP_PINMAP(wxWindow *aWindow, SCH_EDIT_FRAME *aParent)
PIN_ERROR m_buttonStateList[ELECTRICAL_PINTYPES_TOTAL][ELECTRICAL_PINTYPES_TOTAL]
void OnMouseLeave(wxMouseEvent &aEvent)
bool TransferDataFromWindow() override
void ResetPanel() override
Reset the contents of this panel.
Holds all the data relating to one schematic.
Definition schematic.h:149
Schematic editor (Eeschema) main window.
PIN_ERROR
The values a pin-to-pin entry in the pin matrix can take on.
#define ELECTRICAL_PINTYPES_TOTAL
Definition pin_type.h:52