Minor dialog fixes and code cleaning.
* Grammar and spelling fixes in Eeschema, CvPcb, and Pcbnew path and library dialog tool tips. * Translate the French file name subrill.cpp to highlight.cpp. * Lots of coding style policy fixes.
This commit is contained in:
parent
13324c06b5
commit
2c251196c6
|
@ -1,5 +1,5 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Apr 16 2008)
|
||||
// C++ code generated with wxFormBuilder (version Sep 8 2010)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO "NOT" EDIT THIS FILE!
|
||||
|
@ -108,7 +108,7 @@ DIALOG_CVPCB_CONFIG_FBP::DIALOG_CVPCB_CONFIG_FBP( wxWindow* parent, wxWindowID i
|
|||
bUserListSizer = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
m_listUserPaths = new wxListBox( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, wxLB_NEEDED_SB );
|
||||
m_listUserPaths->SetToolTip( _("Additional paths used in this project. The priority is highter than default Kicad paths.") );
|
||||
m_listUserPaths->SetToolTip( _("Additional paths used in this project. The priority is higher than default KiCad paths.") );
|
||||
m_listUserPaths->SetMinSize( wxSize( -1,70 ) );
|
||||
|
||||
bUserListSizer->Add( m_listUserPaths, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 );
|
||||
|
@ -135,7 +135,7 @@ DIALOG_CVPCB_CONFIG_FBP::DIALOG_CVPCB_CONFIG_FBP( wxWindow* parent, wxWindowID i
|
|||
sbSizer6 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Current search path list") ), wxHORIZONTAL );
|
||||
|
||||
m_DefaultLibraryPathslistBox = new wxListBox( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, wxLB_NEEDED_SB );
|
||||
m_DefaultLibraryPathslistBox->SetToolTip( _("Paths (system paths and user paths) used to search and load libraries files and component doc files.\nSorted by decreasing priority order.") );
|
||||
m_DefaultLibraryPathslistBox->SetToolTip( _("System and user paths used to search and load library files and component doc files.\nSorted by decreasing priority order.") );
|
||||
m_DefaultLibraryPathslistBox->SetMinSize( wxSize( -1,70 ) );
|
||||
|
||||
sbSizer6->Add( m_DefaultLibraryPathslistBox, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
|
||||
|
@ -198,4 +198,5 @@ DIALOG_CVPCB_CONFIG_FBP::~DIALOG_CVPCB_CONFIG_FBP()
|
|||
m_buttonRemovePath->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_CVPCB_CONFIG_FBP::OnRemoveUserPath ), NULL, this );
|
||||
m_sdbSizer2Cancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_CVPCB_CONFIG_FBP::OnCancelClick ), NULL, this );
|
||||
m_sdbSizer2OK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_CVPCB_CONFIG_FBP::OnOkClick ), NULL, this );
|
||||
|
||||
}
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
|
||||
<wxFormBuilder_Project>
|
||||
<FileVersion major="1" minor="9" />
|
||||
<FileVersion major="1" minor="10" />
|
||||
<object class="Project" expanded="1">
|
||||
<property name="class_decoration"></property>
|
||||
<property name="code_generation">C++</property>
|
||||
<property name="disconnect_events">1</property>
|
||||
<property name="disconnect_mode">source_name</property>
|
||||
<property name="disconnect_python_events">0</property>
|
||||
<property name="encoding">UTF-8</property>
|
||||
<property name="event_generation">connect</property>
|
||||
<property name="file">dialog_cvpcb_config_fbp</property>
|
||||
|
@ -16,13 +18,16 @@
|
|||
<property name="path">.</property>
|
||||
<property name="precompiled_header"></property>
|
||||
<property name="relative_path">1</property>
|
||||
<property name="skip_python_events">1</property>
|
||||
<property name="use_enum">1</property>
|
||||
<property name="use_microsoft_bom">0</property>
|
||||
<object class="Dialog" expanded="1">
|
||||
<property name="bg"></property>
|
||||
<property name="center">wxBOTH</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="event_handler">impl_virtual</property>
|
||||
<property name="extra_style"></property>
|
||||
<property name="fg"></property>
|
||||
<property name="font"></property>
|
||||
|
@ -37,6 +42,10 @@
|
|||
<property name="subclass"></property>
|
||||
<property name="title"></property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
|
@ -95,6 +104,7 @@
|
|||
<property name="bg"></property>
|
||||
<property name="choices"></property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="font"></property>
|
||||
|
@ -109,6 +119,10 @@
|
|||
<property name="style">wxLB_EXTENDED|wxLB_HSCROLL|wxLB_NEEDED_SB|wxLB_SINGLE</property>
|
||||
<property name="subclass"></property>
|
||||
<property name="tooltip">List of active library files.
Only library files in this list are loaded by Pcbnew.
The order of this list is important:
Pcbnew searchs for a given footprint using this list order priority.</property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
|
@ -155,6 +169,7 @@
|
|||
<object class="wxButton" expanded="1">
|
||||
<property name="bg"></property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default">0</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
|
@ -171,6 +186,10 @@
|
|||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="tooltip">Add a new library after the selected library, and load it</property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
|
@ -207,6 +226,7 @@
|
|||
<object class="wxButton" expanded="1">
|
||||
<property name="bg"></property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default">0</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
|
@ -223,6 +243,10 @@
|
|||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="tooltip">Add a new library before the selected library, and load it</property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
|
@ -259,6 +283,7 @@
|
|||
<object class="wxButton" expanded="1">
|
||||
<property name="bg"></property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default">0</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
|
@ -275,6 +300,10 @@
|
|||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="tooltip">Unload the selected library</property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
|
@ -311,6 +340,7 @@
|
|||
<object class="wxButton" expanded="1">
|
||||
<property name="bg"></property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default">0</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
|
@ -327,6 +357,10 @@
|
|||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
|
@ -363,6 +397,7 @@
|
|||
<object class="wxButton" expanded="1">
|
||||
<property name="bg"></property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default">0</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
|
@ -379,6 +414,10 @@
|
|||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
|
@ -432,6 +471,7 @@
|
|||
<property name="bg"></property>
|
||||
<property name="choices"></property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="font"></property>
|
||||
|
@ -446,6 +486,10 @@
|
|||
<property name="style">wxLB_EXTENDED|wxLB_HSCROLL|wxLB_NEEDED_SB|wxLB_SINGLE</property>
|
||||
<property name="subclass"></property>
|
||||
<property name="tooltip">List of active library files.
Only library files in this list are loaded by Pcbnew.
The order of this list is important:
Pcbnew searchs for a given footprint using this list order priority.</property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
|
@ -492,6 +536,7 @@
|
|||
<object class="wxButton" expanded="1">
|
||||
<property name="bg"></property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default">0</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
|
@ -508,6 +553,10 @@
|
|||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="tooltip">Add a new library after the selected library, and load it</property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
|
@ -544,6 +593,7 @@
|
|||
<object class="wxButton" expanded="1">
|
||||
<property name="bg"></property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default">0</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
|
@ -560,6 +610,10 @@
|
|||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="tooltip">Add a new library before the selected library, and load it</property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
|
@ -596,6 +650,7 @@
|
|||
<object class="wxButton" expanded="1">
|
||||
<property name="bg"></property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default">0</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
|
@ -612,6 +667,10 @@
|
|||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="tooltip">Unload the selected library</property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
|
@ -648,6 +707,7 @@
|
|||
<object class="wxButton" expanded="1">
|
||||
<property name="bg"></property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default">0</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
|
@ -664,6 +724,10 @@
|
|||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
|
@ -700,6 +764,7 @@
|
|||
<object class="wxButton" expanded="1">
|
||||
<property name="bg"></property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default">0</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
|
@ -716,6 +781,10 @@
|
|||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
|
@ -768,6 +837,7 @@
|
|||
<object class="wxTextCtrl" expanded="1">
|
||||
<property name="bg"></property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="font"></property>
|
||||
|
@ -783,6 +853,10 @@
|
|||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="value"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
|
@ -823,6 +897,7 @@
|
|||
<object class="wxButton" expanded="1">
|
||||
<property name="bg"></property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default">0</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
|
@ -839,6 +914,10 @@
|
|||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
|
@ -899,6 +978,7 @@
|
|||
<property name="bg"></property>
|
||||
<property name="choices"></property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="font"></property>
|
||||
|
@ -912,7 +992,11 @@
|
|||
<property name="size"></property>
|
||||
<property name="style">wxLB_NEEDED_SB</property>
|
||||
<property name="subclass"></property>
|
||||
<property name="tooltip">Additional paths used in this project. The priority is highter than default Kicad paths.</property>
|
||||
<property name="tooltip">Additional paths used in this project. The priority is higher than default KiCad paths.</property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
|
@ -961,6 +1045,7 @@
|
|||
<object class="wxButton" expanded="1">
|
||||
<property name="bg"></property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default">0</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
|
@ -977,6 +1062,10 @@
|
|||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
|
@ -1013,6 +1102,7 @@
|
|||
<object class="wxButton" expanded="1">
|
||||
<property name="bg"></property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default">0</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
|
@ -1029,6 +1119,10 @@
|
|||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
|
@ -1065,6 +1159,7 @@
|
|||
<object class="wxButton" expanded="1">
|
||||
<property name="bg"></property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default">0</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
|
@ -1081,6 +1176,10 @@
|
|||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
|
@ -1134,6 +1233,7 @@
|
|||
<property name="bg"></property>
|
||||
<property name="choices"></property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="font"></property>
|
||||
|
@ -1147,7 +1247,11 @@
|
|||
<property name="size"></property>
|
||||
<property name="style">wxLB_NEEDED_SB</property>
|
||||
<property name="subclass"></property>
|
||||
<property name="tooltip">Paths (system paths and user paths) used to search and load libraries files and component doc files.
Sorted by decreasing priority order.</property>
|
||||
<property name="tooltip">System and user paths used to search and load library files and component doc files.
Sorted by decreasing priority order.</property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
|
@ -1187,6 +1291,7 @@
|
|||
<object class="wxStaticLine" expanded="1">
|
||||
<property name="bg"></property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="font"></property>
|
||||
|
@ -1201,6 +1306,10 @@
|
|||
<property name="style">wxLI_HORIZONTAL</property>
|
||||
<property name="subclass"></property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Apr 16 2008)
|
||||
// C++ code generated with wxFormBuilder (version Sep 8 2010)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO "NOT" EDIT THIS FILE!
|
||||
|
@ -89,6 +89,7 @@ class DIALOG_CVPCB_CONFIG_FBP : public wxDialog
|
|||
|
||||
|
||||
public:
|
||||
|
||||
DIALOG_CVPCB_CONFIG_FBP( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 570,625 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
|
||||
~DIALOG_CVPCB_CONFIG_FBP();
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Jun 6 2011)
|
||||
// C++ code generated with wxFormBuilder (version Sep 8 2010)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO "NOT" EDIT THIS FILE!
|
||||
|
@ -57,7 +57,7 @@ DIALOG_EESCHEMA_CONFIG_FBP::DIALOG_EESCHEMA_CONFIG_FBP( wxWindow* parent, wxWind
|
|||
sbSizer4 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("User defined search path") ), wxHORIZONTAL );
|
||||
|
||||
m_listUserPaths = new wxListBox( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, wxLB_HSCROLL|wxLB_NEEDED_SB|wxLB_SINGLE );
|
||||
m_listUserPaths->SetToolTip( _("Additional paths used in this project. The priority is highter than default Kicad paths.") );
|
||||
m_listUserPaths->SetToolTip( _("Additional paths used in this project. The priority is higher than default KiCad paths.") );
|
||||
m_listUserPaths->SetMinSize( wxSize( 400,90 ) );
|
||||
|
||||
sbSizer4->Add( m_listUserPaths, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
@ -82,7 +82,7 @@ DIALOG_EESCHEMA_CONFIG_FBP::DIALOG_EESCHEMA_CONFIG_FBP( wxWindow* parent, wxWind
|
|||
sbLibPathSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Current search path list") ), wxVERTICAL );
|
||||
|
||||
m_DefaultLibraryPathslistBox = new wxListBox( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, wxLB_NEEDED_SB );
|
||||
m_DefaultLibraryPathslistBox->SetToolTip( _("Paths (system paths and user paths) used to search and load libraries files and component doc files.\nSorted by decreasing priority order.") );
|
||||
m_DefaultLibraryPathslistBox->SetToolTip( _("System and user paths used to search and load library files and component doc files.\nSorted by decreasing priority order.") );
|
||||
|
||||
sbLibPathSizer->Add( m_DefaultLibraryPathslistBox, 1, wxALL|wxEXPAND, 5 );
|
||||
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
<property name="disconnect_events">1</property>
|
||||
<property name="disconnect_mode">source_name</property>
|
||||
<property name="disconnect_python_events">0</property>
|
||||
<property name="embedded_files_path">res</property>
|
||||
<property name="encoding">UTF-8</property>
|
||||
<property name="event_generation">connect</property>
|
||||
<property name="file">dialog_eeschema_config_fbp</property>
|
||||
|
@ -23,57 +22,25 @@
|
|||
<property name="use_enum">1</property>
|
||||
<property name="use_microsoft_bom">0</property>
|
||||
<object class="Dialog" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_managed">0</property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center">wxBOTH</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="event_handler">impl_virtual</property>
|
||||
<property name="extra_style"></property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="layer"></property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">DIALOG_EESCHEMA_CONFIG_FBP</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="position"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="row"></property>
|
||||
<property name="show">1</property>
|
||||
<property name="size">-1,-1</property>
|
||||
<property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
|
||||
<property name="subclass"></property>
|
||||
<property name="title"></property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
|
@ -84,12 +51,6 @@
|
|||
<property name="window_style"></property>
|
||||
<event name="OnActivate"></event>
|
||||
<event name="OnActivateApp"></event>
|
||||
<event name="OnAuiFindManager"></event>
|
||||
<event name="OnAuiPaneButton"></event>
|
||||
<event name="OnAuiPaneClose"></event>
|
||||
<event name="OnAuiPaneMaximize"></event>
|
||||
<event name="OnAuiPaneRestore"></event>
|
||||
<event name="OnAuiRender"></event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnClose">OnCloseWindow</event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
|
@ -140,54 +101,23 @@
|
|||
<property name="flag">wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="wxListBox" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="choices"></property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="layer"></property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size">400,250</property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_ListLibr</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="position"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="row"></property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style">wxLB_EXTENDED|wxLB_HSCROLL|wxLB_NEEDED_SB|wxLB_SINGLE</property>
|
||||
<property name="subclass"></property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip">List of active library files.
Only library files in this list are loaded by Eeschema.
The order of this list is important:
Eeschema searchs for a given component using this list order priority.</property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
|
@ -237,55 +167,24 @@
|
|||
<property name="flag">wxALIGN_CENTER_HORIZONTAL|wxLEFT|wxRIGHT|wxTOP|wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxButton" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default">0</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">ID_ADD_LIB</property>
|
||||
<property name="label">Add</property>
|
||||
<property name="layer"></property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_buttonAddLib</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="position"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="row"></property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip">Add a new library after the selected library, and load it</property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
|
@ -325,55 +224,24 @@
|
|||
<property name="flag">wxALIGN_CENTER_HORIZONTAL|wxLEFT|wxRIGHT|wxTOP|wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxButton" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default">0</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Insert</property>
|
||||
<property name="layer"></property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_buttonIns</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="position"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="row"></property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip">Add a new library before the selected library, and load it</property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
|
@ -413,55 +281,24 @@
|
|||
<property name="flag">wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxButton" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default">0</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">ID_REMOVE_LIB</property>
|
||||
<property name="label">Remove</property>
|
||||
<property name="layer"></property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_buttonRemoveLib</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="position"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="row"></property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip">Unload the selected library</property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
|
@ -501,55 +338,24 @@
|
|||
<property name="flag">wxEXPAND|wxTOP|wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxButton" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default">0</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Up</property>
|
||||
<property name="layer"></property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_buttonUp</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="position"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="row"></property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
|
@ -589,55 +395,24 @@
|
|||
<property name="flag">wxALL|wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxButton" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default">0</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Down</property>
|
||||
<property name="layer"></property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_buttonDown</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="position"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="row"></property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
|
@ -693,55 +468,24 @@
|
|||
<property name="flag">wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="wxListBox" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="choices"></property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="layer"></property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size">400,90</property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_listUserPaths</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="position"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="row"></property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style">wxLB_HSCROLL|wxLB_NEEDED_SB|wxLB_SINGLE</property>
|
||||
<property name="subclass"></property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip">Additional paths used in this project. The priority is highter than default Kicad paths.</property>
|
||||
<property name="tooltip">Additional paths used in this project. The priority is higher than default KiCad paths.</property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
|
@ -790,55 +534,24 @@
|
|||
<property name="flag">wxLEFT|wxRIGHT|wxTOP|wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxButton" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default">0</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">ID_LIB_PATH_SEL</property>
|
||||
<property name="label">Add</property>
|
||||
<property name="layer"></property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_buttonAddPath</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="position"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="row"></property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
|
@ -878,55 +591,24 @@
|
|||
<property name="flag">wxLEFT|wxRIGHT|wxTOP|wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxButton" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default">0</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_INSERT_PATH</property>
|
||||
<property name="label">Insert</property>
|
||||
<property name="layer"></property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_buttonInsPath</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="position"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="row"></property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
|
@ -966,55 +648,24 @@
|
|||
<property name="flag">wxALL|wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxButton" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default">0</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_REMOVE_PATH</property>
|
||||
<property name="label">Remove</property>
|
||||
<property name="layer"></property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_buttonRemovePath</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="position"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="row"></property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
|
@ -1070,55 +721,24 @@
|
|||
<property name="flag">wxALL|wxEXPAND</property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="wxListBox" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="choices"></property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="layer"></property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size">-1,-1</property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_DefaultLibraryPathslistBox</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="position"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="row"></property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style">wxLB_NEEDED_SB</property>
|
||||
<property name="subclass"></property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip">Paths (system paths and user paths) used to search and load libraries files and component doc files.
Sorted by decreasing priority order.</property>
|
||||
<property name="tooltip">System and user paths used to search and load library files and component doc files.
Sorted by decreasing priority order.</property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
|
@ -1160,53 +780,22 @@
|
|||
<property name="flag">wxEXPAND|wxRIGHT|wxLEFT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticLine" expanded="1">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
<property name="RightDockable">1</property>
|
||||
<property name="TopDockable">1</property>
|
||||
<property name="aui_name"></property>
|
||||
<property name="best_size"></property>
|
||||
<property name="bg"></property>
|
||||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="dock">Dock</property>
|
||||
<property name="dock_fixed">0</property>
|
||||
<property name="docking">Left</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="floatable">1</property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="layer"></property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_staticline3</property>
|
||||
<property name="pane_border">1</property>
|
||||
<property name="pane_position"></property>
|
||||
<property name="pane_size"></property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pin_button">1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="position"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="row"></property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style">wxLI_HORIZONTAL</property>
|
||||
<property name="subclass"></property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Jun 6 2011)
|
||||
// C++ code generated with wxFormBuilder (version Sep 8 2010)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO "NOT" EDIT THIS FILE!
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* @file files-io.cpp
|
||||
* @file eeschema/files-io.cpp
|
||||
*/
|
||||
|
||||
#include "fctsys.h"
|
||||
|
|
|
@ -1,7 +1,3 @@
|
|||
/**
|
||||
* @file class_gerber_draw_item.cpp
|
||||
*/
|
||||
|
||||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
|
@ -26,6 +22,10 @@
|
|||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file class_gerber_draw_item.cpp
|
||||
*/
|
||||
|
||||
#include "fctsys.h"
|
||||
#include "polygons_defs.h"
|
||||
#include "gr_basic.h"
|
||||
|
@ -42,10 +42,8 @@
|
|||
#include "class_GERBER.h"
|
||||
|
||||
|
||||
/**********************************************************/
|
||||
GERBER_DRAW_ITEM::GERBER_DRAW_ITEM( BOARD_ITEM* aParent, GERBER_IMAGE* aGerberparams ) :
|
||||
BOARD_ITEM( aParent, TYPE_GERBER_DRAW_ITEM )
|
||||
/**********************************************************/
|
||||
{
|
||||
m_imageParams = aGerberparams;
|
||||
m_Layer = 0;
|
||||
|
@ -105,15 +103,6 @@ GERBER_DRAW_ITEM* GERBER_DRAW_ITEM::Copy() const
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Function GetABPosition
|
||||
* returns the image position of aPosition for this object.
|
||||
* Image position is the value of aPosition, modified by image parameters:
|
||||
* offsets, axis selection, scale, rotation
|
||||
* @param aXYPosition = position in Y,X gerber axis
|
||||
* @return const wxPoint& - The position in A,B axis.
|
||||
* Because draw axis is top to bottom, the final y coordinates is negated
|
||||
*/
|
||||
wxPoint GERBER_DRAW_ITEM::GetABPosition( const wxPoint& aXYPosition ) const
|
||||
{
|
||||
/* Note: RS274Xrevd_e is obscure about the order of transforms:
|
||||
|
@ -124,10 +113,12 @@ wxPoint GERBER_DRAW_ITEM::GetABPosition( const wxPoint& aXYPosition ) const
|
|||
|
||||
if( m_swapAxis )
|
||||
EXCHG( abPos.x, abPos.y );
|
||||
|
||||
abPos += m_layerOffset + m_imageParams->m_ImageOffset;
|
||||
abPos.x = wxRound( abPos.x * m_drawScale.x );
|
||||
abPos.y = wxRound( abPos.y * m_drawScale.y );
|
||||
int rotation = wxRound(m_lyrRotation*10) + (m_imageParams->m_ImageRotation*10);
|
||||
|
||||
if( rotation )
|
||||
RotatePoint( &abPos, -rotation );
|
||||
|
||||
|
@ -142,52 +133,44 @@ wxPoint GERBER_DRAW_ITEM::GetABPosition( const wxPoint& aXYPosition ) const
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Function GetXYPosition
|
||||
* returns the image position of aPosition for this object.
|
||||
* Image position is the value of aPosition, modified by image parameters:
|
||||
* offsets, axis selection, scale, rotation
|
||||
* @param aABPosition = position in A,B plotter axis
|
||||
* @return const wxPoint - The given position in X,Y axis.
|
||||
*/
|
||||
wxPoint GERBER_DRAW_ITEM::GetXYPosition( const wxPoint& aABPosition )
|
||||
{
|
||||
// do the inverse tranform made by GetABPosition
|
||||
// do the inverse transform made by GetABPosition
|
||||
wxPoint xyPos = aABPosition;
|
||||
|
||||
if( m_mirrorA )
|
||||
NEGATE( xyPos.x );
|
||||
|
||||
if( !m_mirrorB )
|
||||
NEGATE( xyPos.y );
|
||||
|
||||
int rotation = wxRound(m_lyrRotation*10) + (m_imageParams->m_ImageRotation*10);
|
||||
|
||||
if( rotation )
|
||||
RotatePoint( &xyPos, rotation );
|
||||
|
||||
xyPos.x = wxRound( xyPos.x / m_drawScale.x );
|
||||
xyPos.y = wxRound( xyPos.y / m_drawScale.y );
|
||||
xyPos -= m_layerOffset + m_imageParams->m_ImageOffset;
|
||||
|
||||
if( m_swapAxis )
|
||||
EXCHG( xyPos.x, xyPos.y );
|
||||
|
||||
return xyPos - m_imageParams->m_ImageJustifyOffset;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Function SetLayerParameters
|
||||
* Initialize draw parameters from Image and Layer parameters
|
||||
* found in the gerber file:
|
||||
* m_UnitsMetric,
|
||||
* m_MirrorA, m_MirrorB,
|
||||
* m_DrawScale, m_DrawOffset
|
||||
*/
|
||||
void GERBER_DRAW_ITEM::SetLayerParameters()
|
||||
{
|
||||
m_UnitsMetric = m_imageParams->m_GerbMetric;
|
||||
m_swapAxis = m_imageParams->m_SwapAxis; // false if A = X, B = Y;
|
||||
|
||||
// true if A =Y, B = Y
|
||||
m_mirrorA = m_imageParams->m_MirrorA; // true: mirror / axe A
|
||||
m_mirrorB = m_imageParams->m_MirrorB; // true: mirror / axe B
|
||||
m_drawScale = m_imageParams->m_Scale; // A and B scaling factor
|
||||
m_layerOffset = m_imageParams->m_Offset; // Offset from OF command
|
||||
|
||||
// Rotation from RO command:
|
||||
m_lyrRotation = m_imageParams->m_LocalRotation;
|
||||
m_LayerNegative = m_imageParams->GetLayerParams().m_LayerNegative;
|
||||
|
@ -226,8 +209,10 @@ wxString GERBER_DRAW_ITEM::ShowGBRShape()
|
|||
{
|
||||
wxString name = wxT( "apt_macro" );
|
||||
D_CODE* dcode = GetDcodeDescr();
|
||||
|
||||
if( dcode && dcode->GetMacro() )
|
||||
name << wxT(" ") << dcode->GetMacro()->name;
|
||||
|
||||
return name;
|
||||
}
|
||||
|
||||
|
@ -237,11 +222,6 @@ wxString GERBER_DRAW_ITEM::ShowGBRShape()
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Function GetDcodeDescr
|
||||
* returns the GetDcodeDescr of this object, or NULL.
|
||||
* @return D_CODE* - a pointer to the DCode description (for flashed items).
|
||||
*/
|
||||
D_CODE* GERBER_DRAW_ITEM::GetDcodeDescr()
|
||||
{
|
||||
if( (m_DCode < FIRST_DCODE) || (m_DCode > LAST_DCODE) )
|
||||
|
@ -269,11 +249,6 @@ EDA_RECT GERBER_DRAW_ITEM::GetBoundingBox() const
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Function MoveAB
|
||||
* move this object.
|
||||
* @param aMoveVector - the move vector for this object, in AB plotter axis.
|
||||
*/
|
||||
void GERBER_DRAW_ITEM::MoveAB( const wxPoint& aMoveVector )
|
||||
{
|
||||
wxPoint xymove = GetXYPosition( aMoveVector );
|
||||
|
@ -281,44 +256,32 @@ void GERBER_DRAW_ITEM::MoveAB( const wxPoint& aMoveVector )
|
|||
m_Start += xymove;
|
||||
m_End += xymove;
|
||||
m_ArcCentre += xymove;
|
||||
|
||||
for( unsigned ii = 0; ii < m_PolyCorners.size(); ii++ )
|
||||
m_PolyCorners[ii] += xymove;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Function MoveXY
|
||||
* move this object.
|
||||
* @param aMoveVector - the move vector for this object, in XY gerber axis.
|
||||
*/
|
||||
void GERBER_DRAW_ITEM::MoveXY( const wxPoint& aMoveVector )
|
||||
{
|
||||
m_Start += aMoveVector;
|
||||
m_End += aMoveVector;
|
||||
m_ArcCentre += aMoveVector;
|
||||
|
||||
for( unsigned ii = 0; ii < m_PolyCorners.size(); ii++ )
|
||||
m_PolyCorners[ii] += aMoveVector;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Function Save.
|
||||
* currently: no nothing, but must be defined to meet requirements
|
||||
* of the basic class
|
||||
*/
|
||||
bool GERBER_DRAW_ITEM::Save( FILE* aFile ) const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/* Function HasNegativeItems
|
||||
* return true if this item or at least one shape (when using aperture macros)
|
||||
* must be drawn in background color
|
||||
* useful to optimize screen refresh
|
||||
*/
|
||||
bool GERBER_DRAW_ITEM::HasNegativeItems()
|
||||
{
|
||||
bool isClear = m_LayerNegative ^ m_imageParams->m_ImageNegative;
|
||||
|
||||
// if isClear is true, this item has negative shape
|
||||
// but if isClear is true, and if this item use an aperture macro definition,
|
||||
// we must see if this aperture macro uses a negative shape.
|
||||
|
@ -327,11 +290,14 @@ bool GERBER_DRAW_ITEM::HasNegativeItems()
|
|||
|
||||
// see for a macro def
|
||||
D_CODE* dcodeDescr = GetDcodeDescr();
|
||||
|
||||
if( dcodeDescr == NULL )
|
||||
return false;
|
||||
|
||||
if( m_Shape == GBR_SPOT_MACRO )
|
||||
{
|
||||
APERTURE_MACRO* macro = dcodeDescr->GetMacro();
|
||||
|
||||
if( macro ) // macro == NULL should not occurs
|
||||
return macro->HasNegativeItems( this );
|
||||
}
|
||||
|
@ -340,12 +306,11 @@ bool GERBER_DRAW_ITEM::HasNegativeItems()
|
|||
}
|
||||
|
||||
|
||||
/*********************************************************************/
|
||||
void GERBER_DRAW_ITEM::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, int aDrawMode,
|
||||
const wxPoint& aOffset )
|
||||
/*********************************************************************/
|
||||
{
|
||||
static D_CODE dummyD_CODE( 0 ); // used when a D_CODE is not found. default D_CODE to draw a flashed item
|
||||
// used when a D_CODE is not found. default D_CODE to draw a flashed item
|
||||
static D_CODE dummyD_CODE( 0 );
|
||||
int color, alt_color;
|
||||
bool isFilled;
|
||||
int radius;
|
||||
|
@ -362,13 +327,14 @@ void GERBER_DRAW_ITEM::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, int aDrawMode,
|
|||
|
||||
color = brd->GetLayerColor( GetLayer() );
|
||||
|
||||
if( aDrawMode & GR_SURBRILL )
|
||||
if( aDrawMode & GR_HIGHLIGHT )
|
||||
{
|
||||
if( aDrawMode & GR_AND )
|
||||
color &= ~HIGHLIGHT_FLAG;
|
||||
else
|
||||
color |= HIGHLIGHT_FLAG;
|
||||
}
|
||||
|
||||
if( color & HIGHLIGHT_FLAG )
|
||||
color = ColorRefs[color & MASKCOLOR].m_LightColor;
|
||||
|
||||
|
@ -379,6 +345,7 @@ void GERBER_DRAW_ITEM::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, int aDrawMode,
|
|||
* when drawing so that an erasure happens.
|
||||
*/
|
||||
bool isDark = !(m_LayerNegative ^ m_imageParams->m_ImageNegative);
|
||||
|
||||
if( !isDark )
|
||||
{
|
||||
// draw in background color ("negative" color)
|
||||
|
@ -393,8 +360,10 @@ void GERBER_DRAW_ITEM::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, int aDrawMode,
|
|||
{
|
||||
case GBR_POLYGON:
|
||||
isFilled = (g_DisplayPolygonsModeSketch == false);
|
||||
|
||||
if( !isDark )
|
||||
isFilled = true;
|
||||
|
||||
DrawGbrPoly( &aPanel->m_ClipBox, aDC, color, aOffset, isFilled );
|
||||
break;
|
||||
|
||||
|
@ -422,12 +391,14 @@ void GERBER_DRAW_ITEM::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, int aDrawMode,
|
|||
case GBR_ARC:
|
||||
// Currently, arcs plotted with a rectangular aperture are not supported.
|
||||
// a round pen only is expected.
|
||||
|
||||
#if 0 // for arc debug only
|
||||
GRLine( &aPanel->m_ClipBox, aDC, GetABPosition( m_Start ),
|
||||
GetABPosition( m_ArcCentre ), 0, color );
|
||||
GRLine( &aPanel->m_ClipBox, aDC, GetABPosition( m_End ),
|
||||
GetABPosition( m_ArcCentre ), 0, color );
|
||||
#endif
|
||||
|
||||
if( !isFilled )
|
||||
{
|
||||
GRArc1( &aPanel->m_ClipBox, aDC, GetABPosition( m_Start ),
|
||||
|
@ -440,6 +411,7 @@ void GERBER_DRAW_ITEM::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, int aDrawMode,
|
|||
GetABPosition( m_End ), GetABPosition( m_ArcCentre ),
|
||||
m_Size.x, color );
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case GBR_SPOT_CIRCLE:
|
||||
|
@ -462,6 +434,7 @@ void GERBER_DRAW_ITEM::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, int aDrawMode,
|
|||
{
|
||||
if( m_PolyCorners.size() == 0 )
|
||||
ConvertSegmentToPolygon( );
|
||||
|
||||
DrawGbrPoly( &aPanel->m_ClipBox, aDC, color, aOffset, isFilled );
|
||||
}
|
||||
else
|
||||
|
@ -477,26 +450,21 @@ void GERBER_DRAW_ITEM::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, int aDrawMode,
|
|||
GetABPosition( m_End ), m_Size.x, color );
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
if( !show_err )
|
||||
{
|
||||
wxMessageBox( wxT( "Trace_Segment() type error" ) );
|
||||
show_err = TRUE;
|
||||
show_err = true;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Function ConvertSegmentToPolygon
|
||||
* convert a line to an equivalent polygon.
|
||||
* Useful when a line is plotted using a rectangular pen.
|
||||
* In this case, the usual segment plot cannot be used
|
||||
* The equivalent polygon is the area paint by the rectancular pen
|
||||
* from m_Start to m_End.
|
||||
*/
|
||||
|
||||
void GERBER_DRAW_ITEM::ConvertSegmentToPolygon( )
|
||||
{
|
||||
m_PolyCorners.clear();
|
||||
|
@ -504,6 +472,7 @@ void GERBER_DRAW_ITEM::ConvertSegmentToPolygon( )
|
|||
|
||||
wxPoint start = m_Start;
|
||||
wxPoint end = m_End;
|
||||
|
||||
// make calculations more easy if ensure start.x < end.x
|
||||
// (only 2 quadrants to consider)
|
||||
if( start.x > end.x )
|
||||
|
@ -511,14 +480,17 @@ void GERBER_DRAW_ITEM::ConvertSegmentToPolygon( )
|
|||
|
||||
// calculate values relative to start point:
|
||||
wxPoint delta = end - start;
|
||||
|
||||
// calculate corners for the first quadrant only (delta.x and delta.y > 0 )
|
||||
// currently, delta.x already is > 0.
|
||||
// make delta.y > 0
|
||||
bool change = delta.y < 0;
|
||||
|
||||
if( change )
|
||||
NEGATE( delta.y);
|
||||
|
||||
// Now create the full polygon.
|
||||
// Due to previous chnages, the shape is always something like
|
||||
// Due to previous changes, the shape is always something like
|
||||
// 3 4
|
||||
// 2 5
|
||||
// 1 6
|
||||
|
@ -528,15 +500,18 @@ void GERBER_DRAW_ITEM::ConvertSegmentToPolygon( )
|
|||
m_PolyCorners.push_back( corner ); // Lower left corner, start point (1)
|
||||
corner.y += m_Size.y;
|
||||
m_PolyCorners.push_back( corner ); // upper left corner, start point (2)
|
||||
|
||||
if( delta.x || delta.y)
|
||||
{
|
||||
corner += delta;
|
||||
m_PolyCorners.push_back( corner ); // upper left corner, end point (3)
|
||||
}
|
||||
|
||||
corner.x += m_Size.x;
|
||||
m_PolyCorners.push_back( corner ); // upper right corner, end point (4)
|
||||
corner.y -= m_Size.y;
|
||||
m_PolyCorners.push_back( corner ); // lower right corner, end point (5)
|
||||
|
||||
if( delta.x || delta.y )
|
||||
{
|
||||
corner -= delta;
|
||||
|
@ -548,16 +523,12 @@ void GERBER_DRAW_ITEM::ConvertSegmentToPolygon( )
|
|||
{
|
||||
if( change )
|
||||
NEGATE( m_PolyCorners[ii].y);
|
||||
|
||||
m_PolyCorners[ii] += start;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Function DrawGbrPoly
|
||||
* a helper function used id ::Draw to draw the polygon stored in m_PolyCorners
|
||||
* Draw filled polygons
|
||||
*/
|
||||
void GERBER_DRAW_ITEM::DrawGbrPoly( EDA_RECT* aClipBox,
|
||||
wxDC* aDC,
|
||||
int aColor,
|
||||
|
@ -577,13 +548,6 @@ void GERBER_DRAW_ITEM::DrawGbrPoly( EDA_RECT* aClipBox,
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Function DisplayInfo
|
||||
* has knowledge about the frame and how and where to put status information
|
||||
* about this object into the frame's message panel.
|
||||
* Display info about this GERBER item
|
||||
* @param frame A EDA_DRAW_FRAME in which to print status information.
|
||||
*/
|
||||
void GERBER_DRAW_ITEM::DisplayInfo( EDA_DRAW_FRAME* frame )
|
||||
{
|
||||
wxString msg;
|
||||
|
@ -623,18 +587,12 @@ void GERBER_DRAW_ITEM::DisplayInfo( EDA_DRAW_FRAME* frame )
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Function HitTest
|
||||
* tests if the given wxPoint is within the bounds of this object.
|
||||
* @param aRefPos A wxPoint to test in AB axis
|
||||
* @return bool - true if a hit, else false
|
||||
*/
|
||||
bool GERBER_DRAW_ITEM::HitTest( const wxPoint& aRefPos )
|
||||
{
|
||||
// calculate aRefPos in XY gerber axis:
|
||||
wxPoint ref_pos = GetXYPosition( aRefPos );
|
||||
|
||||
// TODO: a better analyse of the shape (perhaps create a D_CODE::HitTest for flashed items)
|
||||
// TODO: a better analyze of the shape (perhaps create a D_CODE::HitTest for flashed items)
|
||||
int radius = MIN( m_Size.x, m_Size.y ) >> 1;
|
||||
|
||||
// delta is a vector from m_Start to m_End (an origin of m_Start)
|
||||
|
@ -645,8 +603,7 @@ bool GERBER_DRAW_ITEM::HitTest( const wxPoint& aRefPos )
|
|||
|
||||
if( m_Flashed )
|
||||
{
|
||||
return (double) dist.x * dist.x + (double) dist.y * dist.y <=
|
||||
(double) radius * radius;
|
||||
return (double) dist.x * dist.x + (double) dist.y * dist.y <= (double) radius * radius;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -658,35 +615,24 @@ bool GERBER_DRAW_ITEM::HitTest( const wxPoint& aRefPos )
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Function HitTest (overlayed)
|
||||
* tests if the given EDA_RECT intersect this object.
|
||||
* For now, an ending point must be inside this rect.
|
||||
* @param aRefArea : the given EDA_RECT in AB plotter axis
|
||||
* @return bool - true if a hit, else false
|
||||
*/
|
||||
bool GERBER_DRAW_ITEM::HitTest( EDA_RECT& aRefArea )
|
||||
{
|
||||
wxPoint pos = GetABPosition( m_Start );
|
||||
|
||||
if( aRefArea.Contains( pos ) )
|
||||
return true;
|
||||
|
||||
pos = GetABPosition( m_End );
|
||||
|
||||
if( aRefArea.Contains( pos ) )
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
#if defined(DEBUG)
|
||||
|
||||
/**
|
||||
* Function Show
|
||||
* is used to output the object tree, currently for debugging only.
|
||||
* @param nestLevel An aid to prettier tree indenting, and is the level
|
||||
* of nesting of this object within the overall tree.
|
||||
* @param os The ostream& to output to.
|
||||
*/
|
||||
void GERBER_DRAW_ITEM::Show( int nestLevel, std::ostream& os )
|
||||
{
|
||||
NestedSpace( nestLevel, os ) << '<' << GetClass().Lower().mb_str() <<
|
||||
|
@ -703,5 +649,4 @@ void GERBER_DRAW_ITEM::Show( int nestLevel, std::ostream& os )
|
|||
os << "</" << GetClass().Lower().mb_str() << ">\n";
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,10 +1,3 @@
|
|||
/**
|
||||
* @file class_gerber_draw_item.h
|
||||
*/
|
||||
|
||||
#ifndef CLASS_GERBER_DRAW_ITEM_H
|
||||
#define CLASS_GERBER_DRAW_ITEM_H
|
||||
|
||||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
|
@ -29,10 +22,20 @@
|
|||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file class_gerber_draw_item.h
|
||||
*/
|
||||
|
||||
#ifndef CLASS_GERBER_DRAW_ITEM_H
|
||||
#define CLASS_GERBER_DRAW_ITEM_H
|
||||
|
||||
#include "base_struct.h"
|
||||
#include "class_board_item.h"
|
||||
|
||||
|
||||
class GERBER_IMAGE;
|
||||
|
||||
|
||||
/* Shapes id for basic shapes ( .m_Shape member ) */
|
||||
enum Gbr_Basic_Shapes {
|
||||
GBR_SEGMENT = 0, // usual segment : line with rounded ends
|
||||
|
@ -42,7 +45,7 @@ enum Gbr_Basic_Shapes {
|
|||
GBR_SPOT_CIRCLE, // flashed shape: round shape (can have hole)
|
||||
GBR_SPOT_RECT, // flashed shape: rectangular shape can have hole)
|
||||
GBR_SPOT_OVAL, // flashed shape: oval shape
|
||||
GBR_SPOT_POLY, // flashed shape: regulat polygon, 3 to 12 edges
|
||||
GBR_SPOT_POLY, // flashed shape: regular polygon, 3 to 12 edges
|
||||
GBR_SPOT_MACRO, // complex shape described by a macro
|
||||
GBR_LAST // last value for this list
|
||||
};
|
||||
|
@ -59,8 +62,8 @@ private:
|
|||
|
||||
|
||||
public:
|
||||
bool m_UnitsMetric; /* store here the gerber units (inch/mm).
|
||||
* Used only to calculate aperture macros shapes sizes */
|
||||
bool m_UnitsMetric; /* store here the gerber units (inch/mm). Used
|
||||
* only to calculate aperture macros shapes sizes */
|
||||
int m_Shape; // Shape and type of this gerber item
|
||||
wxPoint m_Start; // Line or arc start point or position of the shape
|
||||
// for flashed items
|
||||
|
@ -77,16 +80,16 @@ public:
|
|||
// values 0 to 9 can be used for special purposes
|
||||
GERBER_IMAGE* m_imageParams; /* main GERBER info for this item
|
||||
* Note: some params stored in this class are common
|
||||
* to the whole gerber file (i.e) the whole graphic layer
|
||||
* and some can change when reaging the file, so they
|
||||
* are stored inside this item
|
||||
* there is no redundancy for these parameters
|
||||
* to the whole gerber file (i.e) the whole graphic
|
||||
* layer and some can change when reaging the file,
|
||||
* so they are stored inside this item there is no
|
||||
* redundancy for these parameters
|
||||
*/
|
||||
private:
|
||||
// These values are used to draw this item, according to gerber layers parameters
|
||||
// Because they can change inside a gerber image, thery are stored here
|
||||
// Because they can change inside a gerber image, they are stored here
|
||||
// for each item
|
||||
bool m_LayerNegative; // TRUE = item in negative Layer
|
||||
bool m_LayerNegative; // true = item in negative Layer
|
||||
bool m_swapAxis; // false if A = X, B = Y; true if A =Y, B = Y
|
||||
bool m_mirrorA; // true: mirror / axe A
|
||||
bool m_mirrorB; // true: mirror / axe B
|
||||
|
@ -244,7 +247,7 @@ public:
|
|||
bool HitTest( const wxPoint& aRefPos );
|
||||
|
||||
/**
|
||||
* Function HitTest (overlayed)
|
||||
* Function HitTest (overloaded)
|
||||
* tests if the given wxRect intersect this object.
|
||||
* For now, an ending point must be inside this rect.
|
||||
* @param aRefArea a wxPoint to test
|
||||
|
@ -263,6 +266,11 @@ public:
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Function Save.
|
||||
* currently: no nothing, but must be defined to meet requirements
|
||||
* of the basic class
|
||||
*/
|
||||
bool Save( FILE* aFile ) const;
|
||||
|
||||
#if defined(DEBUG)
|
||||
|
|
|
@ -1,6 +1,32 @@
|
|||
/***************************/
|
||||
/**** class D_CODE ****/
|
||||
/***************************/
|
||||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2009 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com
|
||||
* Copyright (C) 2011 Wayne Stambaugh <stambaughw@verizon.net>
|
||||
* Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.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
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file dcode.cpp
|
||||
* @brief D_CODE class implementation
|
||||
*/
|
||||
|
||||
#include "fctsys.h"
|
||||
#include "common.h"
|
||||
|
@ -27,7 +53,7 @@
|
|||
* D02 = light extinction (pen up) while moving
|
||||
* D03 = Flash
|
||||
* D04 to D09 = non used
|
||||
* D10 ... D999 = Indentification Tool (Shape id)
|
||||
* D10 ... D999 = Identification Tool (Shape id)
|
||||
*
|
||||
* For tools defining a shape):
|
||||
* DCode min = D10
|
||||
|
@ -96,16 +122,6 @@ const wxChar* D_CODE::ShowApertureType( APERTURE_T aType )
|
|||
return ret;
|
||||
}
|
||||
|
||||
/** GetShapeDim
|
||||
* Calculate a value that can be used to evaluate the size of text
|
||||
* when displaying the D-Code of an item
|
||||
* due to the complexity of some shapes,
|
||||
* one cannot calculate the "size" of a shape (only a bounding box)
|
||||
* but here, the "dimension" of the shape is the diameter of the primitive
|
||||
* or for lines the width of the line if the shape is a line
|
||||
* @param aParent = the parent GERBER_DRAW_ITEM which is actually drawn
|
||||
* @return a dimension, or -1 if no dim to calculate
|
||||
*/
|
||||
int D_CODE::GetShapeDim( GERBER_DRAW_ITEM* aParent )
|
||||
{
|
||||
int dim = -1;
|
||||
|
@ -137,17 +153,6 @@ int D_CODE::GetShapeDim( GERBER_DRAW_ITEM* aParent )
|
|||
}
|
||||
|
||||
|
||||
/*
|
||||
* Function ReadDCodeDefinitionFile
|
||||
* Can be useful only with old RS274D Gerber file format.
|
||||
* Is not needed with RS274X files format.
|
||||
* These files need an auxiliary DCode file description. There is no defined file format for this.
|
||||
* This function read a file format I needed a long time ago.
|
||||
* reads in a dcode file assuming ALSPCB file format with ';' indicating comments.
|
||||
* Format is like CSV but with optional ';' delineated comments:
|
||||
* tool, Horiz, Vert, drill, speed, accel. ,Type ; [DCODE (commentaire)]
|
||||
* ex: 1, 12, 12, 0, 0, 0, 3 ; D10
|
||||
*/
|
||||
int GERBVIEW_FRAME::ReadDCodeDefinitionFile( const wxString& D_Code_FullFileName )
|
||||
{
|
||||
int current_Dcode, ii, dcode_scale;
|
||||
|
@ -200,11 +205,12 @@ int GERBVIEW_FRAME::ReadDCodeDefinitionFile( const wxString& D_Code_FullFileName
|
|||
/* Determine of the type of file from D_Code. */
|
||||
ptcar = line;
|
||||
ii = 0;
|
||||
|
||||
while( *ptcar )
|
||||
if( *(ptcar++) == ',' )
|
||||
ii++;
|
||||
|
||||
if( ii >= 6 ) /* valeurs en mils */
|
||||
if( ii >= 6 ) /* value in mils */
|
||||
{
|
||||
sscanf( line, "%d,%d,%d,%d,%d,%d,%d", &ii,
|
||||
&dimH, &dimV, &drill, &dummy, &dummy, &type_outil );
|
||||
|
@ -212,8 +218,10 @@ int GERBVIEW_FRAME::ReadDCodeDefinitionFile( const wxString& D_Code_FullFileName
|
|||
dimH = wxRound( dimH * dcode_scale );
|
||||
dimV = wxRound( dimV * dcode_scale );
|
||||
drill = wxRound( drill * dcode_scale );
|
||||
|
||||
if( ii < 1 )
|
||||
ii = 1;
|
||||
|
||||
current_Dcode = ii - 1 + FIRST_DCODE;
|
||||
}
|
||||
else /* Values in inches are converted to mils. */
|
||||
|
@ -223,6 +231,7 @@ int GERBVIEW_FRAME::ReadDCodeDefinitionFile( const wxString& D_Code_FullFileName
|
|||
|
||||
sscanf( line, "%f,%f,%1s", &fdimV, &fdimH, c_type_outil );
|
||||
ptcar = line;
|
||||
|
||||
while( *ptcar )
|
||||
{
|
||||
if( *ptcar == 'D' )
|
||||
|
@ -231,15 +240,19 @@ int GERBVIEW_FRAME::ReadDCodeDefinitionFile( const wxString& D_Code_FullFileName
|
|||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
ptcar++;
|
||||
}
|
||||
}
|
||||
|
||||
dimH = wxRound( fdimH * dcode_scale * 1000 );
|
||||
dimV = wxRound( fdimV * dcode_scale * 1000 );
|
||||
drill = wxRound( fdrill * dcode_scale * 1000 );
|
||||
|
||||
if( strchr( "CLROP", c_type_outil[0] ) )
|
||||
{
|
||||
type_outil = (APERTURE_T) c_type_outil[0];
|
||||
}
|
||||
else
|
||||
{
|
||||
fclose( dest );
|
||||
|
@ -247,7 +260,7 @@ int GERBVIEW_FRAME::ReadDCodeDefinitionFile( const wxString& D_Code_FullFileName
|
|||
}
|
||||
}
|
||||
|
||||
/* Update the list of d_codes if consistant. */
|
||||
/* Update the list of d_codes if consistent. */
|
||||
if( current_Dcode < FIRST_DCODE )
|
||||
continue;
|
||||
|
||||
|
@ -259,7 +272,7 @@ int GERBVIEW_FRAME::ReadDCodeDefinitionFile( const wxString& D_Code_FullFileName
|
|||
dcode->m_Size.y = dimV;
|
||||
dcode->m_Shape = (APERTURE_T) type_outil;
|
||||
dcode->m_Drill.x = dcode->m_Drill.y = drill;
|
||||
dcode->m_Defined = TRUE;
|
||||
dcode->m_Defined = true;
|
||||
}
|
||||
|
||||
fclose( dest );
|
||||
|
@ -268,8 +281,6 @@ int GERBVIEW_FRAME::ReadDCodeDefinitionFile( const wxString& D_Code_FullFileName
|
|||
}
|
||||
|
||||
|
||||
/* Set Size Items (Lines, Flashes) from DCodes List
|
||||
*/
|
||||
void GERBVIEW_FRAME::CopyDCodesSizeToItems()
|
||||
{
|
||||
static D_CODE dummy( 999 ); //Used if D_CODE not found in list
|
||||
|
@ -284,9 +295,10 @@ void GERBVIEW_FRAME::CopyDCodesSizeToItems()
|
|||
if( dcode == NULL )
|
||||
dcode = &dummy;
|
||||
|
||||
dcode->m_InUse = TRUE;
|
||||
dcode->m_InUse = true;
|
||||
|
||||
gerb_item->m_Size = dcode->m_Size;
|
||||
|
||||
if( // Line Item
|
||||
(gerb_item->m_Shape == GBR_SEGMENT ) /* rectilinear segment */
|
||||
|| (gerb_item->m_Shape == GBR_ARC ) /* segment arc (rounded tips) */
|
||||
|
@ -327,11 +339,6 @@ void GERBVIEW_FRAME::CopyDCodesSizeToItems()
|
|||
}
|
||||
|
||||
|
||||
/*
|
||||
* Function DrawFlashedShape
|
||||
* Draw the dcode shape for flashed items.
|
||||
* When an item is flashed, the DCode shape is the shape of the item
|
||||
*/
|
||||
void D_CODE::DrawFlashedShape( GERBER_DRAW_ITEM* aParent,
|
||||
EDA_RECT* aClipBox, wxDC* aDC, int aColor, int aAltColor,
|
||||
wxPoint aShapePos, bool aFilledShape )
|
||||
|
@ -348,12 +355,13 @@ void D_CODE::DrawFlashedShape( GERBER_DRAW_ITEM* aParent,
|
|||
case APT_CIRCLE:
|
||||
radius = m_Size.x >> 1;
|
||||
if( !aFilledShape )
|
||||
GRCircle( aClipBox, aDC, aParent->GetABPosition(aShapePos),
|
||||
radius, 0, aColor );
|
||||
GRCircle( aClipBox, aDC, aParent->GetABPosition(aShapePos), radius, 0, aColor );
|
||||
else
|
||||
if( m_DrillShape == APT_DEF_NO_HOLE )
|
||||
{
|
||||
GRFilledCircle( aClipBox, aDC, aParent->GetABPosition(aShapePos),
|
||||
radius, aColor );
|
||||
}
|
||||
else if( APT_DEF_ROUND_HOLE == 1 ) // round hole in shape
|
||||
{
|
||||
int width = (m_Size.x - m_Drill.x ) / 2;
|
||||
|
@ -364,6 +372,7 @@ void D_CODE::DrawFlashedShape( GERBER_DRAW_ITEM* aParent,
|
|||
{
|
||||
if( m_PolyCorners.size() == 0 )
|
||||
ConvertShapeToPolygon();
|
||||
|
||||
DrawFlashedPolygon( aParent, aClipBox, aDC, aColor, aFilledShape, aShapePos );
|
||||
}
|
||||
break;
|
||||
|
@ -376,20 +385,20 @@ void D_CODE::DrawFlashedShape( GERBER_DRAW_ITEM* aParent,
|
|||
wxPoint end = start + m_Size;
|
||||
start = aParent->GetABPosition( start );
|
||||
end = aParent->GetABPosition( end );
|
||||
|
||||
if( !aFilledShape )
|
||||
{
|
||||
GRRect( aClipBox, aDC, start.x, start.y, end.x, end.y,
|
||||
0, aColor );
|
||||
GRRect( aClipBox, aDC, start.x, start.y, end.x, end.y, 0, aColor );
|
||||
}
|
||||
else if( m_DrillShape == APT_DEF_NO_HOLE )
|
||||
{
|
||||
GRFilledRect( aClipBox, aDC, start.x, start.y, end.x, end.y,
|
||||
0, aColor, aColor );
|
||||
GRFilledRect( aClipBox, aDC, start.x, start.y, end.x, end.y, 0, aColor, aColor );
|
||||
}
|
||||
else
|
||||
{
|
||||
if( m_PolyCorners.size() == 0 )
|
||||
ConvertShapeToPolygon();
|
||||
|
||||
DrawFlashedPolygon( aParent, aClipBox, aDC, aColor, aFilledShape, aShapePos );
|
||||
}
|
||||
}
|
||||
|
@ -399,6 +408,7 @@ void D_CODE::DrawFlashedShape( GERBER_DRAW_ITEM* aParent,
|
|||
{
|
||||
wxPoint start = aShapePos;
|
||||
wxPoint end = aShapePos;
|
||||
|
||||
if( m_Size.x > m_Size.y ) // horizontal oval
|
||||
{
|
||||
int delta = (m_Size.x - m_Size.y) / 2;
|
||||
|
@ -413,22 +423,23 @@ void D_CODE::DrawFlashedShape( GERBER_DRAW_ITEM* aParent,
|
|||
end.y += delta;
|
||||
radius = m_Size.x;
|
||||
}
|
||||
|
||||
start = aParent->GetABPosition( start );
|
||||
end = aParent->GetABPosition( end );
|
||||
|
||||
if( !aFilledShape )
|
||||
{
|
||||
GRCSegm( aClipBox, aDC, start.x, start.y,
|
||||
end.x, end.y, radius, aColor );
|
||||
GRCSegm( aClipBox, aDC, start.x, start.y, end.x, end.y, radius, aColor );
|
||||
}
|
||||
else if( m_DrillShape == APT_DEF_NO_HOLE )
|
||||
{
|
||||
GRFillCSegm( aClipBox, aDC, start.x,
|
||||
start.y, end.x, end.y, radius, aColor );
|
||||
GRFillCSegm( aClipBox, aDC, start.x, start.y, end.x, end.y, radius, aColor );
|
||||
}
|
||||
else
|
||||
{
|
||||
if( m_PolyCorners.size() == 0 )
|
||||
ConvertShapeToPolygon();
|
||||
|
||||
DrawFlashedPolygon( aParent, aClipBox, aDC, aColor, aFilledShape, aShapePos );
|
||||
}
|
||||
}
|
||||
|
@ -437,19 +448,13 @@ void D_CODE::DrawFlashedShape( GERBER_DRAW_ITEM* aParent,
|
|||
case APT_POLYGON:
|
||||
if( m_PolyCorners.size() == 0 )
|
||||
ConvertShapeToPolygon();
|
||||
|
||||
DrawFlashedPolygon( aParent, aClipBox, aDC, aColor, aFilledShape, aShapePos );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Function DrawFlashedPolygon
|
||||
* a helper function used id ::Draw to draw the polygon stored ion m_PolyCorners
|
||||
* Draw some Apertures shapes when they are defined as filled polygons.
|
||||
* APT_POLYGON is always a polygon, but some complex shapes are also converted to
|
||||
* polygons (shapes with holes)
|
||||
*/
|
||||
void D_CODE::DrawFlashedPolygon( GERBER_DRAW_ITEM* aParent,
|
||||
EDA_RECT* aClipBox, wxDC* aDC,
|
||||
int aColor, bool aFilled,
|
||||
|
@ -460,6 +465,7 @@ void D_CODE::DrawFlashedPolygon( GERBER_DRAW_ITEM* aParent,
|
|||
|
||||
std::vector<wxPoint> points;
|
||||
points = m_PolyCorners;
|
||||
|
||||
for( unsigned ii = 0; ii < points.size(); ii++ )
|
||||
{
|
||||
points[ii] += aPosition;
|
||||
|
@ -472,20 +478,14 @@ void D_CODE::DrawFlashedPolygon( GERBER_DRAW_ITEM* aParent,
|
|||
|
||||
#define SEGS_CNT 32 // number of segments to approximate a circle
|
||||
|
||||
// A helper function for D_CODE::ConvertShapeToPolygon().
|
||||
// Add a hole to a polygon
|
||||
|
||||
// A helper function for D_CODE::ConvertShapeToPolygon(). Add a hole to a polygon
|
||||
static void addHoleToPolygon( std::vector<wxPoint>& aBuffer,
|
||||
APERTURE_DEF_HOLETYPE aHoleShape,
|
||||
wxSize aSize,
|
||||
wxPoint aAnchorPos );
|
||||
|
||||
/**
|
||||
* Function ConvertShapeToPolygon
|
||||
* convert a shape to an equivalent polygon.
|
||||
* Arcs and circles are approximated by segments
|
||||
* Useful when a shape is not a graphic primitive (shape with hole,
|
||||
* Rotated shape ... ) and cannot be easily drawn.
|
||||
*/
|
||||
|
||||
void D_CODE::ConvertShapeToPolygon()
|
||||
{
|
||||
wxPoint initialpos;
|
||||
|
@ -498,6 +498,7 @@ void D_CODE::ConvertShapeToPolygon()
|
|||
case APT_CIRCLE: // creates only a circle with rectangular hole
|
||||
currpos.x = m_Size.x >> 1;
|
||||
initialpos = currpos;
|
||||
|
||||
for( unsigned ii = 0; ii <= SEGS_CNT; ii++ )
|
||||
{
|
||||
currpos = initialpos;
|
||||
|
@ -540,12 +541,14 @@ void D_CODE::ConvertShapeToPolygon()
|
|||
delta = (m_Size.y - m_Size.x) / 2;
|
||||
radius = m_Size.x / 2;
|
||||
}
|
||||
|
||||
currpos.y = radius;
|
||||
initialpos = currpos;
|
||||
m_PolyCorners.push_back( currpos );
|
||||
|
||||
// build the right arc of the shape
|
||||
unsigned ii = 0;
|
||||
|
||||
for( ; ii <= SEGS_CNT / 2; ii++ )
|
||||
{
|
||||
currpos = initialpos;
|
||||
|
@ -564,6 +567,7 @@ void D_CODE::ConvertShapeToPolygon()
|
|||
}
|
||||
|
||||
m_PolyCorners.push_back( initialpos ); // close outline
|
||||
|
||||
if( m_Size.y > m_Size.x ) // vertical oval, rotate polygon.
|
||||
{
|
||||
for( unsigned jj = 0; jj < m_PolyCorners.size(); jj++ )
|
||||
|
@ -581,8 +585,10 @@ void D_CODE::ConvertShapeToPolygon()
|
|||
// rs274x said: m_EdgesCount = 3 ... 12
|
||||
if( m_EdgesCount < 3 )
|
||||
m_EdgesCount = 3;
|
||||
|
||||
if( m_EdgesCount > 12 )
|
||||
m_EdgesCount = 12;
|
||||
|
||||
for( int ii = 0; ii <= m_EdgesCount; ii++ )
|
||||
{
|
||||
currpos = initialpos;
|
||||
|
@ -591,14 +597,17 @@ void D_CODE::ConvertShapeToPolygon()
|
|||
}
|
||||
|
||||
addHoleToPolygon( m_PolyCorners, m_DrillShape, m_Drill, initialpos );
|
||||
|
||||
if( m_Rotation ) // vertical oval, rotate polygon.
|
||||
{
|
||||
int angle = wxRound( m_Rotation * 10 );
|
||||
|
||||
for( unsigned jj = 0; jj < m_PolyCorners.size(); jj++ )
|
||||
{
|
||||
RotatePoint( &m_PolyCorners[jj], -angle );
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case APT_MACRO:
|
||||
|
@ -630,6 +639,7 @@ static void addHoleToPolygon( std::vector<wxPoint>& aBuffer,
|
|||
|
||||
aBuffer.push_back( aAnchorPos ); // link to outline
|
||||
}
|
||||
|
||||
if( aHoleShape == APT_DEF_RECT_HOLE ) // Create rectangular hole
|
||||
{
|
||||
currpos.x = aSize.x / 2;
|
||||
|
|
|
@ -1,7 +1,3 @@
|
|||
/**
|
||||
* @file dcode.h
|
||||
*/
|
||||
|
||||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
|
@ -27,15 +23,21 @@
|
|||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file dcode.h
|
||||
*/
|
||||
|
||||
#ifndef _DCODE_H_
|
||||
#define _DCODE_H_
|
||||
|
||||
#include <vector>
|
||||
//#include <set>
|
||||
|
||||
#include "base_struct.h"
|
||||
|
||||
|
||||
class GERBER_DRAW_ITEM;
|
||||
|
||||
|
||||
/**
|
||||
* Enum APERTURE_T
|
||||
* is the set of all gerber aperture types allowed, according to page 16 of
|
||||
|
@ -51,7 +53,7 @@ enum APERTURE_T {
|
|||
};
|
||||
|
||||
// In aperture definition, round, oval and rectangular flashed shapes
|
||||
// can have a hole (ropund or rectangular)
|
||||
// can have a hole (round or rectangular)
|
||||
// this option is stored in .m_DrillShape D_CODE member
|
||||
enum APERTURE_DEF_HOLETYPE {
|
||||
APT_DEF_NO_HOLE = 0,
|
||||
|
@ -60,7 +62,7 @@ enum APERTURE_DEF_HOLETYPE {
|
|||
};
|
||||
|
||||
/* define min and max values for D Codes values.
|
||||
* note: values >= 0 and > FIRST_DCODE can be used for specila purposes
|
||||
* note: values >= 0 and > FIRST_DCODE can be used for special purposes
|
||||
*/
|
||||
#define FIRST_DCODE 10
|
||||
#define LAST_DCODE 999
|
||||
|
@ -163,9 +165,10 @@ public:
|
|||
* @param aClipBox = DC clip box (NULL is no clip)
|
||||
* @param aDC = device context
|
||||
* @param aColor = the normal color to use
|
||||
* @param aAltColor = the color used to draw with "reverse" exposure mode (used in aperture macros only)
|
||||
* @param aAltColor = the color used to draw with "reverse" exposure mode (used in
|
||||
* aperture macros only)
|
||||
* @param aShapePos = the actual shape position
|
||||
* @param aFilledShape = true to draw in filled mode, false to draw in skecth mode
|
||||
* @param aFilledShape = true to draw in filled mode, false to draw in sketch mode
|
||||
*/
|
||||
void DrawFlashedShape( GERBER_DRAW_ITEM* aParent, EDA_RECT* aClipBox,
|
||||
wxDC* aDC, int aColor, int aAltColor,
|
||||
|
@ -181,7 +184,7 @@ public:
|
|||
* @param aClipBox = DC clip box (NULL is no clip)
|
||||
* @param aDC = device context
|
||||
* @param aColor = the normal color to use
|
||||
* @param aFilled = true to draw in filled mode, false to draw in skecth mode
|
||||
* @param aFilled = true to draw in filled mode, false to draw in sketch mode
|
||||
* @param aPosition = the actual shape position
|
||||
*/
|
||||
void DrawFlashedPolygon( GERBER_DRAW_ITEM* aParent,
|
||||
|
@ -197,8 +200,9 @@ public:
|
|||
*/
|
||||
void ConvertShapeToPolygon();
|
||||
|
||||
/** GetShapeDim
|
||||
* Calculate a value that can be used to evaluate the size of text
|
||||
/**
|
||||
* Function GetShapeDim
|
||||
* calculates a value that can be used to evaluate the size of text
|
||||
* when displaying the D-Code of an item
|
||||
* due to the complexity of some shapes,
|
||||
* one cannot calculate the "size" of a shape (only a bounding box)
|
||||
|
|
|
@ -1,11 +1,33 @@
|
|||
/****************/
|
||||
/* tracepcb.cpp */
|
||||
/****************/
|
||||
|
||||
/*
|
||||
* Redraw the screen.
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2009 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com
|
||||
* Copyright (C) 2011 Wayne Stambaugh <stambaughw@verizon.net>
|
||||
* Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.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
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file draw_gerber_screen.cpp
|
||||
*/
|
||||
|
||||
|
||||
#include "fctsys.h"
|
||||
#include "gr_basic.h"
|
||||
#include "common.h"
|
||||
|
@ -19,19 +41,10 @@
|
|||
#include "class_GERBER.h"
|
||||
|
||||
|
||||
/**
|
||||
* Function PrintPage (virtual)
|
||||
* Used to print the board (on printer, or when creating SVF files).
|
||||
* Print the board, but only layers allowed by aPrintMaskLayer
|
||||
* @param aDC = the print device context
|
||||
* @param aPrintMasklayer = a 32 bits mask: bit n = 1 -> layer n is printed
|
||||
* @param aPrintMirrorMode = true to plot mirrored
|
||||
* @param aData = a pointer to an optional data (not used here: can be NULL)
|
||||
*/
|
||||
void GERBVIEW_FRAME::PrintPage( wxDC* aDC, int aPrintMasklayer,
|
||||
bool aPrintMirrorMode, void* aData )
|
||||
{
|
||||
// Save current draw options, because print mode has specfic options:
|
||||
// Save current draw options, because print mode has specific options:
|
||||
int DisplayPolygonsModeImg = g_DisplayPolygonsModeSketch;
|
||||
int visiblemask = GetBoard()->GetVisibleLayers();
|
||||
DISPLAY_OPTIONS save_opt = DisplayOpt;
|
||||
|
@ -56,8 +69,6 @@ void GERBVIEW_FRAME::PrintPage( wxDC* aDC, int aPrintMasklayer,
|
|||
}
|
||||
|
||||
|
||||
/* Redraws the full screen, including axis and grid
|
||||
*/
|
||||
void GERBVIEW_FRAME::RedrawActiveWindow( wxDC* DC, bool EraseBg )
|
||||
{
|
||||
PCB_SCREEN* screen = (PCB_SCREEN*) GetScreen();
|
||||
|
@ -88,7 +99,7 @@ void GERBVIEW_FRAME::RedrawActiveWindow( wxDC* DC, bool EraseBg )
|
|||
GetBoard()->Draw( DrawPanel, DC, drawMode, wxPoint( 0, 0 ) );
|
||||
|
||||
// Draw the "background" now, i.e. grid and axis after gerber layers
|
||||
// because most of time the actual background is erased by succesive drawings of each gerber
|
||||
// because most of time the actual background is erased by successive drawings of each gerber
|
||||
// layer mainly in COPY mode
|
||||
DrawPanel->DrawBackGround( DC );
|
||||
|
||||
|
@ -115,10 +126,10 @@ void BOARD::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, int aDrawMode, const wxPoin
|
|||
{
|
||||
// Because Images can be negative (i.e with background filled in color) items are drawn
|
||||
// graphic layer per graphic layer, after the background is filled
|
||||
// to a temporary biumap
|
||||
// to a temporary bitmap
|
||||
// at least when aDrawMode = GR_COPY or aDrawMode = GR_OR
|
||||
// If aDrawMode = -1, items are drawn to the main screen, and therefore
|
||||
// arfefacts can happen with negative items or negative images
|
||||
// artifacts can happen with negative items or negative images
|
||||
|
||||
wxColour bgColor = MakeColour( g_DrawBgColor );
|
||||
wxBrush bgBrush( bgColor, wxSOLID );
|
||||
|
@ -136,9 +147,10 @@ void BOARD::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, int aDrawMode, const wxPoin
|
|||
// When each image must be drawn using GR_OR (transparency mode)
|
||||
// or GR_COPY (stacked mode) we must use a temporary bitmap
|
||||
// to draw gerber images.
|
||||
// this is due to negative objects (drawn using background color) that create artefacct
|
||||
// this is due to negative objects (drawn using background color) that create artifacts
|
||||
// on other images when drawn on screen
|
||||
bool useBufferBitmap = false;
|
||||
|
||||
if( (aDrawMode == GR_COPY) || ( aDrawMode == GR_OR ) )
|
||||
useBufferBitmap = true;
|
||||
|
||||
|
@ -170,12 +182,14 @@ void BOARD::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, int aDrawMode, const wxPoin
|
|||
plotDC = &layerDC;
|
||||
}
|
||||
|
||||
bool doBlit = false; // this flag requests an image transfert to actual screen when true.
|
||||
bool doBlit = false; // this flag requests an image transfer to actual screen when true.
|
||||
|
||||
bool end = false;
|
||||
|
||||
for( int layer = 0; !end; layer++ )
|
||||
{
|
||||
int active_layer = ( (GERBVIEW_FRAME*) m_PcbFrame )->getActiveLayer();
|
||||
|
||||
if( layer == active_layer ) // active layer will be drawn after other layers
|
||||
continue;
|
||||
|
||||
|
@ -199,12 +213,13 @@ void BOARD::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, int aDrawMode, const wxPoin
|
|||
// layers are drawn in background color.
|
||||
if( gerber->HasNegativeItems() && doBlit )
|
||||
{
|
||||
// Set Device orgin, logical origin and scale to default values
|
||||
// Set Device origin, logical origin and scale to default values
|
||||
// This is needed by Blit function when using a mask.
|
||||
// Beside, for Blit call, both layerDC and screenDc must have the same settings
|
||||
layerDC.SetDeviceOrigin(0,0);
|
||||
layerDC.SetLogicalOrigin( 0, 0 );
|
||||
layerDC.SetUserScale( 1, 1 );
|
||||
|
||||
if( aDrawMode == GR_COPY )
|
||||
{
|
||||
// Use the layer bitmap itself as a mask when blitting. The bitmap
|
||||
|
@ -212,22 +227,20 @@ void BOARD::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, int aDrawMode, const wxPoin
|
|||
layerDC.SelectObject( wxNullBitmap );
|
||||
layerBitmap->SetMask( new wxMask( *layerBitmap, bgColor ) );
|
||||
layerDC.SelectObject( *layerBitmap );
|
||||
screenDC.Blit( 0, 0, bitmapWidth, bitmapHeight,
|
||||
&layerDC, 0, 0, wxCOPY, true );
|
||||
screenDC.Blit( 0, 0, bitmapWidth, bitmapHeight, &layerDC, 0, 0, wxCOPY, true );
|
||||
}
|
||||
else if( aDrawMode == GR_OR )
|
||||
{
|
||||
// On Linux with a large screen, this version is much faster and without
|
||||
// flicker, but gives a Pcbnew look where layer colors blend together.
|
||||
// Plus it works only because the background color is black. But it may
|
||||
// be more useable for some. The difference is due in part because of
|
||||
// be more usable for some. The difference is due in part because of
|
||||
// the cpu cycles needed to create the monochromatic bitmap above, and
|
||||
// the extra time needed to do bit indexing into the monochromatic bitmap
|
||||
// on the blit above.
|
||||
screenDC.Blit( 0, 0, bitmapWidth, bitmapHeight,
|
||||
&layerDC, 0, 0, wxOR );
|
||||
screenDC.Blit( 0, 0, bitmapWidth, bitmapHeight, &layerDC, 0, 0, wxOR );
|
||||
}
|
||||
// Restore actual values and clear bitmpap for next drawing
|
||||
// Restore actual values and clear bitmap for next drawing
|
||||
layerDC.SetDeviceOrigin( dev_org.x, dev_org.y );
|
||||
layerDC.SetLogicalOrigin( logical_org.x, logical_org.y );
|
||||
layerDC.SetUserScale( scale, scale );
|
||||
|
@ -276,7 +289,8 @@ void BOARD::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, int aDrawMode, const wxPoin
|
|||
int drawMode = layerdrawMode;
|
||||
|
||||
if( dcode_highlight && dcode_highlight == gerb_item->m_DCode )
|
||||
drawMode |= GR_SURBRILL;
|
||||
drawMode |= GR_HIGHLIGHT;
|
||||
|
||||
gerb_item->Draw( aPanel, plotDC, drawMode );
|
||||
doBlit = true;
|
||||
}
|
||||
|
@ -285,40 +299,38 @@ void BOARD::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, int aDrawMode, const wxPoin
|
|||
if( doBlit && useBufferBitmap ) // Blit is used only if aDrawMode >= 0
|
||||
{
|
||||
// For this Blit call, layerDC and screenDC must have the same settings
|
||||
// So we set device orgin, logical origin and scale to default values
|
||||
// So we set device origin, logical origin and scale to default values
|
||||
// in layerDC
|
||||
layerDC.SetDeviceOrigin(0,0);
|
||||
layerDC.SetLogicalOrigin( 0, 0 );
|
||||
layerDC.SetUserScale( 1, 1 );
|
||||
// this is the last transfert to screenDC. If there are no negative items, this is
|
||||
|
||||
// this is the last transfer to screenDC. If there are no negative items, this is
|
||||
// the only one
|
||||
if( aDrawMode == GR_COPY )
|
||||
{
|
||||
layerDC.SelectObject( wxNullBitmap );
|
||||
layerBitmap->SetMask( new wxMask( *layerBitmap, bgColor ) );
|
||||
layerDC.SelectObject( *layerBitmap );
|
||||
screenDC.Blit( 0, 0, bitmapWidth, bitmapHeight,
|
||||
&layerDC, 0, 0, wxCOPY, true );
|
||||
screenDC.Blit( 0, 0, bitmapWidth, bitmapHeight, &layerDC, 0, 0, wxCOPY, true );
|
||||
|
||||
}
|
||||
else if( aDrawMode == GR_OR )
|
||||
{
|
||||
screenDC.Blit( 0, 0, bitmapWidth, bitmapHeight,
|
||||
&layerDC, 0, 0, wxOR );
|
||||
screenDC.Blit( 0, 0, bitmapWidth, bitmapHeight, &layerDC, 0, 0, wxOR );
|
||||
}
|
||||
}
|
||||
|
||||
if( useBufferBitmap )
|
||||
{
|
||||
// For this Blit call, aDC and screenDC must have the same settings
|
||||
// So we set device orgin, logical origin and scale to default values
|
||||
// So we set device origin, logical origin and scale to default values
|
||||
// in aDC
|
||||
aDC->SetDeviceOrigin( 0, 0);
|
||||
aDC->SetLogicalOrigin( 0, 0 );
|
||||
aDC->SetUserScale( 1, 1 );
|
||||
|
||||
aDC->Blit( 0, 0, bitmapWidth, bitmapHeight,
|
||||
&screenDC, 0, 0, wxCOPY );
|
||||
aDC->Blit( 0, 0, bitmapWidth, bitmapHeight, &screenDC, 0, 0, wxCOPY );
|
||||
|
||||
// Restore aDC values
|
||||
aDC->SetDeviceOrigin(dev_org.x, dev_org.y);
|
||||
|
@ -333,10 +345,6 @@ void BOARD::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, int aDrawMode, const wxPoin
|
|||
}
|
||||
|
||||
|
||||
/* Function DrawItemsDCodeID
|
||||
* Draw the DCode value (if exists) corresponding to gerber item
|
||||
* Polygons do not have a DCode
|
||||
*/
|
||||
void GERBVIEW_FRAME::DrawItemsDCodeID( wxDC* aDC, int aDrawMode )
|
||||
{
|
||||
wxPoint pos;
|
||||
|
@ -357,7 +365,9 @@ void GERBVIEW_FRAME::DrawItemsDCodeID( wxDC* aDC, int aDrawMode )
|
|||
continue;
|
||||
|
||||
if( gerb_item->m_Flashed || gerb_item->m_Shape == GBR_ARC )
|
||||
{
|
||||
pos = gerb_item->m_Start;
|
||||
}
|
||||
else
|
||||
{
|
||||
pos.x = (gerb_item->m_Start.x + gerb_item->m_End.x) / 2;
|
||||
|
@ -377,7 +387,7 @@ void GERBVIEW_FRAME::DrawItemsDCodeID( wxDC* aDC, int aDrawMode )
|
|||
|
||||
if( gerb_item->m_Flashed )
|
||||
{
|
||||
// A reasonnable size for text is width/3 because most of time this text has 3 chars.
|
||||
// A reasonable size for text is width/3 because most of time this text has 3 chars.
|
||||
width /= 3;
|
||||
}
|
||||
else // this item is a line
|
||||
|
@ -387,7 +397,7 @@ void GERBVIEW_FRAME::DrawItemsDCodeID( wxDC* aDC, int aDrawMode )
|
|||
if( abs( delta.x ) < abs( delta.y ) )
|
||||
orient = TEXT_ORIENT_VERT;
|
||||
|
||||
// A reasonnable size for text is width/2 because text needs margin below and above it.
|
||||
// A reasonable size for text is width/2 because text needs margin below and above it.
|
||||
// a margin = width/4 seems good
|
||||
width /= 2;
|
||||
}
|
||||
|
@ -402,7 +412,7 @@ void GERBVIEW_FRAME::DrawItemsDCodeID( wxDC* aDC, int aDrawMode )
|
|||
}
|
||||
|
||||
|
||||
/* Virtual fonction needed by the PCB_SCREEN class derived from BASE_SCREEN
|
||||
/* Virtual function needed by the PCB_SCREEN class derived from BASE_SCREEN
|
||||
* this is a virtual pure function in BASE_SCREEN
|
||||
* do nothing in GerbView
|
||||
* could be removed later
|
||||
|
|
|
@ -1,3 +1,28 @@
|
|||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2007 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com
|
||||
* Copyright (C) 2009 Wayne Stambaugh <stambaughw@verizon.net>
|
||||
* Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.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
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file gerbview_config.cpp
|
||||
* @brief GerbView configuration.
|
||||
|
@ -9,14 +34,20 @@
|
|||
#include "class_drawpanel.h"
|
||||
#include "gestfich.h"
|
||||
#include "pcbcommon.h"
|
||||
#include "param_config.h"
|
||||
#include "colors_selection.h"
|
||||
|
||||
#include "gerbview.h"
|
||||
#include "hotkeys.h"
|
||||
#include "class_board_design_settings.h"
|
||||
#include "gerbview_config.h"
|
||||
#include "dialog_hotkeys_editor.h"
|
||||
|
||||
|
||||
#define GROUP wxT("/gerbview")
|
||||
|
||||
#define INSETUP true
|
||||
|
||||
|
||||
void GERBVIEW_FRAME::Process_Config( wxCommandEvent& event )
|
||||
{
|
||||
int id = event.GetId();
|
||||
|
@ -50,24 +81,6 @@ void GERBVIEW_FRAME::Process_Config( wxCommandEvent& event )
|
|||
}
|
||||
|
||||
|
||||
/*
|
||||
* Return the GerbView applications settings list.
|
||||
* (list of parameters that must be saved in GerbView parameters)
|
||||
*
|
||||
* This replaces the old statically define list that had the project
|
||||
* file settings and the application settings mixed together. This
|
||||
* was confusing and caused some settings to get saved and loaded
|
||||
* incorrectly. Currently, only the settings that are needed at start
|
||||
* up by the main window are defined here. There are other locally used
|
||||
* settings scattered thoughout the GerbView source code. If you need
|
||||
* to define a configuration setting that need to be loaded at run time,
|
||||
* this is the place to define it.
|
||||
*
|
||||
* TODO: Define the configuration variables as member variables instead of
|
||||
* global variables or move them to the object class where they are
|
||||
* used.
|
||||
*/
|
||||
|
||||
PARAM_CFG_ARRAY& GERBVIEW_FRAME::GetConfigurationSettings( void )
|
||||
{
|
||||
if( !m_configSettings.empty() )
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
/*************************/
|
||||
/** gerberview_config.h **/
|
||||
/*************************/
|
||||
|
||||
#include "param_config.h"
|
||||
#include "colors_selection.h"
|
||||
|
||||
#define GROUP wxT("/gerbview")
|
||||
|
||||
#define INSETUP TRUE
|
|
@ -1,3 +1,28 @@
|
|||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2007 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com
|
||||
* Copyright (C) 2011 Wayne Stambaugh <stambaughw@verizon.net>
|
||||
* Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.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
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file gerbview_frame.h
|
||||
*/
|
||||
|
@ -73,8 +98,20 @@ public: GERBVIEW_FRAME( wxWindow* father, const wxString& title,
|
|||
// Virtual basic functions:
|
||||
void RedrawActiveWindow( wxDC* DC, bool EraseBg );
|
||||
void ReCreateHToolbar();
|
||||
|
||||
/**
|
||||
* Function ReCreateVToolbar
|
||||
* creates or updates the right vertical toolbar.
|
||||
*
|
||||
* @note This is currently not used.
|
||||
*/
|
||||
void ReCreateVToolbar();
|
||||
|
||||
/**
|
||||
* Create or update the left vertical toolbar (option toolbar
|
||||
*/
|
||||
void ReCreateOptToolbar();
|
||||
|
||||
void ReCreateMenuBar();
|
||||
void OnLeftClick( wxDC* DC, const wxPoint& MousePos );
|
||||
void OnLeftDClick( wxDC* DC, const wxPoint& MousePos );
|
||||
|
@ -250,11 +287,10 @@ public: GERBVIEW_FRAME( wxWindow* father, const wxString& title,
|
|||
* Function GetConfigurationSettings
|
||||
* Populates the GerbView applications settings list.
|
||||
* (list of parameters that must be saved in GerbView parameters)
|
||||
* Currently, only the settings that are needed at start
|
||||
* up by the main window are defined here. There are other locally used
|
||||
* settings scattered thoughout the GerbView source code (mainle in dialogs).
|
||||
* If you need to define a configuration setting that need to be loaded at run time,
|
||||
* this is the place to define it.
|
||||
* Currently, only the settings that are needed at start up by the main window are
|
||||
* defined here. There are other locally used settings scattered throughout the
|
||||
* GerbView source code (mainly in dialogs). If you need to define a configuration
|
||||
* setting that need to be loaded at run time, this is the place to define it.
|
||||
*/
|
||||
PARAM_CFG_ARRAY& GetConfigurationSettings( void );
|
||||
|
||||
|
@ -292,7 +328,7 @@ public: GERBVIEW_FRAME( wxWindow* father, const wxString& title,
|
|||
/**
|
||||
* Function OnSelectActiveDCode
|
||||
* Selects the active DCode for the current active layer.
|
||||
* Items using this DCode are hightlighted
|
||||
* Items using this DCode are highlighted.
|
||||
*/
|
||||
void OnSelectActiveDCode( wxCommandEvent& event );
|
||||
|
||||
|
@ -488,6 +524,10 @@ public: GERBVIEW_FRAME( wxWindow* father, const wxString& title,
|
|||
* 1 = read OK<br>
|
||||
*/
|
||||
int ReadDCodeDefinitionFile( const wxString& D_Code_FullFileName );
|
||||
|
||||
/**
|
||||
* Set Size Items (Lines, Flashes) from DCodes List
|
||||
*/
|
||||
void CopyDCodesSizeToItems();
|
||||
void Liste_D_Codes();
|
||||
|
||||
|
@ -536,7 +576,7 @@ public: GERBVIEW_FRAME( wxWindow* father, const wxString& title,
|
|||
* Function DrawItemsDCodeID
|
||||
* Draw the DCode value (if exists) corresponding to gerber item
|
||||
* (polygons do not have a DCode)
|
||||
* @param aDC = the current device contect
|
||||
* @param aDC = the current device context
|
||||
* @param aDrawMode = GR_COPY, GR_OR ...
|
||||
*/
|
||||
void DrawItemsDCodeID( wxDC* aDC, int aDrawMode );
|
||||
|
|
|
@ -1,3 +1,27 @@
|
|||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2007 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com
|
||||
* Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.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
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file gerbview/initpcb.cpp
|
||||
*/
|
||||
|
@ -49,7 +73,7 @@ bool GERBVIEW_FRAME::Clear_Pcb( bool query )
|
|||
setActiveLayer(FIRST_COPPER_LAYER);
|
||||
m_LayersManager->UpdateLayerIcons();
|
||||
syncLayerBox();
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,6 +1,30 @@
|
|||
/******************/
|
||||
/* file pcbplot.h */
|
||||
/******************/
|
||||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2007 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com
|
||||
* Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.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
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file gerbview/pcbplot.h
|
||||
*/
|
||||
|
||||
#ifndef PCBPLOT_H
|
||||
#define PCBPLOT_H
|
||||
|
@ -26,7 +50,7 @@ struct PCB_Plot_Options
|
|||
int HPGL_Pen_Speed;
|
||||
int HPGL_Pen_Diam;
|
||||
int HPGL_Pen_Recouvrement;
|
||||
bool HPGL_Org_Centre; // TRUE if, HPGL originally the center of the node
|
||||
bool HPGL_Org_Centre; // true if, HPGL originally the center of the node
|
||||
int PlotPSColorOpt; // True for color Postscript output
|
||||
bool Plot_PS_Negative; // True to create a negative board ps plot
|
||||
|
||||
|
|
|
@ -1,6 +1,32 @@
|
|||
/*************************************/
|
||||
/* tool_gerber.cpp: Build tool bars */
|
||||
/*************************************/
|
||||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2009 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com
|
||||
* Copyright (C) 2011 Wayne Stambaugh <stambaughw@verizon.net>
|
||||
* Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.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
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file toolbars_gerber.cpp
|
||||
* @brief Build tool bars
|
||||
*/
|
||||
|
||||
#include "fctsys.h"
|
||||
|
||||
|
@ -23,7 +49,7 @@ void GERBVIEW_FRAME::ReCreateHToolbar( void )
|
|||
if( m_HToolBar != NULL )
|
||||
return;
|
||||
|
||||
m_HToolBar = new EDA_TOOLBAR( TOOLBAR_MAIN, this, ID_H_TOOLBAR, TRUE );
|
||||
m_HToolBar = new EDA_TOOLBAR( TOOLBAR_MAIN, this, ID_H_TOOLBAR, true );
|
||||
|
||||
// Set up toolbar
|
||||
m_HToolBar->AddTool( ID_GERBVIEW_ERASE_ALL, wxEmptyString,
|
||||
|
@ -98,10 +124,6 @@ void GERBVIEW_FRAME::ReCreateHToolbar( void )
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Create or update the right vertical toolbar
|
||||
* Current no used
|
||||
*/
|
||||
void GERBVIEW_FRAME::ReCreateVToolbar( void )
|
||||
{
|
||||
if( m_VToolBar )
|
||||
|
@ -117,9 +139,6 @@ void GERBVIEW_FRAME::ReCreateVToolbar( void )
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Create or update the left vertical toolbar (option toolbar
|
||||
*/
|
||||
void GERBVIEW_FRAME::ReCreateOptToolbar( void )
|
||||
{
|
||||
if( m_OptionsToolBar )
|
||||
|
@ -175,12 +194,12 @@ void GERBVIEW_FRAME::ReCreateOptToolbar( void )
|
|||
m_OptionsToolBar->AddTool( ID_TB_OPTIONS_SHOW_GBR_MODE_1, wxEmptyString,
|
||||
KiBitmap( gbr_select_mode1_xpm ),
|
||||
_( "Show layers in stacked mode \
|
||||
(show negative items without artefact, sometimes slow)" ),
|
||||
(show negative items without artifacts, sometimes slow)" ),
|
||||
wxITEM_CHECK );
|
||||
m_OptionsToolBar->AddTool( ID_TB_OPTIONS_SHOW_GBR_MODE_2, wxEmptyString,
|
||||
KiBitmap( gbr_select_mode2_xpm ),
|
||||
_( "Show layers in tranparency mode \
|
||||
(show negative items without artefact, sometimes slow)" ),
|
||||
_( "Show layers in transparency mode \
|
||||
(show negative items without artifacts, sometimes slow)" ),
|
||||
wxITEM_CHECK );
|
||||
|
||||
// Tools to show/hide toolbars:
|
||||
|
|
|
@ -1,6 +1,31 @@
|
|||
/**************/
|
||||
/* gr_basic.h */
|
||||
/**************/
|
||||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2006 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com
|
||||
* Copyright (C) 2011 Wayne Stambaugh <stambaughw@verizon.net>
|
||||
* Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.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
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file gr_basic.h
|
||||
*/
|
||||
|
||||
#ifndef GR_BASIC
|
||||
#define GR_BASIC
|
||||
|
@ -17,7 +42,7 @@ class EDA_RECT;
|
|||
#define GR_NXOR 0x08000000
|
||||
#define GR_INVERT 0x10000000
|
||||
|
||||
#define GR_SURBRILL 0x80000000
|
||||
#define GR_HIGHLIGHT 0x80000000
|
||||
|
||||
#define GR_M_LEFT_DOWN 0x10000000
|
||||
#define GR_M_RIGHT_DOWN 0x20000000
|
||||
|
|
|
@ -887,9 +887,17 @@ public:
|
|||
*/
|
||||
void OnEditItemRequest( wxDC* aDC, BOARD_ITEM* aItem );
|
||||
|
||||
// Highlight functions:
|
||||
int Select_High_Light( wxDC* DC );
|
||||
void High_Light( wxDC* DC );
|
||||
/**
|
||||
* Locate track or pad and highlight the corresponding net.
|
||||
* @return The Netcode, or -1 if no net located.
|
||||
*/
|
||||
int SelectHighLight( wxDC* DC );
|
||||
|
||||
/**
|
||||
* Function HighLight.
|
||||
* highlights the net at the current cursor position.
|
||||
*/
|
||||
void HighLight( wxDC* DC );
|
||||
|
||||
// Track and via edition:
|
||||
void Via_Edit_Control( wxCommandEvent& event );
|
||||
|
@ -928,9 +936,24 @@ public:
|
|||
*/
|
||||
void DisplayNetStatus( wxDC* DC );
|
||||
|
||||
/**
|
||||
* Function Delete_Segment
|
||||
* removes 1 segment of track.
|
||||
* 2 cases:
|
||||
* If There is evidence of new track: delete new segment.
|
||||
* Otherwise, delete segment under the cursor.
|
||||
*/
|
||||
TRACK* Delete_Segment( wxDC* DC, TRACK* Track );
|
||||
|
||||
void Delete_Track( wxDC* DC, TRACK* Track );
|
||||
void Delete_net( wxDC* DC, TRACK* Track );
|
||||
|
||||
/**
|
||||
* Function Remove_One_Track
|
||||
* removes 1 track/
|
||||
* The leading segment is removed and all adjacent segments
|
||||
* until a pad or a junction point of more than 2 segments is found
|
||||
*/
|
||||
void Remove_One_Track( wxDC* DC, TRACK* pt_segm );
|
||||
|
||||
/**
|
||||
|
@ -1091,8 +1114,13 @@ public:
|
|||
|
||||
/**
|
||||
* Function Begin_Zone
|
||||
* initiates a zone edge creation process,
|
||||
* or terminates the current zone edge and creates a new zone edge stub
|
||||
* either initializes the first segment of a new zone, or adds an
|
||||
* intermediate segment.
|
||||
* A new zone can be:
|
||||
* created from scratch: the user will be prompted to define parameters (layer, clearence ...)
|
||||
* created from a similar zone (s_CurrentZone is used): parameters are copied from
|
||||
* s_CurrentZone
|
||||
* created as a cutout (an hole) inside s_CurrentZone
|
||||
*/
|
||||
int Begin_Zone( wxDC* DC );
|
||||
|
||||
|
@ -1114,7 +1142,7 @@ public:
|
|||
* @param verbose = true to show error messages
|
||||
* @return error level (0 = no error)
|
||||
*/
|
||||
int Fill_Zone( ZONE_CONTAINER* zone_container, bool verbose = TRUE );
|
||||
int Fill_Zone( ZONE_CONTAINER* zone_container, bool verbose = true );
|
||||
|
||||
/**
|
||||
* Function Fill_All_Zones
|
||||
|
@ -1123,7 +1151,7 @@ public:
|
|||
* @param verbose = true to show error messages
|
||||
* @return error level (0 = no error)
|
||||
*/
|
||||
int Fill_All_Zones( bool verbose = TRUE );
|
||||
int Fill_All_Zones( bool verbose = true );
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
@ -129,6 +129,7 @@ set(PCBNEW_SRCS
|
|||
globaleditpad.cpp
|
||||
gpcb_exchange.cpp
|
||||
graphpcb.cpp
|
||||
highlight.cpp
|
||||
hotkeys.cpp
|
||||
hotkeys_board_editor.cpp
|
||||
hotkeys_module_editor.cpp
|
||||
|
@ -174,7 +175,6 @@ set(PCBNEW_SRCS
|
|||
specctra_export.cpp
|
||||
specctra_import.cpp
|
||||
specctra_keywords.cpp
|
||||
surbrill.cpp
|
||||
swap_layers.cpp
|
||||
tool_modedit.cpp
|
||||
tool_onrightclick.cpp
|
||||
|
|
|
@ -1,6 +1,32 @@
|
|||
/******************************************/
|
||||
/* Track editing: attribute flags editing */
|
||||
/******************************************/
|
||||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2006 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com
|
||||
* Copyright (C) 2011 Wayne Stambaugh <stambaughw@verizon.net>
|
||||
* Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.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
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file attribut.cpp
|
||||
* @brief Track attribute flags editing.
|
||||
*/
|
||||
|
||||
#include "fctsys.h"
|
||||
#include "class_drawpanel.h"
|
||||
|
@ -27,7 +53,7 @@ void PCB_EDIT_FRAME::Attribut_Segment( TRACK* track, wxDC* DC, bool Flag_On )
|
|||
OnModify();
|
||||
DrawPanel->CrossHairOff( DC ); // Erase cursor shape
|
||||
track->SetState( TRACK_LOCKED, Flag_On );
|
||||
track->Draw( DrawPanel, DC, GR_OR | GR_SURBRILL );
|
||||
track->Draw( DrawPanel, DC, GR_OR | GR_HIGHLIGHT );
|
||||
DrawPanel->CrossHairOn( DC ); // Display cursor shape
|
||||
track->DisplayInfo( this );
|
||||
}
|
||||
|
@ -44,7 +70,7 @@ void PCB_EDIT_FRAME::Attribut_Track( TRACK* track, wxDC* DC, bool Flag_On )
|
|||
|
||||
DrawPanel->CrossHairOff( DC ); // Erase cursor shape
|
||||
Track = GetBoard()->MarkTrace( track, &nb_segm, NULL, NULL, true );
|
||||
DrawTraces( DrawPanel, DC, Track, nb_segm, GR_OR | GR_SURBRILL );
|
||||
DrawTraces( DrawPanel, DC, Track, nb_segm, GR_OR | GR_HIGHLIGHT );
|
||||
|
||||
for( ; (Track != NULL) && (nb_segm > 0); nb_segm-- )
|
||||
{
|
||||
|
@ -86,7 +112,7 @@ void PCB_EDIT_FRAME::Attribut_net( wxDC* DC, int net_code, bool Flag_On )
|
|||
|
||||
OnModify();
|
||||
Track->SetState( TRACK_LOCKED, Flag_On );
|
||||
Track->Draw( DrawPanel, DC, GR_OR | GR_SURBRILL );
|
||||
Track->Draw( DrawPanel, DC, GR_OR | GR_HIGHLIGHT );
|
||||
Track = Track->Next();
|
||||
}
|
||||
|
||||
|
|
|
@ -254,7 +254,7 @@ public:
|
|||
* Draw a pad:
|
||||
* @param aPanel = the EDA_DRAW_PANEL panel
|
||||
* @param aDC = the current device context
|
||||
* @param aDraw_mode = mode: GR_OR, GR_XOR, GR_AND...
|
||||
* @param aDrawMode = mode: GR_OR, GR_XOR, GR_AND...
|
||||
* @param aOffset = draw offset
|
||||
*/
|
||||
void Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC,
|
||||
|
@ -265,7 +265,12 @@ public:
|
|||
/**
|
||||
* Function DrawShape
|
||||
* basic function to draw a pad.
|
||||
* used by Draw after calculation of parameters (color, ) final orientation ...
|
||||
* <p>
|
||||
* This function is used by Draw after calculation of parameters (color, ) final
|
||||
* orientation transforms are set. It can also be called to draw a pad on any panel
|
||||
* even if this panel is not a EDA_DRAW_PANEL for instance on a wxPanel inside the
|
||||
* pad editor.
|
||||
* </p>
|
||||
*/
|
||||
void DrawShape( EDA_RECT* aClipBox, wxDC* aDC, PAD_DRAWINFO& aDrawInfo );
|
||||
|
||||
|
|
|
@ -1,3 +1,28 @@
|
|||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2006 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com
|
||||
* Copyright (C) 2011 Wayne Stambaugh <stambaughw@verizon.net>
|
||||
* Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.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
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file class_pad_draw_functions.cpp
|
||||
*/
|
||||
|
@ -49,19 +74,14 @@ PAD_DRAWINFO::PAD_DRAWINFO()
|
|||
}
|
||||
|
||||
|
||||
/** Draw a pad:
|
||||
* @param aPanel = the EDA_DRAW_PANEL panel
|
||||
* @param aDraw_mode = mode: GR_OR, GR_XOR, GR_AND...
|
||||
* @param aOffset = draw offset
|
||||
*/
|
||||
void D_PAD::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, int aDraw_mode, const wxPoint& aOffset )
|
||||
{
|
||||
int color = 0;
|
||||
wxSize mask_margin; // margin (clearance) used for some non copper layers
|
||||
|
||||
#ifdef SHOW_PADMASK_REAL_SIZE_AND_COLOR
|
||||
int showActualMaskSize = 0; /* == layer number if the actual pad size on mask layer can be displayed
|
||||
* i.e. if only one layer is shown for this pad
|
||||
int showActualMaskSize = 0; /* Layer number if the actual pad size on mask layer can
|
||||
* be displayed i.e. if only one layer is shown for this pad
|
||||
* and this layer is a mask (solder mask or sloder paste
|
||||
*/
|
||||
#endif
|
||||
|
@ -133,8 +153,7 @@ void D_PAD::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, int aDraw_mode, const wxPoi
|
|||
|
||||
if( color == 0 ) /* Not on copper layer */
|
||||
{
|
||||
// If the pad in on only one tech layer, use the layer color
|
||||
// else use DARKGRAY
|
||||
// If the pad in on only one tech layer, use the layer color else use DARKGRAY
|
||||
int mask_non_copper_layers = m_layerMask & ~ALL_CU_LAYERS;
|
||||
#ifdef SHOW_PADMASK_REAL_SIZE_AND_COLOR
|
||||
mask_non_copper_layers &= brd->GetVisibleLayers();
|
||||
|
@ -311,7 +330,7 @@ void D_PAD::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, int aDraw_mode, const wxPoi
|
|||
}
|
||||
|
||||
|
||||
if( aDraw_mode & GR_SURBRILL )
|
||||
if( aDraw_mode & GR_HIGHLIGHT )
|
||||
{
|
||||
if( aDraw_mode & GR_AND )
|
||||
color &= ~HIGHLIGHT_FLAG;
|
||||
|
@ -361,13 +380,6 @@ void D_PAD::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, int aDraw_mode, const wxPoi
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Function DrawShape
|
||||
* basic function to draw a pad.
|
||||
* used by D_PAD::Draw after calculation of parameters (color, final orientation ...)
|
||||
* this function can be called to draw a pad on a panel
|
||||
* even if this panel is not a EDA_DRAW_PANEL (for instance on a wxPanel inside the pad editor)
|
||||
*/
|
||||
void D_PAD::DrawShape( EDA_RECT* aClipBox, wxDC* aDC, PAD_DRAWINFO& aDrawInfo )
|
||||
{
|
||||
wxPoint coord[4];
|
||||
|
@ -555,8 +567,7 @@ void D_PAD::DrawShape( EDA_RECT* aClipBox, wxDC* aDC, PAD_DRAWINFO& aDrawInfo )
|
|||
|
||||
wxPoint tpos0 = shape_pos; // Position of the centre of text
|
||||
wxPoint tpos = tpos0;
|
||||
wxSize AreaSize; // size of text area, normalized to
|
||||
// AreaSize.y < AreaSize.x
|
||||
wxSize AreaSize; // size of text area, normalized to AreaSize.y < AreaSize.x
|
||||
int shortname_len = m_ShortNetname.Len();
|
||||
|
||||
if( !aDrawInfo.m_Display_netname )
|
||||
|
@ -682,15 +693,6 @@ int D_PAD::BuildSegmentFromOvalShape(wxPoint& aSegStart, wxPoint& aSegEnd, int a
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Function BuildPadPolygon
|
||||
* Has meaning only for polygonal pads (trapeziod and rectangular)
|
||||
* Build the Corner list of the polygonal shape,
|
||||
* depending on shape, extra size (clearance ...) and orientation
|
||||
* @param aCoord = a buffer to fill.
|
||||
* @param aInflateValue = wxSize: the clearance or margin value. value > 0: inflate, < 0 deflate
|
||||
* @param aRotation = full rotation of the polygon, usually m_Orient
|
||||
*/
|
||||
void D_PAD::BuildPadPolygon( wxPoint aCoord[4], wxSize aInflateValue, int aRotation ) const
|
||||
{
|
||||
if( (GetShape() != PAD_RECT) && (GetShape() != PAD_TRAPEZOID) )
|
||||
|
|
|
@ -641,7 +641,7 @@ void TRACK::Draw( EDA_DRAW_PANEL* panel, wxDC* DC, int draw_mode, const wxPoint&
|
|||
}
|
||||
}
|
||||
|
||||
if( draw_mode & GR_SURBRILL )
|
||||
if( draw_mode & GR_HIGHLIGHT )
|
||||
{
|
||||
if( draw_mode & GR_AND )
|
||||
color &= ~HIGHLIGHT_FLAG;
|
||||
|
@ -815,7 +815,7 @@ void SEGVIA::Draw( EDA_DRAW_PANEL* panel, wxDC* DC, int draw_mode, const wxPoint
|
|||
}
|
||||
}
|
||||
|
||||
if( draw_mode & GR_SURBRILL )
|
||||
if( draw_mode & GR_HIGHLIGHT )
|
||||
{
|
||||
if( draw_mode & GR_AND )
|
||||
color &= ~HIGHLIGHT_FLAG;
|
||||
|
@ -1275,18 +1275,6 @@ TRACK* TRACK::GetVia( TRACK* aEndTrace, const wxPoint& aPosition, int aLayerMask
|
|||
}
|
||||
|
||||
|
||||
/*
|
||||
* GetTrace is a helper function to locate a trace segment having an end point at aPosition
|
||||
* on aLayerMask starting at aStartTrace and end at aEndTrace.
|
||||
* The segments of track that are flagged as deleted or busy are ignored.
|
||||
* To speed up the search, this search is made:
|
||||
* first on the previous and next neightbour (NEIGHTBOUR_COUNT_MAX size)
|
||||
* of this.
|
||||
* After, only if no track found, on aStartTrace to aEndTrace
|
||||
* Because tracks are grouped when entered in list, most of time the first search
|
||||
* find the connection.
|
||||
* The speedup is *very* large
|
||||
*/
|
||||
TRACK* TRACK::GetTrace( TRACK* aStartTrace, TRACK* aEndTrace, int aEndPoint )
|
||||
{
|
||||
const int NEIGHTBOUR_COUNT_MAX = 50;
|
||||
|
|
|
@ -1,3 +1,28 @@
|
|||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2006 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com
|
||||
* Copyright (C) 2011 Wayne Stambaugh <stambaughw@verizon.net>
|
||||
* Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.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
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file class_zone.cpp
|
||||
* @brief Implementation of class to handle copper zones.
|
||||
|
@ -46,12 +71,7 @@ ZONE_CONTAINER::~ZONE_CONTAINER()
|
|||
m_Poly = NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* Function UnFill
|
||||
* Removes the zone filling
|
||||
* @return true if a previous filling is removed, false if no change
|
||||
* (when no filling found)
|
||||
*/
|
||||
|
||||
bool ZONE_CONTAINER::UnFill()
|
||||
{
|
||||
bool change = ( m_FilledPolysList.size() > 0 ) || ( m_FillSegmList.size() > 0 );
|
||||
|
@ -63,10 +83,7 @@ bool ZONE_CONTAINER::UnFill()
|
|||
return change;
|
||||
}
|
||||
|
||||
/**
|
||||
* Function GetPosition (virtual)
|
||||
* @return a wxPoint, position of the first point of the outline
|
||||
*/
|
||||
|
||||
wxPoint& ZONE_CONTAINER::GetPosition()
|
||||
{
|
||||
static wxPoint pos;
|
||||
|
@ -82,23 +99,18 @@ wxPoint& ZONE_CONTAINER::GetPosition()
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Set the netcode and the netname
|
||||
* if netcode >= 0, set the netname
|
||||
* if netcode < 0: keep old netname (used to set an necode error flag)
|
||||
*/
|
||||
void ZONE_CONTAINER::SetNet( int anet_code )
|
||||
void ZONE_CONTAINER::SetNet( int aNetCode )
|
||||
{
|
||||
m_NetCode = anet_code;
|
||||
m_NetCode = aNetCode;
|
||||
|
||||
if( anet_code < 0 )
|
||||
if( aNetCode < 0 )
|
||||
return;
|
||||
|
||||
BOARD* board = GetBoard();
|
||||
|
||||
if( board )
|
||||
{
|
||||
NETINFO_ITEM* net = board->FindNet( anet_code );
|
||||
NETINFO_ITEM* net = board->FindNet( aNetCode );
|
||||
|
||||
if( net )
|
||||
m_Netname = net->GetNetname();
|
||||
|
@ -541,7 +553,7 @@ void ZONE_CONTAINER::Draw( EDA_DRAW_PANEL* panel, wxDC* DC, int aDrawMode, const
|
|||
}
|
||||
}
|
||||
|
||||
if( aDrawMode & GR_SURBRILL )
|
||||
if( aDrawMode & GR_HIGHLIGHT )
|
||||
{
|
||||
if( aDrawMode & GR_AND )
|
||||
color &= ~HIGHLIGHT_FLAG;
|
||||
|
@ -597,14 +609,6 @@ void ZONE_CONTAINER::Draw( EDA_DRAW_PANEL* panel, wxDC* DC, int aDrawMode, const
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Function DrawDrawFilledArea
|
||||
* Draws the filled areas for this zone (polygon list .m_FilledPolysList)
|
||||
* @param panel = current Draw Panel
|
||||
* @param DC = current Device Context
|
||||
* @param offset = Draw offset (usually wxPoint(0,0))
|
||||
* @param aDrawMode = GR_OR, GR_XOR, GR_COPY ..
|
||||
*/
|
||||
void ZONE_CONTAINER::DrawFilledArea( EDA_DRAW_PANEL* panel,
|
||||
wxDC* DC, int aDrawMode, const wxPoint& offset )
|
||||
{
|
||||
|
@ -642,7 +646,7 @@ void ZONE_CONTAINER::DrawFilledArea( EDA_DRAW_PANEL* panel,
|
|||
}
|
||||
}
|
||||
|
||||
if( aDrawMode & GR_SURBRILL )
|
||||
if( aDrawMode & GR_HIGHLIGHT )
|
||||
{
|
||||
if( aDrawMode & GR_AND )
|
||||
color &= ~HIGHLIGHT_FLAG;
|
||||
|
@ -763,16 +767,6 @@ EDA_RECT ZONE_CONTAINER::GetBoundingBox() const
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Function DrawWhileCreateOutline
|
||||
* Draws the zone outline when ir is created.
|
||||
* The moving edges (last segment and the closing edge segment) are in XOR graphic mode,
|
||||
* old segment in OR graphic mode
|
||||
* The closing edge has its own shape
|
||||
* @param panel = current Draw Panel
|
||||
* @param DC = current Device Context
|
||||
* @param draw_mode = draw mode: OR, XOR ..
|
||||
*/
|
||||
void ZONE_CONTAINER::DrawWhileCreateOutline( EDA_DRAW_PANEL* panel, wxDC* DC, int draw_mode )
|
||||
{
|
||||
int current_gr_mode = draw_mode;
|
||||
|
@ -838,13 +832,6 @@ void ZONE_CONTAINER::DrawWhileCreateOutline( EDA_DRAW_PANEL* panel, wxDC* DC, in
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Function HitTest
|
||||
* tests if the given wxPoint is within the bounds of this object.
|
||||
* @param refPos A wxPoint to test
|
||||
* @return bool - true if a hit, else false
|
||||
* return true if refPos is near a corner or an edge
|
||||
*/
|
||||
bool ZONE_CONTAINER::HitTest( const wxPoint& refPos )
|
||||
{
|
||||
if( HitTestForCorner( refPos ) )
|
||||
|
@ -857,20 +844,13 @@ bool ZONE_CONTAINER::HitTest( const wxPoint& refPos )
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Function HitTestForCorner
|
||||
* tests if the given wxPoint near a corner, or near the segment define by 2 corners.
|
||||
* Choose the nearest corner
|
||||
* "near" means grid size (or CORNER_MIN_DIST if grid is not known)
|
||||
* Set m_CornerSelection to corner index in .m_Poly->corner or -1 if no corner found
|
||||
* @return true if a corner found
|
||||
* @param refPos : A wxPoint to test
|
||||
*/
|
||||
bool ZONE_CONTAINER::HitTestForCorner( const wxPoint& refPos )
|
||||
{
|
||||
m_CornerSelection = -1; // Set to not found
|
||||
|
||||
#define CORNER_MIN_DIST 100 // distance (in internal units) to detect a corner in a zone outline
|
||||
// distance (in internal units) to detect a corner in a zone outline.
|
||||
#define CORNER_MIN_DIST 100
|
||||
|
||||
int min_dist = CORNER_MIN_DIST + 1;
|
||||
|
||||
if( GetBoard() && GetBoard()->m_PcbFrame )
|
||||
|
@ -901,16 +881,6 @@ bool ZONE_CONTAINER::HitTestForCorner( const wxPoint& refPos )
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Function HitTestForEdge
|
||||
* tests if the given wxPoint near a corner, or near the segment define by 2 corners.
|
||||
* choose the nearest segment
|
||||
* "near" means grid size (or EDGE_MIN_DIST if grid is not known)
|
||||
* Set m_CornerSelection to -1 if nothing found, or index of the starting corner of edge
|
||||
* in .m_Poly->corner
|
||||
* @return true if found
|
||||
* @param refPos : A wxPoint to test
|
||||
*/
|
||||
bool ZONE_CONTAINER::HitTestForEdge( const wxPoint& refPos )
|
||||
{
|
||||
unsigned lim = m_Poly->corner.size();
|
||||
|
@ -963,12 +933,6 @@ bool ZONE_CONTAINER::HitTestForEdge( const wxPoint& refPos )
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Function HitTest (overlayed)
|
||||
* tests if the given EDA_RECT contains the bounds of this object.
|
||||
* @param refArea : the given EDA_RECT
|
||||
* @return bool - true if a hit, else false
|
||||
*/
|
||||
bool ZONE_CONTAINER::HitTest( EDA_RECT& refArea )
|
||||
{
|
||||
bool is_out_of_box = false;
|
||||
|
@ -1018,12 +982,6 @@ int ZONE_CONTAINER::GetClearance( BOARD_CONNECTED_ITEM* aItem ) const
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Function HitTestFilledArea
|
||||
* tests if the given wxPoint is within the bounds of a filled area of this zone.
|
||||
* @param aRefPos A wxPoint to test
|
||||
* @return bool - true if a hit, else false
|
||||
*/
|
||||
bool ZONE_CONTAINER::HitTestFilledArea( const wxPoint& aRefPos )
|
||||
{
|
||||
unsigned indexstart = 0, indexend;
|
||||
|
@ -1124,11 +1082,6 @@ void ZONE_CONTAINER::DisplayInfo( EDA_DRAW_FRAME* frame )
|
|||
|
||||
/* Geometric transforms: */
|
||||
|
||||
/**
|
||||
* Function Move
|
||||
* Move the outlines
|
||||
* @param offset = moving vector
|
||||
*/
|
||||
void ZONE_CONTAINER::Move( const wxPoint& offset )
|
||||
{
|
||||
/* move outlines */
|
||||
|
@ -1155,11 +1108,6 @@ void ZONE_CONTAINER::Move( const wxPoint& offset )
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Function MoveEdge
|
||||
* Move the outline Edge. m_CornerSelection is the start point of the outline edge
|
||||
* @param offset = moving vector
|
||||
*/
|
||||
void ZONE_CONTAINER::MoveEdge( const wxPoint& offset )
|
||||
{
|
||||
int ii = m_CornerSelection;
|
||||
|
@ -1184,12 +1132,6 @@ void ZONE_CONTAINER::MoveEdge( const wxPoint& offset )
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Function Rotate
|
||||
* Move the outlines
|
||||
* @param centre = rot centre
|
||||
* @param angle = in 0.1 degree
|
||||
*/
|
||||
void ZONE_CONTAINER::Rotate( const wxPoint& centre, int angle )
|
||||
{
|
||||
wxPoint pos;
|
||||
|
@ -1224,12 +1166,6 @@ void ZONE_CONTAINER::Rotate( const wxPoint& centre, int angle )
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Function Flip
|
||||
* Flip this object, i.e. change the board side for this object
|
||||
* (like Mirror() but changes layer)
|
||||
* @param aCentre - the rotation point.
|
||||
*/
|
||||
void ZONE_CONTAINER::Flip( const wxPoint& aCentre )
|
||||
{
|
||||
Mirror( aCentre );
|
||||
|
@ -1237,11 +1173,6 @@ void ZONE_CONTAINER::Flip( const wxPoint& aCentre )
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Function Mirror
|
||||
* flip the outlines , relative to a given horizontal axis
|
||||
* @param mirror_ref = vertical axis position
|
||||
*/
|
||||
void ZONE_CONTAINER::Mirror( const wxPoint& mirror_ref )
|
||||
{
|
||||
for( unsigned ii = 0; ii < m_Poly->corner.size(); ii++ )
|
||||
|
@ -1274,11 +1205,6 @@ void ZONE_CONTAINER::Mirror( const wxPoint& mirror_ref )
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Function copy
|
||||
* copy useful data from the source.
|
||||
* flags and linked list pointers are NOT copied
|
||||
*/
|
||||
void ZONE_CONTAINER::Copy( ZONE_CONTAINER* src )
|
||||
{
|
||||
m_Parent = src->m_Parent;
|
||||
|
@ -1304,11 +1230,6 @@ void ZONE_CONTAINER::Copy( ZONE_CONTAINER* src )
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Function SetNetNameFromNetCode
|
||||
* Find the net name corresponding to the net code.
|
||||
* @return bool - true if net found, else false
|
||||
*/
|
||||
bool ZONE_CONTAINER::SetNetNameFromNetCode( void )
|
||||
{
|
||||
NETINFO_ITEM* net;
|
||||
|
|
|
@ -202,7 +202,15 @@ public:
|
|||
return ( GetLayer() < FIRST_NO_COPPER_LAYER ) ? true : false;
|
||||
}
|
||||
|
||||
virtual void SetNet( int anet_code );
|
||||
/**
|
||||
* Functio SetNet
|
||||
* set the netcode and the netname.
|
||||
*
|
||||
* @param aNetCode The net code of the zone container if greater than or equal to
|
||||
* zero. Otherwise the current net code is kept and set the net
|
||||
* code error flag.
|
||||
*/
|
||||
virtual void SetNet( int aNetCode );
|
||||
|
||||
/**
|
||||
* Function SetNetNameFromNetCode
|
||||
|
|
|
@ -1,7 +1,31 @@
|
|||
/******************************************/
|
||||
/* Edit Track: Erase Routines */
|
||||
/* Delete segments, tracks, and net areas */
|
||||
/******************************************/
|
||||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2009 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com
|
||||
* Copyright (C) 2011 Wayne Stambaugh <stambaughw@verizon.net>
|
||||
* Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.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
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file deltrack.cpp
|
||||
*/
|
||||
|
||||
#include "fctsys.h"
|
||||
#include "class_drawpanel.h"
|
||||
|
@ -17,11 +41,6 @@
|
|||
#include "protos.h"
|
||||
|
||||
|
||||
/* Removes 1 segment of track.
|
||||
* 2 cases:
|
||||
* If There is evidence of new track: delete new segment.
|
||||
* Otherwise, delete segment under the cursor.
|
||||
*/
|
||||
TRACK* PCB_EDIT_FRAME::Delete_Segment( wxDC* DC, TRACK* aTrack )
|
||||
{
|
||||
int current_net_code;
|
||||
|
@ -84,7 +103,7 @@ TRACK* PCB_EDIT_FRAME::Delete_Segment( wxDC* DC, TRACK* aTrack )
|
|||
DrawPanel->SetMouseCapture( NULL, NULL );
|
||||
|
||||
if( GetBoard()->IsHighLightNetON() )
|
||||
High_Light( DC );
|
||||
HighLight( DC );
|
||||
|
||||
SetCurItem( NULL );
|
||||
return NULL;
|
||||
|
@ -170,10 +189,6 @@ void PCB_EDIT_FRAME::Delete_net( wxDC* DC, TRACK* aTrack )
|
|||
}
|
||||
|
||||
|
||||
/* Remove 1 track:
|
||||
* The leading segment is removed and all adjacent segments
|
||||
* until a pad or a junction point of more than 2 segments is found
|
||||
*/
|
||||
void PCB_EDIT_FRAME::Remove_One_Track( wxDC* DC, TRACK* pt_segm )
|
||||
{
|
||||
int segments_to_delete_count;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Apr 16 2008)
|
||||
// C++ code generated with wxFormBuilder (version Sep 8 2010)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO "NOT" EDIT THIS FILE!
|
||||
|
@ -77,7 +77,7 @@ DIALOG_PCBNEW_CONFIG_LIBS_FBP::DIALOG_PCBNEW_CONFIG_LIBS_FBP( wxWindow* parent,
|
|||
bUserListSizer = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
m_listUserPaths = new wxListBox( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
|
||||
m_listUserPaths->SetToolTip( _("Additional paths used in this project. The priority is highter than default Kicad paths.") );
|
||||
m_listUserPaths->SetToolTip( _("Additional paths used in this project. The priority is higher than default KiCad paths.") );
|
||||
|
||||
bUserListSizer->Add( m_listUserPaths, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
@ -108,7 +108,7 @@ DIALOG_PCBNEW_CONFIG_LIBS_FBP::DIALOG_PCBNEW_CONFIG_LIBS_FBP( wxWindow* parent,
|
|||
sbLibPathSizer->Add( bUserLibPathSizer, 1, wxEXPAND, 5 );
|
||||
|
||||
m_DefaultLibraryPathslistBox = new wxListBox( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, wxLB_NEEDED_SB );
|
||||
m_DefaultLibraryPathslistBox->SetToolTip( _("Paths (system paths and user paths) used to search and load libraries files and component doc files.\nSorted by decreasing priority order.") );
|
||||
m_DefaultLibraryPathslistBox->SetToolTip( _("System and user paths used to search and load library files and component doc files.\nSorted by decreasing priority order.") );
|
||||
m_DefaultLibraryPathslistBox->SetMinSize( wxSize( -1,70 ) );
|
||||
|
||||
sbLibPathSizer->Add( m_DefaultLibraryPathslistBox, 0, wxALL|wxEXPAND, 5 );
|
||||
|
@ -162,4 +162,5 @@ DIALOG_PCBNEW_CONFIG_LIBS_FBP::~DIALOG_PCBNEW_CONFIG_LIBS_FBP()
|
|||
m_buttonRemovePath->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PCBNEW_CONFIG_LIBS_FBP::OnRemoveUserPath ), NULL, this );
|
||||
m_sdbSizer1Cancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PCBNEW_CONFIG_LIBS_FBP::OnCancelClick ), NULL, this );
|
||||
m_sdbSizer1OK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PCBNEW_CONFIG_LIBS_FBP::OnOkClick ), NULL, this );
|
||||
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,5 +1,5 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Apr 16 2008)
|
||||
// C++ code generated with wxFormBuilder (version Sep 8 2010)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO "NOT" EDIT THIS FILE!
|
||||
|
@ -75,6 +75,7 @@ class DIALOG_PCBNEW_CONFIG_LIBS_FBP : public wxDialog
|
|||
|
||||
|
||||
public:
|
||||
|
||||
DIALOG_PCBNEW_CONFIG_LIBS_FBP( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
|
||||
~DIALOG_PCBNEW_CONFIG_LIBS_FBP();
|
||||
|
||||
|
|
|
@ -1,3 +1,28 @@
|
|||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2007 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com
|
||||
* Copyright (C) 2011 Wayne Stambaugh <stambaughw@verizon.net>
|
||||
* Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.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
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file edit.cpp
|
||||
* @brief Edit PCB implementation.
|
||||
|
@ -1296,7 +1321,7 @@ void PCB_EDIT_FRAME::OnSelectTool( wxCommandEvent& aEvent )
|
|||
DisplayInfoMessage( this, _( "Warning: zone display is OFF!!!" ) );
|
||||
|
||||
if( !GetBoard()->IsHighLightNetON() && (GetBoard()->GetHighLightNetCode() > 0 ) )
|
||||
High_Light( &dc );
|
||||
HighLight( &dc );
|
||||
|
||||
break;
|
||||
|
||||
|
|
|
@ -1,6 +1,32 @@
|
|||
/************************/
|
||||
/* Edit tracks */
|
||||
/************************/
|
||||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2006 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com
|
||||
* Copyright (C) 2011 Wayne Stambaugh <stambaughw@verizon.net>
|
||||
* Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.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
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file editrack-part2.cpp
|
||||
*/
|
||||
|
||||
|
||||
#include "fctsys.h"
|
||||
#include "gr_basic.h"
|
||||
|
@ -309,7 +335,7 @@ void PCB_EDIT_FRAME::HighlightUnconnectedPads( wxDC* DC )
|
|||
if( (net->m_Status & CH_ACTIF) == 0 )
|
||||
continue;
|
||||
|
||||
net->m_PadStart->Draw( DrawPanel, DC, GR_OR | GR_SURBRILL );
|
||||
net->m_PadEnd->Draw( DrawPanel, DC, GR_OR | GR_SURBRILL );
|
||||
net->m_PadStart->Draw( DrawPanel, DC, GR_OR | GR_HIGHLIGHT );
|
||||
net->m_PadEnd->Draw( DrawPanel, DC, GR_OR | GR_HIGHLIGHT );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,3 +1,28 @@
|
|||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2009 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com
|
||||
* Copyright (C) 2011 Wayne Stambaugh <stambaughw@verizon.net>
|
||||
* Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.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
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file editrack.cpp
|
||||
*/
|
||||
|
@ -42,7 +67,7 @@ static void Abort_Create_Track( EDA_DRAW_PANEL* Panel, wxDC* DC )
|
|||
ShowNewTrackWhenMovingCursor( Panel, DC, wxDefaultPosition, false );
|
||||
|
||||
if( pcb->IsHighLightNetON() )
|
||||
frame->High_Light( DC );
|
||||
frame->HighLight( DC );
|
||||
|
||||
pcb->PopHighLight();
|
||||
|
||||
|
@ -83,7 +108,7 @@ TRACK* PCB_EDIT_FRAME::Begin_Route( TRACK* aTrack, wxDC* aDC )
|
|||
|
||||
// erase old highlight
|
||||
if( GetBoard()->IsHighLightNetON() )
|
||||
High_Light( aDC );
|
||||
HighLight( aDC );
|
||||
|
||||
g_CurrentTrackList.PushBack( new TRACK( GetBoard() ) );
|
||||
g_CurrentTrackSegment->m_Flags = IS_NEW;
|
||||
|
@ -496,7 +521,7 @@ bool PCB_EDIT_FRAME::End_Route( TRACK* aTrack, wxDC* aDC )
|
|||
wxASSERT( g_CurrentTrackList.GetCount() == 0 );
|
||||
|
||||
if( GetBoard()->IsHighLightNetON() )
|
||||
High_Light( aDC );
|
||||
HighLight( aDC );
|
||||
|
||||
GetBoard()->PopHighLight();
|
||||
|
||||
|
|
|
@ -1,5 +1,29 @@
|
|||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2007 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com
|
||||
* Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.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
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file surbrill.cpp
|
||||
* @file highlight.cpp
|
||||
* @brief Highlight nets.
|
||||
*/
|
||||
|
||||
|
@ -21,12 +45,6 @@
|
|||
#define Pad_fill ( Pad_Fill_Item.State == RUN )
|
||||
|
||||
|
||||
/**
|
||||
* Function ListNetsAndSelect
|
||||
* called by a command event
|
||||
* displays the sorted list of nets in a dialog frame
|
||||
* If a net is selected, it is highlighted
|
||||
*/
|
||||
void PCB_EDIT_FRAME::ListNetsAndSelect( wxCommandEvent& event )
|
||||
{
|
||||
NETINFO_ITEM* net;
|
||||
|
@ -86,23 +104,20 @@ void PCB_EDIT_FRAME::ListNetsAndSelect( wxCommandEvent& event )
|
|||
INSTALL_UNBUFFERED_DC( dc, DrawPanel );
|
||||
|
||||
if( GetBoard()->IsHighLightNetON() )
|
||||
High_Light( &dc );
|
||||
HighLight( &dc );
|
||||
|
||||
GetBoard()->SetHighLightNet( netcode );
|
||||
High_Light( &dc );
|
||||
HighLight( &dc );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Locate track or pad and highlight the corresponding net
|
||||
* Returns the Netcode, or -1 if no net located.
|
||||
*/
|
||||
int PCB_EDIT_FRAME::Select_High_Light( wxDC* DC )
|
||||
int PCB_EDIT_FRAME::SelectHighLight( wxDC* DC )
|
||||
{
|
||||
int netcode = -1;
|
||||
|
||||
if( GetBoard()->IsHighLightNetON() )
|
||||
High_Light( DC );
|
||||
HighLight( DC );
|
||||
|
||||
// use this scheme because a pad is a higher priority than a track in the
|
||||
// search, and finding a pad, instead of a track on a pad,
|
||||
|
@ -147,7 +162,7 @@ int PCB_EDIT_FRAME::Select_High_Light( wxDC* DC )
|
|||
if( netcode >= 0 )
|
||||
{
|
||||
GetBoard()->SetHighLightNet( netcode );
|
||||
High_Light( DC );
|
||||
HighLight( DC );
|
||||
}
|
||||
|
||||
|
||||
|
@ -155,12 +170,7 @@ int PCB_EDIT_FRAME::Select_High_Light( wxDC* DC )
|
|||
}
|
||||
|
||||
|
||||
/*
|
||||
* Highlight command.
|
||||
*
|
||||
* Show or removes the net at the current cursor position.
|
||||
*/
|
||||
void PCB_EDIT_FRAME::High_Light( wxDC* DC )
|
||||
void PCB_EDIT_FRAME::HighLight( wxDC* DC )
|
||||
{
|
||||
if( GetBoard()->IsHighLightNetON() )
|
||||
GetBoard()->HighLightOFF();
|
|
@ -1,3 +1,28 @@
|
|||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2006 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com
|
||||
* Copyright (C) 2011 Wayne Stambaugh <stambaughw@verizon.net>
|
||||
* Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.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
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file move_or_drag_track.cpp
|
||||
* @brief Track editing routines to move and drag track segments or node.
|
||||
|
@ -143,7 +168,7 @@ static void Show_MoveNode( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aPo
|
|||
TRACK* Track;
|
||||
BASE_SCREEN* screen = aPanel->GetScreen();
|
||||
int track_fill_copy = DisplayOpt.DisplayPcbTrackFill;
|
||||
int draw_mode = GR_XOR | GR_SURBRILL;
|
||||
int draw_mode = GR_XOR | GR_HIGHLIGHT;
|
||||
|
||||
DisplayOpt.DisplayPcbTrackFill = false;
|
||||
|
||||
|
@ -286,7 +311,7 @@ static void Show_Drag_Track_Segment_With_Cte_Slope( EDA_DRAW_PANEL* aPanel, wxDC
|
|||
}
|
||||
}
|
||||
|
||||
int draw_mode = GR_XOR | GR_SURBRILL;
|
||||
int draw_mode = GR_XOR | GR_HIGHLIGHT;
|
||||
|
||||
/* Undraw the current moved track segments before modification*/
|
||||
|
||||
|
@ -664,7 +689,7 @@ void PCB_EDIT_FRAME::StartMoveOneNodeOrSegment( TRACK* aTrack, wxDC* aDC, int aC
|
|||
GetBoard()->PushHighLight();
|
||||
|
||||
if( GetBoard()->IsHighLightNetON() )
|
||||
High_Light( aDC );
|
||||
HighLight( aDC );
|
||||
|
||||
PosInit = GetScreen()->GetCrossHairPosition();
|
||||
|
||||
|
@ -895,7 +920,7 @@ void PCB_EDIT_FRAME::Start_DragTrackSegmentAndKeepSlope( TRACK* track, wxDC* DC
|
|||
GetBoard()->PushHighLight();
|
||||
|
||||
if( GetBoard()->IsHighLightNetON() )
|
||||
High_Light( DC );
|
||||
HighLight( DC );
|
||||
|
||||
EraseDragList();
|
||||
|
||||
|
@ -988,7 +1013,7 @@ bool PCB_EDIT_FRAME::PlaceDraggedOrMovedTrackSegment( TRACK* Track, wxDC* DC )
|
|||
}
|
||||
}
|
||||
|
||||
int draw_mode = GR_OR | GR_SURBRILL;
|
||||
int draw_mode = GR_OR | GR_HIGHLIGHT;
|
||||
|
||||
// DRC Ok: place track segments
|
||||
Track->m_Flags = 0;
|
||||
|
@ -1028,7 +1053,7 @@ bool PCB_EDIT_FRAME::PlaceDraggedOrMovedTrackSegment( TRACK* Track, wxDC* DC )
|
|||
s_ItemsListPicker.ClearItemsList(); // s_ItemsListPicker is no more owner of picked items
|
||||
|
||||
if( GetBoard()->IsHighLightNetON() )
|
||||
High_Light( DC );
|
||||
HighLight( DC );
|
||||
|
||||
GetBoard()->PopHighLight();
|
||||
|
||||
|
|
|
@ -1,3 +1,28 @@
|
|||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2007 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com
|
||||
* Copyright (C) 2011 Wayne Stambaugh <stambaughw@verizon.net>
|
||||
* Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.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
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file pcbnew/onleftclick.cpp
|
||||
* @brief Functions called when the left button is clicked or double clicked.
|
||||
|
@ -156,12 +181,14 @@ void PCB_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition )
|
|||
|
||||
case ID_PCB_HIGHLIGHT_BUTT:
|
||||
{
|
||||
int netcode = Select_High_Light( aDC );
|
||||
int netcode = SelectHighLight( aDC );
|
||||
|
||||
if( netcode < 0 )
|
||||
GetBoard()->DisplayInfo( this );
|
||||
else
|
||||
{
|
||||
NETINFO_ITEM* net = GetBoard()->FindNet( netcode );
|
||||
|
||||
if( net )
|
||||
net->DisplayInfo( this );
|
||||
}
|
||||
|
@ -174,6 +201,7 @@ void PCB_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition )
|
|||
|
||||
if( DrawStruct )
|
||||
SendMessageToEESCHEMA( DrawStruct );
|
||||
|
||||
break;
|
||||
|
||||
case ID_PCB_MIRE_BUTT:
|
||||
|
|
|
@ -1,3 +1,28 @@
|
|||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2006 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com
|
||||
* Copyright (C) 2011 Wayne Stambaugh <stambaughw@verizon.net>
|
||||
* Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.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
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file solve.cpp
|
||||
*/
|
||||
|
@ -301,8 +326,8 @@ int PCB_EDIT_FRAME::Solve( wxDC* DC, int two_sides )
|
|||
segm_fY,
|
||||
0,
|
||||
WHITE | GR_XOR );
|
||||
pt_cur_ch->m_PadStart->Draw( DrawPanel, DC, GR_OR | GR_SURBRILL );
|
||||
pt_cur_ch->m_PadEnd->Draw( DrawPanel, DC, GR_OR | GR_SURBRILL );
|
||||
pt_cur_ch->m_PadStart->Draw( DrawPanel, DC, GR_OR | GR_HIGHLIGHT );
|
||||
pt_cur_ch->m_PadEnd->Draw( DrawPanel, DC, GR_OR | GR_HIGHLIGHT );
|
||||
|
||||
success = Autoroute_One_Track( this,
|
||||
DC,
|
||||
|
|
|
@ -1,3 +1,28 @@
|
|||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2006 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com
|
||||
* Copyright (C) 2011 Wayne Stambaugh <stambaughw@verizon.net>
|
||||
* Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.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
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file tr_modif.cpp
|
||||
* @brief Trace editing.
|
||||
|
@ -213,7 +238,7 @@ int PCB_EDIT_FRAME::EraseRedundantTrack( wxDC* aDC,
|
|||
/* Marked track can be erased. */
|
||||
TRACK* NextS;
|
||||
|
||||
DrawTraces( DrawPanel, aDC, pt_del, nb_segm, GR_XOR | GR_SURBRILL );
|
||||
DrawTraces( DrawPanel, aDC, pt_del, nb_segm, GR_XOR | GR_HIGHLIGHT );
|
||||
|
||||
for( jj = 0; jj < nb_segm; jj++, pt_del = NextS )
|
||||
{
|
||||
|
|
|
@ -1,3 +1,28 @@
|
|||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2006 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com
|
||||
* Copyright (C) 2011 Wayne Stambaugh <stambaughw@verizon.net>
|
||||
* Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.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
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file tracepcb.cpp
|
||||
* @brief Functions to redraw the current board.
|
||||
|
@ -212,9 +237,9 @@ void BOARD::DrawHighLight( EDA_DRAW_PANEL* aDrawPanel, wxDC* DC, int aNetCode )
|
|||
int draw_mode;
|
||||
|
||||
if( IsHighLightNetON() )
|
||||
draw_mode = GR_SURBRILL | GR_OR;
|
||||
draw_mode = GR_HIGHLIGHT | GR_OR;
|
||||
else
|
||||
draw_mode = GR_AND | GR_SURBRILL;
|
||||
draw_mode = GR_AND | GR_HIGHLIGHT;
|
||||
|
||||
// Redraw ZONE_CONTAINERS
|
||||
BOARD::ZONE_CONTAINERS& zones = m_ZoneDescriptorList;
|
||||
|
|
|
@ -1,3 +1,28 @@
|
|||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2007 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com
|
||||
* Copyright (C) 2011 Wayne Stambaugh <stambaughw@verizon.net>
|
||||
* Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.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
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file zones_by_polygon.cpp
|
||||
*/
|
||||
|
@ -35,7 +60,7 @@ static void Show_Zone_Corner_Or_Outline_While_Move_Mouse( EDA_DRAW_PANEL* aPanel
|
|||
/* Local variables */
|
||||
static wxPoint s_CornerInitialPosition; // Used to abort a move corner command
|
||||
static bool s_CornerIsNew; // Used to abort a move corner command (if it is a new corner, it must be deleted)
|
||||
static bool s_AddCutoutToCurrentZone; // if true, the next outline will be addes to s_CurrentZone
|
||||
static bool s_AddCutoutToCurrentZone; // if true, the next outline will be added to s_CurrentZone
|
||||
static ZONE_CONTAINER* s_CurrentZone; // if != NULL, these ZONE_CONTAINER params will be used for the next zone
|
||||
static wxPoint s_CursorLastPosition; // in move zone outline, last cursor position. Used to calculate the move vector
|
||||
static PICKED_ITEMS_LIST s_PickedList; // a picked list to save zones for undo/redo command
|
||||
|
@ -44,17 +69,11 @@ static PICKED_ITEMS_LIST _AuxiliaryList; // a picked list to store zo
|
|||
#include "dialog_copper_zones.h"
|
||||
|
||||
|
||||
/**
|
||||
* Function Add_Similar_Zone
|
||||
* Add a zone to a given zone outline.
|
||||
* if the zones are overlappeing they will be merged
|
||||
* @param DC = current Device Context
|
||||
* @param zone_container = parent zone outline
|
||||
*/
|
||||
void PCB_EDIT_FRAME::Add_Similar_Zone( wxDC* DC, ZONE_CONTAINER* zone_container )
|
||||
{
|
||||
if ( zone_container == NULL )
|
||||
return;
|
||||
|
||||
s_AddCutoutToCurrentZone = false;
|
||||
s_CurrentZone = zone_container;
|
||||
|
||||
|
@ -68,12 +87,6 @@ void PCB_EDIT_FRAME::Add_Similar_Zone( wxDC* DC, ZONE_CONTAINER* zone_container
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Function Add_Zone_Cutout
|
||||
* Add a cutout zone to a given zone outline
|
||||
* @param DC = current Device Context
|
||||
* @param zone_container = parent zone outline
|
||||
*/
|
||||
void PCB_EDIT_FRAME::Add_Zone_Cutout( wxDC* DC, ZONE_CONTAINER* zone_container )
|
||||
{
|
||||
if ( zone_container == NULL )
|
||||
|
@ -92,11 +105,6 @@ void PCB_EDIT_FRAME::Add_Zone_Cutout( wxDC* DC, ZONE_CONTAINER* zone_container )
|
|||
}
|
||||
|
||||
|
||||
/** Used **only** while creating a new zone outline
|
||||
* Remove and delete the current outline segment in progress
|
||||
* @return 0 if no corner in list, or corner number
|
||||
* if no corner in list, close the outline creation
|
||||
*/
|
||||
int PCB_EDIT_FRAME::Delete_LastCreatedCorner( wxDC* DC )
|
||||
{
|
||||
ZONE_CONTAINER* zone = GetBoard()->m_CurrentZoneContour;
|
||||
|
@ -151,11 +159,6 @@ static void Abort_Zone_Create_Outline( EDA_DRAW_PANEL* Panel, wxDC* DC )
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Function Start_Move_Zone_Corner
|
||||
* Initialise parametres to move an existing corner of a zone.
|
||||
* if IsNewCorner is true, the Abort_Zone_Move_Corner_Or_Outlines will remove this corner, if called
|
||||
*/
|
||||
void PCB_EDIT_FRAME::Start_Move_Zone_Corner( wxDC* DC, ZONE_CONTAINER* zone_container,
|
||||
int corner_id, bool IsNewCorner )
|
||||
{
|
||||
|
@ -163,14 +166,14 @@ void PCB_EDIT_FRAME::Start_Move_Zone_Corner( wxDC* DC, ZONE_CONTAINER* zone_cont
|
|||
{
|
||||
if( GetBoard()->IsHighLightNetON() && DC )
|
||||
{
|
||||
High_Light( DC ); // Remove old hightlight selection
|
||||
HighLight( DC ); // Remove old highlight selection
|
||||
}
|
||||
|
||||
g_Zone_Default_Setting.m_NetcodeSelection = zone_container->GetNet();
|
||||
GetBoard()->SetHighLightNet( zone_container->GetNet() );
|
||||
|
||||
if( DC )
|
||||
High_Light( DC );
|
||||
HighLight( DC );
|
||||
}
|
||||
|
||||
|
||||
|
@ -201,10 +204,6 @@ void PCB_EDIT_FRAME::Start_Move_Zone_Corner( wxDC* DC, ZONE_CONTAINER* zone_cont
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Function Start_Move_Zone_Drag_Outline_Edge
|
||||
* Prepares a drag edge for an existing zone outline,
|
||||
*/
|
||||
void PCB_EDIT_FRAME::Start_Move_Zone_Drag_Outline_Edge( wxDC* DC,
|
||||
ZONE_CONTAINER* zone_container,
|
||||
int corner_id )
|
||||
|
@ -224,10 +223,6 @@ void PCB_EDIT_FRAME::Start_Move_Zone_Drag_Outline_Edge( wxDC* DC,
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Function Start_Move_Zone_Outlines
|
||||
* Initialise parametres to move an existing zone outlines.
|
||||
*/
|
||||
void PCB_EDIT_FRAME::Start_Move_Zone_Outlines( wxDC* DC, ZONE_CONTAINER* zone_container )
|
||||
{
|
||||
/* Show the Net */
|
||||
|
@ -235,12 +230,12 @@ void PCB_EDIT_FRAME::Start_Move_Zone_Outlines( wxDC* DC, ZONE_CONTAINER* zone_co
|
|||
{
|
||||
if( GetBoard()->IsHighLightNetON() )
|
||||
{
|
||||
High_Light( DC ); // Remove old hightlight selection
|
||||
HighLight( DC ); // Remove old highlight selection
|
||||
}
|
||||
|
||||
g_Zone_Default_Setting.m_NetcodeSelection = zone_container->GetNet();
|
||||
GetBoard()->SetHighLightNet( zone_container->GetNet() );
|
||||
High_Light( DC );
|
||||
HighLight( DC );
|
||||
}
|
||||
|
||||
s_PickedList.ClearListAndDeleteItems();
|
||||
|
@ -258,12 +253,6 @@ void PCB_EDIT_FRAME::Start_Move_Zone_Outlines( wxDC* DC, ZONE_CONTAINER* zone_co
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Function End_Move_Zone_Corner_Or_Outlines
|
||||
* Terminates a move corner in a zone outline, or a move zone outlines
|
||||
* @param DC = current Device Context (can be NULL)
|
||||
* @param zone_container: the given zone
|
||||
*/
|
||||
void PCB_EDIT_FRAME::End_Move_Zone_Corner_Or_Outlines( wxDC* DC, ZONE_CONTAINER* zone_container )
|
||||
{
|
||||
zone_container->m_Flags = 0;
|
||||
|
@ -302,14 +291,6 @@ void PCB_EDIT_FRAME::End_Move_Zone_Corner_Or_Outlines( wxDC* DC, ZONE_CONTAINER*
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Function Remove_Zone_Corner
|
||||
* Remove the currently selected corner in a zone outline
|
||||
* the .m_CornerSelection is used as corner selection
|
||||
* @param DC = Current device context (can be NULL )
|
||||
* @param zone_container = the zone that contains the selected corner
|
||||
* the member .m_CornerSelection is used as selected corner
|
||||
*/
|
||||
void PCB_EDIT_FRAME::Remove_Zone_Corner( wxDC* DC, ZONE_CONTAINER* zone_container )
|
||||
{
|
||||
OnModify();
|
||||
|
@ -358,7 +339,7 @@ void PCB_EDIT_FRAME::Remove_Zone_Corner( wxDC* DC, ZONE_CONTAINER* zone_containe
|
|||
int ii = GetBoard()->GetAreaIndex( zone_container ); // test if zone_container exists
|
||||
|
||||
if( ii < 0 )
|
||||
zone_container = NULL; // zone_container does not exist anymaore, after combining zones
|
||||
zone_container = NULL; // zone_container does not exist anymore, after combining zones
|
||||
|
||||
int error_count = GetBoard()->Test_Drc_Areas_Outlines_To_Areas_Outlines( zone_container, true );
|
||||
|
||||
|
@ -453,15 +434,7 @@ void Show_Zone_Corner_Or_Outline_While_Move_Mouse( EDA_DRAW_PANEL* aPanel, wxDC*
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Function Begin_Zone
|
||||
* either initializes the first segment of a new zone, or adds an
|
||||
* intermediate segment.
|
||||
* A new zone can be:
|
||||
* created from scratch: the user will be prompted to define parameters (layer, clearence ...)
|
||||
* created from a similar zone (s_CurrentZone is used): parameters are copied from s_CurrentZone
|
||||
* created as a cutout (an hole) inside s_CurrentZone
|
||||
*/
|
||||
|
||||
int PCB_EDIT_FRAME::Begin_Zone( wxDC* DC )
|
||||
{
|
||||
// verify if s_CurrentZone exists (could be deleted since last selection) :
|
||||
|
@ -479,7 +452,7 @@ int PCB_EDIT_FRAME::Begin_Zone( wxDC* DC )
|
|||
s_CurrentZone = NULL;
|
||||
}
|
||||
|
||||
// If no zone contour in progress, a new zone is beeing created:
|
||||
// If no zone contour in progress, a new zone is being created:
|
||||
if( GetBoard()->m_CurrentZoneContour == NULL )
|
||||
GetBoard()->m_CurrentZoneContour = new ZONE_CONTAINER( GetBoard() );
|
||||
|
||||
|
@ -490,7 +463,7 @@ int PCB_EDIT_FRAME::Begin_Zone( wxDC* DC )
|
|||
if( s_CurrentZone == NULL ) // A new outline is created, from scratch
|
||||
{
|
||||
int diag;
|
||||
// Init zone params to reasonnable values
|
||||
// Init zone params to reasonable values
|
||||
zone->SetLayer( getActiveLayer() );
|
||||
|
||||
// Prompt user for parameters:
|
||||
|
@ -528,7 +501,7 @@ int PCB_EDIT_FRAME::Begin_Zone( wxDC* DC )
|
|||
if( diag == ZONE_ABORT )
|
||||
return 0;
|
||||
|
||||
// Switch active layer to the selectec zonz layer
|
||||
// Switch active layer to the selected zone layer
|
||||
setActiveLayer( g_Zone_Default_Setting.m_CurrentZone_Layer );
|
||||
}
|
||||
else // Start a new contour: init zone params (net and layer) from an existing
|
||||
|
@ -546,11 +519,11 @@ int PCB_EDIT_FRAME::Begin_Zone( wxDC* DC )
|
|||
|
||||
if( GetBoard()->IsHighLightNetON() )
|
||||
{
|
||||
High_Light( DC ); // Remove old hightlight selection
|
||||
HighLight( DC ); // Remove old highlight selection
|
||||
}
|
||||
|
||||
GetBoard()->SetHighLightNet( g_Zone_Default_Setting.m_NetcodeSelection );
|
||||
High_Light( DC );
|
||||
HighLight( DC );
|
||||
}
|
||||
|
||||
if( !s_AddCutoutToCurrentZone )
|
||||
|
@ -605,14 +578,6 @@ int PCB_EDIT_FRAME::Begin_Zone( wxDC* DC )
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Function End_Zone
|
||||
* Terminates a zone outline creation
|
||||
* terminates (if no DRC error ) the zone edge creation process
|
||||
* @param DC = current Device Context
|
||||
* @return true if Ok, false if DRC error
|
||||
* if ok, put it in the main list GetBoard()->m_ZoneDescriptorList (a vector<ZONE_CONTAINER*>)
|
||||
*/
|
||||
bool PCB_EDIT_FRAME::End_Zone( wxDC* DC )
|
||||
{
|
||||
ZONE_CONTAINER* zone = GetBoard()->m_CurrentZoneContour;
|
||||
|
@ -684,7 +649,7 @@ bool PCB_EDIT_FRAME::End_Zone( wxDC* DC )
|
|||
s_AddCutoutToCurrentZone = false;
|
||||
s_CurrentZone = NULL;
|
||||
|
||||
GetScreen()->SetCurItem( NULL ); // This outine can be deleted when merging outlines
|
||||
GetScreen()->SetCurItem( NULL ); // This outline can be deleted when merging outlines
|
||||
|
||||
// Combine zones if possible :
|
||||
GetBoard()->AreaPolygonModified( &_AuxiliaryList, zone, true, s_Verbose );
|
||||
|
@ -736,7 +701,7 @@ static void Show_New_Edge_While_Move_Mouse( EDA_DRAW_PANEL* aPanel, wxDC* aDC,
|
|||
zone->DrawWhileCreateOutline( aPanel, aDC );
|
||||
}
|
||||
|
||||
/* Redraw the curent edge in its new position */
|
||||
/* Redraw the current edge in its new position */
|
||||
if( g_Zone_45_Only )
|
||||
{
|
||||
// calculate the new position as allowed
|
||||
|
@ -750,10 +715,6 @@ static void Show_New_Edge_While_Move_Mouse( EDA_DRAW_PANEL* aPanel, wxDC* aDC,
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Function Edit_Zone_Params
|
||||
* Edit params (layer, clearance, ...) for a zone outline
|
||||
*/
|
||||
void PCB_EDIT_FRAME::Edit_Zone_Params( wxDC* DC, ZONE_CONTAINER* zone_container )
|
||||
{
|
||||
int diag;
|
||||
|
@ -823,16 +784,6 @@ void PCB_EDIT_FRAME::Edit_Zone_Params( wxDC* DC, ZONE_CONTAINER* zone_container
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Function Delete_Zone_Contour
|
||||
* Remove the zone which include the segment aZone, or the zone which have the given time stamp.
|
||||
* A zone is a group of segments which have the same TimeStamp
|
||||
* @param DC = current Device Context (can be NULL)
|
||||
* @param zone_container = zone to modify
|
||||
* the member .m_CornerSelection is used to find the outline to remove.
|
||||
* if the outline is the main outline, all the zone_container is removed (deleted)
|
||||
* otherwise, the hole is deleted
|
||||
*/
|
||||
void PCB_EDIT_FRAME::Delete_Zone_Contour( wxDC* DC, ZONE_CONTAINER* zone_container )
|
||||
{
|
||||
int ncont = zone_container->m_Poly->GetContour( zone_container->m_CornerSelection );
|
||||
|
|
Loading…
Reference in New Issue