KiCad PCB EDA Suite
lib_text.cpp
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) 2004-2022 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, you may find one here:
18 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
19 * or you may search the http://www.gnu.org website for the version 2 license,
20 * or you may write to the Free Software Foundation, Inc.,
21 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
22 */
23
24#include <common.h>
25#include <sch_draw_panel.h>
26#include <plotters/plotter.h>
27#include <trigo.h>
28#include <base_units.h>
29#include <widgets/msgpanel.h>
30#include <bitmaps.h>
31#include <eda_draw_frame.h>
32#include <lib_item.h>
33#include <general.h>
34#include <transform.h>
36#include <lib_text.h>
37#include <default_values.h> // For some default values
38#include <string_utils.h>
39
41 LIB_ITEM( LIB_TEXT_T, aParent ),
42 EDA_TEXT( schIUScale, wxEmptyString )
43{
45}
46
47
48void LIB_TEXT::ViewGetLayers( int aLayers[], int& aCount ) const
49{
50 aCount = 2;
52 aLayers[1] = LAYER_SELECTION_SHADOWS;
53}
54
55
56bool LIB_TEXT::HitTest( const VECTOR2I& aPosition, int aAccuracy ) const
57{
58 EDA_TEXT tmp_text( *this );
60
61 /* The text orientation may need to be flipped if the
62 * transformation matrix causes xy axes to be flipped.
63 * this simple algo works only for schematic matrix (rot 90 or/and mirror)
64 */
65 bool t1 = ( DefaultTransform.x1 != 0 ) ^ ( GetTextAngle() != ANGLE_HORIZONTAL );
66
68 return tmp_text.TextHitTest( aPosition, aAccuracy );
69}
70
71
73{
74 LIB_TEXT* newitem = new LIB_TEXT( nullptr );
75
76 newitem->m_parent = m_parent;
77 newitem->m_unit = m_unit;
78 newitem->m_convert = m_convert;
79 newitem->m_private = m_private;
80 newitem->m_flags = m_flags;
81
82 newitem->SetText( GetText() );
83 newitem->SetAttributes( *this );
84
85 return newitem;
86}
87
88
89int LIB_TEXT::compare( const LIB_ITEM& aOther, int aCompareFlags ) const
90{
91 wxASSERT( aOther.Type() == LIB_TEXT_T );
92
93 int retv = LIB_ITEM::compare( aOther, aCompareFlags );
94
95 if( retv )
96 return retv;
97
98 const LIB_TEXT* tmp = ( LIB_TEXT* ) &aOther;
99
100 int result = GetText().CmpNoCase( tmp->GetText() );
101
102 if( result != 0 )
103 return result;
104
105 if( GetTextPos().x != tmp->GetTextPos().x )
106 return GetTextPos().x - tmp->GetTextPos().x;
107
108 if( GetTextPos().y != tmp->GetTextPos().y )
109 return GetTextPos().y - tmp->GetTextPos().y;
110
111 if( GetTextWidth() != tmp->GetTextWidth() )
112 return GetTextWidth() - tmp->GetTextWidth();
113
114 if( GetTextHeight() != tmp->GetTextHeight() )
115 return GetTextHeight() - tmp->GetTextHeight();
116
117 return 0;
118}
119
120
121void LIB_TEXT::Offset( const VECTOR2I& aOffset )
122{
123 EDA_TEXT::Offset( aOffset );
124}
125
126
127void LIB_TEXT::MoveTo( const VECTOR2I& newPosition )
128{
129 SetTextPos( newPosition );
130}
131
132
134{
135 VECTOR2I delta( 0, 0 );
136 BOX2I bbox = GetTextBox();
137
138 if( GetTextAngle().IsHorizontal() )
139 {
141 delta.x = bbox.GetWidth() / 2;
143 delta.x = - bbox.GetWidth() / 2;
144
146 delta.y = - bbox.GetHeight() / 2;
148 delta.y = bbox.GetHeight() / 2;
149 }
150 else
151 {
153 delta.y = bbox.GetWidth() / 2;
155 delta.y = - bbox.GetWidth() / 2;
156
158 delta.x = + bbox.GetHeight() / 2;
160 delta.x = - bbox.GetHeight() / 2;
161 }
162
163 if( inverse )
165 else
167}
168
169
171{
172 NormalizeJustification( false );
173 int x = GetTextPos().x;
174
175 x -= center.x;
176 x *= -1;
177 x += center.x;
178
179 if( GetTextAngle().IsHorizontal() )
180 {
185 }
186 else
187 {
192 }
193
194 SetTextX( x );
196}
197
198
200{
201 NormalizeJustification( false );
202 int y = GetTextPos().y;
203
204 y -= center.y;
205 y *= -1;
206 y += center.y;
207
208 if( GetTextAngle().IsHorizontal() )
209 {
214 }
215 else
216 {
221 }
222
223 SetTextY( y );
225}
226
227
228void LIB_TEXT::Rotate( const VECTOR2I& center, bool aRotateCCW )
229{
230 NormalizeJustification( false );
231 EDA_ANGLE rot_angle = aRotateCCW ? -ANGLE_90 : ANGLE_90;
232
233 VECTOR2I pt = GetTextPos();
234 RotatePoint( pt, center, rot_angle );
235 SetTextPos( pt );
236
237 if( GetTextAngle().IsHorizontal() )
238 {
240 }
241 else
242 {
243 // 180° rotation is a mirror
244
249
254
256 }
257
259}
260
261
262void LIB_TEXT::Plot( PLOTTER* plotter, bool aBackground, const VECTOR2I& offset,
263 const TRANSFORM& aTransform, bool aDimmed ) const
264{
265 wxASSERT( plotter != nullptr );
266
267 if( IsPrivate() )
268 return;
269
270 if( aBackground )
271 return;
272
273 RENDER_SETTINGS* settings = plotter->RenderSettings();
274
275 BOX2I bBox = GetBoundingBox();
276 // convert coordinates from draw Y axis to symbol_editor Y axis
277 bBox.RevertYAxis();
278 VECTOR2I txtpos = bBox.Centre();
279
280 // The text orientation may need to be flipped if the transformation matrix causes xy
281 // axes to be flipped.
282 int t1 = ( aTransform.x1 != 0 ) ^ ( GetTextAngle() != ANGLE_HORIZONTAL );
283 VECTOR2I pos = aTransform.TransformCoordinate( txtpos ) + offset;
285 COLOR4D bg = settings->GetBackgroundColor();
286
287 if( !plotter->GetColorMode() || color == COLOR4D::UNSPECIFIED )
288 color = settings->GetLayerColor( LAYER_DEVICE );
289
290 if( !IsVisible() )
291 bg = settings->GetLayerColor( LAYER_HIDDEN );
292 else if( bg == COLOR4D::UNSPECIFIED || !plotter->GetColorMode() )
293 bg = COLOR4D::WHITE;
294
295 if( aDimmed )
296 color = color.Mix( bg, 0.5f );
297
298 int penWidth = std::max( GetEffectiveTextPenWidth(), settings->GetMinPenWidth() );
299
300 KIFONT::FONT* font = GetFont();
301
302 if( !font )
303 font = KIFONT::FONT::GetFont( settings->GetDefaultFont(), IsBold(), IsItalic() );
304
305 plotter->Text( pos, color, GetText(), t1 ? ANGLE_HORIZONTAL : ANGLE_VERTICAL, GetTextSize(),
307 true, font );
308}
309
310
312{
314}
315
316
318{
320
321 if( !font )
323
324 return font;
325}
326
327
328void LIB_TEXT::print( const RENDER_SETTINGS* aSettings, const VECTOR2I& aOffset, void* aData,
329 const TRANSFORM& aTransform, bool aDimmed )
330{
331 wxDC* DC = aSettings->GetPrintDC();
333 bool blackAndWhiteMode = GetGRForceBlackPenState();
334 int penWidth = std::max( GetEffectiveTextPenWidth(), aSettings->GetDefaultPenWidth() );
335
336 if( blackAndWhiteMode || color == COLOR4D::UNSPECIFIED )
337 color = aSettings->GetLayerColor( LAYER_DEVICE );
338
339 COLOR4D bg = aSettings->GetBackgroundColor();
340
341 if( bg == COLOR4D::UNSPECIFIED || GetGRForceBlackPenState() )
342 bg = COLOR4D::WHITE;
343
344 if( !IsVisible() )
345 bg = aSettings->GetLayerColor( LAYER_HIDDEN );
346
347 if( aDimmed )
348 color = color.Mix( bg, 0.5f );
349
350 // Calculate the text orientation, according to the symbol orientation/mirror (needed when
351 // draw text in schematic)
352 EDA_ANGLE orient = GetTextAngle();
353
354 if( aTransform.y1 ) // Rotate symbol 90 degrees.
355 {
356 if( orient == ANGLE_HORIZONTAL )
357 orient = ANGLE_VERTICAL;
358 else
359 orient = ANGLE_HORIZONTAL;
360 }
361
362 KIFONT::FONT* font = GetFont();
363
364 if( !font )
365 font = KIFONT::FONT::GetFont( aSettings->GetDefaultFont(), IsBold(), IsItalic() );
366
367 /*
368 * Calculate the text justification, according to the symbol orientation/mirror.
369 * This is a bit complicated due to cumulative calculations:
370 * - numerous cases (mirrored or not, rotation)
371 * - the GRText function will also recalculate H and V justifications according to the text
372 * orientation.
373 * - When a symbol is mirrored, the text is not mirrored and justifications are complicated
374 * to calculate so the more easily way is to use no justifications (centered text) and
375 * use GetBoundingBox to know the text coordinate considered as centered
376 */
377 BOX2I bBox = GetBoundingBox();
378
379 // convert coordinates from draw Y axis to symbol_editor Y axis:
380 bBox.RevertYAxis();
381 VECTOR2I txtpos = bBox.Centre();
382
383 // Calculate pos according to mirror/rotation.
384 txtpos = aTransform.TransformCoordinate( txtpos ) + aOffset;
385
387 GR_TEXT_V_ALIGN_CENTER, penWidth, IsItalic(), IsBold(), font );
388}
389
390
391void LIB_TEXT::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_ITEM>& aList )
392{
393 wxString msg;
394
395 LIB_ITEM::GetMsgPanelInfo( aFrame, aList );
396
397 // Don't use GetShownText() here; we want to show the user the variable references
398 aList.emplace_back( _( "Text" ), UnescapeString( GetText() ) );
399
400 aList.emplace_back( _( "Font" ), GetFont() ? GetFont()->GetName() : _( "Default" ) );
401
402 aList.emplace_back( _( "Style" ), GetTextStyleName() );
403
404 aList.emplace_back( _( "Text Size" ), aFrame->MessageTextFromValue( GetTextWidth() ) );
405
406 switch ( GetHorizJustify() )
407 {
408 case GR_TEXT_H_ALIGN_LEFT: msg = _( "Left" ); break;
409 case GR_TEXT_H_ALIGN_CENTER: msg = _( "Center" ); break;
410 case GR_TEXT_H_ALIGN_RIGHT: msg = _( "Right" ); break;
411 }
412
413 aList.emplace_back( _( "H Justification" ), msg );
414
415 switch ( GetVertJustify() )
416 {
417 case GR_TEXT_V_ALIGN_TOP: msg = _( "Top" ); break;
418 case GR_TEXT_V_ALIGN_CENTER: msg = _( "Center" ); break;
419 case GR_TEXT_V_ALIGN_BOTTOM: msg = _( "Bottom" ); break;
420 }
421
422 aList.emplace_back( _( "V Justification" ), msg );
423}
424
425
427{
428 /* Y coordinates for LIB_ITEMS are bottom to top, so we must invert the Y position when
429 * calling GetTextBox() that works using top to bottom Y axis orientation.
430 */
431 BOX2I bbox = GetTextBox( -1, true );
432 bbox.RevertYAxis();
433
434 // We are using now a bottom to top Y axis.
435 VECTOR2I orig = bbox.GetOrigin();
436 VECTOR2I end = bbox.GetEnd();
437
438 RotatePoint( orig, GetTextPos(), -GetTextAngle() );
439 RotatePoint( end, GetTextPos(), -GetTextAngle() );
440
441 bbox.SetOrigin( orig );
442 bbox.SetEnd( end );
443
444 // We are using now a top to bottom Y axis:
445 bbox.RevertYAxis();
446
447 return bbox;
448}
449
450
451wxString LIB_TEXT::GetSelectMenuText( UNITS_PROVIDER* aUnitsProvider ) const
452{
453 return wxString::Format( _( "Graphic Text '%s'" ), KIUI::EllipsizeMenuText( GetShownText() ) );
454}
455
456
458{
459 return BITMAPS::text;
460}
461
462
463void LIB_TEXT::BeginEdit( const VECTOR2I& aPosition )
464{
465 SetTextPos( aPosition );
466}
467
468
469void LIB_TEXT::CalcEdit( const VECTOR2I& aPosition )
470{
471 SetTextPos( aPosition );
472}
int color
Definition: DXF_plotter.cpp:57
constexpr EDA_IU_SCALE schIUScale
Definition: base_units.h:111
BITMAPS
A list of all bitmap identifiers.
Definition: bitmaps_list.h:33
void SetOrigin(const Vec &pos)
Definition: box2.h:202
const Vec & GetOrigin() const
Definition: box2.h:183
void RevertYAxis()
Mirror the rectangle from the X axis (negate Y pos and size).
Definition: box2.h:689
coord_type GetHeight() const
Definition: box2.h:188
coord_type GetWidth() const
Definition: box2.h:187
const Vec GetEnd() const
Definition: box2.h:185
Vec Centre() const
Definition: box2.h:70
void SetEnd(coord_type x, coord_type y)
Definition: box2.h:255
The base class for create windows for drawing purpose.
A base class for most all the KiCad significant classes used in schematics and boards.
Definition: eda_item.h:85
KICAD_T Type() const
Returns the type of object.
Definition: eda_item.h:97
EDA_ITEM_FLAGS m_flags
Definition: eda_item.h:498
EDA_ITEM * m_parent
Linked list: Link (parent struct)
Definition: eda_item.h:496
A mix-in class (via multiple inheritance) that handles texts such as labels, parts,...
Definition: eda_text.h:72
int GetTextHeight() const
Definition: eda_text.h:195
BOX2I GetTextBox(int aLine=-1, bool aInvertY=false) const
Useful in multiline texts to calculate the full text or a line area (for zones filling,...
Definition: eda_text.cpp:503
const VECTOR2I & GetTextPos() const
Definition: eda_text.h:201
COLOR4D GetTextColor() const
Definition: eda_text.h:198
wxString GetTextStyleName() const
Definition: eda_text.cpp:736
bool IsItalic() const
Definition: eda_text.h:123
const EDA_ANGLE & GetTextAngle() const
Definition: eda_text.h:120
virtual const wxString & GetText() const
Return the string associated with the text object.
Definition: eda_text.h:87
void SetAttributes(const EDA_TEXT &aSrc)
Set the text attributes from another instance.
Definition: eda_text.cpp:264
virtual bool IsVisible() const
Definition: eda_text.h:129
void SetTextPos(const VECTOR2I &aPoint)
Definition: eda_text.cpp:371
void SetTextX(int aX)
Definition: eda_text.cpp:377
KIFONT::FONT * GetFont() const
Definition: eda_text.h:181
void SetTextY(int aY)
Definition: eda_text.cpp:383
int GetTextWidth() const
Definition: eda_text.h:192
void SetVertJustify(GR_TEXT_V_ALIGN_T aType)
Definition: eda_text.cpp:248
void Offset(const VECTOR2I &aOffset)
Definition: eda_text.cpp:389
GR_TEXT_H_ALIGN_T GetHorizJustify() const
Definition: eda_text.h:142
virtual bool TextHitTest(const VECTOR2I &aPoint, int aAccuracy=0) const
Test if aPoint is within the bounds of this object.
Definition: eda_text.cpp:623
int GetEffectiveTextPenWidth(int aDefaultPenWidth=0) const
The EffectiveTextPenWidth uses the text thickness if > 1 or aDefaultPenWidth.
Definition: eda_text.cpp:297
bool IsBold() const
Definition: eda_text.h:126
GR_TEXT_V_ALIGN_T GetVertJustify() const
Definition: eda_text.h:145
void SetTextSize(const VECTOR2I &aNewSize)
Definition: eda_text.cpp:347
virtual void SetText(const wxString &aText)
Definition: eda_text.cpp:163
virtual void SetTextAngle(const EDA_ANGLE &aAngle)
Definition: eda_text.cpp:193
virtual wxString GetShownText(int aDepth=0, bool aAllowExtraText=true) const
Return the string actually shown after processing of the base text.
Definition: eda_text.h:98
VECTOR2I GetTextSize() const
Definition: eda_text.h:189
void SetHorizJustify(GR_TEXT_H_ALIGN_T aType)
Definition: eda_text.cpp:240
FONT is an abstract base class for both outline and stroke fonts.
Definition: font.h:105
static FONT * GetFont(const wxString &aFontName=wxEmptyString, bool aBold=false, bool aItalic=false)
Definition: font.cpp:65
A color representation with 4 components: red, green, blue, alpha.
Definition: color4d.h:104
Container for all the knowledge about how graphical objects are drawn on any output surface/device.
int GetDefaultPenWidth() const
const wxString & GetDefaultFont() const
const COLOR4D & GetLayerColor(int aLayer) const
Return the color used to draw a layer.
virtual const COLOR4D & GetBackgroundColor() const =0
Return current background color settings.
wxDC * GetPrintDC() const
The base class for drawable items used by schematic library symbols.
Definition: lib_item.h:61
bool IsPrivate() const
Definition: lib_item.h:279
const wxString & GetDefaultFont() const
Definition: lib_item.cpp:128
int m_convert
Shape identification for alternate body styles.
Definition: lib_item.h:333
virtual int compare(const LIB_ITEM &aOther, int aCompareFlags=0) const
Provide the draw object specific comparison called by the == and < operators.
Definition: lib_item.cpp:74
bool m_private
Private items are shown only in the Symbol Editor.
Definition: lib_item.h:338
int m_unit
Unit identification for multiple parts per package.
Definition: lib_item.h:327
void GetMsgPanelInfo(EDA_DRAW_FRAME *aFrame, std::vector< MSG_PANEL_ITEM > &aList) override
Display basic info (type, part and convert) about the current item in message panel.
Definition: lib_item.cpp:47
Define a library symbol object.
Definition: lib_symbol.h:98
Define a symbol library graphical text item.
Definition: lib_text.h:40
EDA_ITEM * Clone() const override
Create a duplicate of this item with linked list members set to NULL.
Definition: lib_text.cpp:72
void MirrorHorizontal(const VECTOR2I &aCenter) override
Mirror the draw object along the horizontal (X) axis about aCenter point.
Definition: lib_text.cpp:170
BITMAPS GetMenuImage() const override
Return a pointer to an image to be used in menus.
Definition: lib_text.cpp:457
const BOX2I GetBoundingBox() const override
Definition: lib_text.cpp:426
void ViewGetLayers(int aLayers[], int &aCount) const override
Return the all the layers within the VIEW the object is painted on.
Definition: lib_text.cpp:48
KIFONT::FONT * getDrawFont() const override
Definition: lib_text.cpp:317
void GetMsgPanelInfo(EDA_DRAW_FRAME *aFrame, std::vector< MSG_PANEL_ITEM > &aList) override
Display basic info (type, part and convert) about the current item in message panel.
Definition: lib_text.cpp:391
void Rotate(const VECTOR2I &aCenter, bool aRotateCCW=true) override
Rotate the object about aCenter point.
Definition: lib_text.cpp:228
wxString GetSelectMenuText(UNITS_PROVIDER *aUnitsProvider) const override
Return the text to display to be used in the selection clarification context menu when multiple items...
Definition: lib_text.cpp:451
void MoveTo(const VECTOR2I &aPosition) override
Move a draw object to aPosition.
Definition: lib_text.cpp:127
LIB_TEXT(LIB_SYMBOL *aParent)
Definition: lib_text.cpp:40
void NormalizeJustification(bool inverse)
Definition: lib_text.cpp:133
int compare(const LIB_ITEM &aOther, int aCompareFlags=0) const override
Provide the draw object specific comparison called by the == and < operators.
Definition: lib_text.cpp:89
void print(const RENDER_SETTINGS *aSettings, const VECTOR2I &aOffset, void *aData, const TRANSFORM &aTransform, bool aDimmed) override
Print the item to aDC.
Definition: lib_text.cpp:328
bool HitTest(const VECTOR2I &aPosition, int aAccuracy=0) const override
Test if aPosition is inside or on the boundary of this item.
Definition: lib_text.cpp:56
int GetPenWidth() const override
Definition: lib_text.cpp:311
void BeginEdit(const VECTOR2I &aStartPoint) override
Begin drawing a symbol library draw item at aPosition.
Definition: lib_text.cpp:463
void CalcEdit(const VECTOR2I &aPosition) override
Calculate the attributes of an item at aPosition when it is being edited.
Definition: lib_text.cpp:469
void Plot(PLOTTER *aPlotter, bool aBackground, const VECTOR2I &aOffset, const TRANSFORM &aTransform, bool aDimmed) const override
Plot the draw item using the plot object.
Definition: lib_text.cpp:262
void Offset(const VECTOR2I &aOffset) override
Set the drawing object by aOffset from the current position.
Definition: lib_text.cpp:121
void MirrorVertical(const VECTOR2I &aCenter) override
Mirror the draw object along the MirrorVertical (Y) axis about aCenter point.
Definition: lib_text.cpp:199
Base plotter engine class.
Definition: plotter.h:110
RENDER_SETTINGS * RenderSettings()
Definition: plotter.h:141
virtual void Text(const VECTOR2I &aPos, const COLOR4D &aColor, const wxString &aText, const EDA_ANGLE &aOrient, const VECTOR2I &aSize, enum GR_TEXT_H_ALIGN_T aH_justify, enum GR_TEXT_V_ALIGN_T aV_justify, int aPenWidth, bool aItalic, bool aBold, bool aMultilineAllowed, KIFONT::FONT *aFont, void *aData=nullptr)
Draw text with the plotter.
Definition: plotter.cpp:714
bool GetColorMode() const
Definition: plotter.h:138
for transforming drawing coordinates for a wxDC device context.
Definition: transform.h:47
int y1
Definition: transform.h:50
VECTOR2I TransformCoordinate(const VECTOR2I &aPoint) const
Calculate a new coordinate according to the mirror/rotation transform.
Definition: transform.cpp:41
int x1
Definition: transform.h:49
wxString MessageTextFromValue(double aValue, bool aAddUnitLabel=true, EDA_DATA_TYPE aType=EDA_DATA_TYPE::DISTANCE)
A lower-precision version of StringFromValue().
@ WHITE
Definition: color4d.h:48
The common library.
#define DEFAULT_TEXT_SIZE
Ratio of the font height to the baseline of the text above the wire.
#define _(s)
static constexpr EDA_ANGLE & ANGLE_HORIZONTAL
Definition: eda_angle.h:408
static constexpr EDA_ANGLE & ANGLE_VERTICAL
Definition: eda_angle.h:409
static constexpr EDA_ANGLE & ANGLE_90
Definition: eda_angle.h:414
static constexpr EDA_ANGLE & ANGLE_0
Definition: eda_angle.h:412
TRANSFORM DefaultTransform
Definition: eeschema.cpp:68
bool GetGRForceBlackPenState(void)
Definition: gr_basic.cpp:156
void GRPrintText(wxDC *aDC, const VECTOR2I &aPos, const COLOR4D &aColor, const wxString &aText, const EDA_ANGLE &aOrient, const VECTOR2I &aSize, enum GR_TEXT_H_ALIGN_T aH_justify, enum GR_TEXT_V_ALIGN_T aV_justify, int aWidth, bool aItalic, bool aBold, KIFONT::FONT *aFont)
Print a graphic text through wxDC.
Definition: gr_text.cpp:129
@ LAYER_DEVICE
Definition: layer_ids.h:357
@ LAYER_HIDDEN
Definition: layer_ids.h:380
@ LAYER_PRIVATE_NOTES
Definition: layer_ids.h:359
@ LAYER_SELECTION_SHADOWS
Definition: layer_ids.h:381
Message panel definition file.
wxString EllipsizeMenuText(const wxString &aString)
Ellipsize text (at the end) to be no more than 36 characters.
Definition: ui_common.cpp:203
Plot settings, and plotting engines (PostScript, Gerber, HPGL and DXF)
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, const CPTREE &aTree)
Output a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
Definition: ptree.cpp:200
wxString UnescapeString(const wxString &aSource)
constexpr int MilsToIU(int mils) const
Definition: base_units.h:94
constexpr int delta
@ GR_TEXT_H_ALIGN_CENTER
@ GR_TEXT_H_ALIGN_RIGHT
@ GR_TEXT_H_ALIGN_LEFT
@ GR_TEXT_V_ALIGN_BOTTOM
@ GR_TEXT_V_ALIGN_CENTER
@ GR_TEXT_V_ALIGN_TOP
void RotatePoint(int *pX, int *pY, const EDA_ANGLE &aAngle)
Definition: trigo.cpp:183
@ LIB_TEXT_T
Definition: typeinfo.h:201