KiCad PCB EDA Suite
Loading...
Searching...
No Matches
pcbnew/dialogs/dialog_text_properties.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-2018 Jean-Pierre Charras jp.charras at wanadoo.fr
5 * Copyright The KiCad Developers, see AUTHORS.txt for contributors.
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version 2
10 * of the License, or (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <https://www.gnu.org/licenses/>.
19 */
20
22
23#include <wx/valnum.h>
24#include <wx/hyperlink.h>
25
26#include <bitmaps.h>
28#include <widgets/font_choice.h>
30#include <confirm.h>
31#include <board_commit.h>
32#include <board.h>
33#include <pcb_barcode.h>
34#include <footprint.h>
35#include <pcb_text.h>
36#include <project.h>
37#include <pcb_edit_frame.h>
39#include <scintilla_tricks.h>
40#include <string_utils.h>
41
42
45 m_frame( aParent ),
46 m_item( aText ),
52 m_orientation( aParent, m_OrientLabel, m_OrientCtrl, nullptr )
53{
54 wxString title;
55
56 // Configure display origin transforms
57 if( m_item->GetParentFootprint() )
58 {
59 m_posX.SetCoordType( ORIGIN_TRANSFORMS::REL_X_COORD );
60 m_posY.SetCoordType( ORIGIN_TRANSFORMS::REL_Y_COORD );
61 }
62 else
63 {
64 m_posX.SetCoordType( ORIGIN_TRANSFORMS::ABS_X_COORD );
65 m_posY.SetCoordType( ORIGIN_TRANSFORMS::ABS_Y_COORD );
66 }
67
68 m_MultiLineText->SetEOLMode( wxSTC_EOL_LF );
69
70 // Wrapping is display-only and does not insert newlines into the stored text.
71 m_MultiLineText->SetWrapMode( wxSTC_WRAP_WORD );
72 m_MultiLineText->SetWrapVisualFlags( wxSTC_WRAPVISUALFLAG_END );
73 m_MultiLineText->SetWrapIndentMode( wxSTC_WRAPINDENT_INDENT );
74
75#ifdef _WIN32
76 // Without this setting, on Windows, some esoteric unicode chars create display issue
77 // in a wxStyledTextCtrl.
78 // for SetTechnology() info, see https://www.scintilla.org/ScintillaDoc.html#SCI_SETTECHNOLOGY
79 m_MultiLineText->SetTechnology( wxSTC_TECHNOLOGY_DIRECTWRITE );
80#endif
81
83 m_MultiLineText, wxT( "{}" ), false,
84 // onAcceptFn
85 [this]( wxKeyEvent& aEvent )
86 {
87 wxPostEvent( this, wxCommandEvent( wxEVT_COMMAND_BUTTON_CLICKED, wxID_OK ) );
88 },
89 // onCharFn
90 [this]( wxStyledTextEvent& aEvent )
91 {
92 m_scintillaTricks->DoTextVarAutocomplete(
93 // getTokensFn
94 [this]( const wxString& xRef, wxArrayString* tokens )
95 {
96 m_frame->GetContextualTextVars( m_item, xRef, tokens );
97 } );
98 } );
99
100 // A hack which causes Scintilla to auto-size the text editor canvas
101 // See: https://github.com/jacobslusser/ScintillaNET/issues/216
102 m_MultiLineText->SetScrollWidth( 1 );
103 m_MultiLineText->SetScrollWidthTracking( true );
104
105 // Add syntax help hyperlink
106 m_syntaxHelp = new wxHyperlinkCtrl( this, wxID_ANY, _( "Syntax help" ), wxEmptyString, wxDefaultPosition,
107 wxDefaultSize, wxHL_DEFAULT_STYLE );
108 m_syntaxHelp->SetToolTip( _( "Show syntax help window" ) );
109 m_MultiLineSizer->Add( m_syntaxHelp, 0, wxBOTTOM | wxRIGHT | wxLEFT, 3 );
110
111 m_syntaxHelp->Bind( wxEVT_HYPERLINK, &DIALOG_TEXT_PROPERTIES::onSyntaxHelp, this );
112
113 m_helpWindow = nullptr;
114
115 if( m_item->GetParentFootprint() )
116 {
117 m_PositionXLabel->SetLabel( _( "Offset X:" ) );
118 m_PositionYLabel->SetLabel( _( "Offset Y:" ) );
119
120 if( m_item->Type() == PCB_FIELD_T )
121 {
122 PCB_FIELD* field = static_cast<PCB_FIELD*>( m_item );
123
124 if( field->IsReference() )
125 {
126 title = _( "Footprint Reference Properties" );
127 m_TextLabel->SetLabel( _( "Reference:" ) );
128 }
129 else if( field->IsValue() )
130 {
131 title = _( "Footprint Value Properties" );
132 m_TextLabel->SetLabel( _( "Value:" ) );
133 }
134 else
135 {
136 title = _( "Footprint Field Properties" );
137 m_TextLabel->SetLabel( _( "Text:" ) );
138 }
139 }
140 else
141 {
142 title = _( "Footprint Text Properties" );
143 m_TextLabel->SetLabel( _( "Text:" ) );
144 m_Visible->Show( false );
145 }
146
148 m_MultiLineSizer->Show( false );
149
150 // Do not allow locking items in the footprint editor
151 if( m_frame->IsType( FRAME_FOOTPRINT_EDITOR ) )
152 m_cbLocked->Show( false );
153
157 }
158 else
159 {
160 title = _( "Text Properties" );
161
163 m_SingleLineSizer->Show( false );
164
165 m_Visible->Show( false );
166 m_KeepUpright->Show( false );
167 m_statusLine->Show( false );
168
172 }
173
174 m_bold->SetIsCheckButton();
176 m_italic->SetIsCheckButton();
178
179 m_separator1->SetIsSeparator();
180
181 m_alignLeft->SetIsRadioButton();
183 m_alignCenter->SetIsRadioButton();
185 m_alignRight->SetIsRadioButton();
187
188 m_separator2->SetIsSeparator();
189
190 m_valignBottom->SetIsRadioButton();
192 m_valignCenter->SetIsRadioButton();
194 m_valignTop->SetIsRadioButton();
196
197 m_separator3->SetIsSeparator();
198
199 m_mirrored->SetIsCheckButton();
201
202 m_autoTextThickness->SetIsCheckButton();
204
205 SetTitle( title );
206 m_hash_key = title;
207
208 // Configure the layers list selector. Note that footprints are built outside the current
209 // board and so we may need to show all layers if the text is on an unactivated layer.
210 if( !m_frame->GetBoard()->IsLayerEnabled( m_item->GetLayer() ) )
211 m_LayerSelectionCtrl->ShowNonActivatedLayers( true );
212
213 m_LayerSelectionCtrl->SetLayersHotkeys( false );
214 m_LayerSelectionCtrl->SetBoardFrame( m_frame );
215 m_LayerSelectionCtrl->Resync();
216
218 m_orientation.SetPrecision( 3 );
219
220 // Set predefined rotations in combo dropdown, according to the locale floating point
221 // separator notation
222 double rot_list[] = { 0.0, 90.0, -90.0, 180.0 };
223
224 for( size_t ii = 0; ii < m_OrientCtrl->GetCount() && ii < 4; ++ii )
225 m_OrientCtrl->SetString( ii, wxString::Format( wxT( "%.1f" ), rot_list[ii] ) );
226
227 // Set font sizes
228 m_statusLine->SetFont( KIUI::GetInfoFont( this ) );
229
231
232 // wxTextCtrls fail to generate wxEVT_CHAR events when the wxTE_MULTILINE flag is set,
233 // so we have to listen to wxEVT_CHAR_HOOK events instead.
234 Connect( wxEVT_CHAR_HOOK, wxKeyEventHandler( DIALOG_TEXT_PROPERTIES::OnCharHook ), nullptr, this );
235
237}
238
239
241{
242 Disconnect( wxEVT_CHAR_HOOK, wxKeyEventHandler( DIALOG_TEXT_PROPERTIES::OnCharHook ), nullptr, this );
243
244 delete m_scintillaTricks;
245 m_scintillaTricks = nullptr;
246
247 if( m_helpWindow )
248 m_helpWindow->Destroy();
249}
250
251
253{
254 DIALOG_TEXT_PROPERTIES dlg( this, aText );
255
256 // QuasiModal required for Scintilla auto-complete
257 dlg.ShowQuasiModal();
258}
259
260
261void DIALOG_TEXT_PROPERTIES::OnSetFocusText( wxFocusEvent& event )
262{
263 if( m_item->Type() == PCB_FIELD_T && static_cast<PCB_FIELD*>( m_item )->IsReference() )
264 {
265#ifdef __WXGTK__
266 // Force an update of the text control before setting the text selection
267 // This is needed because GTK seems to ignore the selection on first update
268 //
269 // Note that we can't do this on OSX as it tends to provoke Apple's
270 // "[NSAlert runModal] may not be invoked inside of transaction begin/commit pair"
271 // bug. See: https://bugs.launchpad.net/kicad/+bug/1837225
272 m_SingleLineText->Update();
273#endif
274 KIUI::SelectReferenceNumber( static_cast<wxTextEntry*>( m_SingleLineText ) );
275 }
276 else
277 m_SingleLineText->SetSelection( -1, -1 );
278
279 event.Skip();
280}
281
282
284{
285 BOARD* board = m_frame->GetBoard();
286 FOOTPRINT* parentFP = m_item->GetParentFootprint();
287 wxString text = m_item->GetText();
288
289 // show text variable cross-references in a human-readable format
291
292 if( m_SingleLineText->IsShown() )
293 {
294 m_SingleLineText->SetValue( text );
295
296 if( m_item->Type() == PCB_FIELD_T && static_cast<PCB_FIELD*>( m_item )->IsReference() )
297 KIUI::SelectReferenceNumber( static_cast<wxTextEntry*>( m_SingleLineText ) );
298 else
299 m_SingleLineText->SetSelection( -1, -1 );
300 }
301 else if( m_MultiLineText->IsShown() )
302 {
303 m_MultiLineText->SetValue( text );
304 m_MultiLineText->SetSelection( -1, -1 );
305 m_MultiLineText->EmptyUndoBuffer();
306 }
307
308 if( parentFP )
309 {
310 m_statusLine->SetLabel( wxString::Format(
311 _( "Footprint %s (%s), %s, rotated %.1f deg" ), parentFP->GetReference(), parentFP->GetValue(),
312 parentFP->IsFlipped() ? _( "back side (mirrored)" ) : _( "front side" ),
313 parentFP->GetOrientation().AsDegrees() ) );
314 }
315 else
316 {
317 m_statusLine->Show( false );
318 }
319
320 m_cbLocked->SetValue( m_item->IsLocked() );
321
322 m_LayerSelectionCtrl->SetLayerSelection( m_item->GetLayer() );
323 m_cbKnockout->SetValue( m_item->IsKnockout() );
324
325 m_fontCtrl->SetFontSelection( m_item->GetFont() );
326
327 m_textWidth.SetValue( m_item->GetTextSize().x );
328 m_textHeight.SetValue( m_item->GetTextSize().y );
329
330 if( m_item->GetAutoThickness() )
331 {
332 // Show the base width (frozen if auto is unchecked); Bold scales it at render time.
333 // Must match EDA_TEXT::SetAutoThickness()'s formula so unchecking auto doesn't
334 // silently change the stored width.
335 m_autoTextThickness->Check( m_item->GetAutoThickness() );
336 m_thickness.SetValue( GetPenSizeForNormal( m_item->GetTextWidth() ) );
337 m_thickness.Enable( false );
338 }
339 else
340 {
341 m_thickness.SetValue( m_item->GetTextThickness() );
342 }
343
344 m_posX.SetValue( m_item->GetFPRelativePosition().x );
345 m_posY.SetValue( m_item->GetFPRelativePosition().y );
346
347 if( m_Visible->IsShown() )
348 m_Visible->SetValue( m_item->IsVisible() );
349
350 if( m_KeepUpright->IsShown() )
351 m_KeepUpright->SetValue( m_item->IsKeepUpright() );
352
353 m_bold->Check( m_item->IsBold() );
354 m_italic->Check( m_item->IsItalic() );
355
356 switch( m_item->GetHorizJustify() )
357 {
358 case GR_TEXT_H_ALIGN_LEFT: m_alignLeft->Check( true ); break;
359 case GR_TEXT_H_ALIGN_CENTER: m_alignCenter->Check( true ); break;
360 case GR_TEXT_H_ALIGN_RIGHT: m_alignRight->Check( true ); break;
362 }
363
364 switch( m_item->GetVertJustify() )
365 {
366 case GR_TEXT_V_ALIGN_BOTTOM: m_valignBottom->Check( true ); break;
367 case GR_TEXT_V_ALIGN_CENTER: m_valignCenter->Check( true ); break;
368 case GR_TEXT_V_ALIGN_TOP: m_valignTop->Check( true ); break;
370 }
371
372 m_mirrored->Check( m_item->IsMirrored() );
373
374 EDA_ANGLE orientation = m_item->GetTextAngle();
375 m_orientation.SetAngleValue( orientation.Normalize180() );
376
377 return DIALOG_TEXT_PROPERTIES_BASE::TransferDataToWindow();
378}
379
380
381void DIALOG_TEXT_PROPERTIES::onFontSelected( wxCommandEvent& aEvent )
382{
383 bool stroke = KIFONT::FONT::IsStroke( aEvent.GetString() );
384
385 m_thickness.Show( stroke );
386 m_autoTextThickness->Show( stroke );
387}
388
389
390void DIALOG_TEXT_PROPERTIES::onAlignButton( wxCommandEvent& aEvent )
391{
393 {
394 if( btn->IsChecked() && btn != aEvent.GetEventObject() )
395 btn->Check( false );
396 }
397}
398
399
400void DIALOG_TEXT_PROPERTIES::onValignButton( wxCommandEvent& aEvent )
401{
403 {
404 if( btn->IsChecked() && btn != aEvent.GetEventObject() )
405 btn->Check( false );
406 }
407}
408
409
410void DIALOG_TEXT_PROPERTIES::onTextSize( wxCommandEvent& aEvent )
411{
412 if( m_autoTextThickness->IsChecked() )
413 m_thickness.SetValue( GetPenSizeForNormal( m_textWidth.GetValue() ) );
414}
415
416
418{
419 if( aEvent.IsChecked() )
420 {
421 m_autoTextThickness->Check( true );
422
423 wxCommandEvent dummy;
424 onTextSize( dummy );
425
426 m_thickness.Enable( false );
427 }
428 else
429 {
430 m_thickness.Enable( true );
431 }
432}
433
434
436{
437 if( !DIALOG_TEXT_PROPERTIES_BASE::TransferDataFromWindow() )
438 return false;
439
440 int minSize = pcbIUScale.mmToIU( TEXT_MIN_SIZE_MM );
441 int maxSize = pcbIUScale.mmToIU( TEXT_MAX_SIZE_MM );
442
443 if( !m_textWidth.Validate( minSize, maxSize ) || !m_textHeight.Validate( minSize, maxSize ) )
444 return false;
445
446 BOARD* board = m_frame->GetBoard();
447 BOARD_COMMIT commit( m_frame );
448 commit.Modify( m_item );
449
450 // If no other command in progress, prepare undo command
451 // (for a command in progress, will be made later, at the completion of command)
452 bool pushCommit = ( m_item->GetEditFlags() == 0 );
453
454 // Set IN_EDIT flag to force undo/redo/abort proper operation and avoid new calls to
455 // SaveCopyInUndoList for the same text if is moved, and then rotated, edited, etc....
456 if( !pushCommit )
458
459 // Set the new text content
460 if( m_SingleLineText->IsShown() )
461 {
462 if( !m_SingleLineText->GetValue().IsEmpty() )
463 {
464 // convert any text variable cross-references to their UUIDs
465 wxString txt = board->ConvertCrossReferencesToKIIDs( m_SingleLineText->GetValue() );
466
467 m_item->SetText( txt );
468 }
469 }
470 else if( m_MultiLineText->IsShown() )
471 {
472 if( !m_MultiLineText->GetValue().IsEmpty() )
473 {
474 // convert any text variable cross-references to their UUIDs
475 wxString txt = board->ConvertCrossReferencesToKIIDs( m_MultiLineText->GetValue() );
476
477#ifdef __WXMAC__
478 // On macOS CTRL+Enter produces '\r' instead of '\n' regardless of EOL setting.
479 // Replace it now.
480 txt.Replace( wxT( "\r" ), wxT( "\n" ) );
481#elif defined( __WINDOWS__ )
482 // On Windows, a new line is coded as \r\n. We use only \n in kicad files and in
483 // drawing routines so strip the \r char.
484 txt.Replace( wxT( "\r" ), wxT( "" ) );
485#endif
486 m_item->SetText( EscapeString( txt, CTX_QUOTED_STR ) );
487 }
488 }
489
490 m_item->SetLocked( m_cbLocked->GetValue() );
491
492 m_item->SetLayer( ToLAYER_ID( m_LayerSelectionCtrl->GetLayerSelection() ) );
493 m_item->SetIsKnockout( m_cbKnockout->GetValue() );
494
495 if( m_fontCtrl->HaveFontSelection() )
496 {
497 m_item->SetFont( m_fontCtrl->GetFontSelection( m_bold->IsChecked(), m_italic->IsChecked() ) );
498 }
499
500 m_item->SetTextSize( VECTOR2I( m_textWidth.GetValue(), m_textHeight.GetValue() ) );
501
502 if( m_autoTextThickness->IsChecked() )
503 {
504 m_item->SetAutoThickness( true );
505 }
506 else
507 {
508 m_item->SetTextThickness( m_thickness.GetValue() );
509
510 // Test for acceptable values for thickness and size and clamp if fails
511 int maxPenWidth = ClampTextPenSize( m_item->GetTextThickness(), m_item->GetTextSize() );
512
513 if( m_item->GetTextThickness() > maxPenWidth )
514 {
515 DisplayError( this, _( "The text thickness is too large for the text size.\n"
516 "It will be clamped." ) );
517 m_item->SetTextThickness( maxPenWidth );
518 }
519 }
520
521 m_item->SetFPRelativePosition( VECTOR2I( m_posX.GetValue(), m_posY.GetValue() ) );
522 m_item->SetTextAngle( m_orientation.GetAngleValue().Normalize() );
523
524 if( m_Visible->IsShown() )
525 m_item->SetVisible( m_Visible->GetValue() );
526
527 if( m_KeepUpright->IsShown() )
528 m_item->SetKeepUpright( m_KeepUpright->GetValue() );
529
530 m_item->SetBoldFlag( m_bold->IsChecked() );
531 m_item->SetItalicFlag( m_italic->IsChecked() );
532
533 if( m_alignLeft->IsChecked() )
534 m_item->SetHorizJustify( GR_TEXT_H_ALIGN_LEFT );
535 else if( m_alignCenter->IsChecked() )
536 m_item->SetHorizJustify( GR_TEXT_H_ALIGN_CENTER );
537 else
538 m_item->SetHorizJustify( GR_TEXT_H_ALIGN_RIGHT );
539
540 if( m_valignBottom->IsChecked() )
541 m_item->SetVertJustify( GR_TEXT_V_ALIGN_BOTTOM );
542 else if( m_valignCenter->IsChecked() )
543 m_item->SetVertJustify( GR_TEXT_V_ALIGN_CENTER );
544 else
545 m_item->SetVertJustify( GR_TEXT_V_ALIGN_TOP );
546
547 m_item->SetMirrored( m_mirrored->IsChecked() );
548
549 if( pushCommit )
550 commit.Push( _( "Edit Text Properties" ) );
551
552 return true;
553}
554
555
556void DIALOG_TEXT_PROPERTIES::onMultiLineTCLostFocus( wxFocusEvent& event )
557{
559 m_scintillaTricks->CancelAutocomplete();
560
561 event.Skip();
562}
563
564
565void DIALOG_TEXT_PROPERTIES::onSyntaxHelp( wxHyperlinkEvent& aEvent )
566{
568}
constexpr EDA_IU_SCALE pcbIUScale
Definition base_units.h:128
wxBitmapBundle KiBitmapBundle(BITMAPS aBitmap, int aMinHeight)
Definition bitmap.cpp:106
@ text_align_right
@ text_valign_top
@ text_align_left
@ text_valign_center
@ text_align_center
@ text_valign_bottom
A bitmap button widget that behaves like an AUI toolbar item's button when it is drawn.
FOOTPRINT * GetParentFootprint() const
Information pertinent to a Pcbnew printed circuit board.
Definition board.h:411
wxString ConvertCrossReferencesToKIIDs(const wxString &aSource) const
Convert cross-references back and forth between ${refDes:field} and ${kiid:field}.
Definition board.cpp:2368
wxString ConvertKIIDsToCrossReferences(const wxString &aSource) const
Definition board.cpp:2448
std::vector< wxWindow * > m_tabOrder
void SetInitialFocus(wxWindow *aWindow)
Sets the window (usually a wxTextCtrl) that should be focused when the dialog is shown.
Definition dialog_shim.h:94
void SetupStandardButtons(std::map< int, wxString > aLabels={})
std::string m_hash_key
void finishDialogSettings()
In all dialogs, we must call the same functions to fix minimal dlg size, the default position and per...
virtual void OnCharHook(wxKeyEvent &aEvt)
DIALOG_TEXT_PROPERTIES_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Text Properties"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
virtual 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 onSyntaxHelp(wxHyperlinkEvent &aEvent)
void onAutoTextThickness(wxCommandEvent &aEvent) override
void onMultiLineTCLostFocus(wxFocusEvent &event) override
void onTextSize(wxCommandEvent &aEvent) override
void onFontSelected(wxCommandEvent &aEvent) override
DIALOG_TEXT_PROPERTIES(SCH_BASE_FRAME *parent, SCH_ITEM *aTextItem)
void onValignButton(wxCommandEvent &aEvent) override
void onAlignButton(wxCommandEvent &aEvent) override
double AsDegrees() const
Definition eda_angle.h:115
EDA_ANGLE Normalize180()
Definition eda_angle.h:273
EDA_ITEM_FLAGS GetEditFlags() const
Definition eda_item.h:170
void SetFlags(EDA_ITEM_FLAGS aMask)
Definition eda_item.h:158
KICAD_T Type() const
Returns the type of object.
Definition eda_item.h:110
virtual const wxString & GetText() const
Return the string associated with the text object.
Definition eda_text.h:118
virtual void SetText(const wxString &aText)
Definition eda_text.cpp:236
EDA_ANGLE GetOrientation() const
Definition footprint.h:382
bool IsFlipped() const
Definition footprint.h:620
const wxString & GetValue() const
Definition footprint.h:817
const wxString & GetReference() const
Definition footprint.h:793
virtual bool IsStroke() const
Definition font.h:101
Common, abstract interface for edit frames.
bool IsReference() const
Definition pcb_field.h:76
bool IsValue() const
Definition pcb_field.h:77
static HTML_MESSAGE_BOX * ShowSyntaxHelp(wxWindow *aParentWindow)
Display a syntax help window for text variables and expressions.
Definition pcb_text.cpp:899
Add cut/copy/paste, dark theme, autocomplete and brace highlighting to a wxStyleTextCtrl instance.
virtual bool Validate(double aMin, double aMax, EDA_UNITS aUnits=EDA_UNITS::UNSCALED)
Validate the control against the given range, informing the user of any errors found.
void DisplayError(wxWindow *aParent, const wxString &aText)
Display an error or warning message box with aMessage.
Definition confirm.cpp:192
This file is part of the common library.
const int minSize
Push and Shove router track width and via size dialog.
#define _(s)
#define IN_EDIT
Item currently edited.
#define TEXT_MIN_SIZE_MM
Minimum text size (1 micron).
Definition eda_text.h:61
#define TEXT_MAX_SIZE_MM
Maximum text size in mm (~10 inches)
Definition eda_text.h:62
@ FRAME_FOOTPRINT_EDITOR
Definition frame_type.h:39
int GetPenSizeForNormal(int aTextSize)
Definition gr_text.cpp:58
int ClampTextPenSize(int aPenSize, int aSize, bool aStrict)
Pen width should not allow characters to become cluttered up in their own fatness.
Definition gr_text.cpp:70
PCB_LAYER_ID ToLAYER_ID(int aLayer)
Definition lset.cpp:750
KICOMMON_API wxFont GetInfoFont(wxWindow *aWindow)
KICOMMON_API void SelectReferenceNumber(wxTextEntry *aTextEntry)
Select the number (or "?") in a reference for ease of editing.
BARCODE class definition.
std::vector< FAB_LAYER_COLOR > dummy
wxString UnescapeString(const wxString &aSource)
wxString EscapeString(const wxString &aSource, ESCAPE_CONTEXT aContext)
The Escape/Unescape routines use HTML-entity-reference-style encoding to handle characters which are:...
@ CTX_QUOTED_STR
@ GR_TEXT_H_ALIGN_CENTER
@ GR_TEXT_H_ALIGN_RIGHT
@ GR_TEXT_H_ALIGN_LEFT
@ GR_TEXT_H_ALIGN_INDETERMINATE
@ GR_TEXT_V_ALIGN_BOTTOM
@ GR_TEXT_V_ALIGN_INDETERMINATE
@ GR_TEXT_V_ALIGN_CENTER
@ GR_TEXT_V_ALIGN_TOP
@ PCB_FIELD_T
class PCB_FIELD, text associated with a footprint property
Definition typeinfo.h:82
VECTOR2< int32_t > VECTOR2I
Definition vector2d.h:708