61 virtual ~MICROWAVE_PLACER()
65 std::unique_ptr<BOARD_ITEM> CreateItem()
override
72 return std::unique_ptr<FOOTPRINT>( m_tool->createFootprint( m_itemType ) );
75 return std::unique_ptr<FOOTPRINT>( m_tool->createPolygonShape() );
78 return std::unique_ptr<FOOTPRINT>();
113 frame.PushTool( aEvent );
129 bool originSet =
false;
136 view.Add( &previewRect );
138 while(
auto evt =
Wait() )
149 view.SetVisible( &previewRect,
false );
153 if( evt->IsCancelInteractive() )
159 frame.PopTool( aEvent );
163 else if( evt->IsActivate() )
168 if( evt->IsMoveTool() )
175 frame.PopTool( aEvent );
180 else if( !originSet && ( evt->IsClick(
BUT_LEFT ) || evt->IsDrag(
BUT_LEFT ) ) )
183 tpGeomMgr.
SetEnd( cursorPos );
191 else if( originSet && ( evt->IsClick(
BUT_LEFT ) || evt->IsMouseUp(
BUT_LEFT ) ) )
202 view.SetVisible( &previewRect,
false );
207 else if( originSet && ( evt->IsMotion() || evt->IsDrag(
BUT_LEFT ) ) )
210 tpGeomMgr.
SetEnd( cursorPos );
212 view.SetVisible( &previewRect,
true );
225 view.Remove( &previewRect );
A color representation with 4 components: red, green, blue, alpha.
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)
An interface for classes handling user events controlling the view behavior such as zooming,...
Hold a (potentially large) number of VIEW_ITEMs and renders them on a graphics device provided by the...
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.
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(LEADER_MODE aSnap)
VECTOR2I GetOrigin() const
void SetEnd(const VECTOR2I &aEnd)
Set the current end of the rectangle (the end that moves with the cursor.
This file is part of the common library.
@ GEOMETRY
Position or shape has changed.
VECTOR2< int32_t > VECTOR2I