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
27#include <widgets/font_choice.h>
29#include <confirm.h>
30#include <board_commit.h>
31#include <board.h>
32#include <pcb_barcode.h>
33#include <footprint.h>
34#include <pcb_text.h>
35#include <project.h>
36#include <pcb_edit_frame.h>
38#include <scintilla_tricks.h>
39#include <string_utils.h>
40
41
44 m_frame( aParent ),
45 m_item( aText ),
51 m_orientation( aParent, m_OrientLabel, m_OrientCtrl, nullptr )
52{
53 wxString title;
54
55 // Configure display origin transforms
56 if( m_item->GetParentFootprint() )
57 {
58 m_posX.SetCoordType( ORIGIN_TRANSFORMS::REL_X_COORD );
59 m_posY.SetCoordType( ORIGIN_TRANSFORMS::REL_Y_COORD );
60 }
61 else
62 {
63 m_posX.SetCoordType( ORIGIN_TRANSFORMS::ABS_X_COORD );
64 m_posY.SetCoordType( ORIGIN_TRANSFORMS::ABS_Y_COORD );
65 }
66
67 m_MultiLineText->SetEOLMode( wxSTC_EOL_LF );
68
69 // Wrapping is display-only and does not insert newlines into the stored text.
70 m_MultiLineText->SetWrapMode( wxSTC_WRAP_WORD );
71 m_MultiLineText->SetWrapVisualFlags( wxSTC_WRAPVISUALFLAG_END );
72 m_MultiLineText->SetWrapIndentMode( wxSTC_WRAPINDENT_INDENT );
73
74#ifdef _WIN32
75 // Without this setting, on Windows, some esoteric unicode chars create display issue
76 // in a wxStyledTextCtrl.
77 // for SetTechnology() info, see https://www.scintilla.org/ScintillaDoc.html#SCI_SETTECHNOLOGY
78 m_MultiLineText->SetTechnology( wxSTC_TECHNOLOGY_DIRECTWRITE );
79#endif
80
82 m_MultiLineText, wxT( "{}" ), false,
83 // onAcceptFn
84 [this]( wxKeyEvent& aEvent )
85 {
86 wxPostEvent( this, wxCommandEvent( wxEVT_COMMAND_BUTTON_CLICKED, wxID_OK ) );
87 },
88 // onCharFn
89 [this]( wxStyledTextEvent& aEvent )
90 {
91 m_scintillaTricks->DoTextVarAutocomplete(
92 // getTokensFn
93 [this]( const wxString& xRef, wxArrayString* tokens )
94 {
95 m_frame->GetContextualTextVars( m_item, xRef, tokens );
96 } );
97 } );
98
99 // A hack which causes Scintilla to auto-size the text editor canvas
100 // See: https://github.com/jacobslusser/ScintillaNET/issues/216
101 m_MultiLineText->SetScrollWidth( 1 );
102 m_MultiLineText->SetScrollWidthTracking( true );
103
104 // Add syntax help hyperlink
105 m_syntaxHelp = new wxHyperlinkCtrl( this, wxID_ANY, _( "Syntax help" ), wxEmptyString, wxDefaultPosition,
106 wxDefaultSize, wxHL_DEFAULT_STYLE );
107 m_syntaxHelp->SetToolTip( _( "Show syntax help window" ) );
108 m_MultiLineSizer->Add( m_syntaxHelp, 0, wxBOTTOM | wxRIGHT | wxLEFT, 3 );
109
110 m_syntaxHelp->Bind( wxEVT_HYPERLINK, &DIALOG_TEXT_PROPERTIES::onSyntaxHelp, this );
111
112 m_helpWindow = nullptr;
113
114 if( m_item->GetParentFootprint() )
115 {
116 m_PositionXLabel->SetLabel( _( "Offset X:" ) );
117 m_PositionYLabel->SetLabel( _( "Offset Y:" ) );
118
119 if( m_item->Type() == PCB_FIELD_T )
120 {
121 PCB_FIELD* field = static_cast<PCB_FIELD*>( m_item );
122
123 if( field->IsReference() )
124 {
125 title = _( "Footprint Reference Properties" );
126 m_TextLabel->SetLabel( _( "Reference:" ) );
127 }
128 else if( field->IsValue() )
129 {
130 title = _( "Footprint Value Properties" );
131 m_TextLabel->SetLabel( _( "Value:" ) );
132 }
133 else
134 {
135 title = _( "Footprint Field Properties" );
136 m_TextLabel->SetLabel( _( "Text:" ) );
137 }
138 }
139 else
140 {
141 title = _( "Footprint Text Properties" );
142 m_TextLabel->SetLabel( _( "Text:" ) );
143 m_Visible->Show( false );
144 }
145
147 m_MultiLineSizer->Show( false );
148
149 // Do not allow locking items in the footprint editor
150 if( m_frame->IsType( FRAME_FOOTPRINT_EDITOR ) )
151 m_cbLocked->Show( false );
152
156 }
157 else
158 {
159 title = _( "Text Properties" );
160
162 m_SingleLineSizer->Show( false );
163
164 m_Visible->Show( false );
165 m_KeepUpright->Show( false );
166 m_statusLine->Show( false );
167
171 }
172
173 m_bold->SetIsCheckButton();
175 m_italic->SetIsCheckButton();
177
178 m_separator1->SetIsSeparator();
179
180 m_alignLeft->SetIsRadioButton();
182 m_alignCenter->SetIsRadioButton();
184 m_alignRight->SetIsRadioButton();
186
187 m_separator2->SetIsSeparator();
188
189 m_valignBottom->SetIsRadioButton();
191 m_valignCenter->SetIsRadioButton();
193 m_valignTop->SetIsRadioButton();
195
196 m_separator3->SetIsSeparator();
197
198 m_mirrored->SetIsCheckButton();
200
201 m_autoTextThickness->SetIsCheckButton();
203
204 SetTitle( title );
205 m_hash_key = title;
206
207 // Configure the layers list selector. Note that footprints are built outside the current
208 // board and so we may need to show all layers if the text is on an unactivated layer.
209 if( !m_frame->GetBoard()->IsLayerEnabled( m_item->GetLayer() ) )
210 m_LayerSelectionCtrl->ShowNonActivatedLayers( true );
211
212 m_LayerSelectionCtrl->SetLayersHotkeys( false );
213 m_LayerSelectionCtrl->SetBoardFrame( m_frame );
214 m_LayerSelectionCtrl->Resync();
215
217 m_orientation.SetPrecision( 3 );
218
219 // Set predefined rotations in combo dropdown, according to the locale floating point
220 // separator notation
221 double rot_list[] = { 0.0, 90.0, -90.0, 180.0 };
222
223 for( size_t ii = 0; ii < m_OrientCtrl->GetCount() && ii < 4; ++ii )
224 m_OrientCtrl->SetString( ii, wxString::Format( wxT( "%.1f" ), rot_list[ii] ) );
225
226 // Set font sizes
227 m_statusLine->SetFont( KIUI::GetInfoFont( this ) );
228
230
231 // wxTextCtrls fail to generate wxEVT_CHAR events when the wxTE_MULTILINE flag is set,
232 // so we have to listen to wxEVT_CHAR_HOOK events instead.
233 Connect( wxEVT_CHAR_HOOK, wxKeyEventHandler( DIALOG_TEXT_PROPERTIES::OnCharHook ), nullptr, this );
234
236}
237
238
240{
241 Disconnect( wxEVT_CHAR_HOOK, wxKeyEventHandler( DIALOG_TEXT_PROPERTIES::OnCharHook ), nullptr, this );
242
243 delete m_scintillaTricks;
244 m_scintillaTricks = nullptr;
245
246 if( m_helpWindow )
247 m_helpWindow->Destroy();
248}
249
250
252{
253 DIALOG_TEXT_PROPERTIES dlg( this, aText );
254
255 // QuasiModal required for Scintilla auto-complete
256 dlg.ShowQuasiModal();
257}
258
259
260void DIALOG_TEXT_PROPERTIES::OnSetFocusText( wxFocusEvent& event )
261{
262 if( m_item->Type() == PCB_FIELD_T && static_cast<PCB_FIELD*>( m_item )->IsReference() )
263 {
264#ifdef __WXGTK__
265 // Force an update of the text control before setting the text selection
266 // This is needed because GTK seems to ignore the selection on first update
267 //
268 // Note that we can't do this on OSX as it tends to provoke Apple's
269 // "[NSAlert runModal] may not be invoked inside of transaction begin/commit pair"
270 // bug. See: https://bugs.launchpad.net/kicad/+bug/1837225
271 m_SingleLineText->Update();
272#endif
273 KIUI::SelectReferenceNumber( static_cast<wxTextEntry*>( m_SingleLineText ) );
274 }
275 else
276 m_SingleLineText->SetSelection( -1, -1 );
277
278 event.Skip();
279}
280
281
283{
284 BOARD* board = m_frame->GetBoard();
285 FOOTPRINT* parentFP = m_item->GetParentFootprint();
286 wxString text = m_item->GetText();
287
288 // show text variable cross-references in a human-readable format
290
291 if( m_SingleLineText->IsShown() )
292 {
293 m_SingleLineText->SetValue( text );
294
295 if( m_item->Type() == PCB_FIELD_T && static_cast<PCB_FIELD*>( m_item )->IsReference() )
296 KIUI::SelectReferenceNumber( static_cast<wxTextEntry*>( m_SingleLineText ) );
297 else
298 m_SingleLineText->SetSelection( -1, -1 );
299 }
300 else if( m_MultiLineText->IsShown() )
301 {
302 m_MultiLineText->SetValue( text );
303 m_MultiLineText->SetSelection( -1, -1 );
304 m_MultiLineText->EmptyUndoBuffer();
305 }
306
307 if( parentFP )
308 {
309 m_statusLine->SetLabel( wxString::Format(
310 _( "Footprint %s (%s), %s, rotated %.1f deg" ), parentFP->GetReference(), parentFP->GetValue(),
311 parentFP->IsFlipped() ? _( "back side (mirrored)" ) : _( "front side" ),
312 parentFP->GetOrientation().AsDegrees() ) );
313 }
314 else
315 {
316 m_statusLine->Show( false );
317 }
318
319 m_cbLocked->SetValue( m_item->IsLocked() );
320
321 m_LayerSelectionCtrl->SetLayerSelection( m_item->GetLayer() );
322 m_cbKnockout->SetValue( m_item->IsKnockout() );
323
324 m_fontCtrl->SetFontSelection( m_item->GetFont() );
325
326 m_textWidth.SetValue( m_item->GetTextSize().x );
327 m_textHeight.SetValue( m_item->GetTextSize().y );
328
329 if( m_item->GetAutoThickness() )
330 {
331 // Show the base width (frozen if auto is unchecked); Bold scales it at render time.
332 // Must match EDA_TEXT::SetAutoThickness()'s formula so unchecking auto doesn't
333 // silently change the stored width.
334 m_autoTextThickness->Check( m_item->GetAutoThickness() );
335 m_thickness.SetValue( GetPenSizeForNormal( m_item->GetTextWidth() ) );
336 m_thickness.Enable( false );
337 }
338 else
339 {
340 m_thickness.SetValue( m_item->GetTextThickness() );
341 }
342
343 m_posX.SetValue( m_item->GetFPRelativePosition().x );
344 m_posY.SetValue( m_item->GetFPRelativePosition().y );
345
346 if( m_Visible->IsShown() )
347 m_Visible->SetValue( m_item->IsVisible() );
348
349 if( m_KeepUpright->IsShown() )
350 m_KeepUpright->SetValue( m_item->IsKeepUpright() );
351
352 m_bold->Check( m_item->IsBold() );
353 m_italic->Check( m_item->IsItalic() );
354
355 switch( m_item->GetHorizJustify() )
356 {
357 case GR_TEXT_H_ALIGN_LEFT: m_alignLeft->Check( true ); break;
358 case GR_TEXT_H_ALIGN_CENTER: m_alignCenter->Check( true ); break;
359 case GR_TEXT_H_ALIGN_RIGHT: m_alignRight->Check( true ); break;
361 }
362
363 switch( m_item->GetVertJustify() )
364 {
365 case GR_TEXT_V_ALIGN_BOTTOM: m_valignBottom->Check( true ); break;
366 case GR_TEXT_V_ALIGN_CENTER: m_valignCenter->Check( true ); break;
367 case GR_TEXT_V_ALIGN_TOP: m_valignTop->Check( true ); break;
369 }
370
371 m_mirrored->Check( m_item->IsMirrored() );
372
373 EDA_ANGLE orientation = m_item->GetTextAngle();
374 m_orientation.SetAngleValue( orientation.Normalize180() );
375
376 return DIALOG_TEXT_PROPERTIES_BASE::TransferDataToWindow();
377}
378
379
380void DIALOG_TEXT_PROPERTIES::onFontSelected( wxCommandEvent& aEvent )
381{
382 bool stroke = KIFONT::FONT::IsStroke( aEvent.GetString() );
383
384 m_thickness.Show( stroke );
385 m_autoTextThickness->Show( stroke );
386}
387
388
389void DIALOG_TEXT_PROPERTIES::onAlignButton( wxCommandEvent& aEvent )
390{
392 {
393 if( btn->IsChecked() && btn != aEvent.GetEventObject() )
394 btn->Check( false );
395 }
396}
397
398
399void DIALOG_TEXT_PROPERTIES::onValignButton( wxCommandEvent& aEvent )
400{
402 {
403 if( btn->IsChecked() && btn != aEvent.GetEventObject() )
404 btn->Check( false );
405 }
406}
407
408
409void DIALOG_TEXT_PROPERTIES::onTextSize( wxCommandEvent& aEvent )
410{
411 if( m_autoTextThickness->IsChecked() )
412 m_thickness.SetValue( GetPenSizeForNormal( m_textWidth.GetValue() ) );
413}
414
415
417{
418 if( aEvent.IsChecked() )
419 {
420 m_autoTextThickness->Check( true );
421
422 wxCommandEvent dummy;
423 onTextSize( dummy );
424
425 m_thickness.Enable( false );
426 }
427 else
428 {
429 m_thickness.Enable( true );
430 }
431}
432
433
435{
436 if( !DIALOG_TEXT_PROPERTIES_BASE::TransferDataFromWindow() )
437 return false;
438
439 int minSize = pcbIUScale.mmToIU( TEXT_MIN_SIZE_MM );
440 int maxSize = pcbIUScale.mmToIU( TEXT_MAX_SIZE_MM );
441
442 if( !m_textWidth.Validate( minSize, maxSize ) || !m_textHeight.Validate( minSize, maxSize ) )
443 return false;
444
445 BOARD* board = m_frame->GetBoard();
446 BOARD_COMMIT commit( m_frame );
447 commit.Modify( m_item );
448
449 // If no other command in progress, prepare undo command
450 // (for a command in progress, will be made later, at the completion of command)
451 bool pushCommit = ( m_item->GetEditFlags() == 0 );
452
453 // Set IN_EDIT flag to force undo/redo/abort proper operation and avoid new calls to
454 // SaveCopyInUndoList for the same text if is moved, and then rotated, edited, etc....
455 if( !pushCommit )
457
458 // Set the new text content
459 if( m_SingleLineText->IsShown() )
460 {
461 if( !m_SingleLineText->GetValue().IsEmpty() )
462 {
463 // convert any text variable cross-references to their UUIDs
464 wxString txt = board->ConvertCrossReferencesToKIIDs( m_SingleLineText->GetValue() );
465
466 m_item->SetText( txt );
467 }
468 }
469 else if( m_MultiLineText->IsShown() )
470 {
471 if( !m_MultiLineText->GetValue().IsEmpty() )
472 {
473 // convert any text variable cross-references to their UUIDs
474 wxString txt = board->ConvertCrossReferencesToKIIDs( m_MultiLineText->GetValue() );
475
476#ifdef __WXMAC__
477 // On macOS CTRL+Enter produces '\r' instead of '\n' regardless of EOL setting.
478 // Replace it now.
479 txt.Replace( wxT( "\r" ), wxT( "\n" ) );
480#elif defined( __WINDOWS__ )
481 // On Windows, a new line is coded as \r\n. We use only \n in kicad files and in
482 // drawing routines so strip the \r char.
483 txt.Replace( wxT( "\r" ), wxT( "" ) );
484#endif
485 m_item->SetText( EscapeString( txt, CTX_QUOTED_STR ) );
486 }
487 }
488
489 m_item->SetLocked( m_cbLocked->GetValue() );
490
491 m_item->SetLayer( ToLAYER_ID( m_LayerSelectionCtrl->GetLayerSelection() ) );
492 m_item->SetIsKnockout( m_cbKnockout->GetValue() );
493
494 if( m_fontCtrl->HaveFontSelection() )
495 {
496 m_item->SetFont( m_fontCtrl->GetFontSelection( m_bold->IsChecked(), m_italic->IsChecked() ) );
497 }
498
499 m_item->SetTextSize( VECTOR2I( m_textWidth.GetValue(), m_textHeight.GetValue() ) );
500
501 if( m_autoTextThickness->IsChecked() )
502 {
503 m_item->SetAutoThickness( true );
504 }
505 else
506 {
507 m_item->SetTextThickness( m_thickness.GetValue() );
508
509 // Test for acceptable values for thickness and size and clamp if fails
510 int maxPenWidth = ClampTextPenSize( m_item->GetTextThickness(), m_item->GetTextSize() );
511
512 if( m_item->GetTextThickness() > maxPenWidth )
513 {
514 DisplayError( this, _( "The text thickness is too large for the text size.\n"
515 "It will be clamped." ) );
516 m_item->SetTextThickness( maxPenWidth );
517 }
518 }
519
520 m_item->SetFPRelativePosition( VECTOR2I( m_posX.GetValue(), m_posY.GetValue() ) );
521 m_item->SetTextAngle( m_orientation.GetAngleValue().Normalize() );
522
523 if( m_Visible->IsShown() )
524 m_item->SetVisible( m_Visible->GetValue() );
525
526 if( m_KeepUpright->IsShown() )
527 m_item->SetKeepUpright( m_KeepUpright->GetValue() );
528
529 m_item->SetBoldFlag( m_bold->IsChecked() );
530 m_item->SetItalicFlag( m_italic->IsChecked() );
531
532 if( m_alignLeft->IsChecked() )
533 m_item->SetHorizJustify( GR_TEXT_H_ALIGN_LEFT );
534 else if( m_alignCenter->IsChecked() )
535 m_item->SetHorizJustify( GR_TEXT_H_ALIGN_CENTER );
536 else
537 m_item->SetHorizJustify( GR_TEXT_H_ALIGN_RIGHT );
538
539 if( m_valignBottom->IsChecked() )
540 m_item->SetVertJustify( GR_TEXT_V_ALIGN_BOTTOM );
541 else if( m_valignCenter->IsChecked() )
542 m_item->SetVertJustify( GR_TEXT_V_ALIGN_CENTER );
543 else
544 m_item->SetVertJustify( GR_TEXT_V_ALIGN_TOP );
545
546 m_item->SetMirrored( m_mirrored->IsChecked() );
547
548 if( pushCommit )
549 commit.Push( _( "Edit Text Properties" ) );
550
551 return true;
552}
553
554
555void DIALOG_TEXT_PROPERTIES::onMultiLineTCLostFocus( wxFocusEvent& event )
556{
558 m_scintillaTricks->CancelAutocomplete();
559
560 event.Skip();
561}
562
563
564void DIALOG_TEXT_PROPERTIES::onSyntaxHelp( wxHyperlinkEvent& aEvent )
565{
567}
constexpr EDA_IU_SCALE pcbIUScale
Definition base_units.h:121
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
@ edit_cmp_symb_links
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:409
wxString ConvertCrossReferencesToKIIDs(const wxString &aSource) const
Convert cross-references back and forth between ${refDes:field} and ${kiid:field}.
Definition board.cpp:2551
wxString ConvertKIIDsToCrossReferences(const wxString &aSource) const
Definition board.cpp:2631
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:116
EDA_ANGLE Normalize180()
Definition eda_angle.h:268
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:231
EDA_ANGLE GetOrientation() const
Definition footprint.h:438
bool IsFlipped() const
Definition footprint.h:660
const wxString & GetValue() const
Definition footprint.h:925
const wxString & GetReference() const
Definition footprint.h:901
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:890
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:57
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:69
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:683