Commit db6630b8 authored by jerryjacobs's avatar jerryjacobs

Added hauptmech big patch, Updated documentation to match this patch. See CHANGELOG.txt

parent 831517fb
......@@ -110,8 +110,9 @@ GLuint Pcb3D_GLCanvas::CreateDrawGL_List()
g_Parm_3D_Visu.m_BoardSize.y );
// @TODO: epoxy_width (board thickness) must be set by user,
// because all boards thickness no not match with this setup:
double epoxy_width = 1.6; // epoxy width in mm
g_Parm_3D_Visu.m_Epoxy_Width = epoxy_width / 2.54 * 1000
//double epoxy_width = 1.6; // epoxy width in mm
g_Parm_3D_Visu.m_Epoxy_Width = pcb->m_BoardSettings->m_LayerThickness
* g_Parm_3D_Visu.m_BoardScale;
/* calculate z position for each layer */
......
......@@ -4,6 +4,20 @@ KiCad ChangeLog 2009
Please add newer entries at the top, list the date and your name with
email address.
2009-june-19 UPDATE Jerry Jacobs <jerkejacobs@gmail.com>
================================================================================
Added Hauptmech patch.
I Updated doc to match this patch.
++Pcbnew:
> * Board thickness in the 3D view can be set in *.pcb files (hand edit)
> * Hotkey files bug: incorrect file extension as default in some open/save dialogs.
> * Hotkeys made available for pcbnew [add track] and [add module] tools.
> * Drag and Move hotkeys extended to drag tracks and move nodes/vias when the [add track] tool is active.
> * Show/Hide Invisible Text button added to lefthand menu
> * Dropdown list of clearance history available next to trackwidth history.
2009-june-18 UPDATE Jean-Pierre Charras <jean-pierre.charras@gipsa-lab.inpg.fr>
================================================================================
++Pcbnew:
......
......@@ -114,11 +114,14 @@ If linux, use your package manager to install zlib pre-built binaries.
Note (JP Charras):
Under Linux, zlib is usually installed.
if not found by wxWidget installation, wxWidgets creates an alternate zlib
Under Windows, zlib is not installed, so my cmake buld try to use the
If it is not found by the wxWidget installation, wxWidgets creates an alternate zlib library.
Under Windows, if zlib is not installed, my cmake build will try to use the
wxWidgets zlib build. So, under windows kicad build should work without
zlib install.
If you are using the wxWidget zlib, make sure that the wxWidgets/src/zlib directory is copied
to ${wxWidgets_ROOT_DIR}/src/zlib
-----------------------------------------------------------------------------
......
......@@ -164,6 +164,7 @@ set(BITMAP_SRCS
Info.xpm
Insert_Module_Board.xpm
Invert_Module.xpm
invisible_text.xpm
jigsaw.xpm
kicad_icon_small.xpm
Label2GLabel.xpm
......
/* XPM */
#ifndef XPMMAIN
extern const char *invisible_text_xpm[];
#else
const char *invisible_text_xpm[] = {
"16 16 4 1",
" c None",
". c #00009B",
"+ c #000098",
"@ c #00005D",
" .............. ",
" ",
" .+ .... .. ",
" .@ .... . ",
" ",
" ",
" .... ",
" .... ",
" ",
" .... ",
" ",
" .... ",
" ",
" .....+ ",
" ........ ",
" "};
#endif
......@@ -58,6 +58,7 @@ WinEDA_DrawFrame::WinEDA_DrawFrame( wxWindow* father, int idtype,
MsgPanel = NULL;
m_CurrentScreen = NULL;
m_ID_current_state = 0;
m_ID_last_state = 0;
m_HTOOL_current_state = 0;
m_Draw_Axis = FALSE; // TRUE pour avoir les axes dessines
m_Draw_Grid = FALSE; // TRUE pour avoir la axes dessinee
......
......@@ -245,6 +245,7 @@ wxString EDA_FileSelector( const wxString& Title, /* Dialog ti
wxString curr_cwd = wxGetCwd();
wxString defaultname = FileName;
wxString defaultpath = Path;
wxString dotted_Ext = wxT(".") + Ext;
defaultname.Replace( wxT( "/" ), STRING_DIR_SEP );
defaultpath.Replace( wxT( "/" ), STRING_DIR_SEP );
......@@ -268,7 +269,7 @@ wxString EDA_FileSelector( const wxString& Title, /* Dialog ti
fullfilename = wxFileSelector( wxString( Title ),
defaultpath,
defaultname,
Ext,
dotted_Ext,
Mask,
flag, /* open mode wxFD_OPEN, wxFD_SAVE .. */
Frame,
......
......@@ -381,7 +381,7 @@ int WinEDA_BasicFrame::WriteHotkeyConfigFile( const wxString&
{
wxString Mask, Path, Ext;
Ext = DEFAULT_HOTKEY_FILENAME_EXT;
Mask = wxT( "*" ) + Ext;
Mask = wxT( "*." ) + Ext;
Path = ReturnHotkeyConfigFilePath( g_ConfigFileLocationChoice );
FullFilename = EDA_FileSelector( _( "Save Hotkey Configuration File:" ),
Path, /* Chemin par defaut */
......@@ -499,7 +499,7 @@ int WinEDA_BasicFrame::ReadHotkeyConfigFile( const wxString&
{
wxString Mask, Path, Ext;
Ext = DEFAULT_HOTKEY_FILENAME_EXT;
Mask = wxT( "*" ) + Ext;
Mask = wxT( "*." ) + Ext;
Path = ReturnHotkeyConfigFilePath( g_ConfigFileLocationChoice );
FullFilename = EDA_FileSelector( _( "Open Hotkey Configuration File:" ),
Path, /* Chemin par defaut */
......
......@@ -116,6 +116,7 @@ bool Read_Hotkey_Config( WinEDA_DrawFrame* frame, bool verbose )
g_ConfigFileLocationChoice );
FullFileName += HOTKEY_FILENAME;
FullFileName += wxT(".");
FullFileName += DEFAULT_HOTKEY_FILENAME_EXT;
frame->ReadHotkeyConfigFile( FullFileName,
s_Eeschema_Hokeys_Descr,
......
......@@ -63,6 +63,7 @@ void WinEDA_GerberFrame::Process_Config( wxCommandEvent& event )
case ID_PREFERENCES_CREATE_CONFIG_HOTKEYS:
FullFileName = ReturnHotkeyConfigFilePath( g_ConfigFileLocationChoice );
FullFileName += HOTKEY_FILENAME;
FullFileName += wxT(".");
FullFileName += DEFAULT_HOTKEY_FILENAME_EXT;
WriteHotkeyConfigFile( FullFileName, s_Gerbview_Hokeys_Descr, true );
break;
......@@ -75,6 +76,7 @@ void WinEDA_GerberFrame::Process_Config( wxCommandEvent& event )
{
FullFileName = ReturnHotkeyConfigFilePath( g_ConfigFileLocationChoice );
FullFileName += HOTKEY_FILENAME;
FullFileName += wxT(".");
FullFileName += DEFAULT_HOTKEY_FILENAME_EXT;
AddDelimiterString( FullFileName );
wxString editorname = wxGetApp().GetEditorName();
......@@ -161,6 +163,7 @@ bool Read_Hotkey_Config( WinEDA_DrawFrame* frame, bool verbose )
g_ConfigFileLocationChoice );
FullFileName += HOTKEY_FILENAME;
FullFileName += wxT(".");
FullFileName += DEFAULT_HOTKEY_FILENAME_EXT;
return frame->ReadHotkeyConfigFile( FullFileName,
s_Gerbview_Hokeys_Descr,
......
......@@ -33,6 +33,7 @@ enum KICAD_T {
TYPE_TEXTE_MODULE,
TYPE_EDGE_MODULE,
TYPE_TRACK,
TYPE_CLR,
TYPE_ZONE,
TYPE_VIA,
TYPE_MARKER,
......
......@@ -156,6 +156,7 @@ extern const char* import3d_xpm[];
extern const char* info_xpm[];
extern const char* insert_module_board_xpm[];
extern const char* invert_module_xpm[];
extern const char* invisible_text_xpm[];
extern const char* jigsaw_xpm[];
extern const char* kicad_icon_small_xpm[];
extern const char* kicad_icon_xpm[];
......
......@@ -8,7 +8,7 @@
#ifndef HOTKEYS_BASIC_H
#define HOTKEYS_BASIC_H
#define DEFAULT_HOTKEY_FILENAME_EXT wxT( ".key" )
#define DEFAULT_HOTKEY_FILENAME_EXT wxT( "key" )
/* keyword idetifier in kicad config use ti store/retrieve path option */
#define HOTKEY_CFG_PATH_OPT wxT( "HotkeyPathOption" )
......
......@@ -702,6 +702,7 @@ enum main_id {
ID_AUX_TOOLBAR_PCB_VIA_SIZE,
ID_AUX_TOOLBAR_PCB_TRACK_WIDTH,
ID_AUX_TOOLBAR_PCB_CLR_WIDTH,
ID_AUX_TOOLBAR_PCB_SELECT_LAYER_PAIR,
ID_AUX_TOOLBAR_PCB_SELECT_AUTO_WIDTH,
ID_AUX_TOOLBAR_PCB_UNUSED3,
......@@ -804,10 +805,10 @@ enum main_id {
ID_TB_OPTIONS_SHOW_MODULE_TEXT_SKETCH,
ID_TB_OPTIONS_SHOW_MODULE_EDGE_SKETCH,
ID_TB_OPTIONS_SHOW_DCODES,
ID_TB_OPTIONS_SHOW_HIGHT_CONTRAST_MODE,
ID_TB_OPTIONS_SHOW_HIGH_CONTRAST_MODE,
ID_TB_OPTIONS_SHOW_EXTRA_VERTICAL_TOOLBAR1,
ID_TB_OPTIONS_SHOW_POLYGONS_SKETCH,
ID_TB_OPTIONS_UNUSED6,
ID_TB_OPTIONS_SHOW_INVISIBLE_TEXT_MODE,
ID_TB_OPTIONS_UNUSED7,
ID_TB_OPTIONS_UNUSED8,
......@@ -866,6 +867,9 @@ enum main_id {
ID_PCB_MUWAVE_UNUSED2,
ID_PCB_MUWAVE_END_CMD,
ID_TOGGLE_PRESENT_COMMAND,
ID_END_LIST
};
......
......@@ -159,10 +159,12 @@ public:
int m_PcbTextWidth; // current Pcb (not module) Text width
wxSize m_PcbTextSize; // current Pcb (not module) Text size
int m_TrackClearence; // track to track and track to pads clearance
int m_TrackClearenceHistory[HISTORY_NUMBER]; // Last HISTORY_NUMBER used track widths
int m_TrackMinWidth; // track min value for width ((min copper size value
int m_ViasMinSize; // vias (not micro vias) min diameter
int m_MicroViasMinSize; // micro vias (not vias) min diameter
int m_MaskMargin; // Solder mask margin
int m_LayerThickness; // Layer Thickness for 3D viewer
// Color options for screen display of the Printed Board:
int m_PcbGridColor; // Grid color
......
......@@ -372,10 +372,12 @@ class WinEDA_PcbFrame : public WinEDA_BasePcbFrame
public:
WinEDAChoiceBox* m_SelLayerBox;
WinEDAChoiceBox* m_SelTrackWidthBox;
WinEDAChoiceBox* m_SelClrWidthBox;
WinEDAChoiceBox* m_SelViaSizeBox;
private:
bool m_SelTrackWidthBox_Changed;
bool m_SelClrWidthBox_Changed;
bool m_SelViaSizeBox_Changed;
DRC* m_drc; ///< the DRC controller, see drc.cpp
......
......@@ -156,6 +156,7 @@ public:
int m_CursorShape; // shape for cursor (0 = default cursor)
int m_ID_current_state; // Id of active button on the vertical toolbar
int m_ID_last_state; // Id of previous active button on the vertical toolbar
int m_HTOOL_current_state; // Id of active button on horizontal toolbar
int m_InternalUnits; // Internal units count in 1 inch
......
......@@ -8,7 +8,7 @@ else(ZLIB_FOUND)
# include files are in ${wxWidgets_ROOT_DIR}/src/zlib
# and the corresponding library is libwxzlib-<version>.a (like libwxzlib-2.8.a)
# and we try to use it
set(ZLIB_INCLUDE_DIR ${wxWidgets_ROOT_DIR}/src/zlib)
find_path(ZLIB_INCLUDE_DIR zlib.h PATHS ${wxWidgets_ROOT_DIR}/src/zlib/ DOC "location of zlib include files")
set(ZLIB_LIBRARIES ${wxWidgets_ROOT_DIR}/lib/libwxzlib-2.8.a)
endif(ZLIB_FOUND)
......
......@@ -205,6 +205,7 @@ EDA_BoardDesignSettings::EDA_BoardDesignSettings()
for( ii = 0; ii < HISTORY_NUMBER; ii++ )
{
m_TrackWidthHistory[ii] = 0; // Last HISTORY_NUMBER used track widths
m_TrackClearenceHistory[ii] = 0;
m_ViaSizeHistory[ii] = 0; // Last HISTORY_NUMBER used via sizes
}
......
......@@ -221,6 +221,7 @@ void WinEDA_PcbFrame::OnSelectOptionToolbar( wxCommandEvent& event )
if( id == ID_TB_OPTIONS_SELECT_UNIT_INCH )
g_UnitMetric = INCHES;
m_SelTrackWidthBox_Changed = TRUE;
m_SelClrWidthBox_Changed = TRUE;
UpdateStatusBar(); /* Reaffichage des coord curseur */
ReCreateAuxiliaryToolbar();
DisplayUnitsMsg();
......@@ -273,11 +274,18 @@ void WinEDA_PcbFrame::OnSelectOptionToolbar( wxCommandEvent& event )
DrawPanel->Refresh( );
break;
case ID_TB_OPTIONS_SHOW_HIGHT_CONTRAST_MODE:
case ID_TB_OPTIONS_SHOW_HIGH_CONTRAST_MODE:
DisplayOpt.ContrastModeDisplay =
m_OptionsToolBar->GetToolState( id );
DrawPanel->Refresh( );
break;
case ID_TB_OPTIONS_SHOW_INVISIBLE_TEXT_MODE:
if(!m_OptionsToolBar->GetToolState( id ))
g_ModuleTextNOVColor &= (~ITEM_NOT_SHOW);
else
g_ModuleTextNOVColor |= ( ITEM_NOT_SHOW);
DrawPanel->Refresh( );
break;
case ID_TB_OPTIONS_SHOW_EXTRA_VERTICAL_TOOLBAR1:
if( m_OptionsToolBar->GetToolState( id ) ) // show aux V toolbar (Microwave tool)
......
......@@ -118,6 +118,7 @@ void DIALOG_TRACKS_OPTIONS::OnButtonOkClick( wxCommandEvent& event )
m_Parent->AddHistory( g_DesignSettings.m_CurrentViaSize, TYPE_VIA );
m_Parent->AddHistory( g_DesignSettings.m_CurrentTrackWidth, TYPE_TRACK );
m_Parent->AddHistory( g_DesignSettings.m_TrackClearence, TYPE_CLR );
EndModal( 1 );
}
......@@ -169,7 +170,42 @@ void WinEDA_BasePcbFrame::AddHistory( int value, KICAD_T type )
}
break;
case TYPE_CLR:
for( ii = 0; ii < HISTORY_NUMBER; ii++ )
{
if( g_DesignSettings.m_TrackClearenceHistory[ii] == value )
{
addhistory = FALSE;
break;
}
}
if( !addhistory )
break;
for( ii = HISTORY_NUMBER - 1; ii > 0; ii-- )
{
g_DesignSettings.m_TrackClearenceHistory[ii] =
g_DesignSettings.m_TrackClearenceHistory[ii - 1];
}
g_DesignSettings.m_TrackClearenceHistory[0] = value;
// Reclassement par valeur croissante
for( ii = 0; ii < HISTORY_NUMBER - 1; ii++ )
{
if( g_DesignSettings.m_TrackClearenceHistory[ii + 1] == 0 )
break; // Fin de liste
if( g_DesignSettings.m_TrackClearenceHistory[ii] >
g_DesignSettings.m_TrackClearenceHistory[ii + 1] )
{
EXCHG( g_DesignSettings.m_TrackClearenceHistory[ii],
g_DesignSettings.m_TrackClearenceHistory[ii + 1] );
}
}
break;
case TYPE_VIA:
for( ii = 0; ii < HISTORY_NUMBER; ii++ )
{
......
......@@ -30,8 +30,12 @@ void WinEDA_PcbFrame::Process_Special_Functions( wxCommandEvent& event )
{
int id = event.GetId();
wxPoint pos;
int itmp;
wxClientDC dc( DrawPanel );
BOARD_ITEM* DrawStruct = GetCurItem();
int toggle = 0;
DrawPanel->CursorOff( &dc );
DrawPanel->PrepareGraphicContext( &dc );
......@@ -45,6 +49,7 @@ void WinEDA_PcbFrame::Process_Special_Functions( wxCommandEvent& event )
case wxID_CUT:
case wxID_COPY:
case ID_AUX_TOOLBAR_PCB_TRACK_WIDTH:
case ID_AUX_TOOLBAR_PCB_CLR_WIDTH:
case ID_AUX_TOOLBAR_PCB_VIA_SIZE:
case ID_ON_GRID_SELECT:
case ID_ON_ZOOM_SELECT:
......@@ -156,7 +161,15 @@ void WinEDA_PcbFrame::Process_Special_Functions( wxCommandEvent& event )
else
SetCursor( DrawPanel->m_PanelCursor = DrawPanel->m_PanelDefaultCursor );
break;
case ID_TOGGLE_PRESENT_COMMAND:
/* if( DrawPanel->ManageCurseur
&& DrawPanel->ForceCloseManageCurseur )
{
DrawPanel->ForceCloseManageCurseur( DrawPanel, &dc );
}
*/
break;
default: // Finish (abort ) the command
if( DrawPanel->ManageCurseur
&& DrawPanel->ForceCloseManageCurseur )
......@@ -164,17 +177,160 @@ void WinEDA_PcbFrame::Process_Special_Functions( wxCommandEvent& event )
DrawPanel->ForceCloseManageCurseur( DrawPanel, &dc );
}
if( m_ID_current_state != id )
SetToolID( 0, wxCURSOR_ARROW, wxEmptyString );
if( m_ID_current_state != id ){
if (m_ID_last_state != m_ID_current_state)
m_ID_last_state = m_ID_current_state;
SetToolID( 0, wxCURSOR_ARROW, wxEmptyString );
}
break;
}
switch( id ) // Execute command
{
case 0: break;
case ID_EXIT:
Close( true );
break;
case ID_TOGGLE_PRESENT_COMMAND:
switch( m_ID_current_state )
{
case 0:
/* if( (DrawStruct == NULL) || (DrawStruct->m_Flags == 0) )
{
DrawStruct = PcbGeneralLocateAndDisplay();
}
if( (DrawStruct == NULL) || (DrawStruct->m_Flags != 0) )
break;
SendMessageToEESCHEMA( DrawStruct );
// An item is found
SetCurItem( DrawStruct );
switch( DrawStruct->Type() )
{
case TYPE_TRACK:
case TYPE_VIA:
if( DrawStruct->m_Flags & IS_NEW )
{
End_Route( (TRACK*) DrawStruct, DC );
DrawPanel->m_AutoPAN_Request = false;
}
else if( DrawStruct->m_Flags == 0 )
{
Edit_TrackSegm_Width( DC, (TRACK*) DrawStruct );
}
break;
case TYPE_TEXTE:
InstallTextPCBOptionsFrame( (TEXTE_PCB*) DrawStruct, DC );
DrawPanel->MouseToCursorSchema();
break;
case TYPE_PAD:
InstallPadOptionsFrame( (D_PAD*) DrawStruct, &dc, pos );
DrawPanel->MouseToCursorSchema();
break;
case TYPE_MODULE:
InstallModuleOptionsFrame( (MODULE*) DrawStruct, &dc );
DrawPanel->MouseToCursorSchema();
break;
case TYPE_MIRE:
InstallMireOptionsFrame( (MIREPCB*) DrawStruct, &dc, pos );
DrawPanel->MouseToCursorSchema();
break;
case TYPE_COTATION:
Install_Edit_Cotation( (COTATION*) DrawStruct, &dc, pos );
DrawPanel->MouseToCursorSchema();
break;
case TYPE_TEXTE_MODULE:
InstallTextModOptionsFrame( (TEXTE_MODULE*) DrawStruct, &dc, pos );
DrawPanel->MouseToCursorSchema();
break;
case TYPE_DRAWSEGMENT:
InstallGraphicItemPropertiesDialog((DRAWSEGMENT*)DrawStruct, &dc);
break;
case TYPE_ZONE_CONTAINER:
if( DrawStruct->m_Flags )
break;
Edit_Zone_Params( &dc, (ZONE_CONTAINER*) DrawStruct );
break;
default:
break;
}
break; // end case 0
*/
toggle = 1;
break;
case ID_TRACK_BUTT:
if( DrawStruct && (DrawStruct->m_Flags & IS_NEW) )
{
End_Route( (TRACK*) DrawStruct, &dc );
DrawPanel->m_AutoPAN_Request = false;
}
else
toggle = 1;
break;
case ID_PCB_ZONES_BUTT:
if ( End_Zone( &dc ) )
{
DrawPanel->m_AutoPAN_Request = false;
SetCurItem( NULL );
}
else
toggle = 1;
break;
case ID_LINE_COMMENT_BUTT:
case ID_PCB_ARC_BUTT:
case ID_PCB_CIRCLE_BUTT:
if( DrawStruct == NULL )
{}
else if( DrawStruct->Type() != TYPE_DRAWSEGMENT )
{
DisplayError( this, wxT( "DrawStruct Type error" ) );
DrawPanel->m_AutoPAN_Request = false;
}
else if( (DrawStruct->m_Flags & IS_NEW) )
{
End_Edge( (DRAWSEGMENT*) DrawStruct, &dc );
DrawPanel->m_AutoPAN_Request = false;
SetCurItem( NULL );
}
else
toggle = 1;
break;
default:
toggle = 1;
break;
}
if (toggle){
int swap = m_ID_last_state;
m_ID_last_state = m_ID_current_state;
SetToolID( 0, wxCURSOR_ARROW, wxEmptyString );
m_ID_current_state = swap;
}
//SetCursor( DrawPanel->m_PanelCursor = DrawPanel->m_PanelDefaultCursor );
event.SetId(m_ID_current_state);
Process_Special_Functions(event);
break;
case ID_OPEN_MODULE_EDITOR:
if( m_ModuleEditFrame == NULL )
{
......@@ -921,6 +1077,18 @@ void WinEDA_PcbFrame::Process_Special_Functions( wxCommandEvent& event )
g_DesignSettings.m_UseConnectedTrackWidth = false;
}
break;
case ID_AUX_TOOLBAR_PCB_CLR_WIDTH:
{
int ii = m_SelClrWidthBox->GetChoice();
g_DesignSettings.m_TrackClearence =
g_DesignSettings.m_TrackClearenceHistory[ii];
DisplayTrackSettings();
m_SelTrackWidthBox_Changed = false;
m_SelClrWidthBox_Changed = false;
m_SelViaSizeBox_Changed = false;
g_DesignSettings.m_UseConnectedTrackWidth = false;
}
break;
case ID_POPUP_PCB_SELECT_WIDTH1:
case ID_POPUP_PCB_SELECT_WIDTH2:
......@@ -1050,8 +1218,12 @@ void WinEDA_PcbFrame::Process_Special_Functions( wxCommandEvent& event )
break;
default:
DisplayError( this,
wxT( "WinEDA_PcbFrame::Process_Special_Functions() id error" ) );
wxString msg;
msg.Printf(
wxT( "WinEDA_PcbFrame::Process_Special_Functions() id %d error" ),
DrawStruct->Type() );
DisplayError( this, msg );
break;
}
......
......@@ -33,6 +33,7 @@ void WinEDA_PcbFrame::DisplayTrackSettings()
buftrc.GetData(), bufvia.GetData() );
Affiche_Message( msg );
m_SelTrackWidthBox_Changed = TRUE;
m_SelClrWidthBox_Changed = TRUE;
m_SelViaSizeBox_Changed = TRUE;
}
......
......@@ -154,6 +154,7 @@ int WinEDA_PcbFrame::LoadOnePcbFile( const wxString& FullFileName, bool Append )
}
m_SelTrackWidthBox_Changed = TRUE;
m_SelClrWidthBox_Changed = TRUE;
m_SelViaSizeBox_Changed = TRUE;
if( Append )
......@@ -263,7 +264,7 @@ int WinEDA_PcbFrame::LoadOnePcbFile( const wxString& FullFileName, bool Append )
/* Rebuild the new pad list (for drc and ratsnet control ...) */
GetBoard()->m_Status_Pcb = 0;
DrawPanel->Refresh( true);
Compile_Ratsnest( NULL, true );
......
This diff is collapsed.
......@@ -20,14 +20,14 @@ enum hotkey_id_commnand {
HK_MOVE_FOOTPRINT,
HK_DRAG_FOOTPRINT,
HK_FLIP_FOOTPRINT,
HK_GET_AND_MOVE_FOOTPRINT,
HK_GET_AND_MOVE_FOOTPRINT,
HK_LOCK_UNLOCK_FOOTPRINT,
HK_ADD_VIA,
HK_ADD_MICROVIA,
HK_END_TRACK,
HK_ADD_MICROVIA,
HK_END_TRACK,
HK_SAVE_BOARD, HK_LOAD_BOARD,
HK_SWITCH_UNITS,
HK_SWITCH_TRACK_DISPLAY_MODE,
HK_SWITCH_TRACK_DISPLAY_MODE,
HK_FIND_ITEM,
HK_SWITCH_LAYER_TO_COPPER,
HK_SWITCH_LAYER_TO_COMPONENT,
......@@ -39,14 +39,19 @@ enum hotkey_id_commnand {
HK_SWITCH_LAYER_TO_INNER4,
HK_SWITCH_LAYER_TO_INNER5,
HK_SWITCH_LAYER_TO_INNER6,
HK_SWITCH_LAYER_TO_INNER7,
HK_SWITCH_LAYER_TO_INNER8,
HK_SWITCH_LAYER_TO_INNER9,
HK_SWITCH_LAYER_TO_INNER10,
HK_SWITCH_LAYER_TO_INNER11,
HK_SWITCH_LAYER_TO_INNER12,
HK_SWITCH_LAYER_TO_INNER13,
HK_SWITCH_LAYER_TO_INNER14
HK_SWITCH_LAYER_TO_INNER7,
HK_SWITCH_LAYER_TO_INNER8,
HK_SWITCH_LAYER_TO_INNER9,
HK_SWITCH_LAYER_TO_INNER10,
HK_SWITCH_LAYER_TO_INNER11,
HK_SWITCH_LAYER_TO_INNER12,
HK_SWITCH_LAYER_TO_INNER13,
HK_SWITCH_LAYER_TO_INNER14,
HK_ADD_MODULE,
HK_ADD_TRACK,
HK_TOGGLE,
HK_MOVE_TRACK,
HK_SLIDE_TRACK
};
// List of hotkey descriptors for pcbnew
......
......@@ -162,10 +162,12 @@ bool WinEDA_BasePcbFrame::Clear_Pcb( bool query )
{
g_DesignSettings.m_ViaSizeHistory[ii] =
g_DesignSettings.m_TrackWidthHistory[ii] = 0;
g_DesignSettings.m_TrackClearenceHistory[ii] = 0;
}
g_DesignSettings.m_TrackWidthHistory[0] = g_DesignSettings.m_CurrentTrackWidth;
g_DesignSettings.m_ViaSizeHistory[0] = g_DesignSettings.m_CurrentViaSize;
g_DesignSettings.m_TrackClearenceHistory[0] = g_DesignSettings.m_TrackClearence;
g_DesignSettings.m_ViaSizeHistory[0] = g_DesignSettings.m_CurrentViaSize;
/* NO, this is a global setting, and changing it here changes a loaded board's layer count when loading a module in the module editor since
the module editor calls this when loading an existing module.
......
......@@ -205,6 +205,12 @@ int WinEDA_BasePcbFrame::ReadGeneralDescrPcb( FILE* File, int* LineNum )
continue;
}
if( stricmp( data, "LayerThickness" ) == 0 )
{
data = strtok( NULL, " =\n\r" );
GetBoard()->m_BoardSettings->m_LayerThickness = atoi( data );;
continue;
}
if( strnicmp( data, "Links", 5 ) == 0 )
{
......@@ -360,6 +366,12 @@ int WinEDA_BasePcbFrame::ReadSetup( FILE* File, int* LineNum )
g_DesignSettings.m_TrackMinWidth = atoi( data );
continue;
}
if( stricmp( Line, "TrackClearenceHistory" ) == 0 )
{
int tmp = atoi( data );
AddHistory( tmp, TYPE_CLR );
continue;
}
if( stricmp( Line, "ZoneClearence" ) == 0 )
{
......@@ -534,7 +546,15 @@ static int WriteSetup( FILE* aFile, WinEDA_BasePcbFrame* aFrame, BOARD* aBoard )
g_DesignSettings.m_TrackWidthHistory[ii] );
}
fprintf( aFile, "TrackClearence %d\n", g_DesignSettings.m_TrackClearence );
for( int ii = 0; ii < HISTORY_NUMBER; ii++ )
{
if( g_DesignSettings.m_TrackClearenceHistory[ii] == 0 )
break;
fprintf( aFile, "TrackClearenceHistory %d\n",
g_DesignSettings.m_TrackClearenceHistory[ii] );
}
fprintf( aFile, "ZoneClearence %d\n", g_Zone_Default_Setting.m_ZoneClearance );
fprintf( aFile, "TrackMinWidth %d\n" , g_DesignSettings.m_TrackMinWidth );
......@@ -613,6 +633,7 @@ bool WinEDA_PcbFrame::WriteGeneralDescrPcb( FILE* File )
fprintf( File, "Ndraw %d\n", NbDrawItem );
fprintf( File, "Ntrack %d\n", GetBoard()->GetNumSegmTrack() );
fprintf( File, "Nzone %d\n", GetBoard()->GetNumSegmZone() );
fprintf( File, "LayerThickness %d\n", GetBoard()->m_BoardSettings->m_LayerThickness );
fprintf( File, "Nmodule %d\n", NbModules );
fprintf( File, "Nnets %d\n", GetBoard()->m_NetInfo->GetNetsCount() );
......
......@@ -344,7 +344,7 @@ wxString WinEDA_BasePcbFrame::Select_1_Module_From_List(
WinEDAListBox* ListBox = new WinEDAListBox( active_window, wxEmptyString,
NULL, OldName, DisplayCmpDoc,
wxColour( 200, 200, 255 ) );
wxColour( 200, 200, 255 ),GetScreen()->m_Curseur );
wxBeginBusyCursor();
......
......@@ -140,6 +140,7 @@ bool Read_Hotkey_Config( WinEDA_DrawFrame* frame, bool verbose )
g_ConfigFileLocationChoice );
FullFileName += HOTKEY_FILENAME;
FullFileName += wxT(".");
FullFileName += DEFAULT_HOTKEY_FILENAME_EXT;
return frame->ReadHotkeyConfigFile( FullFileName,
s_Pcbnew_Editor_Hokeys_Descr,
......@@ -178,11 +179,13 @@ bool Read_Config( const wxString& projectFileName )
/* Some parameters must be reinitialize after loading a new board or config: */
g_DesignSettings.m_TrackWidthHistory[0] = g_DesignSettings.m_CurrentTrackWidth;
g_DesignSettings.m_TrackClearenceHistory[0] = g_DesignSettings.m_TrackClearence;
g_DesignSettings.m_ViaSizeHistory[0] = g_DesignSettings.m_CurrentViaSize;
for( ii = 1; ii < HISTORY_NUMBER; ii++ )
{
g_DesignSettings.m_TrackWidthHistory[ii] = 0;
g_DesignSettings.m_TrackClearenceHistory[ii] = 0;
g_DesignSettings.m_ViaSizeHistory[ii] = 0;
}
......
......@@ -79,6 +79,13 @@ static PARAM_CFG_INT ViaAltDrillCfg
250, /* Default value */
0, 0xFFFF /* Min and max values*/
);
static PARAM_CFG_INT LayerThicknessCfg
(
wxT( "LayerThickness" ), /* Keyword */
&g_DesignSettings.m_LayerThickness, /* Parameter address */
630, /* Default value */
0, 0xFFFF /* Min and max values*/
);
static PARAM_CFG_INT MicroViaDiametreCfg
(
......@@ -800,6 +807,7 @@ PARAM_CFG_BASE* ParamCfgList[] =
&ViaShowHoleCfg,
&ShowNetNamesModeCfg,
&TrackClearenceCfg,
&LayerThicknessCfg,
&LayerCountCfg,
&TrackWidthCfg,
&RouteLayTopCfg,
......
......@@ -137,6 +137,8 @@ BEGIN_EVENT_TABLE( WinEDA_PcbFrame, WinEDA_BasePcbFrame )
WinEDA_PcbFrame::Process_Special_Functions )
EVT_KICAD_CHOICEBOX( ID_AUX_TOOLBAR_PCB_TRACK_WIDTH,
WinEDA_PcbFrame::Process_Special_Functions )
EVT_KICAD_CHOICEBOX( ID_AUX_TOOLBAR_PCB_CLR_WIDTH,
WinEDA_PcbFrame::Process_Special_Functions )
EVT_KICAD_CHOICEBOX( ID_AUX_TOOLBAR_PCB_VIA_SIZE,
WinEDA_PcbFrame::Process_Special_Functions )
EVT_TOOL( ID_TOOLBARH_PCB_AUTOPLACE, WinEDA_PcbFrame::AutoPlace )
......@@ -153,6 +155,7 @@ BEGIN_EVENT_TABLE( WinEDA_PcbFrame, WinEDA_BasePcbFrame )
EVT_TOOL( ID_PCB_HIGHLIGHT_BUTT, WinEDA_PcbFrame::Process_Special_Functions )
EVT_TOOL( ID_COMPONENT_BUTT, WinEDA_PcbFrame::Process_Special_Functions )
EVT_TOOL( ID_TRACK_BUTT, WinEDA_PcbFrame::Process_Special_Functions )
EVT_TOOL( ID_TOGGLE_PRESENT_COMMAND, WinEDA_PcbFrame::Process_Special_Functions )
EVT_TOOL( ID_PCB_ZONES_BUTT, WinEDA_PcbFrame::Process_Special_Functions )
EVT_TOOL( ID_PCB_MIRE_BUTT, WinEDA_PcbFrame::Process_Special_Functions )
EVT_TOOL( ID_PCB_ARC_BUTT, WinEDA_PcbFrame::Process_Special_Functions )
......@@ -210,9 +213,11 @@ WinEDA_PcbFrame::WinEDA_PcbFrame( wxWindow* father,
m_Draw_Sheet_Ref = TRUE; // TRUE pour avoir le cartouche dessine
m_Draw_Auxiliary_Axis = TRUE;
m_SelTrackWidthBox = NULL;
m_SelClrWidthBox = NULL;
m_SelViaSizeBox = NULL;
m_SelLayerBox = NULL;
m_SelTrackWidthBox_Changed = FALSE;
m_SelClrWidthBox_Changed = FALSE;
m_SelViaSizeBox_Changed = FALSE;
SetBoard( new BOARD( NULL, this ) );
......@@ -467,12 +472,18 @@ void WinEDA_PcbFrame::SetToolbars()
_( "Show Tracks Sketch mode" ) :
_( "Show Tracks filled mode" ) );
m_OptionsToolBar->ToggleTool( ID_TB_OPTIONS_SHOW_HIGHT_CONTRAST_MODE,
m_OptionsToolBar->ToggleTool( ID_TB_OPTIONS_SHOW_HIGH_CONTRAST_MODE,
DisplayOpt.ContrastModeDisplay );
m_OptionsToolBar->SetToolShortHelp( ID_TB_OPTIONS_SHOW_HIGHT_CONTRAST_MODE,
m_OptionsToolBar->SetToolShortHelp( ID_TB_OPTIONS_SHOW_HIGH_CONTRAST_MODE,
DisplayOpt.ContrastModeDisplay ?
_( "Normal Contrast Mode Display" ) :
_( "Hight Contrast Mode Display" ) );
_( "High Contrast Mode Display" ) );
m_OptionsToolBar->ToggleTool( ID_TB_OPTIONS_SHOW_INVISIBLE_TEXT_MODE,
g_ModuleTextNOVColor & ITEM_NOT_SHOW );
m_OptionsToolBar->SetToolShortHelp( ID_TB_OPTIONS_SHOW_INVISIBLE_TEXT_MODE,
g_ModuleTextNOVColor & (ITEM_NOT_SHOW) ?
_( "Show Invisible Text" ) :
_( "Hide Invisible Text" ) );
m_OptionsToolBar->ToggleTool( ID_TB_OPTIONS_SHOW_EXTRA_VERTICAL_TOOLBAR1, m_AuxVToolBar ? true : false );
}
......@@ -513,6 +524,38 @@ void WinEDA_PcbFrame::SetToolbars()
}
}
if( m_SelClrWidthBox && m_SelClrWidthBox_Changed )
{
m_SelClrWidthBox_Changed = FALSE;
m_SelClrWidthBox->Clear();
wxString format = _( "Clearance" );
if( g_UnitMetric == INCHES )
format += wxT( " %.1f" );
else
format += wxT( " %.3f" );
for( ii = 0; ii < HISTORY_NUMBER; ii++ )
{
if( g_DesignSettings.m_TrackClearenceHistory[ii] == 0 )
break; // Fin de liste
double value = To_User_Unit( g_UnitMetric,
g_DesignSettings.m_TrackClearenceHistory[ii],
PCB_INTERNAL_UNIT );
if( g_UnitMetric == INCHES )
msg.Printf( format.GetData(), value * 1000 );
else
msg.Printf( format.GetData(), value );
m_SelClrWidthBox->Append( msg );
if( g_DesignSettings.m_TrackClearenceHistory[ii] ==
g_DesignSettings.m_TrackClearence )
m_SelClrWidthBox->SetSelection( ii );
}
}
if( m_SelViaSizeBox && m_SelViaSizeBox_Changed )
{
m_SelViaSizeBox_Changed = FALSE;
......
......@@ -111,6 +111,7 @@ void WinEDA_PcbFrame::ImportSpecctraSession( wxCommandEvent& event )
SetLocaleTo_Default( ); // revert to the current locale
m_SelTrackWidthBox_Changed = TRUE;
m_SelClrWidthBox_Changed = TRUE;
m_SelViaSizeBox_Changed = TRUE;
GetScreen()->SetModify();
......
......@@ -368,13 +368,21 @@ void WinEDA_PcbFrame::ReCreateOptToolbar()
wxBitmap( showtrack_xpm ),
_( "Show Tracks Sketch" ), wxITEM_CHECK );
m_OptionsToolBar->AddTool( ID_TB_OPTIONS_SHOW_HIGHT_CONTRAST_MODE,
m_OptionsToolBar->AddTool( ID_TB_OPTIONS_SHOW_HIGH_CONTRAST_MODE,
wxEmptyString,
wxBitmap( palette_xpm ),
_( "Hight Contrast Mode Display" ),
_( "High Contrast Mode Display" ),
wxITEM_CHECK );
m_OptionsToolBar->ToggleTool( ID_TB_OPTIONS_SHOW_HIGHT_CONTRAST_MODE,
m_OptionsToolBar->ToggleTool( ID_TB_OPTIONS_SHOW_HIGH_CONTRAST_MODE,
DisplayOpt.ContrastModeDisplay );
m_OptionsToolBar->AddTool( ID_TB_OPTIONS_SHOW_INVISIBLE_TEXT_MODE,
wxEmptyString,
wxBitmap( invisible_text_xpm ),
_( "Show Invisible Text" ),
wxITEM_CHECK );
m_OptionsToolBar->ToggleTool( ID_TB_OPTIONS_SHOW_INVISIBLE_TEXT_MODE,
g_ModuleTextNOVColor & ITEM_NOT_SHOW );
#ifdef MUWAVE_ENBL
m_OptionsToolBar->AddSeparator();
......@@ -548,6 +556,12 @@ void WinEDA_PcbFrame::ReCreateAuxiliaryToolbar()
wxSize( LISTBOX_WIDTH + 20, -1 ) );
m_AuxiliaryToolBar->AddControl( m_SelTrackWidthBox );
m_SelTrackWidthBox_Changed = TRUE;
m_SelClrWidthBox = new WinEDAChoiceBox( m_AuxiliaryToolBar,
ID_AUX_TOOLBAR_PCB_CLR_WIDTH,
wxPoint( -1, -1 ),
wxSize( LISTBOX_WIDTH + 20, -1 ) );
m_AuxiliaryToolBar->AddControl( m_SelClrWidthBox );
m_SelClrWidthBox_Changed = TRUE;
m_AuxiliaryToolBar->AddTool( ID_AUX_TOOLBAR_PCB_SELECT_AUTO_WIDTH,
wxEmptyString,
......@@ -626,6 +640,7 @@ void WinEDA_PcbFrame::ReCreateAuxiliaryToolbar()
m_SelViaSizeBox_Changed = TRUE;
m_SelTrackWidthBox_Changed = TRUE;
m_SelClrWidthBox_Changed = TRUE;
ReCreateLayerBox( NULL );
......
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