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
29
#include <
dialog_field_properties_base.h
>
30
#include <
widgets/unit_binder.h
>
31
32
class
SCH_BASE_FRAME
;
33
class
SCH_FIELD
;
34
class
EDA_TEXT
;
35
class
SCINTILLA_TRICKS
;
36
class
SCH_COMMIT
;
37
38
43
class
DIALOG_FIELD_PROPERTIES
:
public
DIALOG_FIELD_PROPERTIES_BASE
44
{
45
public
:
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
62
protected
:
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
89
protected
:
90
UNIT_BINDER
m_posX
;
91
UNIT_BINDER
m_posY
;
92
UNIT_BINDER
m_textSize
;
93
94
int
m_fieldId
;
95
wxString
m_text
;
96
KIFONT::FONT
*
m_font
;
97
bool
m_isItalic
;
98
bool
m_isBold
;
99
KIGFX::COLOR4D
m_color
;
100
VECTOR2I
m_position
;
101
int
m_size
;
102
bool
m_isVertical
;
103
GR_TEXT_V_ALIGN_T
m_verticalJustification
;
104
GR_TEXT_H_ALIGN_T
m_horizontalJustification
;
105
bool
m_isVisible
;
106
bool
m_isNameVisible
;
107
bool
m_allowAutoplace
;
108
109
bool
m_firstFocus
;
110
111
SCINTILLA_TRICKS
*
m_scintillaTricks
;
112
std::string
m_netlist
;
113
114
const
SCH_FIELD
*
m_field
;
115
bool
m_isSheetFilename
;
116
};
117
118
#endif
// DIALOG_FIELD_PROPERTIES_H
DIALOG_FIELD_PROPERTIES_BASE
Class DIALOG_FIELD_PROPERTIES_BASE.
Definition:
dialog_field_properties_base.h:45
DIALOG_FIELD_PROPERTIES
This class is setup in expectation of its children possibly using Kiway player so DIALOG_SHIM::ShowQu...
Definition:
dialog_field_properties.h:44
DIALOG_FIELD_PROPERTIES::m_field
const SCH_FIELD * m_field
Definition:
dialog_field_properties.h:114
DIALOG_FIELD_PROPERTIES::m_isNameVisible
bool m_isNameVisible
Definition:
dialog_field_properties.h:106
DIALOG_FIELD_PROPERTIES::m_isBold
bool m_isBold
Definition:
dialog_field_properties.h:98
DIALOG_FIELD_PROPERTIES::m_posX
UNIT_BINDER m_posX
Definition:
dialog_field_properties.h:90
DIALOG_FIELD_PROPERTIES::m_position
VECTOR2I m_position
Definition:
dialog_field_properties.h:100
DIALOG_FIELD_PROPERTIES::onOrientButton
void onOrientButton(wxCommandEvent &aEvent)
Definition:
dialog_field_properties.cpp:402
DIALOG_FIELD_PROPERTIES::m_text
wxString m_text
Definition:
dialog_field_properties.h:95
DIALOG_FIELD_PROPERTIES::m_isVertical
bool m_isVertical
Definition:
dialog_field_properties.h:102
DIALOG_FIELD_PROPERTIES::OnTextValueSelectButtonClick
void OnTextValueSelectButtonClick(wxCommandEvent &aEvent) override
Handle the select button next to the text value field.
Definition:
dialog_field_properties.cpp:347
DIALOG_FIELD_PROPERTIES::m_size
int m_size
Definition:
dialog_field_properties.h:101
DIALOG_FIELD_PROPERTIES::m_horizontalJustification
GR_TEXT_H_ALIGN_T m_horizontalJustification
Definition:
dialog_field_properties.h:104
DIALOG_FIELD_PROPERTIES::TransferDataFromWindow
bool TransferDataFromWindow() override
Definition:
dialog_field_properties.cpp:498
DIALOG_FIELD_PROPERTIES::TransferDataToWindow
bool TransferDataToWindow() override
Definition:
dialog_field_properties.cpp:432
DIALOG_FIELD_PROPERTIES::GetParent
SCH_BASE_FRAME * GetParent()
Definition:
dialog_field_properties.h:54
DIALOG_FIELD_PROPERTIES::m_textSize
UNIT_BINDER m_textSize
Definition:
dialog_field_properties.h:92
DIALOG_FIELD_PROPERTIES::m_netlist
std::string m_netlist
Definition:
dialog_field_properties.h:112
DIALOG_FIELD_PROPERTIES::init
void init()
Definition:
dialog_field_properties.cpp:285
DIALOG_FIELD_PROPERTIES::onVAlignButton
void onVAlignButton(wxCommandEvent &aEvent)
Definition:
dialog_field_properties.cpp:422
DIALOG_FIELD_PROPERTIES::~DIALOG_FIELD_PROPERTIES
~DIALOG_FIELD_PROPERTIES() override
Definition:
dialog_field_properties.cpp:279
DIALOG_FIELD_PROPERTIES::m_firstFocus
bool m_firstFocus
Definition:
dialog_field_properties.h:109
DIALOG_FIELD_PROPERTIES::m_isVisible
bool m_isVisible
Definition:
dialog_field_properties.h:105
DIALOG_FIELD_PROPERTIES::m_scintillaTricks
SCINTILLA_TRICKS * m_scintillaTricks
Definition:
dialog_field_properties.h:111
DIALOG_FIELD_PROPERTIES::m_color
KIGFX::COLOR4D m_color
Definition:
dialog_field_properties.h:99
DIALOG_FIELD_PROPERTIES::m_isSheetFilename
bool m_isSheetFilename
Definition:
dialog_field_properties.h:115
DIALOG_FIELD_PROPERTIES::m_allowAutoplace
bool m_allowAutoplace
Definition:
dialog_field_properties.h:107
DIALOG_FIELD_PROPERTIES::UpdateField
void UpdateField(SCH_FIELD *aField)
Definition:
dialog_field_properties.cpp:556
DIALOG_FIELD_PROPERTIES::onScintillaCharAdded
void onScintillaCharAdded(wxStyledTextEvent &aEvent)
Definition:
dialog_field_properties.cpp:571
DIALOG_FIELD_PROPERTIES::m_posY
UNIT_BINDER m_posY
Definition:
dialog_field_properties.h:91
DIALOG_FIELD_PROPERTIES::OnSetFocusText
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...
Definition:
dialog_field_properties.cpp:375
DIALOG_FIELD_PROPERTIES::m_isItalic
bool m_isItalic
Definition:
dialog_field_properties.h:97
DIALOG_FIELD_PROPERTIES::m_font
KIFONT::FONT * m_font
Definition:
dialog_field_properties.h:96
DIALOG_FIELD_PROPERTIES::updateText
void updateText(EDA_TEXT *aText)
Definition:
dialog_field_properties.cpp:542
DIALOG_FIELD_PROPERTIES::onHAlignButton
void onHAlignButton(wxCommandEvent &aEvent)
Definition:
dialog_field_properties.cpp:412
DIALOG_FIELD_PROPERTIES::m_fieldId
int m_fieldId
Definition:
dialog_field_properties.h:94
DIALOG_FIELD_PROPERTIES::m_verticalJustification
GR_TEXT_V_ALIGN_T m_verticalJustification
Definition:
dialog_field_properties.h:103
DIALOG_FIELD_PROPERTIES::GetText
const wxString & GetText() const
Definition:
dialog_field_properties.h:56
EDA_TEXT
A mix-in class (via multiple inheritance) that handles texts such as labels, parts,...
Definition:
eda_text.h:79
KIFONT::FONT
FONT is an abstract base class for both outline and stroke fonts.
Definition:
font.h:131
KIGFX::COLOR4D
A color representation with 4 components: red, green, blue, alpha.
Definition:
color4d.h:104
SCH_BASE_FRAME
A shim class between EDA_DRAW_FRAME and several derived classes: SYMBOL_EDIT_FRAME,...
Definition:
sch_base_frame.h:104
SCH_COMMIT
Definition:
sch_commit.h:46
SCH_FIELD
Instances are attached to a symbol or sheet and provide a place for the symbol's value,...
Definition:
sch_field.h:51
SCH_SHEET_PATH
Handle access to a stack of flattened SCH_SHEET objects by way of a path for creating a flattened sch...
Definition:
sch_sheet_path.h:137
SCINTILLA_TRICKS
Add cut/copy/paste, dark theme, autocomplete and brace highlighting to a wxStyleTextCtrl instance.
Definition:
scintilla_tricks.h:36
UNIT_BINDER
Definition:
unit_binder.h:43
VECTOR2< int32_t >
dialog_field_properties_base.h
GR_TEXT_H_ALIGN_T
GR_TEXT_H_ALIGN_T
Definition:
text_attributes.h:43
GR_TEXT_V_ALIGN_T
GR_TEXT_V_ALIGN_T
Definition:
text_attributes.h:52
unit_binder.h
src
eeschema
dialogs
dialog_field_properties.h
Generated on Thu Nov 21 2024 00:06:39 for KiCad PCB EDA Suite by
1.9.6