45#include <wx/stattext.h>
52 std::unique_ptr<KIGFX::GAL_DISPLAY_OPTIONS> aOpts,
54 PCB_DRAW_PANEL_GAL( aParent, -1, wxPoint( 0, 0 ), wxSize( 200, 200 ), *aOpts, aGalType ),
56 m_displayOptions(
std::
move( aOpts ) ),
57 m_currentFootprint( nullptr )
60 ShowScrollbars( wxSHOW_SB_NEVER, wxSHOW_SB_NEVER );
61 EnableScrolling(
false,
false );
118 [&](
EDA_ITEM* descendant,
void* aTestData )
121 return INSPECT_RESULT::CONTINUE;
130 for(
PAD*
pad : aFootprint->Pads() )
201 std::shared_ptr<FOOTPRINT> aFootprintB )
242 return static_cast<wxWindow*
>( this );
264 std::unique_ptr<GAL_DISPLAY_OPTIONS_IMPL> gal_opts;
266 gal_opts = std::make_unique<GAL_DISPLAY_OPTIONS_IMPL>();
267 gal_opts->ReadConfig( *
Pgm().GetCommonSettings(), cfg->m_Window, aParent );
271 std::move( gal_opts ), galType );
282 gridCfg.
grids[gridIdx].x );
284 gridCfg.
grids[gridIdx].y );
constexpr EDA_IU_SCALE pcbIUScale
@ OFF
Net (and netclass) colors are not shown.
static const ADVANCED_CFG & GetCfg()
Get the singleton instance's config, which is shared by all consumers.
const std::vector< GRID > DefaultGridSizeList() const
constexpr const Vec & GetOrigin() const
constexpr const SizeVec & GetSize() const
void ForceRefresh()
Force a redraw.
KIGFX::GAL * GetGAL() const
Return a pointer to the GAL instance used in the panel.
void StartDrawing()
Begin drawing if it was stopped previously.
void SetStealsFocus(bool aStealsFocus)
Set whether focus is taken on certain events (mouseover, keys, etc).
A base class for most all the KiCad significant classes used in schematics and boards.
virtual INSPECT_RESULT Visit(INSPECTOR inspector, void *testData, const std::vector< KICAD_T > &aScanTypes)
May be re-implemented for each derived class in order to handle all the types given by its member dat...
const FOOTPRINT * GetEnumeratedFootprint(const wxString &aNickname, const wxString &aFootprintName)
A version of FootprintLoad() for use after FootprintEnumerate() for more efficient cache management.
A color representation with 4 components: red, green, blue, alpha.
void SetGridSize(const VECTOR2D &aGridSize)
Set the grid size.
void SetGridVisibility(bool aVisibility)
Set the visibility setting of the grid.
Contains all the knowledge about how to draw graphical object onto any particular output device.
virtual RENDER_SETTINGS * GetSettings()=0
Return a pointer to current settings that are going to be used when drawing items.
Contains methods for drawing PCB-specific items.
PCB specific render settings.
const COLOR4D & GetBackgroundColor() const override
Return current background color settings.
HIGH_CONTRAST_MODE m_ContrastModeDisplay
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...
virtual void Add(VIEW_ITEM *aItem, int aDrawPriority=-1) override
Add a VIEW_ITEM to the view.
virtual void Remove(VIEW_ITEM *aItem) override
Remove a VIEW_ITEM from the view.
const COLOR4D & GetLayerColor(int aLayer) const
Return the color used to draw a layer.
void SetHighlight(bool aEnabled, int aNetcode=-1, bool aMulti=false)
Turns on/off highlighting.
virtual void SetScale(double aScale, VECTOR2D aAnchor={ 0, 0 })
Set the scaling factor, zooming around a given anchor point.
void SetViewport(const BOX2D &aViewport)
Set the visible area of the VIEW.
void Clear()
Remove all items from the view.
void UpdateAllItems(int aUpdateFlags)
Update all items in the view according to the given flags.
PAINTER * GetPainter() const
Return the painter object used by the view for drawing #VIEW_ITEMS.
void SetVisible(VIEW_ITEM *aItem, bool aIsVisible=true)
Set the item visibility.
A mix in class which holds the location of a wxWindow's KIWAY.
PROJECT & Prj() const
Return a reference to the PROJECT associated with this KIWAY.
A minimalistic software bus for communications between various DLLs/DSOs (DSOs) within the same KiCad...
A logical library item identifier and consists of various portions much like a URI.
const UTF8 & GetLibItemName() const
const UTF8 & GetLibNickname() const
Return the logical library name portion of a LIB_ID.
void UpdateColors()
Update the color settings in the painter and GAL.
virtual KIGFX::PCB_VIEW * GetView() const override
Return a pointer to the #VIEW instance used in the panel.
void SyncLayersVisibility(const BOARD *aBoard)
Update "visibility" property of each layer of a given BOARD.
virtual SETTINGS_MANAGER & GetSettingsManager() const
static FP_LIB_TABLE * PcbFootprintLibs(PROJECT *aProject)
Return the table of footprint libraries without Kiway.
T * GetAppSettings()
Returns a handle to the a given settings by type If the settings have already been loaded,...
EDA_UNITS GetUserUnits() const
std::function< INSPECT_RESULT(EDA_ITEM *aItem, void *aTestData) > INSPECTOR_FUNC
Used to inspect and possibly collect the (search) results of iterating over a list or tree of KICAD_T...
bool m_HyperZoom
Slide the zoom steps over for debugging things "up close".
KICOMMON_API double DoubleValueFromString(const EDA_IU_SCALE &aIuScale, EDA_UNITS aUnits, const wxString &aTextValue, EDA_DATA_TYPE aType=EDA_DATA_TYPE::DISTANCE)
Function DoubleValueFromString converts aTextValue to a double.
@ REPAINT
Item needs to be redrawn.
@ ALL
All except INITIAL_ADD.
void Refresh()
Update the board display after modifying it by a python script (note: it is automatically called by a...
PGM_BASE & Pgm()
The global Program "get" accessor.
std::vector< GRID > grids
std::vector< double > zoom_factors
@ PCB_DIM_ORTHOGONAL_T
class PCB_DIM_ORTHOGONAL, a linear dimension constrained to x/y
@ PCB_DIM_LEADER_T
class PCB_DIM_LEADER, a leader dimension (graphic item)
@ PCB_DIM_CENTER_T
class PCB_DIM_CENTER, a center point marking (graphic item)
@ PCB_DIM_ALIGNED_T
class PCB_DIM_ALIGNED, a linear dimension (graphic item)
@ PCB_DIM_RADIAL_T
class PCB_DIM_RADIAL, a radius or diameter dimension
VECTOR2< double > VECTOR2D
#define ZOOM_LIST_PCBNEW_HYPER