From 7a256041619dcdfd382013dd5e381dd3a9dc951e Mon Sep 17 00:00:00 2001 From: Miguel Angel Ajo Date: Mon, 19 Mar 2012 08:40:43 +0100 Subject: [PATCH] fixed ident tabs --- pcbnew/scripting/pcbnew.i | 144 +++++++++++++++++++------------------- 1 file changed, 72 insertions(+), 72 deletions(-) diff --git a/pcbnew/scripting/pcbnew.i b/pcbnew/scripting/pcbnew.i index 32baad7083..d778bf7e3d 100644 --- a/pcbnew/scripting/pcbnew.i +++ b/pcbnew/scripting/pcbnew.i @@ -35,34 +35,34 @@ %{ #include - #include - #include - #include - #include - #include - #include - #include + #include + #include + #include + #include + #include + #include + #include #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + - BOARD *GetBoard(); /* get current editor board */ + BOARD *GetBoard(); /* get current editor board */ %} #ifdef BUILD_WITH_PLUGIN %{ - #include - #include + #include + #include %} #endif @@ -89,13 +89,13 @@ /* the IO_ERROR exception handler, not working yet... */ %exception { - try { - $function - } - catch (IO_ERROR e) { - PyErr_SetString(PyExc_IOError,"IO error"); - return NULL; - } + try { + $function + } + catch (IO_ERROR e) { + PyErr_SetString(PyExc_IOError,"IO error"); + return NULL; + } } /* Cast downs from EDA_ITEM/BOARD_ITEM to childs */ @@ -103,55 +103,55 @@ %inline { - BOARD_ITEM* Cast_to_BOARD_ITEM(EDA_ITEM* base) { return dynamic_cast(base); } + BOARD_ITEM* Cast_to_BOARD_ITEM(EDA_ITEM* base) { return dynamic_cast(base); } } %extend BOARD_ITEM { - TEXTE_PCB* Cast_to_TEXTE_PCB() { return dynamic_cast(self); } - DIMENSION* Cast_to_DIMENSION() { return dynamic_cast(self); } - MODULE* Cast_to_MODULE() { return dynamic_cast(self); } - TEXTE_MODULE* Cast_to_TEXTE_MODULE(){ return dynamic_cast(self); } - DRAWSEGMENT* Cast_to_DRAWSEGMENT() { return dynamic_cast(self); } - MARKER_PCB* Cast_to_MARKER_PCB() { return dynamic_cast(self); } - BOARD* Cast_to_BOARD() { return dynamic_cast(self); } - EDGE_MODULE* Cast_to_EDGE_MODULE() { return dynamic_cast(self); } - D_PAD* Cast_to_D_PAD() { return dynamic_cast(self); } - TRACK* Cast_to_TRACK() { return dynamic_cast(self); } - SEGZONE* Cast_to_SEGZONE() { return dynamic_cast(self); } - SEGVIA* Cast_to_SEGVIA() { return dynamic_cast(self); } - + TEXTE_PCB* Cast_to_TEXTE_PCB() { return dynamic_cast(self); } + DIMENSION* Cast_to_DIMENSION() { return dynamic_cast(self); } + MODULE* Cast_to_MODULE() { return dynamic_cast(self); } + TEXTE_MODULE* Cast_to_TEXTE_MODULE(){ return dynamic_cast(self); } + DRAWSEGMENT* Cast_to_DRAWSEGMENT() { return dynamic_cast(self); } + MARKER_PCB* Cast_to_MARKER_PCB() { return dynamic_cast(self); } + BOARD* Cast_to_BOARD() { return dynamic_cast(self); } + EDGE_MODULE* Cast_to_EDGE_MODULE() { return dynamic_cast(self); } + D_PAD* Cast_to_D_PAD() { return dynamic_cast(self); } + TRACK* Cast_to_TRACK() { return dynamic_cast(self); } + SEGZONE* Cast_to_SEGZONE() { return dynamic_cast(self); } + SEGVIA* Cast_to_SEGVIA() { return dynamic_cast(self); } + - %pythoncode - { - def Cast(self): - ct = self.GetClass() - if ct=="PTEXT": - return self.Cast_to_TEXTE_PCB() - elif ct=="BOARD": - return self.Cast_to_BOARD() - elif ct=="DIMENSION": - return self.Cast_to_DIMENSION() - elif ct=="DRAWSEGMENT": - return self.Cast_to_DRAWSEGMENT() - elif ct=="MGRAPHIC": - return self.Cast_to_EDGE_MODULE() - elif ct=="MODULE": - return self.Cast_to_MODULE() - elif ct=="PAD": - return self.Cast_to_D_PAD() - elif ct=="MTEXT": - return self.Cast_to_TEXTE_MODULE() - elif ct=="ZONE": - return self.Cast_to_SEGZONE() - elif ct=="VIA": - return self.Cast_to_SEGVIA() - elif ct=="TRACK": - return self.Cast_to_TRACK() - else: - return None - } + %pythoncode + { + def Cast(self): + ct = self.GetClass() + if ct=="PTEXT": + return self.Cast_to_TEXTE_PCB() + elif ct=="BOARD": + return self.Cast_to_BOARD() + elif ct=="DIMENSION": + return self.Cast_to_DIMENSION() + elif ct=="DRAWSEGMENT": + return self.Cast_to_DRAWSEGMENT() + elif ct=="MGRAPHIC": + return self.Cast_to_EDGE_MODULE() + elif ct=="MODULE": + return self.Cast_to_MODULE() + elif ct=="PAD": + return self.Cast_to_D_PAD() + elif ct=="MTEXT": + return self.Cast_to_TEXTE_MODULE() + elif ct=="ZONE": + return self.Cast_to_SEGZONE() + elif ct=="VIA": + return self.Cast_to_SEGVIA() + elif ct=="TRACK": + return self.Cast_to_TRACK() + else: + return None + } }