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 49 of file lib_pin_tool.cpp.

50 {
51  if( g_LastPinLength == -1 )
53 
54  return g_LastPinLength;
55 }
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 57 of file lib_pin_tool.cpp.

58 {
59  if( g_LastPinNameSize == -1 )
61 
62  return g_LastPinNameSize;
63 }
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 65 of file lib_pin_tool.cpp.

66 {
67  if( g_LastPinNumSize == -1 )
69 
70  return g_LastPinNumSize;
71 }
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 282 of file edit_label.cpp.

283 {
284  int ii, nn;
285  long number = 0;
286 
287  ii = name.Len() - 1; nn = 0;
288 
289  if( !wxIsdigit( name.GetChar( ii ) ) )
290  return;
291 
292  while( (ii >= 0) && wxIsdigit( name.GetChar( ii ) ) )
293  {
294  ii--; nn++;
295  }
296 
297  ii++; /* digits are starting at ii position */
298  wxString litt_number = name.Right( nn );
299 
300  if( litt_number.ToLong( &number ) )
301  {
302  number += aIncrement;
303  name.Remove( ii ); name << number;
304  }
305 }
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 40 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 41 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 45 of file lib_pin_tool.cpp.

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

◆ g_LastPinNameSize

int g_LastPinNameSize = -1
static

Definition at line 46 of file lib_pin_tool.cpp.

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

◆ g_LastPinNumSize

int g_LastPinNumSize = -1
static

Definition at line 47 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 42 of file lib_pin_tool.cpp.

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