27#include <wx/imaglist.h>
32#include <wx/dcbuffer.h>
59 SetSizer(
new wxBoxSizer( wxHORIZONTAL ) );
62 GetSizer()->Add(
m_canvas, 1, wxEXPAND );
64 GetSizer()->Fit(
this );
77 wxNotebook( aParent, wxID_ANY, wxDefaultPosition, wxDefaultSize ),
84 wxImageList* imageList =
new wxImageList( swatchSize.x, swatchSize.y );
96 imageList->Add( swatch, *wxWHITE );
99 AssignImageList( imageList );
102 GetSizer()->Fit(
this );
110 if( GetSelection() >= 0 && GetSelection() < (
int) GetPageCount() )
113 while( GetPageCount() )
129 AddPage( page, layerName,
false, layer );
133 if( layer == preferredLayer )
134 preferredPage = page;
140 SetSelection( FindPage( preferredPage ) );
149 SetSelection( aEvent.GetSelection() );
159 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_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: