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.

227 lines
9.8 KiB

  1. ///////////////////////////////////////////////////////////////////////////
  2. // C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b)
  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_design_block_lib_table_base.h"
  10. ///////////////////////////////////////////////////////////////////////////
  11. PANEL_DESIGN_BLOCK_LIB_TABLE_BASE::PANEL_DESIGN_BLOCK_LIB_TABLE_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. m_notebook = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
  16. m_global_panel = new wxPanel( m_notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
  17. wxBoxSizer* m_global_sizer;
  18. m_global_sizer = new wxBoxSizer( wxVERTICAL );
  19. m_global_grid = new WX_GRID( m_global_panel, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
  20. // Grid
  21. m_global_grid->CreateGrid( 1, 7 );
  22. m_global_grid->EnableEditing( true );
  23. m_global_grid->EnableGridLines( true );
  24. m_global_grid->EnableDragGridSize( false );
  25. m_global_grid->SetMargins( 0, 0 );
  26. // Columns
  27. m_global_grid->SetColSize( 0, 48 );
  28. m_global_grid->SetColSize( 1, 48 );
  29. m_global_grid->SetColSize( 2, 100 );
  30. m_global_grid->SetColSize( 3, 240 );
  31. m_global_grid->SetColSize( 4, 100 );
  32. m_global_grid->SetColSize( 5, 80 );
  33. m_global_grid->SetColSize( 6, 240 );
  34. m_global_grid->EnableDragColMove( false );
  35. m_global_grid->EnableDragColSize( true );
  36. m_global_grid->SetColLabelValue( 0, _("Active") );
  37. m_global_grid->SetColLabelValue( 1, _("Visible") );
  38. m_global_grid->SetColLabelValue( 2, _("Nickname") );
  39. m_global_grid->SetColLabelValue( 3, _("Library Path") );
  40. m_global_grid->SetColLabelValue( 4, _("Library Format") );
  41. m_global_grid->SetColLabelValue( 5, _("Options") );
  42. m_global_grid->SetColLabelValue( 6, _("Description") );
  43. m_global_grid->SetColLabelSize( 22 );
  44. m_global_grid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
  45. // Rows
  46. m_global_grid->EnableDragRowSize( false );
  47. m_global_grid->SetRowLabelSize( 0 );
  48. m_global_grid->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
  49. // Label Appearance
  50. // Cell Defaults
  51. m_global_grid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
  52. m_global_sizer->Add( m_global_grid, 1, wxALL|wxEXPAND, 5 );
  53. m_global_panel->SetSizer( m_global_sizer );
  54. m_global_panel->Layout();
  55. m_global_sizer->Fit( m_global_panel );
  56. m_notebook->AddPage( m_global_panel, _("Global Libraries"), true );
  57. m_project_panel = new wxPanel( m_notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
  58. wxBoxSizer* m_project_sizer;
  59. m_project_sizer = new wxBoxSizer( wxVERTICAL );
  60. m_project_grid = new WX_GRID( m_project_panel, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
  61. // Grid
  62. m_project_grid->CreateGrid( 1, 7 );
  63. m_project_grid->EnableEditing( true );
  64. m_project_grid->EnableGridLines( true );
  65. m_project_grid->EnableDragGridSize( false );
  66. m_project_grid->SetMargins( 0, 0 );
  67. // Columns
  68. m_project_grid->SetColSize( 0, 48 );
  69. m_project_grid->SetColSize( 1, 48 );
  70. m_project_grid->SetColSize( 2, 100 );
  71. m_project_grid->SetColSize( 3, 240 );
  72. m_project_grid->SetColSize( 4, 100 );
  73. m_project_grid->SetColSize( 5, 80 );
  74. m_project_grid->SetColSize( 6, 240 );
  75. m_project_grid->EnableDragColMove( false );
  76. m_project_grid->EnableDragColSize( true );
  77. m_project_grid->SetColLabelValue( 0, _("Active") );
  78. m_project_grid->SetColLabelValue( 1, _("Visible") );
  79. m_project_grid->SetColLabelValue( 2, _("Nickname") );
  80. m_project_grid->SetColLabelValue( 3, _("Library Path") );
  81. m_project_grid->SetColLabelValue( 4, _("LIbrary Format") );
  82. m_project_grid->SetColLabelValue( 5, _("Options") );
  83. m_project_grid->SetColLabelValue( 6, _("Description") );
  84. m_project_grid->SetColLabelSize( 22 );
  85. m_project_grid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
  86. // Rows
  87. m_project_grid->EnableDragRowSize( false );
  88. m_project_grid->SetRowLabelSize( 0 );
  89. m_project_grid->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
  90. // Label Appearance
  91. // Cell Defaults
  92. m_project_grid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
  93. m_project_sizer->Add( m_project_grid, 1, wxALL|wxEXPAND, 5 );
  94. m_project_panel->SetSizer( m_project_sizer );
  95. m_project_panel->Layout();
  96. m_project_sizer->Fit( m_project_panel );
  97. m_notebook->AddPage( m_project_panel, _("Project Specific Libraries"), false );
  98. bMainSizer->Add( m_notebook, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
  99. wxBoxSizer* bButtonsSizer;
  100. bButtonsSizer = new wxBoxSizer( wxHORIZONTAL );
  101. m_append_button = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
  102. m_append_button->SetToolTip( _("Add empty row to table") );
  103. bButtonsSizer->Add( m_append_button, 0, wxTOP|wxBOTTOM|wxRIGHT, 5 );
  104. m_browseButton = new SPLIT_BUTTON( this, wxID_ANY, _( "Add Existing" ), wxDefaultPosition );
  105. m_browseButton->SetToolTip( _("Add Existing") );
  106. bButtonsSizer->Add( m_browseButton, 0, wxTOP|wxBOTTOM|wxRIGHT, 5 );
  107. m_move_up_button = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
  108. m_move_up_button->SetToolTip( _("Move up") );
  109. bButtonsSizer->Add( m_move_up_button, 0, wxTOP|wxBOTTOM|wxRIGHT, 5 );
  110. m_move_down_button = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
  111. m_move_down_button->SetToolTip( _("Move down") );
  112. bButtonsSizer->Add( m_move_down_button, 0, wxTOP|wxBOTTOM|wxRIGHT, 5 );
  113. bButtonsSizer->Add( 20, 0, 0, wxEXPAND, 5 );
  114. m_delete_button = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
  115. m_delete_button->SetToolTip( _("Remove library from table") );
  116. bButtonsSizer->Add( m_delete_button, 0, wxTOP|wxBOTTOM|wxRIGHT, 5 );
  117. bButtonsSizer->Add( 20, 0, 1, wxEXPAND, 5 );
  118. m_migrate_libs_button = new wxButton( this, wxID_ANY, _("Migrate Libraries"), wxDefaultPosition, wxDefaultSize, 0 );
  119. bButtonsSizer->Add( m_migrate_libs_button, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
  120. bMainSizer->Add( bButtonsSizer, 0, wxEXPAND|wxALL, 8 );
  121. wxStaticText* stPathsLabel;
  122. stPathsLabel = new wxStaticText( this, wxID_ANY, _("Available path substitutions:"), wxDefaultPosition, wxDefaultSize, 0 );
  123. stPathsLabel->Wrap( -1 );
  124. bMainSizer->Add( stPathsLabel, 0, wxTOP|wxRIGHT|wxLEFT|wxEXPAND, 8 );
  125. bMainSizer->Add( 0, 2, 0, wxEXPAND, 5 );
  126. m_path_subs_grid = new WX_GRID( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
  127. // Grid
  128. m_path_subs_grid->CreateGrid( 1, 2 );
  129. m_path_subs_grid->EnableEditing( false );
  130. m_path_subs_grid->EnableGridLines( true );
  131. m_path_subs_grid->EnableDragGridSize( false );
  132. m_path_subs_grid->SetMargins( 0, 0 );
  133. // Columns
  134. m_path_subs_grid->SetColSize( 0, 150 );
  135. m_path_subs_grid->SetColSize( 1, 500 );
  136. m_path_subs_grid->AutoSizeColumns();
  137. m_path_subs_grid->EnableDragColMove( false );
  138. m_path_subs_grid->EnableDragColSize( true );
  139. m_path_subs_grid->SetColLabelSize( 0 );
  140. m_path_subs_grid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
  141. // Rows
  142. m_path_subs_grid->EnableDragRowSize( true );
  143. m_path_subs_grid->SetRowLabelSize( 0 );
  144. m_path_subs_grid->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
  145. // Label Appearance
  146. // Cell Defaults
  147. m_path_subs_grid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
  148. m_path_subs_grid->SetToolTip( _("This is a read-only table which shows pertinent environment variables.") );
  149. bMainSizer->Add( m_path_subs_grid, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
  150. this->SetSizer( bMainSizer );
  151. this->Layout();
  152. bMainSizer->Fit( this );
  153. // Connect Events
  154. this->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( PANEL_DESIGN_BLOCK_LIB_TABLE_BASE::OnUpdateUI ) );
  155. m_append_button->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_DESIGN_BLOCK_LIB_TABLE_BASE::appendRowHandler ), NULL, this );
  156. m_move_up_button->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_DESIGN_BLOCK_LIB_TABLE_BASE::moveUpHandler ), NULL, this );
  157. m_move_down_button->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_DESIGN_BLOCK_LIB_TABLE_BASE::moveDownHandler ), NULL, this );
  158. m_delete_button->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_DESIGN_BLOCK_LIB_TABLE_BASE::deleteRowHandler ), NULL, this );
  159. m_migrate_libs_button->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_DESIGN_BLOCK_LIB_TABLE_BASE::onMigrateLibraries ), NULL, this );
  160. m_path_subs_grid->Connect( wxEVT_SIZE, wxSizeEventHandler( PANEL_DESIGN_BLOCK_LIB_TABLE_BASE::onSizeGrid ), NULL, this );
  161. }
  162. PANEL_DESIGN_BLOCK_LIB_TABLE_BASE::~PANEL_DESIGN_BLOCK_LIB_TABLE_BASE()
  163. {
  164. // Disconnect Events
  165. this->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( PANEL_DESIGN_BLOCK_LIB_TABLE_BASE::OnUpdateUI ) );
  166. m_append_button->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_DESIGN_BLOCK_LIB_TABLE_BASE::appendRowHandler ), NULL, this );
  167. m_move_up_button->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_DESIGN_BLOCK_LIB_TABLE_BASE::moveUpHandler ), NULL, this );
  168. m_move_down_button->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_DESIGN_BLOCK_LIB_TABLE_BASE::moveDownHandler ), NULL, this );
  169. m_delete_button->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_DESIGN_BLOCK_LIB_TABLE_BASE::deleteRowHandler ), NULL, this );
  170. m_migrate_libs_button->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_DESIGN_BLOCK_LIB_TABLE_BASE::onMigrateLibraries ), NULL, this );
  171. m_path_subs_grid->Disconnect( wxEVT_SIZE, wxSizeEventHandler( PANEL_DESIGN_BLOCK_LIB_TABLE_BASE::onSizeGrid ), NULL, this );
  172. }