45                                                const wxString& aCommitMessage, 
int aOptions )
 
   47    using namespace std::placeholders;
 
   48    std::unique_ptr<BOARD_ITEM> newItem;
 
   50    frame()->PushTool( aTool );
 
   56    bool         restoreAngleSnapMode = 
false;
 
   77        savedAngleSnapMode = *angleSnapMode;
 
   79        restoreAngleSnapMode = 
true;
 
  104                if( 
frame()->GetModel() )
 
  109                    newItem->SetPosition( aPosition );
 
  110                    preview.
Add( newItem.get() );
 
  120        makeNewItem( 
controls()->GetCursorPosition() );
 
  139        grid.SetSnap( 
false ); 
 
  140        grid.SetUseGrid( 
getView()->GetGAL()->GetGridSnapping() && !evt->DisableGridSnapping() );
 
  157        if( evt->IsCancelInteractive() )
 
  162                frame()->PopTool( aTool );
 
  171                frame()->PopTool( aTool );
 
  175        else if( evt->IsActivate() )
 
  180            if( evt->IsPointEditor() )
 
  184            else if( evt->IsMoveTool() )
 
  191                frame()->PopTool( aTool );
 
  200                makeNewItem( cursorPos );
 
  216                if( !aPlacer->
PlaceItem( newBoardItem, commit ) )
 
  219                    newItem.reset( newBoardItem );
 
  224                commit.
Push( aCommitMessage );
 
  234                    makeNewItem( 
controls()->GetCursorPosition() );
 
  247        else if( newItem && evt->Category() == 
TC_COMMAND )
 
  255                newItem->Rotate( newItem->GetPosition(), rotationAngle );
 
  260                newItem->Flip( newItem->GetPosition(), 
frame()->GetPcbNewSettings()->m_FlipDirection );
 
  265                frame()->OnEditItemRequest( newItem.get() );
 
  275                makeNewItem( cursorPos );
 
  284        else if( newItem && evt->IsMotion() )
 
  287            newItem->SetPosition( cursorPos );
 
  305    if( restoreAngleSnapMode )
 
  307        *angleSnapMode = savedAngleSnapMode;
 
 
  393    aCommit.
Add( aItem );
 
 
static TOOL_ACTION cancelInteractive
 
static TOOL_ACTION selectionClear
Clear the current selection.
 
static TOOL_ACTION refreshPreview
 
virtual void Push(const wxString &aMessage=wxEmptyString, int aCommitFlags=0) override
Execute the changes.
 
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
 
COMMIT & Add(EDA_ITEM *aItem, BASE_SCREEN *aScreen=nullptr)
Add a new item to the model.
 
void SetFlags(EDA_ITEM_FLAGS aMask)
 
void ClearFlags(EDA_ITEM_FLAGS aMask=EDA_ITEM_ALL_FLAGS)
 
EDA_ITEM_FLAGS GetFlags() const
 
static const TOOL_EVENT SelectedItemsModified
Selected items were moved, this can be very high frequency on the canvas, use with care.
 
virtual void Update(const VIEW_ITEM *aItem, int aUpdateFlags) const override
For dynamic VIEWs, inform the associated VIEW that the graphical representation of this item has chan...
 
virtual void Add(VIEW_ITEM *aItem, int aDrawPriority=-1) override
Add a VIEW_ITEM to the view.
 
virtual void Remove(VIEW_ITEM *aItem) override
Remove a VIEW_ITEM from the view.
 
virtual void CaptureCursor(bool aEnabled)
Force the cursor to stay within the drawing panel area.
 
virtual void ForceCursorPosition(bool aEnabled, const VECTOR2D &aPosition=VECTOR2D(0, 0))
Place the cursor immediately at a given point.
 
virtual void ShowCursor(bool aEnabled)
Enable or disables display of cursor.
 
virtual void SetAutoPan(bool aEnabled)
Turn on/off auto panning (this feature is used when there is a tool active (eg.
 
virtual void Add(VIEW_ITEM *aItem)
Add an item to the group.
 
static TOOL_ACTION trackViaSizeChanged
 
static TOOL_ACTION properties
Activation of the edit tool.
 
static TOOL_ACTION angleSnapModeChanged
Notification event when angle mode changes.
 
static TOOL_ACTION flip
Flipping of selected objects.
 
VIEWERS_DISPLAY_OPTIONS m_ViewersDisplay
 
static bool ShowAlways(const SELECTION &aSelection)
The default condition function (always returns true).
 
virtual void Add(EDA_ITEM *aItem)
 
virtual void Clear() override
Remove all the stored items from the group.
 
std::uint32_t EDA_ITEM_FLAGS
 
LEADER_MODE
The kind of the leader line.
 
@ DIRECT
Unconstrained point-to-point.
 
T * GetAppSettings(const char *aFilename)
 
virtual void SnapItem(BOARD_ITEM *aItem)
 
PCB_BASE_EDIT_FRAME * m_frame
 
virtual std::unique_ptr< BOARD_ITEM > CreateItem()=0
 
virtual bool PlaceItem(BOARD_ITEM *aItem, BOARD_COMMIT &aCommit)
 
LEADER_MODE m_AngleSnapMode
 
VECTOR2< int32_t > VECTOR2I