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

wxPoint location
 
wxSize size
 
wxString text
 
int fontId
 
bool isWordWrapped
 
bool border
 
int textMargin
 
int areaColor
 
ASCH_TEXT_FRAME_ALIGNMENT alignment
 

Detailed Description

Definition at line 267 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 230 of file altium_parser_sch.cpp.

231 {
232  wxASSERT( ReadRecord( aProps ) == ALTIUM_SCH_RECORD::NOTE
233  || ReadRecord( aProps ) == ALTIUM_SCH_RECORD::TEXT_FRAME );
234 
235  location = wxPoint( ReadKiCadUnitFrac( aProps, "LOCATION.X" ),
236  -ReadKiCadUnitFrac( aProps, "LOCATION.Y" ) );
237  size = wxSize( ReadKiCadUnitFrac( aProps, "CORNER.X" ) - location.x,
238  -ReadKiCadUnitFrac( aProps, "CORNER.Y" ) - location.y );
239 
240  text = ALTIUM_PARSER::ReadString( aProps, "TEXT", "" );
241  text.Replace( "~1", "\n", true );
242 
243  fontId = ALTIUM_PARSER::ReadInt( aProps, "FONTID", 0 );
244  isWordWrapped = ALTIUM_PARSER::ReadBool( aProps, "WORDWRAP", false );
245  border = ALTIUM_PARSER::ReadBool( aProps, "SHOWBORDER", false );
246  textMargin = ReadKiCadUnitFrac( aProps, "TEXTMARGIN" );
247  areaColor = ALTIUM_PARSER::ReadInt( aProps, "AREACOLOR", 0 );
248 
249  alignment = ReadEnum<ASCH_TEXT_FRAME_ALIGNMENT>( aProps, "ALIGNMENT", 1, 3,
251 }
static int ReadInt(const std::map< wxString, wxString > &aProps, const wxString &aKey, int aDefault)
static bool ReadBool(const std::map< wxString, wxString > &aProps, const wxString &aKey, bool aDefault)
int ReadKiCadUnitFrac(const std::map< wxString, wxString > &aProps, const wxString &aKey)
ALTIUM_SCH_RECORD ReadRecord(const std::map< wxString, wxString > &aProps)
ASCH_TEXT_FRAME_ALIGNMENT alignment
static wxString ReadString(const std::map< wxString, wxString > &aProps, const wxString &aKey, const wxString &aDefault)

References alignment, areaColor, border, fontId, isWordWrapped, LEFT, location, NOTE, ALTIUM_PARSER::ReadBool(), ALTIUM_PARSER::ReadInt(), ReadKiCadUnitFrac(), ReadRecord(), ALTIUM_PARSER::ReadString(), size, text, TEXT_FRAME, and textMargin.

Member Data Documentation

◆ alignment

◆ areaColor

int ASCH_TEXT_FRAME::areaColor

Definition at line 278 of file altium_parser_sch.h.

Referenced by ASCH_TEXT_FRAME().

◆ border

bool ASCH_TEXT_FRAME::border

Definition at line 276 of file altium_parser_sch.h.

Referenced by ASCH_TEXT_FRAME().

◆ fontId

int ASCH_TEXT_FRAME::fontId

◆ isWordWrapped

bool ASCH_TEXT_FRAME::isWordWrapped

Definition at line 275 of file altium_parser_sch.h.

Referenced by ASCH_TEXT_FRAME().

◆ location

wxPoint ASCH_TEXT_FRAME::location

◆ size

wxSize ASCH_TEXT_FRAME::size

Definition at line 270 of file altium_parser_sch.h.

Referenced by ASCH_TEXT_FRAME().

◆ text

wxString ASCH_TEXT_FRAME::text

◆ textMargin

int ASCH_TEXT_FRAME::textMargin

Definition at line 277 of file altium_parser_sch.h.

Referenced by ASCH_TEXT_FRAME().


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