42 m_selectionTool( nullptr )
49 m_frame = getEditFrame<PL_EDITOR_FRAME>();
56 ctxMenu.AddSeparator( 1 );
68 m_frame = getEditFrame<PL_EDITOR_FRAME>();
118 if( evt->IsCancelInteractive() )
128 else if( evt->IsActivate() )
133 if( evt->IsMoveTool() )
252 if( evt->IsCancelInteractive() || evt->IsActivate() )
263 else if( evt->IsCancelInteractive() )
268 if( evt->IsActivate() && !evt->IsPointEditor() && !evt->IsMoveTool() )
295 item->ClearEditFlags();
308 item->GetPeer()->MoveEndPointToUi( cursorPos );
309 item->SetEnd( item->GetPeer()->GetEndPosIU( 0 ) );
static TOOL_ACTION cancelInteractive
static TOOL_ACTION activatePointEditor
static TOOL_ACTION refreshPreview
Drawing sheet structure type definitions.
void MoveToUi(const VECTOR2I &aPosition)
Move item to a new position.
const VECTOR2I GetStartPosIU(int ii=0) const
void MoveStartPointToUi(const VECTOR2I &aPosition)
Move the starting point of the item to a new position.
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 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.