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.

140 lines
6.4 KiB

  1. ///////////////////////////////////////////////////////////////////////////
  2. // C++ code generated with wxFormBuilder (version Dec 30 2017)
  3. // http://www.wxformbuilder.org/
  4. //
  5. // PLEASE DO *NOT* EDIT THIS FILE!
  6. ///////////////////////////////////////////////////////////////////////////
  7. #include "widgets/wx_grid.h"
  8. #include "dialog_fp_plugin_options_base.h"
  9. ///////////////////////////////////////////////////////////////////////////
  10. DIALOG_FP_PLUGIN_OPTIONS_BASE::DIALOG_FP_PLUGIN_OPTIONS_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
  11. {
  12. this->SetSizeHints( wxDefaultSize, wxDefaultSize );
  13. wxBoxSizer* bMainSizer;
  14. bMainSizer = new wxBoxSizer( wxVERTICAL );
  15. wxBoxSizer* m_horizontal_sizer;
  16. m_horizontal_sizer = new wxBoxSizer( wxHORIZONTAL );
  17. wxStaticBoxSizer* m_grid_sizer;
  18. m_grid_sizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Plugin Options") ), wxVERTICAL );
  19. m_grid_sizer->SetMinSize( wxSize( 400,300 ) );
  20. m_grid = new WX_GRID( m_grid_sizer->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxBORDER_SIMPLE|wxVSCROLL );
  21. // Grid
  22. m_grid->CreateGrid( 1, 2 );
  23. m_grid->EnableEditing( true );
  24. m_grid->EnableGridLines( true );
  25. m_grid->EnableDragGridSize( false );
  26. m_grid->SetMargins( 0, 0 );
  27. // Columns
  28. m_grid->SetColSize( 0, 120 );
  29. m_grid->SetColSize( 1, 240 );
  30. m_grid->EnableDragColMove( false );
  31. m_grid->EnableDragColSize( true );
  32. m_grid->SetColLabelSize( 22 );
  33. m_grid->SetColLabelValue( 0, _("Option") );
  34. m_grid->SetColLabelValue( 1, _("Value") );
  35. m_grid->SetColLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
  36. // Rows
  37. m_grid->EnableDragRowSize( false );
  38. m_grid->SetRowLabelSize( 0 );
  39. m_grid->SetRowLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
  40. // Label Appearance
  41. // Cell Defaults
  42. m_grid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
  43. m_grid_sizer->Add( m_grid, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
  44. wxBoxSizer* bButtonsSizer;
  45. bButtonsSizer = new wxBoxSizer( wxHORIZONTAL );
  46. m_append_button = new wxBitmapButton( m_grid_sizer->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 30,30 ), 0 );
  47. bButtonsSizer->Add( m_append_button, 0, wxRIGHT|wxLEFT, 5 );
  48. bButtonsSizer->Add( 0, 0, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
  49. m_delete_button = new wxBitmapButton( m_grid_sizer->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 30,30 ), 0 );
  50. bButtonsSizer->Add( m_delete_button, 0, wxRIGHT|wxLEFT, 5 );
  51. m_grid_sizer->Add( bButtonsSizer, 0, wxEXPAND|wxTOP, 5 );
  52. m_horizontal_sizer->Add( m_grid_sizer, 3, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
  53. wxStaticBoxSizer* m_options_sizer;
  54. m_options_sizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Option Choices") ), wxVERTICAL );
  55. m_listbox = new wxListBox( m_options_sizer->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, wxLB_ALWAYS_SB|wxLB_SINGLE );
  56. m_listbox->SetToolTip( _("Options supported by current plugin") );
  57. m_options_sizer->Add( m_listbox, 3, wxALL|wxEXPAND, 5 );
  58. m_append_choice_button = new wxButton( m_options_sizer->GetStaticBox(), wxID_ANY, _("<< Append Selected Option"), wxDefaultPosition, wxDefaultSize, 0 );
  59. m_options_sizer->Add( m_append_choice_button, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
  60. m_options_sizer->Add( 0, 0, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );
  61. m_html = new wxHtmlWindow( m_options_sizer->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHW_SCROLLBAR_AUTO|wxBORDER_SIMPLE|wxVSCROLL );
  62. m_html->SetMinSize( wxSize( 280,100 ) );
  63. m_options_sizer->Add( m_html, 2, wxALL|wxEXPAND, 5 );
  64. m_horizontal_sizer->Add( m_options_sizer, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
  65. bMainSizer->Add( m_horizontal_sizer, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
  66. m_sdbSizer1 = new wxStdDialogButtonSizer();
  67. m_sdbSizer1OK = new wxButton( this, wxID_OK );
  68. m_sdbSizer1->AddButton( m_sdbSizer1OK );
  69. m_sdbSizer1Cancel = new wxButton( this, wxID_CANCEL );
  70. m_sdbSizer1->AddButton( m_sdbSizer1Cancel );
  71. m_sdbSizer1->Realize();
  72. bMainSizer->Add( m_sdbSizer1, 0, wxEXPAND, 5 );
  73. this->SetSizer( bMainSizer );
  74. this->Layout();
  75. bMainSizer->Fit( this );
  76. this->Centre( wxBOTH );
  77. // Connect Events
  78. m_grid->Connect( wxEVT_GRID_CELL_CHANGED, wxGridEventHandler( DIALOG_FP_PLUGIN_OPTIONS_BASE::onGridCellChange ), NULL, this );
  79. m_grid->Connect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_FP_PLUGIN_OPTIONS_BASE::onSize ), NULL, this );
  80. m_grid->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_FP_PLUGIN_OPTIONS_BASE::onUpdateUI ), NULL, this );
  81. m_append_button->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FP_PLUGIN_OPTIONS_BASE::onAppendRow ), NULL, this );
  82. m_delete_button->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FP_PLUGIN_OPTIONS_BASE::onDeleteRow ), NULL, this );
  83. m_listbox->Connect( wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler( DIALOG_FP_PLUGIN_OPTIONS_BASE::onListBoxItemSelected ), NULL, this );
  84. m_listbox->Connect( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, wxCommandEventHandler( DIALOG_FP_PLUGIN_OPTIONS_BASE::onListBoxItemDoubleClicked ), NULL, this );
  85. m_append_choice_button->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FP_PLUGIN_OPTIONS_BASE::onAppendOption ), NULL, this );
  86. }
  87. DIALOG_FP_PLUGIN_OPTIONS_BASE::~DIALOG_FP_PLUGIN_OPTIONS_BASE()
  88. {
  89. // Disconnect Events
  90. m_grid->Disconnect( wxEVT_GRID_CELL_CHANGED, wxGridEventHandler( DIALOG_FP_PLUGIN_OPTIONS_BASE::onGridCellChange ), NULL, this );
  91. m_grid->Disconnect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_FP_PLUGIN_OPTIONS_BASE::onSize ), NULL, this );
  92. m_grid->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_FP_PLUGIN_OPTIONS_BASE::onUpdateUI ), NULL, this );
  93. m_append_button->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FP_PLUGIN_OPTIONS_BASE::onAppendRow ), NULL, this );
  94. m_delete_button->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FP_PLUGIN_OPTIONS_BASE::onDeleteRow ), NULL, this );
  95. m_listbox->Disconnect( wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler( DIALOG_FP_PLUGIN_OPTIONS_BASE::onListBoxItemSelected ), NULL, this );
  96. m_listbox->Disconnect( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, wxCommandEventHandler( DIALOG_FP_PLUGIN_OPTIONS_BASE::onListBoxItemDoubleClicked ), NULL, this );
  97. m_append_choice_button->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FP_PLUGIN_OPTIONS_BASE::onAppendOption ), NULL, this );
  98. }