KiCad PCB EDA Suite
dialog_print_for_modedit_base.cpp
Go to the documentation of this file.
1 // C++ code generated with wxFormBuilder (version Mar 9 2015)
3 // http://www.wxformbuilder.org/
4 //
5 // PLEASE DO "NOT" EDIT THIS FILE!
7 
9 
11 
12 DIALOG_PRINT_FOR_MODEDIT_BASE::DIALOG_PRINT_FOR_MODEDIT_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
13 {
14  this->SetSizeHints( wxSize( -1,-1 ), wxDefaultSize );
15 
16  wxBoxSizer* bMainSizer;
17  bMainSizer = new wxBoxSizer( wxHORIZONTAL );
18 
19  wxBoxSizer* bmiddleLeftSizer;
20  bmiddleLeftSizer = new wxBoxSizer( wxVERTICAL );
21 
22  wxString m_ScaleOptionChoices[] = { _("fit in page"), _("Scale 0.5"), _("Scale 0.7"), _("Scale 1"), _("Scale 1.4"), _("Scale 2"), _("Scale 3"), _("Scale 4"), _("Scale 8"), _("Scale 16") };
23  int m_ScaleOptionNChoices = sizeof( m_ScaleOptionChoices ) / sizeof( wxString );
24  m_ScaleOption = new wxRadioBox( this, wxID_ANY, _("Approx. Scale:"), wxDefaultPosition, wxDefaultSize, m_ScaleOptionNChoices, m_ScaleOptionChoices, 1, wxRA_SPECIFY_COLS );
25  m_ScaleOption->SetSelection( 3 );
26  bmiddleLeftSizer->Add( m_ScaleOption, 0, wxALL, 5 );
27 
28 
29  bMainSizer->Add( bmiddleLeftSizer, 0, wxEXPAND, 5 );
30 
31  wxBoxSizer* bmiddleRightSizer;
32  bmiddleRightSizer = new wxBoxSizer( wxVERTICAL );
33 
34  wxString m_ModeColorOptionChoices[] = { _("Color"), _("Black and white") };
35  int m_ModeColorOptionNChoices = sizeof( m_ModeColorOptionChoices ) / sizeof( wxString );
36  m_ModeColorOption = new wxRadioBox( this, wxID_PRINT_MODE, _("Print Mode"), wxDefaultPosition, wxDefaultSize, m_ModeColorOptionNChoices, m_ModeColorOptionChoices, 1, wxRA_SPECIFY_COLS );
37  m_ModeColorOption->SetSelection( 1 );
38  m_ModeColorOption->SetToolTip( _("Choose if you want to draw the sheet like it appears on screen,\nor in black and white mode, better to print it when using black and white printers") );
39 
40  bmiddleRightSizer->Add( m_ModeColorOption, 0, wxALL|wxEXPAND, 5 );
41 
42 
43  bMainSizer->Add( bmiddleRightSizer, 1, 0, 5 );
44 
45  wxBoxSizer* bbuttonsSizer;
46  bbuttonsSizer = new wxBoxSizer( wxVERTICAL );
47 
48  m_buttonOption = new wxButton( this, wxID_PRINT_OPTIONS, _("Page Options"), wxDefaultPosition, wxDefaultSize, 0 );
49  bbuttonsSizer->Add( m_buttonOption, 0, wxALL|wxEXPAND, 5 );
50 
51  m_buttonPreview = new wxButton( this, wxID_PREVIEW, _("Preview"), wxDefaultPosition, wxDefaultSize, 0 );
52  bbuttonsSizer->Add( m_buttonPreview, 0, wxALL|wxEXPAND, 5 );
53 
54  m_buttonPrint = new wxButton( this, wxID_PRINT_ALL, _("Print"), wxDefaultPosition, wxDefaultSize, 0 );
55  bbuttonsSizer->Add( m_buttonPrint, 0, wxALL|wxEXPAND, 5 );
56 
57  m_buttonQuit = new wxButton( this, wxID_CANCEL, _("Close"), wxDefaultPosition, wxDefaultSize, 0 );
58  bbuttonsSizer->Add( m_buttonQuit, 0, wxALL|wxEXPAND, 5 );
59 
60 
61  bMainSizer->Add( bbuttonsSizer, 0, 0, 5 );
62 
63 
64  this->SetSizer( bMainSizer );
65  this->Layout();
66  bMainSizer->Fit( this );
67 
68  this->Centre( wxBOTH );
69 
70  // Connect Events
71  this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_PRINT_FOR_MODEDIT_BASE::OnCloseWindow ) );
72  m_buttonOption->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_FOR_MODEDIT_BASE::OnPageSetup ), NULL, this );
73  m_buttonPreview->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_FOR_MODEDIT_BASE::OnPrintPreview ), NULL, this );
74  m_buttonPrint->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_FOR_MODEDIT_BASE::OnPrintButtonClick ), NULL, this );
75  m_buttonQuit->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_FOR_MODEDIT_BASE::OnButtonCancelClick ), NULL, this );
76 }
77 
79 {
80  // Disconnect Events
81  this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_PRINT_FOR_MODEDIT_BASE::OnCloseWindow ) );
82  m_buttonOption->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_FOR_MODEDIT_BASE::OnPageSetup ), NULL, this );
83  m_buttonPreview->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_FOR_MODEDIT_BASE::OnPrintPreview ), NULL, this );
84  m_buttonPrint->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_FOR_MODEDIT_BASE::OnPrintButtonClick ), NULL, this );
85  m_buttonQuit->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_FOR_MODEDIT_BASE::OnButtonCancelClick ), NULL, this );
86 
87 }
virtual void OnPrintPreview(wxCommandEvent &event)
Class DIALOG_SHIM may sit in the inheritance tree between wxDialog and any class written by wxFormBui...
Definition: dialog_shim.h:60
virtual void OnPrintButtonClick(wxCommandEvent &event)
virtual void OnButtonCancelClick(wxCommandEvent &event)
virtual void OnPageSetup(wxCommandEvent &event)
virtual void OnCloseWindow(wxCloseEvent &event)
DIALOG_PRINT_FOR_MODEDIT_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)