KiCad PCB EDA Suite
Loading...
Searching...
No Matches
pcb_control.cpp File Reference
#include <kiplatform/ui.h>
#include <tools/edit_tool.h>
#include <tools/board_inspection_tool.h>
#include <router/router_tool.h>
#include <pgm_base.h>
#include <tools/pcb_actions.h>
#include <tools/pcb_control.h>
#include <tools/pcb_picker_tool.h>
#include <tools/pcb_selection_tool.h>
#include <tools/board_reannotate_tool.h>
#include <3d_viewer/eda_3d_viewer_frame.h>
#include <board_commit.h>
#include <board.h>
#include <board_design_settings.h>
#include <board_item.h>
#include <dialogs/dialog_paste_special.h>
#include <pcb_dimension.h>
#include <gal/graphics_abstraction_layer.h>
#include <footprint.h>
#include <pcb_group.h>
#include <pcb_textbox.h>
#include <pcb_track.h>
#include <wildcards_and_files_ext.h>
#include <zone.h>
#include <confirm.h>
#include <connectivity/connectivity_data.h>
#include <core/kicad_algo.h>
#include <dialogs/hotkey_cycle_popup.h>
#include <kicad_clipboard.h>
#include <origin_viewitem.h>
#include <pcb_edit_frame.h>
#include <pcb_painter.h>
#include <string_utf8_map.h>
#include <settings/color_settings.h>
#include <string>
#include <tool/tool_manager.h>
#include <footprint_edit_frame.h>
#include <footprint_editor_settings.h>
#include <widgets/wx_progress_reporters.h>
#include <widgets/wx_infobar.h>
#include <wx/hyperlink.h>

Go to the source code of this file.

Macros

#define ALPHA_MIN   0.20
 
#define ALPHA_MAX   1.00
 
#define ALPHA_STEP   0.05
 
#define HITTEST_THRESHOLD_PIXELS   5
 

Functions

bool AskLoadBoardFileName (PCB_EDIT_FRAME *aParent, wxString *aFileName, int aCtl=0)
 Show a wxFileDialog asking for a BOARD filename to open. More...
 
template<class T >
void Flip (T &aValue)
 
static void pasteFootprintItemsToFootprintEditor (FOOTPRINT *aClipFootprint, BOARD *aBoard, std::vector< BOARD_ITEM * > &aPastedItems)
 
template<typename T >
static void moveUnflaggedItems (std::deque< T > &aList, std::vector< BOARD_ITEM * > &aTarget, bool aIsNew)
 
static void moveUnflaggedItems (ZONES &aList, std::vector< BOARD_ITEM * > &aTarget, bool aIsNew)
 

Macro Definition Documentation

◆ ALPHA_MAX

#define ALPHA_MAX   1.00

Definition at line 476 of file pcb_control.cpp.

◆ ALPHA_MIN

#define ALPHA_MIN   0.20

Definition at line 475 of file pcb_control.cpp.

◆ ALPHA_STEP

#define ALPHA_STEP   0.05

Definition at line 477 of file pcb_control.cpp.

◆ HITTEST_THRESHOLD_PIXELS

#define HITTEST_THRESHOLD_PIXELS   5

Definition at line 593 of file pcb_control.cpp.

Function Documentation

◆ AskLoadBoardFileName()

bool AskLoadBoardFileName ( PCB_EDIT_FRAME aParent,
wxString *  aFileName,
int  aCtl = 0 
)

Show a wxFileDialog asking for a BOARD filename to open.

Parameters
aParentis a wxFrame passed to wxFileDialog.
aCtlis where to put the OpenProjectFiles() control bits.
aFileNameon entry is a probable choice, on return is the chosen filename.
aKicadFilesOnlytrue to list KiCad pcb files plugins only, false to list import plugins.
Returns
true if chosen, else false if user aborted.

Definition at line 86 of file pcbnew/files.cpp.

References _, AddFileExtListToFilter(), formatWildcardExt(), PLUGIN::GetBoardFileDesc(), PATHS::GetDefaultUserProjectsPath(), EDA_BASE_FRAME::GetMruPath(), IO_MGR::PLUGIN_REGISTRY::Instance(), IO_MGR::KICAD_SEXP, KICTL_KICAD_ONLY, KICTL_NONKICAD_ONLY, IO_MGR::LEGACY, PLUGIN_FILE_DESC::m_FileExtensions, name, path, and EDA_BASE_FRAME::SetMruPath().

Referenced by PCB_CONTROL::AppendBoardFromFile(), PCB_EDIT_FRAME::Files_io_from_id(), and PCB_EDIT_FRAME::OnFileHistory().

◆ Flip()

◆ moveUnflaggedItems() [1/2]

template<typename T >
static void moveUnflaggedItems ( std::deque< T > &  aList,
std::vector< BOARD_ITEM * > &  aTarget,
bool  aIsNew 
)
static

Definition at line 1035 of file pcb_control.cpp.

Referenced by PCB_CONTROL::placeBoardItems().

◆ moveUnflaggedItems() [2/2]

static void moveUnflaggedItems ( ZONES aList,
std::vector< BOARD_ITEM * > &  aTarget,
bool  aIsNew 
)
static

Definition at line 1054 of file pcb_control.cpp.

References SKIP_STRUCT.

◆ pasteFootprintItemsToFootprintEditor()

static void pasteFootprintItemsToFootprintEditor ( FOOTPRINT aClipFootprint,
BOARD aBoard,
std::vector< BOARD_ITEM * > &  aPastedItems 
)
static