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

Public Member Functions

def __init__ (self, args)
 
def SetPosition (self, aPos)
 
def GetPosition (self)
 
def SetShape (self, aShape)
 
def GetShape (self)
 
def SetSize (self, aSize)
 
def GetSize (self)
 
def SetWidth (self, aWidth)
 
def GetWidth (self)
 
def Move (self, aMoveVector)
 
def Rotate (self, aRotCentre, aAngle)
 
def Flip (self, aCentre)
 
def Draw (self, args)
 
def GetClass (self)
 
def HitTest (self, args)
 
def GetBoundingBox (self)
 
def GetSelectMenuText (self)
 
def GetMenuImage (self)
 
def Clone (self)
 
- Public Member Functions inherited from pcbnew.BOARD_ITEM
def __init__ (self, args, kwargs)
 
def GetPosition (self)
 
def GetCenter (self)
 
def SetPosition (self, aPos)
 
def IsConnected (self)
 
def Next (self)
 
def Back (self)
 
def GetParent (self)
 
def GetLayer (self)
 
def GetLayerSet (self)
 
def SetLayer (self, aLayer)
 
def Draw (self, args)
 
def SwapData (self, aImage)
 
def IsOnLayer (self, aLayer)
 
def IsTrack (self)
 
def IsLocked (self)
 
def SetLocked (self, aLocked)
 
def UnLink (self)
 
def DeleteStructure (self)
 
def ShowShape (aShape)
 
def Move (self, aMoveVector)
 
def Rotate (self, aRotCentre, aAngle)
 
def Flip (self, aCentre)
 
def GetBoard (self)
 
def GetLayerName (self)
 
def HitTest (self, args)
 
def FormatAngle (aAngle)
 
def FormatInternalUnits (args)
 
def ViewGetLayers (self, aLayers, aCount)
 
def Cast (self)
 
def Duplicate (self)
 
def SetPos (self, p)
 
def SetStartEnd (self, start, end)
 
- Public Member Functions inherited from pcbnew.EDA_ITEM
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)
 

Public Attributes

 this
 

Additional Inherited Members

- Static Public Attributes inherited from pcbnew.BOARD_ITEM
tuple ShowShape = staticmethod(ShowShape)
 
tuple FormatAngle = staticmethod(FormatAngle)
 
tuple FormatInternalUnits = staticmethod(FormatInternalUnits)
 
- Static Public Attributes inherited from pcbnew.EDA_ITEM
tuple IterateForward = staticmethod(IterateForward)
 
tuple Sort = staticmethod(Sort)
 

Detailed Description

C++ includes: class_mire.h 

Definition at line 28502 of file pcbnew.py.

Constructor & Destructor Documentation

def pcbnew.PCB_TARGET.__init__ (   self,
  args 
)
__init__(PCB_TARGET self, BOARD_ITEM aParent) -> PCB_TARGET
__init__(PCB_TARGET self, BOARD_ITEM aParent, int aShape, PCB_LAYER_ID aLayer, wxPoint aPos, int aSize, int aWidth) -> PCB_TARGET

PCB_TARGET::PCB_TARGET(BOARD_ITEM *aParent, int aShape, PCB_LAYER_ID
aLayer, const wxPoint &aPos, int aSize, int aWidth) 

Definition at line 28514 of file pcbnew.py.

Member Function Documentation

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

EDA_ITEM *
PCB_TARGET::Clone() const override

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 28774 of file pcbnew.py.

def pcbnew.PCB_TARGET.Draw (   self,
  args 
)
Draw(PCB_TARGET self, EDA_DRAW_PANEL * panel, wxDC * DC, GR_DRAWMODE aDrawMode, wxPoint offset)
Draw(PCB_TARGET self, EDA_DRAW_PANEL * panel, wxDC * DC, GR_DRAWMODE aDrawMode)

void
PCB_TARGET::Draw(EDA_DRAW_PANEL *panel, wxDC *DC, GR_DRAWMODE
aDrawMode, const wxPoint &offset=ZeroOffset) override

Function Draw BOARD_ITEMs have their own color information. 

Definition at line 28665 of file pcbnew.py.

def pcbnew.PCB_TARGET.Flip (   self,
  aCentre 
)
Flip(PCB_TARGET self, wxPoint aCentre)

void PCB_TARGET::Flip(const
wxPoint &aCentre) override

Function Flip Flip this object, i.e.

change the board side for this object

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

aCentre:  - the rotation point. 

Definition at line 28646 of file pcbnew.py.

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

const EDA_RECT
PCB_TARGET::GetBoundingBox() const override

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 28719 of file pcbnew.py.

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

wxString
PCB_TARGET::GetClass() const override

Function GetClass returns the class name.

wxString 

Definition at line 28679 of file pcbnew.py.

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

BITMAP_DEF
PCB_TARGET::GetMenuImage() const override

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 28757 of file pcbnew.py.

def pcbnew.PCB_TARGET.GetPosition (   self)
GetPosition(PCB_TARGET self) -> wxPoint

const wxPoint&
PCB_TARGET::GetPosition() const override 

Definition at line 28540 of file pcbnew.py.

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

wxString
PCB_TARGET::GetSelectMenuText() const override

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 28737 of file pcbnew.py.

def pcbnew.PCB_TARGET.GetShape (   self)
GetShape(PCB_TARGET self) -> int

int
PCB_TARGET::GetShape() const 

Definition at line 28560 of file pcbnew.py.

def pcbnew.PCB_TARGET.GetSize (   self)
GetSize(PCB_TARGET self) -> int

int PCB_TARGET::GetSize()
const 

Definition at line 28580 of file pcbnew.py.

def pcbnew.PCB_TARGET.GetWidth (   self)
GetWidth(PCB_TARGET self) -> int

int
PCB_TARGET::GetWidth() const 

Definition at line 28600 of file pcbnew.py.

def pcbnew.PCB_TARGET.HitTest (   self,
  args 
)
HitTest(PCB_TARGET self, wxPoint aPosition) -> bool
HitTest(PCB_TARGET self, EDA_RECT aRect, bool aContained=True, int aAccuracy=0) -> bool
HitTest(PCB_TARGET self, EDA_RECT aRect, bool aContained=True) -> bool
HitTest(PCB_TARGET self, EDA_RECT aRect) -> bool

bool
PCB_TARGET::HitTest(const EDA_RECT &aRect, bool aContained=true, int
aAccuracy=0) const override

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

aRect:  A reference to an EDA_RECT object containg the area to test.

aContained:  Test if aRect contains this object completly.

aAccuracy:  Increase the item bounding box by this amount.

bool - True if aRect contains this object completly or if aRect
intersects the object and aContained is False, otherwise false. 

Definition at line 28693 of file pcbnew.py.

def pcbnew.PCB_TARGET.Move (   self,
  aMoveVector 
)
Move(PCB_TARGET self, wxPoint aMoveVector)

void PCB_TARGET::Move(const
wxPoint &aMoveVector) override

Function Move move this object.

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

aMoveVector:  - the move vector for this object. 

Definition at line 28610 of file pcbnew.py.

def pcbnew.PCB_TARGET.Rotate (   self,
  aRotCentre,
  aAngle 
)
Rotate(PCB_TARGET self, wxPoint aRotCentre, double aAngle)

void
PCB_TARGET::Rotate(const wxPoint &aRotCentre, double aAngle) override

Function Rotate Rotate this object.

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

aRotCentre:  - the rotation point.

aAngle:  - the rotation angle in 0.1 degree. 

Definition at line 28627 of file pcbnew.py.

def pcbnew.PCB_TARGET.SetPosition (   self,
  aPos 
)
SetPosition(PCB_TARGET self, wxPoint aPos)

void
PCB_TARGET::SetPosition(const wxPoint &aPos) override 

Definition at line 28530 of file pcbnew.py.

def pcbnew.PCB_TARGET.SetShape (   self,
  aShape 
)
SetShape(PCB_TARGET self, int aShape)

void
PCB_TARGET::SetShape(int aShape) 

Definition at line 28550 of file pcbnew.py.

def pcbnew.PCB_TARGET.SetSize (   self,
  aSize 
)
SetSize(PCB_TARGET self, int aSize)

void
PCB_TARGET::SetSize(int aSize) 

Definition at line 28570 of file pcbnew.py.

def pcbnew.PCB_TARGET.SetWidth (   self,
  aWidth 
)
SetWidth(PCB_TARGET self, int aWidth)

void
PCB_TARGET::SetWidth(int aWidth) 

Definition at line 28590 of file pcbnew.py.

Member Data Documentation

pcbnew.PCB_TARGET.this

Definition at line 28526 of file pcbnew.py.


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