2020-10-14 01:06:53 +00:00
|
|
|
/*
|
|
|
|
* This program source code file is part of KiCad, a free EDA CAD application.
|
|
|
|
*
|
|
|
|
* Copyright (C) 2015 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com
|
2022-01-25 22:33:37 +00:00
|
|
|
* Copyright (C) 1992-2022 KiCad Developers, see AUTHORS.txt for contributors.
|
2020-10-14 01:06:53 +00: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
|
|
|
|
*/
|
|
|
|
|
2020-10-16 15:51:24 +00:00
|
|
|
#include <algorithm>
|
2020-10-14 01:06:53 +00:00
|
|
|
|
|
|
|
#include <bitmaps.h>
|
|
|
|
#include <eda_item.h>
|
|
|
|
#include <trace_helpers.h>
|
|
|
|
#include <trigo.h>
|
2020-10-16 15:51:24 +00:00
|
|
|
#include <i18n_utility.h>
|
2021-06-01 05:17:57 +00:00
|
|
|
#include <wx/log.h>
|
2020-10-14 01:06:53 +00:00
|
|
|
|
2021-02-06 01:01:50 +00:00
|
|
|
#include <wx/fdrepdlg.h>
|
2020-10-14 01:06:53 +00:00
|
|
|
|
|
|
|
EDA_ITEM::EDA_ITEM( EDA_ITEM* parent, KICAD_T idType ) :
|
2020-11-14 18:11:28 +00:00
|
|
|
m_status( 0 ),
|
|
|
|
m_parent( parent ),
|
2020-10-14 01:06:53 +00:00
|
|
|
m_forceVisible( false ),
|
2020-12-18 15:16:00 +00:00
|
|
|
m_flags( 0 ),
|
|
|
|
m_structType( idType )
|
2020-10-14 01:06:53 +00:00
|
|
|
{ }
|
|
|
|
|
|
|
|
|
|
|
|
EDA_ITEM::EDA_ITEM( KICAD_T idType ) :
|
2020-11-14 18:11:28 +00:00
|
|
|
m_status( 0 ),
|
|
|
|
m_parent( nullptr ),
|
2020-10-14 01:06:53 +00:00
|
|
|
m_forceVisible( false ),
|
2020-12-18 15:16:00 +00:00
|
|
|
m_flags( 0 ),
|
|
|
|
m_structType( idType )
|
2020-10-14 01:06:53 +00:00
|
|
|
{ }
|
|
|
|
|
|
|
|
|
|
|
|
EDA_ITEM::EDA_ITEM( const EDA_ITEM& base ) :
|
|
|
|
m_Uuid( base.m_Uuid ),
|
2020-11-14 18:11:28 +00:00
|
|
|
m_status( base.m_status ),
|
|
|
|
m_parent( base.m_parent ),
|
2020-10-14 01:06:53 +00:00
|
|
|
m_forceVisible( base.m_forceVisible ),
|
2020-12-18 15:16:00 +00:00
|
|
|
m_flags( base.m_flags ),
|
|
|
|
m_structType( base.m_structType )
|
2020-10-14 01:06:53 +00:00
|
|
|
{ }
|
|
|
|
|
|
|
|
|
|
|
|
void EDA_ITEM::SetModified()
|
|
|
|
{
|
|
|
|
SetFlags( IS_CHANGED );
|
|
|
|
|
|
|
|
// If this a child object, then the parent modification state also needs to be set.
|
2020-11-14 18:11:28 +00:00
|
|
|
if( m_parent )
|
|
|
|
m_parent->SetModified();
|
2020-10-14 01:06:53 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2022-08-31 09:15:42 +00:00
|
|
|
const BOX2I EDA_ITEM::GetBoundingBox() const
|
2020-10-14 01:06:53 +00:00
|
|
|
{
|
|
|
|
// return a zero-sized box per default. derived classes should override
|
|
|
|
// this
|
2022-08-31 09:15:42 +00:00
|
|
|
return BOX2I( VECTOR2I( 0, 0 ), VECTOR2I( 0, 0 ) );
|
2020-10-14 01:06:53 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
EDA_ITEM* EDA_ITEM::Clone() const
|
|
|
|
{
|
2021-07-15 19:26:35 +00:00
|
|
|
wxCHECK_MSG( false, nullptr, wxT( "Clone not implemented in derived class " ) + GetClass() +
|
2020-10-14 01:06:53 +00:00
|
|
|
wxT( ". Bad programmer!" ) );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// see base_struct.h
|
|
|
|
// many classes inherit this method, be careful:
|
2022-08-20 09:27:35 +00:00
|
|
|
INSPECT_RESULT EDA_ITEM::Visit( INSPECTOR inspector, void* testData,
|
2022-08-21 19:54:07 +00:00
|
|
|
const std::vector<KICAD_T>& aScanTypes )
|
2020-10-14 01:06:53 +00:00
|
|
|
{
|
|
|
|
#if 0 && defined(DEBUG)
|
|
|
|
std::cout << GetClass().mb_str() << ' ';
|
|
|
|
#endif
|
|
|
|
|
2022-08-20 09:27:35 +00:00
|
|
|
if( IsType( aScanTypes ) )
|
2020-10-14 01:06:53 +00:00
|
|
|
{
|
2022-07-30 00:00:39 +00:00
|
|
|
if( INSPECT_RESULT::QUIT == inspector( this, testData ) )
|
|
|
|
return INSPECT_RESULT::QUIT;
|
2020-10-14 01:06:53 +00:00
|
|
|
}
|
|
|
|
|
2022-07-30 00:00:39 +00:00
|
|
|
return INSPECT_RESULT::CONTINUE;
|
2020-10-14 01:06:53 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
wxString EDA_ITEM::GetSelectMenuText( EDA_UNITS aUnits ) const
|
|
|
|
{
|
|
|
|
wxFAIL_MSG( wxT( "GetSelectMenuText() was not overridden for schematic item type " ) +
|
|
|
|
GetClass() );
|
|
|
|
|
|
|
|
return wxString( wxT( "Undefined menu text for " ) + GetClass() );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2022-08-05 02:40:38 +00:00
|
|
|
bool EDA_ITEM::Matches( const wxString& aText, const EDA_SEARCH_DATA& aSearchData ) const
|
2020-10-14 01:06:53 +00:00
|
|
|
{
|
|
|
|
wxString text = aText;
|
2022-08-05 02:40:38 +00:00
|
|
|
wxString searchText = aSearchData.findString;
|
2020-10-14 01:06:53 +00:00
|
|
|
|
|
|
|
// Don't match if searching for replaceable item and the item doesn't support text replace.
|
2022-08-05 02:40:38 +00:00
|
|
|
if( aSearchData.searchAndReplace && !IsReplaceable() )
|
2020-10-14 01:06:53 +00:00
|
|
|
return false;
|
|
|
|
|
2022-08-05 02:40:38 +00:00
|
|
|
if( !aSearchData.matchCase )
|
2020-10-14 01:06:53 +00:00
|
|
|
{
|
2021-11-05 13:35:11 +00:00
|
|
|
text.MakeUpper();
|
|
|
|
searchText.MakeUpper();
|
2020-10-14 01:06:53 +00:00
|
|
|
}
|
|
|
|
|
2022-08-05 02:40:38 +00:00
|
|
|
if( aSearchData.matchMode == EDA_SEARCH_MATCH_MODE::WHOLEWORD )
|
2021-11-05 13:35:11 +00:00
|
|
|
{
|
|
|
|
int ii = 0;
|
2020-10-14 01:06:53 +00:00
|
|
|
|
2021-11-05 13:35:11 +00:00
|
|
|
while( ii < (int) text.length() )
|
|
|
|
{
|
|
|
|
int next = text.find( searchText, ii );
|
2020-10-14 01:06:53 +00:00
|
|
|
|
2021-11-05 13:35:11 +00:00
|
|
|
if( next == wxNOT_FOUND )
|
|
|
|
return false;
|
2020-10-14 01:06:53 +00:00
|
|
|
|
2021-11-05 13:35:11 +00:00
|
|
|
ii = next;
|
|
|
|
next += searchText.length();
|
2020-10-14 01:06:53 +00:00
|
|
|
|
2021-11-05 13:35:11 +00:00
|
|
|
bool startOK = ( ii == 0 || !wxIsalnum( text.GetChar( ii - 1 ) ) );
|
|
|
|
bool endOK = ( next == (int) text.length() || !wxIsalnum( text.GetChar( next ) ) );
|
|
|
|
|
|
|
|
if( startOK && endOK )
|
|
|
|
return true;
|
|
|
|
else
|
|
|
|
ii++;
|
|
|
|
}
|
2020-10-14 01:06:53 +00:00
|
|
|
|
|
|
|
return false;
|
2021-11-05 13:35:11 +00:00
|
|
|
}
|
2022-08-05 02:40:38 +00:00
|
|
|
else if( aSearchData.matchMode == EDA_SEARCH_MATCH_MODE::WILDCARD )
|
2021-11-05 13:35:11 +00:00
|
|
|
{
|
|
|
|
return text.Matches( searchText );
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
return text.Find( searchText ) != wxNOT_FOUND;
|
|
|
|
}
|
|
|
|
}
|
2020-10-14 01:06:53 +00:00
|
|
|
|
|
|
|
|
2022-08-05 02:40:38 +00:00
|
|
|
bool EDA_ITEM::Replace( const EDA_SEARCH_DATA& aSearchData, wxString& aText )
|
2021-11-05 13:35:11 +00:00
|
|
|
{
|
|
|
|
wxString text = aText;
|
2022-08-05 02:40:38 +00:00
|
|
|
wxString searchText = aSearchData.findString;
|
2021-11-05 13:35:11 +00:00
|
|
|
wxString result;
|
|
|
|
bool replaced = false;
|
2020-10-14 01:06:53 +00:00
|
|
|
|
2022-08-05 02:40:38 +00:00
|
|
|
if( !aSearchData.matchCase )
|
2021-11-05 13:35:11 +00:00
|
|
|
{
|
|
|
|
text = text.Upper();
|
|
|
|
searchText = searchText.Upper();
|
|
|
|
}
|
|
|
|
|
|
|
|
int ii = 0;
|
2020-10-14 01:06:53 +00:00
|
|
|
|
2021-11-05 13:35:11 +00:00
|
|
|
while( ii < (int) text.length() )
|
|
|
|
{
|
|
|
|
int next = text.find( searchText, ii );
|
|
|
|
|
|
|
|
if( next == wxNOT_FOUND )
|
|
|
|
{
|
|
|
|
result += aText.Mid( ii, wxString::npos );
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
if( next > ii )
|
|
|
|
result += aText.Mid( ii, next - ii );
|
|
|
|
|
|
|
|
ii = next;
|
|
|
|
next += searchText.length();
|
|
|
|
|
|
|
|
bool startOK;
|
|
|
|
bool endOK;
|
|
|
|
|
2022-08-05 02:40:38 +00:00
|
|
|
if( aSearchData.matchMode == EDA_SEARCH_MATCH_MODE::WHOLEWORD )
|
2021-11-05 13:35:11 +00:00
|
|
|
{
|
|
|
|
startOK = ( ii == 0 || !wxIsalnum( text.GetChar( ii - 1 ) ) );
|
|
|
|
endOK = ( next == (int) text.length() || !wxIsalnum( text.GetChar( next ) ) );
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
startOK = true;
|
|
|
|
endOK = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
if( startOK && endOK )
|
|
|
|
{
|
2022-08-05 02:40:38 +00:00
|
|
|
result += aSearchData.replaceString;
|
2021-11-05 13:35:11 +00:00
|
|
|
replaced = true;
|
|
|
|
ii = next;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
result += aText.GetChar( ii );
|
|
|
|
ii++;
|
|
|
|
}
|
|
|
|
}
|
2020-10-14 01:06:53 +00:00
|
|
|
|
2021-11-05 13:35:11 +00:00
|
|
|
aText = result;
|
|
|
|
return replaced;
|
2020-10-14 01:06:53 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bool EDA_ITEM::operator<( const EDA_ITEM& aItem ) const
|
|
|
|
{
|
|
|
|
wxFAIL_MSG( wxString::Format( wxT( "Less than operator not defined for item type %s." ),
|
2021-07-15 19:26:35 +00:00
|
|
|
GetClass() ) );
|
2020-10-14 01:06:53 +00:00
|
|
|
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2021-07-15 19:26:35 +00:00
|
|
|
|
2020-10-14 01:06:53 +00:00
|
|
|
EDA_ITEM& EDA_ITEM::operator=( const EDA_ITEM& aItem )
|
|
|
|
{
|
|
|
|
// do not call initVars()
|
|
|
|
|
2020-11-14 18:11:28 +00:00
|
|
|
m_structType = aItem.m_structType;
|
|
|
|
m_flags = aItem.m_flags;
|
|
|
|
m_status = aItem.m_status;
|
|
|
|
m_parent = aItem.m_parent;
|
2020-10-14 01:06:53 +00:00
|
|
|
m_forceVisible = aItem.m_forceVisible;
|
|
|
|
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
2021-07-15 19:26:35 +00:00
|
|
|
|
2020-10-14 01:06:53 +00:00
|
|
|
const BOX2I EDA_ITEM::ViewBBox() const
|
|
|
|
{
|
|
|
|
// Basic fallback
|
2022-08-31 09:15:42 +00:00
|
|
|
return GetBoundingBox();
|
2020-10-14 01:06:53 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void EDA_ITEM::ViewGetLayers( int aLayers[], int& aCount ) const
|
|
|
|
{
|
|
|
|
// Basic fallback
|
|
|
|
aCount = 1;
|
|
|
|
aLayers[0] = 0;
|
|
|
|
}
|
|
|
|
|
2021-07-15 19:26:35 +00:00
|
|
|
|
2021-03-08 02:59:07 +00:00
|
|
|
BITMAPS EDA_ITEM::GetMenuImage() const
|
2020-10-14 01:06:53 +00:00
|
|
|
{
|
2021-03-08 02:59:07 +00:00
|
|
|
return BITMAPS::dummy_item;
|
2020-10-14 01:06:53 +00:00
|
|
|
}
|
|
|
|
|
2021-07-15 19:26:35 +00:00
|
|
|
|
|
|
|
#if defined( DEBUG )
|
2020-10-14 01:06:53 +00:00
|
|
|
|
|
|
|
void EDA_ITEM::ShowDummy( std::ostream& os ) const
|
|
|
|
{
|
|
|
|
// XML output:
|
|
|
|
wxString s = GetClass();
|
|
|
|
|
|
|
|
os << '<' << s.Lower().mb_str() << ">"
|
|
|
|
<< " Need ::Show() override for this class "
|
|
|
|
<< "</" << s.Lower().mb_str() << ">\n";
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
std::ostream& EDA_ITEM::NestedSpace( int nestLevel, std::ostream& os )
|
|
|
|
{
|
|
|
|
for( int i = 0; i<nestLevel; ++i )
|
|
|
|
os << " ";
|
|
|
|
|
|
|
|
// number of spaces here controls indent per nest level
|
|
|
|
|
|
|
|
return os;
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
2022-05-08 22:54:24 +00:00
|
|
|
wxString EDA_ITEM::GetTypeDesc()
|
|
|
|
{
|
|
|
|
//@see EDA_ITEM_DESC for definition of ENUM_MAP<KICAD_T>
|
|
|
|
wxString typeDescr = ENUM_MAP<KICAD_T>::Instance().ToString( Type() );
|
|
|
|
|
|
|
|
return wxGetTranslation( typeDescr );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-10-14 01:06:53 +00:00
|
|
|
static struct EDA_ITEM_DESC
|
|
|
|
{
|
|
|
|
EDA_ITEM_DESC()
|
|
|
|
{
|
|
|
|
ENUM_MAP<KICAD_T>::Instance()
|
|
|
|
.Undefined( TYPE_NOT_INIT )
|
2021-12-04 23:52:00 +00:00
|
|
|
.Map( NOT_USED, wxT( "<not used>" ) )
|
|
|
|
.Map( SCREEN_T, _HKI( "Screen" ) )
|
|
|
|
|
|
|
|
.Map( PCB_FOOTPRINT_T, _HKI( "Footprint" ) )
|
|
|
|
.Map( PCB_PAD_T, _HKI( "Pad" ) )
|
|
|
|
.Map( PCB_SHAPE_T, _HKI( "Graphic" ) )
|
2022-02-08 19:29:54 +00:00
|
|
|
.Map( PCB_BITMAP_T, _HKI( "Bitmap" ) )
|
2021-12-04 23:52:00 +00:00
|
|
|
.Map( PCB_TEXT_T, _HKI( "Text" ) )
|
2022-01-30 10:52:52 +00:00
|
|
|
.Map( PCB_TEXTBOX_T, _HKI( "Text Box" ) )
|
2021-12-04 23:52:00 +00:00
|
|
|
.Map( PCB_FP_TEXT_T, _HKI( "Text" ) )
|
2022-01-30 10:52:52 +00:00
|
|
|
.Map( PCB_FP_TEXTBOX_T, _HKI( "Text Box" ) )
|
2021-12-04 23:52:00 +00:00
|
|
|
.Map( PCB_FP_SHAPE_T, _HKI( "Graphic" ) )
|
|
|
|
.Map( PCB_FP_DIM_ALIGNED_T, _HKI( "Dimension" ) )
|
|
|
|
.Map( PCB_FP_DIM_ORTHOGONAL_T, _HKI( "Dimension" ) )
|
|
|
|
.Map( PCB_FP_DIM_CENTER_T, _HKI( "Dimension" ) )
|
|
|
|
.Map( PCB_FP_DIM_RADIAL_T, _HKI( "Dimension" ) )
|
|
|
|
.Map( PCB_FP_DIM_LEADER_T, _HKI( "Leader" ) )
|
|
|
|
.Map( PCB_FP_ZONE_T, _HKI( "Zone" ) )
|
|
|
|
.Map( PCB_TRACE_T, _HKI( "Track" ) )
|
2022-04-13 23:03:06 +00:00
|
|
|
.Map( PCB_ARC_T, _HKI( "Track" ) )
|
2021-12-04 23:52:00 +00:00
|
|
|
.Map( PCB_VIA_T, _HKI( "Via" ) )
|
|
|
|
.Map( PCB_MARKER_T, _HKI( "Marker" ) )
|
|
|
|
.Map( PCB_DIM_ALIGNED_T, _HKI( "Dimension" ) )
|
|
|
|
.Map( PCB_DIM_ORTHOGONAL_T, _HKI( "Dimension" ) )
|
|
|
|
.Map( PCB_DIM_CENTER_T, _HKI( "Dimension" ) )
|
|
|
|
.Map( PCB_DIM_RADIAL_T, _HKI( "Dimension" ) )
|
|
|
|
.Map( PCB_DIM_LEADER_T, _HKI( "Leader" ) )
|
|
|
|
.Map( PCB_TARGET_T, _HKI( "Target" ) )
|
|
|
|
.Map( PCB_ZONE_T, _HKI( "Zone" ) )
|
|
|
|
.Map( PCB_ITEM_LIST_T, _HKI( "ItemList" ) )
|
|
|
|
.Map( PCB_NETINFO_T, _HKI( "NetInfo" ) )
|
|
|
|
.Map( PCB_GROUP_T, _HKI( "Group" ) )
|
|
|
|
|
|
|
|
.Map( SCH_MARKER_T, _HKI( "Marker" ) )
|
|
|
|
.Map( SCH_JUNCTION_T, _HKI( "Junction" ) )
|
|
|
|
.Map( SCH_NO_CONNECT_T, _HKI( "No-Connect Flag" ) )
|
|
|
|
.Map( SCH_BUS_WIRE_ENTRY_T, _HKI( "Wire Entry" ) )
|
|
|
|
.Map( SCH_BUS_BUS_ENTRY_T, _HKI( "Bus Entry" ) )
|
|
|
|
.Map( SCH_LINE_T, _HKI( "Line" ) )
|
|
|
|
.Map( SCH_BITMAP_T, _HKI( "Bitmap" ) )
|
|
|
|
.Map( SCH_TEXT_T, _HKI( "Text" ) )
|
2022-01-25 22:33:37 +00:00
|
|
|
.Map( SCH_TEXTBOX_T, _HKI( "Text Box" ) )
|
2021-12-04 23:52:00 +00:00
|
|
|
.Map( SCH_LABEL_T, _HKI( "Net Label" ) )
|
2022-01-24 13:40:39 +00:00
|
|
|
.Map( SCH_DIRECTIVE_LABEL_T, _HKI( "Directive Label" ) )
|
2021-12-04 23:52:00 +00:00
|
|
|
.Map( SCH_GLOBAL_LABEL_T, _HKI( "Global Label" ) )
|
|
|
|
.Map( SCH_HIER_LABEL_T, _HKI( "Hierarchical Label" ) )
|
|
|
|
.Map( SCH_FIELD_T, _HKI( "Field" ) )
|
|
|
|
.Map( SCH_SYMBOL_T, _HKI( "Symbol" ) )
|
|
|
|
.Map( SCH_PIN_T, _HKI( "Pin" ) )
|
|
|
|
.Map( SCH_SHEET_PIN_T, _HKI( "Sheet Pin" ) )
|
|
|
|
.Map( SCH_SHEET_T, _HKI( "Sheet" ) )
|
2020-10-16 15:51:24 +00:00
|
|
|
|
|
|
|
// Synthetic search tokens don't need to be included...
|
|
|
|
//.Map( SCH_FIELD_LOCATE_REFERENCE_T, _HKI( "Field Locate Reference" ) )
|
|
|
|
//.Map( SCH_FIELD_LOCATE_VALUE_T, _HKI( "Field Locate Value" ) )
|
|
|
|
//.Map( SCH_FIELD_LOCATE_FOOTPRINT_T, _HKI( "Field Locate Footprint" ) )
|
|
|
|
|
2021-12-04 23:52:00 +00:00
|
|
|
.Map( SCH_SCREEN_T, _HKI( "SCH Screen" ) )
|
2020-10-16 15:51:24 +00:00
|
|
|
|
2021-12-04 23:52:00 +00:00
|
|
|
.Map( LIB_SYMBOL_T, _HKI( "Symbol" ) )
|
|
|
|
.Map( LIB_ALIAS_T, _HKI( "Alias" ) )
|
|
|
|
.Map( LIB_SHAPE_T, _HKI( "Graphic" ) )
|
|
|
|
.Map( LIB_TEXT_T, _HKI( "Text" ) )
|
2022-01-25 22:33:37 +00:00
|
|
|
.Map( LIB_TEXTBOX_T, _HKI( "Text Box" ) )
|
2021-12-04 23:52:00 +00:00
|
|
|
.Map( LIB_PIN_T, _HKI( "Pin" ) )
|
|
|
|
.Map( LIB_FIELD_T, _HKI( "Symbol Field" ) )
|
2020-10-16 15:51:24 +00:00
|
|
|
|
2021-12-04 23:52:00 +00:00
|
|
|
.Map( GERBER_LAYOUT_T, _HKI( "Gerber Layout" ) )
|
|
|
|
.Map( GERBER_DRAW_ITEM_T, _HKI( "Draw Item" ) )
|
|
|
|
.Map( GERBER_IMAGE_T, _HKI( "Image" ) );
|
2020-10-14 01:06:53 +00:00
|
|
|
|
|
|
|
PROPERTY_MANAGER& propMgr = PROPERTY_MANAGER::Instance();
|
|
|
|
REGISTER_TYPE( EDA_ITEM );
|
|
|
|
propMgr.AddProperty( new PROPERTY_ENUM<EDA_ITEM, KICAD_T>( "Type",
|
|
|
|
NO_SETTER( EDA_ITEM, KICAD_T ), &EDA_ITEM::Type ) );
|
|
|
|
}
|
|
|
|
} _EDA_ITEM_DESC;
|
|
|
|
|
2020-12-18 15:40:13 +00:00
|
|
|
ENUM_TO_WXANY( KICAD_T );
|