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 UNITS_PROVIDER;
12
14{
15public:
16 DIALOG_FP_EDIT_PAD_TABLE( PCB_BASE_FRAME* aParent, FOOTPRINT* aFootprint );
18
19 bool TransferDataFromWindow() override;
20
21private:
22 void Populate();
23
24 void OnSize( wxSizeEvent& aEvent );
25
26 // Proportional resize support
27 std::vector<double> m_colProportions; // relative widths captured after init
28 std::vector<int> m_minColWidths; // initial (minimum) widths
30
42
43 std::vector<PAD_SNAPSHOT> m_originalPads; // original pad data for cancel rollback
44 bool m_cancelled = false; // set if user hit cancel
47
48 void OnCellChanged( wxGridEvent& aEvent );
49 void OnSelectCell( wxGridEvent& aEvent );
50
51 // Column indices (after adding Type column)
54
57 std::unique_ptr<UNITS_PROVIDER> m_unitsProvider;
58};
59
DIALOG_FP_EDIT_PAD_TABLE(PCB_BASE_FRAME *aParent, FOOTPRINT *aFootprint)
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)
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:81
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