KiCAD pcbnew scripting
Public Member Functions | Static Public Attributes | List of all members
pcbnew.EDA_ITEM Class Reference
Inheritance diagram for pcbnew.EDA_ITEM:
Inheritance graph
[legend]

Public Member Functions

def __init__ (self, args, kwargs)
 
def Type (self)
 
def SetTimeStamp (self, aNewTimeStamp)
 
def GetTimeStamp (self)
 
def Next (self)
 
def Back (self)
 
def GetParent (self)
 
def GetList (self)
 
def SetParent (self, aParent)
 
def SetList (self, aList)
 
def IsNew (self)
 
def IsModified (self)
 
def IsMoving (self)
 
def IsDragging (self)
 
def IsWireImage (self)
 
def IsSelected (self)
 
def IsResized (self)
 
def IsHighlighted (self)
 
def IsBrightened (self)
 
def SetWireImage (self)
 
def SetSelected (self)
 
def SetHighlighted (self)
 
def SetBrightened (self)
 
def ClearSelected (self)
 
def ClearHighlighted (self)
 
def ClearBrightened (self)
 
def SetModified (self)
 
def GetState (self, type)
 
def SetState (self, type, state)
 
def GetStatus (self)
 
def SetStatus (self, aStatus)
 
def SetFlags (self, aMask)
 
def ClearFlags
 
def GetFlags (self)
 
def SetForceVisible (self, aEnable)
 
def GetMsgPanelInfo (self, aList)
 
def HitTest (self, aPosition)
 
def GetBoundingBox (self)
 
def Clone (self)
 
def IterateForward (listStart, inspector, testData, scanTypes)
 
def Visit (self, inspector, testData, scanTypes)
 
def GetClass (self)
 
def GetSelectMenuText (self)
 
def GetMenuImage (self)
 
def Matches (self, aSearchData, aAuxData, aFindLocation)
 
def Replace (self, args)
 
def IsReplaceable (self)
 
def __lt__ (self, aItem)
 
def Sort (aLeft, aRight)
 
def ViewBBox (self)
 
def ViewGetLayers (self, aLayers, aCount)
 

Static Public Attributes

tuple IterateForward = staticmethod(IterateForward)
 
tuple Sort = staticmethod(Sort)
 

Detailed Description

Class EDA_ITEM is a base class for most all the KiCad significant
classes, used in schematics and boards.

C++ includes: base_struct.h 

Definition at line 1477 of file pcbnew.py.

Constructor & Destructor Documentation

def pcbnew.EDA_ITEM.__init__ (   self,
  args,
  kwargs 
)

Definition at line 1491 of file pcbnew.py.

Member Function Documentation

def pcbnew.EDA_ITEM.__lt__ (   self,
  aItem 
)
__lt__(EDA_ITEM self, EDA_ITEM aItem) -> bool

Definition at line 2103 of file pcbnew.py.

def pcbnew.EDA_ITEM.Back (   self)
Back(EDA_ITEM self) -> EDA_ITEM

EDA_ITEM* EDA_ITEM::Back()
const 

Definition at line 1542 of file pcbnew.py.

def pcbnew.EDA_ITEM.ClearBrightened (   self)
ClearBrightened(EDA_ITEM self)

void
EDA_ITEM::ClearBrightened() 

Definition at line 1742 of file pcbnew.py.

def pcbnew.EDA_ITEM.ClearFlags (   self,
  aMask = -1 
)
ClearFlags(EDA_ITEM self, STATUS_FLAGS aMask=-1)
ClearFlags(EDA_ITEM self)

void
EDA_ITEM::ClearFlags(STATUS_FLAGS aMask=EDA_ITEM_ALL_FLAGS) 

Definition at line 1812 of file pcbnew.py.

def pcbnew.EDA_ITEM.ClearHighlighted (   self)
ClearHighlighted(EDA_ITEM self)

void
EDA_ITEM::ClearHighlighted() 

Definition at line 1732 of file pcbnew.py.

def pcbnew.EDA_ITEM.ClearSelected (   self)
ClearSelected(EDA_ITEM self)

