KiCad PCB EDA Suite
Loading...
Searching...
No Matches
easypc_classes_styles.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 AUTHORS.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
27
28#ifndef EASYPC_CLASSES_STYLES_H
29#define EASYPC_CLASSES_STYLES_H
30
31#include <cstdint>
32#include <map>
33#include <memory>
34
35#include <wx/string.h>
36
38
39
40namespace EASYPC
41{
42
70
71
72enum class LAYER_SIDE : int32_t
73{
74 TOP = 0,
75 BOTTOM = 1,
76 INNER = 2,
77 ALL = 3
78};
79
80
91
92
94enum class LAYER_OVERSIZE_TYPE : int32_t
95{
96 NONE = 0,
97 FIXED = 1,
99};
100
101
115
116
122{
123 LOAD_TASK Load( ARCHIVE& aAr ) override;
124 int ItemFormat( const ARCHIVE& aAr ) const override;
125
127 static void LoadFormatted( ARCHIVE& aAr, int& aFormat );
128
130 void LoadOldFormat( ARCHIVE& aAr, int& aFormat ) const;
131
132 OBJECT* Parent = nullptr;
133 OBJECT* Attributes = nullptr;
134};
135
136
138{
139 LOAD_TASK Load( ARCHIVE& aAr ) override;
140
141 wxString Name;
142};
143
144
146{
147 LOAD_TASK Load( ARCHIVE& aAr ) override;
148
150 wxString Value;
151 bool Displayed = false;
152};
153
154
156{
157 LOAD_TASK Load( ARCHIVE& aAr ) override;
158
159 wxString Name;
160 int32_t Width = 0;
161};
162
163
166{
167 LOAD_TASK Load( ARCHIVE& aAr ) override;
168};
169
170
172{
173 LOAD_TASK Load( ARCHIVE& aAr ) override;
174
175 wxString Name;
176 int32_t Height = 0;
177 int32_t LineWidth = 0;
178 OBJECT* Font = nullptr;
180 int32_t CharWidthPercent = 100;
181 bool Proportional = false;
182};
183
184
186{
187 LOAD_TASK Load( ARCHIVE& aAr ) override;
188
189 wxString Name;
190 int32_t Width = 0;
191};
192
193
195{
196 LOAD_TASK Load( ARCHIVE& aAr ) override;
197
198 wxString Name;
199 int32_t Size = 0;
201 int32_t Drill = 0;
202 int32_t Length = 0;
203 OBJECT* Exceptions = nullptr;
204 bool Plated = true;
205 int32_t Dimension3 = 0;
207 int32_t DrillLength = 0;
208 int32_t DrillCornerRadius = 0;
209};
210
211
213{
214 LOAD_TASK Load( ARCHIVE& aAr ) override;
215
216 OBJECT* Layer = nullptr;
218 int32_t Size = 0;
219 int32_t Length = 0;
220 int32_t Dimension3 = 0;
221};
222
223
239
240
242{
243 LOAD_TASK Load( ARCHIVE& aAr ) override;
244
246 int32_t EffectiveUsage() const { return Type ? Type->Usage : Usage; }
247
248 wxString Name;
250 wxString TypeName;
252 int32_t Usage = 0;
253 bool Displayed = true;
254 OBJECT* Net = nullptr;
255 OBJECT* Terminals = nullptr;
256
258 std::unique_ptr<SOURCE_LAYER_TYPE> ConvertedType;
259};
260
261
264{
265 LOAD_TASK Load( ARCHIVE& aAr ) override;
266
269};
270
271
274{
275 LOAD_TASK Load( ARCHIVE& aAr ) override;
276};
277
278
283constexpr char THERMAL_RULE_SET[] = "o o a o a o a o a 12 o";
284
285
287{
288 LOAD_TASK Load( ARCHIVE& aAr ) override;
289
290 wxString Name;
291 int32_t Type = 0;
295 int32_t TentedVias = 0;
296 int32_t DiffPairGap = 10000;
297};
298
299
302{
303 LOAD_TASK Load( ARCHIVE& aAr ) override;
304
305 bool Bidirectional = true;
306 std::map<int32_t, int32_t> Values;
307};
308
309
312{
314
315 LOAD_TASK Load( ARCHIVE& aAr ) override;
316};
317
318} // namespace EASYPC
319
320#endif // EASYPC_CLASSES_STYLES_H
One archive load stream; it owns every object it creates.
A loader coroutine. Awaiting one queues it on its archive's frame stack instead of nesting the call.
SPACING_ITEM
Item kind bits; a spacing key is (a << 16) | b.
constexpr char THERMAL_RULE_SET[]
A thermal rule set as SkipFields ops: owner, four thermal rules (owner and an int array),...
LAYER_USAGE
Layer usage bits.
@ LAYER_USAGE_SET
pseudo layer [All], [Top] or [Bottom]
LAYER_OVERSIZE_TYPE
How a layer type grows pads.
@ FIXED
not ABSOLUTE, which wingdi.h defines
PAD_SHAPE
Pad style shape, also the drill and exception shape.
Root of every deserialized object.
LOAD_TASK Load(ARCHIVE &aAr) override
Read this object's fields.
LOAD_TASK Load(ARCHIVE &aAr) override
Read this object's fields.
SOURCE_ATTRIBUTE_NAME * AttributeName
The base of nearly every class.
LOAD_TASK Load(ARCHIVE &aAr) override
Read this object's fields.
int ItemFormat(const ARCHIVE &aAr) const override
The version this object gates on; the base is the archive's current read format.
OBJECT * Attributes
attribute array
void LoadOldFormat(ARCHIVE &aAr, int &aFormat) const
An older item format, stored only while the format is still 0.
OBJECT * Parent
null is the document in a design, nothing in a library item
static void LoadFormatted(ARCHIVE &aAr, int &aFormat)
An item format, stored only from object schema 2, which governs what follows.
A list: owner tag, then the items.
LOAD_TASK Load(ARCHIVE &aAr) override
Read this object's fields.
Item order is the physical stack order.
LOAD_TASK Load(ARCHIVE &aAr) override
Read this object's fields.
A via span from top_layer to bottom_layer inclusive, in stack order.
LOAD_TASK Load(ARCHIVE &aAr) override
Read this object's fields.
Layer type names determine silk, mask and paste roles.
LOAD_TASK Load(ARCHIVE &aAr) override
Read this object's fields.
std::unique_ptr< SOURCE_LAYER_TYPE > ConvertedType
The type made from type_name.
OBJECT * Net
net of a power plane
SOURCE_LAYER_TYPE * Type
null for the layer sets
LOAD_TASK Load(ARCHIVE &aAr) override
Read this object's fields.
int32_t EffectiveUsage() const
The usage of the layer's type, or its own for a layer set.
wxString TypeName
below v3000 the type is stored by name
OBJECT * Terminals
copper terminal array
LOAD_TASK Load(ARCHIVE &aAr) override
Read this object's fields.
LOAD_TASK Load(ARCHIVE &aAr) override
Read this object's fields.
SOURCE_TRACK_STYLE * TrackStyle1
the narrower of the two is the minimum width
SOURCE_TRACK_STYLE * TrackStyle2
int32_t Type
0 signal, 1 power
int32_t TentedVias
0 none, 1 all, 2 per via
LOAD_TASK Load(ARCHIVE &aAr) override
Read this object's fields.
LOAD_TASK Load(ARCHIVE &aAr) override
Read this object's fields.
OBJECT * Exceptions
pad style exception list
int32_t Length
Y extent for shapes that have one.
values maps (a << 16) | b of SPACING_ITEM bits to a clearance
std::map< int32_t, int32_t > Values
LOAD_TASK Load(ARCHIVE &aAr) override
Read this object's fields.
LOAD_TASK Load(ARCHIVE &aAr) override
Read this object's fields.
OBJECT * Font
type or barcode font, or null for the stroke font
int32_t Height
the accessor is GetWidth but it is the text height
LOAD_TASK Load(ARCHIVE &aAr) override
Read this object's fields.
A TrueType font, which the importers cannot measure.
LOAD_TASK Load(ARCHIVE &aAr) override
Read this object's fields.