54 auto& ctxMenu =
m_menu->GetMenu();
58 ctxMenu.AddSeparator( 1 );
153 if( evt->IsCancelInteractive() || ( !isText && item && evt->IsAction( &
ACTIONS::undo ) ) )
155 bool wasPending = item !=
nullptr;
160 if( isText || !wasPending )
163 else if( evt->IsActivate() )
168 if( evt->IsMoveTool() )
171 m_frame->PushTool( originalEvent );
178 bool placeItem = item !=
nullptr;
184 if( createPending() )
192 if( item && placeItem )
292 if( evt->IsCancelInteractive() || ( item && evt->IsAction( &
ACTIONS::undo ) ) )
308 else if( evt->IsActivate() )
319 if( evt->IsPointEditor() || evt->IsMoveTool() )
322 m_frame->PushTool( originalEvent );
351 item->ClearEditFlags();
364 item->GetPeer()->MoveEndPointToIU( cursorPos );
365 item->SetEnd( item->GetPeer()->GetEndPosIU( 0 ) );
static TOOL_ACTION cancelInteractive
static TOOL_ACTION activatePointEditor
static TOOL_ACTION selectionClear
Clear the current selection.
static TOOL_ACTION refreshPreview
Drawing sheet structure type definitions.
void MoveStartPointToIU(const VECTOR2I &aPosition)
Move the starting point of the item to a new position.
void MoveToIU(const VECTOR2I &aPosition)
Move item to a new position.
const VECTOR2I GetStartPosIU(int ii=0) const
const std::vector< DS_DRAW_ITEM_BASE * > & GetDrawItems() const
static DS_DATA_MODEL & GetTheInstance()
Return the instance of DS_DATA_MODEL used in the application.
void Append(DS_DATA_ITEM *aItem)
Base class to handle basic graphic items.
virtual void ClearEditFlags()
virtual void SetPosition(const VECTOR2I &aPos)
void SetFlags(EDA_ITEM_FLAGS aMask)
virtual void CaptureCursor(bool aEnabled)
Force the cursor to stay within the drawing panel area.
virtual void ShowCursor(bool aEnabled)
Enable or disables display of cursor.
VECTOR2D GetCursorPosition() const
Return the current cursor position in world coordinates.
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, int aDrawPriority=-1)
Add a VIEW_ITEM to the view.
virtual void Remove(VIEW_ITEM *aItem)
Remove a VIEW_ITEM from the view.
virtual void Update(const VIEW_ITEM *aItem, int aUpdateFlags) const
For dynamic VIEWs, inform the associated VIEW that the graphical representation of this item has chan...
static TOOL_ACTION placeImage
static TOOL_ACTION drawRectangle
static TOOL_ACTION placeText
static TOOL_ACTION drawLine
static bool ShowAlways(const SELECTION &aSelection)
The default condition function (always returns true).
This file is part of the common library.
#define IS_NEW
New item, just created.
#define IS_MOVING
Item being moved.
VECTOR2< int32_t > VECTOR2I