64 virtual ~MICROWAVE_PLACER()
68 std::unique_ptr<BOARD_ITEM> CreateItem()
override
72 case MICROWAVE_FOOTPRINT_SHAPE::GAP:
73 case MICROWAVE_FOOTPRINT_SHAPE::STUB:
74 case MICROWAVE_FOOTPRINT_SHAPE::STUB_ARC:
75 return std::unique_ptr<FOOTPRINT>( m_tool->createFootprint( m_itemType ) );
77 case MICROWAVE_FOOTPRINT_SHAPE::FUNCTION_SHAPE:
78 return std::unique_ptr<FOOTPRINT>( m_tool->createPolygonShape() );
81 return std::unique_ptr<FOOTPRINT>();
116 frame.PushTool( aEvent );
121 frame.GetCanvas()->SetCurrentCursor( KICURSOR::PENCIL );
132 bool originSet =
false;
141 while(
auto evt =
Wait() )
156 if( evt->IsCancelInteractive() )
162 frame.PopTool( aEvent );
166 else if( evt->IsActivate() )
171 if( evt->IsMoveTool() )
178 frame.PopTool( aEvent );
183 else if( !originSet && ( evt->IsClick(
BUT_LEFT ) || evt->IsDrag(
BUT_LEFT ) ) )
186 tpGeomMgr.
SetEnd( cursorPos );
194 else if( originSet && ( evt->IsClick(
BUT_LEFT ) || evt->IsMouseUp(
BUT_LEFT ) ) )
210 else if( originSet && ( evt->IsMotion() || evt->IsDrag(
BUT_LEFT ) ) )
213 tpGeomMgr.
SetEnd( cursorPos );
230 frame.GetCanvas()->SetCurrentCursor( KICURSOR::ARROW );
A color representation with 4 components: red, green, blue, alpha.
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 Add(VIEW_ITEM *aItem, int aDrawPriority=-1) override
Add a VIEW_ITEM to the view.
virtual void Remove(VIEW_ITEM *aItem) override
Remove a VIEW_ITEM from the view.
Represent an area drawn by drawing a rectangle of a given aspect along a vector, with the midpoint of...
void SetFillColor(const COLOR4D &aNewColor)
Set the line width to set before drawing preview.
void SetStrokeColor(const COLOR4D &aNewColor)
Set the fill color to set before drawing preview.
void SetLineWidth(double aNewWidth)
Represent a very simple geometry manager for items that have a start and end point.
void SetOrigin(const VECTOR2I &aOrigin)
< Set the origin of the ruler (the fixed end)
void SetAngleSnap(bool aSnap)
VECTOR2I GetOrigin() const
void SetEnd(const VECTOR2I &aEnd)
Set the current end of the rectangle (the end that moves with the cursor.
An interface for classes handling user events controlling the view behavior such as zooming,...
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.
Hold a (potentially large) number of VIEW_ITEMs and renders them on a graphics device provided by the...
void SetVisible(VIEW_ITEM *aItem, bool aIsVisible=true)
Set the item visibility.
static TOOL_ACTION microwaveCreateGap
static TOOL_ACTION microwaveCreateStubArc
static TOOL_ACTION microwaveCreateStub
static TOOL_ACTION microwaveCreateLine
static TOOL_ACTION microwaveCreateFunctionShape
The main frame for Pcbnew.
This file is part of the common library.
@ GEOMETRY
Position or shape has changed.