![]() |
KiCad PCB EDA Suite
|
#include <ee_selection_tool.h>
Public Types | |
enum | RESET_REASON { RUN, MODEL_RELOAD, GAL_SWITCH } |
Determine the reason of reset for a tool. More... | |
Public Member Functions | |
EE_SELECTION_TOOL () | |
~EE_SELECTION_TOOL () | |
bool | Init () override |
Init() is called once upon a registration of the tool. More... | |
void | Reset (RESET_REASON aReason) override |
Bring the tool to a known, initial state. More... | |
int | UpdateMenu (const TOOL_EVENT &aEvent) |
int | Main (const TOOL_EVENT &aEvent) |
The main loop. More... | |
void | OnIdle (wxIdleEvent &aEvent) |
EE_SELECTION & | GetSelection () |
Return the set of currently selected items. More... | |
EE_SELECTION & | RequestSelection (const KICAD_T *aFilterList=EE_COLLECTOR::AllItems) |
Return either an existing selection (filtered), or the selection at the current cursor if the existing selection is empty. More... | |
bool | SelectPoint (const VECTOR2I &aWhere, const KICAD_T *aFilterList=EE_COLLECTOR::AllItems, EDA_ITEM **aItem=nullptr, bool *aSelectionCancelledFlag=nullptr, bool aCheckLocked=false, bool aAdd=false, bool aSubtract=false, bool aExclusiveOr=false) |
This overload of SelectPoint will create an EE_COLLECTOR and collect hits at location aWhere before calling the primary SelectPoint method. More... | |
int | AddItemToSel (const TOOL_EVENT &aEvent) |
void | AddItemToSel (EDA_ITEM *aItem, bool aQuietMode=false) |
int | AddItemsToSel (const TOOL_EVENT &aEvent) |
void | AddItemsToSel (EDA_ITEMS *aList, bool aQuietMode=false) |
int | RemoveItemFromSel (const TOOL_EVENT &aEvent) |
void | RemoveItemFromSel (EDA_ITEM *aItem, bool aQuietMode=false) |
int | RemoveItemsFromSel (const TOOL_EVENT &aEvent) |
void | RemoveItemsFromSel (EDA_ITEMS *aList, bool aQuietMode=false) |
void | RemoveItemsFromSel (std::vector< KIID > *aList, bool aQuietMode=false) |
A safer version of RemoveItemsFromSel( EDA_ITEMS ) which doesn't require the items to still exist. More... | |
void | BrightenItem (EDA_ITEM *aItem) |
void | UnbrightenItem (EDA_ITEM *aItem) |
void | SelectHighlightItem (EDA_ITEM *aItem) |
Find (but don't select) node under cursor. More... | |
EDA_ITEM * | GetNode (VECTOR2I aPosition) |
Select node under cursor. More... | |
int | SelectNode (const TOOL_EVENT &aEvent) |
If node selected then expand to connection, otherwise select connection under cursor. More... | |
int | SelectConnection (const TOOL_EVENT &aEvent) |
Clear current selection event handler. More... | |
int | ClearSelection (const TOOL_EVENT &aEvent) |
Select all visible items in sheet. More... | |
int | SelectAll (const TOOL_EVENT &aEvent) |
void | ClearSelection () |
bool | Selectable (const EDA_ITEM *aItem, const VECTOR2I *aPos=nullptr, bool checkVisibilityOnly=false) const |
Check conditions for an item to be selected. More... | |
void | GuessSelectionCandidates (EE_COLLECTOR &collector, const VECTOR2I &aPos) |
Apply heuristics to try and determine a single object when multiple are found under the cursor. More... | |
int | SelectionMenu (const TOOL_EVENT &aEvent) |
Show a popup menu to trim the COLLECTOR passed as aEvent's parameter down to a single item. More... | |
void | RebuildSelection () |
Rebuild the selection from the EDA_ITEMs' selection flags. More... | |
bool | CollectHits (EE_COLLECTOR &aCollector, const VECTOR2I &aWhere, const KICAD_T *aFilterList=EE_COLLECTOR::AllItems) |
Select one or more items at the location given by parameter aWhere. More... | |
void | Activate () |
Run the tool. More... | |
TOOL_MENU & | GetToolMenu () |
void | SetContextMenu (ACTION_MENU *aMenu, CONTEXT_MENU_TRIGGER aTrigger=CMENU_BUTTON) |
Assign a context menu and tells when it should be activated. More... | |
void | RunMainStack (std::function< void()> aFunc) |
Call a function using the main stack. More... | |
template<class T > | |
void | Go (int(T::*aStateFunc)(const TOOL_EVENT &), const TOOL_EVENT_LIST &aConditions=TOOL_EVENT(TC_ANY, TA_ANY)) |
Define which state (aStateFunc) to go when a certain event arrives (aConditions). More... | |
TOOL_EVENT * | Wait (const TOOL_EVENT_LIST &aEventList=TOOL_EVENT(TC_ANY, TA_ANY)) |
Suspend execution of the tool until an event specified in aEventList arrives. More... | |
TOOL_TYPE | GetType () const |
Return the type of the tool. More... | |
TOOL_ID | GetId () const |
Return the unique identifier of the tool. More... | |
const std::string & | GetName () const |
Return the name of the tool. More... | |
TOOL_MANAGER * | GetManager () const |
Return the instance of TOOL_MANAGER that takes care of the tool. More... | |
bool | IsToolActive () const |
Protected Member Functions | |
void | setModifiersState (bool aShiftState, bool aCtrlState, bool aAltState) |
Set the configuration of m_additive, m_subtractive, m_exclusive_or, m_skip_heuristics from the state of modifier keys SHIFT, CTRL, ALT and depending on the OS. More... | |
void | attachManager (TOOL_MANAGER *aManager) |
Set the TOOL_MANAGER the tool will belong to. More... | |
KIGFX::VIEW * | getView () const |
Returns the instance of #VIEW object used in the application. More... | |
KIGFX::VIEW_CONTROLS * | getViewControls () const |
Return the instance of VIEW_CONTROLS object used in the application. More... | |
template<typename T > | |
T * | getEditFrame () const |
Return the application window object, casted to requested user type. More... | |
template<typename T > | |
T * | getModel () const |
Return the model object if it matches the requested type. More... | |
Protected Attributes | |
bool | m_additive |
bool | m_subtractive |
bool | m_exclusive_or |
bool | m_multiple |
bool | m_skip_heuristics |
bool | m_highlight_modifier |
bool | m_drag_additive |
bool | m_drag_subtractive |
bool | m_canceledMenu |
wxTimer | m_disambiguateTimer |
VECTOR2I | m_originalCursor |
TOOL_MENU | m_menu |
The functions below are not yet implemented - their interface may change. More... | |
TOOL_TYPE | m_type |
Unique identifier for the tool, assigned by a TOOL_MANAGER instance. More... | |
TOOL_ID | m_toolId |
Name of the tool. More... | |
std::string | m_toolName |
TOOL_MANAGER * | m_toolMgr |
Private Member Functions | |
void | narrowSelection (EE_COLLECTOR &collector, const VECTOR2I &aWhere, bool aCheckLocked, bool aSelectPoints) |
Apply rules to narrow the collection down to selectable objects, and then heuristics to try and narrow it to a single object. More... | |
bool | selectPoint (EE_COLLECTOR &aCollector, EDA_ITEM **aItem=nullptr, bool *aSelectionCancelledFlag=nullptr, bool aAdd=false, bool aSubtract=false, bool aExclusiveOr=false) |
This is the primary SelectPoint method that will prompt the user with a menu to disambiguate multiple selections and then finish by adding, subtracting or toggling the item(s) to the actual selection group. More... | |
bool | selectMultiple () |
Handle drawing a selection box that allows one to select many items at the same time. More... | |
bool | doSelectionMenu (EE_COLLECTOR *aItems) |
Allow the selection of a single item from a list via pop-up menu. More... | |
void | onDisambiguationExpire (wxTimerEvent &aEvent) |
Start the process to show our disambiguation menu once the user has kept the mouse down for the minimum time. More... | |
int | disambiguateCursor (const TOOL_EVENT &aEvent) |
Handle disambiguation actions including displaying the menu. More... | |
void | select (EDA_ITEM *aItem) |
Take necessary action mark an item as selected. More... | |
void | unselect (EDA_ITEM *aItem) |
Take necessary action mark an item as unselected. More... | |
void | highlight (EDA_ITEM *aItem, int aHighlightMode, EE_SELECTION *aGroup=nullptr) |
Highlight the item visually. More... | |
void | unhighlight (EDA_ITEM *aItem, int aHighlightMode, EE_SELECTION *aGroup=nullptr) |
Unhighlight the item visually. More... | |
void | updateReferencePoint () |
Set the reference point to the anchor of the top-left item. More... | |
bool | selectionContains (const VECTOR2I &aPoint) const |
Set up handlers for various events. More... | |
void | setTransitions () override |
This method is meant to be overridden in order to specify handlers for events. More... | |
Private Attributes | |
SCH_BASE_FRAME * | m_frame |
EE_SELECTION | m_selection |
KICURSOR | m_nonModifiedCursor |
bool | m_isSymbolEditor |
bool | m_isSymbolViewer |
int | m_unit |
int | m_convert |
Definition at line 56 of file ee_selection_tool.h.
|
inherited |
Determine the reason of reset for a tool.
Enumerator | |
---|---|
RUN | Tool is invoked after being inactive. |
MODEL_RELOAD | Model changes (required full reload) |
GAL_SWITCH | Rendering engine changes. |
Definition at line 77 of file tool_base.h.
EE_SELECTION_TOOL::EE_SELECTION_TOOL | ( | ) |
Definition at line 123 of file ee_selection_tool.cpp.
References ARROW, SELECTION::Clear(), and m_selection.
EE_SELECTION_TOOL::~EE_SELECTION_TOOL | ( | ) |
Definition at line 136 of file ee_selection_tool.cpp.
References TOOL_BASE::getView(), m_selection, and KIGFX::VIEW::Remove().
|
inherited |
Run the tool.
After activation, the tool starts receiving events until it is finished.
Definition at line 51 of file tool_interactive.cpp.
References TOOL_MANAGER::InvokeTool(), TOOL_BASE::m_toolId, and TOOL_BASE::m_toolMgr.
Referenced by AUTOPLACE_TOOL::autoplace(), EDIT_TOOL::copyToClipboard(), SYMBOL_EDITOR_EDIT_TOOL::DeleteItemCursor(), PL_EDIT_TOOL::DeleteItemCursor(), SCH_EDIT_TOOL::DeleteItemCursor(), PCB_CONTROL::DeleteItemCursor(), SCH_LINE_WIRE_BUS_TOOL::doDrawSegments(), PCB_TOOL_BASE::doInteractiveItemPlacement(), EDIT_TOOL::doMoveSelection(), EDIT_TOOL::DragArcTrack(), DRAWING_TOOL::DrawArc(), DRAWING_TOOL::DrawCircle(), DRAWING_TOOL::DrawDimension(), DRAWING_TOOL::DrawLine(), MICROWAVE_TOOL::drawMicrowaveInductor(), DRAWING_TOOL::DrawRectangle(), SYMBOL_EDITOR_DRAWING_TOOLS::DrawShape(), PL_DRAWING_TOOLS::DrawShape(), SCH_DRAWING_TOOLS::DrawSheet(), DRAWING_TOOL::DrawZone(), BOARD_EDITOR_CONTROL::DrillOrigin(), PAD_TOOL::EnumeratePads(), PCB_CONTROL::GridSetOrigin(), SCH_EDITOR_CONTROL::HighlightNetCursor(), ROUTER_TOOL::InlineBreakTrack(), ROUTER_TOOL::InlineDrag(), DRAWING_TOOL::InteractivePlaceWithPreview(), BOARD_INSPECTION_TOOL::LocalRatsnestTool(), PCB_PICKER_TOOL::Main(), PL_EDIT_TOOL::Main(), EE_POINT_EDITOR::Main(), SYMBOL_EDITOR_MOVE_TOOL::Main(), PL_POINT_EDITOR::Main(), SCH_MOVE_TOOL::Main(), PICKER_TOOL::Main(), ROUTER_TOOL::MainLoop(), LENGTH_TUNER_TOOL::MainLoop(), GERBVIEW_INSPECTION_TOOL::MeasureTool(), PCB_VIEWER_TOOLS::MeasureTool(), LIB_TREE::onContextMenu(), PCB_POINT_EDITOR::OnSelectionChange(), GROUP_TOOL::PickNewMember(), SYMBOL_EDITOR_DRAWING_TOOLS::PlaceAnchor(), BOARD_EDITOR_CONTROL::PlaceFootprint(), SCH_DRAWING_TOOLS::PlaceImage(), DRAWING_TOOL::PlaceImportedGraphics(), PL_DRAWING_TOOLS::PlaceItem(), SCH_DRAWING_TOOLS::PlaceSymbol(), BOARD_EDITOR_CONTROL::PlaceTarget(), DRAWING_TOOL::PlaceText(), EDIT_TOOL::Remove(), POSITION_RELATIVE_TOOL::SelectPositionRelativeItem(), DRAWING_TOOL::SetAnchor(), DRC_TOOL::ShowDRCDialog(), SCH_DRAWING_TOOLS::SingleClickPlace(), SYMBOL_EDITOR_DRAWING_TOOLS::TwoClickPlace(), SCH_DRAWING_TOOLS::TwoClickPlace(), and SCH_LINE_WIRE_BUS_TOOL::UnfoldBus().
int EE_SELECTION_TOOL::AddItemsToSel | ( | const TOOL_EVENT & | aEvent | ) |
Definition at line 1449 of file ee_selection_tool.cpp.
References m_selection, TOOL_EVENT::Parameter(), and SELECTION::SetIsHover().
Referenced by setTransitions().
void EE_SELECTION_TOOL::AddItemsToSel | ( | EDA_ITEMS * | aList, |
bool | aQuietMode = false |
||
) |
Definition at line 1457 of file ee_selection_tool.cpp.
References TOOL_BASE::m_toolMgr, TOOL_MANAGER::ProcessEvent(), select(), and EVENTS::SelectedEvent.
int EE_SELECTION_TOOL::AddItemToSel | ( | const TOOL_EVENT & | aEvent | ) |
Definition at line 1428 of file ee_selection_tool.cpp.
References m_selection, TOOL_EVENT::Parameter(), and SELECTION::SetIsHover().
Referenced by SYMBOL_EDITOR_EDIT_TOOL::DeleteItemCursor(), SCH_EDIT_TOOL::DeleteItemCursor(), SCH_EDIT_FRAME::DeleteJunction(), SCH_LINE_WIRE_BUS_TOOL::doDrawSegments(), SYMBOL_EDITOR_DRAWING_TOOLS::DrawShape(), SCH_DRAWING_TOOLS::DrawSheet(), SCH_EDITOR_CONTROL::FindNext(), SYMBOL_EDITOR_MOVE_TOOL::Main(), SCH_MOVE_TOOL::Main(), Main(), SCH_DRAWING_TOOLS::PlaceImage(), SCH_DRAWING_TOOLS::PlaceSymbol(), SCH_EDIT_FRAME::SchematicCleanUp(), setTransitions(), SCH_LINE_WIRE_BUS_TOOL::startSegments(), SYMBOL_EDITOR_DRAWING_TOOLS::TwoClickPlace(), and SCH_DRAWING_TOOLS::TwoClickPlace().
void EE_SELECTION_TOOL::AddItemToSel | ( | EDA_ITEM * | aItem, |
bool | aQuietMode = false |
||
) |
Definition at line 1436 of file ee_selection_tool.cpp.
References TOOL_BASE::m_toolMgr, TOOL_MANAGER::ProcessEvent(), select(), and EVENTS::SelectedEvent.
|
protectedinherited |
Set the TOOL_MANAGER the tool will belong to.
Called by TOOL_MANAGER::RegisterTool()
Definition at line 60 of file tool_base.cpp.
References TOOL_BASE::m_toolMgr.
Referenced by TOOL_MANAGER::RegisterTool().
void EE_SELECTION_TOOL::BrightenItem | ( | EDA_ITEM * | aItem | ) |
Definition at line 1528 of file ee_selection_tool.cpp.
References BRIGHTENED, and highlight().
Referenced by SYMBOL_EDITOR_EDIT_TOOL::DeleteItemCursor(), SCH_EDIT_TOOL::DeleteItemCursor(), and SCH_EDITOR_CONTROL::UpdateFind().
int EE_SELECTION_TOOL::ClearSelection | ( | const TOOL_EVENT & | aEvent | ) |
Select all visible items in sheet.
Definition at line 1540 of file ee_selection_tool.cpp.
References ClearSelection().
Referenced by SCH_EDITOR_CONTROL::AssignNetclass(), SCH_EDIT_TOOL::BreakWire(), SCH_EDITOR_CONTROL::FindNext(), SYMBOL_EDITOR_EDIT_TOOL::Paste(), SCH_DRAWING_TOOLS::TwoClickPlace(), and SCH_EDITOR_CONTROL::UpdateFind().
void EE_SELECTION_TOOL::ClearSelection | ( | ) |
Definition at line 1822 of file ee_selection_tool.cpp.
References EVENTS::ClearedEvent, SELECTION::ClearReferencePoint(), SELECTION::Empty(), SELECTION::Front(), SELECTION::GetSize(), TOOL_BASE::getView(), m_selection, TOOL_BASE::m_toolMgr, TOOL_MANAGER::ProcessEvent(), SELECTED, SELECTION::SetIsHover(), unhighlight(), and KIGFX::VIEW::Update().
Referenced by ClearSelection(), Main(), RequestSelection(), Reset(), selectMultiple(), selectPoint(), and setTransitions().
bool EE_SELECTION_TOOL::CollectHits | ( | EE_COLLECTOR & | aCollector, |
const VECTOR2I & | aWhere, | ||
const KICAD_T * | aFilterList = EE_COLLECTOR::AllItems |
||
) |
Select one or more items at the location given by parameter aWhere.
This method does not attempt to disambiguate multiple items and is simply "collecting"
aCollector | is the collector object that will store found item(s) |
aWhere | is the place where the item should be selected. |
aFilterList | is a list of items that are acceptable for collection |
aCheckLocked | indicates if locked items should be excluded. |
Definition at line 804 of file ee_selection_tool.cpp.
References EE_COLLECTOR::Collect(), EuclideanNorm(), COLLECTOR::GetCount(), LIB_SYMBOL::GetDrawItems(), SCH_BASE_FRAME::GetScreen(), TOOL_BASE::getView(), HITTEST_THRESHOLD_PIXELS, KiROUND(), m_convert, m_frame, m_isSymbolEditor, COLLECTOR::m_Threshold, and m_unit.
Referenced by SYMBOL_EDITOR_EDIT_TOOL::DeleteItemCursor(), Main(), and SelectPoint().
|
private |
Handle disambiguation actions including displaying the menu.
Definition at line 755 of file ee_selection_tool.cpp.
References EE_COLLECTOR::AllItems, SELECTION_TOOL::m_additive, SELECTION_TOOL::m_canceledMenu, SELECTION_TOOL::m_exclusive_or, SELECTION_TOOL::m_originalCursor, SELECTION_TOOL::m_skip_heuristics, SELECTION_TOOL::m_subtractive, SelectPoint(), and SELECTION_TOOL::setModifiersState().
Referenced by setTransitions().
|
private |
Allow the selection of a single item from a list via pop-up menu.
The items are highlighted on the canvas when hovered in the menu. The collector is trimmed to the picked item.
The user has requested the full, non-limited list of selection items
Definition at line 1601 of file ee_selection_tool.cpp.
References _, COLLECTOR::Append(), BRIGHTENED, CMENU_NOW, COLLECTOR::Combine(), COLLECTOR::Empty(), Format(), SCH_BASE_FRAME::GetCanvas(), COLLECTOR::GetCount(), EDA_ITEM::GetMenuImage(), EDA_ITEM::GetSelectMenuText(), EDA_BASE_FRAME::GetUserUnits(), TOOL_BASE::getView(), COLLECTOR::HasAdditionalItems(), highlight(), info, INVALID_BITMAP, m_frame, COLLECTOR::m_MenuTitle, EDA_DRAW_PANEL_GAL::Refresh(), TOOL_INTERACTIVE::SetContextMenu(), TA_CHOICE_MENU_CHOICE, TA_CHOICE_MENU_CLOSED, TA_CHOICE_MENU_UPDATE, text, unhighlight(), KIGFX::VIEW::UpdateItems(), and TOOL_INTERACTIVE::Wait().
Referenced by SelectionMenu(), and selectPoint().
|
inlineprotectedinherited |
Return the application window object, casted to requested user type.
Definition at line 184 of file tool_base.h.
References TOOL_BASE::getToolHolderInt().
Referenced by ZONE_CREATE_HELPER::createNewZone().
|
inlineinherited |
Return the unique identifier of the tool.
The identifier is set by an instance of TOOL_MANAGER.
Definition at line 120 of file tool_base.h.
References TOOL_BASE::m_toolId.
Referenced by TOOL_MANAGER::finishTool(), TOOL_MANAGER::InitTools(), TOOL_MANAGER::isActive(), TOOL_MANAGER::RegisterTool(), ACTION_MANAGER::RunHotKey(), TOOL_MANAGER::runTool(), TOOL_MANAGER::saveViewControls(), and TOOL_MANAGER::ShutdownTool().
|
inlineinherited |
Return the instance of TOOL_MANAGER that takes care of the tool.
Definition at line 143 of file tool_base.h.
References TOOL_BASE::m_toolMgr.
Referenced by BOARD_COMMIT::BOARD_COMMIT(), ZONE_CREATE_HELPER::commitZone(), ZONE_CREATE_HELPER::createNewZone(), PCB_TOOL_BASE::doInteractiveItemPlacement(), ACTION_MENU::getToolManager(), LIB_TREE::onContextMenu(), ZONE_CREATE_HELPER::OnFirstPoint(), ACTION_MENU::OnMenuEvent(), and ZONE_CREATE_HELPER::performZoneCutout().
|
inlineprotectedinherited |
Return the model object if it matches the requested type.
Store the type of the tool.
Definition at line 196 of file tool_base.h.
References TOOL_BASE::getModelInt().
Referenced by ZONE_CREATE_HELPER::commitZone(), and ZONE_CREATE_HELPER::createZoneFromExisting().
|
inlineinherited |
Return the name of the tool.
Tool names are expected to obey the format: application.ToolName (eg. pcbnew.InteractiveSelection).
Definition at line 133 of file tool_base.h.
References TOOL_BASE::m_toolName.
Referenced by TOOL_MANAGER::dispatchInternal(), TOOL_MANAGER::InitTools(), TOOL_MANAGER::invokeTool(), TOOL_MANAGER::RegisterTool(), and TOOL_MANAGER::runTool().
Select node under cursor.
Definition at line 1371 of file ee_selection_tool.cpp.
References EE_COLLECTOR::Collect(), EuclideanNorm(), COLLECTOR::GetCount(), SCH_BASE_FRAME::GetScreen(), TOOL_BASE::getView(), HITTEST_THRESHOLD_PIXELS, KiROUND(), m_frame, COLLECTOR::m_Threshold, and nodeTypes.
EE_SELECTION & EE_SELECTION_TOOL::GetSelection | ( | ) |
Return the set of currently selected items.
Definition at line 798 of file ee_selection_tool.cpp.
References m_selection.
Referenced by SCH_EDITOR_CONTROL::doCrossProbeSchToPcb(), SCH_LINE_WIRE_BUS_TOOL::doDrawSegments(), SYMBOL_EDITOR_DRAWING_TOOLS::DrawShape(), SCH_DRAWING_TOOLS::DrawSheet(), EE_INSPECTION_TOOL::ExcludeMarker(), SCH_EDITOR_CONTROL::FindNext(), SYMBOL_EDIT_FRAME::HardRedraw(), SCH_EDITOR_CONTROL::HasMatch(), EE_POINT_EDITOR::Main(), SYMBOL_EDITOR_MOVE_TOOL::Main(), SCH_MOVE_TOOL::Main(), SYMBOL_EDITOR_EDIT_TOOL::Paste(), SCH_EDITOR_CONTROL::Paste(), SYMBOL_EDITOR_DRAWING_TOOLS::PlaceAnchor(), SCH_DRAWING_TOOLS::PlaceImage(), SCH_DRAWING_TOOLS::PlaceSymbol(), SYMBOL_EDITOR_PIN_TOOL::PushPinProperties(), SCH_BASE_FRAME::RefreshSelection(), SCH_EDITOR_CONTROL::ReplaceAndFindNext(), SCH_DRAWING_TOOLS::SingleClickPlace(), DIALOG_SYMBOL_FIELDS_TABLE::TransferDataToWindow(), DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS::TransferDataToWindow(), SYMBOL_EDITOR_DRAWING_TOOLS::TwoClickPlace(), SCH_DRAWING_TOOLS::TwoClickPlace(), SYMBOL_UNIT_MENU::update(), SCH_EDITOR_CONTROL::UpdateFind(), and EE_INSPECTION_TOOL::UpdateMessagePanel().
|
inlineinherited |
Definition at line 77 of file tool_interactive.h.
References TOOL_INTERACTIVE::m_menu.
Referenced by SYMBOL_EDITOR_EDIT_TOOL::Init(), SYMBOL_EDITOR_MOVE_TOOL::Init(), SYMBOL_EDITOR_PIN_TOOL::Init(), PL_EDIT_TOOL::Init(), SCH_EDIT_TOOL::Init(), EE_INSPECTION_TOOL::Init(), GROUP_TOOL::Init(), PAD_TOOL::Init(), CONVERT_TOOL::Init(), EE_POINT_EDITOR::Init(), BOARD_INSPECTION_TOOL::Init(), ALIGN_DISTRIBUTE_TOOL::Init(), BOARD_EDITOR_CONTROL::Init(), PCB_POINT_EDITOR::Init(), SCH_MOVE_TOOL::Init(), EDIT_TOOL::Init(), SCH_LINE_WIRE_BUS_TOOL::Init(), and LIB_TREE::onContextMenu().
|
inlineinherited |
Return the type of the tool.
Definition at line 108 of file tool_base.h.
References TOOL_BASE::m_type.
Referenced by TOOL_MANAGER::finishTool(), TOOL_MANAGER::InvokeTool(), TOOL_MANAGER::ResetTools(), TOOL_MANAGER::runTool(), and TOOL_MANAGER::ShutdownTool().
|
protectedinherited |
Returns the instance of #VIEW object used in the application.
It allows tools to draw.
Definition at line 36 of file tool_base.cpp.
References TOOL_MANAGER::GetView(), and TOOL_BASE::m_toolMgr.
Referenced by EE_POINT_EDITOR::addCornerCondition(), ALIGN_DISTRIBUTE_TOOL::AlignLeft(), ALIGN_DISTRIBUTE_TOOL::AlignRight(), COMMON_TOOLS::CenterContents(), SCH_EDIT_TOOL::ChangeTextType(), EE_INSPECTION_TOOL::CheckSymbol(), GERBVIEW_CONTROL::ClearAllLayers(), PL_SELECTION_TOOL::ClearSelection(), ClearSelection(), CollectHits(), SCH_LINE_WIRE_BUS_TOOL::computeBreakPoint(), COMMON_TOOLS::CursorControl(), PL_EDIT_TOOL::DeleteItemCursor(), SCH_EDIT_TOOL::DeleteItemCursor(), PCB_CONTROL::DeleteItemCursor(), GERBVIEW_SELECTION_TOOL::disambiguationMenu(), PL_EDIT_TOOL::DoDelete(), SCH_LINE_WIRE_BUS_TOOL::doDrawSegments(), PCB_TOOL_BASE::doInteractiveItemPlacement(), EDIT_TOOL::doMoveSelection(), PL_SELECTION_TOOL::doSelectionMenu(), doSelectionMenu(), PCB_SELECTION_TOOL::doSelectionMenu(), COMMON_TOOLS::doZoomFit(), COMMON_TOOLS::doZoomInOut(), COMMON_TOOLS::doZoomToPreset(), EDIT_TOOL::DragArcTrack(), DRAWING_TOOL::drawArc(), DRAWING_TOOL::DrawDimension(), MICROWAVE_TOOL::drawMicrowaveInductor(), DRAWING_TOOL::drawSegment(), SCH_LINE_WIRE_BUS_TOOL::DrawSegments(), PL_DRAWING_TOOLS::DrawShape(), DRAWING_TOOL::DrawZone(), BOARD_EDITOR_CONTROL::DrillOrigin(), SYMBOL_EDITOR_EDIT_TOOL::Duplicate(), PAD_TOOL::EnumeratePads(), SCH_EDITOR_CONTROL::FindSymbolAndItem(), GetNode(), ROUTER_TOOL::getStartLayer(), PCB_CONTROL::GridResetOrigin(), PCB_CONTROL::GridSetOrigin(), ROUTER_TOOL::handleCommonEvents(), PL_SELECTION_TOOL::highlight(), highlight(), PCB_SELECTION_TOOL::highlight(), GERBVIEW_CONTROL::HighlightControl(), PNS::TOOL_BASE::highlightNet(), BOARD_INSPECTION_TOOL::highlightNet(), PCB_SELECTION_TOOL::hitTestDistance(), SCH_EDIT_TOOL::Init(), EDIT_TOOL::Init(), ROUTER_TOOL::InlineDrag(), PCB_PICKER_TOOL::Main(), EE_POINT_EDITOR::Main(), PL_POINT_EDITOR::Main(), SCH_MOVE_TOOL::Main(), GERBVIEW_INSPECTION_TOOL::MeasureTool(), PCB_VIEWER_TOOLS::MeasureTool(), SCH_EDIT_TOOL::Mirror(), EDIT_TOOL::MoveExact(), PL_EDIT_TOOL::moveItem(), SCH_MOVE_TOOL::moveItem(), COMMON_TOOLS::OnGridChanged(), PCB_POINT_EDITOR::OnSelectionChange(), COMMON_TOOLS::PanControl(), SYMBOL_EDITOR_EDIT_TOOL::Paste(), PL_EDIT_TOOL::Paste(), SCH_EDITOR_CONTROL::Paste(), ROUTER_TOOL::performRouting(), PNS::TOOL_BASE::pickSingleItem(), BOARD_EDITOR_CONTROL::PlaceFootprint(), PL_DRAWING_TOOLS::PlaceItem(), BOARD_EDITOR_CONTROL::PlaceTarget(), ROUTER_TOOL::prepareInteractive(), SCH_EDIT_TOOL::Properties(), EDIT_TOOL::Properties(), EDIT_TOOL::Remove(), BOARD_EDITOR_CONTROL::Reset(), PNS::TOOL_BASE::Reset(), PCB_CONTROL::Reset(), GERBVIEW_SELECTION_TOOL::Reset(), DRAWING_TOOL::Reset(), Reset(), PCB_SELECTION_TOOL::Reset(), EE_TOOL_BASE< SCH_BASE_FRAME >::Reset(), SCH_EDIT_TOOL::Rotate(), GERBVIEW_SELECTION_TOOL::select(), GERBVIEW_SELECTION_TOOL::selectable(), PCB_SELECTION_TOOL::Selectable(), PCB_SELECTION_TOOL::SelectAll(), SelectAll(), PL_SELECTION_TOOL::selectionContains(), selectionContains(), PL_SELECTION_TOOL::selectMultiple(), selectMultiple(), PCB_SELECTION_TOOL::selectMultiple(), PL_SELECTION_TOOL::SelectPoint(), ZOOM_TOOL::selectRegion(), GERBVIEW_SELECTION_TOOL::selectVisually(), DRAWING_TOOL::SetAnchor(), SCH_DRAWING_TOOLS::SingleClickPlace(), SCH_EDITOR_CONTROL::ToggleHiddenFields(), SCH_EDITOR_CONTROL::ToggleHiddenPins(), SYMBOL_EDITOR_DRAWING_TOOLS::TwoClickPlace(), SCH_DRAWING_TOOLS::TwoClickPlace(), PL_SELECTION_TOOL::unhighlight(), unhighlight(), PCB_SELECTION_TOOL::unhighlight(), GERBVIEW_SELECTION_TOOL::unselect(), GERBVIEW_SELECTION_TOOL::unselectVisually(), EE_POINT_EDITOR::updateEditedPoint(), PL_POINT_EDITOR::updateEditedPoint(), PCB_POINT_EDITOR::updateEditedPoint(), SCH_EDITOR_CONTROL::UpdateFind(), PL_POINT_EDITOR::updateItem(), PCB_POINT_EDITOR::updateItem(), EE_TOOL_BASE< SCH_BASE_FRAME >::updateItem(), SCH_EDITOR_CONTROL::UpdateNetHighlighting(), EE_POINT_EDITOR::updatePoints(), PL_POINT_EDITOR::updatePoints(), PCB_POINT_EDITOR::updatePoints(), PCB_SELECTION_TOOL::updateSelection(), PNS::TOOL_BASE::updateStartItem(), PCB_VIEWER_TOOLS::view(), PCB_TOOL_BASE::view(), PCB_SELECTION_TOOL::zoomFitSelection(), ~EE_SELECTION_TOOL(), GERBVIEW_SELECTION_TOOL::~GERBVIEW_SELECTION_TOOL(), and PCB_SELECTION_TOOL::~PCB_SELECTION_TOOL().
|
protectedinherited |
Return the instance of VIEW_CONTROLS object used in the application.
It allows tools to read & modify user input and its settings (eg. show cursor, enable snapping to grid, etc.).
Definition at line 42 of file tool_base.cpp.
References TOOL_MANAGER::GetViewControls(), and TOOL_BASE::m_toolMgr.
Referenced by EE_POINT_EDITOR::addCorner(), PCB_POINT_EDITOR::addCorner(), EE_POINT_EDITOR::addCornerCondition(), SCH_EDITOR_CONTROL::AssignNetclass(), SCH_EDIT_TOOL::BreakWire(), PCB_TOOL_BASE::controls(), EDIT_TOOL::copyToClipboard(), SCH_DRAWING_TOOLS::createSheetPin(), COMMON_TOOLS::CursorControl(), SCH_LINE_WIRE_BUS_TOOL::doDrawSegments(), EDIT_TOOL::doMoveSelection(), SCH_LINE_WIRE_BUS_TOOL::doUnfoldBus(), COMMON_TOOLS::doZoomToPreset(), EDIT_TOOL::DragArcTrack(), DRAWING_TOOL::DrawCircle(), DRAWING_TOOL::DrawLine(), MICROWAVE_TOOL::drawMicrowaveInductor(), DRAWING_TOOL::DrawRectangle(), SYMBOL_EDITOR_DRAWING_TOOLS::DrawShape(), PL_DRAWING_TOOLS::DrawShape(), SCH_DRAWING_TOOLS::DrawSheet(), SYMBOL_EDITOR_EDIT_TOOL::Duplicate(), PAD_TOOL::EnumeratePads(), SCH_LINE_WIRE_BUS_TOOL::finishSegments(), SCH_DRAWING_TOOLS::GetCanvasFreeAreaPixels(), BOARD_INSPECTION_TOOL::HighlightNet(), SCH_EDITOR_CONTROL::HighlightNet(), FOOTPRINT_EDITOR_CONTROL::ImportFootprint(), SCH_EDIT_TOOL::Init(), EDIT_TOOL::Init(), PCB_PICKER_TOOL::Main(), EE_POINT_EDITOR::Main(), PL_EDIT_TOOL::Main(), SYMBOL_EDITOR_MOVE_TOOL::Main(), PL_POINT_EDITOR::Main(), SCH_MOVE_TOOL::Main(), Main(), PICKER_TOOL::Main(), ROUTER_TOOL::MainLoop(), GERBVIEW_INSPECTION_TOOL::MeasureTool(), PCB_VIEWER_TOOLS::MeasureTool(), COMMON_TOOLS::OnGridChanged(), PCB_POINT_EDITOR::OnSelectionChange(), SYMBOL_EDITOR_EDIT_TOOL::Paste(), ROUTER_TOOL::performDragging(), LENGTH_TUNER_TOOL::performTuning(), SYMBOL_EDITOR_DRAWING_TOOLS::PlaceAnchor(), PCB_CONTROL::placeBoardItems(), BOARD_EDITOR_CONTROL::PlaceFootprint(), SCH_DRAWING_TOOLS::PlaceImage(), PL_DRAWING_TOOLS::PlaceItem(), SCH_DRAWING_TOOLS::PlaceSymbol(), BOARD_EDITOR_CONTROL::PlaceTarget(), SCH_EDIT_TOOL::Properties(), EDIT_TOOL::Properties(), EDIT_TOOL::Remove(), SCH_EDIT_TOOL::RepeatDrawItem(), PL_SELECTION_TOOL::RequestSelection(), RequestSelection(), PCB_POINT_EDITOR::Reset(), DRAWING_TOOL::Reset(), COMMON_TOOLS::ResetLocalCoords(), GERBVIEW_SELECTION_TOOL::selectCursor(), PCB_SELECTION_TOOL::selectCursor(), PL_SELECTION_TOOL::selectMultiple(), selectMultiple(), PCB_SELECTION_TOOL::selectMultiple(), SelectNode(), ZOOM_TOOL::selectRegion(), ALIGN_DISTRIBUTE_TOOL::selectTarget(), PCB_PICKER_TOOL::setControls(), PICKER_TOOL::setControls(), PL_POINT_EDITOR::setEditedPoint(), EE_POINT_EDITOR::setEditedPoint(), PCB_POINT_EDITOR::setEditedPoint(), SCH_DRAWING_TOOLS::SingleClickPlace(), SYMBOL_EDITOR_DRAWING_TOOLS::TwoClickPlace(), SCH_DRAWING_TOOLS::TwoClickPlace(), EE_POINT_EDITOR::updateEditedPoint(), PL_POINT_EDITOR::updateEditedPoint(), PCB_POINT_EDITOR::updateEditedPoint(), PCB_POINT_EDITOR::updateItem(), PL_EDIT_TOOL::updateModificationPoint(), and COMMON_TOOLS::ZoomCenter().
|
inherited |
Define which state (aStateFunc) to go when a certain event arrives (aConditions).
No conditions means any event.
Definition at line 147 of file tool_interactive.h.
References TOOL_INTERACTIVE::goInternal().
Referenced by AUTOPLACE_TOOL::setTransitions(), ZOOM_TOOL::setTransitions(), LENGTH_TUNER_TOOL::setTransitions(), BOARD_REANNOTATE_TOOL::setTransitions(), GERBVIEW_INSPECTION_TOOL::setTransitions(), PCB_PICKER_TOOL::setTransitions(), SCH_NAVIGATE_TOOL::setTransitions(), SYMBOL_EDITOR_PIN_TOOL::setTransitions(), SYMBOL_EDITOR_MOVE_TOOL::setTransitions(), PL_DRAWING_TOOLS::setTransitions(), EE_POINT_EDITOR::setTransitions(), PL_POINT_EDITOR::setTransitions(), ROUTER_TOOL::setTransitions(), SCRIPTING_TOOL::setTransitions(), COMMON_CONTROL::setTransitions(), KICAD_MANAGER_CONTROL::setTransitions(), CONVERT_TOOL::setTransitions(), SYMBOL_EDITOR_DRAWING_TOOLS::setTransitions(), ZONE_FILLER_TOOL::setTransitions(), PCB_VIEWER_TOOLS::setTransitions(), MICROWAVE_TOOL::setTransitions(), EE_INSPECTION_TOOL::setTransitions(), PCB_POINT_EDITOR::setTransitions(), GERBVIEW_CONTROL::setTransitions(), CVPCB_FOOTPRINT_VIEWER_SELECTION_TOOL::setTransitions(), PAD_TOOL::setTransitions(), GLOBAL_EDIT_TOOL::setTransitions(), GROUP_TOOL::setTransitions(), PL_EDITOR_CONTROL::setTransitions(), SYMBOL_EDITOR_EDIT_TOOL::setTransitions(), SYMBOL_EDITOR_CONTROL::setTransitions(), PL_EDIT_TOOL::setTransitions(), POSITION_RELATIVE_TOOL::setTransitions(), GERBVIEW_SELECTION_TOOL::setTransitions(), SCH_DRAWING_TOOLS::setTransitions(), SCH_MOVE_TOOL::setTransitions(), SCH_EDIT_TOOL::setTransitions(), FOOTPRINT_EDITOR_CONTROL::setTransitions(), ALIGN_DISTRIBUTE_TOOL::setTransitions(), COMMON_TOOLS::setTransitions(), DRC_TOOL::setTransitions(), EDA_3D_CONTROLLER::setTransitions(), PCB_CONTROL::setTransitions(), CVPCB_ASSOCIATION_TOOL::setTransitions(), SCH_LINE_WIRE_BUS_TOOL::setTransitions(), CVPCB_CONTROL::setTransitions(), BOARD_INSPECTION_TOOL::setTransitions(), BOARD_EDITOR_CONTROL::setTransitions(), PICKER_TOOL::setTransitions(), EDIT_TOOL::setTransitions(), PCB_SELECTION_TOOL::setTransitions(), PL_SELECTION_TOOL::setTransitions(), DRAWING_TOOL::setTransitions(), SCH_EDITOR_CONTROL::setTransitions(), and setTransitions().
void EE_SELECTION_TOOL::GuessSelectionCandidates | ( | EE_COLLECTOR & | collector, |
const VECTOR2I & | aPos | ||
) |
Apply heuristics to try and determine a single object when multiple are found under the cursor.
Definition at line 1002 of file ee_selection_tool.cpp.
References SHAPE_RECT::Collide(), EDA_RECT::Contains(), DANGLING_SYMBOL_SIZE, DistanceLinePoint(), EuclideanNorm(), SCH_SYMBOL::GetBodyBoundingBox(), EDA_ITEM::GetBoundingBox(), EDA_RECT::GetCenter(), COLLECTOR::GetCount(), SCH_LINE::GetEndPoint(), EDA_RECT::GetHeight(), EDA_RECT::GetPosition(), EDA_SHAPE::GetShape(), SCH_LINE::GetStartPoint(), EDA_RECT::GetWidth(), EDA_ITEM::HitTest(), EDA_RECT::Inflate(), m_isSymbolEditor, KIGFX::mapCoords(), POLY, SCH_JUNCTION_T, SCH_PIN_T, text, and COLLECTOR::Transfer().
Referenced by SYMBOL_EDITOR_EDIT_TOOL::DeleteItemCursor(), SCH_EDIT_TOOL::DeleteItemCursor(), and narrowSelection().
|
private |
Highlight the item visually.
aItem | is an item to be be highlighted. |
aHighlightMode | should be either SELECTED or BRIGHTENED |
aGroup | is the group to add the item to in the BRIGHTENED mode. |
Definition at line 1852 of file ee_selection_tool.cpp.
References SELECTION::Add(), BRIGHTENED, EDA_ITEM::GetParent(), TOOL_BASE::getView(), SCH_FIELD_T, SCH_PIN_T, SCH_SHEET_PIN_T, SELECTED, EDA_ITEM::SetBrightened(), EDA_ITEM::SetSelected(), EDA_ITEM::Type(), and KIGFX::VIEW::Update().
Referenced by BrightenItem(), doSelectionMenu(), select(), and SelectHighlightItem().
|
overridevirtual |
Init() is called once upon a registration of the tool.
Reimplemented from TOOL_BASE.
Definition at line 145 of file ee_selection_tool.cpp.
References CONDITIONAL_MENU::AddItem(), EDA_DRAW_FRAME::AddStandardSubMenus(), EE_ACTIONS::assignNetclass, EE_ACTIONS::breakBus, EE_ACTIONS::breakWire, SELECTION_CONDITIONS::Count(), EE_ACTIONS::drawBus, EE_ACTIONS::drawWire, EE_ACTIONS::editPageNumber, SELECTION_CONDITIONS::Empty(), EE_ACTIONS::enterSheet, EOT, EE_ACTIONS::explicitCrossProbe, EE_ACTIONS::finishBus, EE_ACTIONS::finishWire, SYMBOL_EDIT_FRAME::GetConvert(), SCH_EDIT_FRAME::GetCurrentSheet(), TOOL_MENU::GetMenu(), SYMBOL_EDIT_FRAME::GetUnit(), SELECTION_CONDITIONS::Idle(), EE_ACTIONS::importSingleSheetPin, SCH_LINE_WIRE_BUS_TOOL::IsDrawingBus(), SCH_LINE_WIRE_BUS_TOOL::IsDrawingWire(), SCH_SHEET_PATH::Last(), EE_ACTIONS::leaveSheet, SELECTION_CONDITIONS::LessThan(), m_convert, SELECTION_TOOL::m_disambiguateTimer, m_frame, m_isSymbolEditor, m_isSymbolViewer, TOOL_INTERACTIVE::m_menu, m_unit, onDisambiguationExpire(), SELECTION_CONDITIONS::OnlyType(), SELECTION_CONDITIONS::OnlyTypes(), EE_ACTIONS::pinTable, EE_ACTIONS::placeGlobalLabel, EE_ACTIONS::placeHierLabel, EE_ACTIONS::placeJunction, EE_ACTIONS::placeLabel, SCHEMATIC::Root(), SCH_GLOBAL_LABEL_T, SCH_HIER_LABEL_T, SCH_LABEL_T, SCH_LINE_LOCATE_BUS_T, SCH_LINE_LOCATE_WIRE_T, SCH_PIN_T, SCH_SHEET_PIN_T, SCH_SHEET_T, SCH_EDIT_FRAME::Schematic(), EE_ACTIONS::selectConnection, and EE_ACTIONS::symbolProperties.
|
inherited |
Definition at line 31 of file tool_base.cpp.
References TOOL_MANAGER::IsToolActive(), TOOL_BASE::m_toolId, and TOOL_BASE::m_toolMgr.
Referenced by EDIT_TOOL::Drag(), ROUTER_TOOL::handleLayerSwitch(), EDIT_TOOL::isRouterActive(), PCB_SELECTION_TOOL::Main(), BOARD_EDITOR_CONTROL::TrackWidthDec(), and BOARD_EDITOR_CONTROL::TrackWidthInc().
int EE_SELECTION_TOOL::Main | ( | const TOOL_EVENT & | aEvent | ) |
The main loop.
Definition at line 335 of file ee_selection_tool.cpp.
References AddItemToSel(), EE_COLLECTOR::AllItems, ARROW, EESCHEMA_SETTINGS::DRAWING::auto_start_wires, BUT_LEFT, BUT_MIDDLE, BUT_RIGHT, SELECTION::Clear(), EDA_ITEM::ClearFlags(), ClearSelection(), CollectHits(), DRAG_ANY, DRAG_SELECTED, EE_ACTIONS::drawBus, EE_ACTIONS::drawLines, EE_ACTIONS::drawWire, SCH_BASE_FRAME::eeconfig(), SELECTION::Empty(), EE_ACTIONS::enterSheet, KIGFX::VIEW_CONTROLS::ForceCursorPosition(), SELECTION::Front(), EE_SELECTION::GetBoundingBox(), SCH_BASE_FRAME::GetCanvas(), COLLECTOR::GetCount(), TOOLS_HOLDER::GetDragAction(), EDA_DRAW_FRAME::GetItem(), TOOL_MANAGER::GetMousePosition(), EDA_ITEM::GetParent(), TOOL_MANAGER::GetTool(), SCH_DRAW_PANEL::GetView(), TOOL_BASE::getViewControls(), grid, HAND, EE_POINT_EDITOR::HasPoint(), ID_POPUP_SCH_SELECT_UNIT_CMP, ID_POPUP_SCH_SELECT_UNIT_SYM_MAX, ID_POPUP_SCH_UNFOLD_BUS, ID_POPUP_SCH_UNFOLD_BUS_END, EDA_RECT::Inflate(), TOOL_MANAGER::InvokeTool(), IS_MOVING, IS_NEW, IS_ROLLOVER, SCH_CONNECTION::IsBus(), SCH_CONNECTION::IsNet(), SCH_CONNECTION::IsUnconnected(), LAYER_CONNECTABLE, LINE_BUS, LINE_GRAPHIC, LINE_WIRE_ADD, SELECTION_TOOL::m_additive, SELECTION_TOOL::m_disambiguateTimer, EESCHEMA_SETTINGS::m_Drawing, SELECTION_TOOL::m_exclusive_or, m_frame, m_isSymbolEditor, TOOL_INTERACTIVE::m_menu, m_nonModifiedCursor, SELECTION_TOOL::m_originalCursor, m_selection, SELECTION_TOOL::m_subtractive, TOOL_BASE::m_toolMgr, TOOL_ACTION::MakeEvent(), MD_ALT, MD_CTRL, MD_SHIFT, movableSchematicItems, movableSymbolAliasItems, movableSymbolItems, MOVING, narrowSelection(), niluuid, TOOL_EVENT::Parameter(), TOOL_MANAGER::ProcessEvent(), EE_ACTIONS::properties, DRAW_SEGMENT_EVENT_PARAMS::quitOnDraw, RemoveItemFromSel(), RequestSelection(), TOOL_MANAGER::RunAction(), SCH_FIELD_T, SCH_LINE_T, SCH_SHEET_T, SCH_SYMBOL_T, SELECT, selectionContains(), selectMultiple(), SelectPoint(), selectPoint(), EDA_DRAW_PANEL_GAL::SetCurrentCursor(), EDA_ITEM::SetFlags(), SELECTION::SetIsHover(), SELECTION_TOOL::setModifiersState(), TOOL_MENU::ShowContextMenu(), TA_CHOICE_MENU_CHOICE, TA_UNDO_REDO_PRE, TC_COMMAND, TOOLS_HOLDER::ToolStackIsEmpty(), EDA_ITEM::Type(), EE_ACTIONS::unfoldBus, KIGFX::VIEW::Update(), TOOL_INTERACTIVE::Wait(), ACTIONS::zoomFitObjects, and ACTIONS::zoomFitScreen.
Referenced by setTransitions().
|
private |
Apply rules to narrow the collection down to selectable objects, and then heuristics to try and narrow it to a single object.
collector | EE_COLLECTOR with elements to filter |
aWhere | point where we should narrow (if relevant) |
aCheckLocked | If false, remove locked elements from #collector |
aSelectPoints | If true, set STARTPOINT/ENDPOINT flags on individual wires |
Definition at line 831 of file ee_selection_tool.cpp.
References EDA_ITEM::ClearFlags(), ENDPOINT, COLLECTOR::GetCount(), SCH_LINE::GetEndPoint(), SCH_LINE::GetStartPoint(), GuessSelectionCandidates(), HitTestPoints(), SELECTION_TOOL::m_skip_heuristics, COLLECTOR::m_Threshold, COLLECTOR::Remove(), SCH_LINE_T, Selectable(), EDA_ITEM::SetFlags(), and STARTPOINT.
Referenced by Main(), and SelectPoint().
|
private |
Start the process to show our disambiguation menu once the user has kept the mouse down for the minimum time.
aEvent |
Definition at line 771 of file ee_selection_tool.cpp.
References EVENTS::DisambiguatePoint, TOOL_BASE::m_toolMgr, and TOOL_MANAGER::ProcessEvent().
Referenced by Init().
void EE_SELECTION_TOOL::OnIdle | ( | wxIdleEvent & | aEvent | ) |
Definition at line 777 of file ee_selection_tool.cpp.
References ADD, SCH_BASE_FRAME::GetCanvas(), SELECTION_TOOL::m_additive, SELECTION_TOOL::m_exclusive_or, m_frame, SELECTION_TOOL::m_multiple, m_nonModifiedCursor, SELECTION_TOOL::m_subtractive, EDA_DRAW_PANEL_GAL::SetCurrentCursor(), SELECTION_TOOL::setModifiersState(), SUBTRACT, TOOLS_HOLDER::ToolStackIsEmpty(), and XOR.
Referenced by SCH_BASE_FRAME::SCH_BASE_FRAME().
void EE_SELECTION_TOOL::RebuildSelection | ( | ) |
Rebuild the selection from the EDA_ITEMs' selection flags.
Commonly called after rolling back an undo state to make sure there aren't any stale pointers.
Definition at line 1548 of file ee_selection_tool.cpp.
References SELECTION::Clear(), LIB_SYMBOL::GetDrawItems(), SCH_BASE_FRAME::GetScreen(), EDA_ITEM::IsSelected(), SCH_SCREEN::Items(), m_frame, m_isSymbolEditor, m_selection, TOOL_BASE::m_toolMgr, TOOL_MANAGER::ProcessEvent(), select(), EVENTS::SelectedEvent, and updateReferencePoint().
Referenced by SCH_MOVE_TOOL::Main(), SYMBOL_EDITOR_EDIT_TOOL::Paste(), SYMBOL_EDITOR_EDIT_TOOL::Redo(), SYMBOL_EDIT_FRAME::RollbackSymbolFromUndo(), and SYMBOL_EDITOR_EDIT_TOOL::Undo().
int EE_SELECTION_TOOL::RemoveItemFromSel | ( | const TOOL_EVENT & | aEvent | ) |
Definition at line 1471 of file ee_selection_tool.cpp.
References m_selection, TOOL_EVENT::Parameter(), and SELECTION::SetIsHover().
Referenced by SCH_EDIT_FRAME::DeleteJunction(), SCH_LINE_WIRE_BUS_TOOL::doDrawSegments(), Main(), SCH_EDIT_FRAME::SchematicCleanUp(), and setTransitions().
void EE_SELECTION_TOOL::RemoveItemFromSel | ( | EDA_ITEM * | aItem, |
bool | aQuietMode = false |
||
) |
Definition at line 1479 of file ee_selection_tool.cpp.
References TOOL_BASE::m_toolMgr, TOOL_MANAGER::ProcessEvent(), unselect(), and EVENTS::UnselectedEvent.
int EE_SELECTION_TOOL::RemoveItemsFromSel | ( | const TOOL_EVENT & | aEvent | ) |
Definition at line 1492 of file ee_selection_tool.cpp.
References m_selection, TOOL_EVENT::Parameter(), and SELECTION::SetIsHover().
Referenced by SCH_MOVE_TOOL::Main(), RemoveItemsFromSel(), and setTransitions().
void EE_SELECTION_TOOL::RemoveItemsFromSel | ( | EDA_ITEMS * | aList, |
bool | aQuietMode = false |
||
) |
Definition at line 1500 of file ee_selection_tool.cpp.
References TOOL_BASE::m_toolMgr, TOOL_MANAGER::ProcessEvent(), unselect(), and EVENTS::UnselectedEvent.
void EE_SELECTION_TOOL::RemoveItemsFromSel | ( | std::vector< KIID > * | aList, |
bool | aQuietMode = false |
||
) |
A safer version of RemoveItemsFromSel( EDA_ITEMS ) which doesn't require the items to still exist.
Definition at line 1514 of file ee_selection_tool.cpp.
References alg::contains(), m_selection, and RemoveItemsFromSel().
EE_SELECTION & EE_SELECTION_TOOL::RequestSelection | ( | const KICAD_T * | aFilterList = EE_COLLECTOR::AllItems | ) |
Return either an existing selection (filtered), or the selection at the current cursor if the existing selection is empty.
Definition at line 1130 of file ee_selection_tool.cpp.
References SELECTION::ClearReferencePoint(), ClearSelection(), SELECTION::Empty(), KIGFX::VIEW_CONTROLS::GetCursorPosition(), SELECTION::GetItem(), SELECTION::GetSize(), TOOL_BASE::getViewControls(), EDA_ITEM::IsType(), m_selection, TOOL_BASE::m_toolMgr, TOOL_MANAGER::ProcessEvent(), SelectPoint(), SELECTION::SetIsHover(), unselect(), EVENTS::UnselectedEvent, and updateReferencePoint().
Referenced by SCH_MOVE_TOOL::AlignElements(), SCH_EDIT_FRAME::AnnotateSymbols(), SCH_EDIT_TOOL::AutoplaceFields(), SCH_EDIT_TOOL::BreakWire(), SCH_EDIT_TOOL::ChangeSymbols(), SCH_EDIT_TOOL::ChangeTextType(), SCH_EDIT_FRAME::CheckAnnotate(), SCH_EDIT_TOOL::CleanupSheetPins(), SCH_EDIT_TOOL::ConvertDeMorgan(), SYMBOL_EDITOR_EDIT_TOOL::Copy(), SCH_EDIT_FRAME::DeleteAnnotation(), SCH_EDITOR_CONTROL::doCopy(), SCH_EDITOR_CONTROL::doCrossProbeSchToPcb(), SYMBOL_EDITOR_EDIT_TOOL::DoDelete(), SCH_EDIT_TOOL::DoDelete(), SYMBOL_EDITOR_EDIT_TOOL::Duplicate(), SCH_EDIT_TOOL::EditField(), SCH_EDIT_TOOL::EditPageNumber(), SCH_EDITOR_CONTROL::EditWithSymbolEditor(), SCH_NAVIGATE_TOOL::EnterSheet(), SCH_EDITOR_CONTROL::EnterSheet(), SYMBOL_EDITOR_MOVE_TOOL::Main(), SCH_MOVE_TOOL::Main(), Main(), SYMBOL_EDITOR_EDIT_TOOL::Mirror(), SCH_EDIT_TOOL::Mirror(), SYMBOL_EDITOR_EDIT_TOOL::Properties(), SCH_EDIT_TOOL::Properties(), SYMBOL_EDITOR_EDIT_TOOL::Rotate(), SCH_EDIT_TOOL::Rotate(), SelectConnection(), EE_INSPECTION_TOOL::ShowDatasheet(), and BUS_UNFOLD_MENU::update().
|
overridevirtual |
Bring the tool to a known, initial state.
If the tool claimed anything from the model or the view, it must release it when its reset.
aReason | contains information about the reason of tool reset. |
Implements TOOL_BASE.
Definition at line 249 of file ee_selection_tool.cpp.
References KIGFX::VIEW::Add(), SELECTION::Clear(), ClearSelection(), SYMBOL_EDIT_FRAME::GetConvert(), KIGFX::VIEW::GetPainter(), KIGFX::PAINTER::GetSettings(), SYMBOL_EDIT_FRAME::GetUnit(), TOOL_BASE::getView(), m_convert, m_frame, m_isSymbolEditor, m_isSymbolViewer, m_selection, m_unit, TOOL_BASE::MODEL_RELOAD, KIGFX::VIEW::Remove(), and KIGFX::RENDER_SETTINGS::SetHighlight().
|
inherited |
Call a function using the main stack.
aFunc | is the function to be calls. |
Definition at line 87 of file tool_interactive.cpp.
References TOOL_BASE::m_toolMgr, and TOOL_MANAGER::RunMainStack().
Referenced by DRAWING_TOOL::PlaceText().
|
private |
Take necessary action mark an item as selected.
aItem | is an item to be selected. |
Definition at line 1840 of file ee_selection_tool.cpp.
References highlight(), m_selection, and SELECTED.
Referenced by AddItemsToSel(), AddItemToSel(), RebuildSelection(), SelectAll(), SelectConnection(), selectMultiple(), and selectPoint().
bool EE_SELECTION_TOOL::Selectable | ( | const EDA_ITEM * | aItem, |
const VECTOR2I * | aPos = nullptr , |
||
bool | checkVisibilityOnly = false |
||
) | const |
Check conditions for an item to be selected.
Definition at line 1751 of file ee_selection_tool.cpp.
References SCH_BASE_FRAME::eeconfig(), SYMBOL_EDIT_FRAME::GetConvert(), LIB_ITEM::GetConvert(), SCH_BASE_FRAME::GetShowAllPins(), SYMBOL_EDIT_FRAME::GetUnit(), LIB_ITEM::GetUnit(), grid, SYMBOL_EDIT_FRAME::IsSymbolAlias(), LAYER_CONNECTABLE, LIB_FIELD_T, LIB_PIN_T, LIB_SHAPE_T, LIB_SYMBOL_T, LIB_TEXT_T, m_frame, EESCHEMA_SETTINGS::m_Selection, TOOL_BASE::m_toolMgr, pin, SCH_MARKER_T, SCH_PIN_T, EESCHEMA_SETTINGS::SELECTION::select_pin_selects_symbol, and EDA_ITEM::Type().
Referenced by SYMBOL_EDITOR_EDIT_TOOL::DeleteItemCursor(), narrowSelection(), SelectAll(), and selectMultiple().
int EE_SELECTION_TOOL::SelectAll | ( | const TOOL_EVENT & | aEvent | ) |
Definition at line 956 of file ee_selection_tool.cpp.
References SCH_SHEET::GetPins(), TOOL_BASE::getView(), SELECTION_TOOL::m_multiple, pin, KIGFX::VIEW::Query(), select(), Selectable(), and BOX2< Vec >::SetMaximum().
Referenced by setTransitions().
int EE_SELECTION_TOOL::SelectConnection | ( | const TOOL_EVENT & | aEvent | ) |
Clear current selection event handler.
Definition at line 1403 of file ee_selection_tool.cpp.
References SCH_SCREEN::ClearDrawingState(), SELECTION::Empty(), EOT, SELECTION::Front(), SCH_BASE_FRAME::GetScreen(), SELECTION::GetSize(), m_frame, m_selection, TOOL_BASE::m_toolMgr, SCH_SCREEN::MarkConnections(), TOOL_MANAGER::ProcessEvent(), RequestSelection(), SCH_LINE_LOCATE_BUS_T, SCH_LINE_LOCATE_WIRE_T, select(), and EVENTS::SelectedEvent.
Referenced by setTransitions().
|
inline |
Find (but don't select) node under cursor.
Definition at line 127 of file ee_selection_tool.h.
References highlight(), and SELECTED.
|
private |
Set up handlers for various events.
Definition at line 1918 of file ee_selection_tool.cpp.
References BOX2< Vec >::Contains(), TOOL_BASE::getView(), BOX2< Vec >::Inflate(), m_selection, KIGFX::VIEW::ToWorld(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by Main().
int EE_SELECTION_TOOL::SelectionMenu | ( | const TOOL_EVENT & | aEvent | ) |
Show a popup menu to trim the COLLECTOR passed as aEvent's parameter down to a single item.
Definition at line 1590 of file ee_selection_tool.cpp.
References doSelectionMenu(), COLLECTOR::m_MenuCancelled, and TOOL_EVENT::Parameter().
Referenced by setTransitions().
|
private |
Handle drawing a selection box that allows one to select many items at the same time.
Definition at line 1194 of file ee_selection_tool.cpp.
References KIGFX::VIEW::Add(), allowedActions, BUT_LEFT, EDA_ITEM::ClearFlags(), SELECTION::ClearReferencePoint(), ClearSelection(), ENDPOINT, SCH_BASE_FRAME::GetCanvas(), KIGFX::PREVIEW::SELECTION_AREA::GetEnd(), KIGFX::PREVIEW::SELECTION_AREA::GetOrigin(), TOOL_BASE::getView(), TOOL_BASE::getViewControls(), KIGFX::VIEW::IsMirroredX(), SELECTION_TOOL::m_drag_additive, SELECTION_TOOL::m_drag_subtractive, SELECTION_TOOL::m_exclusive_or, m_frame, SELECTION_TOOL::m_multiple, m_selection, SELECTION_TOOL::m_subtractive, TOOL_BASE::m_toolMgr, EDA_RECT::Normalize(), TOOL_MANAGER::ProcessEvent(), KIGFX::VIEW::Query(), KIGFX::VIEW::Remove(), select(), SELECT_LASSO, SELECT_WINDOW, Selectable(), EVENTS::SelectedEvent, KIGFX::PREVIEW::SELECTION_AREA::SetAdditive(), KIGFX::VIEW_CONTROLS::SetAutoPan(), EDA_DRAW_PANEL_GAL::SetCurrentCursor(), KIGFX::PREVIEW::SELECTION_AREA::SetEnd(), KIGFX::PREVIEW::SELECTION_AREA::SetExclusiveOr(), SELECTION::SetIsHover(), KIGFX::PREVIEW::SELECTION_AREA::SetOrigin(), KIGFX::PREVIEW::SELECTION_AREA::SetSubtractive(), KIGFX::VIEW::SetVisible(), STARTPOINT, TEMP_SELECTED, unselect(), EVENTS::UnselectedEvent, KIGFX::VIEW::Update(), KIGFX::PREVIEW::SELECTION_AREA::ViewBBox(), TOOL_INTERACTIVE::Wait(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by Main().
int EE_SELECTION_TOOL::SelectNode | ( | const TOOL_EVENT & | aEvent | ) |
If node selected then expand to connection, otherwise select connection under cursor.
Definition at line 1393 of file ee_selection_tool.cpp.
References KIGFX::VIEW_CONTROLS::GetCursorPosition(), TOOL_BASE::getViewControls(), nodeTypes, and SelectPoint().
Referenced by setTransitions().
bool EE_SELECTION_TOOL::SelectPoint | ( | const VECTOR2I & | aWhere, |
const KICAD_T * | aFilterList = EE_COLLECTOR::AllItems , |
||
EDA_ITEM ** | aItem = nullptr , |
||
bool * | aSelectionCancelledFlag = nullptr , |
||
bool | aCheckLocked = false , |
||
bool | aAdd = false , |
||
bool | aSubtract = false , |
||
bool | aExclusiveOr = false |
||
) |
This overload of SelectPoint will create an EE_COLLECTOR and collect hits at location aWhere before calling the primary SelectPoint method.
aWhere | is the location where the item(s) should be collected |
aItem | is set to the newly selected item if only one was selected, otherwise is unchanged. |
aSelectionCancelledFlag | allows the function to inform its caller that a selection was canceled (for instance, by clicking outside of the disambiguation menu). |
aCheckLocked | indicates if locked items should be excluded. |
aAdd | indicates if found item(s) should be added to the selection |
aSubtract | indicates if found item(s) should be subtracted from the selection |
aExclusiveOr | indicates if found item(s) should be toggle in the selection |
Definition at line 940 of file ee_selection_tool.cpp.
References CollectHits(), narrowSelection(), and selectPoint().
Referenced by disambiguateCursor(), Main(), RequestSelection(), SelectNode(), and SCH_DRAWING_TOOLS::TwoClickPlace().
|
private |
This is the primary SelectPoint method that will prompt the user with a menu to disambiguate multiple selections and then finish by adding, subtracting or toggling the item(s) to the actual selection group.
aCollector | is an EE_COLLECTOR that already has collected items |
aItem | is set to the newly selected item if only one was selected, otherwise is unchanged. |
aSelectionCancelledFlag | allows the function to inform its caller that a selection was canceled (for instance, by clicking outside of the disambiguation menu). |
aAdd | indicates if found item(s) should be added to the selection |
aSubtract | indicates if found item(s) should be subtracted from the selection |
aExclusiveOr | indicates if found item(s) should be toggle in the selection |
Definition at line 871 of file ee_selection_tool.cpp.
References SELECTION::ClearReferencePoint(), ClearSelection(), doSelectionMenu(), COLLECTOR::GetCount(), COLLECTOR::m_MenuCancelled, m_selection, TOOL_BASE::m_toolMgr, TOOL_MANAGER::ProcessEvent(), TOOL_MANAGER::RunAction(), select(), EVENTS::SelectedEvent, EE_ACTIONS::selectionMenu, unselect(), and EVENTS::UnselectedEvent.
Referenced by Main(), and SelectPoint().
|
inherited |
Assign a context menu and tells when it should be activated.
aMenu | is the menu to be assigned. |
aTrigger | determines conditions upon which the context menu is activated. |
Definition at line 76 of file tool_interactive.cpp.
References CMENU_OFF, TOOL_BASE::m_toolMgr, TOOL_MANAGER::ScheduleContextMenu(), and ACTION_MENU::SetTool().
Referenced by GERBVIEW_SELECTION_TOOL::disambiguationMenu(), PL_SELECTION_TOOL::doSelectionMenu(), doSelectionMenu(), PCB_SELECTION_TOOL::doSelectionMenu(), TOOL_MENU::ShowContextMenu(), and SCH_LINE_WIRE_BUS_TOOL::UnfoldBus().
|
protectedinherited |
Set the configuration of m_additive, m_subtractive, m_exclusive_or, m_skip_heuristics from the state of modifier keys SHIFT, CTRL, ALT and depending on the OS.
Definition at line 40 of file selection_tool.cpp.
References SELECTION_TOOL::m_additive, SELECTION_TOOL::m_drag_additive, SELECTION_TOOL::m_drag_subtractive, SELECTION_TOOL::m_exclusive_or, SELECTION_TOOL::m_highlight_modifier, SELECTION_TOOL::m_skip_heuristics, and SELECTION_TOOL::m_subtractive.
Referenced by PL_SELECTION_TOOL::disambiguateCursor(), disambiguateCursor(), PCB_SELECTION_TOOL::disambiguateCursor(), PL_SELECTION_TOOL::Main(), GERBVIEW_SELECTION_TOOL::Main(), Main(), PCB_SELECTION_TOOL::Main(), OnIdle(), and PCB_SELECTION_TOOL::OnIdle().
|
overrideprivatevirtual |
This method is meant to be overridden in order to specify handlers for events.
It is called every time tool is reset or finished.
Implements TOOL_INTERACTIVE.
Definition at line 1937 of file ee_selection_tool.cpp.
References EE_ACTIONS::addItemsToSel, AddItemsToSel(), EE_ACTIONS::addItemToSel, AddItemToSel(), EE_ACTIONS::clearSelection, ClearSelection(), disambiguateCursor(), EVENTS::DisambiguatePoint, TOOL_INTERACTIVE::Go(), Main(), EE_ACTIONS::removeItemFromSel, RemoveItemFromSel(), EE_ACTIONS::removeItemsFromSel, RemoveItemsFromSel(), ACTIONS::selectAll, SelectAll(), EE_ACTIONS::selectConnection, SelectConnection(), EE_ACTIONS::selectionActivate, EE_ACTIONS::selectionMenu, SelectionMenu(), EE_ACTIONS::selectNode, SelectNode(), UpdateMenu(), and ACTIONS::updateMenu.
void EE_SELECTION_TOOL::UnbrightenItem | ( | EDA_ITEM * | aItem | ) |
Definition at line 1534 of file ee_selection_tool.cpp.
References BRIGHTENED, and unhighlight().
Referenced by SYMBOL_EDITOR_EDIT_TOOL::DeleteItemCursor(), SCH_EDIT_TOOL::DeleteItemCursor(), and SCH_EDITOR_CONTROL::UpdateFind().
|
private |
Unhighlight the item visually.
aItem | is an item to be be highlighted. |
aHighlightMode | should be either SELECTED or BRIGHTENED |
aGroup | is the group to remove the item from. |
Definition at line 1885 of file ee_selection_tool.cpp.
References BRIGHTENED, EDA_ITEM::ClearBrightened(), EDA_ITEM::ClearSelected(), EDA_ITEM::GetParent(), TOOL_BASE::getView(), SELECTION::Remove(), SCH_FIELD_T, SCH_PIN_T, SCH_SHEET_PIN_T, SELECTED, EDA_ITEM::Type(), and KIGFX::VIEW::Update().
Referenced by ClearSelection(), doSelectionMenu(), UnbrightenItem(), and unselect().
|
private |
Take necessary action mark an item as unselected.
aItem | is an item to be unselected. |
Definition at line 1846 of file ee_selection_tool.cpp.
References m_selection, SELECTED, and unhighlight().
Referenced by RemoveItemFromSel(), RemoveItemsFromSel(), RequestSelection(), selectMultiple(), and selectPoint().
int EE_SELECTION_TOOL::UpdateMenu | ( | const TOOL_EVENT & | aEvent | ) |
Definition at line 282 of file ee_selection_tool.cpp.
References m_selection, TOOL_EVENT::Parameter(), and ACTION_MENU::UpdateAll().
Referenced by setTransitions().
|
private |
Set the reference point to the anchor of the top-left item.
Definition at line 1165 of file ee_selection_tool.cpp.
References EE_SELECTION::GetTopLeftItem(), m_isSymbolEditor, m_selection, SELECTION::SetReferencePoint(), and SELECTION::Size().
Referenced by RebuildSelection(), and RequestSelection().
|
inherited |
Suspend execution of the tool until an event specified in aEventList arrives.
No parameters means waiting for any event.
Definition at line 57 of file tool_interactive.cpp.
References TOOL_BASE::m_toolMgr, and TOOL_MANAGER::ScheduleWait().
Referenced by GERBVIEW_SELECTION_TOOL::disambiguationMenu(), SCH_LINE_WIRE_BUS_TOOL::doDrawSegments(), PCB_TOOL_BASE::doInteractiveItemPlacement(), EDIT_TOOL::doMoveSelection(), PL_SELECTION_TOOL::doSelectionMenu(), doSelectionMenu(), PCB_SELECTION_TOOL::doSelectionMenu(), EDIT_TOOL::DragArcTrack(), DRAWING_TOOL::drawArc(), DRAWING_TOOL::DrawDimension(), MICROWAVE_TOOL::drawMicrowaveInductor(), DRAWING_TOOL::drawSegment(), SYMBOL_EDITOR_DRAWING_TOOLS::DrawShape(), PL_DRAWING_TOOLS::DrawShape(), SCH_DRAWING_TOOLS::DrawSheet(), DRAWING_TOOL::DrawZone(), PAD_TOOL::EnumeratePads(), ROUTER_TOOL::InlineDrag(), DRAWING_TOOL::InteractivePlaceWithPreview(), ZOOM_TOOL::Main(), PCB_PICKER_TOOL::Main(), EE_POINT_EDITOR::Main(), PL_EDIT_TOOL::Main(), CVPCB_FOOTPRINT_VIEWER_SELECTION_TOOL::Main(), CVPCB_CONTROL::Main(), PL_POINT_EDITOR::Main(), SYMBOL_EDITOR_MOVE_TOOL::Main(), PL_SELECTION_TOOL::Main(), EDA_3D_CONTROLLER::Main(), SCH_MOVE_TOOL::Main(), GERBVIEW_SELECTION_TOOL::Main(), Main(), PCB_SELECTION_TOOL::Main(), PICKER_TOOL::Main(), ROUTER_TOOL::MainLoop(), LENGTH_TUNER_TOOL::MainLoop(), GERBVIEW_INSPECTION_TOOL::MeasureTool(), PCB_VIEWER_TOOLS::MeasureTool(), PCB_POINT_EDITOR::OnSelectionChange(), ROUTER_TOOL::performDragging(), ROUTER_TOOL::performRouting(), LENGTH_TUNER_TOOL::performTuning(), GROUP_TOOL::PickNewMember(), EDIT_TOOL::pickReferencePoint(), SYMBOL_EDITOR_DRAWING_TOOLS::PlaceAnchor(), BOARD_EDITOR_CONTROL::PlaceFootprint(), SCH_DRAWING_TOOLS::PlaceImage(), DRAWING_TOOL::PlaceImportedGraphics(), PL_DRAWING_TOOLS::PlaceItem(), SCH_DRAWING_TOOLS::PlaceSymbol(), BOARD_EDITOR_CONTROL::PlaceTarget(), DRAWING_TOOL::PlaceText(), PL_SELECTION_TOOL::selectMultiple(), selectMultiple(), PCB_SELECTION_TOOL::selectMultiple(), GERBVIEW_SELECTION_TOOL::selectPoint(), PCB_SELECTION_TOOL::selectPoint(), POSITION_RELATIVE_TOOL::SelectPositionRelativeItem(), ZOOM_TOOL::selectRegion(), DRAWING_TOOL::SetAnchor(), SCH_DRAWING_TOOLS::SingleClickPlace(), SYMBOL_EDITOR_DRAWING_TOOLS::TwoClickPlace(), SCH_DRAWING_TOOLS::TwoClickPlace(), and SCH_LINE_WIRE_BUS_TOOL::UnfoldBus().
|
protectedinherited |
Definition at line 46 of file selection_tool.h.
Referenced by disambiguateCursor(), PL_SELECTION_TOOL::Main(), Main(), PCB_SELECTION_TOOL::Main(), OnIdle(), PCB_SELECTION_TOOL::OnIdle(), PL_SELECTION_TOOL::SelectPoint(), GERBVIEW_SELECTION_TOOL::selectPoint(), PCB_SELECTION_TOOL::selectPoint(), and SELECTION_TOOL::setModifiersState().
|
protectedinherited |
Definition at line 57 of file selection_tool.h.
Referenced by PL_SELECTION_TOOL::disambiguateCursor(), disambiguateCursor(), PCB_SELECTION_TOOL::disambiguateCursor(), and PCB_SELECTION_TOOL::Main().
|
private |
Definition at line 303 of file ee_selection_tool.h.
Referenced by CollectHits(), Init(), and Reset().
|
protectedinherited |
Definition at line 59 of file selection_tool.h.
Referenced by PL_SELECTION_TOOL::Init(), Init(), PCB_SELECTION_TOOL::Init(), PL_SELECTION_TOOL::Main(), Main(), and PCB_SELECTION_TOOL::Main().
|
protectedinherited |
Definition at line 54 of file selection_tool.h.
Referenced by PL_SELECTION_TOOL::selectMultiple(), selectMultiple(), PCB_SELECTION_TOOL::selectMultiple(), and SELECTION_TOOL::setModifiersState().
|
protectedinherited |
Definition at line 55 of file selection_tool.h.
Referenced by PL_SELECTION_TOOL::selectMultiple(), selectMultiple(), PCB_SELECTION_TOOL::selectMultiple(), and SELECTION_TOOL::setModifiersState().
|
protectedinherited |
Definition at line 48 of file selection_tool.h.
Referenced by disambiguateCursor(), PL_SELECTION_TOOL::Main(), Main(), PCB_SELECTION_TOOL::Main(), OnIdle(), PCB_SELECTION_TOOL::OnIdle(), PL_SELECTION_TOOL::selectMultiple(), selectMultiple(), PCB_SELECTION_TOOL::selectMultiple(), PL_SELECTION_TOOL::SelectPoint(), GERBVIEW_SELECTION_TOOL::selectPoint(), PCB_SELECTION_TOOL::selectPoint(), and SELECTION_TOOL::setModifiersState().
|
private |
Definition at line 295 of file ee_selection_tool.h.
Referenced by CollectHits(), doSelectionMenu(), GetNode(), Init(), Main(), OnIdle(), RebuildSelection(), Reset(), Selectable(), SelectConnection(), and selectMultiple().
|
protectedinherited |
Definition at line 53 of file selection_tool.h.
Referenced by PCB_SELECTION_TOOL::Main(), and SELECTION_TOOL::setModifiersState().
|
private |
Definition at line 300 of file ee_selection_tool.h.
Referenced by CollectHits(), GuessSelectionCandidates(), Init(), Main(), RebuildSelection(), Reset(), and updateReferencePoint().
|
private |
Definition at line 301 of file ee_selection_tool.h.
|
protectedinherited |
The functions below are not yet implemented - their interface may change.
Definition at line 125 of file tool_interactive.h.
Referenced by SCH_LINE_WIRE_BUS_TOOL::doDrawSegments(), PCB_TOOL_BASE::doInteractiveItemPlacement(), DRAWING_TOOL::drawArc(), DRAWING_TOOL::DrawDimension(), MICROWAVE_TOOL::drawMicrowaveInductor(), DRAWING_TOOL::drawSegment(), SYMBOL_EDITOR_DRAWING_TOOLS::DrawShape(), PL_DRAWING_TOOLS::DrawShape(), SCH_DRAWING_TOOLS::DrawSheet(), DRAWING_TOOL::DrawZone(), PAD_TOOL::EnumeratePads(), TOOL_INTERACTIVE::GetToolMenu(), ROUTER_TOOL::Init(), LENGTH_TUNER_TOOL::Init(), CVPCB_FOOTPRINT_VIEWER_SELECTION_TOOL::Init(), PL_EDIT_TOOL::Init(), SCH_EDIT_TOOL::Init(), PAD_TOOL::Init(), PL_DRAWING_TOOLS::Init(), SYMBOL_EDITOR_DRAWING_TOOLS::Init(), SYMBOL_EDITOR_CONTROL::Init(), PCB_VIEWER_TOOLS::Init(), FOOTPRINT_EDITOR_CONTROL::Init(), PL_SELECTION_TOOL::Init(), SCH_DRAWING_TOOLS::Init(), BOARD_EDITOR_CONTROL::Init(), GERBVIEW_SELECTION_TOOL::Init(), EDA_3D_CONTROLLER::Init(), DRAWING_TOOL::Init(), Init(), EE_TOOL_BASE< SCH_BASE_FRAME >::Init(), PCB_SELECTION_TOOL::Init(), SCH_LINE_WIRE_BUS_TOOL::Init(), PCB_TOOL_BASE::Init(), PICKER_TOOL::Init(), DRAWING_TOOL::InteractivePlaceWithPreview(), PCB_PICKER_TOOL::Main(), CVPCB_FOOTPRINT_VIEWER_SELECTION_TOOL::Main(), PL_EDIT_TOOL::Main(), SYMBOL_EDITOR_MOVE_TOOL::Main(), EDA_3D_CONTROLLER::Main(), PL_SELECTION_TOOL::Main(), SCH_MOVE_TOOL::Main(), GERBVIEW_SELECTION_TOOL::Main(), Main(), PCB_SELECTION_TOOL::Main(), PICKER_TOOL::Main(), ROUTER_TOOL::MainLoop(), LENGTH_TUNER_TOOL::MainLoop(), GERBVIEW_INSPECTION_TOOL::MeasureTool(), PCB_VIEWER_TOOLS::MeasureTool(), ROUTER_TOOL::performDragging(), ROUTER_TOOL::performRouting(), LENGTH_TUNER_TOOL::performTuning(), SYMBOL_EDITOR_DRAWING_TOOLS::PlaceAnchor(), BOARD_EDITOR_CONTROL::PlaceFootprint(), SCH_DRAWING_TOOLS::PlaceImage(), DRAWING_TOOL::PlaceImportedGraphics(), PL_DRAWING_TOOLS::PlaceItem(), SCH_DRAWING_TOOLS::PlaceSymbol(), BOARD_EDITOR_CONTROL::PlaceTarget(), DRAWING_TOOL::PlaceText(), DRAWING_TOOL::SetAnchor(), SCH_DRAWING_TOOLS::SingleClickPlace(), SYMBOL_EDITOR_DRAWING_TOOLS::TwoClickPlace(), and SCH_DRAWING_TOOLS::TwoClickPlace().
|
protectedinherited |
Definition at line 49 of file selection_tool.h.
Referenced by OnIdle(), PCB_SELECTION_TOOL::OnIdle(), PCB_SELECTION_TOOL::Selectable(), SelectAll(), PL_SELECTION_TOOL::selectMultiple(), selectMultiple(), and PCB_SELECTION_TOOL::selectMultiple().
|
private |
Definition at line 298 of file ee_selection_tool.h.
|
protectedinherited |
Definition at line 61 of file selection_tool.h.
Referenced by PL_SELECTION_TOOL::disambiguateCursor(), disambiguateCursor(), PCB_SELECTION_TOOL::disambiguateCursor(), PL_SELECTION_TOOL::Main(), Main(), and PCB_SELECTION_TOOL::Main().
|
private |
Definition at line 296 of file ee_selection_tool.h.
Referenced by AddItemsToSel(), AddItemToSel(), ClearSelection(), EE_SELECTION_TOOL(), GetSelection(), Main(), RebuildSelection(), RemoveItemFromSel(), RemoveItemsFromSel(), RequestSelection(), Reset(), select(), SelectConnection(), selectionContains(), selectMultiple(), selectPoint(), unselect(), UpdateMenu(), updateReferencePoint(), and ~EE_SELECTION_TOOL().
|
protectedinherited |
Definition at line 50 of file selection_tool.h.
Referenced by PL_SELECTION_TOOL::disambiguateCursor(), disambiguateCursor(), PCB_SELECTION_TOOL::disambiguateCursor(), narrowSelection(), PL_SELECTION_TOOL::SelectPoint(), PCB_SELECTION_TOOL::selectPoint(), and SELECTION_TOOL::setModifiersState().
|
protectedinherited |
Definition at line 47 of file selection_tool.h.
Referenced by disambiguateCursor(), PL_SELECTION_TOOL::Main(), Main(), PCB_SELECTION_TOOL::Main(), OnIdle(), PCB_SELECTION_TOOL::OnIdle(), PL_SELECTION_TOOL::selectMultiple(), selectMultiple(), PCB_SELECTION_TOOL::selectMultiple(), PL_SELECTION_TOOL::SelectPoint(), GERBVIEW_SELECTION_TOOL::selectPoint(), PCB_SELECTION_TOOL::selectPoint(), and SELECTION_TOOL::setModifiersState().
|
protectedinherited |
Name of the tool.
Names are expected to obey the format application.ToolName (eg. pcbnew.InteractiveSelection).
Definition at line 209 of file tool_base.h.
Referenced by TOOL_INTERACTIVE::Activate(), TOOL_BASE::GetId(), and TOOL_BASE::IsToolActive().
|
protectedinherited |
Definition at line 214 of file tool_base.h.
Referenced by TOOL_INTERACTIVE::Activate(), PL_SELECTION_TOOL::AddItemsToSel(), AddItemsToSel(), PL_SELECTION_TOOL::AddItemToSel(), PCB_SELECTION_TOOL::AddItemToSel(), AddItemToSel(), SCH_MOVE_TOOL::AlignElements(), SCH_EDITOR_CONTROL::AssignNetclass(), CVPCB_ASSOCIATION_TOOL::Associate(), TOOL_BASE::attachManager(), SCH_EDIT_TOOL::AutoplaceFields(), SCH_EDIT_TOOL::BreakWire(), BOARD_INSPECTION_TOOL::calculateSelectionRatsnest(), ROUTER_TOOL::CanInlineDrag(), SCH_EDIT_TOOL::ChangeTextType(), EDIT_TOOL::ChangeTrackWidth(), SCH_EDIT_TOOL::CleanupSheetPins(), GERBVIEW_CONTROL::ClearAllLayers(), BOARD_INSPECTION_TOOL::ClearHighlight(), SCH_EDITOR_CONTROL::ClearHighlight(), PL_SELECTION_TOOL::ClearSelection(), PCB_SELECTION_TOOL::ClearSelection(), GERBVIEW_SELECTION_TOOL::clearSelection(), ClearSelection(), SCH_EDIT_TOOL::ConvertDeMorgan(), PL_EDIT_TOOL::Copy(), SYMBOL_EDITOR_EDIT_TOOL::Copy(), PAD_TOOL::copyPadSettings(), EDIT_TOOL::copyToClipboard(), EDIT_TOOL::CreateArray(), MICROWAVE_TOOL::createInductorBetween(), DRC_TOOL::CrossProbe(), BOARD_INSPECTION_TOOL::CrossProbePcbToSch(), COMMON_TOOLS::CursorControl(), SCH_EDITOR_CONTROL::Cut(), SYMBOL_EDITOR_EDIT_TOOL::DeleteItemCursor(), PL_EDIT_TOOL::DeleteItemCursor(), SCH_EDIT_TOOL::DeleteItemCursor(), PCB_CONTROL::DeleteItemCursor(), SCH_EDITOR_CONTROL::doCopy(), SCH_EDITOR_CONTROL::doCrossProbeSchToPcb(), SYMBOL_EDITOR_EDIT_TOOL::DoDelete(), SCH_EDIT_TOOL::DoDelete(), SCH_LINE_WIRE_BUS_TOOL::doDrawSegments(), BOARD_INSPECTION_TOOL::doHideNet(), PCB_TOOL_BASE::doInteractiveItemPlacement(), EDIT_TOOL::doMoveSelection(), SCH_LINE_WIRE_BUS_TOOL::doUnfoldBus(), COMMON_TOOLS::doZoomInOut(), COMMON_TOOLS::doZoomToPreset(), EDIT_TOOL::Drag(), DRAWING_TOOL::DrawArc(), DRAWING_TOOL::drawArc(), DRAWING_TOOL::DrawCircle(), DRAWING_TOOL::DrawDimension(), DRAWING_TOOL::DrawRectangle(), DRAWING_TOOL::drawSegment(), SCH_LINE_WIRE_BUS_TOOL::DrawSegments(), SYMBOL_EDITOR_DRAWING_TOOLS::DrawShape(), PL_DRAWING_TOOLS::DrawShape(), SCH_DRAWING_TOOLS::DrawSheet(), DRAWING_TOOL::DrawZone(), BOARD_EDITOR_CONTROL::DrillOrigin(), SYMBOL_EDITOR_EDIT_TOOL::Duplicate(), EDIT_TOOL::Duplicate(), SCH_EDIT_TOOL::EditField(), SCH_EDIT_TOOL::editFieldText(), BOARD_EDITOR_CONTROL::EditFpInFpEditor(), PAD_TOOL::EditPad(), SYMBOL_EDITOR_EDIT_TOOL::editShapeProperties(), SYMBOL_EDITOR_EDIT_TOOL::editSymbolProperties(), SCH_EDITOR_CONTROL::EditWithSymbolEditor(), GROUP_TOOL::EnterGroup(), SCH_NAVIGATE_TOOL::EnterSheet(), SCH_EDITOR_CONTROL::EnterSheet(), PAD_TOOL::EnumeratePads(), EE_INSPECTION_TOOL::ExcludeMarker(), PCB_SELECTION_TOOL::expandConnection(), PAD_TOOL::explodePad(), PCB_SELECTION_TOOL::filterSelection(), PCB_SELECTION_TOOL::FindItem(), SCH_EDITOR_CONTROL::FindSymbolAndItem(), SCH_LINE_WIRE_BUS_TOOL::finishSegments(), EDIT_TOOL::Flip(), EDIT_TOOL::GetAndPlace(), TOOL_BASE::GetManager(), TOOL_BASE::getModelInt(), DRAWING_TOOL::getSourceZoneForAction(), TOOL_BASE::getToolHolderInt(), TOOL_BASE::getView(), TOOL_BASE::getViewControls(), TOOL_INTERACTIVE::goInternal(), COMMON_TOOLS::GridNext(), COMMON_TOOLS::GridPreset(), COMMON_TOOLS::GridPrev(), PCB_CONTROL::GridSetOrigin(), GROUP_TOOL::Group(), GERBVIEW_CONTROL::HighlightControl(), BOARD_INSPECTION_TOOL::HighlightItem(), BOARD_INSPECTION_TOOL::HighlightNet(), SCH_EDITOR_CONTROL::HighlightNet(), BOARD_INSPECTION_TOOL::highlightNet(), SCH_EDITOR_CONTROL::HighlightNetCursor(), PL_EDIT_TOOL::ImportDrawingSheetContent(), FOOTPRINT_EDITOR_CONTROL::ImportFootprint(), BOARD_REANNOTATE_TOOL::Init(), SYMBOL_EDITOR_EDIT_TOOL::Init(), PL_EDIT_TOOL::Init(), SCH_EDIT_TOOL::Init(), GROUP_TOOL::Init(), PAD_TOOL::Init(), CONVERT_TOOL::Init(), PL_DRAWING_TOOLS::Init(), GLOBAL_EDIT_TOOL::Init(), SYMBOL_EDITOR_CONTROL::Init(), PL_POINT_EDITOR::Init(), BOARD_INSPECTION_TOOL::Init(), ALIGN_DISTRIBUTE_TOOL::Init(), PCB_POINT_EDITOR::Init(), BOARD_EDITOR_CONTROL::Init(), POSITION_RELATIVE_TOOL::Init(), EE_TOOL_BASE< SCH_BASE_FRAME >::Init(), EDIT_TOOL::Init(), ROUTER_TOOL::InlineBreakTrack(), ROUTER_TOOL::InlineDrag(), BOARD_INSPECTION_TOOL::InspectClearance(), BOARD_INSPECTION_TOOL::InspectConstraints(), DRAWING_TOOL::InteractivePlaceWithPreview(), EDIT_TOOL::invokeInlineRouter(), EDIT_TOOL::isRouterActive(), TOOL_BASE::IsToolActive(), GROUP_TOOL::LeaveGroup(), SCH_NAVIGATE_TOOL::LeaveSheet(), SCH_EDITOR_CONTROL::LeaveSheet(), COMMON_CONTROL::ListHotKeys(), BOARD_INSPECTION_TOOL::LocalRatsnestTool(), PCB_PICKER_TOOL::Main(), PL_EDIT_TOOL::Main(), CVPCB_FOOTPRINT_VIEWER_SELECTION_TOOL::Main(), SYMBOL_EDITOR_MOVE_TOOL::Main(), CVPCB_CONTROL::Main(), PL_SELECTION_TOOL::Main(), EDA_3D_CONTROLLER::Main(), SCH_MOVE_TOOL::Main(), GERBVIEW_SELECTION_TOOL::Main(), Main(), PCB_SELECTION_TOOL::Main(), ROUTER_TOOL::MainLoop(), LENGTH_TUNER_TOOL::MainLoop(), PCB_VIEWER_TOOLS::MeasureTool(), SYMBOL_EDITOR_EDIT_TOOL::Mirror(), SCH_EDIT_TOOL::Mirror(), EDIT_TOOL::Mirror(), BOARD_EDITOR_CONTROL::modifyLockSelected(), EDIT_TOOL::MoveExact(), SYMBOL_EDITOR_CONTROL::OnDeMorgan(), PL_SELECTION_TOOL::onDisambiguationExpire(), onDisambiguationExpire(), PCB_SELECTION_TOOL::onDisambiguationExpire(), COMMON_TOOLS::OnGridChanged(), PCB_POINT_EDITOR::OnSelectionChange(), SYMBOL_EDITOR_EDIT_TOOL::Paste(), PL_EDIT_TOOL::Paste(), SCH_EDITOR_CONTROL::Paste(), PAD_TOOL::pastePadProperties(), ROUTER_TOOL::performDragging(), ROUTER_TOOL::performRouting(), GROUP_TOOL::PickNewMember(), EDIT_TOOL::pickReferencePoint(), SYMBOL_EDITOR_EDIT_TOOL::PinTable(), PCB_CONTROL::placeBoardItems(), BOARD_EDITOR_CONTROL::PlaceFootprint(), SCH_DRAWING_TOOLS::PlaceImage(), DRAWING_TOOL::PlaceImportedGraphics(), PL_DRAWING_TOOLS::PlaceItem(), SCH_DRAWING_TOOLS::PlaceSymbol(), BOARD_EDITOR_CONTROL::PlaceTarget(), DRAWING_TOOL::PlaceText(), PCB_CONTROL::Print(), GERBVIEW_CONTROL::Print(), SYMBOL_EDITOR_EDIT_TOOL::Properties(), SCH_EDIT_TOOL::Properties(), EDIT_TOOL::Properties(), PAD_TOOL::pushPadSettings(), RebuildSelection(), SYMBOL_EDITOR_EDIT_TOOL::Redo(), SCH_EDITOR_CONTROL::Redo(), POSITION_RELATIVE_TOOL::RelativeItemSelectionMove(), EDIT_TOOL::Remove(), PCB_POINT_EDITOR::removeCorner(), GROUP_TOOL::RemoveFromGroup(), PL_SELECTION_TOOL::RemoveItemFromSel(), RemoveItemFromSel(), PCB_SELECTION_TOOL::RemoveItemFromSel(), PL_SELECTION_TOOL::RemoveItemsFromSel(), RemoveItemsFromSel(), SCH_EDIT_TOOL::RepeatDrawItem(), SYMBOL_EDITOR_DRAWING_TOOLS::RepeatDrawItem(), RequestSelection(), PCB_SELECTION_TOOL::RequestSelection(), PAD_TOOL::Reset(), COMMON_TOOLS::Reset(), PNS::TOOL_BASE::Reset(), EDA_3D_CONTROLLER::Reset(), COMMON_TOOLS::ResetLocalCoords(), TOOL_INTERACTIVE::resetTransitions(), SYMBOL_EDITOR_EDIT_TOOL::Rotate(), SCH_EDIT_TOOL::Rotate(), EDIT_TOOL::Rotate(), TOOL_INTERACTIVE::RunMainStack(), DRC_TOOL::RunTests(), Selectable(), SelectConnection(), PCB_TOOL_BASE::selection(), COMMON_TOOLS::SelectionTool(), GERBVIEW_SELECTION_TOOL::SelectItem(), GERBVIEW_SELECTION_TOOL::SelectItems(), PCB_SELECTION_TOOL::SelectItems(), PL_SELECTION_TOOL::selectMultiple(), selectMultiple(), PCB_SELECTION_TOOL::selectMultiple(), PCB_SELECTION_TOOL::selectNet(), PL_SELECTION_TOOL::SelectPoint(), GERBVIEW_SELECTION_TOOL::selectPoint(), selectPoint(), PCB_SELECTION_TOOL::selectPoint(), POSITION_RELATIVE_TOOL::SelectPositionRelativeItem(), PCB_SELECTION_TOOL::selectSameSheet(), PCB_SELECTION_TOOL::selectSheetContents(), DRAWING_TOOL::SetAnchor(), TOOL_INTERACTIVE::SetContextMenu(), EDA_3D_CONTROLLER::SetMaterial(), DRC_TOOL::ShowDRCDialog(), SCH_DRAWING_TOOLS::SingleClickPlace(), EDA_3D_CONTROLLER::ToggleVisibility(), BOARD_EDITOR_CONTROL::TrackWidthDec(), BOARD_EDITOR_CONTROL::TrackWidthInc(), SYMBOL_EDITOR_DRAWING_TOOLS::TwoClickPlace(), SCH_DRAWING_TOOLS::TwoClickPlace(), SYMBOL_EDITOR_EDIT_TOOL::Undo(), SCH_EDITOR_CONTROL::Undo(), GROUP_TOOL::Ungroup(), GERBVIEW_SELECTION_TOOL::UnselectItem(), GERBVIEW_SELECTION_TOOL::UnselectItems(), PCB_SELECTION_TOOL::UnselectItems(), PNS::TOOL_BASE::updateEndItem(), EE_INSPECTION_TOOL::UpdateMessagePanel(), GERBVIEW_CONTROL::UpdateMessagePanel(), PL_EDITOR_CONTROL::UpdateMessagePanel(), PCB_CONTROL::UpdateMessagePanel(), EDIT_TOOL::updateModificationPoint(), EE_POINT_EDITOR::updateParentItem(), BOARD_INSPECTION_TOOL::UpdateSelectionRatsnest(), PNS::TOOL_BASE::updateStartItem(), BOARD_EDITOR_CONTROL::ViaSizeDec(), BOARD_EDITOR_CONTROL::ViaSizeInc(), TOOL_INTERACTIVE::Wait(), BOARD_EDITOR_CONTROL::ZoneDuplicate(), and BOARD_EDITOR_CONTROL::ZoneMerge().
|
protectedinherited |
Definition at line 213 of file tool_base.h.
Referenced by TOOL_BASE::GetName().
|
protectedinherited |
Unique identifier for the tool, assigned by a TOOL_MANAGER instance.
Definition at line 206 of file tool_base.h.
Referenced by TOOL_BASE::GetType(), and BOARD_COMMIT::Push().
|
private |
Definition at line 302 of file ee_selection_tool.h.
Referenced by CollectHits(), Init(), and Reset().