KiCad PCB EDA Suite
Loading...
Searching...
No Matches
dialog_field_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) 2012 Jean-Pierre Charras, [email protected]
5 * Copyright (C) 2016 Wayne Stambaugh, [email protected]
6 * Copyright (C) 2004-2024 KiCad Developers, see AUTHORS.txt for contributors.
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 2
11 * of the License, or (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, you may find one here:
20 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
21 * or you may search the http://www.gnu.org website for the version 2 license,
22 * or you may write to the Free Software Foundation, Inc.,
23 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
24 */
25
26#ifndef DIALOG_FIELD_PROPERTIES_H
27#define DIALOG_FIELD_PROPERTIES_H
28
30#include <widgets/unit_binder.h>
31
32class SCH_BASE_FRAME;
33class SCH_FIELD;
34class EDA_TEXT;
36class SCH_COMMIT;
37
38
44{
45public:
46 DIALOG_FIELD_PROPERTIES( SCH_BASE_FRAME* aParent, const wxString& aTitle,
47 const SCH_FIELD* aField );
48
49 ~DIALOG_FIELD_PROPERTIES() override;
50
51 bool TransferDataToWindow() override;
52 bool TransferDataFromWindow() override;
53
54 SCH_BASE_FRAME* GetParent() { return dynamic_cast<SCH_BASE_FRAME*>( wxDialog::GetParent() ); }
55
56 const wxString& GetText() const { return m_text; }
57
58 void UpdateField( SCH_FIELD* aField );
59
60 void UpdateField( SCH_COMMIT* aCommit, SCH_FIELD* aField, SCH_SHEET_PATH* aSheetPath );
61
62protected:
63 void init();
64
65 void updateText( EDA_TEXT* aText );
66
67 void onScintillaCharAdded( wxStyledTextEvent &aEvent );
68
77 void OnTextValueSelectButtonClick( wxCommandEvent& aEvent ) override;
78
83 void OnSetFocusText( wxFocusEvent& event ) override;
84
85 void onOrientButton( wxCommandEvent &aEvent );
86 void onHAlignButton( wxCommandEvent &aEvent );
87 void onVAlignButton( wxCommandEvent &aEvent );
88
89protected:
93
95 wxString m_text;
108
110
112 std::string m_netlist;
113
116};
117
118#endif // DIALOG_FIELD_PROPERTIES_H
Class DIALOG_FIELD_PROPERTIES_BASE.
This class is setup in expectation of its children possibly using Kiway player so DIALOG_SHIM::ShowQu...
void onOrientButton(wxCommandEvent &aEvent)
void OnTextValueSelectButtonClick(wxCommandEvent &aEvent) override
Handle the select button next to the text value field.
GR_TEXT_H_ALIGN_T m_horizontalJustification
void onVAlignButton(wxCommandEvent &aEvent)
SCINTILLA_TRICKS * m_scintillaTricks
void UpdateField(SCH_FIELD *aField)
void onScintillaCharAdded(wxStyledTextEvent &aEvent)
void OnSetFocusText(wxFocusEvent &event) override
Used to select the variant part of some text fields (for instance, the question mark or number in a r...
void updateText(EDA_TEXT *aText)
void onHAlignButton(wxCommandEvent &aEvent)
GR_TEXT_V_ALIGN_T m_verticalJustification
const wxString & GetText() const
A mix-in class (via multiple inheritance) that handles texts such as labels, parts,...
Definition: eda_text.h:83
FONT is an abstract base class for both outline and stroke fonts.
Definition: font.h:131
A color representation with 4 components: red, green, blue, alpha.
Definition: color4d.h:104
A shim class between EDA_DRAW_FRAME and several derived classes: SYMBOL_EDIT_FRAME,...
Instances are attached to a symbol or sheet and provide a place for the symbol's value,...
Definition: sch_field.h:51
Handle access to a stack of flattened SCH_SHEET objects by way of a path for creating a flattened sch...
Add cut/copy/paste, dark theme, autocomplete and brace highlighting to a wxStyleTextCtrl instance.
GR_TEXT_H_ALIGN_T
GR_TEXT_V_ALIGN_T