38#include <wx/checklst.h>
41#define OPTKEY_LAYERBASE wxT( "PlotLayer_%d" )
72 void enableLayer(
unsigned int aLayer,
bool aValue );
142 listBox->Append( filename.GetFullName() );
144 if(
settings()->m_LayerSet.test( ii) )
145 listBox->Check( ii,
true );
156 GetSizer()->Fit(
this );
166 int rows = optionsSizer->GetEffectiveRowsCount();
167 int cols = optionsSizer->GetEffectiveColsCount();
171 optionsSizer->Add(
m_checkboxMirror, wxGBPosition( rows, 0 ), wxGBSpan( 1, cols ),
172 wxBOTTOM | wxRIGHT | wxLEFT, 5 );
178 wxStaticBoxSizer* sbLayersSizer =
179 new wxStaticBoxSizer(
new wxStaticBox(
this, wxID_ANY,
_(
"Included Layers" ) ),
183 wxBoxSizer* bLayerListsSizer =
new wxBoxSizer( wxHORIZONTAL );
187 m_layerLists[i] =
new wxCheckListBox( sbLayersSizer->GetStaticBox(), wxID_ANY );
188 bLayerListsSizer->Add(
m_layerLists[i], 1, wxEXPAND, 5 );
193 m_buttonSelectAll =
new wxButton( sbLayersSizer->GetStaticBox(), wxID_ANY,
_(
"Select all" ) );
195 _(
"Deselect all" ) );
204 wxBoxSizer* buttonSizer =
new wxBoxSizer( wxHORIZONTAL );
209 sbLayersSizer->Add( bLayerListsSizer, 1, wxALL | wxEXPAND, 5 );
210 sbLayersSizer->Add( buttonSizer, 0, wxALL | wxEXPAND, 5 );
212 getMainSizer()->Insert( 0, sbLayersSizer, 1, wxEXPAND );
232 for(
unsigned int i = 0; i < aList->GetCount(); ++i )
233 aList->Check( i, aValue );
244 unsigned int itemNr = layerMapIt->second;
250 return itemIdx < listBox->GetCount() && listBox->IsChecked( itemIdx );
261 unsigned int itemNr = layerMapIt->second;
267 if( itemIdx < listBox->GetCount() )
268 listBox->Check( itemIdx, aValue );
278 unsigned int layer = 0;
KIFACE_BASE & Kiface()
Global KIFACE_BASE "get" accessor.
BASE_SET & set(size_t pos)
APP_SETTINGS_BASE * m_config
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]
bool isLayerEnabled(unsigned int aLayer) const
Enable/disable layer in a listbox.
wxButton * m_buttonSelectAll
void enableLayer(unsigned int aLayer, bool aValue)
Update layerset basing on the selected layers.
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.
static TOOL_ACTION selectionClear
Clear the current selection.
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
APP_SETTINGS_BASE * KifaceSettings() 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.