36 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52,
37 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x08, 0x06, 0x00, 0x00, 0x00, 0x1f, 0xf3, 0xff,
38 0x61, 0x00, 0x00, 0x00, 0x5f, 0x49, 0x44, 0x41, 0x54, 0x38, 0xcb, 0x63, 0xf8, 0xff, 0xff, 0x3f,
39 0x03, 0x25, 0x98, 0x61, 0x68, 0x1a, 0x00, 0x04, 0x46, 0x40, 0xfc, 0x02, 0x88, 0x45, 0x41, 0x1c,
40 0x76, 0x20, 0xfe, 0x01, 0xc4, 0xbe, 0x24, 0x18, 0x60, 0x01, 0xc4, 0x20, 0x86, 0x04, 0x88, 0xc3,
41 0x01, 0xe5, 0x04, 0x0c, 0xb8, 0x01, 0x37, 0x81, 0xf8, 0x04, 0x91, 0xf8, 0x0a, 0x54, 0x8f, 0x06,
42 0xb2, 0x01, 0x9b, 0x81, 0x78, 0x02, 0x91, 0x78, 0x05, 0x54, 0x8f, 0xca, 0xe0, 0x08, 0x03, 0x36,
43 0xa8, 0xbf, 0xec, 0xc8, 0x32, 0x80, 0xcc, 0x84, 0x04, 0x0a, 0xbc, 0x1d, 0x40, 0x2c, 0xc8, 0x30,
44 0xf4, 0x33, 0x13, 0x00, 0x6b, 0x1a, 0x46, 0x7b, 0x68, 0xe7, 0x0f, 0x0b, 0x00, 0x00, 0x00, 0x00,
45 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82,
54 m_forceVisible( false ),
56 m_structType( idType )
63 m_forceVisible( false ),
65 m_structType( idType )
70 m_Uuid( base.m_Uuid ),
71 m_status( base.m_status ),
72 m_parent( base.m_parent ),
73 m_forceVisible( base.m_forceVisible ),
74 m_flags( base.m_flags ),
75 m_structType( base.m_structType )
93 return EDA_RECT( wxPoint( 0, 0 ), wxSize( 0, 0 ) );
99 wxCHECK_MSG(
false,
NULL, wxT(
"Clone not implemented in derived class " ) +
GetClass() +
100 wxT(
". Bad programmer!" ) );
109 #if 0 && defined(DEBUG) 110 std::cout <<
GetClass().mb_str() <<
' ';
125 wxFAIL_MSG( wxT(
"GetSelectMenuText() was not overridden for schematic item type " ) +
128 return wxString( wxT(
"Undefined menu text for " ) +
GetClass() );
134 wxString text = aText;
135 wxString searchText = aSearchData.GetFindString();
141 if( aSearchData.GetFlags() & wxFR_WHOLEWORD )
142 return aText.IsSameAs( searchText, aSearchData.GetFlags() & wxFR_MATCHCASE );
146 if( aSearchData.GetFlags() & wxFR_MATCHCASE )
147 return text.Matches( searchText );
149 return text.MakeUpper().Matches( searchText.MakeUpper() );
152 if( aSearchData.GetFlags() & wxFR_MATCHCASE )
153 return aText.Find( searchText ) != wxNOT_FOUND;
155 return text.MakeUpper().Find( searchText.MakeUpper() ) != wxNOT_FOUND;
161 wxString searchString = (aSearchData.GetFlags() & wxFR_MATCHCASE) ? aText : aText.Upper();
163 int result = searchString.Find( (aSearchData.GetFlags() & wxFR_MATCHCASE) ?
164 aSearchData.GetFindString() :
165 aSearchData.GetFindString().Upper() );
167 if( result == wxNOT_FOUND )
170 wxString prefix = aText.Left( result );
173 if( aSearchData.GetFindString().length() + result < aText.length() )
174 suffix = aText.Right( aText.length() - ( aSearchData.GetFindString().length() + result ) );
176 wxLogTrace(
traceFindReplace, wxT(
"Replacing '%s', prefix '%s', replace '%s', suffix '%s'." ),
177 aText, prefix, aSearchData.GetReplaceString(), suffix );
179 aText = prefix + aSearchData.GetReplaceString() + suffix;
187 wxFAIL_MSG(
wxString::Format( wxT(
"Less than operator not defined for item type %s." ),
229 void EDA_ITEM::ShowDummy( std::ostream& os )
const 234 os <<
'<' << s.Lower().mb_str() <<
">" 235 <<
" Need ::Show() override for this class " 236 <<
"</" << s.Lower().mb_str() <<
">\n";
240 std::ostream& EDA_ITEM::NestedSpace(
int nestLevel, std::ostream& os )
242 for(
int i = 0; i<nestLevel; ++i )
259 .Map(
NOT_USED, wxT(
"<not used>" ) )
EDA_ITEM * m_parent
Linked list: Link (parent struct)
virtual SEARCH_RESULT Visit(INSPECTOR inspector, void *testData, const KICAD_T scanTypes[])
May be re-implemented for each derived class in order to handle all the types given by its member dat...
#define IS_CHANGED
Item was edited, and modified.
virtual bool Matches(const wxFindReplaceData &aSearchData, void *aAuxData) const
Compare the item against the search criteria in aSearchData.
static PROPERTY_MANAGER & Instance()
bool operator<(const EDA_ITEM &aItem) const
Test if another item is less than this object.
class ALIGNED_DIMENSION, a linear dimension (graphic item)
class LEADER, a leader dimension (graphic item)
const wxChar *const traceFindReplace
Flag to enable find and replace debug tracing.
class FP_TEXT, text in a footprint
PNG memory record (file in memory).
class PCB_GROUP, a set of BOARD_ITEMs
class CENTER_DIMENSION, a center point marking (graphic item)
the 3d code uses this value
static ENUM_MAP< T > & Instance()
class PCB_TEXT, text on a layer
class FP_SHAPE, a footprint edge
class PAD, a pad in a footprint
static const unsigned char dummy_png[]
#define NO_SETTER(owner, type)
const INSPECTOR_FUNC & INSPECTOR
KICAD_T
The set of class identification values stored in EDA_ITEM::m_structType.
virtual EDA_ITEM * Clone() const
Create a duplicate of this item with linked list members set to NULL.
not really an item, used to identify a screen
class TRACK, a track segment (segment on a copper layer)
void SetFlags(STATUS_FLAGS aMask)
virtual void ViewGetLayers(int aLayers[], int &aCount) const override
Return the all the layers within the VIEW the object is painted on.
const wxPoint GetOrigin() const
class BOARD_ITEM_LIST, a list of board items
static const BITMAP_OPAQUE dummy_xpm[1]
wxLogTrace helper definitions.
virtual bool IsType(const KICAD_T aScanTypes[]) const
Check whether the item is one of the listed types.
class ZONE, a copper pour area
static bool Replace(const wxFindReplaceData &aSearchData, wxString &aText)
Perform a text replace on aText using the find and replace criteria in aSearchData on items that supp...
EDA_ITEM & operator=(const EDA_ITEM &aItem)
Assign the members of aItem to another object.
EDA_ITEM(EDA_ITEM *parent, KICAD_T idType)
class PCB_TARGET, a target (graphic item)
class FOOTPRINT, a footprint
Some functions to handle hotkeys in KiCad.
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, const CPTREE &aTree)
Output a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
class MARKER_PCB, a marker used to show something
virtual wxString GetClass() const =0
Return the class name.
virtual wxString GetSelectMenuText(EDA_UNITS aUnits) const
Return the text to display to be used in the selection clarification context menu when multiple items...
class NETINFO_ITEM, a description of a net
void AddProperty(PROPERTY_BASE *aProperty)
Register a property.
class ZONE, managed by a footprint
virtual bool IsReplaceable() const
Override this method in any derived object that supports test find and replace.
Handle the component boundary box.
A base class for most all the KiCad significant classes used in schematics and boards.
KICAD_T m_structType
Run time identification, keep private so it can never be changed after a ctor sets it.
static struct EDA_ITEM_DESC _EDA_ITEM_DESC
Provide class metadata.Helper macro to map type hashes to names.
class ORTHOGONAL_DIMENSION, a linear dimension constrained to x/y
class VIA, a via (like a track segment on a copper layer)
virtual const EDA_RECT GetBoundingBox() const
Return the orthogonal bounding box of this object for display purposes.
virtual const BOX2I ViewBBox() const override
Return the bounding box of the item covering all its layers.
virtual BITMAP_DEF GetMenuImage() const
Return a pointer to an image to be used in menus.
class PCB_SHAPE, a segment not on copper layers
const wxSize GetSize() const
KICAD_T Type() const
Returns the type of object.