KiCad PCB EDA Suite
ASCH_TEXT_FRAME Struct Reference

#include <altium_parser_sch.h>

Inheritance diagram for ASCH_TEXT_FRAME:
ASCH_NOTE

Public Member Functions

 ASCH_TEXT_FRAME (const std::map< wxString, wxString > &aProps)
 

Public Attributes

VECTOR2I Location
 
wxSize Size
 
VECTOR2I BottomLeft
 
VECTOR2I TopRight
 
wxString Text
 
bool IsWordWrapped
 
bool ShowBorder
 
bool IsSolid
 
int FontID
 
int TextMargin
 
int AreaColor
 
int BorderColor
 
ASCH_TEXT_FRAME_ALIGNMENT Alignment
 

Detailed Description

Definition at line 292 of file altium_parser_sch.h.

Constructor & Destructor Documentation

◆ ASCH_TEXT_FRAME()

ASCH_TEXT_FRAME::ASCH_TEXT_FRAME ( const std::map< wxString, wxString > &  aProps)
explicit

Definition at line 252 of file altium_parser_sch.cpp.

253{
254 wxASSERT( ReadRecord( aProps ) == ALTIUM_SCH_RECORD::NOTE
256
257 BottomLeft = VECTOR2I( ReadKiCadUnitFrac( aProps, "LOCATION.X" ),
258 -ReadKiCadUnitFrac( aProps, "LOCATION.Y" ) );
259 TopRight = VECTOR2I( ReadKiCadUnitFrac( aProps, "CORNER.X" ),
260 -ReadKiCadUnitFrac( aProps, "CORNER.Y" ) );
261
262 Location = VECTOR2I( ReadKiCadUnitFrac( aProps, "LOCATION.X" ),
263 -ReadKiCadUnitFrac( aProps, "LOCATION.Y" ) );
264 Size = wxSize( ReadKiCadUnitFrac( aProps, "CORNER.X" ) - Location.x,
265 -ReadKiCadUnitFrac( aProps, "CORNER.Y" ) - Location.y );
266
267 Text = ALTIUM_PARSER::ReadString( aProps, "TEXT", "" );
268 Text.Replace( "~1", "\n", true );
269
270 FontID = ALTIUM_PARSER::ReadInt( aProps, "FONTID", 0 );
271 IsWordWrapped = ALTIUM_PARSER::ReadBool( aProps, "WORDWRAP", false );
272 ShowBorder = ALTIUM_PARSER::ReadBool( aProps, "SHOWBORDER", false );
273 TextMargin = ReadKiCadUnitFrac( aProps, "TEXTMARGIN" );
274 AreaColor = ALTIUM_PARSER::ReadInt( aProps, "AREACOLOR", 0 );
275 BorderColor = ALTIUM_PARSER::ReadInt( aProps, "COLOR", 0 );
276
277 IsSolid = ALTIUM_PARSER::ReadBool( aProps, "WORDWRAP", true );
278
279 Alignment = ReadEnum<ASCH_TEXT_FRAME_ALIGNMENT>( aProps, "ALIGNMENT", 1, 3,
281}
int ReadKiCadUnitFrac(const std::map< wxString, wxString > &aProps, const wxString &aKey)
ALTIUM_SCH_RECORD ReadRecord(const std::map< wxString, wxString > &aProps)
static int ReadInt(const std::map< wxString, wxString > &aProps, const wxString &aKey, int aDefault)
static wxString ReadString(const std::map< wxString, wxString > &aProps, const wxString &aKey, const wxString &aDefault)
static bool ReadBool(const std::map< wxString, wxString > &aProps, const wxString &aKey, bool aDefault)
ASCH_TEXT_FRAME_ALIGNMENT Alignment
VECTOR2< int > VECTOR2I
Definition: vector2d.h:590

References Alignment, AreaColor, BorderColor, BottomLeft, FontID, IsSolid, IsWordWrapped, LEFT, Location, NOTE, ALTIUM_PARSER::ReadBool(), ALTIUM_PARSER::ReadInt(), ReadKiCadUnitFrac(), ReadRecord(), ALTIUM_PARSER::ReadString(), ShowBorder, Size, Text, TEXT_FRAME, TextMargin, TopRight, VECTOR2< T >::x, and VECTOR2< T >::y.

Member Data Documentation

◆ Alignment

ASCH_TEXT_FRAME_ALIGNMENT ASCH_TEXT_FRAME::Alignment

Definition at line 312 of file altium_parser_sch.h.

Referenced by SCH_ALTIUM_PLUGIN::AddTextBox(), and ASCH_TEXT_FRAME().

◆ AreaColor

int ASCH_TEXT_FRAME::AreaColor

Definition at line 309 of file altium_parser_sch.h.

Referenced by SCH_ALTIUM_PLUGIN::AddTextBox(), and ASCH_TEXT_FRAME().

◆ BorderColor

int ASCH_TEXT_FRAME::BorderColor

Definition at line 310 of file altium_parser_sch.h.

Referenced by SCH_ALTIUM_PLUGIN::AddTextBox(), and ASCH_TEXT_FRAME().

◆ BottomLeft

VECTOR2I ASCH_TEXT_FRAME::BottomLeft

Definition at line 298 of file altium_parser_sch.h.

Referenced by SCH_ALTIUM_PLUGIN::AddTextBox(), and ASCH_TEXT_FRAME().

◆ FontID

int ASCH_TEXT_FRAME::FontID

Definition at line 307 of file altium_parser_sch.h.

Referenced by SCH_ALTIUM_PLUGIN::AddTextBox(), and ASCH_TEXT_FRAME().

◆ IsSolid

bool ASCH_TEXT_FRAME::IsSolid

Definition at line 305 of file altium_parser_sch.h.

Referenced by SCH_ALTIUM_PLUGIN::AddTextBox(), and ASCH_TEXT_FRAME().

◆ IsWordWrapped

bool ASCH_TEXT_FRAME::IsWordWrapped

Definition at line 303 of file altium_parser_sch.h.

Referenced by ASCH_TEXT_FRAME().

◆ Location

VECTOR2I ASCH_TEXT_FRAME::Location

Definition at line 294 of file altium_parser_sch.h.

Referenced by ASCH_TEXT_FRAME().

◆ ShowBorder

bool ASCH_TEXT_FRAME::ShowBorder

Definition at line 304 of file altium_parser_sch.h.

Referenced by SCH_ALTIUM_PLUGIN::AddTextBox(), and ASCH_TEXT_FRAME().

◆ Size

wxSize ASCH_TEXT_FRAME::Size

Definition at line 295 of file altium_parser_sch.h.

Referenced by ASCH_TEXT_FRAME().

◆ Text

wxString ASCH_TEXT_FRAME::Text

Definition at line 301 of file altium_parser_sch.h.

Referenced by SCH_ALTIUM_PLUGIN::AddTextBox(), and ASCH_TEXT_FRAME().

◆ TextMargin

int ASCH_TEXT_FRAME::TextMargin

Definition at line 308 of file altium_parser_sch.h.

Referenced by ASCH_TEXT_FRAME().

◆ TopRight

VECTOR2I ASCH_TEXT_FRAME::TopRight

Definition at line 299 of file altium_parser_sch.h.

Referenced by SCH_ALTIUM_PLUGIN::AddTextBox(), and ASCH_TEXT_FRAME().


The documentation for this struct was generated from the following files: