40 auto activeToolCondition =
50 ctxMenu.AddSeparator( 1 );
82 template<
class T>
void Flip( T& aValue )
92 Flip( opts.m_DisplayPadNum );
97 for(
PAD*
pad : fp->Pads() )
111 Flip( opts.m_DisplayPadFill );
116 for(
PAD*
pad : fp->Pads() )
135 for(
BOARD_ITEM* item : fp->GraphicalItems() )
168 for(
BOARD_ITEM* item : fp->GraphicalItems() )
208 bool originSet =
false;
211 frame()->GetDisplayOptions().m_DisplayInvertXAxis,
212 frame()->GetDisplayOptions().m_DisplayInvertYAxis );
227 controls.SetAutoPan(
false );
228 controls.CaptureCursor(
false );
234 controls.ShowCursor(
true );
235 controls.SetAutoPan(
false );
236 controls.CaptureCursor(
false );
245 const VECTOR2I cursorPos =
grid.BestSnapAnchor( controls.GetMousePosition(), nullptr );
246 controls.ForceCursorPosition(
true, cursorPos );
248 if( evt->IsCancelInteractive() )
260 else if( evt->IsActivate() )
265 if( evt->IsMoveTool() )
277 else if( !originSet && ( evt->IsDrag(
BUT_LEFT ) || evt->IsClick(
BUT_LEFT ) ) )
280 twoPtMgr.
SetEnd( cursorPos );
282 controls.CaptureCursor(
true );
283 controls.SetAutoPan(
true );
288 else if( originSet && ( evt->IsClick(
BUT_LEFT ) || evt->IsMouseUp(
BUT_LEFT ) ) )
292 controls.SetAutoPan(
false );
293 controls.CaptureCursor(
false );
296 else if( originSet && ( evt->IsMotion() || evt->IsDrag(
BUT_LEFT ) ) )
304 twoPtMgr.
SetEnd( cursorPos );
323 ruler.
UpdateDir(
frame()->GetDisplayOptions().m_DisplayInvertXAxis,
324 frame()->GetDisplayOptions().m_DisplayInvertYAxis );
344 controls.SetAutoPan(
false );
345 controls.CaptureCursor(
false );
static TOOL_ACTION show3DViewer
void AddStandardSubMenus(TOOL_MENU &aMenu)
Construct a "basic" menu for a tool, containing only items that apply to all tools (e....
void SetCurrentCursor(KICURSOR aCursor)
Set the current cursor shape for this panel.
class FP_TEXT, text in a footprint
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
constexpr KICAD_T BaseType(const KICAD_T aType)
Return the underlying type of the given type.
Represent a very simple geometry manager for items that have a start and end point.
PCB_DRAW_PANEL_GAL * GetCanvas() const override
Return a pointer to GAL-based canvas of given EDA draw frame.
static TOOL_ACTION cancelInteractive
class PCB_TEXT, text on a layer
GAL * GetGAL() const
Return the #GAL this view is using to draw graphical primitives.
class FP_SHAPE, a footprint edge
void SwitchUnits(EDA_UNITS aUnits)
Switch the ruler units.
virtual void Remove(VIEW_ITEM *aItem) override
Remove a VIEW_ITEM from the view.
KICAD_T
The set of class identification values stored in EDA_ITEM::m_structType.
void SetAngleSnap(bool aSnap)
Classes used in Pcbnew, CvPcb and GerbView.
static TOOL_ACTION measureTool
bool GetGridSnapping() const
Container for display options like enable/disable some optional drawings.
void SetDisplayOptions(const PCB_DISPLAY_OPTIONS &aOptions, bool aRefresh=true)
Updates the current display options from the given options struct.
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...
Item needs to be redrawn.
void UpdateDir(bool aFlipX, bool aFlipY)
Create and handle a window for the 3d viewer connected to a Kiway and a pcbboard.
static TOOL_ACTION showPadNumbers
static TOOL_ACTION updatePreferences
void SetOrigin(const VECTOR2I &aOrigin)
< Set the origin of the ruler (the fixed end)
bool m_PcbUse45DegreeLimit
A drawn ruler item for showing the distance between two points.
bool m_FpeditUse45DegreeLimit
bool m_DisplayGraphicsFill
class PCB_DIMENSION_BASE: abstract dimension meta-type
class PCB_TARGET, a target (graphic item)
static TOOL_ACTION padDisplayMode
static TOOL_ACTION graphicsOutlines
Display footprint graphics as outlines.
static TOOL_ACTION updateUnits
virtual void Update3DView(bool aMarkDirty, bool aRefresh, const wxString *aTitle=nullptr)
Update the 3D view, if the viewer is opened by this frame.
virtual void Refresh(bool aEraseBackground=true, const wxRect *aRect=nullptr) override
Update the board display after modifying it by a python script (note: it is automatically called by a...
PCBNEW_SETTINGS & Settings()
void SetVisible(VIEW_ITEM *aItem, bool aIsVisible=true)
Set the item visibility.
EDA_3D_VIEWER_FRAME * CreateAndShow3D_Frame()
Shows the 3D view frame.
virtual void Add(VIEW_ITEM *aItem, int aDrawPriority=-1) override
Add a VIEW_ITEM to the view.
SGLIB_API S3DMODEL * GetModel(SCENEGRAPH *aNode)
Function GetModel creates an S3DMODEL representation of aNode (raw data, no transforms)
class PCB_SHAPE, a segment not on copper layers
EDA_UNITS GetUserUnits() const
Return the user units currently in use.
void SetEnd(const VECTOR2I &aEnd)
Set the current end of the rectangle (the end that moves with the cursor.
Position or shape has changed.
static TOOL_ACTION textOutlines
Display texts as lines.