Browse Source
CVPcb code refactoring, global variable elimination, and UI updates.
CVPcb code refactoring, global variable elimination, and UI updates.
* Add methods to read and write project file parameters using dynamically defined list. * Remove all global variables defined in CVPcb code. * Dynamically define project file settings so class member variables can be used. * Separate reading and writing application settings from project file settings. * Make application UI objects and dialogs respect system UI font. * Remove non-standard widget colors from CVPcb dialogs. * Changed CVPcb object link list implementation to use wxList. * Changed project library and path dialog to make OK button save project file instead of confusing "Save Cfg" button. * Eliminate some duplicate file wildcard and extension definitions. * The usual code reformatting, commenting, and spelling fixes.pull/1/head
40 changed files with 1712 additions and 2872 deletions
-
2common/common.cpp
-
2common/eda_doc.cpp
-
110common/projet_config.cpp
-
1common/wxwineda.cpp
-
14cvpcb/CMakeLists.txt
-
165cvpcb/autosel.cpp
-
77cvpcb/cfg.cpp
-
130cvpcb/cfg.h
-
85cvpcb/class_cvpcb.cpp
-
268cvpcb/cvframe.cpp
-
58cvpcb/cvpcb.cpp
-
103cvpcb/cvpcb.h
-
49cvpcb/cvstruct.h
-
96cvpcb/dialog_cvpcb_config.cpp
-
1cvpcb/dialog_cvpcb_config.h
-
182cvpcb/dialog_cvpcb_config_fbp.cpp
-
1637cvpcb/dialog_cvpcb_config_fbp.fbp
-
40cvpcb/dialog_cvpcb_config_fbp.h
-
68cvpcb/dialog_display_options.cpp
-
5cvpcb/dialog_display_options.h
-
145cvpcb/dialog_display_options.pjd
-
2cvpcb/displayframe.cpp
-
13cvpcb/genequiv.cpp
-
327cvpcb/genorcad.cpp
-
102cvpcb/init.cpp
-
142cvpcb/listboxes.cpp
-
146cvpcb/listlib.cpp
-
5cvpcb/loadcmp.cpp
-
58cvpcb/memoire.cpp
-
13cvpcb/menucfg.cpp
-
36cvpcb/protos.h
-
164cvpcb/readschematicnetlist.cpp
-
44cvpcb/savecmp.cpp
-
2cvpcb/setvisu.cpp
-
255cvpcb/writenetlistpcbnew.cpp
-
13include/appl_wxstruct.h
-
2include/common.h
-
1include/id.h
-
2kicad/treeprj_frame.cpp
-
19pcbnew/basepcbframe.cpp
@ -1,130 +0,0 @@ |
|||
/*******************************************************/ |
|||
/** cfg.h : configuration: definition des structures **/ |
|||
/*******************************************************/ |
|||
|
|||
#include "param_config.h" |
|||
|
|||
#define INSETUP TRUE |
|||
|
|||
#define GROUP wxT("/cvpcb") |
|||
#define GROUPCOMMON wxT("/common") |
|||
#define GROUPLIB wxT("/pcbnew/libraries") |
|||
#define GROUPEQU wxT("/cvpcb/libraries") |
|||
|
|||
/* Liste des parametres */ |
|||
|
|||
static PARAM_CFG_BASE CommandCfg |
|||
( |
|||
GROUPLIB, /* identification de groupe */ |
|||
PARAM_COMMAND_ERASE /* type */ |
|||
); |
|||
|
|||
static PARAM_CFG_LIBNAME_LIST LibNameBufCfg |
|||
( |
|||
wxT("LibName"), /* identification */ |
|||
&g_LibName_List, /* Adresse du parametre */ |
|||
GROUPLIB |
|||
); |
|||
|
|||
static PARAM_CFG_LIBNAME_LIST EquivNameBufCfg |
|||
( |
|||
wxT("EquName"), /* identification */ |
|||
&g_ListName_Equ, /* Adresse du parametre */ |
|||
GROUPEQU |
|||
); |
|||
|
|||
static PARAM_CFG_WXSTRING NetInExtBufCfg |
|||
( |
|||
wxT("NetIExt"), /* identification */ |
|||
&g_NetlistFileExtension |
|||
); |
|||
|
|||
static PARAM_CFG_WXSTRING NetDirBufCfg |
|||
( |
|||
wxT("NetDir"), /* identification */ |
|||
&g_UserNetDirBuffer, /* Adresse du parametre */ |
|||
GROUPCOMMON |
|||
); |
|||
|
|||
static PARAM_CFG_WXSTRING UserLibDirBufCfg |
|||
( |
|||
wxT("LibDir"), /* identification */ |
|||
&g_UserLibDirBuffer, /* Adresse du parametre */ |
|||
GROUPLIB |
|||
); |
|||
|
|||
static PARAM_CFG_BOOL DisplayPadFillCfg |
|||
( |
|||
INSETUP, |
|||
wxT("DiPadFi"), /* identification */ |
|||
&DisplayOpt.DisplayPadFill, /* Adresse du parametre */ |
|||
TRUE /* Valeur par defaut */ |
|||
); |
|||
|
|||
static PARAM_CFG_BOOL DisplayPadNumCfg |
|||
( |
|||
INSETUP, |
|||
wxT("DiPadNu"), /* identification */ |
|||
&DisplayOpt.DisplayPadNum, /* Adresse du parametre */ |
|||
TRUE /* Valeur par defaut */ |
|||
); |
|||
|
|||
static PARAM_CFG_BOOL DisplayPadNoConnCfg |
|||
( |
|||
INSETUP, |
|||
wxT("DiPadNC"), /* identification */ |
|||
&DisplayOpt.DisplayPadNoConn, /* Adresse du parametre */ |
|||
FALSE /* Valeur par defaut */ |
|||
); |
|||
|
|||
static PARAM_CFG_BOOL DisplayPadIsolCfg |
|||
( |
|||
INSETUP, |
|||
wxT("DiPadMg"), /* identification */ |
|||
&DisplayOpt.DisplayPadIsol, /* Adresse du parametre */ |
|||
FALSE /* Valeur par defaut */ |
|||
); |
|||
|
|||
static PARAM_CFG_INT DisplayModEdgeCfg |
|||
( |
|||
INSETUP, |
|||
wxT("DiModEd"), /* identification */ |
|||
&DisplayOpt.DisplayModEdge, /* Adresse du parametre */ |
|||
1, /* Valeur par defaut */ |
|||
0, 1 /* Valeurs extremes */ |
|||
); |
|||
|
|||
static PARAM_CFG_INT DisplayModTextCfg |
|||
( |
|||
INSETUP, |
|||
wxT("DiModTx"), /* identification */ |
|||
&DisplayOpt.DisplayModText, /* Adresse du parametre */ |
|||
1, /* Valeur par defaut */ |
|||
0, 1 /* Valeurs extremes */ |
|||
); |
|||
|
|||
static PARAM_CFG_BOOL DisplayPcbTrackFillCfg |
|||
( |
|||
INSETUP, |
|||
wxT("DiPcbTF"), /* identification */ |
|||
&DisplayOpt.DisplayPcbTrackFill, /* Adresse du parametre */ |
|||
TRUE /* Valeur par defaut */ |
|||
); |
|||
|
|||
static PARAM_CFG_BASE * ParamCfgList[] = |
|||
{ |
|||
& CommandCfg, |
|||
& NetInExtBufCfg, |
|||
& NetDirBufCfg, |
|||
& UserLibDirBufCfg, |
|||
& LibNameBufCfg, |
|||
& EquivNameBufCfg, |
|||
& DisplayPadFillCfg, |
|||
& DisplayPadNumCfg, |
|||
& DisplayPadNoConnCfg, |
|||
& DisplayPadIsolCfg, |
|||
& DisplayModEdgeCfg, |
|||
& DisplayModTextCfg, |
|||
& DisplayPcbTrackFillCfg, |
|||
NULL |
|||
}; |
|||
1637
cvpcb/dialog_cvpcb_config_fbp.fbp
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -1,58 +0,0 @@ |
|||
/**********************************************/ |
|||
/* Routines de gestion de la memoire */ |
|||
/**********************************************/ |
|||
|
|||
/* Fichier memoire.cpp */ |
|||
|
|||
#include "fctsys.h"
|
|||
#include "wxstruct.h"
|
|||
#include "common.h"
|
|||
#include "cvpcb.h"
|
|||
|
|||
|
|||
/********************************/ |
|||
void FreeMemoryModules() |
|||
/********************************/ |
|||
|
|||
/* Routine de liberation memoire de la liste des modules
|
|||
- remet a NULL g_BaseListePkg |
|||
- remet a 0 nblib; |
|||
*/ |
|||
{ |
|||
STOREMOD * Module, * NextMod; |
|||
|
|||
if( g_BaseListePkg == NULL) return; |
|||
|
|||
for ( Module = g_BaseListePkg; Module != NULL; Module = NextMod) |
|||
{ |
|||
NextMod = Module->Pnext; |
|||
delete Module; |
|||
} |
|||
|
|||
nblib = 0; |
|||
g_BaseListePkg = NULL; |
|||
} |
|||
|
|||
/***********************************/ |
|||
void FreeMemoryComponents() |
|||
/***********************************/ |
|||
|
|||
/* Routine de liberation memoire de la liste des composants
|
|||
- remet a NULL BaseListeMod |
|||
- remet a 0 nbcomp |
|||
*/ |
|||
{ |
|||
STORECMP * Cmp, * NextCmp; |
|||
|
|||
if( g_BaseListeCmp == NULL ) return; |
|||
|
|||
for( Cmp = g_BaseListeCmp; Cmp != NULL; Cmp = NextCmp ) |
|||
{ |
|||
NextCmp = Cmp->Pnext; |
|||
delete Cmp; |
|||
} |
|||
|
|||
nbcomp = 0; |
|||
g_BaseListeCmp = NULL; |
|||
} |
|||
|
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue