42 m_selectionTool( nullptr )
49 m_frame = getEditFrame<PL_EDITOR_FRAME>();
52 auto& ctxMenu =
m_menu->GetMenu();
56 ctxMenu.AddSeparator( 1 );
68 m_frame = getEditFrame<PL_EDITOR_FRAME>();
128 if( evt->IsCancelInteractive() || ( item && evt->IsAction( &
ACTIONS::undo ) ) )
140 else if( evt->IsActivate() )
145 if( evt->IsMoveTool() )
158 bool placeItem =
true;
186 if( item && placeItem )
269 if( evt->IsCancelInteractive() || ( item && evt->IsAction( &
ACTIONS::undo ) ) )
285 else if( evt->IsActivate() )
295 if( evt->IsPointEditor() || evt->IsMoveTool() )
325 item->ClearEditFlags();
338 item->GetPeer()->MoveEndPointToIU( cursorPos );
339 item->SetEnd( item->GetPeer()->GetEndPosIU( 0 ) );
static TOOL_ACTION cancelInteractive
static TOOL_ACTION activatePointEditor
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.
DS_ITEM_TYPE GetType() const
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
Base class to handle basic graphic items.
DS_DATA_ITEM * GetPeer() const
void AddStandardSubMenus(TOOL_MENU &aMenu)
Construct a "basic" menu for a tool, containing only items that apply to all tools (e....
void SetCurrentCursor(KICURSOR aCursor)
Set the current cursor shape for this panel.
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 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 clearSelection
Clear the current selection.
static TOOL_ACTION placeImage
static TOOL_ACTION drawRectangle
static TOOL_ACTION placeText
static TOOL_ACTION drawLine
void OnModify() override
Must be called after a change in order to set the "modify" flag.
DS_DATA_ITEM * AddDrawingSheetItem(int aType)
Add a new item to the drawing sheet item list.
void RollbackFromUndo()
Apply the last command in Undo List without stacking a Redo.
void SaveCopyInUndoList()
Save a copy of the description (in a S expr string) for Undo/redo commands.
PL_DRAW_PANEL_GAL * GetCanvas() const override
Return a pointer to GAL-based canvas of given EDA draw frame.
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.