2011-10-12 10:03:43 -04:00
|
|
|
/*
|
|
|
|
* This program source code file is part of KiCad, a free EDA CAD application.
|
|
|
|
*
|
2016-03-23 13:16:27 +01:00
|
|
|
* Copyright (C) 2016 Jean-Pierre Charras, jp.charras at wanadoo.fr
|
2021-05-14 13:44:17 -04:00
|
|
|
* Copyright (C) 2015 Wayne Stambaugh <stambaughw@gmail.com>
|
2025-01-01 13:30:11 -08:00
|
|
|
* Copyright The KiCad Developers, see AUTHORS.txt for contributors.
|
2011-10-12 10:03:43 -04:00
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, you may find one here:
|
|
|
|
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
|
|
|
* or you may search the http://www.gnu.org website for the version 2 license,
|
|
|
|
* or you may write to the Free Software Foundation, Inc.,
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
|
|
|
*/
|
|
|
|
|
2024-07-02 11:37:21 -07:00
|
|
|
#include <advanced_config.h>
|
2022-08-27 13:23:43 -04:00
|
|
|
#include <base_units.h>
|
2021-10-12 21:05:37 +01:00
|
|
|
#include <pgm_base.h>
|
2018-01-30 11:49:51 +01:00
|
|
|
#include <sch_edit_frame.h>
|
2023-10-21 21:52:51 +01:00
|
|
|
#include <sch_plotter.h>
|
2020-10-25 00:49:02 -04:00
|
|
|
#include <widgets/msgpanel.h>
|
2017-02-20 20:20:39 +08:00
|
|
|
#include <bitmaps.h>
|
2021-07-29 10:56:22 +01:00
|
|
|
#include <string_utils.h>
|
2025-09-03 06:45:49 -07:00
|
|
|
#include <geometry/geometry_utils.h>
|
2012-01-22 22:33:36 -06:00
|
|
|
#include <sch_text.h>
|
2020-05-12 22:00:37 -04:00
|
|
|
#include <schematic.h>
|
2020-03-05 22:00:30 -05:00
|
|
|
#include <settings/color_settings.h>
|
2020-04-14 13:25:00 +01:00
|
|
|
#include <sch_painter.h>
|
|
|
|
#include <default_values.h>
|
2019-09-06 13:15:14 -07:00
|
|
|
#include <wx/debug.h>
|
2021-06-03 08:11:15 -04:00
|
|
|
#include <wx/log.h>
|
2021-09-14 19:26:03 +01:00
|
|
|
#include <dialogs/html_message_box.h>
|
2020-07-07 11:17:30 +01:00
|
|
|
#include <project/project_file.h>
|
|
|
|
#include <project/net_settings.h>
|
2020-11-17 20:21:04 -05:00
|
|
|
#include <core/mirror.h>
|
2021-10-01 11:52:34 +01:00
|
|
|
#include <core/kicad_algo.h>
|
2022-07-04 21:39:16 +01:00
|
|
|
#include <tools/sch_navigate_tool.h>
|
2020-10-13 23:37:48 -04:00
|
|
|
#include <trigo.h>
|
2011-07-03 20:51:07 +02:00
|
|
|
|
2020-04-14 13:25:00 +01:00
|
|
|
|
2024-04-14 19:04:53 +01:00
|
|
|
SCH_TEXT::SCH_TEXT( const VECTOR2I& aPos, const wxString& aText, SCH_LAYER_ID aLayer,
|
|
|
|
KICAD_T aType ) :
|
2021-07-16 16:13:26 -04:00
|
|
|
SCH_ITEM( nullptr, aType ),
|
2024-04-14 19:04:53 +01:00
|
|
|
EDA_TEXT( schIUScale, aText )
|
2007-06-05 12:10:51 +00:00
|
|
|
{
|
2024-04-14 19:04:53 +01:00
|
|
|
m_layer = aLayer;
|
2017-01-23 14:30:11 -06:00
|
|
|
|
2024-04-14 19:04:53 +01:00
|
|
|
SetTextPos( aPos );
|
2017-01-23 14:30:11 -06:00
|
|
|
SetMultilineAllowed( true );
|
2023-04-09 12:14:21 +01:00
|
|
|
|
2023-08-08 12:32:08 -04:00
|
|
|
m_excludedFromSim = false;
|
2007-06-05 12:10:51 +00:00
|
|
|
}
|
|
|
|
|
2009-05-05 17:32:07 +00:00
|
|
|
|
2010-12-21 10:13:09 -05:00
|
|
|
SCH_TEXT::SCH_TEXT( const SCH_TEXT& aText ) :
|
2020-04-16 14:22:19 +01:00
|
|
|
SCH_ITEM( aText ),
|
2023-09-07 17:09:53 +01:00
|
|
|
EDA_TEXT( aText )
|
2023-04-09 12:14:21 +01:00
|
|
|
{
|
2023-08-08 12:32:08 -04:00
|
|
|
m_excludedFromSim = aText.m_excludedFromSim;
|
2023-04-09 12:14:21 +01:00
|
|
|
}
|
2008-01-21 16:21:41 +00:00
|
|
|
|
2008-02-12 21:12:46 +00:00
|
|
|
|
2022-01-01 01:04:08 -05:00
|
|
|
VECTOR2I SCH_TEXT::GetSchematicTextOffset( const RENDER_SETTINGS* aSettings ) const
|
2009-05-12 12:12:34 +00:00
|
|
|
{
|
2023-05-17 13:30:31 -07:00
|
|
|
// Fudge factor to match KiCad 6
|
|
|
|
return VECTOR2I( 0, -2500 );
|
2009-05-12 12:12:34 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2024-04-14 19:04:53 +01:00
|
|
|
void SCH_TEXT::NormalizeJustification( bool inverse )
|
|
|
|
{
|
|
|
|
if( GetHorizJustify() == GR_TEXT_H_ALIGN_CENTER && GetVertJustify() == GR_TEXT_V_ALIGN_CENTER )
|
|
|
|
return;
|
|
|
|
|
|
|
|
VECTOR2I delta( 0, 0 );
|
2025-07-16 23:20:37 +01:00
|
|
|
BOX2I bbox = GetTextBox( nullptr );
|
2024-04-14 19:04:53 +01:00
|
|
|
|
|
|
|
if( GetTextAngle().IsHorizontal() )
|
|
|
|
{
|
|
|
|
if( GetHorizJustify() == GR_TEXT_H_ALIGN_LEFT )
|
|
|
|
delta.x = bbox.GetWidth() / 2;
|
|
|
|
else if( GetHorizJustify() == GR_TEXT_H_ALIGN_RIGHT )
|
|
|
|
delta.x = - bbox.GetWidth() / 2;
|
|
|
|
|
|
|
|
if( GetVertJustify() == GR_TEXT_V_ALIGN_TOP )
|
|
|
|
delta.y = - bbox.GetHeight() / 2;
|
|
|
|
else if( GetVertJustify() == GR_TEXT_V_ALIGN_BOTTOM )
|
|
|
|
delta.y = bbox.GetHeight() / 2;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
if( GetHorizJustify() == GR_TEXT_H_ALIGN_LEFT )
|
|
|
|
delta.y = bbox.GetWidth() / 2;
|
|
|
|
else if( GetHorizJustify() == GR_TEXT_H_ALIGN_RIGHT )
|
|
|
|
delta.y = - bbox.GetWidth() / 2;
|
|
|
|
|
|
|
|
if( GetVertJustify() == GR_TEXT_V_ALIGN_TOP )
|
|
|
|
delta.x = + bbox.GetHeight() / 2;
|
|
|
|
else if( GetVertJustify() == GR_TEXT_V_ALIGN_BOTTOM )
|
|
|
|
delta.x = - bbox.GetHeight() / 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
if( inverse )
|
|
|
|
SetTextPos( GetTextPos() - delta );
|
|
|
|
else
|
|
|
|
SetTextPos( GetTextPos() + delta );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2021-02-16 20:45:25 +00:00
|
|
|
void SCH_TEXT::MirrorHorizontally( int aCenter )
|
2009-07-27 14:32:40 +00:00
|
|
|
{
|
2024-04-14 19:04:53 +01:00
|
|
|
if( m_layer == LAYER_DEVICE )
|
|
|
|
{
|
|
|
|
NormalizeJustification( false );
|
|
|
|
int x = GetTextPos().x;
|
|
|
|
|
|
|
|
x -= aCenter;
|
|
|
|
x *= -1;
|
|
|
|
x += aCenter;
|
|
|
|
|
|
|
|
if( GetTextAngle().IsHorizontal() )
|
|
|
|
{
|
|
|
|
if( GetHorizJustify() == GR_TEXT_H_ALIGN_LEFT )
|
|
|
|
SetHorizJustify( GR_TEXT_H_ALIGN_RIGHT );
|
|
|
|
else if( GetHorizJustify() == GR_TEXT_H_ALIGN_RIGHT )
|
|
|
|
SetHorizJustify( GR_TEXT_H_ALIGN_LEFT );
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
if( GetVertJustify() == GR_TEXT_V_ALIGN_TOP )
|
|
|
|
SetVertJustify( GR_TEXT_V_ALIGN_BOTTOM );
|
|
|
|
else if( GetVertJustify() == GR_TEXT_V_ALIGN_BOTTOM )
|
|
|
|
SetVertJustify( GR_TEXT_V_ALIGN_TOP );
|
|
|
|
}
|
|
|
|
|
|
|
|
SetTextX( x );
|
|
|
|
NormalizeJustification( true );
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
if( GetTextAngle() == ANGLE_HORIZONTAL )
|
|
|
|
FlipHJustify();
|
2010-07-11 18:24:44 +02:00
|
|
|
|
2024-04-14 19:04:53 +01:00
|
|
|
SetTextX( MIRRORVAL( GetTextPos().x, aCenter ) );
|
|
|
|
}
|
2009-07-27 14:32:40 +00:00
|
|
|
}
|
|
|
|
|
2009-11-03 13:26:31 +00:00
|
|
|
|
2021-02-16 20:45:25 +00:00
|
|
|
void SCH_TEXT::MirrorVertically( int aCenter )
|
2010-09-05 19:01:48 +02:00
|
|
|
{
|
2024-04-14 19:04:53 +01:00
|
|
|
if( m_layer == LAYER_DEVICE )
|
|
|
|
{
|
|
|
|
NormalizeJustification( false );
|
|
|
|
int y = GetTextPos().y;
|
|
|
|
|
|
|
|
y -= aCenter;
|
|
|
|
y *= -1;
|
|
|
|
y += aCenter;
|
|
|
|
|
|
|
|
if( GetTextAngle().IsHorizontal() )
|
|
|
|
{
|
|
|
|
if( GetVertJustify() == GR_TEXT_V_ALIGN_TOP )
|
|
|
|
SetVertJustify( GR_TEXT_V_ALIGN_BOTTOM );
|
|
|
|
else if( GetVertJustify() == GR_TEXT_V_ALIGN_BOTTOM )
|
|
|
|
SetVertJustify( GR_TEXT_V_ALIGN_TOP );
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
if( GetHorizJustify() == GR_TEXT_H_ALIGN_LEFT )
|
|
|
|
SetHorizJustify( GR_TEXT_H_ALIGN_RIGHT );
|
|
|
|
else if( GetHorizJustify() == GR_TEXT_H_ALIGN_RIGHT )
|
|
|
|
SetHorizJustify( GR_TEXT_H_ALIGN_LEFT );
|
|
|
|
}
|
|
|
|
|
|
|
|
SetTextY( y );
|
|
|
|
NormalizeJustification( true );
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
if( GetTextAngle() == ANGLE_VERTICAL )
|
|
|
|
FlipHJustify();
|
2015-06-26 15:41:56 +02:00
|
|
|
|
2024-04-14 19:04:53 +01:00
|
|
|
SetTextY( MIRRORVAL( GetTextPos().y, aCenter ) );
|
|
|
|
}
|
2010-09-05 19:01:48 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2024-04-04 23:51:22 +01:00
|
|
|
void SCH_TEXT::Rotate( const VECTOR2I& aCenter, bool aRotateCCW )
|
2010-09-05 19:01:48 +02:00
|
|
|
{
|
2024-04-27 13:47:56 +01:00
|
|
|
VECTOR2I pt = GetTextPos();
|
|
|
|
RotatePoint( pt, aCenter, aRotateCCW ? ANGLE_90 : ANGLE_270 );
|
|
|
|
VECTOR2I offset = pt - GetTextPos();
|
2024-04-14 19:04:53 +01:00
|
|
|
|
2024-04-27 13:47:56 +01:00
|
|
|
Rotate90( false );
|
2024-04-14 19:04:53 +01:00
|
|
|
|
2024-04-27 13:47:56 +01:00
|
|
|
SetTextPos( GetTextPos() + offset );
|
2010-09-05 19:01:48 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-11-18 21:40:04 +00:00
|
|
|
void SCH_TEXT::Rotate90( bool aClockwise )
|
|
|
|
{
|
2023-09-07 17:09:53 +01:00
|
|
|
if( ( GetTextAngle() == ANGLE_HORIZONTAL && aClockwise )
|
2023-09-21 16:12:20 +02:00
|
|
|
|| ( GetTextAngle() == ANGLE_VERTICAL && !aClockwise ) )
|
2023-09-07 17:09:53 +01:00
|
|
|
{
|
|
|
|
FlipHJustify();
|
|
|
|
}
|
2020-11-18 21:40:04 +00:00
|
|
|
|
2023-09-07 17:09:53 +01:00
|
|
|
SetTextAngle( GetTextAngle() == ANGLE_VERTICAL ? ANGLE_HORIZONTAL : ANGLE_VERTICAL );
|
2020-11-18 23:34:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2023-09-07 17:09:53 +01:00
|
|
|
void SCH_TEXT::MirrorSpinStyle( bool aLeftRight )
|
2009-05-12 12:12:34 +00:00
|
|
|
{
|
2023-09-07 17:09:53 +01:00
|
|
|
if( ( GetTextAngle() == ANGLE_HORIZONTAL && aLeftRight )
|
|
|
|
|| ( GetTextAngle() == ANGLE_VERTICAL && !aLeftRight ) )
|
2009-05-12 12:12:34 +00:00
|
|
|
{
|
2023-09-07 17:09:53 +01:00
|
|
|
FlipHJustify();
|
2009-05-12 12:12:34 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2009-11-03 13:26:31 +00:00
|
|
|
|
2025-03-26 10:13:47 -04:00
|
|
|
void SCH_TEXT::swapData( SCH_ITEM* aItem )
|
2009-07-27 14:32:40 +00:00
|
|
|
{
|
2021-10-12 21:05:37 +01:00
|
|
|
SCH_TEXT* item = static_cast<SCH_TEXT*>( aItem );
|
2011-10-19 16:32:21 -04:00
|
|
|
|
2019-08-01 18:10:25 -06:00
|
|
|
SwapText( *item );
|
2021-12-28 22:13:54 +00:00
|
|
|
SwapAttributes( *item );
|
2009-07-27 14:32:40 +00:00
|
|
|
}
|
|
|
|
|
2009-11-03 13:26:31 +00:00
|
|
|
|
2020-01-28 07:42:42 -08:00
|
|
|
bool SCH_TEXT::operator<( const SCH_ITEM& aItem ) const
|
|
|
|
{
|
|
|
|
if( Type() != aItem.Type() )
|
|
|
|
return Type() < aItem.Type();
|
|
|
|
|
|
|
|
auto other = static_cast<const SCH_TEXT*>( &aItem );
|
|
|
|
|
2020-01-28 13:33:23 -07:00
|
|
|
if( GetLayer() != other->GetLayer() )
|
2023-04-09 12:14:21 +01:00
|
|
|
return GetLayer() < other->GetLayer();
|
2020-01-28 07:42:42 -08:00
|
|
|
|
|
|
|
if( GetPosition().x != other->GetPosition().x )
|
|
|
|
return GetPosition().x < other->GetPosition().x;
|
|
|
|
|
|
|
|
if( GetPosition().y != other->GetPosition().y )
|
|
|
|
return GetPosition().y < other->GetPosition().y;
|
|
|
|
|
2023-08-08 12:32:08 -04:00
|
|
|
if( GetExcludedFromSim() != other->GetExcludedFromSim() )
|
|
|
|
return GetExcludedFromSim() - other->GetExcludedFromSim();
|
2023-04-09 12:14:21 +01:00
|
|
|
|
2020-01-28 07:42:42 -08:00
|
|
|
return GetText() < other->GetText();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-12-20 19:18:54 +01:00
|
|
|
int SCH_TEXT::GetTextOffset( const RENDER_SETTINGS* aSettings ) const
|
2010-09-05 19:01:48 +02:00
|
|
|
{
|
2020-11-17 16:02:47 +00:00
|
|
|
double ratio;
|
2020-04-14 13:25:00 +01:00
|
|
|
|
2020-11-17 16:02:47 +00:00
|
|
|
if( aSettings )
|
2020-12-20 19:18:54 +01:00
|
|
|
ratio = static_cast<const SCH_RENDER_SETTINGS*>( aSettings )->m_TextOffsetRatio;
|
2020-11-17 16:02:47 +00:00
|
|
|
else if( Schematic() )
|
|
|
|
ratio = Schematic()->Settings().m_TextOffsetRatio;
|
|
|
|
else
|
|
|
|
ratio = DEFAULT_TEXT_OFFSET_RATIO; // For previews (such as in Preferences), etc.
|
|
|
|
|
|
|
|
return KiROUND( ratio * GetTextSize().y );
|
2020-04-14 13:25:00 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
int SCH_TEXT::GetPenWidth() const
|
|
|
|
{
|
|
|
|
return GetEffectiveTextPenWidth();
|
2010-09-05 19:01:48 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2025-07-16 23:20:37 +01:00
|
|
|
KIFONT::FONT* SCH_TEXT::GetDrawFont( const RENDER_SETTINGS* aSettings ) const
|
2022-01-07 00:47:23 +00:00
|
|
|
{
|
|
|
|
KIFONT::FONT* font = EDA_TEXT::GetFont();
|
|
|
|
|
|
|
|
if( !font )
|
2025-07-16 23:20:37 +01:00
|
|
|
font = KIFONT::FONT::GetFont( GetDefaultFont( aSettings ), IsBold(), IsItalic() );
|
2022-01-07 00:47:23 +00:00
|
|
|
|
|
|
|
return font;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2022-08-31 10:15:42 +01:00
|
|
|
const BOX2I SCH_TEXT::GetBoundingBox() const
|
2010-11-03 10:13:15 -04:00
|
|
|
{
|
2025-07-16 23:20:37 +01:00
|
|
|
BOX2I bbox = GetTextBox( nullptr );
|
2024-04-14 19:04:53 +01:00
|
|
|
|
2024-04-27 13:47:56 +01:00
|
|
|
if( !GetTextAngle().IsZero() ) // Rotate bbox.
|
|
|
|
{
|
|
|
|
VECTOR2I pos = bbox.GetOrigin();
|
2022-08-31 10:15:42 +01:00
|
|
|
VECTOR2I end = bbox.GetEnd();
|
2017-01-23 14:30:11 -06:00
|
|
|
|
2024-04-27 13:47:56 +01:00
|
|
|
RotatePoint( pos, GetTextPos(), GetTextAngle() );
|
|
|
|
RotatePoint( end, GetTextPos(), GetTextAngle() );
|
2017-01-23 14:30:11 -06:00
|
|
|
|
2024-04-27 13:47:56 +01:00
|
|
|
bbox.SetOrigin( pos );
|
2022-08-31 10:15:42 +01:00
|
|
|
bbox.SetEnd( end );
|
2008-04-15 19:38:19 +00:00
|
|
|
}
|
2024-04-14 19:04:53 +01:00
|
|
|
|
2024-04-27 13:47:56 +01:00
|
|
|
bbox.Normalize();
|
|
|
|
return bbox;
|
2008-04-15 19:38:19 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2023-05-05 14:21:56 +01:00
|
|
|
wxString SCH_TEXT::GetShownText( const SCH_SHEET_PATH* aPath, bool aAllowExtraText,
|
|
|
|
int aDepth ) const
|
2020-03-29 02:12:29 +01:00
|
|
|
{
|
2023-03-08 10:31:24 -05:00
|
|
|
SCH_SHEET* sheet = nullptr;
|
|
|
|
|
|
|
|
if( aPath )
|
|
|
|
sheet = aPath->Last();
|
2023-08-07 21:43:36 +01:00
|
|
|
else if( SCHEMATIC* schematic = Schematic() )
|
|
|
|
sheet = schematic->CurrentSheet().Last();
|
2023-03-08 10:31:24 -05:00
|
|
|
|
2020-04-05 20:51:48 +01:00
|
|
|
std::function<bool( wxString* )> textResolver =
|
2020-04-06 14:06:57 +01:00
|
|
|
[&]( wxString* token ) -> bool
|
2020-04-05 20:51:48 +01:00
|
|
|
{
|
2025-02-18 22:51:53 +00:00
|
|
|
if( SCH_SYMBOL* sch_symbol = dynamic_cast<SCH_SYMBOL*>( m_parent ) )
|
|
|
|
{
|
|
|
|
if( sch_symbol->ResolveTextVar( aPath, token, aDepth + 1 ) )
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
else if( LIB_SYMBOL* lib_symbol = dynamic_cast<LIB_SYMBOL*>( m_parent ) )
|
|
|
|
{
|
|
|
|
if( lib_symbol->ResolveTextVar( token, aDepth + 1 ) )
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2023-03-08 10:31:24 -05:00
|
|
|
if( sheet )
|
2020-04-05 20:51:48 +01:00
|
|
|
{
|
2023-03-10 09:16:05 -05:00
|
|
|
if( sheet->ResolveTextVar( aPath, token, aDepth + 1 ) )
|
2020-04-06 14:06:57 +01:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2020-04-05 20:51:48 +01:00
|
|
|
return false;
|
|
|
|
};
|
2020-03-29 02:12:29 +01:00
|
|
|
|
2023-05-05 14:21:56 +01:00
|
|
|
wxString text = EDA_TEXT::GetShownText( aAllowExtraText, aDepth );
|
2020-03-29 02:12:29 +01:00
|
|
|
|
2025-03-19 13:32:04 +00:00
|
|
|
if( HasTextVars() )
|
2020-04-24 21:33:59 +01:00
|
|
|
{
|
2024-07-02 11:37:21 -07:00
|
|
|
if( aDepth < ADVANCED_CFG::GetCfg().m_ResolveTextRecursionDepth )
|
2023-01-17 16:54:08 +00:00
|
|
|
text = ExpandTextVars( text, &textResolver );
|
2020-04-24 21:33:59 +01:00
|
|
|
}
|
2020-04-06 14:06:57 +01:00
|
|
|
|
2025-09-01 08:41:25 -07:00
|
|
|
if( text.Contains( wxT( "@{" ) ) )
|
|
|
|
text = EvaluateText( text );
|
|
|
|
|
2020-04-06 14:06:57 +01:00
|
|
|
return text;
|
2020-03-29 02:12:29 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2022-08-27 19:14:57 +01:00
|
|
|
void SCH_TEXT::DoHypertextAction( EDA_DRAW_FRAME* aFrame ) const
|
2022-05-14 15:52:53 +02:00
|
|
|
{
|
|
|
|
wxCHECK_MSG( IsHypertext(), /* void */,
|
2024-02-09 13:53:22 +00:00
|
|
|
wxT( "Calling a hypertext menu on a SCH_TEXT with no hyperlink?" ) );
|
2022-05-14 15:52:53 +02:00
|
|
|
|
2022-08-27 19:14:57 +01:00
|
|
|
SCH_NAVIGATE_TOOL* navTool = aFrame->GetToolManager()->GetTool<SCH_NAVIGATE_TOOL>();
|
|
|
|
navTool->HypertextCommand( m_hyperlink );
|
2022-05-14 15:52:53 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2024-06-27 10:11:55 +01:00
|
|
|
wxString SCH_TEXT::GetItemDescription( UNITS_PROVIDER* aUnitsProvider, bool aFull ) const
|
2010-12-10 14:47:44 -05:00
|
|
|
{
|
2024-06-27 10:11:55 +01:00
|
|
|
return wxString::Format( _( "Graphic Text '%s'" ),
|
|
|
|
aFull ? GetShownText( false ) : KIUI::EllipsizeMenuText( GetText() ) );
|
2011-03-25 15:16:05 -04:00
|
|
|
}
|
2010-12-13 10:59:00 -05:00
|
|
|
|
2011-03-25 15:16:05 -04:00
|
|
|
|
2021-03-07 21:59:07 -05:00
|
|
|
BITMAPS SCH_TEXT::GetMenuImage() const
|
2017-02-20 20:20:39 +08:00
|
|
|
{
|
2021-03-07 21:59:07 -05:00
|
|
|
return BITMAPS::text;
|
2017-02-20 20:20:39 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2022-01-01 01:04:08 -05:00
|
|
|
bool SCH_TEXT::HitTest( const VECTOR2I& aPosition, int aAccuracy ) const
|
2011-03-25 15:16:05 -04:00
|
|
|
{
|
2024-04-27 13:47:56 +01:00
|
|
|
BOX2I bBox = GetBoundingBox();
|
|
|
|
bBox.Inflate( aAccuracy );
|
|
|
|
return bBox.Contains( aPosition );
|
2010-12-10 14:47:44 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2022-08-31 10:33:46 +01:00
|
|
|
bool SCH_TEXT::HitTest( const BOX2I& aRect, bool aContained, int aAccuracy ) const
|
2010-12-10 14:47:44 -05:00
|
|
|
{
|
2024-04-14 19:04:53 +01:00
|
|
|
if( m_flags & (STRUCT_DELETED | SKIP_STRUCT ) )
|
|
|
|
return false;
|
|
|
|
|
|
|
|
BOX2I rect = aRect;
|
2024-04-27 13:47:56 +01:00
|
|
|
BOX2I bBox = GetBoundingBox();
|
2024-04-14 19:04:53 +01:00
|
|
|
|
|
|
|
rect.Inflate( aAccuracy );
|
2013-04-07 21:49:13 +03:00
|
|
|
|
2024-04-27 13:47:56 +01:00
|
|
|
if( aContained )
|
|
|
|
return aRect.Contains( bBox );
|
2013-04-07 21:49:13 +03:00
|
|
|
|
2024-04-27 13:47:56 +01:00
|
|
|
return aRect.Intersects( bBox );
|
2024-04-14 19:04:53 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2025-09-03 06:45:49 -07:00
|
|
|
bool SCH_TEXT::HitTest( const SHAPE_LINE_CHAIN& aPoly, bool aContained ) const
|
|
|
|
{
|
|
|
|
if( m_flags & (STRUCT_DELETED | SKIP_STRUCT ) )
|
|
|
|
return false;
|
|
|
|
|
|
|
|
return KIGEOM::BoxHitTest( aPoly, GetBoundingBox(), aContained );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2024-04-14 19:04:53 +01:00
|
|
|
void SCH_TEXT::BeginEdit( const VECTOR2I& aPosition )
|
|
|
|
{
|
|
|
|
SetTextPos( aPosition );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void SCH_TEXT::CalcEdit( const VECTOR2I& aPosition )
|
|
|
|
{
|
|
|
|
SetTextPos( aPosition );
|
2010-12-10 14:47:44 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2024-11-21 13:18:36 -08:00
|
|
|
std::vector<int> SCH_TEXT::ViewGetLayers() const
|
2021-10-12 21:05:37 +01:00
|
|
|
{
|
2024-11-21 13:18:36 -08:00
|
|
|
if( IsPrivate() )
|
|
|
|
return { LAYER_PRIVATE_NOTES, LAYER_SELECTION_SHADOWS };
|
|
|
|
|
|
|
|
return { m_layer, LAYER_SELECTION_SHADOWS };
|
2021-10-12 21:05:37 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2024-04-05 22:35:32 +01:00
|
|
|
void SCH_TEXT::Plot( PLOTTER* aPlotter, bool aBackground, const SCH_PLOT_OPTS& aPlotOpts,
|
|
|
|
int aUnit, int aBodyStyle, const VECTOR2I& aOffset, bool aDimmed )
|
2011-06-17 09:24:22 -04:00
|
|
|
{
|
2024-04-14 19:04:53 +01:00
|
|
|
if( aBackground || IsPrivate() )
|
2022-02-10 19:49:25 +00:00
|
|
|
return;
|
|
|
|
|
2024-04-14 19:04:53 +01:00
|
|
|
SCH_RENDER_SETTINGS* renderSettings = getRenderSettings( aPlotter );
|
|
|
|
COLOR4D color = GetTextColor();
|
|
|
|
COLOR4D bg = renderSettings->GetBackgroundColor();
|
2020-12-13 22:42:29 +00:00
|
|
|
|
2022-04-29 13:51:49 +01:00
|
|
|
if( !aPlotter->GetColorMode() || color == COLOR4D::UNSPECIFIED )
|
2024-04-14 19:04:53 +01:00
|
|
|
{
|
|
|
|
SCH_CONNECTION* connection = Connection();
|
2011-06-17 09:24:22 -04:00
|
|
|
|
2024-04-14 19:04:53 +01:00
|
|
|
if( connection && connection->IsBus() )
|
|
|
|
color = renderSettings->GetLayerColor( LAYER_BUS );
|
|
|
|
else
|
|
|
|
color = renderSettings->GetLayerColor( m_layer );
|
|
|
|
}
|
2022-10-22 21:32:10 +01:00
|
|
|
|
2024-04-14 19:04:53 +01:00
|
|
|
if( !IsVisible() )
|
|
|
|
bg = renderSettings->GetLayerColor( LAYER_HIDDEN );
|
|
|
|
else if( bg == COLOR4D::UNSPECIFIED || !aPlotter->GetColorMode() )
|
|
|
|
bg = COLOR4D::WHITE;
|
2022-10-22 21:32:10 +01:00
|
|
|
|
2024-04-14 19:04:53 +01:00
|
|
|
if( aDimmed )
|
2022-04-25 23:22:45 +01:00
|
|
|
{
|
2024-04-14 19:04:53 +01:00
|
|
|
color.Desaturate( );
|
|
|
|
color = color.Mix( bg, 0.5f );
|
2022-04-25 23:22:45 +01:00
|
|
|
}
|
|
|
|
|
2024-04-14 19:04:53 +01:00
|
|
|
int penWidth = GetEffectiveTextPenWidth( renderSettings->GetDefaultPenWidth() );
|
|
|
|
penWidth = std::max( penWidth, renderSettings->GetMinPenWidth() );
|
|
|
|
aPlotter->SetCurrentLineWidth( penWidth );
|
2011-06-17 09:24:22 -04:00
|
|
|
|
2025-07-16 23:20:37 +01:00
|
|
|
KIFONT::FONT* font = GetDrawFont( renderSettings );
|
2023-02-24 09:44:25 +01:00
|
|
|
TEXT_ATTRIBUTES attrs = GetAttributes();
|
|
|
|
attrs.m_StrokeWidth = penWidth;
|
|
|
|
|
2024-04-14 19:04:53 +01:00
|
|
|
if( m_layer == LAYER_DEVICE )
|
2011-06-17 09:24:22 -04:00
|
|
|
{
|
2024-04-14 19:04:53 +01:00
|
|
|
BOX2I bBox = GetBoundingBox();
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Calculate the text justification, according to the symbol orientation/mirror. This is
|
|
|
|
* a bit complicated due to cumulative calculations:
|
|
|
|
* - numerous cases (mirrored or not, rotation)
|
|
|
|
* - the plotter's Text() function will also recalculate H and V justifications according
|
|
|
|
* to the text orientation
|
|
|
|
* - when a symbol is mirrored the text is not, and justifications become a nightmare
|
|
|
|
*
|
|
|
|
* So the easier way is to use no justifications (centered text) and use GetBoundingBox to
|
|
|
|
* know the text coordinate considered as centered.
|
|
|
|
*/
|
|
|
|
VECTOR2I txtpos = bBox.Centre();
|
|
|
|
attrs.m_Halign = GR_TEXT_H_ALIGN_CENTER;
|
|
|
|
attrs.m_Valign = GR_TEXT_V_ALIGN_CENTER;
|
|
|
|
|
|
|
|
// The text orientation may need to be flipped if the transformation matrix causes xy
|
|
|
|
// axes to be flipped.
|
|
|
|
if( ( renderSettings->m_Transform.x1 != 0 ) ^ ( GetTextAngle() != ANGLE_HORIZONTAL ) )
|
|
|
|
attrs.m_Angle = ANGLE_HORIZONTAL;
|
|
|
|
else
|
|
|
|
attrs.m_Angle = ANGLE_VERTICAL;
|
|
|
|
|
|
|
|
aPlotter->PlotText( renderSettings->TransformCoordinate( txtpos ) + aOffset, color,
|
|
|
|
GetText(), attrs, font, GetFontMetrics() );
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
SCH_SHEET_PATH* sheet = &Schematic()->CurrentSheet();
|
|
|
|
VECTOR2I text_offset = GetSchematicTextOffset( aPlotter->RenderSettings() );
|
|
|
|
|
|
|
|
// Adjust text drawn in an outline font to more closely mimic the positioning of
|
|
|
|
// SCH_FIELD text.
|
|
|
|
if( font->IsOutline() )
|
|
|
|
{
|
2025-07-16 23:20:37 +01:00
|
|
|
BOX2I firstLineBBox = GetTextBox( renderSettings, 0 );
|
2024-04-14 19:04:53 +01:00
|
|
|
int sizeDiff = firstLineBBox.GetHeight() - GetTextSize().y;
|
|
|
|
int adjust = KiROUND( sizeDiff * 0.4 );
|
|
|
|
VECTOR2I adjust_offset( 0, - adjust );
|
|
|
|
|
|
|
|
RotatePoint( adjust_offset, GetDrawRotation() );
|
|
|
|
text_offset += adjust_offset;
|
|
|
|
}
|
|
|
|
|
|
|
|
std::vector<VECTOR2I> positions;
|
|
|
|
wxArrayString strings_list;
|
|
|
|
wxStringSplit( GetShownText( sheet, true ), strings_list, '\n' );
|
|
|
|
positions.reserve( strings_list.Count() );
|
|
|
|
|
2025-07-16 23:20:37 +01:00
|
|
|
GetLinePositions( renderSettings, positions, (int) strings_list.Count() );
|
2024-04-14 19:04:53 +01:00
|
|
|
|
|
|
|
attrs.m_Multiline = false;
|
|
|
|
|
|
|
|
for( unsigned ii = 0; ii < strings_list.Count(); ii++ )
|
|
|
|
{
|
|
|
|
VECTOR2I textpos = positions[ii] + text_offset;
|
|
|
|
wxString& txt = strings_list.Item( ii );
|
|
|
|
aPlotter->PlotText( textpos, color, txt, attrs, font, GetFontMetrics() );
|
|
|
|
}
|
|
|
|
|
|
|
|
if( HasHyperlink() )
|
|
|
|
aPlotter->HyperlinkBox( GetBoundingBox(), GetHyperlink() );
|
2011-06-17 09:24:22 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-01-12 12:32:24 -05:00
|
|
|
|
2021-09-27 00:22:32 +01:00
|
|
|
void SCH_TEXT::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_ITEM>& aList )
|
2012-11-20 12:35:09 +01:00
|
|
|
{
|
|
|
|
wxString msg;
|
|
|
|
|
2021-03-03 16:38:41 +00:00
|
|
|
// Don't use GetShownText() here; we want to show the user the variable references
|
2024-04-14 19:04:53 +01:00
|
|
|
aList.emplace_back( _( "Text" ), KIUI::EllipsizeStatusText( aFrame, GetText() ) );
|
2012-11-20 12:35:09 +01:00
|
|
|
|
2025-07-23 14:33:29 +01:00
|
|
|
SCH_ITEM::GetMsgPanelInfo( aFrame, aList );
|
|
|
|
|
2023-08-08 12:32:08 -04:00
|
|
|
if( m_excludedFromSim )
|
2023-04-09 12:14:21 +01:00
|
|
|
aList.emplace_back( _( "Exclude from" ), _( "Simulation" ) );
|
|
|
|
|
2022-10-22 21:32:10 +01:00
|
|
|
aList.emplace_back( _( "Font" ), GetFont() ? GetFont()->GetName() : _( "Default" ) );
|
2022-04-26 18:52:53 +01:00
|
|
|
|
2013-01-12 12:32:24 -05:00
|
|
|
wxString textStyle[] = { _( "Normal" ), _( "Italic" ), _( "Bold" ), _( "Bold Italic" ) };
|
2021-10-12 21:05:37 +01:00
|
|
|
int style = IsBold() && IsItalic() ? 3 : IsBold() ? 2 : IsItalic() ? 1 : 0;
|
2021-09-28 14:28:35 +01:00
|
|
|
aList.emplace_back( _( "Style" ), textStyle[style] );
|
2012-11-20 12:35:09 +01:00
|
|
|
|
2022-09-19 10:25:20 +01:00
|
|
|
aList.emplace_back( _( "Text Size" ), aFrame->MessageTextFromValue( GetTextWidth() ) );
|
2021-09-27 00:22:32 +01:00
|
|
|
|
2023-09-07 17:09:53 +01:00
|
|
|
switch( GetHorizJustify() )
|
2012-11-20 12:35:09 +01:00
|
|
|
{
|
2024-02-16 12:54:28 +00:00
|
|
|
case GR_TEXT_H_ALIGN_LEFT: msg = _( "Align left" ); break;
|
|
|
|
case GR_TEXT_H_ALIGN_CENTER: msg = _( "Align center" ); break;
|
|
|
|
case GR_TEXT_H_ALIGN_RIGHT: msg = _( "Align right" ); break;
|
|
|
|
case GR_TEXT_H_ALIGN_INDETERMINATE: msg = INDETERMINATE_STATE; break;
|
2012-11-20 12:35:09 +01:00
|
|
|
}
|
|
|
|
|
2024-04-14 19:04:53 +01:00
|
|
|
if( m_layer == LAYER_DEVICE )
|
|
|
|
{
|
|
|
|
aList.emplace_back( _( "H Justification" ), msg );
|
|
|
|
|
|
|
|
switch ( GetVertJustify() )
|
|
|
|
{
|
|
|
|
case GR_TEXT_V_ALIGN_TOP: msg = _( "Top" ); break;
|
|
|
|
case GR_TEXT_V_ALIGN_CENTER: msg = _( "Center" ); break;
|
|
|
|
case GR_TEXT_V_ALIGN_BOTTOM: msg = _( "Bottom" ); break;
|
|
|
|
case GR_TEXT_V_ALIGN_INDETERMINATE: msg = INDETERMINATE_STATE; break;
|
|
|
|
}
|
|
|
|
|
|
|
|
aList.emplace_back( _( "V Justification" ), msg );
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
aList.emplace_back( _( "Justification" ), msg );
|
|
|
|
}
|
2012-11-20 12:35:09 +01:00
|
|
|
}
|
2011-06-17 09:24:22 -04:00
|
|
|
|
2025-02-06 09:47:00 -05:00
|
|
|
|
2023-09-14 14:39:42 -07:00
|
|
|
bool SCH_TEXT::operator==( const SCH_ITEM& aOther ) const
|
|
|
|
{
|
|
|
|
if( Type() != aOther.Type() )
|
|
|
|
return false;
|
|
|
|
|
|
|
|
const SCH_TEXT* other = static_cast<const SCH_TEXT*>( &aOther );
|
|
|
|
|
|
|
|
if( GetLayer() != other->GetLayer() )
|
|
|
|
return false;
|
|
|
|
|
|
|
|
if( GetExcludedFromSim() != other->GetExcludedFromSim() )
|
|
|
|
return false;
|
|
|
|
|
|
|
|
return EDA_TEXT::operator==( *other );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
double SCH_TEXT::Similarity( const SCH_ITEM& aOther ) const
|
|
|
|
{
|
2024-04-14 19:04:53 +01:00
|
|
|
if( m_Uuid == aOther.m_Uuid )
|
|
|
|
return 1.0;
|
|
|
|
|
2023-09-14 14:39:42 -07:00
|
|
|
if( Type() != aOther.Type() )
|
|
|
|
return 0.0;
|
|
|
|
|
|
|
|
const SCH_TEXT* other = static_cast<const SCH_TEXT*>( &aOther );
|
|
|
|
|
2024-04-14 19:04:53 +01:00
|
|
|
double retval = SimilarityBase( aOther );
|
2023-09-14 14:39:42 -07:00
|
|
|
|
|
|
|
if( GetLayer() != other->GetLayer() )
|
|
|
|
retval *= 0.9;
|
|
|
|
|
|
|
|
if( GetExcludedFromSim() != other->GetExcludedFromSim() )
|
|
|
|
retval *= 0.9;
|
|
|
|
|
|
|
|
retval *= EDA_TEXT::Similarity( *other );
|
|
|
|
|
|
|
|
return retval;
|
|
|
|
}
|
|
|
|
|
2021-07-16 16:13:26 -04:00
|
|
|
|
2024-04-14 19:04:53 +01:00
|
|
|
int SCH_TEXT::compare( const SCH_ITEM& aOther, int aCompareFlags ) const
|
|
|
|
{
|
|
|
|
wxASSERT( aOther.Type() == SCH_TEXT_T );
|
|
|
|
|
|
|
|
int retv = SCH_ITEM::compare( aOther, aCompareFlags );
|
|
|
|
|
|
|
|
if( retv )
|
|
|
|
return retv;
|
|
|
|
|
|
|
|
const SCH_TEXT& tmp = static_cast<const SCH_TEXT&>( aOther );
|
|
|
|
|
|
|
|
int result = GetText().CmpNoCase( tmp.GetText() );
|
|
|
|
|
|
|
|
if( result != 0 )
|
|
|
|
return result;
|
|
|
|
|
|
|
|
if( GetTextPos().x != tmp.GetTextPos().x )
|
|
|
|
return GetTextPos().x - tmp.GetTextPos().x;
|
|
|
|
|
|
|
|
if( GetTextPos().y != tmp.GetTextPos().y )
|
|
|
|
return GetTextPos().y - tmp.GetTextPos().y;
|
|
|
|
|
|
|
|
if( GetTextWidth() != tmp.GetTextWidth() )
|
|
|
|
return GetTextWidth() - tmp.GetTextWidth();
|
|
|
|
|
|
|
|
if( GetTextHeight() != tmp.GetTextHeight() )
|
|
|
|
return GetTextHeight() - tmp.GetTextHeight();
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2008-04-22 16:38:23 +00:00
|
|
|
#if defined(DEBUG)
|
|
|
|
|
2011-12-14 11:25:42 -06:00
|
|
|
void SCH_TEXT::Show( int nestLevel, std::ostream& os ) const
|
2008-04-22 16:38:23 +00:00
|
|
|
{
|
|
|
|
// XML output:
|
|
|
|
wxString s = GetClass();
|
|
|
|
|
|
|
|
NestedSpace( nestLevel, os ) << '<' << s.Lower().mb_str()
|
2020-11-14 14:29:11 +00:00
|
|
|
<< " layer=\"" << m_layer << '"'
|
2009-05-05 17:32:07 +00:00
|
|
|
<< '>'
|
2019-08-01 18:10:25 -06:00
|
|
|
<< TO_UTF8( GetText() )
|
2009-05-05 17:32:07 +00:00
|
|
|
<< "</" << s.Lower().mb_str() << ">\n";
|
2008-04-22 16:38:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
2010-11-03 10:13:15 -04:00
|
|
|
|
2023-06-20 21:57:20 -04:00
|
|
|
static struct SCH_TEXT_DESC
|
|
|
|
{
|
|
|
|
SCH_TEXT_DESC()
|
|
|
|
{
|
|
|
|
PROPERTY_MANAGER& propMgr = PROPERTY_MANAGER::Instance();
|
|
|
|
REGISTER_TYPE( SCH_TEXT );
|
|
|
|
propMgr.AddTypeCast( new TYPE_CAST<SCH_TEXT, SCH_ITEM> );
|
|
|
|
propMgr.AddTypeCast( new TYPE_CAST<SCH_TEXT, EDA_TEXT> );
|
|
|
|
propMgr.InheritsAfter( TYPE_HASH( SCH_TEXT ), TYPE_HASH( SCH_ITEM ) );
|
|
|
|
propMgr.InheritsAfter( TYPE_HASH( SCH_TEXT ), TYPE_HASH( EDA_TEXT ) );
|
|
|
|
|
|
|
|
propMgr.Mask( TYPE_HASH( SCH_TEXT ), TYPE_HASH( EDA_TEXT ), _HKI( "Mirrored" ) );
|
|
|
|
propMgr.Mask( TYPE_HASH( SCH_TEXT ), TYPE_HASH( EDA_TEXT ), _HKI( "Width" ) );
|
|
|
|
propMgr.Mask( TYPE_HASH( SCH_TEXT ), TYPE_HASH( EDA_TEXT ), _HKI( "Height" ) );
|
2023-10-30 17:29:38 +00:00
|
|
|
propMgr.Mask( TYPE_HASH( SCH_TEXT ), TYPE_HASH( EDA_TEXT ), _HKI( "Thickness" ) );
|
|
|
|
|
|
|
|
propMgr.AddProperty( new PROPERTY<SCH_TEXT, int>( _HKI( "Text Size" ),
|
|
|
|
&SCH_TEXT::SetSchTextSize, &SCH_TEXT::GetSchTextSize, PROPERTY_DISPLAY::PT_SIZE ),
|
2024-02-28 17:50:51 +00:00
|
|
|
_HKI( "Text Properties" ) );
|
2023-07-16 15:19:03 -04:00
|
|
|
|
|
|
|
// Orientation is exposed differently in schematic; mask the base for now
|
|
|
|
propMgr.Mask( TYPE_HASH( SCH_TEXT ), TYPE_HASH( EDA_TEXT ), _HKI( "Orientation" ) );
|
2023-06-20 21:57:20 -04:00
|
|
|
}
|
|
|
|
} _SCH_TEXT_DESC;
|