64 virtual ~MICROWAVE_PLACER()
68 std::unique_ptr<BOARD_ITEM> CreateItem()
override 75 return std::unique_ptr<FOOTPRINT>( m_tool->createFootprint( m_itemType ) );
78 return std::unique_ptr<FOOTPRINT>( m_tool->createPolygonShape() );
81 return std::unique_ptr<FOOTPRINT>();
93 _(
"Place microwave feature" ),
134 bool originSet =
false;
143 while(
auto evt =
Wait() )
158 if( evt->IsCancelInteractive() )
168 else if( evt->IsActivate() )
173 if( evt->IsMoveTool() )
185 else if( !originSet && ( evt->IsClick(
BUT_LEFT ) || evt->IsDrag(
BUT_LEFT ) ) )
188 tpGeomMgr.
SetEnd( cursorPos );
196 else if( originSet && ( evt->IsClick(
BUT_LEFT ) || evt->IsMouseUp(
BUT_LEFT ) ) )
212 else if( originSet && ( evt->IsMotion() || evt->IsDrag(
BUT_LEFT ) ) )
215 tpGeomMgr.
SetEnd( cursorPos );
virtual void ShowCursor(bool aEnabled)
Enable or disables display of cursor.
Represent an area drawn by drawing a rectangle of a given aspect along a vector, with the midpoint of...
void SetLineWidth(double aNewWidth)
void SetCurrentCursor(KICURSOR aCursor)
Set the current cursor shape for this panel.
void SetStrokeColor(const COLOR4D &aNewColor)
Set the fill color to set before drawing preview.
This file is part of the common library.
static TOOL_ACTION microwaveCreateStubArc
Represent a very simple geometry manager for items that have a start and end point.
PCB_DRAW_PANEL_GAL * GetCanvas() const override
Return a pointer to GAL-based canvas of given EDA draw frame.
VECTOR2I GetOrigin() const
static TOOL_ACTION microwaveCreateLine
virtual void Remove(VIEW_ITEM *aItem) override
Remove a VIEW_ITEM from the view.
void SetAngleSnap(bool aSnap)
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 CaptureCursor(bool aEnabled)
Force the cursor to stay within the drawing panel area.
void SetOrigin(const VECTOR2I &aOrigin)
< Set the origin of the ruler (the fixed end)
An interface for classes handling user events controlling the view behavior such as zooming,...
static TOOL_ACTION microwaveCreateGap
void SetFillColor(const COLOR4D &aNewColor)
Set the line width to set before drawing preview.
virtual void SetAutoPan(bool aEnabled)
Turn on/off auto panning (this feature is used when there is a tool active (eg.
static TOOL_ACTION microwaveCreateStub
static TOOL_ACTION microwaveCreateFunctionShape
The main frame for Pcbnew.
void SetVisible(VIEW_ITEM *aItem, bool aIsVisible=true)
Set the item visibility.
virtual void Add(VIEW_ITEM *aItem, int aDrawPriority=-1) override
Add a VIEW_ITEM to the view.
Hold a (potentially large) number of VIEW_ITEMs and renders them on a graphics device provided by the...
VECTOR2D GetCursorPosition() const
Return the current cursor position in world coordinates.
void SetEnd(const VECTOR2I &aEnd)
Set the current end of the rectangle (the end that moves with the cursor.
Position or shape has changed.
A color representation with 4 components: red, green, blue, alpha.