KiCad PCB EDA Suite
Loading...
Searching...
No Matches
dialog_shape_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 The KiCad Developers, see CHANGELOG.TXT for contributors.
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <https://www.gnu.org/licenses/>.
18 */
19
20#ifndef DIALOG_SHAPE_PROPERTIES_H
21#define DIALOG_SHAPE_PROPERTIES_H
22
23#include <memory>
24
25class SCH_SHAPE;
26class SCH_BASE_FRAME;
27
28
30#include <widgets/unit_binder.h>
31#include <line_ending.h>
32
33
35{
36public:
38 ~DIALOG_SHAPE_PROPERTIES() override;
39
40 bool TransferDataToWindow() override;
41 bool TransferDataFromWindow() override;
42
44 bool GetApplyToAllUnits() { return m_checkApplyToAllUnits->IsChecked(); }
45
46private:
47 void onBorderChecked( wxCommandEvent& aEvent) override;
48 void onBorderSwatch( wxCommandEvent& aEvent );
49 void onFillChoice( wxCommandEvent& event ) override;
50 void onFillRadioButton(wxCommandEvent &aEvent) override;
51 void onCustomColorSwatch( wxCommandEvent& aEvent );
52
53private:
57
58 wxBoxSizer* m_endingsSizer;
59 wxStaticText* m_startShapeLabel;
60 wxBitmapComboBox* m_startShapeChoice;
61 wxStaticText* m_endShapeLabel;
62 wxBitmapComboBox* m_endShapeChoice;
63 wxStaticText* m_startLengthLabel;
64 wxTextCtrl* m_startLengthCtrl;
65 wxStaticText* m_startLengthUnits;
66 wxStaticText* m_endLengthLabel;
67 wxTextCtrl* m_endLengthCtrl;
68 wxStaticText* m_endLengthUnits;
69 wxStaticText* m_startWidthLabel;
70 wxTextCtrl* m_startWidthCtrl;
71 wxStaticText* m_startWidthUnits;
72 wxStaticText* m_endWidthLabel;
73 wxTextCtrl* m_endWidthCtrl;
74 wxStaticText* m_endWidthUnits;
78 wxStaticText* m_endStrokeWidthLabel;
80 wxStaticText* m_endStrokeWidthUnits;
81 wxStaticText* m_endingsHelpLabel;
82
83 std::unique_ptr<UNIT_BINDER> m_startLength;
84 std::unique_ptr<UNIT_BINDER> m_startWidth;
85 std::unique_ptr<UNIT_BINDER> m_startStrokeWidth;
86 std::unique_ptr<UNIT_BINDER> m_endLength;
87 std::unique_ptr<UNIT_BINDER> m_endWidth;
88 std::unique_ptr<UNIT_BINDER> m_endStrokeWidth;
89
91};
92
93#endif // DIALOG_SHAPE_PROPERTIES_H
DIALOG_SHAPE_PROPERTIES_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("%s Properties"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
std::unique_ptr< UNIT_BINDER > m_endWidth
wxBitmapComboBox * m_startShapeChoice
std::unique_ptr< UNIT_BINDER > m_startWidth
void createLineEndingControls(SCH_BASE_FRAME *aParent)
wxBitmapComboBox * m_endShapeChoice
DIALOG_SHAPE_PROPERTIES(SCH_BASE_FRAME *aParent, SCH_SHAPE *aShape)
std::unique_ptr< UNIT_BINDER > m_startStrokeWidth
std::unique_ptr< UNIT_BINDER > m_startLength
std::unique_ptr< UNIT_BINDER > m_endLength
void onBorderChecked(wxCommandEvent &aEvent) override
std::unique_ptr< UNIT_BINDER > m_endStrokeWidth
void onFillChoice(wxCommandEvent &event) override
void onFillRadioButton(wxCommandEvent &aEvent) override
A shim class between EDA_DRAW_FRAME and several derived classes: SYMBOL_EDIT_FRAME,...