KiCad PCB EDA Suite
Loading...
Searching...
No Matches
dialog_fp_edit_pad_table.h
Go to the documentation of this file.
1#pragma once
2
3#include "dialog_shim.h"
4#include <memory>
5#include <vector>
6#include <pad.h>
7
9class FOOTPRINT;
10class WX_GRID;
11class wxStaticText;
12class UNITS_PROVIDER;
13
15{
16public:
17 // Column indices (after adding Type column)
31
32 DIALOG_FP_EDIT_PAD_TABLE( PCB_BASE_FRAME* aParent, FOOTPRINT* aFootprint );
34
35 bool TransferDataToWindow() override;
36 bool TransferDataFromWindow() override;
39
40private:
41 void OnSize( wxSizeEvent& aEvent );
42 void OnCharHook( wxKeyEvent& aEvent ) override;
43 void OnCellChanged( wxGridEvent& aEvent );
44 void OnSelectCell( wxGridEvent& aEvent );
45 void OnUpdateUI( wxUpdateUIEvent& aEvent );
46
48
49 void updateSummary();
50
51private:
53
54 // Proportional resize support
55 std::vector<double> m_colProportions; // relative widths captured after init
56 std::vector<int> m_minColWidths; // initial (minimum) widths
57
76
77 std::vector<PAD_SNAPSHOT> m_originalPads; // original pad data for cancel rollback
78 bool m_cancelled = false; // set if user hit cancel
79
81 wxStaticText* m_pin_numbers_summary;
82 wxStaticText* m_staticTextPinCount;
83 wxStaticText* m_pin_count;
85 wxStaticText* m_duplicate_pins;
88 std::unique_ptr<UNITS_PROVIDER> m_unitsProvider;
90};
91
DIALOG_FP_EDIT_PAD_TABLE(PCB_BASE_FRAME *aParent, FOOTPRINT *aFootprint)
void OnCharHook(wxKeyEvent &aEvent) override
void OnUpdateUI(wxUpdateUIEvent &aEvent)
std::vector< PAD_SNAPSHOT > m_originalPads
void OnSize(wxSizeEvent &aEvent)
void OnCellChanged(wxGridEvent &aEvent)
std::vector< double > m_colProportions
std::unique_ptr< UNITS_PROVIDER > m_unitsProvider
void OnSelectCell(wxGridEvent &aEvent)
DIALOG_SHIM(wxWindow *aParent, wxWindowID id, const wxString &title, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxDEFAULT_FRAME_STYLE|wxRESIZE_BORDER, const wxString &name=wxDialogNameStr)
A PADSTACK defines the characteristics of a single or multi-layer pad, in the IPC sense of the word.
Definition padstack.h:157
Definition pad.h:55
Base PCB main window class for Pcbnew, Gerbview, and CvPcb footprint viewer.
PAD_ATTRIB
The set of pad shapes, used with PAD::{Set,Get}Attribute().
Definition padstack.h:97
@ PTH
Plated through hole pad.
Definition padstack.h:98
PAD_SHAPE
The set of pad shapes, used with PAD::{Set,Get}Shape()
Definition padstack.h:52
VECTOR2< int32_t > VECTOR2I
Definition vector2d.h:695