40#include <wx/checklst.h>
41#include <wx/textdlg.h>
116 m_infoText->SetLabel(
_(
"Right-click for layer selection commands." ) );
121 m_popMenu->Bind( wxEVT_COMMAND_MENU_SELECTED,
148 if(
settings()->m_LayerSet.test( layer ) )
164 int minwidth = width;
172 if(
settings->GetFilename() == target )
176 minwidth = std::max( minwidth, width );
179 m_colorTheme->SetMinSize( wxSize( minwidth + 50, -1 ) );
181 wxCommandEvent
dummy;
193 GetSizer()->Fit(
this );
203 int rows = optionsSizer->GetEffectiveRowsCount();
204 int cols = optionsSizer->GetEffectiveColsCount();
207 _(
"Print according to objects tab of appearance manager" ) );
208 optionsSizer->Add(
m_checkAsItems, wxGBPosition( rows++, 0 ), wxGBSpan( 1, 3 ),
209 wxLEFT|wxRIGHT|wxBOTTOM, 5 );
212 optionsSizer->Add(
m_checkBackground, wxGBPosition( rows++, 0 ), wxGBSpan( 1, 3 ),
213 wxLEFT|wxRIGHT|wxBOTTOM, 5 );
216 _(
"Use a different color theme for printing:" ) );
217 optionsSizer->Add(
m_checkUseTheme, wxGBPosition( rows++, 0 ), wxGBSpan( 1, 3 ),
223 wxArrayString m_colorThemeChoices;
224 m_colorTheme =
new wxChoice( box, wxID_ANY, wxDefaultPosition, wxDefaultSize,
225 m_colorThemeChoices, 0 );
228 optionsSizer->Add(
m_colorTheme, wxGBPosition( rows++, 0 ), wxGBSpan( 1, 2 ),
234 auto drillMarksLabel =
new wxStaticText( box, wxID_ANY,
_(
"Drill marks:" ) );
235 std::vector<wxString> drillMarkChoices = {
_(
"No drill mark" ),
239 drillMarkChoices.size(), drillMarkChoices.data(), 0 );
242 optionsSizer->Add( drillMarksLabel, wxGBPosition( rows, 0 ), wxGBSpan( 1, 1 ),
243 wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxBOTTOM, 5 );
244 optionsSizer->Add(
m_drillMarksChoice, wxGBPosition( rows++, 1 ), wxGBSpan( 1, cols - 1 ),
245 wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxBOTTOM, 5 );
250 optionsSizer->Add(
m_checkboxMirror, wxGBPosition( rows++, 0 ), wxGBSpan( 1, cols ),
251 wxLEFT|wxRIGHT|wxBOTTOM, 5 );
260 _(
"Print board edges on all pages" ) );
271 wxStaticBox* box =
new wxStaticBox(
this, wxID_ANY,
_(
"Include Layers" ) );
272 wxStaticBoxSizer* sbLayersSizer =
new wxStaticBoxSizer( box, wxVERTICAL );
279 getMainSizer()->Insert( 0, sbLayersSizer, 1, wxEXPAND | wxALL, 5 );
283 _(
"Select Fab Layers" ), wxEmptyString ) );
286 _(
"Select all Copper Layers" ), wxEmptyString ) );
289 _(
"Deselect all Copper Layers" ), wxEmptyString ) );
292 _(
"Select all Layers" ), wxEmptyString ) );
295 _(
"Deselect all Layers" ), wxEmptyString ) );
297 this->Bind( wxEVT_RIGHT_DOWN,
298 [&]( wxMouseEvent& aEvent )
300 this->PopupMenu(
m_popMenu, aEvent.GetPosition() );
304 [&]( wxMouseEvent& aEvent )
306 this->PopupMenu(
m_popMenu, aEvent.GetPosition() );
350 switch( event.GetId() )
357 if( ( layermask & fab_layer_set ).any() )
KIFACE_BASE & Kiface()
Global KIFACE_BASE "get" accessor.
wxString m_ColorTheme
Active color theme name.
Information pertinent to a Pcbnew printed circuit board.
LSET GetEnabledLayers() const
A proxy function that calls the corresponding function in m_BoardSettings.
const wxString GetLayerName(PCB_LAYER_ID aLayer) const
Return the name of a aLayer.
Color settings are a bit different than most of the settings objects in that there can be more than o...
wxStaticText * m_infoText
wxCheckBox * m_titleBlock
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
wxCheckBox * m_checkboxPagePerLayer
void onPopUpLayers(wxCommandEvent &event)
Update layerset basing on the selected layers.
wxPrintout * createPrintout(const wxString &aTitle) override
Create a printout with a requested title.
PCB_BASE_EDIT_FRAME * m_parent
DIALOG_PRINT_PCBNEW(PCB_BASE_EDIT_FRAME *aParent, PCBNEW_PRINTOUT_SETTINGS *aSettings)
wxCheckBox * m_checkAsItems
wxCheckBox * m_checkboxEdgesOnAllPages
int setLayerSetFromList()
bool TransferDataToWindow() override
void saveSettings() override
wxChoice * m_drillMarksChoice
void onColorModeClicked(wxCommandEvent &event)
void onPagePerLayerClicked(wxCommandEvent &event)
wxCheckListBox * m_layerCheckListBox
void onUseThemeClicked(wxCommandEvent &event)
wxCheckBox * m_checkUseTheme
PCBNEW_PRINTOUT_SETTINGS * settings() const
void createExtraOptions()
@ ID_SELECT_COPPER_LAYERS
@ ID_DESELECT_COPPER_LAYERS
wxCheckBox * m_checkboxMirror
wxCheckBox * m_checkBackground
void finishDialogSettings()
In all dialogs, we must call the same functions to fix minimal dlg size, the default position and per...
SETTINGS_MANAGER * GetSettingsManager() const
wxString GetFilename() const
APP_SETTINGS_BASE * KifaceSettings() const
LSEQ is a sequence (and therefore also a set) of PCB_LAYER_IDs.
LSET is a set of PCB_LAYER_IDs.
static LSET AllTechMask()
Return a mask holding all technical layers (no CU layer) on both side.
static LSET AllCuMask(int aCuLayerCount=MAX_CU_LAYERS)
Return a mask holding the requested number of Cu PCB_LAYER_IDs.
static TOOL_ACTION selectionClear
Clear the current selection.
Common, abstract interface for edit frames.
COLOR_SETTINGS * GetColorSettings(bool aForceRefresh=false) const override
Helper to retrieve the current color settings.
PCBNEW_SETTINGS * GetPcbNewSettings() const
const PAGE_INFO & GetPageSettings() const override
PCB_DRAW_PANEL_GAL * GetCanvas() const override
Return a pointer to GAL-based canvas of given EDA draw frame.
PCB_BASE_FRAME * m_frame
Grid origin marker.
int Print(const TOOL_EVENT &aEvent)
virtual KIGFX::PCB_VIEW * GetView() const override
Return a pointer to the #VIEW instance used in the panel.
std::vector< COLOR_SETTINGS * > GetColorSettingsList()
This file is part of the common library.
bool IsCopperLayer(int aLayerId)
Tests whether a layer is a copper layer.
PCB_LAYER_ID
A quick note on layer IDs:
wxFont GetInfoFont(wxWindow *aWindow)
DRILL_MARKS
Plots and prints can show holes in pads and vias 3 options are available:
std::vector< FAB_LAYER_COLOR > dummy
bool background
Whether or not to print background color.
wxString color_theme
Color theme to use for printing.
bool use_theme
If false, display color theme will be used.
LSET m_LayerSet
Layers to print.
bool m_Mirror
Print mirrored.
enum PCBNEW_PRINTOUT_SETTINGS::PAGINATION_T m_Pagination
bool m_PrintEdgeCutsOnAllPages
Print board outline on each page.
enum DRILL_MARKS m_DrillMarks
bool m_AsItemCheckboxes
Honor checkboxes in the Items tab of the Layers Manager.
COLOR_SETTINGS * m_colorSettings
The color settings to be used for printing.
bool m_blackWhite
Print in B&W or Color.
int m_pageCount
Number of pages to print.
bool m_background
Print background color.