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.

198 lines
8.1 KiB

  1. ///////////////////////////////////////////////////////////////////////////
  2. // C++ code generated with wxFormBuilder (version Oct 26 2018)
  3. // http://www.wxformbuilder.org/
  4. //
  5. // PLEASE DO *NOT* EDIT THIS FILE!
  6. ///////////////////////////////////////////////////////////////////////////
  7. #include "widgets/wx_grid.h"
  8. #include "panel_fp_lib_table_base.h"
  9. ///////////////////////////////////////////////////////////////////////////
  10. PANEL_FP_LIB_TABLE_BASE::PANEL_FP_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 )
  11. {
  12. wxBoxSizer* bMainSizer;
  13. bMainSizer = new wxBoxSizer( wxVERTICAL );
  14. wxStaticBoxSizer* m_top_sizer;
  15. m_top_sizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Libraries by Scope") ), wxVERTICAL );
  16. m_notebook = new wxNotebook( m_top_sizer->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
  17. m_global_panel = new wxPanel( m_notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
  18. wxBoxSizer* m_global_sizer;
  19. m_global_sizer = new wxBoxSizer( wxVERTICAL );
  20. m_global_grid = new WX_GRID( m_global_panel, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
  21. // Grid
  22. m_global_grid->CreateGrid( 1, 5 );
  23. m_global_grid->EnableEditing( true );
  24. m_global_grid->EnableGridLines( true );
  25. m_global_grid->EnableDragGridSize( false );
  26. m_global_grid->SetMargins( 0, 0 );
  27. // Columns
  28. m_global_grid->AutoSizeColumns();
  29. m_global_grid->EnableDragColMove( false );
  30. m_global_grid->EnableDragColSize( true );
  31. m_global_grid->SetColLabelSize( 22 );
  32. m_global_grid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
  33. // Rows
  34. m_global_grid->EnableDragRowSize( false );
  35. m_global_grid->SetRowLabelSize( 0 );
  36. m_global_grid->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
  37. // Label Appearance
  38. // Cell Defaults
  39. m_global_grid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
  40. m_global_sizer->Add( m_global_grid, 1, wxALL|wxEXPAND, 5 );
  41. m_global_panel->SetSizer( m_global_sizer );
  42. m_global_panel->Layout();
  43. m_global_sizer->Fit( m_global_panel );
  44. m_notebook->AddPage( m_global_panel, _("Global Libraries"), true );
  45. m_project_panel = new wxPanel( m_notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
  46. wxBoxSizer* m_project_sizer;
  47. m_project_sizer = new wxBoxSizer( wxVERTICAL );
  48. m_project_grid = new WX_GRID( m_project_panel, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
  49. // Grid
  50. m_project_grid->CreateGrid( 1, 5 );
  51. m_project_grid->EnableEditing( true );
  52. m_project_grid->EnableGridLines( true );
  53. m_project_grid->EnableDragGridSize( false );
  54. m_project_grid->SetMargins( 0, 0 );
  55. // Columns
  56. m_project_grid->AutoSizeColumns();
  57. m_project_grid->EnableDragColMove( false );
  58. m_project_grid->EnableDragColSize( true );
  59. m_project_grid->SetColLabelSize( 22 );
  60. m_project_grid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
  61. // Rows
  62. m_project_grid->EnableDragRowSize( false );
  63. m_project_grid->SetRowLabelSize( 0 );
  64. m_project_grid->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
  65. // Label Appearance
  66. // Cell Defaults
  67. m_project_grid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
  68. m_project_sizer->Add( m_project_grid, 1, wxALL|wxEXPAND, 5 );
  69. m_project_panel->SetSizer( m_project_sizer );
  70. m_project_panel->Layout();
  71. m_project_sizer->Fit( m_project_panel );
  72. m_notebook->AddPage( m_project_panel, _("Project Specific Libraries"), false );
  73. m_top_sizer->Add( m_notebook, 1, wxEXPAND|wxBOTTOM, 5 );
  74. m_buttonsPanel = new wxPanel( m_top_sizer->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
  75. wxBoxSizer* bButtonsSizer;
  76. bButtonsSizer = new wxBoxSizer( wxHORIZONTAL );
  77. m_append_button = new wxBitmapButton( m_buttonsPanel, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
  78. m_append_button->SetToolTip( _("Add empty row to table") );
  79. bButtonsSizer->Add( m_append_button, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
  80. m_browseButton = new SPLIT_BUTTON( m_buttonsPanel, wxID_ANY, _( "Add Existing" ), wxDefaultPosition );
  81. bButtonsSizer->Add( m_browseButton, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 );
  82. m_move_up_button = new wxBitmapButton( m_buttonsPanel, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
  83. m_move_up_button->SetToolTip( _("Move up") );
  84. bButtonsSizer->Add( m_move_up_button, 0, wxBOTTOM|wxRIGHT, 5 );
  85. m_move_down_button = new wxBitmapButton( m_buttonsPanel, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
  86. m_move_down_button->SetToolTip( _("Move down") );
  87. bButtonsSizer->Add( m_move_down_button, 0, wxBOTTOM|wxRIGHT, 5 );
  88. bButtonsSizer->Add( 20, 0, 0, wxEXPAND, 5 );
  89. m_delete_button = new wxBitmapButton( m_buttonsPanel, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
  90. m_delete_button->SetToolTip( _("Remove library from table") );
  91. bButtonsSizer->Add( m_delete_button, 0, wxBOTTOM|wxRIGHT, 5 );
  92. m_buttonsPanel->SetSizer( bButtonsSizer );
  93. m_buttonsPanel->Layout();
  94. bButtonsSizer->Fit( m_buttonsPanel );
  95. m_top_sizer->Add( m_buttonsPanel, 0, 0, 5 );
  96. bMainSizer->Add( m_top_sizer, 1, wxEXPAND|wxALL, 5 );
  97. wxStaticBoxSizer* sbSizer1;
  98. sbSizer1 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Path Substitutions") ), wxVERTICAL );
  99. m_path_subs_grid = new WX_GRID( sbSizer1->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
  100. // Grid
  101. m_path_subs_grid->CreateGrid( 1, 2 );
  102. m_path_subs_grid->EnableEditing( false );
  103. m_path_subs_grid->EnableGridLines( true );
  104. m_path_subs_grid->EnableDragGridSize( false );
  105. m_path_subs_grid->SetMargins( 0, 0 );
  106. // Columns
  107. m_path_subs_grid->SetColSize( 0, 150 );
  108. m_path_subs_grid->SetColSize( 1, 500 );
  109. m_path_subs_grid->AutoSizeColumns();
  110. m_path_subs_grid->EnableDragColMove( false );
  111. m_path_subs_grid->EnableDragColSize( true );
  112. m_path_subs_grid->SetColLabelSize( 0 );
  113. m_path_subs_grid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
  114. // Rows
  115. m_path_subs_grid->EnableDragRowSize( true );
  116. m_path_subs_grid->SetRowLabelSize( 0 );
  117. m_path_subs_grid->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
  118. // Label Appearance
  119. // Cell Defaults
  120. m_path_subs_grid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
  121. m_path_subs_grid->SetToolTip( _("This is a read-only table which shows pertinent environment variables.") );
  122. sbSizer1->Add( m_path_subs_grid, 1, wxALL|wxEXPAND, 5 );
  123. bMainSizer->Add( sbSizer1, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
  124. this->SetSizer( bMainSizer );
  125. this->Layout();
  126. bMainSizer->Fit( this );
  127. // Connect Events
  128. this->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( PANEL_FP_LIB_TABLE_BASE::OnUpdateUI ) );
  129. m_append_button->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_FP_LIB_TABLE_BASE::appendRowHandler ), NULL, this );
  130. m_move_up_button->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_FP_LIB_TABLE_BASE::moveUpHandler ), NULL, this );
  131. m_move_down_button->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_FP_LIB_TABLE_BASE::moveDownHandler ), NULL, this );
  132. m_delete_button->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_FP_LIB_TABLE_BASE::deleteRowHandler ), NULL, this );
  133. m_path_subs_grid->Connect( wxEVT_SIZE, wxSizeEventHandler( PANEL_FP_LIB_TABLE_BASE::onSizeGrid ), NULL, this );
  134. }
  135. PANEL_FP_LIB_TABLE_BASE::~PANEL_FP_LIB_TABLE_BASE()
  136. {
  137. // Disconnect Events
  138. this->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( PANEL_FP_LIB_TABLE_BASE::OnUpdateUI ) );
  139. m_append_button->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_FP_LIB_TABLE_BASE::appendRowHandler ), NULL, this );
  140. m_move_up_button->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_FP_LIB_TABLE_BASE::moveUpHandler ), NULL, this );
  141. m_move_down_button->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_FP_LIB_TABLE_BASE::moveDownHandler ), NULL, this );
  142. m_delete_button->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_FP_LIB_TABLE_BASE::deleteRowHandler ), NULL, this );
  143. m_path_subs_grid->Disconnect( wxEVT_SIZE, wxSizeEventHandler( PANEL_FP_LIB_TABLE_BASE::onSizeGrid ), NULL, this );
  144. }