KiCad PCB EDA Suite
Loading...
Searching...
No Matches
dialog_print_base.cpp
Go to the documentation of this file.
1
2// C++ code generated with wxFormBuilder (version 4.2.1-0-g80c4cb6)
3// http://www.wxformbuilder.org/
4//
5// PLEASE DO *NOT* EDIT THIS FILE!
7
9
10#include "dialog_print_base.h"
11
13
14DIALOG_PRINT_BASE::DIALOG_PRINT_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
15{
16 this->SetSizeHints( wxSize( -1,-1 ), wxDefaultSize );
17
18 wxBoxSizer* bMainSizer;
19 bMainSizer = new wxBoxSizer( wxVERTICAL );
20
21 wxBoxSizer* bSizerPrintersPanel;
22 bSizerPrintersPanel = new wxBoxSizer( wxVERTICAL );
23
24 m_panelPrinters = new PANEL_PRINTER_LIST( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
25 bSizerPrintersPanel->Add( m_panelPrinters, 1, wxEXPAND | wxALL, 5 );
26
27
28 bMainSizer->Add( bSizerPrintersPanel, 0, wxEXPAND, 5 );
29
30 wxBoxSizer* bleftSizer;
31 bleftSizer = new wxBoxSizer( wxVERTICAL );
32
33 m_checkReference = new wxCheckBox( this, wxID_ANY, _("Print drawing sheet"), wxDefaultPosition, wxDefaultSize, 0 );
34 m_checkReference->SetValue(true);
35 m_checkReference->SetToolTip( _("Print (or not) the Frame references.") );
36
37 bleftSizer->Add( m_checkReference, 0, wxTOP|wxBOTTOM, 10 );
38
39 wxBoxSizer* bSizerOttputMode;
40 bSizerOttputMode = new wxBoxSizer( wxHORIZONTAL );
41
42 m_staticText1 = new wxStaticText( this, wxID_ANY, _("Output mode:"), wxDefaultPosition, wxDefaultSize, 0 );
43 m_staticText1->Wrap( -1 );
44 bSizerOttputMode->Add( m_staticText1, 0, wxALIGN_CENTER_VERTICAL, 5 );
45
46 wxString m_colorPrintChoices[] = { _("Color"), _("Black and White") };
47 int m_colorPrintNChoices = sizeof( m_colorPrintChoices ) / sizeof( wxString );
48 m_colorPrint = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_colorPrintNChoices, m_colorPrintChoices, 0 );
49 m_colorPrint->SetSelection( 0 );
50 bSizerOttputMode->Add( m_colorPrint, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
51
52
53 bleftSizer->Add( bSizerOttputMode, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );
54
55 m_checkBackgroundColor = new wxCheckBox( this, wxID_ANY, _("Print background color"), wxDefaultPosition, wxDefaultSize, 0 );
56 bleftSizer->Add( m_checkBackgroundColor, 0, wxLEFT, 20 );
57
58
59 bleftSizer->Add( 0, 10, 0, wxEXPAND, 5 );
60
61 m_checkUseColorTheme = new wxCheckBox( this, wxID_ANY, _("Use a different color theme for printing:"), wxDefaultPosition, wxDefaultSize, 0 );
62 m_checkUseColorTheme->SetValue(true);
63 bleftSizer->Add( m_checkUseColorTheme, 0, wxTOP|wxBOTTOM|wxRIGHT, 5 );
64
65 wxBoxSizer* bSizerTheme;
66 bSizerTheme = new wxBoxSizer( wxHORIZONTAL );
67
68 wxArrayString m_colorThemeChoices;
69 m_colorTheme = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_colorThemeChoices, 0 );
70 m_colorTheme->SetSelection( 0 );
71 m_colorTheme->Enable( false );
72
73 bSizerTheme->Add( m_colorTheme, 1, wxEXPAND|wxLEFT, 20 );
74
75
76 bleftSizer->Add( bSizerTheme, 0, wxEXPAND, 5 );
77
78
79 bMainSizer->Add( bleftSizer, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 10 );
80
81 wxBoxSizer* bbuttonsSizer;
82 bbuttonsSizer = new wxBoxSizer( wxHORIZONTAL );
83
84 m_buttonPageSetup = new wxButton( this, wxID_ANY, _("Page Setup..."), wxDefaultPosition, wxDefaultSize, 0 );
85 bbuttonsSizer->Add( m_buttonPageSetup, 0, wxALIGN_CENTER_VERTICAL, 5 );
86
87
88 bbuttonsSizer->Add( 20, 0, 1, wxEXPAND, 5 );
89
90 m_sdbSizer = new wxStdDialogButtonSizer();
91 m_sdbSizerOK = new wxButton( this, wxID_OK );
92 m_sdbSizer->AddButton( m_sdbSizerOK );
93 m_sdbSizerApply = new wxButton( this, wxID_APPLY );
94 m_sdbSizer->AddButton( m_sdbSizerApply );
95 m_sdbSizerCancel = new wxButton( this, wxID_CANCEL );
96 m_sdbSizer->AddButton( m_sdbSizerCancel );
97 m_sdbSizer->Realize();
98
99 bbuttonsSizer->Add( m_sdbSizer, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
100
101
102 bMainSizer->Add( bbuttonsSizer, 0, wxEXPAND|wxLEFT, 10 );
103
104
105 this->SetSizer( bMainSizer );
106 this->Layout();
107 bMainSizer->Fit( this );
108
109 // Connect Events
110 this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_PRINT_BASE::OnCloseWindow ) );
111 m_colorPrint->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_PRINT_BASE::OnOutputChoice ), NULL, this );
112 m_checkUseColorTheme->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PRINT_BASE::OnUseColorThemeChecked ), NULL, this );
113 m_buttonPageSetup->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_BASE::OnPageSetup ), NULL, this );
114 m_sdbSizerApply->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_BASE::OnPrintPreview ), NULL, this );
115}
116
118{
119 // Disconnect Events
120 this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_PRINT_BASE::OnCloseWindow ) );
121 m_colorPrint->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_PRINT_BASE::OnOutputChoice ), NULL, this );
122 m_checkUseColorTheme->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_PRINT_BASE::OnUseColorThemeChecked ), NULL, this );
123 m_buttonPageSetup->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_BASE::OnPageSetup ), NULL, this );
124 m_sdbSizerApply->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_BASE::OnPrintPreview ), NULL, this );
125
126}
wxStaticText * m_staticText1
wxButton * m_buttonPageSetup
wxCheckBox * m_checkBackgroundColor
virtual void OnOutputChoice(wxCommandEvent &event)
virtual void OnUseColorThemeChecked(wxCommandEvent &event)
DIALOG_PRINT_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Print"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
wxButton * m_sdbSizerApply
virtual void OnPrintPreview(wxCommandEvent &event)
virtual void OnPageSetup(wxCommandEvent &event)
wxStdDialogButtonSizer * m_sdbSizer
PANEL_PRINTER_LIST * m_panelPrinters
wxCheckBox * m_checkUseColorTheme
virtual void OnCloseWindow(wxCloseEvent &event)
wxButton * m_sdbSizerCancel
wxCheckBox * m_checkReference
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...
Definition: dialog_shim.h:52
#define _(s)