void
EDA_ITEM::ClearSelected() 

Definition at line 1722 of file pcbnew.py.

def pcbnew.EDA_ITEM.Clone (   self)
Clone(EDA_ITEM self) -> EDA_ITEM

EDA_ITEM * EDA_ITEM::Clone()
const

Function Clone creates a duplicate of this item with linked list
members set to NULL.

The default version will return NULL in release builds and likely
crash the program. In debug builds, a warning message indicating the
derived class has not implemented cloning. This really should be a
pure virtual function. Due to the fact that there are so many objects
derived from EDA_ITEM, the decision was made to return NULL until all
the objects derived from EDA_ITEM implement cloning. Once that
happens, this function should be made pure.

A clone of the item. 

Definition at line 1913 of file pcbnew.py.

def pcbnew.EDA_ITEM.GetBoundingBox (   self)
GetBoundingBox(EDA_ITEM self) -> EDA_RECT

const EDA_RECT
EDA_ITEM::GetBoundingBox() const

Function GetBoundingBox returns the orthogonal, bounding box of this
object for display purposes.

This box should be an enclosing perimeter for visible components of
this object, and the units should be in the pcb or schematic
coordinate system. It is OK to overestimate the size by a few counts.

Definition at line 1895 of file pcbnew.py.

def pcbnew.EDA_ITEM.GetClass (   self)
GetClass(EDA_ITEM self) -> wxString

virtual wxString
EDA_ITEM::GetClass() const =0

Function GetClass returns the class name.

wxString 

Definition at line 1975 of file pcbnew.py.

def pcbnew.EDA_ITEM.GetFlags (   self)
GetFlags(EDA_ITEM self) -> STATUS_FLAGS

STATUS_FLAGS
EDA_ITEM::GetFlags() const 

Definition at line 1823 of file pcbnew.py.

def pcbnew.EDA_ITEM.GetList (   self)
GetList(EDA_ITEM self) -> DHEAD

DHEAD* EDA_ITEM::GetList()
const 

Definition at line 1562 of file pcbnew.py.

def pcbnew.EDA_ITEM.GetMenuImage (   self)
GetMenuImage(EDA_ITEM self) -> BITMAP_DEF

BITMAP_DEF
EDA_ITEM::GetMenuImage() const

Function GetMenuImage returns a pointer to an image to be used in
menus.

The default version returns the right arrow image. Override this
function to provide object specific menu images. The menu image
associated with the item. 

Definition at line 2009 of file pcbnew.py.

def pcbnew.EDA_ITEM.GetMsgPanelInfo (   self,
  aList 
)
GetMsgPanelInfo(EDA_ITEM self, std::vector< MSG_PANEL_ITEM,std::allocator< MSG_PANEL_ITEM > > & aList)

virtual void
EDA_ITEM::GetMsgPanelInfo(std::vector< MSG_PANEL_ITEM > &aList)

Function GetMsgPanelInfo populates aList of MSG_PANEL_ITEM objects
with it's internal state for display purposes.

This method replaces DisplayInfo() so that KiCad objects no longer
have any knowledge of wxWidgets UI objects.

Parameters:
-----------

aList:  is the list to populate. 

Definition at line 1853 of file pcbnew.py.

def pcbnew.EDA_ITEM.GetParent (   self)
GetParent(EDA_ITEM self) -> EDA_ITEM

EDA_ITEM*
EDA_ITEM::GetParent() const 

Definition at line 1552 of file pcbnew.py.

def pcbnew.EDA_ITEM.GetSelectMenuText (   self)
GetSelectMenuText(EDA_ITEM self) -> wxString

wxString
EDA_ITEM::GetSelectMenuText() const

Function GetSelectMenuText returns the text to display to be used in
the selection clarification context menu when multiple items are found
at the current cursor position.

The default version of this function raises an assertion in the debug
mode and returns a string to indicate that it was not overridden to
provide the object specific text.

The menu text string. 

Definition at line 1989 of file pcbnew.py.

def pcbnew.EDA_ITEM.GetState (   self,
  type 
)
GetState(EDA_ITEM self, int type) -> int

int EDA_ITEM::GetState(int
type) const 

