You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

87 lines
4.5 KiB

  1. ///////////////////////////////////////////////////////////////////////////
  2. // C++ code generated with wxFormBuilder (version Apr 19 2018)
  3. // http://www.wxformbuilder.org/
  4. //
  5. // PLEASE DO *NOT* EDIT THIS FILE!
  6. ///////////////////////////////////////////////////////////////////////////
  7. #include "dialog_print_for_modedit_base.h"
  8. ///////////////////////////////////////////////////////////////////////////
  9. 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 )
  10. {
  11. this->SetSizeHints( wxSize( -1,-1 ), wxDefaultSize );
  12. wxBoxSizer* bMainSizer;
  13. bMainSizer = new wxBoxSizer( wxHORIZONTAL );
  14. wxBoxSizer* bmiddleLeftSizer;
  15. bmiddleLeftSizer = new wxBoxSizer( wxVERTICAL );
  16. wxString m_ScaleOptionChoices[] = { _("Fit to page"), _("Scale 0.5"), _("Scale 0.7"), _("Scale 1"), _("Scale 1.4"), _("Scale 2"), _("Scale 3"), _("Scale 4"), _("Scale 8"), _("Scale 16") };
  17. int m_ScaleOptionNChoices = sizeof( m_ScaleOptionChoices ) / sizeof( wxString );
  18. m_ScaleOption = new wxRadioBox( this, wxID_ANY, _("Approximate Scale:"), wxDefaultPosition, wxDefaultSize, m_ScaleOptionNChoices, m_ScaleOptionChoices, 1, wxRA_SPECIFY_COLS );
  19. m_ScaleOption->SetSelection( 0 );
  20. bmiddleLeftSizer->Add( m_ScaleOption, 0, wxALL, 5 );
  21. bMainSizer->Add( bmiddleLeftSizer, 0, wxEXPAND, 5 );
  22. wxBoxSizer* bmiddleRightSizer;
  23. bmiddleRightSizer = new wxBoxSizer( wxVERTICAL );
  24. wxString m_ModeColorOptionChoices[] = { _("Color"), _("Black and white") };
  25. int m_ModeColorOptionNChoices = sizeof( m_ModeColorOptionChoices ) / sizeof( wxString );
  26. m_ModeColorOption = new wxRadioBox( this, wxID_PRINT_MODE, _("Print Mode:"), wxDefaultPosition, wxDefaultSize, m_ModeColorOptionNChoices, m_ModeColorOptionChoices, 1, wxRA_SPECIFY_COLS );
  27. m_ModeColorOption->SetSelection( 0 );
  28. 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") );
  29. bmiddleRightSizer->Add( m_ModeColorOption, 0, wxALL|wxEXPAND, 5 );
  30. bMainSizer->Add( bmiddleRightSizer, 1, 0, 5 );
  31. wxBoxSizer* bbuttonsSizer;
  32. bbuttonsSizer = new wxBoxSizer( wxVERTICAL );
  33. m_buttonOption = new wxButton( this, wxID_PRINT_OPTIONS, _("Page Options"), wxDefaultPosition, wxDefaultSize, 0 );
  34. bbuttonsSizer->Add( m_buttonOption, 0, wxALL|wxEXPAND, 5 );
  35. m_buttonPreview = new wxButton( this, wxID_PREVIEW, _("Preview"), wxDefaultPosition, wxDefaultSize, 0 );
  36. bbuttonsSizer->Add( m_buttonPreview, 0, wxALL|wxEXPAND, 5 );
  37. m_buttonPrint = new wxButton( this, wxID_PRINT_ALL, _("Print"), wxDefaultPosition, wxDefaultSize, 0 );
  38. bbuttonsSizer->Add( m_buttonPrint, 0, wxALL|wxEXPAND, 5 );
  39. m_buttonQuit = new wxButton( this, wxID_CANCEL, _("Close"), wxDefaultPosition, wxDefaultSize, 0 );
  40. bbuttonsSizer->Add( m_buttonQuit, 0, wxALL|wxEXPAND, 5 );
  41. bMainSizer->Add( bbuttonsSizer, 0, 0, 5 );
  42. this->SetSizer( bMainSizer );
  43. this->Layout();
  44. bMainSizer->Fit( this );
  45. this->Centre( wxBOTH );
  46. // Connect Events
  47. this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_PRINT_FOR_MODEDIT_BASE::OnCloseWindow ) );
  48. m_buttonOption->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_FOR_MODEDIT_BASE::OnPageSetup ), NULL, this );
  49. m_buttonPreview->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_FOR_MODEDIT_BASE::OnPrintPreview ), NULL, this );
  50. m_buttonPrint->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_FOR_MODEDIT_BASE::OnPrintButtonClick ), NULL, this );
  51. m_buttonQuit->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_FOR_MODEDIT_BASE::OnButtonCancelClick ), NULL, this );
  52. }
  53. DIALOG_PRINT_FOR_MODEDIT_BASE::~DIALOG_PRINT_FOR_MODEDIT_BASE()
  54. {
  55. // Disconnect Events
  56. this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_PRINT_FOR_MODEDIT_BASE::OnCloseWindow ) );
  57. m_buttonOption->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_FOR_MODEDIT_BASE::OnPageSetup ), NULL, this );
  58. m_buttonPreview->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_FOR_MODEDIT_BASE::OnPrintPreview ), NULL, this );
  59. m_buttonPrint->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_FOR_MODEDIT_BASE::OnPrintButtonClick ), NULL, this );
  60. m_buttonQuit->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PRINT_FOR_MODEDIT_BASE::OnButtonCancelClick ), NULL, this );
  61. }