KiCad PCB EDA Suite
pcbnew.h File Reference
#include <fctsys.h>
#include <base_struct.h>
#include <dlist.h>
#include <convert_to_biu.h>
#include <layers_id_colors_and_visibility.h>

Go to the source code of this file.

Macros

#define ARC_APPROX_SEGMENTS_COUNT_LOW_DEF   16
 
#define ARC_APPROX_SEGMENTS_COUNT_HIGHT_DEF   32
 
#define CURSEUR_ON_GRILLE   (0 << 0)
 
#define CURSEUR_OFF_GRILLE   (1 << 0)
 
#define IGNORE_LOCKED   (1 << 1)
 if module is locked, do not select for single module operation More...
 
#define MATCH_LAYER   (1 << 2)
 if module not on current layer, do not select More...
 
#define VISIBLE_ONLY   (1 << 3)
 if module not on a visible layer, do not select More...
 
#define DIM_ANCRE_MODULE   3
 
#define TEXTS_MIN_SIZE   Mils2iu( 5 )
 Minimum text size in Pcbnew units value (5 mils) More...
 
#define TEXTS_MAX_SIZE   Mils2iu( 1000 )
 Maximum text size in Pcbnew units value (1 inch) ) More...
 
#define TEXTS_MAX_WIDTH   Mils2iu( 500 )
 Maximum text width in Pcbnew units value (0.5 inches) More...
 
#define MIN_DRAW_WIDTH   1
 Minimum trace drawing width in pixels. More...
 
#define FORCE_SKETCH   ( IS_DRAGGED | IN_EDIT )
 
#define g_CurrentTrackSegment   g_CurrentTrackList.GetLast()
 most recently created segment More...
 
#define g_FirstTrackSegment   g_CurrentTrackList.GetFirst()
 first segment created More...
 

Enumerations

enum  ENDPOINT_T { ENDPOINT_START = 0, ENDPOINT_END = 1 }
 Flag used in locate routines (from which endpoint work) More...
 
enum  MAGNETICPAD_OPTION_VALUES { NO_EFFECT, CAPTURE_CURSOR_IN_TRACK_TOOL, CAPTURE_ALWAYS }
 

Functions

void PythonPluginsReloadBase ()
 Helper function PythonPluginsReloadBase Reload Python plugins if they are newer than the already loaded, and load new plugins if any It calls the LoadPlugins(bundlepath) Python method see kicadplugins.i. More...
 

Variables

enum ENDPOINT_T kiface
 
wxString g_DocModulesFileName
 
bool g_Drc_On
 
bool g_AutoDeleteOldTrack
 
bool g_Raccord_45_Auto
 
bool g_Track_45_Only_Allowed
 
bool g_Alternate_Track_Posture
 
bool g_Segments_45_Only
 
LAYER_ID g_Route_Layer_TOP
 
LAYER_ID g_Route_Layer_BOTTOM
 
bool g_TwoSegmentTrackBuild
 
int g_MagneticPadOption
 
int g_MagneticTrackOption
 
wxPoint g_Offset_Module
 
DLIST< TRACKg_CurrentTrackList
 

Macro Definition Documentation

#define CURSEUR_OFF_GRILLE   (1 << 0)

Definition at line 47 of file pcbnew.h.

Referenced by GERBVIEW_FRAME::OnLeftClick(), and GERBVIEW_FRAME::OnRightClick().

#define CURSEUR_ON_GRILLE   (0 << 0)

Definition at line 46 of file pcbnew.h.

Referenced by GERBVIEW_FRAME::Locate().

#define DIM_ANCRE_MODULE   3

Definition at line 59 of file pcbnew.h.

Referenced by MODULE::Draw().

#define FORCE_SKETCH   ( IS_DRAGGED | IN_EDIT )
#define g_FirstTrackSegment   g_CurrentTrackList.GetFirst()
#define IGNORE_LOCKED   (1 << 1)

if module is locked, do not select for single module operation

Definition at line 49 of file pcbnew.h.