Definition at line 1762 of file pcbnew.py.

def pcbnew.EDA_ITEM.GetStatus (   self)
GetStatus(EDA_ITEM self) -> STATUS_FLAGS

STATUS_FLAGS
EDA_ITEM::GetStatus() const 

Definition at line 1782 of file pcbnew.py.

def pcbnew.EDA_ITEM.GetTimeStamp (   self)
GetTimeStamp(EDA_ITEM self) -> time_t

time_t
EDA_ITEM::GetTimeStamp() const 

Definition at line 1522 of file pcbnew.py.

def pcbnew.EDA_ITEM.HitTest (   self,
  aPosition 
)
HitTest(EDA_ITEM self, wxPoint aPosition) -> bool

virtual bool
EDA_ITEM::HitTest(const wxPoint &aPosition) const

Function HitTest tests if aPosition is contained within or on the
bounding area of an item.

Parameters:
-----------

aPosition:  A reference to a wxPoint object containing the coordinates
to test.

True if aPosition is within or on the item bounding area. 

Definition at line 1874 of file pcbnew.py.

def pcbnew.EDA_ITEM.IsBrightened (   self)
IsBrightened(EDA_ITEM self) -> bool

bool
EDA_ITEM::IsBrightened() const 

Definition at line 1672 of file pcbnew.py.

def pcbnew.EDA_ITEM.IsDragging (   self)
IsDragging(EDA_ITEM self) -> bool

bool
EDA_ITEM::IsDragging() const 

Definition at line 1622 of file pcbnew.py.

def pcbnew.EDA_ITEM.IsHighlighted (   self)
IsHighlighted(EDA_ITEM self) -> bool

bool
EDA_ITEM::IsHighlighted() const 

Definition at line 1662 of file pcbnew.py.

def pcbnew.EDA_ITEM.IsModified (   self)
IsModified(EDA_ITEM self) -> bool

bool
EDA_ITEM::IsModified() const 

Definition at line 1602 of file pcbnew.py.

def pcbnew.EDA_ITEM.IsMoving (   self)
IsMoving(EDA_ITEM self) -> bool

bool EDA_ITEM::IsMoving()
const 

Definition at line 1612 of file pcbnew.py.

def pcbnew.EDA_ITEM.IsNew (   self)
IsNew(EDA_ITEM self) -> bool

bool EDA_ITEM::IsNew() const

Definition at line 1592 of file pcbnew.py.

def pcbnew.EDA_ITEM.IsReplaceable (   self)
IsReplaceable(EDA_ITEM self) -> bool

virtual bool
EDA_ITEM::IsReplaceable() const

Function IsReplaceable.

Override this method in any derived object that supports test find and
replace.

True if the item has replaceable text that can be modified using the
find and replace dialog. 

Definition at line 2085 of file pcbnew.py.

def pcbnew.EDA_ITEM.IsResized (   self)
IsResized(EDA_ITEM self) -> bool

bool
EDA_ITEM::IsResized() const 

Definition at line 1652 of file pcbnew.py.

def pcbnew.EDA_ITEM.IsSelected (   self)
IsSelected(EDA_ITEM self) -> bool

bool
EDA_ITEM::IsSelected() const 

Definition at line 1642 of file pcbnew.py.

def pcbnew.EDA_ITEM.IsWireImage (   self)
IsWireImage(EDA_ITEM self) -> bool

bool
EDA_ITEM::IsWireImage() const 

Definition at line 1632 of file pcbnew.py.

def pcbnew.EDA_ITEM.IterateForward (   listStart,
  inspector,
  testData,
  scanTypes 
)
IterateForward(EDA_ITEM listStart, INSPECTOR inspector, void * testData, KICAD_T const [] scanTypes) -> SEARCH_RESULT

Definition at line 1936 of file pcbnew.py.

def pcbnew.EDA_ITEM.Matches (   self,
  aSearchData,
  aAuxData,
  aFindLocation 
)
Matches(EDA_ITEM self, wxFindReplaceData & aSearchData, void * aAuxData, wxPoint aFindLocation) -> bool

