33#include <wx/checklst.h>
78 m_parent->GetCanvas()->GetView(), aTitle );
117 m_infoText->SetLabel(
_(
"Right-click for layer selection commands." ) );
147 int choice_ly_id = 0;
151 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;
198 GetSizer()->Fit(
this );
208 int rows = optionsSizer->GetEffectiveRowsCount();
210 m_checkAsItems =
new wxCheckBox( box, wxID_ANY,
_(
"Print according to objects tab of appearance manager" ) );
211 optionsSizer->Add(
m_checkAsItems, wxGBPosition(
rows++, 0 ), wxGBSpan( 1, 2 ), wxLEFT|wxRIGHT|wxBOTTOM, 5 );
214 optionsSizer->Add(
m_checkBackground, wxGBPosition(
rows++, 0 ), wxGBSpan( 1, 2 ), wxLEFT|wxRIGHT|wxBOTTOM, 5 );
216 m_checkUseTheme =
new wxCheckBox( box, wxID_ANY,
_(
"Use a different color theme for printing:" ) );
217 optionsSizer->Add(
m_checkUseTheme, wxGBPosition(
rows++, 0 ), wxGBSpan( 1, 2 ), wxLEFT|wxRIGHT, 5 );
221 wxArrayString choices;
222 m_colorTheme =
new wxChoice( box, wxID_ANY, wxDefaultPosition, wxDefaultSize, choices, 0 );
225 optionsSizer->Add(
m_colorTheme, wxGBPosition(
rows++, 0 ), wxGBSpan( 1, 2 ), wxLEFT, 28 );
230 auto drillMarksLabel =
new wxStaticText( box, wxID_ANY,
_(
"Drill marks:" ) );
231 std::vector<wxString> drillMarkChoices = {
_(
"No drill mark" ),
235 drillMarkChoices.size(), drillMarkChoices.data(), 0 );
238 optionsSizer->Add( drillMarksLabel, wxGBPosition(
rows, 0 ), wxGBSpan( 1, 1 ),
239 wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT|wxBOTTOM, 5 );
241 wxALIGN_CENTER_VERTICAL|wxRIGHT|wxBOTTOM, 5 );
247 wxLEFT|wxRIGHT|wxBOTTOM, 5 );
263 wxStaticBox* box =
new wxStaticBox(
this, wxID_ANY,
_(
"Include Layers" ) );
264 wxStaticBoxSizer* sbLayersSizer =
new wxStaticBoxSizer( box, wxVERTICAL );
271 getMainSizer()->Insert( 0, sbLayersSizer, 1, wxEXPAND | wxALL, 5 );
280 this->Bind( wxEVT_RIGHT_DOWN,
281 [&]( wxMouseEvent& aEvent )
283 this->PopupMenu(
m_popMenu, aEvent.GetPosition() );
287 [&]( wxMouseEvent& aEvent )
289 this->PopupMenu(
m_popMenu, aEvent.GetPosition() );
333 switch( event.GetId() )
340 if( ( layermask & fab_layer_set ).
any() )
467 settings.
Load( cfg );
static TOOL_ACTION selectionClear
Clear the current selection.
wxString m_ColorTheme
Active color theme name.
BASE_SET & set(size_t pos)
Information pertinent to a Pcbnew printed circuit board.
const wxString GetLayerName(PCB_LAYER_ID aLayer) const
Return the name of a aLayer.
const LSET & GetEnabledLayers() const
A proxy function that calls the corresponding function in m_BoardSettings.
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
DIALOG_PRINT_GENERIC(EDA_DRAW_FRAME *aParent, PRINTOUT_SETTINGS *aSettings)
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)
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()
Update layerset basing on the selected layers.
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...
wxString GetFilename() const
LSEQ is a sequence (and therefore also a set) of PCB_LAYER_IDs.
LSET is a set of PCB_LAYER_IDs.
static const LSET & AllCuMask()
return AllCuMask( MAX_CU_LAYERS );
LSEQ UIOrder() const
Return the copper, technical and user layers in the order shown in layer widget.
static const LSET & AllTechMask()
Return a mask holding all technical layers (no CU layer) on both side.
Common, abstract interface for edit frames.
int Print(const TOOL_EVENT &aEvent)
A type-safe container of any type.
bool IsCopperLayer(int aLayerId)
Test whether a layer is a copper layer.
PCB_LAYER_ID
A quick note on layer IDs:
KICOMMON_API wxFont GetSmallInfoFont(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.
void Load(APP_SETTINGS_BASE *aConfig) override
void Save(APP_SETTINGS_BASE *aConfig) override
COLOR_SETTINGS * m_colorSettings
The color settings to be used for printing.
int m_pageCount
Number of pages to print.
bool m_background
Print background color.
std::vector< DATABASE_CONNECTION::ROW > rows