Pcbnew: Added: Option to show the via area while creating a new track.
Useful in compact designs to know hos to place a via during track creation.
This commit is contained in:
parent
92266a1986
commit
360eda0f3c
|
@ -8,6 +8,8 @@ email address.
|
|||
================================================================================
|
||||
++Pcbnew:
|
||||
Added: in DRC tests: tests for vias min size and tracks min width.
|
||||
Added: Option to show the via area while creating a new track.
|
||||
Useful in compact designs to know hos to place a via during track creation.
|
||||
|
||||
2009-june-11 UPDATE Jean-Pierre Charras <jean-pierre.charras@gipsa-lab.inpg.fr>
|
||||
================================================================================
|
||||
|
|
|
@ -713,7 +713,7 @@ enum main_id {
|
|||
ID_PCB_GEN_POS_MODULES_FILE,
|
||||
ID_PCB_GEN_DRILL_FILE,
|
||||
|
||||
ID_PCB_LOOK_SETUP,
|
||||
ID_PCB_DISPLAY_OPTIONS_SETUP,
|
||||
ID_PCB_TRACK_SIZE_SETUP,
|
||||
ID_PCB_PAD_SETUP,
|
||||
|
||||
|
|
|
@ -455,6 +455,7 @@ public:
|
|||
void SetToolbars();
|
||||
void Process_Settings( wxCommandEvent& event );
|
||||
void InstallPcbOptionsFrame( const wxPoint& pos, wxDC* DC, int id );
|
||||
void InstallDisplayOptionsDialog( wxCommandEvent& aEvent );
|
||||
void InstallPcbGlobalDeleteFrame( const wxPoint& pos );
|
||||
|
||||
void GenModulesPosition( wxCommandEvent& event );
|
||||
|
|
|
@ -32,6 +32,7 @@ set(PCBNEW_SRCS
|
|||
deltrack.cpp
|
||||
dialog_copper_zones.cpp
|
||||
dialog_copper_zones_base.cpp
|
||||
dialog_display_options.cpp
|
||||
dialog_display_options_base.cpp
|
||||
dialog_drc_base.cpp
|
||||
dialog_drc.cpp
|
||||
|
|
|
@ -0,0 +1,160 @@
|
|||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: dialog_general_options.cpp
|
||||
// Author: jean-pierre Charras
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
/* functions relatives to the dialog opened from the main menu :
|
||||
Prefernces/display
|
||||
*/
|
||||
#include "fctsys.h"
|
||||
#include "common.h"
|
||||
#include "class_drawpanel.h"
|
||||
#include "confirm.h"
|
||||
#include "pcbnew.h"
|
||||
|
||||
#include "id.h"
|
||||
|
||||
#include "dialog_display_options_base.h"
|
||||
|
||||
|
||||
class Dialog_Display_Options : public DialogDisplayOptions_base
|
||||
{
|
||||
private:
|
||||
WinEDA_BasePcbFrame* m_Parent;
|
||||
|
||||
void init();
|
||||
|
||||
public:
|
||||
Dialog_Display_Options( WinEDA_BasePcbFrame* parent );
|
||||
~Dialog_Display_Options( ) { };
|
||||
void OnOkClick( wxCommandEvent& event );
|
||||
void OnCancelClick( wxCommandEvent& event );
|
||||
};
|
||||
|
||||
|
||||
void WinEDA_PcbFrame::InstallDisplayOptionsDialog( wxCommandEvent& aEvent )
|
||||
{
|
||||
Dialog_Display_Options* DisplayOptionsDialog =
|
||||
new Dialog_Display_Options( this );
|
||||
|
||||
DisplayOptionsDialog->ShowModal();
|
||||
DisplayOptionsDialog->Destroy();
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************/
|
||||
Dialog_Display_Options::Dialog_Display_Options( WinEDA_BasePcbFrame* parent ) :
|
||||
DialogDisplayOptions_base(parent)
|
||||
/*******************************************************************************/
|
||||
{
|
||||
m_Parent = parent;
|
||||
|
||||
init();
|
||||
}
|
||||
|
||||
/****************************************************************/
|
||||
void Dialog_Display_Options::init()
|
||||
/****************************************************************/
|
||||
{
|
||||
SetFocus();
|
||||
|
||||
if ( DisplayOpt.DisplayPcbTrackFill )
|
||||
m_OptDisplayTracks->SetSelection(1);
|
||||
|
||||
if ( DisplayOpt.DisplayTrackIsol )
|
||||
m_OptDisplayTracksClearance->SetSelection(3);
|
||||
else if ( g_ShowClearanceWhenTrackCreation == 1)
|
||||
m_OptDisplayTracksClearance->SetSelection(1);
|
||||
else if ( g_ShowClearanceWhenTrackCreation == 2)
|
||||
m_OptDisplayTracksClearance->SetSelection(2);
|
||||
else m_OptDisplayTracksClearance->SetSelection(0);
|
||||
|
||||
if ( DisplayOpt.DisplayPadFill )
|
||||
m_OptDisplayPads->SetSelection(1);
|
||||
else
|
||||
m_OptDisplayPads->SetSelection(0);
|
||||
|
||||
m_Show_Page_Limits->SetSelection( g_ShowPageLimits ? 0 : 1);
|
||||
|
||||
m_OptDisplayViaHole->SetSelection( DisplayOpt.m_DisplayViaMode );
|
||||
m_OptDisplayModTexts->SetSelection( DisplayOpt.DisplayModText );
|
||||
m_OptDisplayModEdges->SetSelection( DisplayOpt.DisplayModEdge );
|
||||
m_OptDisplayPadClearence->SetValue( DisplayOpt.DisplayPadIsol );
|
||||
m_OptDisplayPadNumber->SetValue( DisplayOpt.DisplayPadNum );
|
||||
m_OptDisplayPadNoConn->SetValue( DisplayOpt.DisplayPadNoConn );
|
||||
m_OptDisplayDrawings->SetSelection( DisplayOpt.DisplayDrawItems );
|
||||
m_ShowNetNamesOption->SetSelection( DisplayOpt.DisplayNetNamesMode);
|
||||
|
||||
if( GetSizer() )
|
||||
{
|
||||
GetSizer()->SetSizeHints( this );
|
||||
}
|
||||
}
|
||||
|
||||
/*****************************************************************/
|
||||
void Dialog_Display_Options::OnCancelClick( wxCommandEvent& event )
|
||||
/*****************************************************************/
|
||||
{
|
||||
event.Skip();
|
||||
}
|
||||
|
||||
/*************************************************************************/
|
||||
void Dialog_Display_Options::OnOkClick(wxCommandEvent& event)
|
||||
/*************************************************************************/
|
||||
/* Update variables with new options
|
||||
*/
|
||||
{
|
||||
if ( m_Show_Page_Limits->GetSelection() == 0 ) g_ShowPageLimits = TRUE;
|
||||
else g_ShowPageLimits = FALSE;
|
||||
|
||||
if ( m_OptDisplayTracks->GetSelection() == 1)
|
||||
DisplayOpt.DisplayPcbTrackFill = TRUE;
|
||||
else DisplayOpt.DisplayPcbTrackFill = FALSE;
|
||||
|
||||
m_Parent->m_DisplayPcbTrackFill = DisplayOpt.DisplayPcbTrackFill;
|
||||
DisplayOpt.m_DisplayViaMode = m_OptDisplayViaHole->GetSelection();
|
||||
|
||||
switch ( m_OptDisplayTracksClearance->GetSelection() )
|
||||
{
|
||||
case 3:
|
||||
DisplayOpt.DisplayTrackIsol = TRUE;
|
||||
g_ShowClearanceWhenTrackCreation = 1;
|
||||
break;
|
||||
case 1:
|
||||
DisplayOpt.DisplayTrackIsol = FALSE;
|
||||
g_ShowClearanceWhenTrackCreation = 1;
|
||||
break;
|
||||
case 2:
|
||||
DisplayOpt.DisplayTrackIsol = FALSE;
|
||||
g_ShowClearanceWhenTrackCreation = 2;
|
||||
break;
|
||||
case 0:
|
||||
DisplayOpt.DisplayTrackIsol = FALSE;
|
||||
g_ShowClearanceWhenTrackCreation = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
m_Parent->m_DisplayModText = DisplayOpt.DisplayModText =
|
||||
m_OptDisplayModTexts->GetSelection();
|
||||
m_Parent->m_DisplayModEdge = DisplayOpt.DisplayModEdge =
|
||||
m_OptDisplayModEdges->GetSelection();
|
||||
|
||||
if (m_OptDisplayPads->GetSelection() == 1 )
|
||||
DisplayOpt.DisplayPadFill = true;
|
||||
else
|
||||
DisplayOpt.DisplayPadFill = false;
|
||||
|
||||
m_Parent->m_DisplayPadFill = DisplayOpt.DisplayPadFill;
|
||||
|
||||
DisplayOpt.DisplayPadIsol = m_OptDisplayPadClearence->GetValue();
|
||||
|
||||
m_Parent->m_DisplayPadNum = DisplayOpt.DisplayPadNum = m_OptDisplayPadNumber->GetValue();
|
||||
|
||||
DisplayOpt.DisplayPadNoConn = m_OptDisplayPadNoConn->GetValue();
|
||||
|
||||
DisplayOpt.DisplayDrawItems = m_OptDisplayDrawings->GetSelection();
|
||||
DisplayOpt.DisplayNetNamesMode = m_ShowNetNamesOption->GetSelection();
|
||||
|
||||
m_Parent->DrawPanel->Refresh(TRUE);
|
||||
|
||||
EndModal(1);
|
||||
}
|
|
@ -27,10 +27,10 @@ DialogDisplayOptions_base::DialogDisplayOptions_base( wxWindow* parent, wxWindow
|
|||
|
||||
sLeftBoxSizer->Add( m_OptDisplayTracks, 0, wxALL|wxEXPAND, 5 );
|
||||
|
||||
wxString m_OptDisplayTracksClearanceChoices[] = { _("Always"), _("New track"), _("Never") };
|
||||
wxString m_OptDisplayTracksClearanceChoices[] = { _("Never"), _("New track"), _("New track with via area"), _("Always") };
|
||||
int m_OptDisplayTracksClearanceNChoices = sizeof( m_OptDisplayTracksClearanceChoices ) / sizeof( wxString );
|
||||
m_OptDisplayTracksClearance = new wxRadioBox( this, ID_SHOW_CLEARANCE, _("Show Tracks Clearance:"), wxDefaultPosition, wxDefaultSize, m_OptDisplayTracksClearanceNChoices, m_OptDisplayTracksClearanceChoices, 1, wxRA_SPECIFY_COLS );
|
||||
m_OptDisplayTracksClearance->SetSelection( 1 );
|
||||
m_OptDisplayTracksClearance->SetSelection( 0 );
|
||||
m_OptDisplayTracksClearance->SetToolTip( _("Show( or not) tracks clearance area.\nIf New track is selected, track clearance area is shown only when creating the track.") );
|
||||
|
||||
sLeftBoxSizer->Add( m_OptDisplayTracksClearance, 0, wxALL|wxEXPAND, 5 );
|
||||
|
|
|
@ -147,7 +147,7 @@
|
|||
<property name="proportion">0</property>
|
||||
<object class="wxRadioBox" expanded="1">
|
||||
<property name="bg"></property>
|
||||
<property name="choices">"Always" "New track" "Never"</property>
|
||||
<property name="choices">"Never" "New track" "New track with via area" "Always"</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
|
@ -161,7 +161,7 @@
|
|||
<property name="name">m_OptDisplayTracksClearance</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pos"></property>
|
||||
<property name="selection">1</property>
|
||||
<property name="selection">0</property>
|
||||
<property name="size"></property>
|
||||
<property name="style">wxRA_SPECIFY_COLS</property>
|
||||
<property name="subclass"></property>
|
||||
|
|
|
@ -55,7 +55,7 @@ DIALOG_DRC_CONTROL_BASE::DIALOG_DRC_CONTROL_BASE( wxWindow* parent, wxWindowID i
|
|||
m_TrackMinWidthTitle
|
||||
->Wrap( -1 );
|
||||
fgMinValuesSizer->Add( m_TrackMinWidthTitle
|
||||
, 0, wxALL|wxALIGN_RIGHT, 5 );
|
||||
, 0, wxALIGN_RIGHT|wxTOP|wxBOTTOM|wxLEFT, 5 );
|
||||
|
||||
m_SetTrackMinWidthCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_SetTrackMinWidthCtrl->SetToolTip( _("In the clearance units, enter the clearance distance") );
|
||||
|
@ -64,7 +64,7 @@ DIALOG_DRC_CONTROL_BASE::DIALOG_DRC_CONTROL_BASE( wxWindow* parent, wxWindowID i
|
|||
|
||||
m_MicroViaMinTitle = new wxStaticText( this, wxID_ANY, _("MicroVia Min Size"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_MicroViaMinTitle->Wrap( -1 );
|
||||
fgMinValuesSizer->Add( m_MicroViaMinTitle, 0, wxALL|wxALIGN_RIGHT, 5 );
|
||||
fgMinValuesSizer->Add( m_MicroViaMinTitle, 0, wxALIGN_RIGHT|wxTOP|wxBOTTOM|wxLEFT, 5 );
|
||||
|
||||
m_SetMicroViakMinSizeCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_SetMicroViakMinSizeCtrl->SetToolTip( _("In the clearance units, enter the clearance distance") );
|
||||
|
@ -119,7 +119,7 @@ DIALOG_DRC_CONTROL_BASE::DIALOG_DRC_CONTROL_BASE( wxWindow* parent, wxWindowID i
|
|||
|
||||
sbSizer3->Add( m_UnconnectedTestCtrl, 0, wxALL, 5 );
|
||||
|
||||
sbSizerOptions->Add( sbSizer3, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
sbSizerOptions->Add( sbSizer3, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
|
||||
|
||||
m_CommandSizer->Add( sbSizerOptions, 1, 0, 5 );
|
||||
|
||||
|
|
|
@ -335,7 +335,7 @@
|
|||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALL|wxALIGN_RIGHT</property>
|
||||
<property name="flag">wxALIGN_RIGHT|wxTOP|wxBOTTOM|wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="1">
|
||||
<property name="bg"></property>
|
||||
|
@ -441,7 +441,7 @@
|
|||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALL|wxALIGN_RIGHT</property>
|
||||
<property name="flag">wxALIGN_RIGHT|wxTOP|wxBOTTOM|wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="1">
|
||||
<property name="bg"></property>
|
||||
|
@ -724,7 +724,7 @@
|
|||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL</property>
|
||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxALL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticBoxSizer" expanded="1">
|
||||
<property name="id">wxID_ANY</property>
|
||||
|
|
|
@ -15,7 +15,6 @@
|
|||
#include "id.h"
|
||||
|
||||
#include "dialog_general_options_BoardEditor_base.h"
|
||||
#include "dialog_display_options_base.h"
|
||||
#include "dialog_general_options.h"
|
||||
#include "dialog_track_options.h"
|
||||
|
||||
|
@ -128,118 +127,6 @@ void Dialog_GeneralOptions::OnOkClick( wxCommandEvent& event )
|
|||
}
|
||||
|
||||
|
||||
/*******************************************************************************/
|
||||
Dialog_Display_Options::Dialog_Display_Options( WinEDA_BasePcbFrame* parent ) :
|
||||
DialogDisplayOptions_base(parent)
|
||||
/*******************************************************************************/
|
||||
{
|
||||
m_Parent = parent;
|
||||
|
||||
init();
|
||||
}
|
||||
|
||||
/****************************************************************/
|
||||
void Dialog_Display_Options::init()
|
||||
/****************************************************************/
|
||||
{
|
||||
SetFocus();
|
||||
|
||||
if ( DisplayOpt.DisplayPcbTrackFill )
|
||||
m_OptDisplayTracks->SetSelection(1);
|
||||
if ( DisplayOpt.DisplayTrackIsol )
|
||||
m_OptDisplayTracksClearance->SetSelection(0);
|
||||
else if ( g_ShowIsolDuringCreateTrack )
|
||||
m_OptDisplayTracksClearance->SetSelection(1);
|
||||
else m_OptDisplayTracksClearance->SetSelection(2);
|
||||
|
||||
if ( DisplayOpt.DisplayPadFill )
|
||||
m_OptDisplayPads->SetSelection(1);
|
||||
else
|
||||
m_OptDisplayPads->SetSelection(0);
|
||||
|
||||
m_Show_Page_Limits->SetSelection( g_ShowPageLimits ? 0 : 1);
|
||||
|
||||
m_OptDisplayViaHole->SetSelection( DisplayOpt.m_DisplayViaMode );
|
||||
m_OptDisplayModTexts->SetSelection( DisplayOpt.DisplayModText );
|
||||
m_OptDisplayModEdges->SetSelection( DisplayOpt.DisplayModEdge );
|
||||
m_OptDisplayPadClearence->SetValue( DisplayOpt.DisplayPadIsol );
|
||||
m_OptDisplayPadNumber->SetValue( DisplayOpt.DisplayPadNum );
|
||||
m_OptDisplayPadNoConn->SetValue( DisplayOpt.DisplayPadNoConn );
|
||||
m_OptDisplayDrawings->SetSelection( DisplayOpt.DisplayDrawItems );
|
||||
m_ShowNetNamesOption->SetSelection( DisplayOpt.DisplayNetNamesMode);
|
||||
|
||||
if( GetSizer() )
|
||||
{
|
||||
GetSizer()->SetSizeHints( this );
|
||||
}
|
||||
}
|
||||
|
||||
/*****************************************************************/
|
||||
void Dialog_Display_Options::OnCancelClick( wxCommandEvent& event )
|
||||
/*****************************************************************/
|
||||
{
|
||||
event.Skip();
|
||||
}
|
||||
|
||||
/*************************************************************************/
|
||||
void Dialog_Display_Options::OnOkClick(wxCommandEvent& event)
|
||||
/*************************************************************************/
|
||||
/* Update variables with new options
|
||||
*/
|
||||
{
|
||||
if ( m_Show_Page_Limits->GetSelection() == 0 ) g_ShowPageLimits = TRUE;
|
||||
else g_ShowPageLimits = FALSE;
|
||||
|
||||
if ( m_OptDisplayTracks->GetSelection() == 1)
|
||||
DisplayOpt.DisplayPcbTrackFill = TRUE;
|
||||
else DisplayOpt.DisplayPcbTrackFill = FALSE;
|
||||
|
||||
m_Parent->m_DisplayPcbTrackFill = DisplayOpt.DisplayPcbTrackFill;
|
||||
DisplayOpt.m_DisplayViaMode = m_OptDisplayViaHole->GetSelection();
|
||||
|
||||
switch ( m_OptDisplayTracksClearance->GetSelection() )
|
||||
{
|
||||
case 0:
|
||||
DisplayOpt.DisplayTrackIsol = TRUE;
|
||||
g_ShowIsolDuringCreateTrack = TRUE;
|
||||
break;
|
||||
case 1:
|
||||
DisplayOpt.DisplayTrackIsol = FALSE;
|
||||
g_ShowIsolDuringCreateTrack = TRUE;
|
||||
break;
|
||||
case 2:
|
||||
DisplayOpt.DisplayTrackIsol = FALSE;
|
||||
g_ShowIsolDuringCreateTrack = FALSE;
|
||||
break;
|
||||
}
|
||||
|
||||
m_Parent->m_DisplayModText = DisplayOpt.DisplayModText =
|
||||
m_OptDisplayModTexts->GetSelection();
|
||||
m_Parent->m_DisplayModEdge = DisplayOpt.DisplayModEdge =
|
||||
m_OptDisplayModEdges->GetSelection();
|
||||
|
||||
if (m_OptDisplayPads->GetSelection() == 1 )
|
||||
DisplayOpt.DisplayPadFill = true;
|
||||
else
|
||||
DisplayOpt.DisplayPadFill = false;
|
||||
|
||||
m_Parent->m_DisplayPadFill = DisplayOpt.DisplayPadFill;
|
||||
|
||||
DisplayOpt.DisplayPadIsol = m_OptDisplayPadClearence->GetValue();
|
||||
|
||||
m_Parent->m_DisplayPadNum = DisplayOpt.DisplayPadNum = m_OptDisplayPadNumber->GetValue();
|
||||
|
||||
DisplayOpt.DisplayPadNoConn = m_OptDisplayPadNoConn->GetValue();
|
||||
|
||||
DisplayOpt.DisplayDrawItems = m_OptDisplayDrawings->GetSelection();
|
||||
DisplayOpt.DisplayNetNamesMode = m_ShowNetNamesOption->GetSelection();
|
||||
|
||||
m_Parent->DrawPanel->Refresh(TRUE);
|
||||
|
||||
EndModal(1);
|
||||
}
|
||||
|
||||
|
||||
#include "dialog_graphic_items_options.cpp"
|
||||
|
||||
/*****************************************************************/
|
||||
|
@ -269,16 +156,6 @@ void WinEDA_PcbFrame::InstallPcbOptionsFrame( const wxPoint& pos,
|
|||
}
|
||||
break;
|
||||
|
||||
case ID_PCB_LOOK_SETUP:
|
||||
{
|
||||
Dialog_Display_Options* DisplayOptionsDialog =
|
||||
new Dialog_Display_Options( this );
|
||||
|
||||
DisplayOptionsDialog->ShowModal();
|
||||
DisplayOptionsDialog->Destroy();
|
||||
}
|
||||
break;
|
||||
|
||||
case ID_OPTIONS_SETUP:
|
||||
{
|
||||
Dialog_GeneralOptions* OptionsFrame =
|
||||
|
|
|
@ -19,18 +19,4 @@ public:
|
|||
};
|
||||
|
||||
|
||||
class Dialog_Display_Options : public DialogDisplayOptions_base
|
||||
{
|
||||
private:
|
||||
WinEDA_BasePcbFrame* m_Parent;
|
||||
|
||||
void init();
|
||||
|
||||
public:
|
||||
Dialog_Display_Options( WinEDA_BasePcbFrame* parent );
|
||||
~Dialog_Display_Options( ) { };
|
||||
void OnOkClick( wxCommandEvent& event );
|
||||
void OnCancelClick( wxCommandEvent& event );
|
||||
};
|
||||
|
||||
#endif // __dialog_general_options_h
|
||||
|
|
|
@ -674,7 +674,7 @@ void ShowNewTrackWhenMovingCursor( WinEDA_DrawPanel* panel, wxDC* DC, bool erase
|
|||
DisplayOpt.DisplayPcbTrackFill = true;
|
||||
IsolTmp = DisplayOpt.DisplayTrackIsol;
|
||||
|
||||
if( g_ShowIsolDuringCreateTrack )
|
||||
if( g_ShowClearanceWhenTrackCreation )
|
||||
DisplayOpt.DisplayTrackIsol = TRUE;
|
||||
|
||||
/* efface ancienne position si elle a ete deja dessinee */
|
||||
|
@ -682,6 +682,14 @@ void ShowNewTrackWhenMovingCursor( WinEDA_DrawPanel* panel, wxDC* DC, bool erase
|
|||
{
|
||||
Trace_Une_Piste( panel, DC, g_FirstTrackSegment, g_CurrentTrackList.GetCount(), GR_XOR );
|
||||
( (WinEDA_BasePcbFrame*) (panel->m_Parent) )->trace_ratsnest_pad( DC );
|
||||
if( g_ShowClearanceWhenTrackCreation > 1 ) // Show the via area
|
||||
{
|
||||
int color = g_DesignSettings.m_LayerColor[g_CurrentTrackSegment->GetLayer()];
|
||||
GRCircle( &panel->m_ClipBox, DC, g_CurrentTrackSegment->m_End.x,
|
||||
g_CurrentTrackSegment->m_End.y,
|
||||
(g_DesignSettings.m_CurrentViaSize/2) + g_DesignSettings.m_TrackClearence,
|
||||
color );
|
||||
}
|
||||
}
|
||||
|
||||
// MacOSX seems to need this.
|
||||
|
@ -734,6 +742,14 @@ void ShowNewTrackWhenMovingCursor( WinEDA_DrawPanel* panel, wxDC* DC, bool erase
|
|||
|
||||
D( g_CurrentTrackList.VerifyListIntegrity(); );
|
||||
Trace_Une_Piste( panel, DC, g_FirstTrackSegment, g_CurrentTrackList.GetCount(), GR_XOR );
|
||||
if( g_ShowClearanceWhenTrackCreation > 1 ) // Show the via area
|
||||
{
|
||||
int color = g_DesignSettings.m_LayerColor[g_CurrentTrackSegment->GetLayer()];
|
||||
GRCircle( &panel->m_ClipBox, DC, g_CurrentTrackSegment->m_End.x,
|
||||
g_CurrentTrackSegment->m_End.y,
|
||||
(g_DesignSettings.m_CurrentViaSize/2) + g_DesignSettings.m_TrackClearence,
|
||||
color );
|
||||
}
|
||||
|
||||
DisplayOpt.DisplayTrackIsol = IsolTmp;
|
||||
DisplayOpt.DisplayPcbTrackFill = Track_fill_copy;
|
||||
|
|
|
@ -184,7 +184,7 @@ void WinEDA_PcbFrame::ReCreateMenuBar()
|
|||
item->SetBitmap( preference_xpm );
|
||||
configmenu->Append( item );
|
||||
|
||||
item = new wxMenuItem( configmenu, ID_PCB_LOOK_SETUP, _( "&Display" ),
|
||||
item = new wxMenuItem( configmenu, ID_PCB_DISPLAY_OPTIONS_SETUP, _( "&Display" ),
|
||||
_( "Select how items (pads, tracks texts ... ) are displayed" ) );
|
||||
item->SetBitmap( display_options_xpm );
|
||||
configmenu->Append( item );
|
||||
|
|
|
@ -52,7 +52,6 @@ void WinEDA_PcbFrame::Process_Config( wxCommandEvent& event )
|
|||
break;
|
||||
|
||||
case ID_PCB_TRACK_SIZE_SETUP:
|
||||
case ID_PCB_LOOK_SETUP:
|
||||
case ID_OPTIONS_SETUP:
|
||||
case ID_PCB_DRAWINGS_WIDTHS_SETUP:
|
||||
InstallPcbOptionsFrame( pos, &dc, id );
|
||||
|
|
|
@ -194,12 +194,12 @@ static PARAM_CFG_BOOL SegmFillCfg
|
|||
TRUE /* Default value */
|
||||
);
|
||||
|
||||
static PARAM_CFG_BOOL NewTrackAfficheGardeCfg
|
||||
static PARAM_CFG_INT NewTrackAfficheGardeCfg
|
||||
(
|
||||
INSETUP,
|
||||
wxT( "NewAffG" ), /* Keyword */
|
||||
&g_ShowIsolDuringCreateTrack, /* Parameter address */
|
||||
TRUE /* Default value */
|
||||
&g_ShowClearanceWhenTrackCreation, /* Parameter address */
|
||||
1 /* Default value */
|
||||
);
|
||||
|
||||
static PARAM_CFG_BOOL TrackAfficheGardeCfg
|
||||
|
|
|
@ -85,9 +85,10 @@ BEGIN_EVENT_TABLE( WinEDA_PcbFrame, WinEDA_BasePcbFrame )
|
|||
EVT_MENU( ID_PCB_TRACK_SIZE_SETUP, WinEDA_PcbFrame::Process_Config )
|
||||
EVT_MENU( ID_PCB_DRAWINGS_WIDTHS_SETUP, WinEDA_PcbFrame::Process_Config )
|
||||
EVT_MENU( ID_PCB_PAD_SETUP, WinEDA_PcbFrame::Process_Config )
|
||||
EVT_MENU( ID_PCB_LOOK_SETUP, WinEDA_PcbFrame::Process_Config )
|
||||
EVT_MENU( ID_CONFIG_SAVE, WinEDA_PcbFrame::Process_Config )
|
||||
EVT_MENU( ID_CONFIG_SAVE, WinEDA_PcbFrame::Process_Config )
|
||||
EVT_MENU( ID_CONFIG_READ, WinEDA_PcbFrame::Process_Config )
|
||||
EVT_MENU( ID_PCB_DISPLAY_OPTIONS_SETUP, WinEDA_PcbFrame::InstallDisplayOptionsDialog )
|
||||
|
||||
|
||||
EVT_MENU( ID_PCB_USER_GRID_SETUP,
|
||||
WinEDA_PcbFrame::Process_Special_Functions )
|
||||
|
|
|
@ -33,7 +33,7 @@ bool g_Show_Ratsnest;
|
|||
bool g_Show_Module_Ratsnest;
|
||||
bool g_Show_Pads_Module_in_Move = TRUE;
|
||||
bool g_Raccord_45_Auto = TRUE;
|
||||
bool g_ShowIsolDuringCreateTrack;
|
||||
int g_ShowClearanceWhenTrackCreation = 1;
|
||||
bool Track_45_Only;
|
||||
bool Segments_45_Only;
|
||||
bool g_TwoSegmentTrackBuild = TRUE;
|
||||
|
|
|
@ -12,23 +12,23 @@
|
|||
|
||||
/* Flag used in locate functions
|
||||
* the locate ref point is the on grid cursor or the off grid mouse cursor */
|
||||
#define CURSEUR_ON_GRILLE (0 << 0)
|
||||
#define CURSEUR_OFF_GRILLE (1 << 0)
|
||||
#define CURSEUR_ON_GRILLE (0 << 0)
|
||||
#define CURSEUR_OFF_GRILLE (1 << 0)
|
||||
|
||||
#define IGNORE_LOCKED (1 << 1) ///< if module is locked, do not select for single module operation
|
||||
#define MATCH_LAYER (1 << 2) ///< if module not on current layer, do not select
|
||||
#define VISIBLE_ONLY (1 << 3) ///< if module not on a visible layer, do not select
|
||||
#define IGNORE_LOCKED (1 << 1) ///< if module is locked, do not select for single module operation
|
||||
#define MATCH_LAYER (1 << 2) ///< if module not on current layer, do not select
|
||||
#define VISIBLE_ONLY (1 << 3) ///< if module not on a visible layer, do not select
|
||||
|
||||
|
||||
#define START 0 /* Flag used in locale routines */
|
||||
#define END 1
|
||||
|
||||
#define DIM_ANCRE_MODULE 3 /* Anchor size (footprint centre) */
|
||||
#define DIM_ANCRE_TEXTE 2 /* Anchor size (Text centre) */
|
||||
#define DIM_ANCRE_MODULE 3 /* Anchor size (footprint centre) */
|
||||
#define DIM_ANCRE_TEXTE 2 /* Anchor size (Text centre) */
|
||||
|
||||
#define TEXTS_MIN_SIZE 50 // Min size in pcbnew units value (50 * 0.0001 mils)
|
||||
#define TEXTS_MAX_SIZE 100000 // Min size in pcbnew units value (1 inch) )
|
||||
#define TEXTS_MAX_WIDTH 5000 // Max width in pcbnew units value (0.5 inches)
|
||||
#define TEXTS_MIN_SIZE 50 // Min size in pcbnew units value (50 * 0.0001 mils)
|
||||
#define TEXTS_MAX_SIZE 100000 // Min size in pcbnew units value (1 inch) )
|
||||
#define TEXTS_MAX_WIDTH 5000 // Max width in pcbnew units value (0.5 inches)
|
||||
|
||||
/* Used in Zoom menu */
|
||||
#define ZOOM_PLUS -1
|
||||
|
@ -46,15 +46,20 @@
|
|||
|
||||
|
||||
/* variables */
|
||||
extern bool Drc_On;
|
||||
extern bool g_AutoDeleteOldTrack;
|
||||
extern bool g_No_Via_Route;
|
||||
extern bool g_Drag_Pistes_On;
|
||||
extern bool g_Show_Ratsnest;
|
||||
extern bool g_Show_Module_Ratsnest;
|
||||
extern bool g_Show_Pads_Module_in_Move;
|
||||
extern bool g_Raccord_45_Auto;
|
||||
extern bool g_ShowIsolDuringCreateTrack;
|
||||
extern bool Drc_On;
|
||||
extern bool g_AutoDeleteOldTrack;
|
||||
extern bool g_No_Via_Route;
|
||||
extern bool g_Drag_Pistes_On;
|
||||
extern bool g_Show_Ratsnest;
|
||||
extern bool g_Show_Module_Ratsnest;
|
||||
extern bool g_Show_Pads_Module_in_Move;
|
||||
extern bool g_Raccord_45_Auto;
|
||||
extern int g_ShowClearanceWhenTrackCreation; /* = 0 , 1 or 2
|
||||
* 0 = do not show clearance
|
||||
* 1 = show track clearance
|
||||
* 2 = show clearance + via area
|
||||
* (useful to know what clearance area is neede if we want to put a via on terminal track point)
|
||||
*/
|
||||
|
||||
extern const wxString g_FootprintLibFileWildcard; // Wildcard for footprint libraries filesnames
|
||||
|
||||
|
@ -65,7 +70,8 @@ extern const wxString g_FootprintLibFileWildcard; // Wildcard for footprint li
|
|||
* @param layer One of the two allowed layers for modules: CMP_N or COPPER_LAYER_N
|
||||
* @return bool - true if the layer is visible, else false.
|
||||
*/
|
||||
bool inline IsModuleLayerVisible( int layer ) {
|
||||
bool inline IsModuleLayerVisible( int layer )
|
||||
{
|
||||
if( layer==CMP_N )
|
||||
return DisplayOpt.Show_Modules_Cmp;
|
||||
|
||||
|
@ -77,36 +83,36 @@ bool inline IsModuleLayerVisible( int layer ) {
|
|||
}
|
||||
|
||||
|
||||
extern bool Track_45_Only;
|
||||
extern bool Segments_45_Only;
|
||||
extern wxString g_Shapes3DExtBuffer;
|
||||
extern wxString g_DocModulesFileName;
|
||||
extern bool Track_45_Only;
|
||||
extern bool Segments_45_Only;
|
||||
extern wxString g_Shapes3DExtBuffer;
|
||||
extern wxString g_DocModulesFileName;
|
||||
|
||||
/* Variables used in footprint handling */
|
||||
extern int Angle_Rot_Module;
|
||||
extern wxSize ModuleTextSize; /* Default footprint texts size */
|
||||
extern int ModuleTextWidth;
|
||||
extern int ModuleSegmentWidth;
|
||||
extern int Angle_Rot_Module;
|
||||
extern wxSize ModuleTextSize; /* Default footprint texts size */
|
||||
extern int ModuleTextWidth;
|
||||
extern int ModuleSegmentWidth;
|
||||
|
||||
/* Layer pair for auto routing and switch layers by hotkey */
|
||||
extern int Route_Layer_TOP;
|
||||
extern int Route_Layer_BOTTOM;
|
||||
extern int Route_Layer_TOP;
|
||||
extern int Route_Layer_BOTTOM;
|
||||
|
||||
extern int g_MaxLinksShowed; // Max count links showed in routing
|
||||
extern bool g_TwoSegmentTrackBuild;
|
||||
extern int g_MaxLinksShowed; // Max count links showed in routing
|
||||
extern bool g_TwoSegmentTrackBuild;
|
||||
|
||||
extern int g_MagneticPadOption;
|
||||
extern int g_MagneticTrackOption;
|
||||
extern int g_MagneticPadOption;
|
||||
extern int g_MagneticTrackOption;
|
||||
|
||||
/* Variables to handle hightlight nets */
|
||||
extern bool g_HightLigt_Status;
|
||||
extern int g_HightLigth_NetCode;
|
||||
extern bool g_HightLigt_Status;
|
||||
extern int g_HightLigth_NetCode;
|
||||
|
||||
extern PCB_SCREEN* ScreenModule; /* Ecran de l'editeur de modules */
|
||||
extern PCB_SCREEN* ScreenModule; /* Ecran de l'editeur de modules */
|
||||
|
||||
extern wxPoint g_Offset_Module; /* Offset de trace du modul en depl */
|
||||
extern wxPoint g_Offset_Module; /* Offset de trace du modul en depl */
|
||||
|
||||
extern wxString g_Current_PadName; // Last used pad name (pad num)
|
||||
extern wxString g_Current_PadName; // Last used pad name (pad num)
|
||||
|
||||
|
||||
enum MagneticPadOptionValues {
|
||||
|
|
Loading…
Reference in New Issue