virtual bool
EDA_ITEM::Matches(wxFindReplaceData &aSearchData, void *aAuxData,
wxPoint *aFindLocation)

Function Matches compares the item against the search criteria in
aSearchData.

The base class returns false since many of the objects derived from
EDA_ITEM do not have any text to search.

Parameters:
-----------

aSearchData:  A reference to a wxFindReplaceData object containing the
search criteria.

aAuxData:  A pointer to optional data required for the search or NULL
if not used.

aFindLocation:  A pointer to a wxPoint object to store the location of
matched item. The pointer can be NULL if it is not used.

True if the item's text matches the search criteria in aSearchData. 

Definition at line 2026 of file pcbnew.py.

def pcbnew.EDA_ITEM.Next (   self)
Next(EDA_ITEM self) -> EDA_ITEM

EDA_ITEM* EDA_ITEM::Next()
const 

Definition at line 1532 of file pcbnew.py.

def pcbnew.EDA_ITEM.Replace (   self,
  args 
)
Replace(EDA_ITEM self, wxFindReplaceData & aSearchData, wxString aText) -> bool
Replace(EDA_ITEM self, wxFindReplaceData & aSearchData, void * aAuxData=None) -> bool
Replace(EDA_ITEM self, wxFindReplaceData & aSearchData) -> bool

virtual bool
EDA_ITEM::Replace(wxFindReplaceData &aSearchData, void *aAuxData=NULL)

Function Replace performs a text replace using the find and replace
criteria in aSearchData on items that support text find and replace.

This function must be overridden for items that support text replace.

Parameters:
-----------

aSearchData:  A reference to a wxFindReplaceData object containing the
search and replace criteria.

aAuxData:  A pointer to optional data required for the search or NULL
if not used.

True if the item text was modified, otherwise false. 

Definition at line 2057 of file pcbnew.py.

def pcbnew.EDA_ITEM.SetBrightened (   self)
SetBrightened(EDA_ITEM self)

void
EDA_ITEM::SetBrightened() 

Definition at line 1712 of file pcbnew.py.

def pcbnew.EDA_ITEM.SetFlags (   self,
  aMask 
)
SetFlags(EDA_ITEM self, STATUS_FLAGS aMask)

void
EDA_ITEM::SetFlags(STATUS_FLAGS aMask) 

Definition at line 1802 of file pcbnew.py.

def pcbnew.EDA_ITEM.SetForceVisible (   self,
  aEnable 
)
SetForceVisible(EDA_ITEM self, bool aEnable)

void
EDA_ITEM::SetForceVisible(bool aEnable)

Function SetForceVisible is used to set and cleag force visible flag
used to force the item to be drawn even if it's draw attribute is set
to not visible.

Parameters:
-----------

aEnable:  True forces the item to be drawn. False uses the item's
visibility setting to determine if the item is to be drawn. 

Definition at line 1833 of file pcbnew.py.

def pcbnew.EDA_ITEM.SetHighlighted (   self)
SetHighlighted(EDA_ITEM self)

void
EDA_ITEM::SetHighlighted() 

Definition at line 1702 of file pcbnew.py.

def pcbnew.EDA_ITEM.SetList (   self,
  aList 
)
SetList(EDA_ITEM self, DHEAD aList)

void
EDA_ITEM::SetList(DHEAD *aList) 

Definition at line 1582 of file pcbnew.py.

def pcbnew.EDA_ITEM.SetModified (   self)
SetModified(EDA_ITEM self)

void
EDA_ITEM::SetModified() 

Definition at line 1752 of file pcbnew.py.

def pcbnew.EDA_ITEM.SetParent (   self,
  aParent 
)
SetParent(EDA_ITEM self, EDA_ITEM aParent)

void
EDA_ITEM::SetParent(EDA_ITEM *aParent) 

Definition at line 1572 of file pcbnew.py.

def pcbnew.EDA_ITEM.SetSelected (   self)
SetSelected(EDA_ITEM self)

void
EDA_ITEM::SetSelected() 

Definition at line 1692 of file pcbnew.py.

def pcbnew.EDA_ITEM.SetState (   self,
  type,
  state 
)
SetState(EDA_ITEM self, int type, int state)

void
EDA_ITEM::SetState(int type, int state) 

Definition at line 1772 of file pcbnew.py.

def pcbnew.EDA_ITEM.SetStatus (   self,
  aStatus 
)
SetStatus(EDA_ITEM self, STATUS_FLAGS aStatus)

void
EDA_ITEM::SetStatus(STATUS_FLAGS aStatus) 

Definition at line 1792 of file pcbnew.py.

def pcbnew.EDA_ITEM.SetTimeStamp (   self,
  aNewTimeStamp 
)
SetTimeStamp(EDA_ITEM self, time_t aNewTimeStamp)

void
EDA_ITEM::SetTimeStamp(time_t aNewTimeStamp) 

Definition at line 1512 of file pcbnew.py.

def pcbnew.EDA_ITEM.SetWireImage (   self)
SetWireImage(EDA_ITEM self)

void
EDA_ITEM::SetWireImage() 

Definition at line 1682 of file pcbnew.py.

def pcbnew.EDA_ITEM.Sort (   aLeft,
  aRight 
)
Sort(EDA_ITEM aLeft, EDA_ITEM aRight) -> bool

Definition at line 2108 of file pcbnew.py.

def pcbnew.EDA_ITEM.Type (   self)
Type(EDA_ITEM self) -> KICAD_T

KICAD_T EDA_ITEM::Type() const

Function Type()

returns the type of object. This attribute should never be changed
after a constructor sets it, so there is no public "setter" method.
KICAD_T - the type of object. 

Definition at line 1497 of file pcbnew.py.

def pcbnew.EDA_ITEM.ViewBBox (   self)
ViewBBox(EDA_ITEM self) -> BOX2I const

const BOX2I
EDA_ITEM::ViewBBox() const override

Function ViewBBox() returns the bounding box of the item covering all
its layers.

BOX2I - the current bounding box 

Definition at line 2116 of file pcbnew.py.

def pcbnew.EDA_ITEM.ViewGetLayers (   self,
  aLayers,
  aCount 
)
ViewGetLayers(EDA_ITEM self, int [] aLayers, int & aCount)

void
EDA_ITEM::ViewGetLayers(int aLayers[], int &aCount) const override

Function ViewGetLayers() Returns the all the layers within the VIEW
the object is painted on.

For instance, a D_PAD spans zero or more copper layers and a few
technical layers. ViewDraw() or PAINTER::Draw() is repeatedly called
for each of the layers returned by ViewGetLayers(), depending on the
rendering order.

Parameters:
-----------

aLayers[]:  output layer index array

aCount:  number of layer indices in aLayers[] 

Definition at line 2131 of file pcbnew.py.

def pcbnew.EDA_ITEM.Visit (   self,
  inspector,
  testData,
  scanTypes 
)
Visit(EDA_ITEM self, INSPECTOR inspector, void * testData, KICAD_T const [] scanTypes) -> SEARCH_RESULT

SEARCH_RESULT
EDA_ITEM::Visit(INSPECTOR inspector, void *testData, const KICAD_T
scanTypes[])

Function Visit may be re-implemented for each derived class in order
to handle all the types given by its member data.

Implementations should call inspector->Inspect() on types in
scanTypes[], and may use IterateForward() to do so on lists of such
data.

Parameters:
-----------

inspector:  An INSPECTOR instance to use in the inspection.

testData:  Arbitrary data used by the inspector.

scanTypes:  Which KICAD_T types are of interest and the order is
significant too, terminated by EOT.

SEARCH_RESULT SEARCH_QUIT if the Iterator is to stop the scan, else
SCAN_CONTINUE, and determined by the inspector. 

Definition at line 1944 of file pcbnew.py.

Member Data Documentation

tuple pcbnew.EDA_ITEM.IterateForward = staticmethod(IterateForward)
static

Definition at line 1941 of file pcbnew.py.

tuple pcbnew.EDA_ITEM.Sort = staticmethod(Sort)
static

Definition at line 2113 of file pcbnew.py.


The documentation for this class was generated from the following file: