KiCad PCB EDA Suite
Loading...
Searching...
No Matches
dialog_pin_properties.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) 2010 Jean-Pierre Charras, jp.charras at wanadoo.fr
5 * Copyright The KiCad Developers, see AUTHOR.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#ifndef DIALOG_PIN_PROPERTIES_H
22#define DIALOG_PIN_PROPERTIES_H
23
24#include <wx/bmpcbox.h>
25#include <wx/dcclient.h>
26
27#include <pinshape_combobox.h>
28#include <pintype_combobox.h>
29
31#include <widgets/unit_binder.h>
32#include <sch_pin.h>
33#include <symbol_edit_frame.h>
34
35
37{
41
42 COL_COUNT // keep as last
43};
44
45
48
49
51{
52public:
53 DIALOG_PIN_PROPERTIES( SYMBOL_EDIT_FRAME* parent, SCH_PIN* aPin, bool aFocusPinNumber );
54 ~DIALOG_PIN_PROPERTIES() override;
55
56 bool TransferDataToWindow() override;
57 bool TransferDataFromWindow() override;
58
59 void OnPropertiesChange( wxCommandEvent& event ) override;
60 void OnAddAlternate( wxCommandEvent& event ) override;
61 void OnDeleteAlternate( wxCommandEvent& event ) override;
62 void OnSize( wxSizeEvent& event ) override;
63 void OnUpdateUI( wxUpdateUIEvent& event ) override;
64 void OnCollapsiblePaneChange( wxCollapsiblePaneEvent& event ) override;
65
66protected:
67 void adjustGridColumns();
68 wxString getSyncPinsMessage();
69
70private:
73
75 SCH_PIN* m_dummyPin; // a working copy used to show changes
77
83
85
87
90
91 std::map<int, int> m_originalColWidths; // map col-number : orig-col-width
92 wxSize m_size;
94 inline static bool s_alternatesTurndownOpen = false;
95};
96
97#endif // DIALOG_PIN_PROPERTIES_H
DIALOG_PIN_PROPERTIES_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Pin Properties"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
SYMBOL_EDIT_FRAME * m_frame
void OnUpdateUI(wxUpdateUIEvent &event) override
std::map< int, int > m_originalColWidths
void OnCollapsiblePaneChange(wxCollapsiblePaneEvent &event) override
void OnPropertiesChange(wxCommandEvent &event) override
void OnAddAlternate(wxCommandEvent &event) override
SYMBOL_PREVIEW_WIDGET * m_previewWidget
ALT_PIN_DATA_MODEL * m_alternatesDataModel
void OnSize(wxSizeEvent &event) override
DIALOG_PIN_PROPERTIES(SYMBOL_EDIT_FRAME *parent, SCH_PIN *aPin, bool aFocusPinNumber)
void OnDeleteAlternate(wxCommandEvent &event) override
Define a library symbol object.
Definition lib_symbol.h:79
The symbol library editor main window.
VECTOR2< int32_t > VECTOR2I
Definition vector2d.h:683