65 virtual ~MICROWAVE_PLACER()
69 std::unique_ptr<BOARD_ITEM> CreateItem()
override
76 return std::unique_ptr<FOOTPRINT>( m_tool->createFootprint( m_itemType ) );
79 return std::unique_ptr<FOOTPRINT>( m_tool->createPolygonShape() );
82 return std::unique_ptr<FOOTPRINT>();
117 frame.PushTool( aEvent );
133 bool originSet =
false;
140 view.Add( &previewRect );
142 while(
auto evt =
Wait() )
153 view.SetVisible( &previewRect,
false );
157 if( evt->IsCancelInteractive() )
163 frame.PopTool( aEvent );
167 else if( evt->IsActivate() )
172 if( evt->IsMoveTool() )
179 frame.PopTool( aEvent );
184 else if( !originSet && ( evt->IsClick(
BUT_LEFT ) || evt->IsDrag(
BUT_LEFT ) ) )
187 tpGeomMgr.
SetEnd( cursorPos );
195 else if( originSet && ( evt->IsClick(
BUT_LEFT ) || evt->IsMouseUp(
BUT_LEFT ) ) )
206 view.SetVisible( &previewRect,
false );
211 else if( originSet && ( evt->IsMotion() || evt->IsDrag(
BUT_LEFT ) ) )
214 tpGeomMgr.
SetEnd( cursorPos );
216 view.SetVisible( &previewRect,
true );
229 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