![]() |
KiCad PCB EDA Suite
|
#include <fctsys.h>
#include <class_drawpanel.h>
#include <pcb_edit_frame.h>
#include <pcbnew_id.h>
#include <class_board.h>
#include <class_module.h>
#include <class_zone.h>
#include <pcbnew.h>
#include <protos.h>
#include <collectors.h>
#include <menus_helpers.h>
Go to the source code of this file.
Functions | |
bool | Magnetize (PCB_BASE_EDIT_FRAME *frame, int aCurrentTool, wxSize aGridSize, wxPoint on_grid, wxPoint *curpos) |
Function Magnetize tests to see if there are any magnetic items within near reach of the given "curpos". More... | |
static BOARD_ITEM * | AllAreModulesAndReturnSmallestIfSo (GENERAL_COLLECTOR *aCollector) |
Function AllAreModulesAndReturnSmallestIfSo tests that all items in the collection are MODULEs and if so, returns the smallest MODULE. More... | |
|
static |
Function AllAreModulesAndReturnSmallestIfSo tests that all items in the collection are MODULEs and if so, returns the smallest MODULE.
Definition at line 55 of file pcbnew/controle.cpp.
References MODULE::GetBoundingBox(), COLLECTOR::GetCount(), EDA_RECT::GetHeight(), GENERAL_COLLECTOR::GetPrimaryCount(), EDA_RECT::GetWidth(), i, min, and PCB_MODULE_T.
Referenced by PCB_BASE_FRAME::PcbGeneralLocateAndDisplay().
bool Magnetize | ( | PCB_BASE_EDIT_FRAME * | frame, |
int | aCurrentTool, | ||
wxSize | aGridSize, | ||
wxPoint | on_grid, | ||
wxPoint * | curpos | ||
) |
Function Magnetize tests to see if there are any magnetic items within near reach of the given "curpos".
If yes, then curpos is adjusted appropriately according to that near magnetic item and true is returned.
frame | = the current frame |
aCurrentTool | = the current tool id (from vertical right toolbar) |
aGridSize | = the current grid size |
on_grid | = the on grid position near initial position ( often on_grid = curpos) |
curpos | The initial position, and what to adjust if a change is needed. |
Definition at line 129 of file magnetic_tracks_functions.cpp.
References TRACK::Back(), CAPTURE_ALWAYS, CAPTURE_CURSOR_IN_TRACK_TOOL, FindBestGridPointOnTrack(), g_CurrentTrackSegment, PCB_BASE_FRAME::GetBoard(), PCB_BASE_FRAME::GetCurItem(), TRACK::GetEnd(), EDA_ITEM::GetFlags(), GetLineLength(), BOARD_CONNECTED_ITEM::GetNetCode(), BOARD::GetPad(), D_PAD::GetPosition(), PCB_BASE_FRAME::GetScreen(), TRACK::GetStart(), BOARD::GetVisibleTrack(), TRACK::GetWidth(), ID_TRACK_BUTT, BOARD::IsLayerVisible(), Join(), PCB_SCREEN::m_Active_Layer, PCB_GENERAL_SETTINGS::m_legacyDrcOn, PCB_GENERAL_SETTINGS::m_legacyUseTwoSegmentTracks, PCB_GENERAL_SETTINGS::m_magneticPads, PCB_GENERAL_SETTINGS::m_magneticTracks, BOARD::m_Track, PCB_TRACE_T, PCB_VIA_T, EDA_DRAW_FRAME::RefPos(), PCB_BASE_FRAME::Settings(), and EDA_ITEM::Type().
Referenced by PCB_EDIT_FRAME::GeneralControl().