71 ctxMenu.AddSeparator( 1 );
104 static const std::vector<KICAD_T> incrementable = {
SCH_LABEL_T,
117 if( selection.Empty() )
120 KICAD_T type = selection.Front()->Type();
121 bool allSameType =
true;
125 if( item->Type() != type )
148 commit = &localCommit;
150 const auto modifyItem =
165 switch( item->Type() )
175 if( bbox && bbox->Contains( mousePosition ) )
183 pin.SetNumber( *nextNumber );
193 if( bbox && bbox->Contains( mousePosition ) )
201 pin.SetName( *nextName );
236 if( !localCommit.
Empty() )
237 localCommit.
Push(
_(
"Increment" ) );
239 if( selection.IsHover() )
262 [
this](
const VECTOR2D& aPosition ) ->
bool
285 for(
int i = collector.GetCount() - 1; i >= 0; --i )
287 if( !selectionTool->
Selectable( collector[ i ] ) )
288 collector.Remove( i );
291 if( collector.GetCount() > 1 )
294 EDA_ITEM* item = collector.GetCount() == 1 ? collector[ 0 ] :
nullptr;
309 [
this](
const int& aFinalState )
339 m_frame->UpdateItem( aItem,
false, aUpdateRTree );
359 symbolEditFrame->SaveCopyInUndoList( wxEmptyString,
dynamic_cast<LIB_SYMBOL*
>( item ) );
363 schematicFrame->SaveCopyInUndoList( schematicFrame->GetScreen(), item,
UNDO_REDO::CHANGED, aAppend );
365 if( aDirtyConnectivity )
369 && ( item->
Connection()->
Name() == schematicFrame->GetHighlightedConnection()
372 schematicFrame->DirtyHighlightedConnection();
std::optional< BOX2I > OPT_BOX2I
static TOOL_ACTION cancelInteractive
static TOOL_ACTION pickerTool
static TOOL_ACTION selectionActivate
Activation of the selection tool.
static TOOL_ACTION doDelete
static TOOL_ACTION selectionClear
Clear the current selection.
static TOOL_ACTION refreshPreview
COMMIT & Modify(EDA_ITEM *aItem, BASE_SCREEN *aScreen=nullptr, RECURSE_MODE aRecurse=RECURSE_MODE::NO_RECURSE)
Modify a given item in the model.
A base class for most all the KiCad significant classes used in schematics and boards.
bool HasFlag(EDA_ITEM_FLAGS aFlag) const
virtual const wxString & GetText() const
Return the string associated with the text object.
virtual void SetText(const wxString &aText)
Define a library symbol object.
A pin layout helper is a class that manages the layout of the parts of a pin on a schematic symbol:
OPT_BOX2I GetPinNumberBBox()
Get the bounding box of the pin number, if there is one.
OPT_BOX2I GetPinNameBBox()
Get the bounding box of the pin name, if there is one.
A shim class between EDA_DRAW_FRAME and several derived classes: SYMBOL_EDIT_FRAME,...
static const std::vector< KICAD_T > DeletableItems
Commit for the schematic and symbol editors.
void Push(const wxString &aMessage=wxEmptyString, int aCommitFlags=0) override
Execute the changes.
bool HasDriverChanged() const
wxString Name(bool aIgnoreSheet=false) const
Schematic editor (Eeschema) main window.
Base class for any item which can be embedded within the SCHEMATIC container class,...
void SetConnectivityDirty(bool aDirty=true)
Set the dirty flag.
bool IsConnectivityDirty() const
SCH_CONNECTION * Connection(const SCH_SHEET_PATH *aSheet=nullptr) const
Retrieve the connection associated with this object in the given sheet.
static bool ShowAlways(const SELECTION &aSelection)
The default condition function (always returns true).
Heuristically increment a string's n'th part from the right.
The symbol library editor main window.
#define SELECTED_BY_DRAG
Item was algorithmically selected as a dragged item.
@ FRAME_SCH_SYMBOL_EDITOR
Increment event parameters.
STRING_INCREMENTER incrementer
KICAD_T
The set of class identification values stored in EDA_ITEM::m_structType.
UNDO_REDO
Undo Redo considerations: Basically we have 3 cases New item Deleted item Modified item there is also...
VECTOR2< int32_t > VECTOR2I
VECTOR2< double > VECTOR2D