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

Public Member Functions

def __init__ (self, parent)
 
def ClassOf (aItem)
 
def GetPosition (self)
 
def SetPosition (self, aPos)
 
def Move (self, aMoveVector)
 
def SetTextAngle (self, aAngle)
 
def Rotate (self, aRotCentre, aAngle)
 
def Flip (self, aCentre)
 
def Draw (self, args)
 
def GetMsgPanelInfo (self, aList)
 
def HitTest (self, args)
 
def GetClass (self)
 
def TransformBoundingBoxWithClearanceToPolygon (self, aCornerBuffer, aClearanceValue)
 
def TransformShapeWithClearanceToPolygonSet (self, aCornerBuffer, aClearanceValue, aCircleToSegmentsCount, aCorrectionFactor)
 
def GetSelectMenuText (self)
 
def GetMenuImage (self)
 
def GetBoundingBox (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 Member Functions inherited from pcbnew.EDA_TEXT
def __init__ (self, args)
 
def GetText (self)
 
def GetShownText (self)
 
def ShortenedShownText (self)
 
def SetText (self, aText)
 
def SetThickness (self, aNewThickness)
 
def GetThickness (self)
 
def SetTextAngle (self, aAngle)
 
def GetTextAngle (self)
 
def GetTextAngleDegrees (self)
 
def GetTextAngleRadians (self)
 
def SetItalic (self, isItalic)
 
def IsItalic (self)
 
def SetBold (self, aBold)
 
def IsBold (self)
 
def SetVisible (self, aVisible)
 
def IsVisible (self)
 
def SetMirrored (self, isMirrored)
 
def IsMirrored (self)
 
def SetMultilineAllowed (self, aAllow)
 
def IsMultilineAllowed (self)
 
def GetHorizJustify (self)
 
def GetVertJustify (self)
 
def SetHorizJustify (self, aType)
 
def SetVertJustify (self, aType)
 
def SetEffects (self, aSrc)
 
def SwapEffects (self, aTradingPartner)
 
def IsDefaultFormatting (self)
 
def SetTextSize (self, aNewSize)
 
def GetTextSize (self)
 
def SetTextWidth (self, aWidth)
 
def GetTextWidth (self)
 
def SetTextHeight (self, aHeight)
 
def GetTextHeight (self)
 
def SetTextPos (self, aPoint)
 
def GetTextPos (self)
 
def SetTextX (self, aX)
 
def SetTextY (self, aY)
 
def Offset (self, aOffset)
 
def Empty (self)
 
def Draw (self, args)
 
def TransformTextShapeToSegmentList (self, aCornerBuffer)
 
def TextHitTest (self, args)
 
def LenSize (self, aLine)
 
def GetTextBox
 
def GetInterline
 
def GetTextStyleName (self)
 
def GetPositionsOfLinesOfMultilineText (self, aPositions, aLineCount)
 
def Format (self, aFormatter, aNestLevel, aControlBits)
 

Public Attributes

 this
 
- Public Attributes inherited from pcbnew.EDA_TEXT
 this
 

Static Public Attributes

tuple ClassOf = staticmethod(ClassOf)
 
- 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_pcb_text.h 

Definition at line 26980 of file pcbnew.py.

Constructor & Destructor Documentation

def pcbnew.TEXTE_PCB.__init__ (   self,
  parent 
)
__init__(TEXTE_PCB self, BOARD_ITEM parent) -> TEXTE_PCB

TEXTE_PCB::TEXTE_PCB(BOARD_ITEM *parent) 

Definition at line 26992 of file pcbnew.py.

Member Function Documentation

def pcbnew.TEXTE_PCB.ClassOf (   aItem)
ClassOf(EDA_ITEM aItem) -> bool

Definition at line 27006 of file pcbnew.py.

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

EDA_ITEM *
TEXTE_PCB::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 27312 of file pcbnew.py.

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

void EDA_TEXT::Draw(EDA_RECT
*aClipBox, wxDC *aDC, const wxPoint &aOffset, COLOR4D aColor,
GR_DRAWMODE aDrawMode, EDA_DRAW_MODE_T aDisplay_mode=FILLED, COLOR4D
aAnchor_color=COLOR4D::UNSPECIFIED)

Function Draw.

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

aClipBox:  = the clipping rect, or NULL if no clipping

aDC:  = the current Device Context

aOffset:  = draw offset (usually (0,0))

aColor:  = text color

aDrawMode:  = GR_OR, GR_XOR.., -1 to use the current mode.

aDisplay_mode:  = FILLED or SKETCH

aAnchor_color:  = anchor color ( COLOR4D::UNSPECIFIED = do not draw
anchor ). 

Definition at line 27099 of file pcbnew.py.

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

void TEXTE_PCB::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 27080 of file pcbnew.py.

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

const EDA_RECT
TEXTE_PCB::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 27294 of file pcbnew.py.

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

wxString
TEXTE_PCB::GetClass() const override

Function GetClass returns the class name.

wxString 

Definition at line 27180 of file pcbnew.py.

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

BITMAP_DEF
TEXTE_PCB::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 27277 of file pcbnew.py.

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

void
TEXTE_PCB::GetMsgPanelInfo(std::vector< MSG_PANEL_ITEM > &aList)
override

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

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

virtual const wxPoint&
TEXTE_PCB::GetPosition() const override 

Definition at line 27014 of file pcbnew.py.

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

wxString
TEXTE_PCB::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 27257 of file pcbnew.py.

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

virtual bool
TEXTE_PCB::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 27154 of file pcbnew.py.

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

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

Function Move move this object.

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

aMoveVector:  - the move vector for this object. 

Definition at line 27034 of file pcbnew.py.

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

void
TEXTE_PCB::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 27061 of file pcbnew.py.

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

virtual void
TEXTE_PCB::SetPosition(const wxPoint &aPos) override 

Definition at line 27024 of file pcbnew.py.

def pcbnew.TEXTE_PCB.SetTextAngle (   self,
  aAngle 
)
SetTextAngle(TEXTE_PCB self, double aAngle)

void
TEXTE_PCB::SetTextAngle(double aAngle) 

Definition at line 27051 of file pcbnew.py.

def pcbnew.TEXTE_PCB.TransformBoundingBoxWithClearanceToPolygon (   self,
  aCornerBuffer,
  aClearanceValue 
)
TransformBoundingBoxWithClearanceToPolygon(TEXTE_PCB self, SHAPE_POLY_SET aCornerBuffer, int aClearanceValue)

void
TEXTE_PCB::TransformBoundingBoxWithClearanceToPolygon(SHAPE_POLY_SET
&aCornerBuffer, int aClearanceValue) const

Function TransformBoundingBoxWithClearanceToPolygon Convert the text
bounding box to a rectangular polygon depending on the text
orientation, the bounding box is not always horizontal or vertical
Used in filling zones calculations Circles and arcs are approximated
by segments.

Function TransformBoundingBoxWithClearanceToPolygon Convert the text
bounding box to a rectangular polygon Used in filling zones
calculations Circles and arcs are approximated by segments.

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

aCornerBuffer:  = a buffer to store the polygon

aClearanceValue:  = the clearance around the text bounding box to the
real clearance value (usually near from 1.0)

aCornerBuffer:  = a buffer to store the polygon

aClearanceValue:  = the clearance around the text bounding box 

Definition at line 27194 of file pcbnew.py.

def pcbnew.TEXTE_PCB.TransformShapeWithClearanceToPolygonSet (   self,
  aCornerBuffer,
  aClearanceValue,
  aCircleToSegmentsCount,
  aCorrectionFactor 
)
TransformShapeWithClearanceToPolygonSet(TEXTE_PCB self, SHAPE_POLY_SET aCornerBuffer, int aClearanceValue, int aCircleToSegmentsCount, double aCorrectionFactor)

void
TEXTE_PCB::TransformShapeWithClearanceToPolygonSet(SHAPE_POLY_SET
&aCornerBuffer, int aClearanceValue, int aCircleToSegmentsCount,
double aCorrectionFactor) const

Function TransformShapeWithClearanceToPolygonSet Convert the text
shape to a set of polygons (one by segment) Used in 3D viewer Circles
and arcs are approximated by segments.

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

aCornerBuffer:  = a buffer to store the polygon

aClearanceValue:  = the clearance around the text

aCircleToSegmentsCount:  = the number of segments to approximate a
circle

aCorrectionFactor:  = the correction to apply to circles radius to
keep clearance when the circle is approximated by segment bigger or
equal to the real clearance value (usually near from 1.0) 

Definition at line 27227 of file pcbnew.py.

Member Data Documentation

tuple pcbnew.TEXTE_PCB.ClassOf = staticmethod(ClassOf)
static

Definition at line 27011 of file pcbnew.py.

pcbnew.TEXTE_PCB.this

Definition at line 27002 of file pcbnew.py.


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