#define MATCH_LAYER   (1 << 2)

if module not on current layer, do not select

Definition at line 50 of file pcbnew.h.

#define MIN_DRAW_WIDTH   1

Minimum trace drawing width in pixels.

Definition at line 65 of file pcbnew.h.

Referenced by TRACK::Draw(), SEGZONE::Draw(), VIA::Draw(), and D_PAD::DrawShape().

#define TEXTS_MAX_SIZE   Mils2iu( 1000 )

Maximum text size in Pcbnew units value (1 inch) )

Definition at line 63 of file pcbnew.h.

Referenced by BOARD_DESIGN_SETTINGS::AppendConfigs().

#define TEXTS_MAX_WIDTH   Mils2iu( 500 )

Maximum text width in Pcbnew units value (0.5 inches)

Definition at line 64 of file pcbnew.h.

Referenced by BOARD_DESIGN_SETTINGS::AppendConfigs(), and DIALOG_PCB_TEXT_PROPERTIES::TransferDataFromWindow().

#define TEXTS_MIN_SIZE   Mils2iu( 5 )

Minimum text size in Pcbnew units value (5 mils)

Definition at line 62 of file pcbnew.h.

Referenced by BOARD_DESIGN_SETTINGS::AppendConfigs(), DialogEditModuleText::TransferDataFromWindow(), and DIALOG_PCB_TEXT_PROPERTIES::TransferDataFromWindow().

#define VISIBLE_ONLY   (1 << 3)

if module not on a visible layer, do not select

Definition at line 51 of file pcbnew.h.

Enumeration Type Documentation

enum ENDPOINT_T

Flag used in locate routines (from which endpoint work)

Enumerator
ENDPOINT_START 
ENDPOINT_END 

Definition at line 54 of file pcbnew.h.

54  {
55  ENDPOINT_START = 0,
56  ENDPOINT_END = 1
57 };
Enumerator
NO_EFFECT 
CAPTURE_CURSOR_IN_TRACK_TOOL 
CAPTURE_ALWAYS 

Definition at line 105 of file pcbnew.h.

Function Documentation

void PythonPluginsReloadBase ( )

Helper function PythonPluginsReloadBase Reload Python plugins if they are newer than the already loaded, and load new plugins if any It calls the LoadPlugins(bundlepath) Python method see kicadplugins.i.

Definition at line 299 of file pcbnew.cpp.

References PyScriptingPath(), and TO_UTF8.

Referenced by PCB_EDIT_FRAME::PythonPluginsReload().

300 {
301 #if defined(KICAD_SCRIPTING)
302  //Reload plugin list: reload Python plugins if they are newer than
303  // the already loaded, and load new plugins
304  char cmd[1024];
305 
306  snprintf( cmd, sizeof(cmd),
307  "pcbnew.LoadPlugins(\"%s\")", TO_UTF8( PyScriptingPath() ) );
308 
309  PyLOCK lock;
310 
311  // ReRun the Python method pcbnew.LoadPlugins
312  // (already called when starting Pcbnew)
313  PyRun_SimpleString( cmd );
314 #endif
315 }
#define TO_UTF8(wxstring)
Macro TO_UTF8 converts a wxString to a UTF8 encoded C string for all wxWidgets build modes...
Definition: macros.h:47
wxString PyScriptingPath()
Find the Python scripting path.

Variable Documentation

bool g_Alternate_Track_Posture

Definition at line 73 of file pcbnew.cpp.

Referenced by ComputeBreakPoint(), and PCB_EDIT_FRAME::Process_Special_Functions().

wxString g_DocModulesFileName

Definition at line 90 of file pcbnew.cpp.

Referenced by PCB_EDIT_FRAME::Process_Special_Functions().

bool g_Raccord_45_Auto

Definition at line 72 of file pcbnew.cpp.

Referenced by PCB_EDIT_FRAME::Begin_Route().

bool g_Track_45_Only_Allowed
enum ENDPOINT_T kiface