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 (C) 2010-2023 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, you may find one here:
19 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
20 * or you may search the http://www.gnu.org website for the version 2 license,
21 * or you may write to the Free Software Foundation, Inc.,
22 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
23 */
24
26#include <widgets/font_choice.h>
28#include <confirm.h>
29#include <board_commit.h>
30#include <board.h>
31#include <footprint.h>
32#include <pcb_text.h>
33#include <pcbnew.h>
34#include <project.h>
35#include <pcb_edit_frame.h>
37#include <wx/valnum.h>
38#include <scintilla_tricks.h>
39
40
43 m_frame( aParent ),
44 m_item( aText ),
45 m_textWidth( aParent, m_SizeXLabel, m_SizeXCtrl, m_SizeXUnits ),
46 m_textHeight( aParent, m_SizeYLabel, m_SizeYCtrl, m_SizeYUnits ),
47 m_thickness( aParent, m_ThicknessLabel, m_ThicknessCtrl, m_ThicknessUnits ),
48 m_posX( aParent, m_PositionXLabel, m_PositionXCtrl, m_PositionXUnits ),
49 m_posY( aParent, m_PositionYLabel, m_PositionYCtrl, m_PositionYUnits ),
50 m_orientation( aParent, m_OrientLabel, m_OrientCtrl, nullptr )
51{
52 wxString title;
53
54 // Configure display origin transforms
57
58 m_MultiLineText->SetEOLMode( wxSTC_EOL_LF );
59
60 m_scintillaTricks = new SCINTILLA_TRICKS( m_MultiLineText, wxT( "{}" ), false,
61 // onAccept handler
62 [this]()
63 {
64 wxPostEvent( this, wxCommandEvent( wxEVT_COMMAND_BUTTON_CLICKED, wxID_OK ) );
65 },
66 // onCharAdded handler
67 [this]( wxStyledTextEvent& aEvent )
68 {
70 [this]( const wxString& crossRef, wxArrayString* tokens )
71 {
72 m_frame->GetContextualTextVars( m_item, crossRef, tokens );
73 } );
74 } );
75
76 // A hack which causes Scintilla to auto-size the text editor canvas
77 // See: https://github.com/jacobslusser/ScintillaNET/issues/216
78 m_MultiLineText->SetScrollWidth( 1 );
79 m_MultiLineText->SetScrollWidthTracking( true );
80
82 {
83 switch( m_item->GetType() )
84 {
85 case PCB_TEXT::TEXT_is_REFERENCE: title = _( "Footprint Reference Properties" ); break;
86 case PCB_TEXT::TEXT_is_VALUE: title = _( "Footprint Value Properties" ); break;
87 case PCB_TEXT::TEXT_is_DIVERS: title = _( "Footprint Text Properties" ); break;
88 }
89
90 switch( m_item->GetType() )
91 {
92 case PCB_TEXT::TEXT_is_REFERENCE: m_TextLabel->SetLabel( _( "Reference:" ) ); break;
93 case PCB_TEXT::TEXT_is_VALUE: m_TextLabel->SetLabel( _( "Value:" ) ); break;
94 case PCB_TEXT::TEXT_is_DIVERS: m_TextLabel->SetLabel( _( "Text:" ) ); break;
95 }
96
98 m_MultiLineSizer->Show( false );
99
100 // Do not allow locking items in the footprint editor
101 m_cbLocked->Show( false );
102 }
103 else
104 {
105 title = _( "Text Properties" );
106
108 m_SingleLineSizer->Show( false );
109
110 // This option makes sense only for footprint texts; texts on board are always visible.
111 m_Visible->SetValue( true );
112 m_Visible->Show( false );
113
114 m_KeepUpright->Show( false );
115 m_statusLine->Show( false );
116 }
117
119 m_bold->SetBitmap( KiBitmap( BITMAPS::text_bold ) );
121 m_italic->SetBitmap( KiBitmap( BITMAPS::text_italic ) );
122
124
126 m_alignLeft->SetBitmap( KiBitmap( BITMAPS::text_align_left ) );
128 m_alignCenter->SetBitmap( KiBitmap( BITMAPS::text_align_center ) );
130 m_alignRight->SetBitmap( KiBitmap( BITMAPS::text_align_right ) );
131
133
135 m_valignBottom->SetBitmap( KiBitmap( BITMAPS::text_valign_bottom ) );
137 m_valignCenter->SetBitmap( KiBitmap( BITMAPS::text_valign_center ) );
139 m_valignTop->SetBitmap( KiBitmap( BITMAPS::text_valign_top ) );
140
142
144 m_mirrored->SetBitmap( KiBitmap( BITMAPS::text_mirrored ) );
145
146 SetTitle( title );
147 m_hash_key = title;
148
149 // Configure the layers list selector. Note that footprints are built outside the current
150 // board and so we may need to show all layers if the text is on an unactivated layer.
151 if( !m_frame->GetBoard()->IsLayerEnabled( m_item->GetLayer() ) )
153
157
158 m_orientation.SetUnits( EDA_UNITS::DEGREES );
160
161 // Set predefined rotations in combo dropdown, according to the locale floating point
162 // separator notation
163 double rot_list[] = { 0.0, 90.0, -90.0, 180.0 };
164
165 for( size_t ii = 0; ii < m_OrientCtrl->GetCount() && ii < 4; ++ii )
166 m_OrientCtrl->SetString( ii, wxString::Format( wxT( "%.1f" ), rot_list[ii] ) );
167
168 // Set font sizes
169 m_statusLine->SetFont( KIUI::GetInfoFont( this ) );
170
172
173 // wxTextCtrls fail to generate wxEVT_CHAR events when the wxTE_MULTILINE flag is set,
174 // so we have to listen to wxEVT_CHAR_HOOK events instead.
175 Connect( wxEVT_CHAR_HOOK, wxKeyEventHandler( DIALOG_TEXT_PROPERTIES::OnCharHook ),
176 nullptr, this );
177
179}
180
181
183{
184 Disconnect( wxEVT_CHAR_HOOK, wxKeyEventHandler( DIALOG_TEXT_PROPERTIES::OnCharHook ),
185 nullptr, this );
186
187 delete m_scintillaTricks;
188}
189
190
192{
193 DIALOG_TEXT_PROPERTIES dlg( this, aText );
194 dlg.ShowQuasiModal();
195}
196
197
198void DIALOG_TEXT_PROPERTIES::OnSetFocusText( wxFocusEvent& event )
199{
200#ifdef __WXGTK__
201 // Force an update of the text control before setting the text selection
202 // This is needed because GTK seems to ignore the selection on first update
203 //
204 // Note that we can't do this on OSX as it tends to provoke Apple's
205 // "[NSAlert runModal] may not be invoked inside of transaction begin/commit pair"
206 // bug. See: https://bugs.launchpad.net/kicad/+bug/1837225
208 m_SingleLineText->Update();
209#endif
210
212 KIUI::SelectReferenceNumber( static_cast<wxTextEntry*>( m_SingleLineText ) );
213 else
214 m_SingleLineText->SetSelection( -1, -1 );
215
216 event.Skip();
217}
218
219
221{
222 BOARD* board = m_frame->GetBoard();
223 FOOTPRINT* parentFP = m_item->GetParentFootprint();
224
225 if( m_SingleLineText->IsShown() )
226 {
227 m_SingleLineText->SetValue( m_item->GetText() );
228
230 KIUI::SelectReferenceNumber( static_cast<wxTextEntry*>( m_SingleLineText ) );
231 else
232 m_SingleLineText->SetSelection( -1, -1 );
233 }
234 else if( m_MultiLineText->IsShown() )
235 {
236 wxString msg = board->ConvertKIIDsToCrossReferences( UnescapeString( m_item->GetText() ) );
237
238 m_MultiLineText->SetValue( msg );
239 m_MultiLineText->SetSelection( -1, -1 );
240 m_MultiLineText->EmptyUndoBuffer();
241 }
242
243 if( parentFP )
244 {
245 m_statusLine->SetLabel( wxString::Format( _( "Footprint %s (%s), %s, rotated %.1f deg"),
246 parentFP->GetReference(),
247 parentFP->GetValue(),
248 parentFP->IsFlipped() ? _( "back side (mirrored)" )
249 : _( "front side" ),
250 parentFP->GetOrientation().AsDegrees() ) );
251 }
252 else
253 {
254 m_statusLine->Show( false );
255 }
256
257 m_cbLocked->SetValue( m_item->IsLocked() );
258
260 m_cbKnockout->SetValue( m_item->IsKnockout() );
261
263
269
270 m_Visible->SetValue( m_item->IsVisible() );
271
272 if( parentFP )
273 m_KeepUpright->SetValue( m_item->IsKeepUpright() );
274
275 m_bold->Check( m_item->IsBold() );
277
278 switch ( m_item->GetHorizJustify() )
279 {
280 case GR_TEXT_H_ALIGN_LEFT: m_alignLeft->Check( true ); break;
281 case GR_TEXT_H_ALIGN_CENTER: m_alignCenter->Check( true ); break;
282 case GR_TEXT_H_ALIGN_RIGHT: m_alignRight->Check( true ); break;
283 }
284
285 switch ( m_item->GetVertJustify() )
286 {
287 case GR_TEXT_V_ALIGN_BOTTOM: m_valignBottom->Check( true ); break;
288 case GR_TEXT_V_ALIGN_CENTER: m_valignCenter->Check( true ); break;
289 case GR_TEXT_V_ALIGN_TOP: m_valignTop->Check( true ); break;
290 }
291
293
294 EDA_ANGLE orientation = m_item->GetTextAngle();
296
297 return DIALOG_TEXT_PROPERTIES_BASE::TransferDataToWindow();
298}
299
300
301void DIALOG_TEXT_PROPERTIES::onFontSelected( wxCommandEvent & aEvent )
302{
303 if( KIFONT::FONT::IsStroke( aEvent.GetString() ) )
304 {
305 m_thickness.Show( true );
306
307 int textSize = std::min( m_textWidth.GetValue(), m_textHeight.GetValue() );
308 int thickness = m_thickness.GetValue();
309
310 m_bold->Check( abs( thickness - GetPenSizeForBold( textSize ) )
311 < abs( thickness - GetPenSizeForNormal( textSize ) ) );
312 }
313 else
314 {
315 m_thickness.Show( false );
316 }
317}
318
319
320void DIALOG_TEXT_PROPERTIES::onBoldToggle( wxCommandEvent & aEvent )
321{
322 int textSize = std::min( m_textWidth.GetValue(), m_textHeight.GetValue() );
323
324 if( aEvent.IsChecked() )
326 else
328
329 aEvent.Skip();
330}
331
332
333void DIALOG_TEXT_PROPERTIES::onAlignButton( wxCommandEvent& aEvent )
334{
336 {
337 if( btn->IsChecked() && btn != aEvent.GetEventObject() )
338 btn->Check( false );
339 }
340}
341
342
343void DIALOG_TEXT_PROPERTIES::onValignButton( wxCommandEvent& aEvent )
344{
346 {
347 if( btn->IsChecked() && btn != aEvent.GetEventObject() )
348 btn->Check( false );
349 }
350}
351
352
353void DIALOG_TEXT_PROPERTIES::onThickness( wxCommandEvent& event )
354{
355 int textSize = std::min( m_textWidth.GetValue(), m_textHeight.GetValue() );
356 int thickness = m_thickness.GetValue();
357
358 m_bold->Check( abs( thickness - GetPenSizeForBold( textSize ) )
359 < abs( thickness - GetPenSizeForNormal( textSize ) ) );
360}
361
362
364{
365 if( !DIALOG_TEXT_PROPERTIES_BASE::TransferDataFromWindow() )
366 return false;
367
370 {
371 return false;
372 }
373
374 BOARD_COMMIT commit( m_frame );
375 commit.Modify( m_item );
376
377 // If no other command in progress, prepare undo command
378 // (for a command in progress, will be made later, at the completion of command)
379 bool pushCommit = ( m_item->GetEditFlags() == 0 );
380
381 // Set IN_EDIT flag to force undo/redo/abort proper operation and avoid new calls to
382 // SaveCopyInUndoList for the same text if is moved, and then rotated, edited, etc....
383 if( !pushCommit )
385
386 // Set the new text content
387 if( m_SingleLineText->IsShown() )
388 {
389 if( !m_SingleLineText->GetValue().IsEmpty() )
390 m_item->SetText( m_SingleLineText->GetValue() );
391 }
392 else if( m_MultiLineText->IsShown() )
393 {
394 if( !m_MultiLineText->GetValue().IsEmpty() )
395 {
396 BOARD* board = m_frame->GetBoard();
397 wxString txt = board->ConvertCrossReferencesToKIIDs( m_MultiLineText->GetValue() );
398
399#ifdef __WXMAC__
400 // On macOS CTRL+Enter produces '\r' instead of '\n' regardless of EOL setting.
401 // Replace it now.
402 txt.Replace( wxT( "\r" ), wxT( "\n" ) );
403#elif defined( __WINDOWS__ )
404 // On Windows, a new line is coded as \r\n. We use only \n in kicad files and in
405 // drawing routines so strip the \r char.
406 txt.Replace( wxT( "\r" ), wxT( "" ) );
407#endif
409 }
410 }
411
412 m_item->SetLocked( m_cbLocked->GetValue() );
413
415 m_item->SetIsKnockout( m_cbKnockout->GetValue() );
416
418 {
420 m_italic->IsChecked() ) );
421 }
422
426
427 // Test for acceptable values for thickness and size and clamp if fails
428 int maxPenWidth = Clamp_Text_PenSize( m_item->GetTextThickness(), m_item->GetTextSize() );
429
430 if( m_item->GetTextThickness() > maxPenWidth )
431 {
432 DisplayError( this, _( "The text thickness is too large for the text size.\n"
433 "It will be clamped." ) );
434 m_item->SetTextThickness( maxPenWidth );
435 }
436
438
439 m_item->SetVisible( m_Visible->GetValue() );
440
441 if( m_KeepUpright->IsShown() )
442 m_item->SetKeepUpright( m_KeepUpright->GetValue() );
443
446
447 if( m_alignLeft->IsChecked() )
449 else if( m_alignCenter->IsChecked() )
451 else
453
456 else if( m_valignCenter->IsChecked() )
458 else
460
462
463 if( pushCommit )
464 commit.Push( _( "Change text properties" ) );
465
466 return true;
467}
468
469
470void DIALOG_TEXT_PROPERTIES::onMultiLineTCLostFocus( wxFocusEvent& event )
471{
474
475 event.Skip();
476}
wxBitmap KiBitmap(BITMAPS aBitmap, int aHeightTag)
Construct a wxBitmap from an image identifier Returns the image from the active theme if the image ha...
Definition: bitmap.cpp:106
A bitmap button widget that behaves like an AUI toolbar item's button when it is drawn.
Definition: bitmap_button.h:41
void SetIsRadioButton()
bool IsChecked() const
void SetBitmap(const wxBitmap &aBmp)
Set the bitmap shown when the button is enabled.
void Check(bool aCheck=true)
Check the control.
void SetIsSeparator()
Render button as a toolbar separator.
void SetIsCheckButton()
Setup the control as a two-state button (checked or unchecked).
virtual PCB_LAYER_ID GetLayer() const
Return the primary layer this item is on.
Definition: board_item.h:196
virtual void SetLocked(bool aLocked)
Definition: board_item.h:270
virtual bool IsKnockout() const
Definition: board_item.h:266
virtual void SetIsKnockout(bool aKnockout)
Definition: board_item.h:267
virtual void SetLayer(PCB_LAYER_ID aLayer)
Set the layer this item is on.
Definition: board_item.h:230
FOOTPRINT * GetParentFootprint() const
Definition: board_item.cpp:240
VECTOR2I GetFPRelativePosition() const
Definition: board_item.cpp:254
void SetFPRelativePosition(const VECTOR2I &aPos)
Definition: board_item.cpp:268
virtual bool IsLocked() const
Definition: board_item.cpp:72
Information pertinent to a Pcbnew printed circuit board.
Definition: board.h:270
wxString ConvertCrossReferencesToKIIDs(const wxString &aSource) const
Convert cross-references back and forth between ${refDes:field} and ${kiid:field}.
Definition: board.cpp:1184
wxString ConvertKIIDsToCrossReferences(const wxString &aSource) const
Definition: board.cpp:1238
void SetInitialFocus(wxWindow *aWindow)
Sets the window (usually a wxTextCtrl) that should be focused when the dialog is shown.
Definition: dialog_shim.h:97
void SetupStandardButtons(std::map< int, wxString > aLabels={})
int ShowQuasiModal()
std::string m_hash_key
Definition: dialog_shim.h:204
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)
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...
DIALOG_TEXT_PROPERTIES(SCH_EDIT_FRAME *parent, SCH_ITEM *aTextItem)
void onMultiLineTCLostFocus(wxFocusEvent &event) override
void onFontSelected(wxCommandEvent &aEvent) override
void onBoldToggle(wxCommandEvent &aEvent) override
void onThickness(wxCommandEvent &aEvent) override
void onValignButton(wxCommandEvent &aEvent) override
void onAlignButton(wxCommandEvent &aEvent) override
EDA_ANGLE Normalize()
Definition: eda_angle.h:249
double AsDegrees() const
Definition: eda_angle.h:149
EDA_ANGLE Normalize180()
Definition: eda_angle.h:288
EDA_ITEM_FLAGS GetEditFlags() const
Definition: eda_item.h:129
void SetFlags(EDA_ITEM_FLAGS aMask)
Definition: eda_item.h:123
bool IsItalic() const
Definition: eda_text.h:133
const EDA_ANGLE & GetTextAngle() const
Definition: eda_text.h:123
virtual const wxString & GetText() const
Return the string associated with the text object.
Definition: eda_text.h:87
bool IsKeepUpright() const
Definition: eda_text.h:158
virtual bool IsVisible() const
Definition: eda_text.h:139
KIFONT::FONT * GetFont() const
Definition: eda_text.h:191
void SetMirrored(bool isMirrored)
Definition: eda_text.cpp:236
void SetVertJustify(GR_TEXT_V_ALIGN_T aType)
Definition: eda_text.cpp:260
GR_TEXT_H_ALIGN_T GetHorizJustify() const
Definition: eda_text.h:152
virtual void SetVisible(bool aVisible)
Definition: eda_text.cpp:229
void SetTextThickness(int aWidth)
The TextThickness is that set by the user.
Definition: eda_text.cpp:197
void SetBold(bool aBold)
Definition: eda_text.cpp:221
bool IsMirrored() const
Definition: eda_text.h:142
bool IsBold() const
Definition: eda_text.h:136
void SetKeepUpright(bool aKeepUpright)
Definition: eda_text.cpp:268
GR_TEXT_V_ALIGN_T GetVertJustify() const
Definition: eda_text.h:155
void SetTextSize(const VECTOR2I &aNewSize)
Definition: eda_text.cpp:359
virtual void SetText(const wxString &aText)
Definition: eda_text.cpp:175
virtual void SetTextAngle(const EDA_ANGLE &aAngle)
Definition: eda_text.cpp:205
int GetTextThickness() const
Definition: eda_text.h:115
void SetItalic(bool aItalic)
Definition: eda_text.cpp:213
void SetFont(KIFONT::FONT *aFont)
Definition: eda_text.cpp:343
VECTOR2I GetTextSize() const
Definition: eda_text.h:199
void SetHorizJustify(GR_TEXT_H_ALIGN_T aType)
Definition: eda_text.cpp:252
bool HaveFontSelection() const
Definition: font_choice.cpp:94
void SetFontSelection(KIFONT::FONT *aFont)
Definition: font_choice.cpp:73
KIFONT::FONT * GetFontSelection(bool aBold, bool aItalic) const
EDA_ANGLE GetOrientation() const
Definition: footprint.h:193
bool IsFlipped() const
Definition: footprint.h:326
const wxString & GetValue() const
Definition: footprint.h:549
const wxString & GetReference() const
Definition: footprint.h:521
virtual bool IsStroke() const
Definition: font.h:112
int SetLayerSelection(int layer)
bool SetLayersHotkeys(bool value)
Common, abstract interface for edit frames.
void SetBoardFrame(PCB_BASE_FRAME *aFrame)
void ShowNonActivatedLayers(bool aShow)
@ TEXT_is_DIVERS
Definition: pcb_text.h:52
@ TEXT_is_REFERENCE
Definition: pcb_text.h:50
@ TEXT_is_VALUE
Definition: pcb_text.h:51
TEXT_TYPE GetType() const
Definition: pcb_text.h:89
Add cut/copy/paste, dark theme, autocomplete and brace highlighting to a wxStyleTextCtrl instance.
void DoTextVarAutocomplete(std::function< void(const wxString &crossRef, wxArrayString *tokens)> aTokenProvider)
virtual long long int GetValue()
Return the current value in Internal Units.
virtual void SetPrecision(int aLength)
Normally not needed, but can be used to set the precision when using internal units that are floats (...
virtual void SetUnits(EDA_UNITS aUnits)
Normally not needed (as the UNIT_BINDER inherits from the parent frame), but can be used to set to DE...
virtual EDA_ANGLE GetAngleValue()
virtual void SetAngleValue(const EDA_ANGLE &aValue)
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.
virtual void ChangeValue(int aValue)
Set new value (in Internal Units) for the text field, taking care of units conversion WITHOUT trigger...
virtual void SetValue(long long int aValue)
Set new value (in Internal Units) for the text field, taking care of units conversion.
void Show(bool aShow, bool aResize=false)
Show/hide the label, widget and units label.
void SetCoordType(ORIGIN_TRANSFORMS::COORD_TYPES_T aCoordType)
Set the current origin transform mode.
Definition: unit_binder.h:189
void DisplayError(wxWindow *aParent, const wxString &aText, int aDisplayTime)
Display an error or warning message box with aMessage.
Definition: confirm.cpp:283
This file is part of the common library.
#define _(s)
#define IN_EDIT
Item currently edited.
int GetPenSizeForBold(int aTextSize)
Definition: gr_text.cpp:40
int GetPenSizeForNormal(int aTextSize)
Definition: gr_text.cpp:64
int Clamp_Text_PenSize(int aPenSize, int aSize, bool aStrict)
Pen width should not allow characters to become cluttered up in their own fatness.
Definition: gr_text.cpp:87
PCB_LAYER_ID ToLAYER_ID(int aLayer)
Definition: lset.cpp:932
wxFont GetInfoFont(wxWindow *aWindow)
Definition: ui_common.cpp:156
void SelectReferenceNumber(wxTextEntry *aTextEntry)
Select the number (or "?") in a reference for ease of editing.
Definition: ui_common.cpp:230
#define TEXTS_MAX_SIZE
Maximum text size in internal units (10 inches)
Definition: pcbnew.h:32
#define TEXTS_MIN_SIZE
Minimum text size in internal units (1 mil)
Definition: pcbnew.h:31
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
Definition: string_utils.h:58
@ 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
VECTOR2< int > VECTOR2I
Definition: vector2d.h:588