27#include <wx/imaglist.h>
32#include <wx/dcbuffer.h>
60 SetSizer(
new wxBoxSizer( wxHORIZONTAL ) );
63 GetSizer()->Add(
m_canvas, 1, wxEXPAND );
65 GetSizer()->Fit(
this );
78 wxNotebook( aParent, wxID_ANY, wxDefaultPosition, wxDefaultSize ),
88 wxImageList* imageList =
new wxImageList( swatchSize.x, swatchSize.y );
100 imageList->Add( swatch, *wxWHITE );
103 AssignImageList( imageList );
106 GetSizer()->Fit(
this );
114 if( GetSelection() >= 0 && GetSelection() < (
int) GetPageCount() )
118 preferredLayer = curPage->
GetLayer();
130 while( GetPageCount() )
147 AddPage( page, layerName,
false, layer );
155 if( layer == preferredLayer )
156 preferredPage = page;
162 SetSelection( FindPage( preferredPage ) );
171 SetSelection( aEvent.GetSelection() );
181 for(
int ii = 0; ii < (int) GetPageCount(); ++ii )
Information pertinent to a Pcbnew printed circuit board.
const wxString GetLayerName(PCB_LAYER_ID aLayer) const
Return the name of a aLayer.
static const COLOR4D WHITE
static const COLOR4D UNSPECIFIED
For legacy support; used as a value to indicate color hasn't been set yet.
COLOR4D GetColor(int aLayer) const
static wxBitmap MakeBitmap(const KIGFX::COLOR4D &aColor, const KIGFX::COLOR4D &aBackground, const wxSize &aSize, const wxSize &aCheckerboardSize, const KIGFX::COLOR4D &aCheckerboardBackground, const std::vector< int > &aMargins={ 0, 0, 0, 0 })
A color representation with 4 components: red, green, blue, alpha.
Hold a (potentially large) number of VIEW_ITEMs and renders them on a graphics device provided by the...
const VECTOR2D & GetCenter() const
Return the center point of this VIEW (in world space coordinates).
LSEQ UIOrder() const
Return the copper, technical and user layers in the order shown in layer widget.
Base PCB main window class for Pcbnew, Gerbview, and CvPcb footprint viewer.
virtual COLOR_SETTINGS * GetColorSettings(bool aForceRefresh=false) const override
Helper to retrieve the current color settings.
virtual KIGFX::PCB_VIEW * GetView() const override
Return a pointer to the #VIEW instance used in the panel.
void LockZoom(double aScale, const VECTOR2D &aCenter)
ZONE_PREVIEW_NOTEBOOK_PAGE(wxWindow *aParent, BOARD *aBoard, ZONE *aZone, PCB_LAYER_ID aLayer, GAL_DISPLAY_OPTIONS_IMPL &aOpts, EDA_DRAW_PANEL_GAL::GAL_TYPE aGalType)
ZONE_PREVIEW_CANVAS * m_canvas
ZONE_PREVIEW_CANVAS * GetCanvas() const
ZONE_PREVIEW_NOTEBOOK(wxWindow *aParent, PCB_BASE_FRAME *aPcbFrame)
PCB_BASE_FRAME * m_pcbFrame
void OnPageChanged(wxNotebookEvent &aEvent)
void OnZoneSelectionChanged(ZONE *new_zone)
Handle a list of polygons defining a copper zone.
EDA_ITEM * Clone() const override
Create a duplicate of this item with linked list members set to NULL.
virtual LSET GetLayerSet() const override
Return a std::bitset of all layers on which the item physically resides.
PCB_LAYER_ID
A quick note on layer IDs: