37#include <wx/checklst.h>
112 m_infoText->SetLabel(
_(
"Right-click for layer selection commands." ) );
117 m_popMenu->Bind( wxEVT_COMMAND_MENU_SELECTED,
128 m_popMenu->Unbind( wxEVT_COMMAND_MENU_SELECTED,
153 if(
settings()->m_LayerSet.test( layer ) )
170 int minwidth = width;
178 if(
settings->GetFilename() == target )
182 minwidth = std::max( minwidth, width );
185 m_colorTheme->SetMinSize( wxSize( minwidth + 50, -1 ) );
187 wxCommandEvent
dummy;
199 GetSizer()->Fit(
this );
209 int rows = optionsSizer->GetEffectiveRowsCount();
210 int cols = optionsSizer->GetEffectiveColsCount();
213 _(
"Print according to objects tab of appearance manager" ) );
214 optionsSizer->Add(
m_checkAsItems, wxGBPosition( rows++, 0 ), wxGBSpan( 1, 3 ),
215 wxLEFT|wxRIGHT|wxBOTTOM, 5 );
218 optionsSizer->Add(
m_checkBackground, wxGBPosition( rows++, 0 ), wxGBSpan( 1, 3 ),
219 wxLEFT|wxRIGHT|wxBOTTOM, 5 );
222 _(
"Use a different color theme for printing:" ) );
223 optionsSizer->Add(
m_checkUseTheme, wxGBPosition( rows++, 0 ), wxGBSpan( 1, 3 ),
229 wxArrayString m_colorThemeChoices;
230 m_colorTheme =
new wxChoice( box, wxID_ANY, wxDefaultPosition, wxDefaultSize,
231 m_colorThemeChoices, 0 );
234 optionsSizer->Add(
m_colorTheme, wxGBPosition( rows++, 0 ), wxGBSpan( 1, 2 ),
240 auto drillMarksLabel =
new wxStaticText( box, wxID_ANY,
_(
"Drill marks:" ) );
241 std::vector<wxString> drillMarkChoices = {
_(
"No drill mark" ),
245 drillMarkChoices.size(), drillMarkChoices.data(), 0 );
248 optionsSizer->Add( drillMarksLabel, wxGBPosition( rows, 0 ), wxGBSpan( 1, 1 ),
249 wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxBOTTOM, 5 );
250 optionsSizer->Add(
m_drillMarksChoice, wxGBPosition( rows++, 1 ), wxGBSpan( 1, cols - 1 ),
251 wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxBOTTOM, 5 );
256 optionsSizer->Add(
m_checkboxMirror, wxGBPosition( rows++, 0 ), wxGBSpan( 1, cols ),
257 wxLEFT|wxRIGHT|wxBOTTOM, 5 );
266 _(
"Print board edges on all pages" ) );
277 wxStaticBox* box =
new wxStaticBox(
this, wxID_ANY,
_(
"Include Layers" ) );
278 wxStaticBoxSizer* sbLayersSizer =
new wxStaticBoxSizer( box, wxVERTICAL );
285 getMainSizer()->Insert( 0, sbLayersSizer, 1, wxEXPAND | wxALL, 5 );
289 _(
"Select Fab Layers" ), wxEmptyString ) );
292 _(
"Select all Copper Layers" ), wxEmptyString ) );
295 _(
"Deselect all Copper Layers" ), wxEmptyString ) );
298 _(
"Select all Layers" ), wxEmptyString ) );
301 _(
"Deselect all Layers" ), wxEmptyString ) );
303 this->Bind( wxEVT_RIGHT_DOWN,
304 [&]( wxMouseEvent& aEvent )
306 this->PopupMenu(
m_popMenu, aEvent.GetPosition() );
310 [&]( wxMouseEvent& aEvent )
312 this->PopupMenu(
m_popMenu, aEvent.GetPosition() );
356 switch( event.GetId() )
363 if( ( layermask & fab_layer_set ).any() )
KIFACE_BASE & Kiface()
Global KIFACE_BASE "get" accessor.
wxString m_ColorTheme
Active color theme name.
BASE_SET & set(size_t pos)
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
@ ID_SELECT_COPPER_LAYERS
@ ID_DESELECT_COPPER_LAYERS
void onUseThemeClicked(wxCommandEvent &event)
wxCheckBox * m_checkUseTheme
PCBNEW_PRINTOUT_SETTINGS * settings() const
void createExtraOptions()
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.
LSEQ UIOrder() const
Returns the copper, technical and user layers in the order shown in layer widget.
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()
bool IsCopperLayer(int aLayerId)
Tests whether a layer is a copper layer.
PCB_LAYER_ID
A quick note on layer IDs:
KICOMMON_API 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.