27#include <wx/imaglist.h>
32#include <wx/dcbuffer.h>
59 SetSizer(
new wxBoxSizer( wxHORIZONTAL ) );
62 GetSizer()->Add(
m_canvas, 1, wxEXPAND );
75 wxNotebook( aParent, wxID_ANY, wxDefaultPosition, wxDefaultSize ),
82 wxImageList* imageList =
new wxImageList( swatchSize.x, swatchSize.y );
94 imageList->Add( swatch, *wxWHITE );
97 AssignImageList( imageList );
105 if( GetSelection() >= 0 && GetSelection() < (
int) GetPageCount() )
108 while( GetPageCount() )
123 AddPage( page, layerName,
false, layer );
127 if( layer == preferredLayer )
128 preferredPage = page;
134 SetSelection( FindPage( preferredPage ) );
143 SetSelection( aEvent.GetSelection() );
153 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.
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.
ZONE_PREVIEW_CANVAS * m_canvas
ZONE_PREVIEW_NOTEBOOK_PAGE(wxWindow *aParent, BOARD *aBoard, ZONE *aZone, PCB_LAYER_ID aLayer, GAL_DISPLAY_OPTIONS_IMPL &aOpts)
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: