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

Public Member Functions

def __init__ (self, args)
 
def ClassOf (aItem)
 
def GetPosition (self)
 
def SetPosition (self, aPos)
 
def SetTextAngle (self, aAngle)
 
def Rotate (self, aOffset, aAngle)
 
def Flip (self, aCentre)
 
def Mirror (self, aCentre, aMirrorAroundXAxis)
 
def Move (self, aMoveVector)
 
def SetType (self, aType)
 
def GetType (self)
 
def SetEffects (self, aSrc)
 
def SwapEffects (self, aTradingPartner)
 
def SetPos0 (self, aPos)
 
def GetPos0 (self)
 
def GetLength (self)
 
def GetDrawRotation (self)
 
def GetDrawRotationRadians (self)
 
def GetBoundingBox (self)
 
def SetDrawCoord (self)
 
def SetLocalCoord (self)
 
def Draw (self, args)
 
def DrawUmbilical (self, args)
 
def GetMsgPanelInfo (self, aList)
 
def HitTest (self, aPosition)
 
def GetClass (self)
 
def GetSelectMenuText (self)
 
def GetMenuImage (self)
 
def Clone (self)
 
def GetShownText (self)
 
def ViewBBox (self)
 
def ViewGetLayers (self, aLayers, aCount)
 
def ViewGetLOD (self, aLayer, aView)
 
- 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

 TEXT_is_REFERENCE = _pcbnew.TEXTE_MODULE_TEXT_is_REFERENCE
 
 TEXT_is_VALUE = _pcbnew.TEXTE_MODULE_TEXT_is_VALUE
 
 TEXT_is_DIVERS = _pcbnew.TEXTE_MODULE_TEXT_is_DIVERS
 
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_text_mod.h 

Definition at line 28098 of file pcbnew.py.

Constructor & Destructor Documentation

def pcbnew.TEXTE_MODULE.__init__ (   self,
  args 
)
__init__(TEXTE_MODULE self, MODULE parent, TEXTE_MODULE::TEXT_TYPE text_type) -> TEXTE_MODULE
__init__(TEXTE_MODULE self, MODULE parent) -> TEXTE_MODULE

TEXTE_MODULE::TEXTE_MODULE(MODULE *parent, TEXT_TYPE
text_type=TEXT_is_DIVERS) 

Definition at line 28113 of file pcbnew.py.

Member Function Documentation

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

Definition at line 28129 of file pcbnew.py.

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

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

