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>();
116 frame.PushTool( aEvent );
132 bool originSet =
false;
139 view.Add( &previewRect );
141 while(
auto evt =
Wait() )
152 view.SetVisible( &previewRect,
false );
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 ) ) )
205 view.SetVisible( &previewRect,
false );
210 else if( originSet && ( evt->IsMotion() || evt->IsDrag(
BUT_LEFT ) ) )
213 tpGeomMgr.
SetEnd( cursorPos );
215 view.SetVisible( &previewRect,
true );
228 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