Move wxStringSplit to kicad_string
This commit is contained in:
parent
b7f115bf5f
commit
304e5faf36
|
@ -41,6 +41,7 @@
|
|||
#include <pcb_text.h>
|
||||
#include <fp_shape.h>
|
||||
#include <class_zone.h>
|
||||
#include <kicad_string.h>
|
||||
#include <fp_text.h>
|
||||
#include <convert_basic_shapes_to_polygon.h>
|
||||
#include <trigo.h>
|
||||
|
|
|
@ -313,29 +313,6 @@ void SelectReferenceNumber( wxTextEntry* aTextEntry )
|
|||
}
|
||||
|
||||
|
||||
void wxStringSplit( const wxString& aText, wxArrayString& aStrings, wxChar aSplitter )
|
||||
{
|
||||
wxString tmp;
|
||||
|
||||
for( unsigned ii = 0; ii < aText.Length(); ii++ )
|
||||
{
|
||||
if( aText[ii] == aSplitter )
|
||||
{
|
||||
aStrings.Add( tmp );
|
||||
tmp.Clear();
|
||||
}
|
||||
|
||||
else
|
||||
tmp << aText[ii];
|
||||
}
|
||||
|
||||
if( !tmp.IsEmpty() )
|
||||
{
|
||||
aStrings.Add( tmp );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int ProcessExecute( const wxString& aCommandLine, int aFlags, wxProcess *callback )
|
||||
{
|
||||
return (int) wxExecute( aCommandLine, aFlags, callback );
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
|
||||
#include <html_messagebox.h>
|
||||
|
||||
#include <kicad_string.h>
|
||||
|
||||
HTML_MESSAGE_BOX::HTML_MESSAGE_BOX( wxWindow* aParent, const wxString& aTitle,
|
||||
const wxPoint& aPosition, const wxSize& aSize ) :
|
||||
|
|
|
@ -790,3 +790,26 @@ bool ReplaceIllegalFileNameChars( wxString& aName, int aReplaceChar )
|
|||
|
||||
return changed;
|
||||
}
|
||||
|
||||
|
||||
void wxStringSplit( const wxString& aText, wxArrayString& aStrings, wxChar aSplitter )
|
||||
{
|
||||
wxString tmp;
|
||||
|
||||
for( unsigned ii = 0; ii < aText.Length(); ii++ )
|
||||
{
|
||||
if( aText[ii] == aSplitter )
|
||||
{
|
||||
aStrings.Add( tmp );
|
||||
tmp.Clear();
|
||||
}
|
||||
|
||||
else
|
||||
tmp << aText[ii];
|
||||
}
|
||||
|
||||
if( !tmp.IsEmpty() )
|
||||
{
|
||||
aStrings.Add( tmp );
|
||||
}
|
||||
}
|
|
@ -34,6 +34,7 @@
|
|||
#include <msgpanel.h>
|
||||
#include <gal/stroke_font.h>
|
||||
#include <bitmaps.h>
|
||||
#include <kicad_string.h>
|
||||
#include <sch_text.h>
|
||||
#include <schematic.h>
|
||||
#include <settings/color_settings.h>
|
||||
|
|
|
@ -253,15 +253,6 @@ void SelectReferenceNumber( wxTextEntry* aTextEntry );
|
|||
int ProcessExecute( const wxString& aCommandLine, int aFlags = wxEXEC_ASYNC,
|
||||
wxProcess *callback = NULL );
|
||||
|
||||
/**
|
||||
* Split \a aString to a string list separated at \a aSplitter.
|
||||
*
|
||||
* @param aText is the text to split
|
||||
* @param aStrings will contain the splitted lines
|
||||
* @param aSplitter is the 'split' character
|
||||
*/
|
||||
void wxStringSplit( const wxString& aText, wxArrayString& aStrings, wxChar aSplitter );
|
||||
|
||||
/**
|
||||
* Return the help file's full path.
|
||||
* <p>
|
||||
|
|
|
@ -301,4 +301,14 @@ inline void AccumulateDescription( wxString& aDesc, const wxString& aItem )
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Split \a aString to a string list separated at \a aSplitter.
|
||||
*
|
||||
* @param aText is the text to split
|
||||
* @param aStrings will contain the splitted lines
|
||||
* @param aSplitter is the 'split' character
|
||||
*/
|
||||
void wxStringSplit( const wxString& aText, wxArrayString& aStrings, wxChar aSplitter );
|
||||
|
||||
|
||||
#endif // KICAD_STRING_H_
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
#include <class_board.h>
|
||||
#include <class_pad.h>
|
||||
#include <class_track.h>
|
||||
#include <kicad_string.h>
|
||||
#include <pcb_shape.h>
|
||||
#include <pcb_text.h>
|
||||
#include <class_zone.h>
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
#include <pcbnew_settings.h>
|
||||
#include <pgm_base.h>
|
||||
#include <settings/settings_manager.h>
|
||||
#include <kicad_string.h>
|
||||
#include <kiface_i.h>
|
||||
#include <dialog_footprint_wizard_list.h>
|
||||
#include <footprint_wizard_frame.h>
|
||||
|
|
|
@ -28,13 +28,13 @@
|
|||
#include <vector> // for vector, __vector_base<>...
|
||||
|
||||
#include <eda_item.h>
|
||||
#include <common.h>
|
||||
#include <convert_basic_shapes_to_polygon.h>
|
||||
#include <geometry/seg.h> // for SEG
|
||||
#include <geometry/shape_circle.h>
|
||||
#include <geometry/shape_line_chain.h> // for SHAPE_LINE_CHAIN
|
||||
#include <geometry/shape_poly_set.h> // for SHAPE_POLY_SET, SHAPE_P...
|
||||
#include <geometry/shape_segment.h>
|
||||
#include <kicad_string.h>
|
||||
#include <math/util.h> // for KiROUND, Clamp
|
||||
#include <math/vector2d.h> // for VECTOR2I
|
||||
#include <plotter.h>
|
||||
|
|
Loading…
Reference in New Issue