2017-10-31 16:38:01 +00:00
|
|
|
/*
|
|
|
|
* This program source code file is part of KiCad, a free EDA CAD application.
|
|
|
|
*
|
2022-03-19 00:17:07 +00:00
|
|
|
* Copyright (C) 1992-2022 KiCad Developers, see AUTHORS.txt for contributors.
|
2017-10-31 16:38:01 +00:00
|
|
|
*
|
|
|
|
* 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
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <pgm_base.h>
|
2021-09-14 22:45:14 +00:00
|
|
|
#include <kiface_base.h>
|
2017-10-31 16:38:01 +00:00
|
|
|
#include <confirm.h>
|
2018-01-29 20:58:58 +00:00
|
|
|
#include <pcb_edit_frame.h>
|
2017-10-31 16:38:01 +00:00
|
|
|
#include <eda_dde.h>
|
|
|
|
#include <wx/file.h>
|
|
|
|
#include <wx/snglinst.h>
|
2020-10-18 11:31:07 +00:00
|
|
|
#include <wx/app.h>
|
2020-11-12 20:19:22 +00:00
|
|
|
#include <board.h>
|
2017-10-31 16:38:01 +00:00
|
|
|
#include <fp_lib_table.h>
|
2018-01-31 12:37:36 +00:00
|
|
|
#include <footprint_viewer_frame.h>
|
2020-11-12 20:19:22 +00:00
|
|
|
#include <footprint.h>
|
2017-10-31 16:38:01 +00:00
|
|
|
#include <tools/pcb_actions.h>
|
2022-02-24 09:59:54 +00:00
|
|
|
#include <tools/zone_filler_tool.h>
|
2018-01-05 23:44:37 +00:00
|
|
|
#include <router/router_tool.h>
|
2017-10-31 16:38:01 +00:00
|
|
|
#include <dialog_find.h>
|
2020-01-12 20:30:58 +00:00
|
|
|
#include <dialog_filter_selection.h>
|
2017-10-31 16:38:01 +00:00
|
|
|
|
2020-10-06 09:22:07 +00:00
|
|
|
FP_LIB_TABLE GFootprintTable;
|
|
|
|
|
|
|
|
|
2022-03-19 00:17:07 +00:00
|
|
|
DIALOG_FIND::DIALOG_FIND( PCB_BASE_FRAME* aParent ) :
|
|
|
|
DIALOG_FIND_BASE( aParent )
|
2017-10-31 16:38:01 +00:00
|
|
|
{
|
2017-12-04 09:20:05 +00:00
|
|
|
// these members are initialized to avoid warnings about non initialized vars
|
2019-07-26 23:52:17 +00:00
|
|
|
m_frame = aParent;
|
2019-12-10 13:49:28 +00:00
|
|
|
m_hitList.clear();
|
|
|
|
m_it = m_hitList.begin();
|
|
|
|
m_upToDate = false;
|
2017-10-31 16:38:01 +00:00
|
|
|
}
|
|
|
|
|
2019-11-26 19:46:07 +00:00
|
|
|
void DIALOG_FIND::onFindNextClick( wxCommandEvent& aEvent )
|
2017-10-31 16:38:01 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2019-11-26 19:46:07 +00:00
|
|
|
void DIALOG_FIND::onFindPreviousClick( wxCommandEvent& aEvent )
|
2017-10-31 16:38:01 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2019-11-26 19:46:07 +00:00
|
|
|
void DIALOG_FIND::onSearchAgainClick( wxCommandEvent& aEvent )
|
2017-10-31 16:38:01 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2019-11-26 19:46:07 +00:00
|
|
|
void DIALOG_FIND::onTextEnter( wxCommandEvent& event )
|
2017-10-31 16:38:01 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2021-07-22 14:55:55 +00:00
|
|
|
void DIALOG_FIND::OnCloseButtonClick( wxCommandEvent& aEvent )
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2021-12-06 19:08:23 +00:00
|
|
|
bool DIALOG_FIND::Show( bool show )
|
|
|
|
{
|
2021-12-07 21:33:08 +00:00
|
|
|
return true;
|
2021-12-06 19:08:23 +00:00
|
|
|
}
|
|
|
|
|
2021-07-22 14:55:55 +00:00
|
|
|
void DIALOG_FIND::OnClose( wxCloseEvent& aEvent )
|
2017-10-31 16:38:01 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-01-12 21:30:30 +00:00
|
|
|
DIALOG_FIND_BASE::DIALOG_FIND_BASE( wxWindow* parent, wxWindowID id, const wxString& title,
|
|
|
|
const wxPoint& pos, const wxSize& size, long style ) :
|
|
|
|
DIALOG_SHIM( parent, id, title, pos, size, style )
|
2017-10-31 16:38:01 +00:00
|
|
|
{
|
2017-12-04 09:20:05 +00:00
|
|
|
// these members are initialized only to avoid warnings about non initialized vars
|
2020-01-12 21:30:30 +00:00
|
|
|
searchStringLabel = nullptr;
|
|
|
|
m_searchCombo = nullptr;
|
|
|
|
m_matchCase = nullptr;
|
|
|
|
m_matchWords = nullptr;
|
|
|
|
m_wildcards = nullptr;
|
|
|
|
m_wrap = nullptr;
|
|
|
|
m_includeValues = nullptr;
|
|
|
|
m_includeReferences = nullptr;
|
|
|
|
m_includeTexts = nullptr;
|
|
|
|
m_includeMarkers = nullptr;
|
2022-03-11 13:28:00 +00:00
|
|
|
m_includeNets = nullptr;
|
2020-01-12 21:30:30 +00:00
|
|
|
m_findNext = nullptr;
|
|
|
|
m_findPrevious = nullptr;
|
|
|
|
m_searchAgain = nullptr;
|
|
|
|
m_closeButton = nullptr;
|
2020-07-20 12:51:17 +00:00
|
|
|
m_status = nullptr;
|
2017-10-31 16:38:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
DIALOG_FIND_BASE::~DIALOG_FIND_BASE()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-11-13 15:15:52 +00:00
|
|
|
FOOTPRINT* PCB_BASE_FRAME::GetFootprintFromBoardByReference()
|
2017-10-31 16:38:01 +00:00
|
|
|
{
|
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-01-12 20:52:19 +00:00
|
|
|
DIALOG_FILTER_SELECTION_BASE::DIALOG_FILTER_SELECTION_BASE( wxWindow* parent, wxWindowID id,
|
|
|
|
const wxString& title,
|
|
|
|
const wxPoint& pos, const wxSize& size,
|
|
|
|
long style ) :
|
|
|
|
DIALOG_SHIM( parent, id, title, pos, size, style )
|
2017-10-31 16:38:01 +00:00
|
|
|
{
|
2017-12-04 09:20:05 +00:00
|
|
|
// these members are initialized only to avoid warnings about non initialized vars
|
|
|
|
m_Include_Modules = nullptr;
|
2021-10-29 09:56:14 +00:00
|
|
|
m_Include_PcbTexts = nullptr;
|
2017-12-04 09:20:05 +00:00
|
|
|
m_IncludeLockedModules = nullptr;
|
|
|
|
m_Include_Draw_Items = nullptr;
|
|
|
|
m_Include_Tracks = nullptr;
|
2018-03-17 13:51:16 +00:00
|
|
|
m_Include_Vias = nullptr;
|
2017-12-04 09:20:05 +00:00
|
|
|
m_Include_Edges_Items = nullptr;
|
|
|
|
m_Include_Zones = nullptr;
|
|
|
|
m_sdbSizer1 = nullptr;
|
2020-01-12 20:52:19 +00:00
|
|
|
m_staticLine = nullptr;
|
2017-12-04 09:20:05 +00:00
|
|
|
m_sdbSizer1OK = nullptr;
|
|
|
|
m_sdbSizer1Cancel = nullptr;
|
2017-10-31 16:38:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-01-12 20:52:19 +00:00
|
|
|
DIALOG_FILTER_SELECTION_BASE::~DIALOG_FILTER_SELECTION_BASE()
|
2017-10-31 16:38:01 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-01-12 20:52:19 +00:00
|
|
|
DIALOG_FILTER_SELECTION::DIALOG_FILTER_SELECTION( PCB_BASE_FRAME* aParent, OPTIONS& aOptions ) :
|
|
|
|
DIALOG_FILTER_SELECTION_BASE( aParent ),
|
|
|
|
m_options( aOptions )
|
2017-10-31 16:38:01 +00:00
|
|
|
{
|
2018-08-04 10:33:33 +00:00
|
|
|
// silence another compiler warning about m_options not being used
|
|
|
|
if( m_options.includeModules )
|
2020-01-12 20:52:19 +00:00
|
|
|
{
|
|
|
|
}
|
2017-10-31 16:38:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-01-12 20:30:58 +00:00
|
|
|
void DIALOG_FILTER_SELECTION::checkBoxClicked( wxCommandEvent& aEvent )
|
2017-10-31 16:38:01 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2021-10-29 09:56:14 +00:00
|
|
|
void DIALOG_FILTER_SELECTION::allItemsClicked( wxCommandEvent& aEvent )
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2021-07-22 16:18:12 +00:00
|
|
|
bool DIALOG_FILTER_SELECTION::TransferDataFromWindow()
|
2017-10-31 16:38:01 +00:00
|
|
|
{
|
2021-07-22 16:18:12 +00:00
|
|
|
return true;
|
2017-10-31 16:38:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2018-01-05 23:44:37 +00:00
|
|
|
void ROUTER_TOOL::NeighboringSegmentFilter( const VECTOR2I&, GENERAL_COLLECTOR& )
|
|
|
|
{
|
|
|
|
}
|
2019-01-21 18:42:06 +00:00
|
|
|
|
2020-10-06 09:22:07 +00:00
|
|
|
|
|
|
|
|
2020-12-16 13:31:32 +00:00
|
|
|
#include <tools/pcb_selection_tool.h>
|
2020-10-06 09:22:07 +00:00
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Private implementation of firewalled private data
|
|
|
|
*/
|
2020-12-16 13:31:32 +00:00
|
|
|
class PCB_SELECTION_TOOL::PRIV
|
2020-10-06 09:22:07 +00:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
DIALOG_FILTER_SELECTION::OPTIONS m_filterOpts;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2020-12-16 13:31:32 +00:00
|
|
|
PCB_SELECTION_TOOL::PCB_SELECTION_TOOL() :
|
2020-10-06 09:22:07 +00:00
|
|
|
PCB_TOOL_BASE( "pcbnew.InteractiveSelection" ),
|
|
|
|
m_frame( NULL ),
|
|
|
|
m_enteredGroup( NULL ),
|
2021-09-06 02:28:33 +00:00
|
|
|
m_nonModifiedCursor( KICURSOR::ARROW ),
|
2020-10-06 09:22:07 +00:00
|
|
|
m_priv( nullptr )
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-12-16 13:31:32 +00:00
|
|
|
PCB_SELECTION_TOOL::~PCB_SELECTION_TOOL()
|
2020-10-06 09:22:07 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-12-16 13:31:32 +00:00
|
|
|
bool PCB_SELECTION_TOOL::Init()
|
2020-10-06 09:22:07 +00:00
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-12-16 13:31:32 +00:00
|
|
|
void PCB_SELECTION_TOOL::Reset( RESET_REASON aReason )
|
2020-10-06 09:22:07 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-12-16 13:31:32 +00:00
|
|
|
int PCB_SELECTION_TOOL::Main( const TOOL_EVENT& aEvent )
|
2020-10-06 09:22:07 +00:00
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-12-16 13:31:32 +00:00
|
|
|
void PCB_SELECTION_TOOL::EnterGroup()
|
2020-10-06 09:22:07 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-12-16 13:31:32 +00:00
|
|
|
void PCB_SELECTION_TOOL::ExitGroup( bool aSelectGroup )
|
2020-10-06 09:22:07 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-12-16 13:31:32 +00:00
|
|
|
PCB_SELECTION& PCB_SELECTION_TOOL::GetSelection()
|
2020-10-06 09:22:07 +00:00
|
|
|
{
|
|
|
|
return m_selection;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-12-16 13:31:32 +00:00
|
|
|
PCB_SELECTION& PCB_SELECTION_TOOL::RequestSelection( CLIENT_SELECTION_FILTER aClientFilter,
|
|
|
|
bool aConfirmLockedItems )
|
2020-10-06 09:22:07 +00:00
|
|
|
{
|
|
|
|
return m_selection;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-12-16 13:31:32 +00:00
|
|
|
const GENERAL_COLLECTORS_GUIDE PCB_SELECTION_TOOL::getCollectorsGuide() const
|
2020-10-06 09:22:07 +00:00
|
|
|
{
|
2020-10-07 17:32:07 +00:00
|
|
|
return GENERAL_COLLECTORS_GUIDE( LSET(), PCB_LAYER_ID::UNDEFINED_LAYER, nullptr );
|
2020-10-06 09:22:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-12-16 13:31:32 +00:00
|
|
|
bool PCB_SELECTION_TOOL::selectPoint( const VECTOR2I& aWhere, bool aOnDrag,
|
|
|
|
bool* aSelectionCancelledFlag,
|
|
|
|
CLIENT_SELECTION_FILTER aClientFilter )
|
2020-10-06 09:22:07 +00:00
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-12-16 13:31:32 +00:00
|
|
|
bool PCB_SELECTION_TOOL::selectCursor( bool aForceSelect, CLIENT_SELECTION_FILTER aClientFilter )
|
2020-10-06 09:22:07 +00:00
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-12-16 13:31:32 +00:00
|
|
|
bool PCB_SELECTION_TOOL::selectMultiple()
|
2020-10-06 09:22:07 +00:00
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-12-16 13:31:32 +00:00
|
|
|
int PCB_SELECTION_TOOL::CursorSelection( const TOOL_EVENT& aEvent )
|
2020-10-06 09:22:07 +00:00
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-12-16 13:31:32 +00:00
|
|
|
int PCB_SELECTION_TOOL::ClearSelection( const TOOL_EVENT& aEvent )
|
2020-10-06 09:22:07 +00:00
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-12-16 13:31:32 +00:00
|
|
|
int PCB_SELECTION_TOOL::SelectItems( const TOOL_EVENT& aEvent )
|
2020-10-06 09:22:07 +00:00
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-12-16 13:31:32 +00:00
|
|
|
int PCB_SELECTION_TOOL::SelectItem( const TOOL_EVENT& aEvent )
|
2020-10-06 09:22:07 +00:00
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-12-16 13:31:32 +00:00
|
|
|
int PCB_SELECTION_TOOL::SelectAll( const TOOL_EVENT& aEvent )
|
2020-10-06 09:22:07 +00:00
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-12-16 13:31:32 +00:00
|
|
|
void PCB_SELECTION_TOOL::AddItemToSel( BOARD_ITEM* aItem, bool aQuietMode )
|
2020-10-06 09:22:07 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-12-16 13:31:32 +00:00
|
|
|
int PCB_SELECTION_TOOL::UnselectItems( const TOOL_EVENT& aEvent )
|
2020-10-06 09:22:07 +00:00
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-12-16 13:31:32 +00:00
|
|
|
int PCB_SELECTION_TOOL::UnselectItem( const TOOL_EVENT& aEvent )
|
2020-10-06 09:22:07 +00:00
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-12-16 13:31:32 +00:00
|
|
|
void PCB_SELECTION_TOOL::RemoveItemFromSel( BOARD_ITEM* aItem, bool aQuietMode )
|
2020-10-06 09:22:07 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-12-16 13:31:32 +00:00
|
|
|
void PCB_SELECTION_TOOL::BrightenItem( BOARD_ITEM* aItem )
|
2020-10-06 09:22:07 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-12-16 13:31:32 +00:00
|
|
|
void PCB_SELECTION_TOOL::UnbrightenItem( BOARD_ITEM* aItem )
|
2020-10-06 09:22:07 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-12-16 13:31:32 +00:00
|
|
|
int PCB_SELECTION_TOOL::expandConnection( const TOOL_EVENT& aEvent )
|
2020-10-06 09:22:07 +00:00
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2022-01-16 20:29:03 +00:00
|
|
|
void PCB_SELECTION_TOOL::selectAllConnectedTracks(
|
|
|
|
const std::vector<BOARD_CONNECTED_ITEM*>& aStartItems, STOP_CONDITION aStopCondition )
|
2020-10-06 09:22:07 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-12-16 13:31:32 +00:00
|
|
|
void PCB_SELECTION_TOOL::selectAllItemsOnNet( int aNetCode, bool aSelect )
|
2020-10-06 09:22:07 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-12-16 13:31:32 +00:00
|
|
|
int PCB_SELECTION_TOOL::selectNet( const TOOL_EVENT& aEvent )
|
2020-10-06 09:22:07 +00:00
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-12-16 13:31:32 +00:00
|
|
|
void PCB_SELECTION_TOOL::selectAllItemsOnSheet( wxString& aSheetPath )
|
2020-10-06 09:22:07 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-12-16 13:31:32 +00:00
|
|
|
void PCB_SELECTION_TOOL::zoomFitSelection()
|
2020-10-06 09:22:07 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-12-16 13:31:32 +00:00
|
|
|
int PCB_SELECTION_TOOL::selectSheetContents( const TOOL_EVENT& aEvent )
|
2020-10-06 09:22:07 +00:00
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-12-16 13:31:32 +00:00
|
|
|
int PCB_SELECTION_TOOL::selectSameSheet( const TOOL_EVENT& aEvent )
|
2020-10-06 09:22:07 +00:00
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Function itemIsIncludedByFilter()
|
|
|
|
*
|
|
|
|
* Determine if an item is included by the filter specified
|
|
|
|
*
|
|
|
|
* @return true if aItem should be selected by this filter (i..e not filtered out)
|
|
|
|
*/
|
|
|
|
static bool itemIsIncludedByFilter( const BOARD_ITEM& aItem, const BOARD& aBoard,
|
|
|
|
const DIALOG_FILTER_SELECTION::OPTIONS& aFilterOptions )
|
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-12-16 13:31:32 +00:00
|
|
|
int PCB_SELECTION_TOOL::filterSelection( const TOOL_EVENT& aEvent )
|
2020-10-06 09:22:07 +00:00
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2021-09-24 17:57:22 +00:00
|
|
|
void PCB_SELECTION_TOOL::FilterCollectedItems( GENERAL_COLLECTOR& aCollector, bool aMultiSelect )
|
2020-10-06 09:22:07 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2021-09-24 17:57:22 +00:00
|
|
|
bool PCB_SELECTION_TOOL::itemPassesFilter( BOARD_ITEM* aItem, bool aMultiSelect )
|
2020-10-06 09:22:07 +00:00
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-12-16 13:31:32 +00:00
|
|
|
void PCB_SELECTION_TOOL::ClearSelection( bool aQuietMode )
|
2020-10-06 09:22:07 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-12-16 13:31:32 +00:00
|
|
|
void PCB_SELECTION_TOOL::RebuildSelection()
|
2020-10-06 09:22:07 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-12-16 13:31:32 +00:00
|
|
|
int PCB_SELECTION_TOOL::SelectionMenu( const TOOL_EVENT& aEvent )
|
2020-10-06 09:22:07 +00:00
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2021-01-02 15:38:56 +00:00
|
|
|
bool PCB_SELECTION_TOOL::doSelectionMenu( GENERAL_COLLECTOR* aCollector )
|
2020-10-06 09:22:07 +00:00
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-12-16 13:31:32 +00:00
|
|
|
bool PCB_SELECTION_TOOL::Selectable( const BOARD_ITEM* aItem, bool checkVisibilityOnly ) const
|
2020-10-06 09:22:07 +00:00
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-12-16 13:31:32 +00:00
|
|
|
void PCB_SELECTION_TOOL::select( BOARD_ITEM* aItem )
|
2020-10-06 09:22:07 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-12-16 13:31:32 +00:00
|
|
|
void PCB_SELECTION_TOOL::unselect( BOARD_ITEM* aItem )
|
2020-10-06 09:22:07 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2020-12-16 13:31:32 +00:00
|
|
|
void PCB_SELECTION_TOOL::highlight( BOARD_ITEM* aItem, int aMode, PCB_SELECTION* aGroup )
|
2020-10-06 09:22:07 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2020-12-29 12:33:37 +00:00
|
|
|
void PCB_SELECTION_TOOL::highlightInternal( BOARD_ITEM* aItem, int aMode, bool aUsingOverlay )
|
2020-10-06 09:22:07 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-12-16 13:31:32 +00:00
|
|
|
void PCB_SELECTION_TOOL::unhighlight( BOARD_ITEM* aItem, int aMode, PCB_SELECTION* aGroup )
|
2020-10-06 09:22:07 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-12-29 12:33:37 +00:00
|
|
|
void PCB_SELECTION_TOOL::unhighlightInternal( BOARD_ITEM* aItem, int aMode, bool aUsingOverlay )
|
2020-10-06 09:22:07 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-12-16 13:31:32 +00:00
|
|
|
bool PCB_SELECTION_TOOL::selectionContains( const VECTOR2I& aPoint ) const
|
2020-10-06 09:22:07 +00:00
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2020-12-16 13:31:32 +00:00
|
|
|
void PCB_SELECTION_TOOL::GuessSelectionCandidates( GENERAL_COLLECTOR& aCollector,
|
|
|
|
const VECTOR2I& aWhere ) const
|
2020-10-06 09:22:07 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-12-16 13:31:32 +00:00
|
|
|
int PCB_SELECTION_TOOL::updateSelection( const TOOL_EVENT& aEvent )
|
2020-10-06 09:22:07 +00:00
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-12-16 13:31:32 +00:00
|
|
|
int PCB_SELECTION_TOOL::UpdateMenu( const TOOL_EVENT& aEvent )
|
2020-10-06 09:22:07 +00:00
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-12-16 13:31:32 +00:00
|
|
|
void PCB_SELECTION_TOOL::setTransitions()
|
2021-09-24 17:57:22 +00:00
|
|
|
{
|
|
|
|
}
|
2020-10-06 09:22:07 +00:00
|
|
|
|
|
|
|
void PCB_TOOL_BASE::doInteractiveItemPlacement( const std::string& aTool,
|
|
|
|
INTERACTIVE_PLACER_BASE* aPlacer,
|
|
|
|
const wxString& aCommitMessage, int aOptions )
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bool PCB_TOOL_BASE::Init()
|
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void PCB_TOOL_BASE::Reset( RESET_REASON aReason )
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void PCB_TOOL_BASE::setTransitions()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2021-11-18 13:57:56 +00:00
|
|
|
bool PCB_TOOL_BASE::Is45Limited() const
|
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2022-02-24 09:59:54 +00:00
|
|
|
ZONE_FILLER_TOOL::ZONE_FILLER_TOOL() :
|
|
|
|
PCB_TOOL_BASE( "pcbnew.ZoneFiller" ),
|
|
|
|
m_fillInProgress( false )
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
ZONE_FILLER_TOOL::~ZONE_FILLER_TOOL()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void ZONE_FILLER_TOOL::Reset( RESET_REASON aReason )
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void ZONE_FILLER_TOOL::setTransitions()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2021-12-26 15:10:41 +00:00
|
|
|
PCBNEW_SETTINGS::DISPLAY_OPTIONS& PCB_TOOL_BASE::displayOptions() const
|
2020-10-06 09:22:07 +00:00
|
|
|
{
|
2021-12-26 15:10:41 +00:00
|
|
|
static PCBNEW_SETTINGS::DISPLAY_OPTIONS disp;
|
2020-10-07 17:32:07 +00:00
|
|
|
|
|
|
|
return disp;
|
2020-10-06 09:22:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
PCB_DRAW_PANEL_GAL* PCB_TOOL_BASE::canvas() const
|
|
|
|
{
|
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-12-16 13:31:32 +00:00
|
|
|
const PCB_SELECTION& PCB_TOOL_BASE::selection() const
|
2020-10-06 09:22:07 +00:00
|
|
|
{
|
2020-12-16 13:31:32 +00:00
|
|
|
static PCB_SELECTION sel;
|
2020-10-07 17:32:07 +00:00
|
|
|
|
|
|
|
return sel;
|
2020-10-06 09:22:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-12-16 13:31:32 +00:00
|
|
|
PCB_SELECTION& PCB_TOOL_BASE::selection()
|
2020-10-06 09:22:07 +00:00
|
|
|
{
|
2020-12-16 13:31:32 +00:00
|
|
|
static PCB_SELECTION sel;
|
2020-10-07 17:32:07 +00:00
|
|
|
|
|
|
|
return sel;
|
2020-10-06 09:22:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-12-16 13:31:32 +00:00
|
|
|
EDA_ITEM* PCB_SELECTION::GetTopLeftItem( bool onlyModules ) const
|
2020-10-06 09:22:07 +00:00
|
|
|
{
|
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2021-10-03 21:48:40 +00:00
|
|
|
const std::vector<KIGFX::VIEW_ITEM*> PCB_SELECTION::updateDrawList() const
|
2020-10-06 09:22:07 +00:00
|
|
|
{
|
|
|
|
std::vector<VIEW_ITEM*> items;
|
|
|
|
|
|
|
|
return items;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-12-16 13:31:32 +00:00
|
|
|
const LSET PCB_SELECTION::GetSelectionLayers()
|
2020-10-06 09:22:07 +00:00
|
|
|
{
|
|
|
|
return LSET();
|
|
|
|
}
|
|
|
|
|
2021-06-19 21:21:23 +00:00
|
|
|
#if 0
|
|
|
|
#include <3d_canvas/board_adapter.h>
|
|
|
|
|
|
|
|
BOARD_ADAPTER::BOARD_ADAPTER() {};
|
|
|
|
BOARD_ADAPTER::~BOARD_ADAPTER() {};
|
|
|
|
BBOX_3D::BBOX_3D(){};
|
|
|
|
BBOX_3D::~BBOX_3D(){};
|
|
|
|
TRACK_BALL::TRACK_BALL(float x) : CAMERA(x) {};
|
|
|
|
BVH_CONTAINER_2D::BVH_CONTAINER_2D() : CONTAINER_2D_BASE( OBJECT_2D_TYPE::POLYGON ) {};
|
|
|
|
BVH_CONTAINER_2D::~BVH_CONTAINER_2D() {};
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include <board_stackup_manager/stackup_predefined_prms.h>
|
|
|
|
|
|
|
|
const FAB_LAYER_COLOR* GetColorStandardList()
|
|
|
|
{
|
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
int GetColorStandardListCount()
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|