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>();
130 bool originSet =
false;
137 view.Add( &previewRect );
139 while(
auto evt =
Wait() )
150 view.SetVisible( &previewRect,
false );
154 if( evt->IsCancelInteractive() )
161 else if( evt->IsActivate() )
166 if( evt->IsMoveTool() )
169 frame.PushTool( originalEvent );
175 else if( !originSet && ( evt->IsClick(
BUT_LEFT )
180 tpGeomMgr.
SetEnd( cursorPos );
188 else if( originSet && ( evt->IsClick(
BUT_LEFT )
201 view.SetVisible( &previewRect,
false );
205 else if( originSet && ( evt->IsMotion()
210 tpGeomMgr.
SetEnd( cursorPos );
212 view.SetVisible( &previewRect,
true );
225 view.Remove( &previewRect );
static TOOL_ACTION cursorClick
static TOOL_ACTION refreshPreview
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 fill color to set before drawing preview.
void SetStrokeColor(const COLOR4D &aNewColor)
Set the stroke color to set before drawing preview.
void SetLineWidth(double aNewWidth)
Set the line width to set before drawing preview.
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