KiCad PCB EDA Suite
edit_label.cpp File Reference
#include <fctsys.h>
#include <gr_basic.h>
#include <base_struct.h>
#include <draw_graphic_text.h>
#include <sch_draw_panel.h>
#include <confirm.h>
#include <sch_edit_frame.h>
#include <kicad_device_context.h>
#include <tool/tool_manager.h>
#include <tools/ee_actions.h>
#include <general.h>
#include <sch_text.h>
#include <eeschema_id.h>
#include <sch_view.h>

Go to the source code of this file.

Functions

void IncrementLabelMember (wxString &name, int aIncrement)
 

Variables

static PINSHEETLABEL_SHAPE lastGlobalLabelShape = NET_INPUT
 
static int lastTextOrientation = 0
 
static bool lastTextBold = false
 
static bool lastTextItalic = false
 

Function Documentation

◆ IncrementLabelMember()

void IncrementLabelMember ( wxString &  name,
int  aIncrement 
)

Definition at line 167 of file edit_label.cpp.

168 {
169  int ii, nn;
170  long number = 0;
171 
172  ii = name.Len() - 1; nn = 0;
173 
174  if( !wxIsdigit( name.GetChar( ii ) ) )
175  return;
176 
177  while( (ii >= 0) && wxIsdigit( name.GetChar( ii ) ) )
178  {
179  ii--; nn++;
180  }
181 
182  ii++; /* digits are starting at ii position */
183  wxString litt_number = name.Right( nn );
184 
185  if( litt_number.ToLong( &number ) )
186  {
187  number += aIncrement;
188  name.Remove( ii ); name << number;
189  }
190 }
const char * name
Definition: DXF_plotter.cpp:61

References name.

Referenced by SCH_TEXT::IncrementLabel(), and LIB_PIN_TOOL::RepeatPin().

Variable Documentation

◆ lastGlobalLabelShape

PINSHEETLABEL_SHAPE lastGlobalLabelShape = NET_INPUT
static

Definition at line 41 of file edit_label.cpp.

Referenced by SCH_EDIT_FRAME::CreateNewText().

◆ lastTextBold

bool lastTextBold = false
static

Definition at line 43 of file edit_label.cpp.

Referenced by SCH_EDIT_FRAME::CreateNewText().

◆ lastTextItalic

bool lastTextItalic = false
static

Definition at line 44 of file edit_label.cpp.

Referenced by SCH_EDIT_FRAME::CreateNewText().

◆ lastTextOrientation

int lastTextOrientation = 0
static

Definition at line 42 of file edit_label.cpp.

Referenced by SCH_EDIT_FRAME::CreateNewText().