38#include <wx/checklst.h>
41#define OPTKEY_LAYERBASE wxT( "PlotLayer_%d" )
136 listBox->Append( filename.GetFullName() );
138 if(
settings()->m_LayerSet.test( ii) )
139 listBox->Check( ii,
true );
150 GetSizer()->Fit(
this );
160 int rows = optionsSizer->GetEffectiveRowsCount();
161 int cols = optionsSizer->GetEffectiveColsCount();
165 optionsSizer->Add(
m_checkboxMirror, wxGBPosition( rows, 0 ), wxGBSpan( 1, cols ), wxBOTTOM|wxRIGHT|wxLEFT, 5 );
171 wxStaticBox* box =
new wxStaticBox(
this, wxID_ANY,
_(
"Include Layers" ) );
172 wxStaticBoxSizer* sbLayersSizer =
new wxStaticBoxSizer( box, wxVERTICAL );
175 wxBoxSizer* bLayerListsSizer =
new wxBoxSizer( wxHORIZONTAL );
179 m_layerLists[i] =
new wxCheckListBox( sbLayersSizer->GetStaticBox(), wxID_ANY );
180 bLayerListsSizer->Add(
m_layerLists[i], 1, wxEXPAND, 5 );
184 m_buttonSelectAll =
new wxButton( sbLayersSizer->GetStaticBox(), wxID_ANY,
_(
"Select all" ) );
185 m_buttonDeselectAll =
new wxButton( sbLayersSizer->GetStaticBox(), wxID_ANY,
_(
"Deselect all" ) );
192 wxBoxSizer* buttonSizer =
new wxBoxSizer( wxHORIZONTAL );
197 sbLayersSizer->Add( bLayerListsSizer, 1, wxEXPAND, 5 );
198 sbLayersSizer->Add( buttonSizer, 0, wxEXPAND, 5 );
200 getMainSizer()->Insert( 0, sbLayersSizer, 1, wxEXPAND | wxALL, 5 );
220 for(
unsigned int i = 0; i < aList->GetCount(); ++i )
221 aList->Check( i, aValue );
232 unsigned int itemNr = layerMapIt->second;
238 return itemIdx < listBox->GetCount() && listBox->IsChecked( itemIdx );
248 unsigned int layer = 0;
static TOOL_ACTION selectionClear
Clear the current selection.
BASE_SET & set(size_t pos)
wxStaticBox * getOptionsBox()
bool TransferDataToWindow() override
virtual void saveSettings()
void ForcePrintBorder(bool aValue)
Set 'print border and title block' to a requested value and hides the corresponding checkbox.
wxGridBagSizer * getOptionsSizer()
PRINTOUT_SETTINGS * m_settings
static constexpr unsigned int LAYER_PER_LIST
static constexpr unsigned int LAYER_LIST_COUNT
wxButton * m_buttonDeselectAll
void setListBoxValue(wxCheckListBox *aList, bool aValue)
Check whether a layer is enabled in a listbox.
wxCheckBox * m_checkboxMirror
std::unordered_map< int, int > m_layerToItemMap
GERBVIEW_FRAME * m_parent
wxCheckListBox * m_layerLists[LAYER_LIST_COUNT]
~DIALOG_PRINT_GERBVIEW()=default
bool isLayerEnabled(unsigned int aLayer) const
Update layerset basing on the selected layers.
wxButton * m_buttonSelectAll
int setLayerSetFromList()
BOARD_PRINTOUT_SETTINGS * settings() const
void createExtraOptions()
void saveSettings() override
DIALOG_PRINT_GERBVIEW(GERBVIEW_FRAME *aParent, BOARD_PRINTOUT_SETTINGS *aSettings)
bool TransferDataToWindow() override
void onDeselectAllClick(wxCommandEvent &event)
(Un)check all items in a checklist box
wxPrintout * createPrintout(const wxString &aTitle) override
Create a printout with a requested title.
void onSelectAllClick(wxCommandEvent &event)
virtual EDA_DRAW_PANEL_GAL * GetCanvas() const
Return a pointer to GAL-based canvas of given EDA draw frame.
virtual KIGFX::VIEW * GetView() const
Return a pointer to the #VIEW instance used in the panel.
GERBER_FILE_IMAGE_LIST * GetImagesList() const
GERBER_FILE_IMAGE_LIST is a helper class to handle a list of GERBER_FILE_IMAGE files which are loaded...
unsigned ImagesMaxCount()
GERBER_FILE_IMAGE * GetGbrImage(int aIdx)
Hold the image data and parameters for one gerber file and layer parameters.
wxString m_FileName
Full File Name for this layer.
int Print(const TOOL_EVENT &aEvent)
COLOR_SETTINGS * GetColorSettings(bool aForceRefresh=false) const override
Returns a pointer to the active color theme settings.
const PAGE_INFO & GetPageSettings() const override
GBR_LAYOUT * GetGerberLayout() const
LSET is a set of PCB_LAYER_IDs.
This file is part of the common library.
LSET m_LayerSet
Layers to print.
bool m_Mirror
Print mirrored.
COLOR_SETTINGS * m_colorSettings
The color settings to be used for printing.
int m_pageCount
Number of pages to print.