def pcbnew.TEXTE_MODULE.Draw (   self,
  args 
)
Draw(TEXTE_MODULE self, EDA_DRAW_PANEL * aPanel, wxDC * aDC, GR_DRAWMODE aDrawMode, wxPoint aOffset)
Draw(TEXTE_MODULE self, EDA_DRAW_PANEL * aPanel, wxDC * aDC, 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 28368 of file pcbnew.py.

def pcbnew.TEXTE_MODULE.DrawUmbilical (   self,
  args 
)
DrawUmbilical(TEXTE_MODULE self, EDA_DRAW_PANEL * aPanel, wxDC * aDC, GR_DRAWMODE aDrawMode, wxPoint aOffset)
DrawUmbilical(TEXTE_MODULE self, EDA_DRAW_PANEL * aPanel, wxDC * aDC, GR_DRAWMODE aDrawMode)

void
TEXTE_MODULE::DrawUmbilical(EDA_DRAW_PANEL *aPanel, wxDC *aDC,
GR_DRAWMODE aDrawMode, const wxPoint &aOffset=ZeroOffset)

Function DrawUmbilical draws a line from the TEXTE_MODULE origin to
parent MODULE origin.

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

aPanel:  = the current DrawPanel

aDC:  = the current device context

aDrawMode:  = drawing mode, typically GR_XOR

aOffset:  = offset for TEXTE_MODULE 

Definition at line 28401 of file pcbnew.py.

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

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

Flip entity during module flip. 

Definition at line 28180 of file pcbnew.py.

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

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

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

wxString
TEXTE_MODULE::GetClass() const override

Function GetClass returns the class name.

wxString 

Definition at line 28475 of file pcbnew.py.

def pcbnew.TEXTE_MODULE.GetDrawRotation (   self)
GetDrawRotation(TEXTE_MODULE self) -> double

double
TEXTE_MODULE::GetDrawRotation() const

the text rotation for drawings and plotting the footprint rotation is
taken in account 

Definition at line 28303 of file pcbnew.py.

def pcbnew.TEXTE_MODULE.GetDrawRotationRadians (   self)
GetDrawRotationRadians(TEXTE_MODULE self) -> double

double
TEXTE_MODULE::GetDrawRotationRadians() const 

Definition at line 28316 of file pcbnew.py.

def pcbnew.TEXTE_MODULE.GetLength (   self)
GetLength(TEXTE_MODULE self) -> int

int
TEXTE_MODULE::GetLength() const 

Definition at line 28293 of file pcbnew.py.

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

BITMAP_DEF
TEXTE_MODULE::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 28509 of file pcbnew.py.

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

void
TEXTE_MODULE::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 28427 of file pcbnew.py.

def pcbnew.TEXTE_MODULE.GetPos0 (   self)
GetPos0(TEXTE_MODULE self) -> wxPoint

const wxPoint&
TEXTE_MODULE::GetPos0() const 

Definition at line 28283 of file pcbnew.py.

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

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

Definition at line 28137 of file pcbnew.py.

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

wxString
TEXTE_MODULE::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 28489 of file pcbnew.py.

def pcbnew.TEXTE_MODULE.GetShownText (   self)
GetShownText(TEXTE_MODULE self) -> wxString

wxString
TEXTE_MODULE::GetShownText() const override

Returns the string actually shown after processing of the base text.

Default is no processing 

Definition at line 28549 of file pcbnew.py.

def pcbnew.TEXTE_MODULE.GetType (   self)
GetType(TEXTE_MODULE self) -> TEXTE_MODULE::TEXT_TYPE

TEXT_TYPE
TEXTE_MODULE::GetType() const 

Definition at line 28232 of file pcbnew.py.

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

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

Function HitTest tests if the aRect intersects or contains this object
(depending on aContained).

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

def pcbnew.TEXTE_MODULE.Mirror (   self,
  aCentre,
  aMirrorAroundXAxis 
)
Mirror(TEXTE_MODULE self, wxPoint aCentre, bool aMirrorAroundXAxis)

void
TEXTE_MODULE::Mirror(const wxPoint &aCentre, bool aMirrorAroundXAxis)

Mirror text position in footprint edition the text itself is not
mirrored, and the layer not modified, only position is mirrored.

(use Flip to change layer to its paired and mirror the text in fp
editor). 

Definition at line 28192 of file pcbnew.py.

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

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

move text in move transform, in footprint editor 

Definition at line 28208 of file pcbnew.py.

def pcbnew.TEXTE_MODULE.Rotate (   self,
  aOffset,
  aAngle 
)
Rotate(TEXTE_MODULE self, wxPoint aOffset, double aAngle)

void
TEXTE_MODULE::Rotate(const wxPoint &aOffset, double aAngle) override

Rotate text, in footprint editor (for instance in footprint rotation
transform) 

Definition at line 28167 of file pcbnew.py.

def pcbnew.TEXTE_MODULE.SetDrawCoord (   self)
SetDrawCoord(TEXTE_MODULE self)

void
TEXTE_MODULE::SetDrawCoord()

Set absolute coordinates. 

Definition at line 28344 of file pcbnew.py.

def pcbnew.TEXTE_MODULE.SetEffects (   self,
  aSrc 
)
SetEffects(TEXTE_MODULE self, TEXTE_MODULE aSrc)

void
EDA_TEXT::SetEffects(const EDA_TEXT &aSrc)

Function SetEffects sets the text effects from another instance.

( TEXT_EFFECTS is not exposed in the public API, but includes
everything except the actual text string itself.) 

Definition at line 28242 of file pcbnew.py.

def pcbnew.TEXTE_MODULE.SetLocalCoord (   self)
SetLocalCoord(TEXTE_MODULE self)

void
TEXTE_MODULE::SetLocalCoord()

Set relative coordinates. 

Definition at line 28356 of file pcbnew.py.

def pcbnew.TEXTE_MODULE.SetPos0 (   self,
  aPos 
)
SetPos0(TEXTE_MODULE self, wxPoint aPos)

void
TEXTE_MODULE::SetPos0(const wxPoint &aPos) 

Definition at line 28273 of file pcbnew.py.

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

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

Definition at line 28147 of file pcbnew.py.

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

void
TEXTE_MODULE::SetTextAngle(double aAngle) 

Definition at line 28157 of file pcbnew.py.

def pcbnew.TEXTE_MODULE.SetType (   self,
  aType 
)
SetType(TEXTE_MODULE self, TEXTE_MODULE::TEXT_TYPE aType)

void
TEXTE_MODULE::SetType(TEXT_TYPE aType)

Deprecated it seems (but the type is used to 'protect' 

Definition at line 28220 of file pcbnew.py.

def pcbnew.TEXTE_MODULE.SwapEffects (   self,
  aTradingPartner 
)
SwapEffects(TEXTE_MODULE self, TEXTE_MODULE aTradingPartner)

void
EDA_TEXT::SwapEffects(EDA_TEXT &aTradingPartner)

Function SwapEffects swaps the text effects of the two involved
instances.

(TEXT_EFECTS is not exposed in the public API, but includes everything
except the actual text string itself.) 

Definition at line 28257 of file pcbnew.py.

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

const BOX2I
TEXTE_MODULE::ViewBBox() const override 

Definition at line 28563 of file pcbnew.py.

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

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

Definition at line 28573 of file pcbnew.py.

def pcbnew.TEXTE_MODULE.ViewGetLOD (   self,
  aLayer,
  aView 
)
ViewGetLOD(TEXTE_MODULE self, int aLayer, KIGFX::VIEW * aView) -> unsigned int

unsigned int
TEXTE_MODULE::ViewGetLOD(int aLayer, KIGFX::VIEW *aView) const
override 

Definition at line 28584 of file pcbnew.py.

Member Data Documentation

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

Definition at line 28134 of file pcbnew.py.

pcbnew.TEXTE_MODULE.TEXT_is_DIVERS = _pcbnew.TEXTE_MODULE_TEXT_is_DIVERS
static

Definition at line 28111 of file pcbnew.py.

pcbnew.TEXTE_MODULE.TEXT_is_REFERENCE = _pcbnew.TEXTE_MODULE_TEXT_is_REFERENCE
static

Definition at line 28109 of file pcbnew.py.

pcbnew.TEXTE_MODULE.TEXT_is_VALUE = _pcbnew.TEXTE_MODULE_TEXT_is_VALUE
static

Definition at line 28110 of file pcbnew.py.

pcbnew.TEXTE_MODULE.this

Definition at line 28125 of file pcbnew.py.


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