|
KiCad PCB EDA Suite
|
#include <macros.h>#include <advanced_config.h>#include <clipboard.h>#include <limits>#include <kiplatform/ui.h>#include <gal/graphics_abstraction_layer.h>#include <board.h>#include <board_design_settings.h>#include <collectors.h>#include <footprint.h>#include <increment.h>#include <pcb_shape.h>#include <pcb_group.h>#include <constraints/constraint_copy.h>#include <constraints/pcb_constraint.h>#include <pcb_point.h>#include <pcb_reference_image.h>#include <pcb_target.h>#include <pcb_textbox.h>#include <pcb_table.h>#include <pcb_generator.h>#include <generators/pcb_via_stitch.h>#include <zone.h>#include <pad.h>#include <pcb_edit_frame.h>#include <drawing_sheet/ds_proxy_view_item.h>#include <kiway.h>#include <status_popup.h>#include <tool/action_manager.h>#include <tool/selection_conditions.h>#include <tool/tool_manager.h>#include <tools/pcb_actions.h>#include <tools/pcb_selection_tool.h>#include <tools/constraint_edit_tool.h>#include <tools/edit_tool.h>#include <tools/multichannel_tool.h>#include <tools/graphic_edit.h>#include <tools/item_modification_routine.h>#include <tools/pcb_picker_tool.h>#include <tools/pcb_point_editor.h>#include <tools/tool_event_utils.h>#include <tools/pcb_grid_helper.h>#include <tools/pad_tool.h>#include <view/view_controls.h>#include <view/view.h>#include <preview_items/mirror_axis_item.h>#include <preview_items/two_point_geom_manager.h>#include <gal/painter.h>#include <geometry/geometry_utils.h>#include <connectivity/connectivity_algo.h>#include <pcbnew_id.h>#include <core/kicad_algo.h>#include <fix_board_shape.h>#include <bitmaps.h>#include <functional>#include "kicad_clipboard.h"#include <wx/hyperlink.h>#include <router/router_tool.h>#include <widgets/properties_panel.h>#include <widgets/wx_infobar.h>#include <dialog_get_footprint_by_name.h>#include <dialogs/dialog_move_exact.h>#include <dialogs/dialog_track_via_properties.h>#include <dialogs/dialog_tablecell_properties.h>#include <dialogs/dialog_multi_unit_entry.h>#include <dialogs/dialog_unit_entry.h>Go to the source code of this file.
Classes | |
| class | GATE_SWAP_MENU |
| struct | MIRROR_SKIPS |
| What a mirror operation could not move, so the caller can say why. More... | |
Functions | |
| static bool | itemHasEditableCorners (BOARD_ITEM *aItem) |
| static bool | selectionHasEditableCorners (const SELECTION &aSelection) |
| static bool | groupMirrorable (const PCB_GROUP *aGroup) |
| static bool | selectionMirrorable (const SELECTION &aSelection) |
| static std::shared_ptr< CONDITIONAL_MENU > | makeMirrorRotateMenu (EDIT_TOOL *aEditTool) |
| static std::shared_ptr< CONDITIONAL_MENU > | makeRoutingToolsMenu (TOOL_INTERACTIVE *aTool) |
| static std::shared_ptr< CONDITIONAL_MENU > | makePositioningToolsMenu (TOOL_INTERACTIVE *aTool) |
| static std::shared_ptr< CONDITIONAL_MENU > | makeShapeModificationMenu (TOOL_INTERACTIVE *aTool) |
| static std::shared_ptr< ACTION_MENU > | makeGateSwapMenu (TOOL_INTERACTIVE *aTool) |
| static FOOTPRINT * | GetFootprintFromBoardByReference (PCB_BASE_FRAME &aFrame) |
| static std::optional< int > | GetRadiusParams (PCB_BASE_EDIT_FRAME &aFrame, const wxString &aTitle, int &aPersitentRadius) |
| Prompt the user for a radius and return it. | |
| static std::optional< DOGBONE_CORNER_ROUTINE::PARAMETERS > | GetDogboneParams (PCB_BASE_EDIT_FRAME &aFrame) |
| static std::optional< CHAMFER_PARAMS > | GetChamferParams (PCB_BASE_EDIT_FRAME &aFrame) |
| Prompt the user for chamfer parameters. | |
| static bool | groupHasAxisAlignedItems (const PCB_GROUP *aGroup) |
| static std::vector< BOARD_ITEM * > | mirrorTargets (const SELECTION &aSelection) |
| static MIRROR_SKIPS | mirrorSelection (BOARD_COMMIT &aCommit, const SELECTION &aSelection, const SEG &aAxis) |
| Mirror the selection about aAxis, staging an undo entry for everything that moves. | |
| static void | recordDuplicatedItems (TOOL_MANAGER *aToolMgr, const std::vector< BOARD_ITEM * > &aItems) |
| Handle items that have been duplicated. | |
Variables | |
| static const std::vector< KICAD_T > | padTypes = { PCB_PAD_T } |
| static const std::vector< KICAD_T > | footprintTypes = { PCB_FOOTPRINT_T } |
| static const std::vector< KICAD_T > | groupTypes = { PCB_GROUP_T } |
| static const std::vector< KICAD_T > | trackTypes = { PCB_TRACE_T, PCB_ARC_T, PCB_VIA_T } |
| static const std::vector< KICAD_T > | baseConnectedTypes = { PCB_PAD_T, PCB_VIA_T, PCB_TRACE_T, PCB_ARC_T } |
| static const std::vector< KICAD_T > | connectedTypes = { PCB_TRACE_T, PCB_ARC_T, PCB_VIA_T, PCB_PAD_T, PCB_ZONE_T } |
| static const std::vector< KICAD_T > | routableTypes = { PCB_TRACE_T, PCB_ARC_T, PCB_VIA_T, PCB_PAD_T, PCB_FOOTPRINT_T } |
| static const std::vector< KICAD_T > | nonMirrorableTypes |
|
static |
Prompt the user for chamfer parameters.
| aFrame |
Definition at line 1701 of file edit_tool.cpp.
References _, WX_UNIT_ENTRY_DIALOG::GetValue(), pcbIUScale, and DIALOG_SHIM::ShowModal().
Referenced by EDIT_TOOL::ModifyLines().
|
static |
Definition at line 1652 of file edit_tool.cpp.
References _, WX_MULTI_ENTRY_DIALOG::GetValues(), pcbIUScale, and DIALOG_SHIM::ShowModal().
Referenced by EDIT_TOOL::ModifyLines().
|
static |
Definition at line 979 of file edit_tool.cpp.
References BOARD::Footprints(), PCB_BASE_FRAME::GetBoard(), DIALOG_GET_FOOTPRINT_BY_NAME::GetValue(), and DIALOG_SHIM::ShowModal().
Referenced by EDIT_TOOL::GetAndPlace().
|
static |
Prompt the user for a radius and return it.
| aFrame | |
| aTitle | the title of the dialog |
| aPersitentRadius | the last used radius |
Definition at line 1639 of file edit_tool.cpp.
References _, WX_UNIT_ENTRY_DIALOG::GetValue(), and DIALOG_SHIM::ShowModal().
Referenced by EDIT_TOOL::ModifyLines().
|
static |
Definition at line 2701 of file edit_tool.cpp.
References RECURSE, and PCB_GROUP::RunOnChildren().
Referenced by mirrorSelection().
|
static |
Definition at line 151 of file edit_tool.cpp.
References EDA_ITEM::IsType(), nonMirrorableTypes, RECURSE, and PCB_GROUP::RunOnChildren().
Referenced by mirrorSelection(), and selectionMirrorable().
|
static |
Definition at line 95 of file edit_tool.cpp.
References EDA_SHAPE::GetShape(), ZONE::IsTeardropArea(), PCB_SHAPE_T, PCB_ZONE_T, POLY, and EDA_ITEM::Type().
Referenced by selectionHasEditableCorners().
|
static |
Definition at line 615 of file edit_tool.cpp.
Referenced by EDIT_TOOL::Init().
|
static |
Definition at line 205 of file edit_tool.cpp.
References _HKI, EDIT_TOOL, PCB_TOOL_BASE::IsBoardEditor(), PCB_ACTIONS::mirrorH, PCB_ACTIONS::mirrorInteractive, PCB_ACTIONS::mirrorV, SELECTION_CONDITIONS::NotEmpty(), SELECTION_CONDITIONS::OnlyTypes(), padTypes, PCB_ACTIONS::rotateCcw, PCB_ACTIONS::rotateCw, selectionMirrorable(), and special_tools.
Referenced by EDIT_TOOL::Init().
|
static |
Definition at line 263 of file edit_tool.cpp.
References _HKI, PCB_ACTIONS::interactiveOffsetTool, SELECTION_CONDITIONS::MoreThan(), PCB_ACTIONS::moveExact, PCB_ACTIONS::moveIndividually, PCB_ACTIONS::moveWithReference, SELECTION_CONDITIONS::NotEmpty(), PCB_ACTIONS::positionRelative, and special_tools.
Referenced by EDIT_TOOL::Init().
|
static |
Definition at line 233 of file edit_tool.cpp.
References _HKI, SELECTION_CONDITIONS::HasTypes(), SELECTION_CONDITIONS::NotEmpty(), routableTypes, PCB_ACTIONS::routerAutorouteSelected, PCB_ACTIONS::routerOptimizeSelected, PCB_ACTIONS::routerRouteSelected, PCB_ACTIONS::routerRouteSelectedFromEnd, special_tools, trackTypes, PCB_ACTIONS::unrouteSegment, and PCB_ACTIONS::unrouteSelected.
Referenced by EDIT_TOOL::Init().
|
static |
Definition at line 285 of file edit_tool.cpp.
References _HKI, PCB_POINT_EDITOR::CanAddCorner(), PCB_POINT_EDITOR::CanChamferCorner(), PCB_POINT_EDITOR::CanRemoveCorner(), PCB_ACTIONS::chamferLines, SELECTION_CONDITIONS::Count(), PCB_ACTIONS::dogboneCorners, PCB_ACTIONS::editVertices, PCB_ACTIONS::extendGraphic, PCB_ACTIONS::extendLines, PCB_ACTIONS::filletLines, TOOL_BASE::GetManager(), TOOL_MANAGER::GetTool(), PCB_POINT_EDITOR::HasCorner(), PCB_POINT_EDITOR::HasMidpoint(), SELECTION_CONDITIONS::HasTypes(), PCB_ACTIONS::healShapes, PCB_ACTIONS::intersectPolygons, PCB_ACTIONS::mergePolygons, SELECTION_CONDITIONS::MoreThan(), SELECTION_CONDITIONS::OnlyTypes(), PCB_SHAPE_LOCATE_ARC_T, PCB_SHAPE_LOCATE_BEZIER_T, PCB_SHAPE_LOCATE_CIRCLE_T, PCB_SHAPE_LOCATE_POLY_T, PCB_SHAPE_LOCATE_RECT_T, PCB_SHAPE_LOCATE_SEGMENT_T, PCB_ZONE_T, PCB_ACTIONS::pointEditorAddCorner, PCB_ACTIONS::pointEditorChamferCorner, PCB_ACTIONS::pointEditorMoveCorner, PCB_ACTIONS::pointEditorMoveMidpoint, PCB_ACTIONS::pointEditorRemoveCorner, selectionHasEditableCorners(), SELECTION_CONDITIONS::ShowAlways(), PCB_ACTIONS::simplifyPolygons, PCB_ACTIONS::subtractPolygons, and PCB_ACTIONS::trimGraphic.
Referenced by EDIT_TOOL::Init().
|
static |
Mirror the selection about aAxis, staging an undo entry for everything that moves.
Items without an arbitrary-axis mirror, are skipped for an oblique axis and mirrored the axis-aligned way otherwise.
Definition at line 2764 of file edit_tool.cpp.
References SEG::A, SEG::B, MIRROR_SKIPS::footprints, group, groupHasAxisAlignedItems(), groupMirrorable(), MIRROR_SKIPS::groups, MIRROR_SKIPS::items, LEFT_RIGHT, mirrorTargets(), COMMIT::Modify(), PCB_FOOTPRINT_T, PCB_GROUP_T, RECURSE, table, TOP_BOTTOM, VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by EDIT_TOOL::Mirror(), and EDIT_TOOL::MirrorInteractive().
|
static |
Definition at line 2720 of file edit_tool.cpp.
References PCB_GENERATOR::ChildrenAreIndividuallySelectable(), alg::contains(), and EDA_ITEM::GetParentGroup().
Referenced by mirrorSelection().
|
static |
Handle items that have been duplicated.
For example, notify the pad tool about duplicated pads.
Definition at line 3688 of file edit_tool.cpp.
References TOOL_MANAGER::GetTool(), pad, and PAD_TOOL::RecordMasterPad().
Referenced by EDIT_TOOL::Duplicate().
|
static |
Definition at line 119 of file edit_tool.cpp.
References SELECTION::Front(), SELECTION::GetSize(), and itemHasEditableCorners().
Referenced by EDIT_TOOL::EditVertices(), and makeShapeModificationMenu().
|
static |
Definition at line 168 of file edit_tool.cpp.
References groupMirrorable(), and PCB_GROUP_T.
Referenced by makeMirrorRotateMenu().
|
static |
Definition at line 136 of file edit_tool.cpp.
Referenced by EDIT_TOOL::FilletTracks().
|
static |
Definition at line 138 of file edit_tool.cpp.
|
static |
Definition at line 130 of file edit_tool.cpp.
Referenced by EDIT_TOOL::Init(), and PCB_EDIT_FRAME::setupUIConditions().
|
static |
Definition at line 132 of file edit_tool.cpp.
Referenced by EDIT_TOOL::Init(), and PCB_EDIT_FRAME::setupUIConditions().
|
static |
Definition at line 128 of file edit_tool.cpp.
Referenced by CONVERT_TOOL::Init(), EDIT_TOOL::Init(), PAD_TOOL::Init(), and makeMirrorRotateMenu().
|
static |
Definition at line 140 of file edit_tool.cpp.
Referenced by EDIT_TOOL::Init(), and makeRoutingToolsMenu().
|
static |
Definition at line 134 of file edit_tool.cpp.
Referenced by ComputeBoardStatistics(), CONVERT_TOOL::Init(), EDIT_TOOL::Init(), makeRoutingToolsMenu(), and PCB_EDIT_FRAME::setupUIConditions().