46 m_selectionTool( nullptr )
53 m_frame = getEditFrame<PL_EDITOR_FRAME>();
60 ctxMenu.AddSeparator( 1 );
72 m_frame = getEditFrame<PL_EDITOR_FRAME>();
126 if( evt->IsCancelInteractive() )
136 else if( evt->IsActivate() )
141 if( evt->IsMoveTool() )
262 if( evt->IsCancelInteractive() || evt->IsActivate() )
273 else if( evt->IsCancelInteractive() )
278 if( evt->IsActivate() && !evt->IsPointEditor() && !evt->IsMoveTool() )
289 dataItem->
MoveToUi( (wxPoint) cursorPos );
305 item->ClearEditFlags();
318 item->GetPeer()->MoveEndPointToUi( (wxPoint) cursorPos );
319 item->SetEnd( item->GetPeer()->GetEndPosUi( 0 ) );
virtual void ShowCursor(bool aEnabled)
Enable or disables display of cursor.
static bool ShowAlways(const SELECTION &aSelection)
The default condition function (always returns true).
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.
PL_DRAW_PANEL_GAL * GetCanvas() const override
Return a pointer to GAL-based canvas of given EDA draw frame.
static TOOL_ACTION activatePointEditor
#define IS_NEW
New item, just created.
This file is part of the common library.
virtual void SetPosition(const wxPoint &aPos)
static TOOL_ACTION drawLine
static TOOL_ACTION placeImage
static TOOL_ACTION cancelInteractive
void SetFlags(EDA_ITEM_FLAGS aMask)
static TOOL_ACTION placeText
void OnModify()
Must be called after a change in order to set the "modify" flag.
Base class to handle basic graphic items.
#define IS_MOVING
Item being moved.
virtual void CaptureCursor(bool aEnabled)
Force the cursor to stay within the drawing panel area.
const std::vector< DS_DRAW_ITEM_BASE * > & GetDrawItems() const
static TOOL_ACTION drawRectangle
virtual void SetAutoPan(bool aEnabled)
Turn on/off auto panning (this feature is used when there is a tool active (eg.
static TOOL_ACTION clearSelection
Clear the current selection.
void MoveStartPointToUi(const wxPoint &aPosition)
Move the starting point of the item to a new position.
DS_DATA_ITEM * GetPeer() const
Drawing sheet structure type definitions.
void SaveCopyInUndoList()
Save a copy of the description (in a S expr string) for Undo/redo commands.
void MoveToUi(const wxPoint &aPosition)
Move item to a new position.
void RollbackFromUndo()
Apply the last command in Undo List without stacking a Redo.
DS_DATA_ITEM * AddDrawingSheetItem(int aType)
Add a new item to the drawing sheet item list.
static TOOL_ACTION refreshPreview
VECTOR2D GetCursorPosition() const
Return the current cursor position in world coordinates.
static TOOL_ACTION cursorClick
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...
const wxPoint GetStartPosUi(int ii=0) const