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.

120 lines
4.9 KiB

  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!
  6. ///////////////////////////////////////////////////////////////////////////
  7. #include "widgets/std_bitmap_button.h"
  8. #include "widgets/wx_grid.h"
  9. #include "panel_embedded_files_base.h"
  10. ///////////////////////////////////////////////////////////////////////////
  11. PANEL_EMBEDDED_FILES_BASE::PANEL_EMBEDDED_FILES_BASE( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) : wxPanel( parent, id, pos, size, style, name )
  12. {
  13. wxBoxSizer* bMainSizer;
  14. bMainSizer = new wxBoxSizer( wxVERTICAL );
  15. wxBoxSizer* m_global_sizer;
  16. m_global_sizer = new wxBoxSizer( wxVERTICAL );
  17. m_files_grid = new WX_GRID( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
  18. // Grid
  19. m_files_grid->CreateGrid( 1, 2 );
  20. m_files_grid->EnableEditing( false );
  21. m_files_grid->EnableGridLines( true );
  22. m_files_grid->EnableDragGridSize( false );
  23. m_files_grid->SetMargins( 0, 0 );
  24. // Columns
  25. m_files_grid->SetColSize( 0, 440 );
  26. m_files_grid->SetColSize( 1, 180 );
  27. m_files_grid->EnableDragColMove( false );
  28. m_files_grid->EnableDragColSize( true );
  29. m_files_grid->SetColLabelValue( 0, _("Filename") );
  30. m_files_grid->SetColLabelValue( 1, _("Embedded Reference") );
  31. m_files_grid->SetColLabelSize( 22 );
  32. m_files_grid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
  33. // Rows
  34. m_files_grid->AutoSizeRows();
  35. m_files_grid->EnableDragRowSize( false );
  36. m_files_grid->SetRowLabelSize( 0 );
  37. m_files_grid->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
  38. // Label Appearance
  39. // Cell Defaults
  40. m_files_grid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
  41. m_global_sizer->Add( m_files_grid, 5, wxALL|wxEXPAND, 5 );
  42. bMainSizer->Add( m_global_sizer, 1, wxEXPAND, 5 );
  43. wxBoxSizer* bButtonsSizer;
  44. bButtonsSizer = new wxBoxSizer( wxHORIZONTAL );
  45. m_browse_button = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
  46. m_browse_button->SetToolTip( _("Add embedded file") );
  47. bButtonsSizer->Add( m_browse_button, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 );
  48. bButtonsSizer->Add( 20, 0, 0, wxEXPAND, 5 );
  49. m_delete_button = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
  50. m_delete_button->SetToolTip( _("Remove embedded file") );
  51. bButtonsSizer->Add( m_delete_button, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
  52. bButtonsSizer->Add( 0, 0, 1, wxEXPAND, 5 );
  53. m_cbEmbedFonts = new wxCheckBox( this, wxID_ANY, _("Embed fonts"), wxDefaultPosition, wxDefaultSize, 0 );
  54. m_cbEmbedFonts->SetToolTip( _("Store a copy of all fonts used") );
  55. bButtonsSizer->Add( m_cbEmbedFonts, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
  56. bButtonsSizer->Add( 0, 0, 1, wxEXPAND, 5 );
  57. m_export = new wxButton( this, wxID_ANY, _("&Export..."), wxDefaultPosition, wxDefaultSize, 0 );
  58. bButtonsSizer->Add( m_export, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
  59. bMainSizer->Add( bButtonsSizer, 0, wxBOTTOM|wxEXPAND|wxTOP, 3 );
  60. wxBoxSizer* bSizer4;
  61. bSizer4 = new wxBoxSizer( wxVERTICAL );
  62. bMainSizer->Add( bSizer4, 0, wxEXPAND, 5 );
  63. this->SetSizer( bMainSizer );
  64. this->Layout();
  65. bMainSizer->Fit( this );
  66. // Connect Events
  67. this->Connect( wxEVT_SIZE, wxSizeEventHandler( PANEL_EMBEDDED_FILES_BASE::onSize ) );
  68. m_files_grid->Connect( wxEVT_GRID_CELL_RIGHT_CLICK, wxGridEventHandler( PANEL_EMBEDDED_FILES_BASE::onGridRightClick ), NULL, this );
  69. m_browse_button->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_EMBEDDED_FILES_BASE::onAddEmbeddedFiles ), NULL, this );
  70. m_delete_button->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_EMBEDDED_FILES_BASE::onDeleteEmbeddedFile ), NULL, this );
  71. m_cbEmbedFonts->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( PANEL_EMBEDDED_FILES_BASE::onFontEmbedClick ), NULL, this );
  72. m_export->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_EMBEDDED_FILES_BASE::onExportFiles ), NULL, this );
  73. }
  74. PANEL_EMBEDDED_FILES_BASE::~PANEL_EMBEDDED_FILES_BASE()
  75. {
  76. // Disconnect Events
  77. this->Disconnect( wxEVT_SIZE, wxSizeEventHandler( PANEL_EMBEDDED_FILES_BASE::onSize ) );
  78. m_files_grid->Disconnect( wxEVT_GRID_CELL_RIGHT_CLICK, wxGridEventHandler( PANEL_EMBEDDED_FILES_BASE::onGridRightClick ), NULL, this );
  79. m_browse_button->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_EMBEDDED_FILES_BASE::onAddEmbeddedFiles ), NULL, this );
  80. m_delete_button->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_EMBEDDED_FILES_BASE::onDeleteEmbeddedFile ), NULL, this );
  81. m_cbEmbedFonts->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( PANEL_EMBEDDED_FILES_BASE::onFontEmbedClick ), NULL, this );
  82. m_export->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_EMBEDDED_FILES_BASE::onExportFiles ), NULL, this );
  83. }