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 <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 = PINSHEETLABEL_SHAPE::PS_INPUT
 
static LABEL_SPIN_STYLE lastTextOrientation = LABEL_SPIN_STYLE::LEFT
 
static bool lastTextBold = false
 
static bool lastTextItalic = false
 
static std::deque< std::unique_ptr< SCH_TEXT > > s_queuedTexts
 

Function Documentation

◆ IncrementLabelMember()

void IncrementLabelMember ( wxString &  name,
int  aIncrement 
)

Definition at line 281 of file edit_label.cpp.

282 {
283  int ii, nn;
284  long number = 0;
285 
286  ii = name.Len() - 1; nn = 0;
287 
288  if( !wxIsdigit( name.GetChar( ii ) ) )
289  return;
290 
291  while( (ii >= 0) && wxIsdigit( name.GetChar( ii ) ) )
292  {
293  ii--; nn++;
294  }
295 
296  ii++; /* digits are starting at ii position */
297  wxString litt_number = name.Right( nn );
298 
299  if( litt_number.ToLong( &number ) )
300  {
301  number += aIncrement;
302  name.Remove( ii ); name << number;
303  }
304 }
const char * name
Definition: DXF_plotter.cpp:60

References name.

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

Variable Documentation

◆ lastGlobalLabelShape

PINSHEETLABEL_SHAPE lastGlobalLabelShape = PINSHEETLABEL_SHAPE::PS_INPUT
static

Definition at line 42 of file edit_label.cpp.

Referenced by SCH_EDIT_FRAME::CreateNewText().

◆ lastTextBold

bool lastTextBold = false
static

Definition at line 44 of file edit_label.cpp.

Referenced by SCH_EDIT_FRAME::CreateNewText().

◆ lastTextItalic

bool lastTextItalic = false
static

Definition at line 45 of file edit_label.cpp.

Referenced by SCH_EDIT_FRAME::CreateNewText().

◆ lastTextOrientation

LABEL_SPIN_STYLE lastTextOrientation = LABEL_SPIN_STYLE::LEFT
static

Definition at line 43 of file edit_label.cpp.

Referenced by SCH_EDIT_FRAME::CreateNewText().

◆ s_queuedTexts

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

Definition at line 47 of file edit_label.cpp.

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