KiCad PCB EDA Suite
edit_label.cpp File Reference
#include <fctsys.h>
#include <gr_basic.h>
#include <base_struct.h>
#include <gr_text.h>
#include <sch_draw_panel.h>
#include <confirm.h>
#include <sch_edit_frame.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>
#include <wx/tokenzr.h>
#include "invoke_sch_dialog.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
 
static std::deque< std::unique_ptr< SCH_TEXT > > queuedTexts
 

Function Documentation

◆ 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 SCH_TEXT::IncrementLabel(), and LIB_PIN_TOOL::RepeatPin().

Variable Documentation

◆ lastGlobalLabelShape

PINSHEETLABEL_SHAPE lastGlobalLabelShape = NET_INPUT
static

Definition at line 43 of file edit_label.cpp.

Referenced by SCH_EDIT_FRAME::CreateNewText().

◆ lastTextBold

bool lastTextBold = false
static

Definition at line 45 of file edit_label.cpp.

Referenced by SCH_EDIT_FRAME::CreateNewText().

◆ lastTextItalic

bool lastTextItalic = false
static

Definition at line 46 of file edit_label.cpp.

Referenced by SCH_EDIT_FRAME::CreateNewText().

◆ lastTextOrientation

int lastTextOrientation = 0
static

Definition at line 44 of file edit_label.cpp.

Referenced by SCH_EDIT_FRAME::CreateNewText().

◆ queuedTexts

std::deque<std::unique_ptr<SCH_TEXT> > queuedTexts
static

Definition at line 48 of file edit_label.cpp.

Referenced by SCH_EDIT_FRAME::CreateNewText(), and SCH_EDIT_FRAME::GetNextNewText().