Commit 689579bd authored by stambaughw's avatar stambaughw

Global variable unobfuscation, new library path search, and lots of other...

Global variable unobfuscation, new library path search, and lots of other changes.  See CHANGELOG.txt.
parent 7a351249
...@@ -21,7 +21,6 @@ ...@@ -21,7 +21,6 @@
#include "wx/dataobj.h" #include "wx/dataobj.h"
#include "wx/clipbrd.h" #include "wx/clipbrd.h"
#include "fctsys.h"
#include "id.h" #include "id.h"
#include "gestfich.h" #include "gestfich.h"
...@@ -620,6 +619,7 @@ void Pcb3D_GLCanvas::TakeScreenshot( wxCommandEvent& event ) ...@@ -620,6 +619,7 @@ void Pcb3D_GLCanvas::TakeScreenshot( wxCommandEvent& event )
* Output file format is png or jpeg, or image is copied on clipboard * Output file format is png or jpeg, or image is copied on clipboard
*/ */
{ {
wxFileName fn( m_Parent->m_Parent->GetScreen()->m_FileName );
wxString FullFileName; wxString FullFileName;
wxString file_ext, mask; wxString file_ext, mask;
bool fmt_is_jpeg = FALSE; bool fmt_is_jpeg = FALSE;
...@@ -628,15 +628,15 @@ void Pcb3D_GLCanvas::TakeScreenshot( wxCommandEvent& event ) ...@@ -628,15 +628,15 @@ void Pcb3D_GLCanvas::TakeScreenshot( wxCommandEvent& event )
fmt_is_jpeg = TRUE; fmt_is_jpeg = TRUE;
if( event.GetId() != ID_TOOL_SCREENCOPY_TOCLIBBOARD ) if( event.GetId() != ID_TOOL_SCREENCOPY_TOCLIBBOARD )
{ {
file_ext = fmt_is_jpeg ? wxT( ".jpg" ) : wxT( ".png"; ) file_ext = fmt_is_jpeg ? wxT( "jpg" ) : wxT( "png"; )
mask = wxT( "*" ) + file_ext; mask = wxT( "*." ) + file_ext;
FullFileName = m_Parent->m_Parent->GetScreen()->m_FileName; FullFileName = m_Parent->m_Parent->GetScreen()->m_FileName;
ChangeFileNameExt( FullFileName, file_ext ); fn.SetExt( file_ext );
FullFileName = FullFileName =
EDA_FileSelector( _( "3D Image filename:" ), EDA_FileSelector( _( "3D Image filename:" ),
wxEmptyString, /* Chemin par defaut */ wxEmptyString, /* Chemin par defaut */
FullFileName, /* nom fichier par defaut */ fn.GetFullName(), /* nom fichier par defaut */
file_ext, /* extension par defaut */ file_ext, /* extension par defaut */
mask, /* Masque d'affichage */ mask, /* Masque d'affichage */
this, this,
......
...@@ -20,12 +20,24 @@ ...@@ -20,12 +20,24 @@
#include "bitmaps.h" #include "bitmaps.h"
#include "id.h" #include "id.h"
#define VIEWER_MAIN
#include "3d_viewer.h" #include "3d_viewer.h"
#include "trackball.h" #include "trackball.h"
#include <wx/colordlg.h> #include <wx/colordlg.h>
Info_3D_Visu g_Parm_3D_Visu;
double g_Draw3d_dx;
double g_Draw3d_dy;
double ZBottom;
double ZTop;
double DataScale3D; // coeff de conversion unites utilsateut -> unites 3D
int gl_attrib[] =
{
WX_GL_RGBA, WX_GL_MIN_RED, 8, WX_GL_MIN_GREEN, 8, WX_GL_MIN_BLUE, 8,
WX_GL_DEPTH_SIZE, 16, WX_GL_DOUBLEBUFFER, GL_NONE
};
BEGIN_EVENT_TABLE( WinEDA3D_DrawFrame, wxFrame ) BEGIN_EVENT_TABLE( WinEDA3D_DrawFrame, wxFrame )
EVT_TOOL_RANGE( ID_ZOOM_IN, ID_ZOOM_PAGE, WinEDA3D_DrawFrame::Process_Zoom ) EVT_TOOL_RANGE( ID_ZOOM_IN, ID_ZOOM_PAGE, WinEDA3D_DrawFrame::Process_Zoom )
...@@ -358,9 +370,9 @@ void WinEDA3D_DrawFrame::Set3DBgColor() ...@@ -358,9 +370,9 @@ void WinEDA3D_DrawFrame::Set3DBgColor()
S3D_Color color; S3D_Color color;
wxColour newcolor, oldcolor; wxColour newcolor, oldcolor;
oldcolor.Set( (int) round( g_Parm_3D_Visu.m_BgColor.m_Red * 255 ), oldcolor.Set( wxRound( g_Parm_3D_Visu.m_BgColor.m_Red * 255 ),
(int) round( g_Parm_3D_Visu.m_BgColor.m_Green * 255 ), wxRound( g_Parm_3D_Visu.m_BgColor.m_Green * 255 ),
(int) round( g_Parm_3D_Visu.m_BgColor.m_Blue * 255 ) ); wxRound( g_Parm_3D_Visu.m_BgColor.m_Blue * 255 ) );
newcolor = wxGetColourFromUser( this, oldcolor ); newcolor = wxGetColourFromUser( this, oldcolor );
if( newcolor != oldcolor ) if( newcolor != oldcolor )
......
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
#include "common.h" #include "common.h"
#include "macros.h" #include "macros.h"
#include "kicad_string.h" #include "kicad_string.h"
#include "appl_wxstruct.h"
#include "3d_struct.h" #include "3d_struct.h"
#include "3d_viewer.h" #include "3d_viewer.h"
...@@ -23,7 +24,8 @@ int S3D_MASTER:: ReadData() ...@@ -23,7 +24,8 @@ int S3D_MASTER:: ReadData()
/************************************/ /************************************/
{ {
char line[1024], * text; char line[1024], * text;
wxString fullfilename; wxFileName fn;
wxString tmp;
FILE* file; FILE* file;
int LineNum = 0; int LineNum = 0;
...@@ -32,20 +34,24 @@ int S3D_MASTER:: ReadData() ...@@ -32,20 +34,24 @@ int S3D_MASTER:: ReadData()
return 1; return 1;
} }
if( wxIsAbsolutePath( m_Shape3DName ) ) fn = m_Shape3DName;
fullfilename.Empty();
else if( !fn.FileExists() )
fullfilename = g_RealLibDirBuffer + LIB3D_PATH; {
fullfilename += m_Shape3DName; tmp = wxGetApp().GetLibraryPathList().FindValidPath( fn.GetFullPath() );
#if defined (__WINDOWS__)
fullfilename.Replace( UNIX_STRING_DIR_SEP, WIN_STRING_DIR_SEP ); if( !tmp )
#else {
#if defined (__UNIX__) wxLogDebug( _( "3D part library <%s> could not be found." ),
fullfilename.Replace( WIN_STRING_DIR_SEP, UNIX_STRING_DIR_SEP ); fn.GetFullPath().c_str() );
#endif return -1;
#endif }
fn = tmp;
}
file = wxFopen( fn.GetFullPath(), wxT( "rt" ) );
file = wxFopen( fullfilename, wxT( "rt" ) );
if( file == NULL ) if( file == NULL )
{ {
return -1; return -1;
......
...@@ -9,7 +9,6 @@ ...@@ -9,7 +9,6 @@
#include "id.h" #include "id.h"
#define BITMAP wxBitmap
#include "3d_viewer.h" #include "3d_viewer.h"
...@@ -29,63 +28,71 @@ void WinEDA3D_DrawFrame::ReCreateHToolbar() ...@@ -29,63 +28,71 @@ void WinEDA3D_DrawFrame::ReCreateHToolbar()
SetToolBar( m_HToolBar ); SetToolBar( m_HToolBar );
// Set up toolbar // Set up toolbar
m_HToolBar->AddTool( ID_RELOAD3D_BOARD, wxEmptyString, BITMAP( import3d_xpm ), m_HToolBar->AddTool( ID_RELOAD3D_BOARD, wxEmptyString,
wxBitmap( import3d_xpm ),
_( "Reload board" ) ); _( "Reload board" ) );
#ifdef __WINDOWS__ // do not work properly under linux #ifdef __WINDOWS__ // do not work properly under linux
m_HToolBar-> AddSeparator(); m_HToolBar-> AddSeparator();
m_HToolBar->AddTool( ID_TOOL_SCREENCOPY_TOCLIBBOARD, wxEmptyString, BITMAP( copy_button ), m_HToolBar->AddTool( ID_TOOL_SCREENCOPY_TOCLIBBOARD, wxEmptyString,
wxBitmap( copy_button ),
_( "Copy 3D Image to Clipboard" ) ); _( "Copy 3D Image to Clipboard" ) );
#endif #endif
m_HToolBar->AddSeparator(); m_HToolBar->AddSeparator();
m_HToolBar->AddTool( ID_ZOOM_IN, wxEmptyString, BITMAP( zoom_in_xpm ), m_HToolBar->AddTool( ID_ZOOM_IN, wxEmptyString, wxBitmap( zoom_in_xpm ),
_( "Zoom in" ) ); _( "Zoom in" ) );
m_HToolBar->AddTool( ID_ZOOM_OUT, wxEmptyString, BITMAP( zoom_out_xpm ), m_HToolBar->AddTool( ID_ZOOM_OUT, wxEmptyString, wxBitmap( zoom_out_xpm ),
_( "Zoom out" ) ); _( "Zoom out" ) );
m_HToolBar->AddTool( ID_ZOOM_REDRAW, wxEmptyString, BITMAP( zoom_redraw_xpm ), m_HToolBar->AddTool( ID_ZOOM_REDRAW, wxEmptyString,
wxBitmap( zoom_redraw_xpm ),
_( "Redraw view" ) ); _( "Redraw view" ) );
m_HToolBar->AddTool( ID_ZOOM_PAGE, wxEmptyString, BITMAP( zoom_auto_xpm ), m_HToolBar->AddTool( ID_ZOOM_PAGE, wxEmptyString, wxBitmap( zoom_auto_xpm ),
_( "Zoom auto" ) ); _( "Zoom auto" ) );
m_HToolBar->AddSeparator(); m_HToolBar->AddSeparator();
m_HToolBar->AddTool( ID_ROTATE3D_X_NEG, wxEmptyString, BITMAP( rotate_neg_X_xpm ), m_HToolBar->AddTool( ID_ROTATE3D_X_NEG, wxEmptyString,
wxBitmap( rotate_neg_X_xpm ),
_( "Rotate X <-" ) ); _( "Rotate X <-" ) );
m_HToolBar->AddTool( ID_ROTATE3D_X_POS, wxEmptyString, BITMAP( rotate_pos_X_xpm ), m_HToolBar->AddTool( ID_ROTATE3D_X_POS, wxEmptyString,
wxBitmap( rotate_pos_X_xpm ),
_( "Rotate X ->" ) ); _( "Rotate X ->" ) );
m_HToolBar->AddSeparator(); m_HToolBar->AddSeparator();
m_HToolBar->AddTool( ID_ROTATE3D_Y_NEG, wxEmptyString, BITMAP( rotate_neg_Y_xpm ), m_HToolBar->AddTool( ID_ROTATE3D_Y_NEG, wxEmptyString,
wxBitmap( rotate_neg_Y_xpm ),
_( "Rotate Y <-" ) ); _( "Rotate Y <-" ) );
m_HToolBar->AddTool( ID_ROTATE3D_Y_POS, wxEmptyString, BITMAP( rotate_pos_Y_xpm ), m_HToolBar->AddTool( ID_ROTATE3D_Y_POS, wxEmptyString,
wxBitmap( rotate_pos_Y_xpm ),
_( "Rotate Y ->" ) ); _( "Rotate Y ->" ) );
m_HToolBar->AddSeparator(); m_HToolBar->AddSeparator();
m_HToolBar->AddTool( ID_ROTATE3D_Z_NEG, wxEmptyString, BITMAP( rotate_neg_Z_xpm ), m_HToolBar->AddTool( ID_ROTATE3D_Z_NEG, wxEmptyString,
wxBitmap( rotate_neg_Z_xpm ),
_( "Rotate Z <-" ) ); _( "Rotate Z <-" ) );
m_HToolBar->AddTool( ID_ROTATE3D_Z_POS, wxEmptyString, BITMAP( rotate_pos_Z_xpm ), m_HToolBar->AddTool( ID_ROTATE3D_Z_POS, wxEmptyString,
wxBitmap( rotate_pos_Z_xpm ),
_( "Rotate Z ->" ) ); _( "Rotate Z ->" ) );
m_HToolBar->AddSeparator(); m_HToolBar->AddSeparator();
m_HToolBar->AddTool( ID_MOVE3D_LEFT, wxEmptyString, BITMAP( left_xpm ), m_HToolBar->AddTool( ID_MOVE3D_LEFT, wxEmptyString, wxBitmap( left_xpm ),
_( "Move left <-" ) ); _( "Move left <-" ) );
m_HToolBar->AddTool( ID_MOVE3D_RIGHT, wxEmptyString, BITMAP( right_xpm ), m_HToolBar->AddTool( ID_MOVE3D_RIGHT, wxEmptyString, wxBitmap( right_xpm ),
_( "Move right ->" ) ); _( "Move right ->" ) );
m_HToolBar->AddTool( ID_MOVE3D_UP, wxEmptyString, BITMAP( up_xpm ), m_HToolBar->AddTool( ID_MOVE3D_UP, wxEmptyString, wxBitmap( up_xpm ),
_( "Move Up ^" ) ); _( "Move Up ^" ) );
m_HToolBar->AddTool( ID_MOVE3D_DOWN, wxEmptyString, BITMAP( down_xpm ), m_HToolBar->AddTool( ID_MOVE3D_DOWN, wxEmptyString, wxBitmap( down_xpm ),
_( "Move Down" ) ); _( "Move Down" ) );
m_HToolBar->Realize(); m_HToolBar->Realize();
// SetToolbars(); // SetToolbars();
......
...@@ -20,12 +20,6 @@ ...@@ -20,12 +20,6 @@
# include <GL/glu.h> # include <GL/glu.h>
#endif #endif
#ifdef VIEWER_MAIN
#define global_3d
#else
#define global_3d extern
#endif
#include "pcbstruct.h" #include "pcbstruct.h"
#include "3d_struct.h" #include "3d_struct.h"
...@@ -86,7 +80,7 @@ private: ...@@ -86,7 +80,7 @@ private:
GLuint m_gllist; GLuint m_gllist;
public: public:
Pcb3D_GLCanvas(WinEDA3D_DrawFrame *parent, const wxWindowID id = -1, Pcb3D_GLCanvas( WinEDA3D_DrawFrame *parent, const wxWindowID id = -1,
int* gl_attrib = NULL); int* gl_attrib = NULL);
~Pcb3D_GLCanvas(); ~Pcb3D_GLCanvas();
...@@ -137,7 +131,7 @@ private: ...@@ -137,7 +131,7 @@ private:
// It is "Frame3D" // It is "Frame3D"
public: public:
WinEDA3D_DrawFrame(WinEDA_BasePcbFrame * parent, WinEDA3D_DrawFrame( WinEDA_BasePcbFrame * parent,
const wxString& title, const wxString& title,
long style = KICAD_DEFAULT_3D_DRAWFRAME_STYLE ); long style = KICAD_DEFAULT_3D_DRAWFRAME_STYLE );
...@@ -175,17 +169,8 @@ public: ...@@ -175,17 +169,8 @@ public:
void SetGLColor(int color); void SetGLColor(int color);
void Set_Object_Data(const S3D_Vertex * coord, int nbcoord ); void Set_Object_Data(const S3D_Vertex * coord, int nbcoord );
global_3d Info_3D_Visu g_Parm_3D_Visu; extern Info_3D_Visu g_Parm_3D_Visu;
global_3d double g_Draw3d_dx, g_Draw3d_dy; extern double g_Draw3d_dx, g_Draw3d_dy;
global_3d double ZBottom, ZTop; extern double ZBottom, ZTop;
global_3d double DataScale3D; // coeff de conversion unites utilsateut -> unites 3D extern double DataScale3D; // coeff de conversion unites utilsateut -> unites 3D
global_3d int gl_attrib[] extern int gl_attrib[];
#ifdef VIEWER_MAIN
= { WX_GL_RGBA, WX_GL_MIN_RED, 8, WX_GL_MIN_GREEN, 8,
WX_GL_MIN_BLUE, 8, WX_GL_DEPTH_SIZE, 16,
WX_GL_DOUBLEBUFFER,
GL_NONE }
#endif
;
...@@ -4,11 +4,56 @@ KiCad ChangeLog 2009 ...@@ -4,11 +4,56 @@ KiCad ChangeLog 2009
Please add newer entries at the top, list the date and your name with Please add newer entries at the top, list the date and your name with
email address. email address.
2009-xxx-xx UPDATE Wayne Stambaugh <stambaughw@verizon.net>
================================================================================
++All
* Removed all instances #ifdef eda_global, COMMON_GLOBL, and MAIN in order
to unobfuscate global variables.
* Moved global variables common to all applications into common.cpp.
* Moved global variables common to Pcbnew, Gerbview, and Cvpcb into
pcbcommon.cpp.
* Create pcbcommon library to prevent compiling shared PCB drawing object
files multiple times.
* Replaced round() with wxRound and eliminate MSVC specific implementation.
* Moved project configuration files into the application class.
* Moved editor name global variable into the application class.
* Created load and save settings methods for basic frame class and begin
putting global variables in the class where they are used.
* Start replacing obsolete wxWidgets file functions and redundant Kicad
file name manipulation code with wxFileName.
* Initial library search path implementation using wxPathList.
* Define correct wxFileDialog wild cards.
* Apply patch Fix typo in about box to keep MAC folks happy.
* Lots of general code clean up, spelling error fixes, and uncrustification.
* Renamed Affiche_Status_Box to UpdateStatusBar.
++EESchema
* Defined Load() method so library file drawing objects can load themselves.
* Defined GetBoundingBox() method so library file drawing objects can
calculate their own bounding box.
* Fix arc library drawing object bounding box calculation.
* Remember last import and export library path in library editor.
* Add new library search path support.
++Kicad
* Eliminate the one giant case statement to rule them all command event
handler and create per command event handlers.
++CvPcb
* Add new library search path support.
* Add message dialogs to prompt user of library file load errors instead of
failing silently.
* Fix NULL pointer bug were display frame would crash CvPcb when
WinEDA_DisplayFrame::Get_Module() could not find foot print module.
++PcbNew
* Add new library search path support.
* Add message dialogs to prompt user of library file load errors instead of
failing silently.
2009-mar-30 UPDATE Jean-Pierre Charras <jean-pierre.charras@gipsa-lab.inpg.fr> 2009-mar-30 UPDATE Jean-Pierre Charras <jean-pierre.charras@gipsa-lab.inpg.fr>
================================================================================ ================================================================================
++pcbnew: ++pcbnew:
added BOM generator (in postprocess menu) added BOM generator (in postprocess menu)
2009-mar-28 UPDATE Jean-Pierre Charras <jean-pierre.charras@gipsa-lab.inpg.fr> 2009-mar-28 UPDATE Jean-Pierre Charras <jean-pierre.charras@gipsa-lab.inpg.fr>
================================================================================ ================================================================================
++All ++All
...@@ -24,7 +69,6 @@ email address. ...@@ -24,7 +69,6 @@ email address.
================================================================================ ================================================================================
++pcbnew: ++pcbnew:
in DRC: added test pads to holes. in DRC: added test pads to holes.
++Al: ++Al:
minor changes. minor changes.
...@@ -66,7 +110,6 @@ email address. ...@@ -66,7 +110,6 @@ email address.
print,plot: error message displayed when no layer selected. print,plot: error message displayed when no layer selected.
2009-Mar-5 UPDATE Vesa Solonen <vesa.solonen@hut.fi> 2009-Mar-5 UPDATE Vesa Solonen <vesa.solonen@hut.fi>
================================================================================ ================================================================================
++pcbnew: ++pcbnew:
......
include_directories(${CMAKE_CURRENT_SOURCE_DIR} include_directories(${CMAKE_CURRENT_SOURCE_DIR}
${Boost_INCLUDE_DIR} ${Boost_INCLUDE_DIR}
../3d-viewer
../pcbnew ../pcbnew
../polygon ../polygon
) )
...@@ -41,23 +42,36 @@ set(COMMON_SRCS ...@@ -41,23 +42,36 @@ set(COMMON_SRCS
worksheet.cpp worksheet.cpp
wxwineda.cpp wxwineda.cpp
zoom.cpp zoom.cpp
)
add_library(common ${COMMON_SRCS})
set(PCB_COMMON_SRCS
pcbcommon.cpp
../pcbnew/basepcbframe.cpp ../pcbnew/basepcbframe.cpp
../pcbnew/class_board.cpp ../pcbnew/class_board.cpp
../pcbnew/class_board_connected_item.cpp ../pcbnew/class_board_connected_item.cpp
../pcbnew/class_board_item.cpp
../pcbnew/class_cotation.cpp ../pcbnew/class_cotation.cpp
../pcbnew/class_drawsegment.cpp
../pcbnew/class_drc_item.cpp ../pcbnew/class_drc_item.cpp
../pcbnew/class_edge_mod.cpp
../pcbnew/class_equipot.cpp
../pcbnew/class_marker.cpp ../pcbnew/class_marker.cpp
../pcbnew/class_mire.cpp ../pcbnew/class_mire.cpp
../pcbnew/class_module.cpp
../pcbnew/class_pad.cpp ../pcbnew/class_pad.cpp
../pcbnew/class_pad_draw_functions.cpp ../pcbnew/class_pad_draw_functions.cpp
../pcbnew/class_pcb_text.cpp ../pcbnew/class_pcb_text.cpp
../pcbnew/class_text_mod.cpp
../pcbnew/class_track.cpp
../pcbnew/class_zone.cpp ../pcbnew/class_zone.cpp
../pcbnew/class_zone_setting.cpp ../pcbnew/class_zone_setting.cpp
../pcbnew/classpcb.cpp ../pcbnew/classpcb.cpp
../pcbnew/collectors.cpp ../pcbnew/collectors.cpp
../pcbnew/sel_layer.cpp ../pcbnew/sel_layer.cpp
../pcbnew/tracemod.cpp
../pcbnew/dialog_print_using_printer_base.cpp ../pcbnew/dialog_print_using_printer_base.cpp
) )
add_library(common ${COMMON_SRCS}) add_library(pcbcommon ${PCB_COMMON_SRCS})
...@@ -5,8 +5,30 @@ ...@@ -5,8 +5,30 @@
#include "fctsys.h" #include "fctsys.h"
#include "common.h" #include "common.h"
#include "appl_wxstruct.h"
#define BUILD_VERSION wxT("(20090325-unstable)")
wxString g_BuildVersion
#ifdef HAVE_SVN_VERSION
#include "config.h"
( wxT( KICAD_SVN_VERSION ) )
#else
( BUILD_VERSION )
#endif
;
wxString g_BuildAboutVersion
#if defined(HAVE_SVN_VERSION) || defined(HAVE_SVN_REVISION)
# include "config.h"
( wxT( KICAD_ABOUT_VERSION ) )
#else
( BUILD_VERSION )
#endif
;
extern wxString g_Main_Title; // Import program title
/**********************************/ /**********************************/
wxString SetMsg( const wxString& msg ) wxString SetMsg( const wxString& msg )
...@@ -33,7 +55,7 @@ void InitKiCadAbout( wxAboutDialogInfo& info ) ...@@ -33,7 +55,7 @@ void InitKiCadAbout( wxAboutDialogInfo& info )
/**************************************************/ /**************************************************/
{ {
/* Set name and title */ /* Set name and title */
info.SetName( g_Main_Title ); info.SetName( wxGetApp().GetTitle() );
/* Set description */ /* Set description */
wxString description; wxString description;
...@@ -65,7 +87,7 @@ void InitKiCadAbout( wxAboutDialogInfo& info ) ...@@ -65,7 +87,7 @@ void InitKiCadAbout( wxAboutDialogInfo& info )
/* Check for wxMAC */ /* Check for wxMAC */
# elif defined __WXMAC__ # elif defined __WXMAC__
description << ( wxT( "on Macintosch" ) ); description << ( wxT( "on Macintosh" ) );
/* Linux 64 bits */ /* Linux 64 bits */
# elif defined _LP64 && __LINUX__ # elif defined _LP64 && __LINUX__
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
#include <wx/arrimpl.cpp> #include <wx/arrimpl.cpp>
WX_DEFINE_OBJARRAY( GridArray ); WX_DEFINE_OBJARRAY( GridArray );
BASE_SCREEN* ActiveScreen = NULL;
/* defines locaux */ /* defines locaux */
#define CURSOR_SIZE 12 /* taille de la croix du curseur PCB */ #define CURSOR_SIZE 12 /* taille de la croix du curseur PCB */
...@@ -39,6 +40,7 @@ BASE_SCREEN::BASE_SCREEN( KICAD_T aType ) : EDA_BaseStruct( aType ) ...@@ -39,6 +40,7 @@ BASE_SCREEN::BASE_SCREEN( KICAD_T aType ) : EDA_BaseStruct( aType )
m_UserGridIsON = FALSE; m_UserGridIsON = FALSE;
m_Center = true; m_Center = true;
m_CurrentSheetDesc = &g_Sheet_A4; m_CurrentSheetDesc = &g_Sheet_A4;
m_IsPrinting = false;
InitDatas(); InitDatas();
} }
...@@ -165,6 +167,20 @@ int BASE_SCREEN::Scale( int coord ) ...@@ -165,6 +167,20 @@ int BASE_SCREEN::Scale( int coord )
#endif #endif
} }
double BASE_SCREEN::Scale( double coord )
{
#ifdef WX_ZOOM
return coord;
#else
if( !m_Zoom )
return 0;
if( !m_ZoomScalar || !m_Zoom )
return 0;
return ( coord * (double) m_ZoomScalar ) / (double) m_Zoom;
#endif
}
void BASE_SCREEN::Scale( wxPoint& pt ) void BASE_SCREEN::Scale( wxPoint& pt )
{ {
......
...@@ -77,18 +77,21 @@ WinEDA_BasicFrame::~WinEDA_BasicFrame() ...@@ -77,18 +77,21 @@ WinEDA_BasicFrame::~WinEDA_BasicFrame()
* Virtual function * Virtual function
*/ */
/***********************************/ /***********************************/
void void WinEDA_BasicFrame::ReCreateMenuBar()
WinEDA_BasicFrame::ReCreateMenuBar()
/***********************************/ /***********************************/
{ {
} }
/*******************************/ /**
void * Load common frame parameters from configuration.
WinEDA_BasicFrame::GetSettings() *
/*******************************/ * The method is virtual so you can override it to load frame specific
* parameters. Don't forget to call the base method or your frames won't
* remember their positions and sizes.
*/
void WinEDA_BasicFrame::LoadSettings()
{ {
wxString text; wxString text;
int Ypos_min; int Ypos_min;
...@@ -121,10 +124,14 @@ WinEDA_BasicFrame::GetSettings() ...@@ -121,10 +124,14 @@ WinEDA_BasicFrame::GetSettings()
} }
/********************************/ /**
void * Save common frame parameters from configuration.
WinEDA_BasicFrame::SaveSettings() *
/********************************/ * The method is virtual so you can override it to save frame specific
* parameters. Don't forget to call the base method or your frames won't
* remember their positions and sizes.
*/
void WinEDA_BasicFrame::SaveSettings()
{ {
wxString text; wxString text;
wxConfig* config; wxConfig* config;
...@@ -149,8 +156,7 @@ WinEDA_BasicFrame::SaveSettings() ...@@ -149,8 +156,7 @@ WinEDA_BasicFrame::SaveSettings()
/******************************************************/ /******************************************************/
void void WinEDA_BasicFrame::PrintMsg( const wxString& text )
WinEDA_BasicFrame::PrintMsg( const wxString& text )
/******************************************************/ /******************************************************/
{ {
SetStatusText( text ); SetStatusText( text );
...@@ -161,9 +167,7 @@ WinEDA_BasicFrame::PrintMsg( const wxString& text ) ...@@ -161,9 +167,7 @@ WinEDA_BasicFrame::PrintMsg( const wxString& text )
* Display a bargraph (0 to 50 point length) for a PerCent value from 0 to 100 * Display a bargraph (0 to 50 point length) for a PerCent value from 0 to 100
*/ */
/*************************************************************************/ /*************************************************************************/
void void WinEDA_BasicFrame::DisplayActivity( int PerCent, const wxString& Text )
WinEDA_BasicFrame::DisplayActivity( int PerCent,
const wxString& Text )
/*************************************************************************/ /*************************************************************************/
{ {
wxString Line; wxString Line;
...@@ -184,8 +188,7 @@ WinEDA_BasicFrame::DisplayActivity( int PerCent, ...@@ -184,8 +188,7 @@ WinEDA_BasicFrame::DisplayActivity( int PerCent,
* Met a jour la liste des anciens projets * Met a jour la liste des anciens projets
*/ */
/*******************************************************************/ /*******************************************************************/
void void WinEDA_BasicFrame::SetLastProject( const wxString& FullFileName )
WinEDA_BasicFrame::SetLastProject( const wxString& FullFileName )
/*******************************************************************/ /*******************************************************************/
{ {
wxGetApp().m_fileHistory.AddFileToHistory( FullFileName ); wxGetApp().m_fileHistory.AddFileToHistory( FullFileName );
...@@ -231,8 +234,7 @@ wxString WinEDA_BasicFrame::GetFileFromHistory( int cmdId, ...@@ -231,8 +234,7 @@ wxString WinEDA_BasicFrame::GetFileFromHistory( int cmdId,
* *
*/ */
/**************************************************************/ /**************************************************************/
void void WinEDA_BasicFrame::GetKicadHelp( wxCommandEvent& event )
WinEDA_BasicFrame::GetKicadHelp( wxCommandEvent& event )
/**************************************************************/ /**************************************************************/
{ {
wxString msg; wxString msg;
...@@ -286,8 +288,7 @@ WinEDA_BasicFrame::GetKicadHelp( wxCommandEvent& event ) ...@@ -286,8 +288,7 @@ WinEDA_BasicFrame::GetKicadHelp( wxCommandEvent& event )
* *
*/ */
/***********************************************************************/ /***********************************************************************/
void void WinEDA_BasicFrame::GetKicadAbout( wxCommandEvent& WXUNUSED(event) )
WinEDA_BasicFrame::GetKicadAbout( wxCommandEvent& WXUNUSED(event) )
/***********************************************************************/ /***********************************************************************/
{ {
wxAboutDialogInfo info; wxAboutDialogInfo info;
...@@ -300,8 +301,7 @@ WinEDA_BasicFrame::GetKicadAbout( wxCommandEvent& WXUNUSED(event) ) ...@@ -300,8 +301,7 @@ WinEDA_BasicFrame::GetKicadAbout( wxCommandEvent& WXUNUSED(event) )
* *
*/ */
/********************************************************************/ /********************************************************************/
void void WinEDA_BasicFrame::ProcessFontPreferences( int id )
WinEDA_BasicFrame::ProcessFontPreferences( int id )
/********************************************************************/ /********************************************************************/
{ {
wxFont font; wxFont font;
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
#include "common.h" #include "common.h"
#include "macros.h" #include "macros.h"
#include "base_struct.h" #include "base_struct.h"
#include "sch_item_struct.h" #include "class_drawpickedstruct.h"
#include "class_base_screen.h" #include "class_base_screen.h"
#include "class_drawpanel.h" #include "class_drawpanel.h"
#include "confirm.h" #include "confirm.h"
......
...@@ -4,29 +4,9 @@ ...@@ -4,29 +4,9 @@
#include "fctsys.h" #include "fctsys.h"
#include "common.h" #include "common.h"
#include "base_struct.h" #include "class_drawpickedstruct.h"
#include "sch_item_struct.h"
/* Constructor and destructor for SCH_ITEM */
/* They are not inline because this creates problems with gcc at linking time
* in debug mode
*/
SCH_ITEM::SCH_ITEM( EDA_BaseStruct* aParent, KICAD_T aType ) :
EDA_BaseStruct( aParent, aType )
{
m_Layer = 0;
}
SCH_ITEM::~SCH_ITEM()
{
}
/**************************/
/* class DrawPickedStruct */
/**************************/
/* This class has only one useful member: .m_PickedStruct, used as a link. /* This class has only one useful member: .m_PickedStruct, used as a link.
* It does not describe really an item. * It does not describe really an item.
* It is used to create a linked list of selected items (in block selection). * It is used to create a linked list of selected items (in block selection).
...@@ -35,8 +15,8 @@ SCH_ITEM::~SCH_ITEM() ...@@ -35,8 +15,8 @@ SCH_ITEM::~SCH_ITEM()
*/ */
/*******************************************************************/ /*******************************************************************/
DrawPickedStruct::DrawPickedStruct( SCH_ITEM * pickedstruct ) : DrawPickedStruct::DrawPickedStruct( EDA_BaseStruct* pickedstruct ) :
SCH_ITEM( NULL, DRAW_PICK_ITEM_STRUCT_TYPE ) EDA_BaseStruct( NULL, DRAW_PICK_ITEM_STRUCT_TYPE )
/*******************************************************************/ /*******************************************************************/
{ {
m_PickedStruct = pickedstruct; m_PickedStruct = pickedstruct;
...@@ -69,9 +49,9 @@ EDA_Rect DrawPickedStruct::GetBoundingBox() ...@@ -69,9 +49,9 @@ EDA_Rect DrawPickedStruct::GetBoundingBox()
EDA_Rect DrawPickedStruct::GetBoundingBoxUnion() EDA_Rect DrawPickedStruct::GetBoundingBoxUnion()
{ {
EDA_Rect ret; EDA_Rect ret;
EDA_BaseStruct* item;
DrawPickedStruct* cur = this; DrawPickedStruct* cur = this;
SCH_ITEM* item;
while( cur && (item = cur->m_PickedStruct) != NULL ) while( cur && (item = cur->m_PickedStruct) != NULL )
{ {
ret.Merge( item->GetBoundingBox() ); ret.Merge( item->GetBoundingBox() );
......
This diff is collapsed.
...@@ -69,6 +69,7 @@ bool DrawPage( WinEDA_DrawPanel* panel ) ...@@ -69,6 +69,7 @@ bool DrawPage( WinEDA_DrawPanel* panel )
int ClipboardSizeX, ClipboardSizeY; int ClipboardSizeX, ClipboardSizeY;
bool DrawBlock = FALSE; bool DrawBlock = FALSE;
wxRect DrawArea; wxRect DrawArea;
BASE_SCREEN* screen = panel->GetScreen();
/* scale is the ratio resolution/internal units */ /* scale is the ratio resolution/internal units */
float scale = 82.0 / panel->m_Parent->m_InternalUnits; float scale = 82.0 / panel->m_Parent->m_InternalUnits;
...@@ -103,7 +104,7 @@ bool DrawPage( WinEDA_DrawPanel* panel ) ...@@ -103,7 +104,7 @@ bool DrawPage( WinEDA_DrawPanel* panel )
EDA_Rect tmp = panel->m_ClipBox; EDA_Rect tmp = panel->m_ClipBox;
GRResetPenAndBrush( &dc ); GRResetPenAndBrush( &dc );
GRForceBlackPen( s_PlotBlackAndWhite ); GRForceBlackPen( s_PlotBlackAndWhite );
g_IsPrinting = TRUE; screen->m_IsPrinting = true;
dc.SetUserScale( scale, scale ); dc.SetUserScale( scale, scale );
ClipboardSizeX = dc.MaxX() + 10; ClipboardSizeX = dc.MaxX() + 10;
ClipboardSizeY = dc.MaxY() + 10; ClipboardSizeY = dc.MaxY() + 10;
...@@ -115,7 +116,7 @@ bool DrawPage( WinEDA_DrawPanel* panel ) ...@@ -115,7 +116,7 @@ bool DrawPage( WinEDA_DrawPanel* panel )
dc.SetClippingRegion( DrawArea ); dc.SetClippingRegion( DrawArea );
} }
panel->PrintPage( &dc, Print_Sheet_Ref, -1, false ); panel->PrintPage( &dc, Print_Sheet_Ref, -1, false );
g_IsPrinting = FALSE; screen->m_IsPrinting = false;
panel->m_ClipBox = tmp; panel->m_ClipBox = tmp;
wxMetafile* mf = dc.Close(); wxMetafile* mf = dc.Close();
if( mf ) if( mf )
......
...@@ -29,7 +29,6 @@ ...@@ -29,7 +29,6 @@
#define newline wxString( wxT( "\n" ) ) #define newline wxString( wxT( "\n" ) )
#define space wxString( wxT( " " ) ) #define space wxString( wxT( " " ) )
#define semicolon wxString( wxT( ";" ) ) #define semicolon wxString( wxT( ";" ) )
#define wx_round( a ) (int) ( (a) + .5 )
#ifdef __BORLANDC__ #ifdef __BORLANDC__
#pragma warn -rch #pragma warn -rch
......
...@@ -21,6 +21,11 @@ ...@@ -21,6 +21,11 @@
#include <wx/fontdlg.h> #include <wx/fontdlg.h>
/* Configuration entry names. */
static const wxString CursorShapeEntry( wxT( "CuShape" ) );
static const wxString ShowGridEntry( wxT( "ShGrid" ) );
BEGIN_EVENT_TABLE( WinEDA_DrawFrame, WinEDA_BasicFrame ) BEGIN_EVENT_TABLE( WinEDA_DrawFrame, WinEDA_BasicFrame )
EVT_MOUSEWHEEL( WinEDA_DrawFrame::OnMouseEvent ) EVT_MOUSEWHEEL( WinEDA_DrawFrame::OnMouseEvent )
EVT_MENU_OPEN( WinEDA_DrawFrame::OnMenuOpen ) EVT_MENU_OPEN( WinEDA_DrawFrame::OnMenuOpen )
...@@ -60,6 +65,7 @@ WinEDA_DrawFrame::WinEDA_DrawFrame( wxWindow* father, int idtype, ...@@ -60,6 +65,7 @@ WinEDA_DrawFrame::WinEDA_DrawFrame( wxWindow* father, int idtype,
m_Print_Sheet_Ref = TRUE; // TRUE pour avoir le cartouche imprim� m_Print_Sheet_Ref = TRUE; // TRUE pour avoir le cartouche imprim�
m_Draw_Auxiliary_Axis = FALSE; // TRUE pour avoir les axes auxiliares dessines m_Draw_Auxiliary_Axis = FALSE; // TRUE pour avoir les axes auxiliares dessines
m_UnitType = INTERNAL_UNIT_TYPE; // Internal unit = inch m_UnitType = INTERNAL_UNIT_TYPE; // Internal unit = inch
m_CursorShape = 0;
// Internal units per inch: = 1000 for schema, = 10000 for PCB // Internal units per inch: = 1000 for schema, = 10000 for PCB
m_InternalUnits = EESCHEMA_INTERNAL_UNIT; m_InternalUnits = EESCHEMA_INTERNAL_UNIT;
...@@ -113,7 +119,7 @@ WinEDA_DrawFrame::~WinEDA_DrawFrame() ...@@ -113,7 +119,7 @@ WinEDA_DrawFrame::~WinEDA_DrawFrame()
void WinEDA_DrawFrame::AddFontSelectionMenu( wxMenu* main_menu ) void WinEDA_DrawFrame::AddFontSelectionMenu( wxMenu* main_menu )
/*****************************************************************/ /*****************************************************************/
/* create the submenu for fonte selection and setup font size /* create the submenu for font selection and setup font size
*/ */
{ {
wxMenu* fontmenu = new wxMenu(); wxMenu* fontmenu = new wxMenu();
...@@ -180,7 +186,7 @@ void WinEDA_DrawFrame::Affiche_Message( const wxString& message ) ...@@ -180,7 +186,7 @@ void WinEDA_DrawFrame::Affiche_Message( const wxString& message )
/**************************************************************/ /**************************************************************/
/* /*
* Dispaly the meesage on yhe bottomon the frame * Display the message on the bottom the frame
*/ */
{ {
SetStatusText( message ); SetStatusText( message );
...@@ -532,7 +538,7 @@ void WinEDA_DrawFrame::SetToolID( int id, int new_cursor_id, ...@@ -532,7 +538,7 @@ void WinEDA_DrawFrame::SetToolID( int id, int new_cursor_id,
/*****************************/ /*****************************/
/* default virtual fonctions */ /* default virtual functions */
/*****************************/ /*****************************/
void WinEDA_DrawFrame::OnGrid( int grid_type ) void WinEDA_DrawFrame::OnGrid( int grid_type )
...@@ -577,11 +583,11 @@ void WinEDA_DrawFrame::AdjustScrollBars() ...@@ -577,11 +583,11 @@ void WinEDA_DrawFrame::AdjustScrollBars()
if( screen == NULL || DrawPanel == NULL ) if( screen == NULL || DrawPanel == NULL )
return; return;
// La zone d'affichage est reglee a une taille double de la feuille de travail: // The drawing size is twice the current page size.
draw_size = screen->ReturnPageSize() * 2; draw_size = screen->ReturnPageSize() * 2;
// On utilise le centre de l'ecran comme position de reference, donc // Calculate the portion of the drawing that can be displayed in the
// la surface de trace doit etre augmentee // client area at the current zoom level.
panel_size = DrawPanel->GetClientSize(); panel_size = DrawPanel->GetClientSize();
screen->Unscale( panel_size ); screen->Unscale( panel_size );
...@@ -603,8 +609,14 @@ void WinEDA_DrawFrame::AdjustScrollBars() ...@@ -603,8 +609,14 @@ void WinEDA_DrawFrame::AdjustScrollBars()
screen->m_DrawOrg.y = -panel_size.y / 2; screen->m_DrawOrg.y = -panel_size.y / 2;
} }
// Calcul du nombre de scrolls (en unites de scrool ) // Calculate the number of scroll bar units for the given zoom level. */
scrollbar_number = draw_size / screen->Unscale( screen->m_ZoomScalar ); scrollbar_number.x =
wxRound( (double) draw_size.x /
(double) screen->Unscale( screen->m_ZoomScalar ) );
scrollbar_number.y =
wxRound( (double) draw_size.y /
(double) screen->Unscale( screen->m_ZoomScalar ) );
xUnit = yUnit = screen->m_ZoomScalar; xUnit = yUnit = screen->m_ZoomScalar;
if( xUnit <= 1 ) if( xUnit <= 1 )
...@@ -620,16 +632,21 @@ void WinEDA_DrawFrame::AdjustScrollBars() ...@@ -620,16 +632,21 @@ void WinEDA_DrawFrame::AdjustScrollBars()
scrollbar_pos.x -= panel_size.x / 2; scrollbar_pos.x -= panel_size.x / 2;
scrollbar_pos.y -= panel_size.y / 2; scrollbar_pos.y -= panel_size.y / 2;
if( scrollbar_pos.x < 0 ) if( scrollbar_pos.x <= 0 )
scrollbar_pos.x = 0; scrollbar_pos.x = 0;
if( scrollbar_pos.y < 0 ) if( scrollbar_pos.y <= 0 )
scrollbar_pos.y = 0; scrollbar_pos.y = 0;
scrollbar_pos.x /= xUnit; scrollbar_pos.x = wxRound( (double) scrollbar_pos.x / (double) xUnit );
scrollbar_pos.y /= yUnit; scrollbar_pos.y = wxRound( (double) scrollbar_pos.y / (double) yUnit );
screen->m_ScrollbarPos = scrollbar_pos; screen->m_ScrollbarPos = scrollbar_pos;
screen->m_ScrollbarNumber = scrollbar_number; screen->m_ScrollbarNumber = scrollbar_number;
wxLogDebug( wxT( "SetScrollbars(%d, %d, %d, %d, %d, %d)" ),
screen->m_ZoomScalar, screen->m_ZoomScalar,
screen->m_ScrollbarNumber.x, screen->m_ScrollbarNumber.y,
screen->m_ScrollbarPos.x, screen->m_ScrollbarPos.y );
DrawPanel->SetScrollbars( screen->m_ZoomScalar, DrawPanel->SetScrollbars( screen->m_ZoomScalar,
screen->m_ZoomScalar, screen->m_ZoomScalar,
screen->m_ScrollbarNumber.x, screen->m_ScrollbarNumber.x,
...@@ -648,7 +665,7 @@ void WinEDA_DrawFrame::SetDrawBgColor( int color_num ) ...@@ -648,7 +665,7 @@ void WinEDA_DrawFrame::SetDrawBgColor( int color_num )
* le parametre XorMode est mis a jour selon la couleur du fond * le parametre XorMode est mis a jour selon la couleur du fond
*/ */
{ {
if( (color_num != WHITE) && (color_num != BLACK) ) if( ( color_num != WHITE ) && ( color_num != BLACK ) )
color_num = BLACK; color_num = BLACK;
g_DrawBgColor = color_num; g_DrawBgColor = color_num;
if( color_num == WHITE ) if( color_num == WHITE )
...@@ -688,11 +705,11 @@ void WinEDA_DrawFrame::SetLanguage( wxCommandEvent& event ) ...@@ -688,11 +705,11 @@ void WinEDA_DrawFrame::SetLanguage( wxCommandEvent& event )
/* /*
* Update the status bar information. * Update the status bar information.
* *
* The base method updates the absolute and relative cooridinates and the * The base method updates the absolute and relative coordinates and the
* zoom information. If you override this virtual method, make sure to call * zoom information. If you override this virtual method, make sure to call
* this subclassed method. * this subclassed method.
*/ */
void WinEDA_DrawFrame::Affiche_Status_Box() void WinEDA_DrawFrame::UpdateStatusBar()
{ {
wxString Line; wxString Line;
int dx, dy; int dx, dy;
...@@ -703,7 +720,7 @@ void WinEDA_DrawFrame::Affiche_Status_Box() ...@@ -703,7 +720,7 @@ void WinEDA_DrawFrame::Affiche_Status_Box()
/* Display Zoom level: zoom = zoom_coeff/ZoomScalar */ /* Display Zoom level: zoom = zoom_coeff/ZoomScalar */
if ( (screen->GetZoom() % screen->m_ZoomScalar) == 0 ) if ( (screen->GetZoom() % screen->m_ZoomScalar) == 0 )
Line.Printf( wxT( "Z %d" ),screen->GetZoom() / screen->m_ZoomScalar ); Line.Printf( wxT( "Z %d" ), screen->GetZoom() / screen->m_ZoomScalar );
else else
Line.Printf( wxT( "Z %.1f" ), (float)screen->GetZoom() / screen->m_ZoomScalar ); Line.Printf( wxT( "Z %.1f" ), (float)screen->GetZoom() / screen->m_ZoomScalar );
SetStatusText( Line, 1 ); SetStatusText( Line, 1 );
...@@ -726,3 +743,38 @@ void WinEDA_DrawFrame::Affiche_Status_Box() ...@@ -726,3 +743,38 @@ void WinEDA_DrawFrame::Affiche_Status_Box()
SetStatusText( Line, 3 ); SetStatusText( Line, 3 );
} }
/**
* Load draw frame specific configuration settings.
*
* Don't forget to call this base method from any derived classes or the
* settings will not get loaded.
*/
void WinEDA_DrawFrame::LoadSettings()
{
wxASSERT( wxGetApp().m_EDA_Config != NULL );
wxConfig* cfg = wxGetApp().m_EDA_Config;
WinEDA_BasicFrame::LoadSettings();
cfg->Read( m_FrameName + CursorShapeEntry, &m_CursorShape, ( long )0 );
cfg->Read( m_FrameName + ShowGridEntry, &m_Draw_Grid, true );
}
/**
* Save draw frame specific configuration settings.
*
* Don't forget to call this base method from any derived classes or the
* settings will not get saved.
*/
void WinEDA_DrawFrame::SaveSettings()
{
wxASSERT( wxGetApp().m_EDA_Config != NULL );
wxConfig* cfg = wxGetApp().m_EDA_Config;
WinEDA_BasicFrame::SaveSettings();
cfg->Write( m_FrameName + CursorShapeEntry, m_CursorShape );
cfg->Write( m_FrameName + ShowGridEntry, m_Draw_Grid );
}
This diff is collapsed.
...@@ -20,13 +20,15 @@ void WinEDA_App::ReadPdfBrowserInfos() ...@@ -20,13 +20,15 @@ void WinEDA_App::ReadPdfBrowserInfos()
/* Read from Common config the Pdf browser choice /* Read from Common config the Pdf browser choice
*/ */
{ {
if( m_EDA_CommonConfig ) wxASSERT( m_EDA_CommonConfig != NULL );
{
m_PdfBrowserIsDefault = m_EDA_CommonConfig->Read( wxT( "PdfBrowserIsDefault" ), TRUE ); m_PdfBrowserIsDefault = m_EDA_CommonConfig->Read( wxT( "PdfBrowserIsDefault" ),
m_PdfBrowser = m_EDA_CommonConfig->Read( wxT( "PdfBrowserName" ), wxEmptyString ); true );
} m_PdfBrowser = m_EDA_CommonConfig->Read( wxT( "PdfBrowserName" ),
wxEmptyString );
if( m_PdfBrowser.IsEmpty() ) if( m_PdfBrowser.IsEmpty() )
m_PdfBrowserIsDefault = TRUE; m_PdfBrowserIsDefault = true;
} }
...@@ -37,11 +39,13 @@ void WinEDA_App::WritePdfBrowserInfos() ...@@ -37,11 +39,13 @@ void WinEDA_App::WritePdfBrowserInfos()
/* Write into Common config the Pdf browser choice /* Write into Common config the Pdf browser choice
*/ */
{ {
if( !m_EDA_CommonConfig ) wxASSERT( m_EDA_CommonConfig != NULL );
return;
if( m_PdfBrowser.IsEmpty() ) if( m_PdfBrowser.IsEmpty() )
m_PdfBrowserIsDefault = TRUE; m_PdfBrowserIsDefault = true;
m_EDA_CommonConfig->Write( wxT( "PdfBrowserIsDefault" ), m_PdfBrowserIsDefault );
m_EDA_CommonConfig->Write( wxT( "PdfBrowserIsDefault" ),
m_PdfBrowserIsDefault );
m_EDA_CommonConfig->Write( wxT( "PdfBrowserName" ), m_PdfBrowser ); m_EDA_CommonConfig->Write( wxT( "PdfBrowserName" ), m_PdfBrowser );
} }
......
This diff is collapsed.
...@@ -175,88 +175,6 @@ wxString MakeReducedFileName( const wxString& fullfilename, ...@@ -175,88 +175,6 @@ wxString MakeReducedFileName( const wxString& fullfilename,
} }
/***************************************************************************/
wxString MakeFileName( const wxString& dir,
const wxString& shortname, const wxString& ext )
/***************************************************************************/
/** Function MakeFileName
* Calculate the full file name from dir, shortname and ext
* @param dir = path (can be empty)
* @param shortname = filename with or without path and/or extension
* @param ext = extension (can be empty)
* If shortname has an absolute path, or a path starts by ./ or ../,
* the path will not be modified
* If shortname has an extension, it will not be modified
* @return full filename
*/
{
wxString fullfilename;
int ii;
if( !dir.IsEmpty() )
{
if( !wxIsAbsolutePath( shortname ) )
{
if( !shortname.StartsWith( wxT( "./" ) ) && !shortname.StartsWith( wxT( "../" ) ) // under unix
&& !shortname.StartsWith( wxT( ".\\" ) ) && !shortname.StartsWith( wxT( "..\\" ) )) // under Windows
{ /* no absolute path in shortname, add dir to shortname */
fullfilename = dir;
}
}
}
fullfilename += shortname; // Add shortname to dir or use shortname only
fullfilename.Replace( WIN_STRING_DIR_SEP, UNIX_STRING_DIR_SEP );
/* Add an extension if shortname has no extension */
if( ext.IsEmpty() )
return fullfilename;
/* search for an extension */
ii = fullfilename.Length(); /* Get the end of name */
for( ; ii >= 0; ii-- )
{
if( fullfilename.GetChar( ii ) == '/' )
{
/* not extension: add ext */
fullfilename += ext;
break;
}
if( fullfilename.GetChar( ii ) == '.' ) /* extension exists, do nothing */
break;
}
return fullfilename;
}
/*************************************************************************/
void ChangeFileNameExt( wxString& FullFileName, const wxString& NewExt )
/**************************************************************************/
/** Function ChangeFileNameExt
* change the extension of FullFileName to NewExt.
* @param FullFileName = filename to modify
* @param NewExt = new extension for FullFileName
*/
{
wxString FileName;
FileName = FullFileName.BeforeLast( '.' );
if( !FileName.IsEmpty() )
FileName += NewExt;
else
FileName = FullFileName + NewExt;
if( FileName.StartsWith( wxT( "\"" ) ) && ( FileName.Last() != '"' ) )
FileName += wxT( "\"" );
FullFileName = FileName;
}
/*******************************************/ /*******************************************/
void AddDelimiterString( wxString& string ) void AddDelimiterString( wxString& string )
/*******************************************/ /*******************************************/
...@@ -504,12 +422,10 @@ wxString FindKicadFile( const wxString& shortname ) ...@@ -504,12 +422,10 @@ wxString FindKicadFile( const wxString& shortname )
} }
/***********************************************************************************/
int ExecuteFile( wxWindow* frame, const wxString& ExecFile, const wxString& param )
/***********************************************************************************/
/* Call the executable file "ExecFile", with params "param" /* Call the executable file "ExecFile", with params "param"
*/ */
int ExecuteFile( wxWindow* frame, const wxString& ExecFile,
const wxString& param )
{ {
wxString FullFileName; wxString FullFileName;
...@@ -525,7 +441,7 @@ int ExecuteFile( wxWindow* frame, const wxString& ExecFile, const wxString& para ...@@ -525,7 +441,7 @@ int ExecuteFile( wxWindow* frame, const wxString& ExecFile, const wxString& para
} }
wxString msg; wxString msg;
msg.Printf( wxT( "Command file <%s> not found" ), FullFileName.GetData() ); msg.Printf( _( "Command <%s> could not found" ), ExecFile.c_str() );
DisplayError( frame, msg, 20 ); DisplayError( frame, msg, 20 );
return -1; return -1;
} }
...@@ -653,16 +569,15 @@ wxString ReturnKicadDatasPath() ...@@ -653,16 +569,15 @@ wxString ReturnKicadDatasPath()
} }
/***************************/ /*
wxString GetEditorName() * Return the prefered editor name
/***************************/
/* Return the prefered editor name
*/ */
wxString& WinEDA_App::GetEditorName()
{ {
wxString editorname = g_EditorName; wxString editorname = m_EditorName;
if( editorname.IsEmpty() ) // We get the prefered editor name from environment variable // We get the prefered editor name from environment variable first.
if( editorname.IsEmpty() )
{ {
wxGetEnv( wxT( "EDITOR" ), &editorname ); wxGetEnv( wxT( "EDITOR" ), &editorname );
} }
...@@ -674,23 +589,18 @@ wxString GetEditorName() ...@@ -674,23 +589,18 @@ wxString GetEditorName()
#ifdef __WINDOWS__ #ifdef __WINDOWS__
mask += wxT( ".exe" ); mask += wxT( ".exe" );
#endif #endif
editorname = EDA_FileSelector( _( "Prefered Editor:" ), editorname = EDA_FileSelector( _( "Prefered Editor:" ), wxEmptyString,
wxEmptyString, /* Default path */ wxEmptyString, wxEmptyString, mask,
wxEmptyString, /* default filename */ NULL, wxFD_OPEN, true );
wxEmptyString, /* default filename extension */
mask, /* filter for filename list */
NULL, /* parent frame */
wxFD_OPEN, /* wxFD_SAVE, wxFD_OPEN ..*/
TRUE /* true = keep the current path */
);
} }
if( ( !editorname.IsEmpty() ) && wxGetApp().m_EDA_CommonConfig ) if( !editorname.IsEmpty() )
{ {
g_EditorName = editorname; m_EditorName = editorname;
wxGetApp().m_EDA_CommonConfig->Write( wxT( "Editor" ), g_EditorName ); m_EDA_CommonConfig->Write( wxT( "Editor" ), m_EditorName );
} }
return g_EditorName;
return m_EditorName;
} }
...@@ -815,3 +725,9 @@ void OpenFile( const wxString& file ) ...@@ -815,3 +725,9 @@ void OpenFile( const wxString& file )
if( success && !command.IsEmpty() ) if( success && !command.IsEmpty() )
ProcessExecute( command ); ProcessExecute( command );
} }
wxString QuoteFullPath( wxFileName& fn, wxPathFormat format )
{
return wxT( "\"" ) + fn.GetFullPath() + wxT( "\"" );
}
This diff is collapsed.
...@@ -31,6 +31,14 @@ ...@@ -31,6 +31,14 @@
* and remember users can have old versions with bugs * and remember users can have old versions with bugs
*/ */
/* variables generales */
// pour les tracs en mode XOR = GR_XOR ou GR_NXOR selon couleur de fond
int g_XorMode = GR_NXOR;
// couleur de fond de la frame de dessin
int g_DrawBgColor = WHITE;
#define USE_CLIP_FILLED_POLYGONS #define USE_CLIP_FILLED_POLYGONS
#ifdef USE_CLIP_FILLED_POLYGONS #ifdef USE_CLIP_FILLED_POLYGONS
...@@ -1480,21 +1488,17 @@ void GRSetTextFgColor( wxDC* DC, int Color ) ...@@ -1480,21 +1488,17 @@ void GRSetTextFgColor( wxDC* DC, int Color )
/*********************************************************/ /*********************************************************/
/* Set the foreground color used to draw texts */ /* Set the foreground color used to draw texts */
{ {
DC->SetTextForeground( wxColour( DC->SetTextForeground( wxColour( ColorRefs[Color].m_Red,
ColorRefs[Color].m_Red,
ColorRefs[Color].m_Green, ColorRefs[Color].m_Green,
ColorRefs[Color].m_Blue ) ColorRefs[Color].m_Blue ) );
);
} }
void GRSetTextFgColor( wxDC* DC, wxFont*, int Color ) void GRSetTextFgColor( wxDC* DC, wxFont*, int Color )
{ {
DC->SetTextForeground( wxColour( DC->SetTextForeground( wxColour( ColorRefs[Color].m_Red,
ColorRefs[Color].m_Red,
ColorRefs[Color].m_Green, ColorRefs[Color].m_Green,
ColorRefs[Color].m_Blue ) ColorRefs[Color].m_Blue ) );
);
} }
...@@ -1533,22 +1537,18 @@ void GRSetTextBgColor( wxDC* DC, int Color ) ...@@ -1533,22 +1537,18 @@ void GRSetTextBgColor( wxDC* DC, int Color )
/* Set the background color used to draw texts */ /* Set the background color used to draw texts */
{ {
Color &= MASKCOLOR; // keep only the bits used to select the color Color &= MASKCOLOR; // keep only the bits used to select the color
DC->SetTextBackground( wxColour( DC->SetTextBackground( wxColour( ColorRefs[Color].m_Red,
ColorRefs[Color].m_Red,
ColorRefs[Color].m_Green, ColorRefs[Color].m_Green,
ColorRefs[Color].m_Blue ) ColorRefs[Color].m_Blue ) );
);
} }
void GRSetTextBgColor( wxDC* DC, wxFont*, int Color ) void GRSetTextBgColor( wxDC* DC, wxFont*, int Color )
{ {
Color &= MASKCOLOR; // keep only the bits used to select the color Color &= MASKCOLOR; // keep only the bits used to select the color
DC->SetTextBackground( wxColour( DC->SetTextBackground( wxColour( ColorRefs[Color].m_Red,
ColorRefs[Color].m_Red,
ColorRefs[Color].m_Green, ColorRefs[Color].m_Green,
ColorRefs[Color].m_Blue ) ColorRefs[Color].m_Blue ) );
);
} }
#ifdef USE_CLIP_FILLED_POLYGONS #ifdef USE_CLIP_FILLED_POLYGONS
......
...@@ -18,6 +18,19 @@ ...@@ -18,6 +18,19 @@
#include "wxstruct.h" #include "wxstruct.h"
wxString g_CommonSectionTag( wxT( "[common]" ) );
wxString g_SchematicSectionTag( wxT( "[eeschema]" ) );
wxString g_LibEditSectionTag( wxT( "[libedit]" ) );
wxString g_BoardEditorSectionTag( wxT( "[pcbnew]" ) );
wxString g_ModuleEditSectionTag( wxT( "[footprinteditor]" ) );
/* 0 = files are in Home directory (usefull under unix)
* 1 = kicad/template ( usefull only under windows )
* 2 ... = unused
*/
int g_ConfigFileLocationChoice;
/* Class to handle hotkey commnands. hotkeys have a default value /* Class to handle hotkey commnands. hotkeys have a default value
* This class allows the real key code changed by user from a key code list file * This class allows the real key code changed by user from a key code list file
*/ */
...@@ -618,8 +631,7 @@ void AddHotkeyConfigMenu( wxMenu* menu ) ...@@ -618,8 +631,7 @@ void AddHotkeyConfigMenu( wxMenu* menu )
item = new wxMenuItem( menu, ID_PREFERENCES_HOTKEY_SHOW_CURRENT_LIST, item = new wxMenuItem( menu, ID_PREFERENCES_HOTKEY_SHOW_CURRENT_LIST,
_( "Show Current Hotkey List" ), _( "Show Current Hotkey List" ),
_( "Show the current hotkey config" ) _( "Show the current hotkey config" ) );
);
item->SetBitmap( info_xpm ); item->SetBitmap( info_xpm );
menu->Append( item ); menu->Append( item );
...@@ -654,12 +666,11 @@ void AddHotkeyConfigMenu( wxMenu* menu ) ...@@ -654,12 +666,11 @@ void AddHotkeyConfigMenu( wxMenu* menu )
wxITEM_CHECK ); wxITEM_CHECK );
submenu_hkcfg->Append( item ); submenu_hkcfg->Append( item );
ADD_MENUITEM_WITH_HELP_AND_SUBMENU( menu, submenu_hkcfg, ADD_MENUITEM_WITH_HELP_AND_SUBMENU( menu, submenu_hkcfg, -1,
-1,
_( "Hotkey config location" ), _( "Hotkey config location" ),
_( _( "Hotkey config file location " \
"Hotkey config file location selection (home directory or kicad tree)" ), "selection (home directory or " \
right_xpm ); "kicad tree)" ), right_xpm );
submenu_hkcfg->Check( ID_PREFERENCES_HOTKEY_PATH_IS_HOME, submenu_hkcfg->Check( ID_PREFERENCES_HOTKEY_PATH_IS_HOME,
g_ConfigFileLocationChoice == 0 ); g_ConfigFileLocationChoice == 0 );
submenu_hkcfg->Check( ID_PREFERENCES_HOTKEY_PATH_IS_KICAD, submenu_hkcfg->Check( ID_PREFERENCES_HOTKEY_PATH_IS_KICAD,
...@@ -678,8 +689,8 @@ void HandleHotkeyConfigMenuSelection( WinEDA_DrawFrame* frame, int id ) ...@@ -678,8 +689,8 @@ void HandleHotkeyConfigMenuSelection( WinEDA_DrawFrame* frame, int id )
*/ */
{ {
wxMenuBar* menu = frame->GetMenuBar(); wxMenuBar* menu = frame->GetMenuBar();
wxConfig * config = wxGetApp().m_EDA_CommonConfig;
wxASSERT( config != NULL ); wxConfig* config = wxGetApp().m_EDA_CommonConfig;
switch( id ) switch( id )
{ {
......
/*
* This program source code file is part of KICAD, a free EDA CAD application.
*
* Copyright (C) 2008 Wayne Stambaugh <stambaughw@verizon.net>
* Copyright (C) 1992-2008 Kicad Developers, see change_log.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you may find one here:
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
/*
* This file contains the global constants and variables used in the PCB
* applications PCBNEW, CvPcb, and GervView. The goal of this was to
* unobfuscate the original header file design that made it very difficult
* to figure out where these variables lived. Ideally, they should be pushed
* back into the application layer.
*/
#include "fctsys.h"
#include "pcbcommon.h"
#include "plot_common.h"
#include "class_zone_setting.h"
/* Look up Table for conversion one layer number -> one bit layer mask: */
int g_TabOneLayerMask[LAYER_COUNT] = {
0x00000001, 0x00000002, 0x00000004, 0x00000008,
0x00000010, 0x00000020, 0x00000040, 0x00000080,
0x00000100, 0x00000200, 0x00000400, 0x00000800,
0x00001000, 0x00002000, 0x00004000, 0x00008000,
0x00010000, 0x00020000, 0x00040000, 0x00080000,
0x00100000, 0x00200000, 0x00400000, 0x00800000,
0x01000000, 0x02000000, 0x04000000, 0x08000000,
0x10000000, 0x20000000, 0x40000000, 0x80000000
};
/* Look up Table for conversion copper layer count -> general copper layer
* mask: */
int g_TabAllCopperLayerMask[NB_COPPER_LAYERS] = {
0x0001, 0x8001, 0x8003, 0x8007,
0x800F, 0x801F, 0x803F, 0x807F,
0x80FF, 0x81FF, 0x83FF, 0x87FF,
0x8FFF, 0x9FFF, 0xCFFF, 0xFFFF
};
wxString g_ViaType_Name[4] = {
_( "??? Via" ), // Not used yet
_( "Micro Via" ), // from external layer (TOP or BOTTOM) from the near neightbour inner layer only
_( "Blind/Buried Via" ), // from inner or external to inner or external layer (no restriction)
_( "Through Via" ) // Usual via (from TOP to BOTTOM layer only )
};
wxArrayString g_LibName_List; // library list to load
BOARD_ITEM* g_UnDeleteStack[UNDELETE_STACK_SIZE]; // Linked list of deleted items
int g_UnDeleteStackPtr;
bool g_ShowGrid = true;
DISPLAY_OPTIONS DisplayOpt; /* Display options for board items */
/* PCB file name extension definitions. */
wxString PcbExtBuffer( wxT( "brd" ) );
wxString g_SaveFileName( wxT( "$savepcb" ) );
wxString NetExtBuffer( wxT( "net" ) );
wxString NetCmpExtBuffer( wxT( "cmp" ) );
wxString g_Shapes3DExtBuffer( wxT( "wrl" ) );
const wxString ModuleFileExtension( wxT( "mod" ) );
/* PCB file name wild card definitions. */
const wxString ModuleFileWildcard( _( "Kicad footprint library files " \
"(*.mod)|*.mod") );
int g_CurrentVersionPCB = 1;
/* variables generales */
int g_TimeOut; // Timer for automatic saving
int g_SaveTime; // Time for next saving
int g_AnchorColor = BLUE;
int g_ModuleTextCMPColor = LIGHTGRAY;
int g_ModuleTextCUColor = MAGENTA;
int g_ModuleTextNOVColor = DARKGRAY;
int g_PadCUColor = GREEN;
int g_PadCMPColor = RED;
// Current designe settings:
class EDA_BoardDesignSettings g_DesignSettings;
/**
* Used in track creation, a list of track segments currently being created,
* with the newest track at the end of the list, sorted by new-ness. e.g. use
* TRACK->Back() to get the next older track, TRACK->Next() to get the next
* newer track.
*/
DLIST<TRACK> g_CurrentTrackList;
PCB_SCREEN* ScreenPcb = NULL;
BOARD* g_ModuleEditor_Pcb = NULL;
int g_GridRoutingSize = 250;
bool g_Zone_45_Only = FALSE;
/* HPGL plot settings. */
int g_HPGL_Pen_Num = 1; /* num de plume a charger */
int g_HPGL_Pen_Speed = 40; /* vitesse en cm/s */
int g_HPGL_Pen_Diam; /* diametre en mils */
int g_HPGL_Pen_Recouvrement; /* recouvrement en mils ( pour remplissages */
float Scale_X;
float Scale_Y; /* coeff d'agrandissement en X et Y demandes */
int PlotMarge;
int g_PlotLine_Width;
int g_PlotFormat = PLOT_FORMAT_GERBER;
int g_PlotOrient;
wxPoint g_PlotOffset;
FILE* dest = NULL;
/* id for plot format (see enum PlotFormat in plot_common.h) */
int g_PlotScaleOpt;
int g_DrillShapeOpt;
// Default setting used when creating a new zone
ZONE_SETTING g_Zone_Default_Setting;
D_PAD g_Pad_Master( (MODULE*) NULL );
This diff is collapsed.
/****************************************************/
/* class_drawpickedstruct.cpp */
/****************************************************/
#include "fctsys.h"
#include "common.h"
#include "gr_basic.h"
#include "base_struct.h"
#include "sch_item_struct.h"
#include "class_sch_screen.h"
#include "class_drawpanel.h"
#include "wxEeschemaStruct.h"
#include "program.h"
#include "general.h"
#include "libcmp.h"
#include "protos.h"
/* Constructor and destructor for SCH_ITEM */
/* They are not inline because this creates problems with gcc at linking time
* in debug mode
*/
SCH_ITEM::SCH_ITEM( EDA_BaseStruct* aParent, KICAD_T aType ) :
EDA_BaseStruct( aParent, aType )
{
m_Layer = 0;
}
SCH_ITEM::~SCH_ITEM()
{
}
/**
* place the struct in EEDrawList.
* if it is a new item, it it also put in undo list
* for an "old" item, saving it in undo list must be done before editiing,
* and not here!
*/
void SCH_ITEM::Place( WinEDA_SchematicFrame* frame, wxDC* DC )
{
if( m_Flags & IS_NEW )
{
SCH_SCREEN* screen = frame->GetScreen();
if( !screen->CheckIfOnDrawList( this ) ) //don't want a loop!
screen->AddToDrawList( this );
g_ItemToRepeat = this;
frame->SaveCopyInUndoList( this, IS_NEW );
}
m_Flags = 0;
frame->GetScreen()->SetModify();
frame->GetScreen()->SetCurItem( NULL );
frame->DrawPanel->ManageCurseur = NULL;
frame->DrawPanel->ForceCloseManageCurseur = NULL;
if( DC )
{
frame->DrawPanel->CursorOff( DC ); // Erase schematic cursor
RedrawOneStruct( frame->DrawPanel, DC, this, GR_DEFAULT_DRAWMODE );
frame->DrawPanel->CursorOn( DC ); // Display schematic cursor
}
}
...@@ -213,7 +213,7 @@ int ArcTangente( int dy, int dx ) ...@@ -213,7 +213,7 @@ int ArcTangente( int dy, int dx )
} }
fangle = atan2( (double) dy, (double) dx ) / M_PI * 1800; fangle = atan2( (double) dy, (double) dx ) / M_PI * 1800;
return (int) round( fangle ); return wxRound( fangle );
} }
...@@ -265,8 +265,8 @@ void RotatePoint( int* pX, int* pY, int angle ) ...@@ -265,8 +265,8 @@ void RotatePoint( int* pX, int* pY, int angle )
fpx = (*pY * fsinus[angle]) + (*pX * fcosinus[angle]); fpx = (*pY * fsinus[angle]) + (*pX * fcosinus[angle]);
fpy = (*pY * fcosinus[angle]) - (*pX * fsinus[angle]); fpy = (*pY * fcosinus[angle]) - (*pX * fsinus[angle]);
*pX = (int) round( fpx ); *pX = wxRound( fpx );
*pY = (int) round( fpy ); *pY = wxRound( fpy );
} }
} }
......
This diff is collapsed.
...@@ -51,11 +51,11 @@ void WinEDA_DrawFrame::PutOnGrid( wxPoint* coord ) ...@@ -51,11 +51,11 @@ void WinEDA_DrawFrame::PutOnGrid( wxPoint* coord )
if( !GetBaseScreen()->m_UserGridIsON ) if( !GetBaseScreen()->m_UserGridIsON )
{ {
int tmp = (int) round( coord->x / grid_size.x ); int tmp = wxRound( coord->x / grid_size.x );
coord->x = (int) round( tmp * grid_size.x ); coord->x = wxRound( tmp * grid_size.x );
tmp = (int) round( coord->y / grid_size.y ); tmp = wxRound( coord->y / grid_size.y );
coord->y = (int) round ( tmp * grid_size.y ); coord->y = wxRound ( tmp * grid_size.y );
} }
} }
...@@ -180,7 +180,7 @@ void WinEDA_DrawFrame::OnZoom( wxCommandEvent& event ) ...@@ -180,7 +180,7 @@ void WinEDA_DrawFrame::OnZoom( wxCommandEvent& event )
Recadre_Trace( true ); Recadre_Trace( true );
} }
Affiche_Status_Box(); UpdateStatusBar();
} }
void WinEDA_DrawPanel::OnPopupGridSelect( wxCommandEvent& event ) void WinEDA_DrawPanel::OnPopupGridSelect( wxCommandEvent& event )
......
...@@ -29,15 +29,15 @@ set(CVPCB_SRCS ...@@ -29,15 +29,15 @@ set(CVPCB_SRCS
writenetlistpcbnew.cpp) writenetlistpcbnew.cpp)
set(CVPCB_EXTRA_SRCS set(CVPCB_EXTRA_SRCS
../pcbnew/class_board_item.cpp # ../pcbnew/class_board_item.cpp
../pcbnew/class_drawsegment.cpp # ../pcbnew/class_drawsegment.cpp
../pcbnew/class_edge_mod.cpp # ../pcbnew/class_edge_mod.cpp
../pcbnew/class_equipot.cpp # ../pcbnew/class_equipot.cpp
../pcbnew/class_module.cpp # ../pcbnew/class_module.cpp
../pcbnew/class_text_mod.cpp # ../pcbnew/class_text_mod.cpp
../pcbnew/class_track.cpp
../pcbnew/ioascii.cpp ../pcbnew/ioascii.cpp
../pcbnew/tracemod.cpp) # ../pcbnew/tracemod.cpp
)
if(WIN32) if(WIN32)
if(MINGW) if(MINGW)
...@@ -59,7 +59,7 @@ endif(APPLE) ...@@ -59,7 +59,7 @@ endif(APPLE)
add_executable(cvpcb WIN32 MACOSX_BUNDLE ${CVPCB_SRCS} ${CVPCB_EXTRA_SRCS} ${CVPCB_RESOURCES}) add_executable(cvpcb WIN32 MACOSX_BUNDLE ${CVPCB_SRCS} ${CVPCB_EXTRA_SRCS} ${CVPCB_RESOURCES})
target_link_libraries(cvpcb 3d-viewer common polygon bitmaps kbool ${OPENGL_LIBRARIES} ${wxWidgets_LIBRARIES}) target_link_libraries(cvpcb 3d-viewer common pcbcommon polygon bitmaps kbool ${OPENGL_LIBRARIES} ${wxWidgets_LIBRARIES})
install(TARGETS cvpcb install(TARGETS cvpcb
DESTINATION ${KICAD_BIN} DESTINATION ${KICAD_BIN}
......
/**********************/ /**********************/
/* CVPCB: autosel.cpp */ /* CVPCB: autosel.cpp */
/**********************/ /**********************/
/* Routines de selection automatique des modules */ /* Routines de selection automatique des modules */
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
#include "common.h" #include "common.h"
#include "confirm.h" #include "confirm.h"
#include "gestfich.h" #include "gestfich.h"
#include "appl_wxstruct.h"
#include "cvpcb.h" #include "cvpcb.h"
#include "protos.h" #include "protos.h"
...@@ -19,67 +20,87 @@ class AUTOMODULE ...@@ -19,67 +20,87 @@ class AUTOMODULE
{ {
public: public:
int m_Type; int m_Type;
AUTOMODULE * Pnext; AUTOMODULE* Pnext;
wxString m_Name; wxString m_Name;
wxString m_LibName; wxString m_LibName;
wxString m_Library; wxString m_Library;
AUTOMODULE() { m_Type = 0; Pnext = NULL; } AUTOMODULE() { m_Type = 0; Pnext = NULL; }
} ; };
/* routines locales : */ /* routines locales : */
static int auto_select(WinEDA_CvpcbFrame * frame, STORECMP * Cmp, AUTOMODULE * BaseListeMod); static int auto_select( WinEDA_CvpcbFrame* frame,
static void auto_associe(WinEDA_CvpcbFrame * frame); STORECMP* Cmp,
AUTOMODULE* BaseListeMod );
static void auto_associe( WinEDA_CvpcbFrame* frame );
/*************************************************************/
void WinEDA_CvpcbFrame::AssocieModule(wxCommandEvent& event)
/*************************************************************/ /*************************************************************/
void WinEDA_CvpcbFrame::AssocieModule( wxCommandEvent& event )
/*************************************************************/
/* Fonction liee au boutton "Auto" /* Fonction liee au boutton "Auto"
Lance l'association automatique modules/composants * Lance l'association automatique modules/composants
*/ */
{ {
auto_associe(this); auto_associe( this );
} }
/**************************************************/ /**************************************************/
static void auto_associe(WinEDA_CvpcbFrame * frame) static void auto_associe( WinEDA_CvpcbFrame* frame )
/**************************************************/ /**************************************************/
{ {
unsigned ii, j, k; wxFileName fn;
wxString EquivFileName, msg; unsigned ii, j, k;
char Line[1024]; wxString msg, tmp;
FILE *fichierstf ; /* sert en lecture des differents fichiers *.STF */ char Line[1024];
AUTOMODULE * ItemModule,* NextMod; FILE* file;
AUTOMODULE * BaseListeMod = NULL; AUTOMODULE* ItemModule, * NextMod;
STORECMP * Component; AUTOMODULE* BaseListeMod = NULL;
STORECMP* Component;
int nb_correspondances = 0;
if( nbcomp <= 0 )
return;
int nb_correspondances = 0; /* recherche des equivalences a travers les fichiers possibles */
for( ii = 0; ii < g_ListName_Equ.GetCount(); ii++ )
{
fn = g_ListName_Equ[ii];
fn.SetExt( EquivFileExtension );
if( nbcomp <= 0 ) return; tmp = wxGetApp().GetLibraryPathList().FindValidPath( fn.GetFullName() );
/* recherche des equivalences a travers les fichiers possibles */ if( !tmp )
for( ii= 0 ; ii < g_ListName_Equ.GetCount(); ii++)
{ {
/* Calcul du nom complet avec son chemin */ msg.Printf( _( "Footprint alias library file <%s> could not be " \
EquivFileName = MakeFileName(g_RealLibDirBuffer,g_ListName_Equ[ii],g_EquivExtBuffer); "found in the default search paths." ),
fn.GetFullName().c_str() );
wxMessageBox( msg, titleLibLoadError, wxOK | wxICON_ERROR );
continue;
}
if ( (fichierstf = wxFopen(EquivFileName, wxT("rt"))) == 0) file = wxFopen( tmp, wxT( "rt" ) );
if( file == NULL )
{ {
msg.Printf( _("Library: <%s> not found"),EquivFileName.GetData()); msg.Printf( _( "Error opening alias library <%s>." ), tmp.c_str() );
DisplayError(frame, msg,10); wxMessageBox( msg, titleLibLoadError, wxOK | wxICON_ERROR );
continue ; continue;
} }
/* lecture fichier n */ /* lecture fichier n */
while ( fgets(Line,79,fichierstf) != 0 ) while( fgets( Line, 79, file ) != 0 )
{ {
/* elimination des lignes vides */ /* elimination des lignes vides */
for (j = 0 ; j < 40 ; j++ ) for( j = 0; j < 40; j++ )
{ {
if (Line[j] == 0 ) goto fin_de_while ; if( Line[j] == 0 )
if (Line[j] == QUOTE ) break ; goto fin_de_while;
if( Line[j] == QUOTE )
break;
} }
ItemModule = new AUTOMODULE(); ItemModule = new AUTOMODULE();
...@@ -87,86 +108,95 @@ int nb_correspondances = 0; ...@@ -87,86 +108,95 @@ int nb_correspondances = 0;
BaseListeMod = ItemModule; BaseListeMod = ItemModule;
/* stockage du composant ( 'namecmp' 'namelib') /* stockage du composant ( 'namecmp' 'namelib')
name et namelib */ * name et namelib */
for ( j++ ; j < 40 ; j++, k++) for( j++; j < 40; j++, k++ )
{ {
if ( Line[j] == QUOTE) break ; if( Line[j] == QUOTE )
ItemModule->m_Name.Append(Line[j]); break;
ItemModule->m_Name.Append( Line[j] );
} }
j++ ;
for ( ; j < 80 ; ) if (Line[j++] == QUOTE) break ; j++;
for (; ; j++) for( ; j < 80; )
if( Line[j++] == QUOTE )
break;
for( ; ; j++ )
{ {
if (Line[j] == QUOTE) break ; if( Line[j] == QUOTE )
ItemModule->m_LibName.Append(Line[j]); break;
ItemModule->m_LibName.Append( Line[j] );
} }
nb_correspondances++ ;
fin_de_while:; nb_correspondances++;
fin_de_while:;
} }
fclose(fichierstf) ;
fclose( file );
/* Affichage Statistiques */ /* Affichage Statistiques */
msg.Printf(_("%d equivalences"),nb_correspondances); msg.Printf( _( "%d equivalences" ), nb_correspondances );
frame->SetStatusText(msg, 0); frame->SetStatusText( msg, 0 );
} }
Component = g_BaseListeCmp; Component = g_BaseListeCmp;
for ( ii = 0; Component != NULL; Component = Component->Pnext, ii++ ) for( ii = 0; Component != NULL; Component = Component->Pnext, ii++ )
{ {
frame->m_ListCmp->SetSelection(ii,TRUE); frame->m_ListCmp->SetSelection( ii, TRUE );
if( Component->m_Module.IsEmpty() ) if( Component->m_Module.IsEmpty() )
auto_select(frame, Component, BaseListeMod); auto_select( frame, Component, BaseListeMod );
} }
/* Liberation memoire */ /* Liberation memoire */
for( ItemModule = BaseListeMod; ItemModule != NULL; ItemModule = NextMod) for( ItemModule = BaseListeMod; ItemModule != NULL; ItemModule = NextMod )
{ {
NextMod = ItemModule->Pnext; delete ItemModule; NextMod = ItemModule->Pnext; delete ItemModule;
} }
BaseListeMod = NULL; BaseListeMod = NULL;
} }
/****************************************************************/ /****************************************************************/
static int auto_select(WinEDA_CvpcbFrame * frame, STORECMP * Cmp, static int auto_select( WinEDA_CvpcbFrame* frame, STORECMP* Cmp,
AUTOMODULE * BaseListeMod) AUTOMODULE* BaseListeMod )
/****************************************************************/ /****************************************************************/
/* associe automatiquement composant et Module /* associe automatiquement composant et Module
Retourne; * Retourne;
0 si OK * 0 si OK
1 si module specifie non trouve en liste librairie * 1 si module specifie non trouve en liste librairie
2 si pas de module specifie dans la liste des equivalences * 2 si pas de module specifie dans la liste des equivalences
*/ */
{ {
AUTOMODULE * ItemModule; AUTOMODULE* ItemModule;
STOREMOD * Module; STOREMOD* Module;
wxString msg; wxString msg;
/* examen de la liste des correspondances */ /* examen de la liste des correspondances */
ItemModule = BaseListeMod; ItemModule = BaseListeMod;
for ( ; ItemModule != NULL; ItemModule = ItemModule->Pnext ) for( ; ItemModule != NULL; ItemModule = ItemModule->Pnext )
{ {
if ( ItemModule->m_Name.CmpNoCase(Cmp->m_Valeur) != 0) continue; if( ItemModule->m_Name.CmpNoCase( Cmp->m_Valeur ) != 0 )
continue;
/* Correspondance trouvee, recherche nom module dans la liste des /* Correspondance trouvee, recherche nom module dans la liste des
modules disponibles en librairie */ * modules disponibles en librairie */
Module= g_BaseListePkg; Module = g_BaseListePkg;
for ( ;Module != NULL; Module = Module->Pnext ) for( ; Module != NULL; Module = Module->Pnext )
{ {
if( ItemModule->m_LibName.CmpNoCase( Module->m_Module ) == 0 )
if( ItemModule->m_LibName.CmpNoCase(Module->m_Module) == 0 ) {
{ /* empreinte trouve */ frame->SetNewPkg( Module->m_Module );
frame->SetNewPkg(Module->m_Module); return 0;
return(0);
} }
} }
msg.Printf(
_("Component %s: Footprint %s not found in libraries"), msg.Printf( _( "Component %s: Footprint %s not found in libraries" ),
Cmp->m_Valeur.GetData(), ItemModule->m_LibName.GetData()); Cmp->m_Valeur.GetData(), ItemModule->m_LibName.GetData() );
DisplayError(frame, msg, 10); DisplayError( frame, msg, 10 );
return( 2 ); return 2;
} }
return(1);
}
return 1;
}
...@@ -30,20 +30,35 @@ void Read_Config( const wxString& FileName ) ...@@ -30,20 +30,35 @@ void Read_Config( const wxString& FileName )
* le chemin de l'executable cvpcb.exe doit etre dans BinDir * le chemin de l'executable cvpcb.exe doit etre dans BinDir
*/ */
{ {
wxString FullFileName = FileName; wxFileName fn = FileName;
/* Init des valeurs par defaut */ /* Init des valeurs par defaut */
g_LibName_List.Clear(); g_LibName_List.Clear();
g_ListName_Equ.Clear(); g_ListName_Equ.Clear();
wxGetApp().ReadProjectConfig( FullFileName, if( fn.GetExt() != ProjectFileExtension )
fn.SetExt( ProjectFileExtension );
if( wxGetApp().GetLibraryPathList().Index( g_UserLibDirBuffer ) != wxNOT_FOUND )
{
wxLogDebug( wxT( "Removing path <%s> to library path search list." ),
g_UserLibDirBuffer.c_str() );
wxGetApp().GetLibraryPathList().Remove( g_UserLibDirBuffer );
}
wxGetApp().ReadProjectConfig( fn.GetFullPath(),
GROUP, ParamCfgList, FALSE ); GROUP, ParamCfgList, FALSE );
if( NetInExtBuffer.IsEmpty() ) if( g_NetlistFileExtension.IsEmpty() )
NetInExtBuffer = wxT( ".net" ); g_NetlistFileExtension = wxT( "net" );
/* Inits autres variables */ if( wxFileName::DirExists( g_UserLibDirBuffer )
SetRealLibraryPath( wxT( "modules" ) ); && wxGetApp().GetLibraryPathList().Index( g_UserLibDirBuffer ) == wxNOT_FOUND )
{
wxLogDebug( wxT( "Adding path <%s> to library path search list." ),
g_UserLibDirBuffer.c_str() );
wxGetApp().GetLibraryPathList().Add( g_UserLibDirBuffer );
}
} }
...@@ -55,36 +70,22 @@ void WinEDA_CvpcbFrame::Update_Config( wxCommandEvent& event ) ...@@ -55,36 +70,22 @@ void WinEDA_CvpcbFrame::Update_Config( wxCommandEvent& event )
* la vraie fonction de sauvegarde de la config * la vraie fonction de sauvegarde de la config
*/ */
{ {
Save_Config( this ); Save_Config( this, m_NetlistFileName.GetFullPath() );
} }
/************************************/ void Save_Config( wxWindow* parent, const wxString& fileName )
void Save_Config( wxWindow* parent )
/************************************/
/* enregistrement de la config */
{ {
wxString path, FullFileName; wxFileName fn = fileName;
wxString mask( wxT( "*" ) );
FullFileName = FFileName; fn.SetExt( ProjectFileExtension );
ChangeFileNameExt( FullFileName, g_Prj_Config_Filename_ext );
path = wxGetCwd(); wxFileDialog dlg( parent, _( "Save Project File" ), fn.GetPath(),
FullFileName = EDA_FileSelector( _( "Save preferences" ), fn.GetFullName(), ProjectFileWildcard, wxFD_SAVE );
path, /* Chemin par defaut */
FullFileName, /* nom fichier par defaut */
g_Prj_Config_Filename_ext, /* extension par defaut */
mask, /* Masque d'affichage */
parent,
wxFD_SAVE,
TRUE
);
if( FullFileName.IsEmpty() ) if( dlg.ShowModal() == wxID_CANCEL )
return; return;
/* ecriture de la configuration */ /* ecriture de la configuration */
wxGetApp().WriteProjectConfig( FullFileName, GROUP, ParamCfgList ); wxGetApp().WriteProjectConfig( dlg.GetPath(), GROUP, ParamCfgList );
} }
...@@ -2,10 +2,6 @@ ...@@ -2,10 +2,6 @@
/** cfg.h : configuration: definition des structures **/ /** cfg.h : configuration: definition des structures **/
/*******************************************************/ /*******************************************************/
#ifndef eda_global
#define eda_global extern
#endif
#include "param_config.h" #include "param_config.h"
#define INSETUP TRUE #define INSETUP TRUE
...@@ -40,7 +36,7 @@ static PARAM_CFG_LIBNAME_LIST EquivNameBufCfg ...@@ -40,7 +36,7 @@ static PARAM_CFG_LIBNAME_LIST EquivNameBufCfg
static PARAM_CFG_WXSTRING NetInExtBufCfg static PARAM_CFG_WXSTRING NetInExtBufCfg
( (
wxT("NetIExt"), /* identification */ wxT("NetIExt"), /* identification */
&NetInExtBuffer &g_NetlistFileExtension
); );
static PARAM_CFG_WXSTRING NetDirBufCfg static PARAM_CFG_WXSTRING NetDirBufCfg
......
This diff is collapsed.
/*******************/ /*******************/
/* File: cvpcb.cpp */ /* File: cvpcb.cpp */
/*******************/ /*******************/
#define MAIN
#define eda_global
#include "fctsys.h" #include "fctsys.h"
#include "appl_wxstruct.h" #include "appl_wxstruct.h"
...@@ -19,7 +17,36 @@ ...@@ -19,7 +17,36 @@
#include <wx/snglinst.h> #include <wx/snglinst.h>
wxString g_Main_Title = wxT( "CVpcb" );
/* Constant string definitions for CvPcb */
const wxString ComponentFileExtension( wxT( "cmp" ) );
const wxString RetroFileExtension( wxT( "stf" ) );
const wxString EquivFileExtension( wxT( "equ" ) );
/* TODO: What is a stuff file??? Please fix this wild card in English if
* you know. */
const wxString RetroFileWildcard( _( "Kicad component list files (*.stf)|*.stf" ) );
const wxString EquivFileWildcard( _( "Kicad footprint alias files (*.equ)|*.equ" ) );
const wxString titleLibLoadError( _( "Library Load Error" ) );
/* Global variables used in CVPcb. */
int g_FlagEESchema;
int Rjustify;
int modified;
int nbcomp;
int nblib;
int composants_non_affectes;
STOREMOD* g_BaseListePkg = NULL;
STORECMP* g_BaseListeCmp = NULL;
wxString g_UserNetDirBuffer; // Netlist path (void = current working directory)
wxString g_NetlistFileExtension;
wxArrayString g_ListName_Equ; // list of .equ files to load
// Create a new application object // Create a new application object
IMPLEMENT_APP( WinEDA_App ) IMPLEMENT_APP( WinEDA_App )
...@@ -32,11 +59,12 @@ IMPLEMENT_APP( WinEDA_App ) ...@@ -32,11 +59,12 @@ IMPLEMENT_APP( WinEDA_App )
bool WinEDA_App::OnInit() bool WinEDA_App::OnInit()
{ {
wxFileName fn;
wxString msg; wxString msg;
wxString currCWD = wxGetCwd(); wxString currCWD = wxGetCwd();
WinEDA_CvpcbFrame* frame = NULL; WinEDA_CvpcbFrame* frame = NULL;
InitEDA_Appl( wxT( "cvpcb" ) ); InitEDA_Appl( wxT( "CVpcb" ) );
if( m_Checker && m_Checker->IsAnotherRunning() ) if( m_Checker && m_Checker->IsAnotherRunning() )
{ {
...@@ -51,17 +79,14 @@ bool WinEDA_App::OnInit() ...@@ -51,17 +79,14 @@ bool WinEDA_App::OnInit()
if( argc > 1 ) if( argc > 1 )
{ {
NetInNameBuffer = argv[1]; wxLogDebug( wxT( "CvPcb opening file <%s>" ), argv[1] );
NetNameBuffer = argv[1]; fn = argv[1];
wxSetWorkingDirectory( fn.GetPath() );
} }
if( !NetInNameBuffer.IsEmpty() )
wxSetWorkingDirectory( wxPathOnly( NetInNameBuffer ) );
g_DrawBgColor = BLACK; g_DrawBgColor = BLACK;
Read_Config( NetInNameBuffer ); wxString Title = GetTitle() + wxT( " " ) + GetBuildVersion();
wxString Title = g_Main_Title + wxT( " " ) + GetBuildVersion();
frame = new WinEDA_CvpcbFrame( Title ); frame = new WinEDA_CvpcbFrame( Title );
msg.Printf( wxT( "Modules: %d" ), nblib ); msg.Printf( wxT( "Modules: %d" ), nblib );
...@@ -70,25 +95,28 @@ bool WinEDA_App::OnInit() ...@@ -70,25 +95,28 @@ bool WinEDA_App::OnInit()
// Show the frame // Show the frame
SetTopWindow( frame ); SetTopWindow( frame );
frame->Show( TRUE ); Read_Config( fn.GetFullPath() );
listlib(); frame->Show( TRUE );
frame->BuildFootprintListBox(); frame->BuildFootprintListBox();
if( !NetInNameBuffer.IsEmpty() ) /* nom de fichier passe a la commande */ if( fn.IsOk() && fn.FileExists() )
{ {
FFileName = MakeFileName( NetDirBuffer, frame->m_NetlistFileName = fn;
NetInNameBuffer, NetInExtBuffer );
frame->ReadNetListe(); if( frame->ReadNetList() )
}
else /* Mise a jour du titre de la fenetre principale */
{ {
wxString Title = g_Main_Title + wxT( " " ) + GetBuildVersion(); g_NetlistFileExtension = fn.GetExt();
msg.Printf( wxT( "%s {%s%c} [no file]" ), return true;
Title.GetData(), wxGetCwd().GetData(), DIR_SEP ); }
frame->SetTitle( msg );
} }
return TRUE; listlib();
g_NetlistFileExtension = wxT( "net" );
frame->m_NetlistFileName.Clear();
frame->SetTitle( GetTitle() + wxT( " " ) + GetBuildVersion() +
wxGetCwd() + wxFileName::GetPathSeparator() +
_( " [no file]" ) );
return true;
} }
This diff is collapsed.
This diff is collapsed.
...@@ -262,7 +262,9 @@ void WinEDA_FootprintDisplayOptionsFrame::UpdateObjectSettings(void) ...@@ -262,7 +262,9 @@ void WinEDA_FootprintDisplayOptionsFrame::UpdateObjectSettings(void)
void WinEDA_FootprintDisplayOptionsFrame::OnSaveConfigClick( wxCommandEvent& event ) void WinEDA_FootprintDisplayOptionsFrame::OnSaveConfigClick( wxCommandEvent& event )
{ {
Save_Config(this); WinEDA_CvpcbFrame* parent = ( WinEDA_CvpcbFrame* )GetParent();
wxASSERT( parent && parent->IsKindOf( CLASSINFO( WinEDA_CvpcbFrame ) ) );
Save_Config( this, parent->m_NetlistFileName.GetFullPath() );
} }
/*! /*!
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -5,10 +5,6 @@ ...@@ -5,10 +5,6 @@
#ifndef CLASS_DRAWSHEET_H #ifndef CLASS_DRAWSHEET_H
#define CLASS_DRAWSHEET_H #define CLASS_DRAWSHEET_H
#ifndef eda_global
#define eda_global extern
#endif
#include "base_struct.h" #include "base_struct.h"
extern DrawSheetStruct* g_RootSheet; extern DrawSheetStruct* g_RootSheet;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment