KiCad PCB EDA Suite
lib_pin_tool.cpp File Reference

Go to the source code of this file.

Functions

static int GetLastPinLength ()
 
static int GetLastPinNameSize ()
 
static int GetLastPinNumSize ()
 
void IncrementLabelMember (wxString &name, int aIncrement)
 

Variables

static ELECTRICAL_PINTYPE g_LastPinType = PIN_INPUT
 
static int g_LastPinOrient = PIN_RIGHT
 
static GRAPHIC_PINSHAPE g_LastPinShape = PINSHAPE_LINE
 
static bool g_LastPinCommonConvert = false
 
static bool g_LastPinCommonUnit = false
 
static bool g_LastPinVisible = true
 
static int g_LastPinLength = -1
 
static int g_LastPinNameSize = -1
 
static int g_LastPinNumSize = -1
 

Function Documentation

◆ GetLastPinLength()

static int GetLastPinLength ( )
static

Definition at line 48 of file lib_pin_tool.cpp.

49 {
50  if( g_LastPinLength == -1 )
52 
53  return g_LastPinLength;
54 }
static int GetDefaultPinLength()
static int g_LastPinLength

References g_LastPinLength, and LIB_EDIT_FRAME::GetDefaultPinLength().

Referenced by LIB_PIN_TOOL::CreatePin().

◆ GetLastPinNameSize()

static int GetLastPinNameSize ( )
static

Definition at line 56 of file lib_pin_tool.cpp.

57 {
58  if( g_LastPinNameSize == -1 )
60 
61  return g_LastPinNameSize;
62 }
static int g_LastPinNameSize
static int GetPinNameDefaultSize()

References g_LastPinNameSize, and LIB_EDIT_FRAME::GetPinNameDefaultSize().

Referenced by LIB_PIN_TOOL::CreatePin().

◆ GetLastPinNumSize()

static int GetLastPinNumSize ( )
static

Definition at line 64 of file lib_pin_tool.cpp.

65 {
66  if( g_LastPinNumSize == -1 )
68 
69  return g_LastPinNumSize;
70 }
static int g_LastPinNumSize
static int GetPinNumDefaultSize()

References g_LastPinNumSize, and LIB_EDIT_FRAME::GetPinNumDefaultSize().

Referenced by LIB_PIN_TOOL::CreatePin().

◆ IncrementLabelMember()

void IncrementLabelMember ( wxString &  name,
int  aIncrement 
)

Definition at line 208 of file edit_label.cpp.

209 {
210  int ii, nn;
211  long number = 0;
212 
213  ii = name.Len() - 1; nn = 0;
214 
215  if( !wxIsdigit( name.GetChar( ii ) ) )
216  return;
217 
218  while( (ii >= 0) && wxIsdigit( name.GetChar( ii ) ) )
219  {
220  ii--; nn++;
221  }
222 
223  ii++; /* digits are starting at ii position */
224  wxString litt_number = name.Right( nn );
225 
226  if( litt_number.ToLong( &number ) )
227  {
228  number += aIncrement;
229  name.Remove( ii ); name << number;
230  }
231 }
const char * name
Definition: DXF_plotter.cpp:61

References name.

Referenced by LIB_PIN_TOOL::RepeatPin().

Variable Documentation

◆ g_LastPinCommonConvert

bool g_LastPinCommonConvert = false
static

Definition at line 39 of file lib_pin_tool.cpp.

Referenced by LIB_PIN_TOOL::CreatePin(), and LIB_PIN_TOOL::EditPinProperties().

◆ g_LastPinCommonUnit

bool g_LastPinCommonUnit = false
static

Definition at line 40 of file lib_pin_tool.cpp.

Referenced by LIB_PIN_TOOL::CreatePin(), and LIB_PIN_TOOL::EditPinProperties().

◆ g_LastPinLength

int g_LastPinLength = -1
static

Definition at line 44 of file lib_pin_tool.cpp.

Referenced by LIB_PIN_TOOL::EditPinProperties(), and GetLastPinLength().

◆ g_LastPinNameSize

int g_LastPinNameSize = -1
static

Definition at line 45 of file lib_pin_tool.cpp.

Referenced by LIB_PIN_TOOL::EditPinProperties(), and GetLastPinNameSize().

◆ g_LastPinNumSize

int g_LastPinNumSize = -1
static

Definition at line 46 of file lib_pin_tool.cpp.

Referenced by LIB_PIN_TOOL::EditPinProperties(), and GetLastPinNumSize().

◆ g_LastPinOrient

int g_LastPinOrient = PIN_RIGHT
static

◆ g_LastPinShape

◆ g_LastPinType

◆ g_LastPinVisible

bool g_LastPinVisible = true
static

Definition at line 41 of file lib_pin_tool.cpp.

Referenced by LIB_PIN_TOOL::CreatePin(), and LIB_PIN_TOOL::EditPinProperties().