2013-10-13 21:33:58 +00:00
|
|
|
///////////////////////////////////////////////////////////////////////////
|
2022-12-13 20:47:28 +00:00
|
|
|
// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b)
|
2013-10-13 21:33:58 +00:00
|
|
|
// http://www.wxformbuilder.org/
|
|
|
|
//
|
2017-12-27 17:09:27 +00:00
|
|
|
// PLEASE DO *NOT* EDIT THIS FILE!
|
2013-10-13 21:33:58 +00:00
|
|
|
///////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2022-12-13 20:47:28 +00:00
|
|
|
#include "widgets/std_bitmap_button.h"
|
2018-08-19 16:10:14 +00:00
|
|
|
#include "widgets/wx_grid.h"
|
|
|
|
|
2013-10-13 21:33:58 +00:00
|
|
|
#include "dialog_fp_plugin_options_base.h"
|
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
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 )
|
|
|
|
{
|
|
|
|
this->SetSizeHints( wxDefaultSize, wxDefaultSize );
|
2020-08-17 22:34:02 +00:00
|
|
|
|
2018-03-14 04:51:59 +00:00
|
|
|
wxBoxSizer* bMainSizer;
|
|
|
|
bMainSizer = new wxBoxSizer( wxVERTICAL );
|
2020-08-17 22:34:02 +00:00
|
|
|
|
2013-10-13 21:33:58 +00:00
|
|
|
wxBoxSizer* m_horizontal_sizer;
|
|
|
|
m_horizontal_sizer = new wxBoxSizer( wxHORIZONTAL );
|
2020-08-17 22:34:02 +00:00
|
|
|
|
2013-11-12 00:17:27 +00:00
|
|
|
wxStaticBoxSizer* m_grid_sizer;
|
2018-03-14 04:51:59 +00:00
|
|
|
m_grid_sizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Plugin Options") ), wxVERTICAL );
|
2020-08-17 22:34:02 +00:00
|
|
|
|
|
|
|
m_grid_sizer->SetMinSize( wxSize( 400,300 ) );
|
2018-08-19 16:10:14 +00:00
|
|
|
m_grid = new WX_GRID( m_grid_sizer->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxBORDER_SIMPLE|wxVSCROLL );
|
2020-08-17 22:34:02 +00:00
|
|
|
|
2013-10-13 21:33:58 +00:00
|
|
|
// Grid
|
2013-11-12 00:17:27 +00:00
|
|
|
m_grid->CreateGrid( 1, 2 );
|
2013-10-23 18:56:03 +00:00
|
|
|
m_grid->EnableEditing( true );
|
|
|
|
m_grid->EnableGridLines( true );
|
|
|
|
m_grid->EnableDragGridSize( false );
|
|
|
|
m_grid->SetMargins( 0, 0 );
|
2020-08-17 22:34:02 +00:00
|
|
|
|
2013-10-13 21:33:58 +00:00
|
|
|
// Columns
|
2018-03-14 04:51:59 +00:00
|
|
|
m_grid->SetColSize( 0, 120 );
|
|
|
|
m_grid->SetColSize( 1, 240 );
|
2013-10-23 18:56:03 +00:00
|
|
|
m_grid->EnableDragColMove( false );
|
|
|
|
m_grid->EnableDragColSize( true );
|
|
|
|
m_grid->SetColLabelValue( 0, _("Option") );
|
|
|
|
m_grid->SetColLabelValue( 1, _("Value") );
|
2021-10-10 12:52:37 +00:00
|
|
|
m_grid->SetColLabelSize( 22 );
|
2020-08-17 22:34:02 +00:00
|
|
|
m_grid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
|
|
|
|
|
2013-10-13 21:33:58 +00:00
|
|
|
// Rows
|
2013-10-23 18:56:03 +00:00
|
|
|
m_grid->EnableDragRowSize( false );
|
2018-03-14 04:51:59 +00:00
|
|
|
m_grid->SetRowLabelSize( 0 );
|
2020-08-17 22:34:02 +00:00
|
|
|
m_grid->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
|
|
|
|
|
2013-10-13 21:33:58 +00:00
|
|
|
// Label Appearance
|
2020-08-17 22:34:02 +00:00
|
|
|
|
2013-10-13 21:33:58 +00:00
|
|
|
// Cell Defaults
|
2013-10-23 18:56:03 +00:00
|
|
|
m_grid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
|
2018-03-14 04:51:59 +00:00
|
|
|
m_grid_sizer->Add( m_grid, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
|
2020-08-17 22:34:02 +00:00
|
|
|
|
2018-03-14 04:51:59 +00:00
|
|
|
wxBoxSizer* bButtonsSizer;
|
|
|
|
bButtonsSizer = new wxBoxSizer( wxHORIZONTAL );
|
2020-08-17 22:34:02 +00:00
|
|
|
|
2022-12-13 20:47:28 +00:00
|
|
|
m_append_button = new STD_BITMAP_BUTTON( m_grid_sizer->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
|
2023-01-09 13:49:20 +00:00
|
|
|
bButtonsSizer->Add( m_append_button, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
|
2020-08-17 22:34:02 +00:00
|
|
|
|
|
|
|
|
|
|
|
bButtonsSizer->Add( 20, 0, 0, wxEXPAND, 5 );
|
|
|
|
|
2022-12-13 20:47:28 +00:00
|
|
|
m_delete_button = new STD_BITMAP_BUTTON( m_grid_sizer->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
|
2023-01-09 13:49:20 +00:00
|
|
|
bButtonsSizer->Add( m_delete_button, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
|
2020-08-17 22:34:02 +00:00
|
|
|
|
|
|
|
|
2018-03-14 04:51:59 +00:00
|
|
|
m_grid_sizer->Add( bButtonsSizer, 0, wxEXPAND|wxTOP, 5 );
|
2020-08-17 22:34:02 +00:00
|
|
|
|
|
|
|
|
2018-03-14 04:51:59 +00:00
|
|
|
m_horizontal_sizer->Add( m_grid_sizer, 3, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
|
2020-08-17 22:34:02 +00:00
|
|
|
|
2013-11-12 00:17:27 +00:00
|
|
|
wxStaticBoxSizer* m_options_sizer;
|
2018-03-14 04:51:59 +00:00
|
|
|
m_options_sizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Option Choices") ), wxVERTICAL );
|
2020-08-17 22:34:02 +00:00
|
|
|
|
|
|
|
m_listbox = new wxListBox( m_options_sizer->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, wxLB_ALWAYS_SB|wxLB_SINGLE );
|
2013-11-12 20:49:17 +00:00
|
|
|
m_listbox->SetToolTip( _("Options supported by current plugin") );
|
2020-08-17 22:34:02 +00:00
|
|
|
|
2018-03-14 04:51:59 +00:00
|
|
|
m_options_sizer->Add( m_listbox, 3, wxALL|wxEXPAND, 5 );
|
2020-08-17 22:34:02 +00:00
|
|
|
|
2018-08-19 16:05:48 +00:00
|
|
|
m_append_choice_button = new wxButton( m_options_sizer->GetStaticBox(), wxID_ANY, _("<< Append Selected Option"), wxDefaultPosition, wxDefaultSize, 0 );
|
2015-06-15 13:54:58 +00:00
|
|
|
m_options_sizer->Add( m_append_choice_button, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
|
2020-08-17 22:34:02 +00:00
|
|
|
|
|
|
|
|
2018-03-14 04:51:59 +00:00
|
|
|
m_options_sizer->Add( 0, 0, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );
|
2020-08-17 22:34:02 +00:00
|
|
|
|
2021-10-10 12:52:37 +00:00
|
|
|
m_html = new HTML_WINDOW( m_options_sizer->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHW_SCROLLBAR_AUTO|wxBORDER_SIMPLE|wxVSCROLL );
|
2018-03-14 04:51:59 +00:00
|
|
|
m_html->SetMinSize( wxSize( 280,100 ) );
|
2020-08-17 22:34:02 +00:00
|
|
|
|
2018-03-14 04:51:59 +00:00
|
|
|
m_options_sizer->Add( m_html, 2, wxALL|wxEXPAND, 5 );
|
2020-08-17 22:34:02 +00:00
|
|
|
|
|
|
|
|
2018-03-14 04:51:59 +00:00
|
|
|
m_horizontal_sizer->Add( m_options_sizer, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
|
2020-08-17 22:34:02 +00:00
|
|
|
|
|
|
|
|
2018-08-19 16:05:48 +00:00
|
|
|
bMainSizer->Add( m_horizontal_sizer, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
|
2020-08-17 22:34:02 +00:00
|
|
|
|
2013-10-13 21:33:58 +00:00
|
|
|
m_sdbSizer1 = new wxStdDialogButtonSizer();
|
|
|
|
m_sdbSizer1OK = new wxButton( this, wxID_OK );
|
|
|
|
m_sdbSizer1->AddButton( m_sdbSizer1OK );
|
|
|
|
m_sdbSizer1Cancel = new wxButton( this, wxID_CANCEL );
|
|
|
|
m_sdbSizer1->AddButton( m_sdbSizer1Cancel );
|
|
|
|
m_sdbSizer1->Realize();
|
2020-08-17 22:34:02 +00:00
|
|
|
|
2023-01-09 13:49:20 +00:00
|
|
|
bMainSizer->Add( m_sdbSizer1, 0, wxBOTTOM|wxEXPAND|wxTOP, 5 );
|
2020-08-17 22:34:02 +00:00
|
|
|
|
|
|
|
|
2018-03-14 04:51:59 +00:00
|
|
|
this->SetSizer( bMainSizer );
|
2013-10-13 21:33:58 +00:00
|
|
|
this->Layout();
|
2018-03-14 04:51:59 +00:00
|
|
|
bMainSizer->Fit( this );
|
2020-08-17 22:34:02 +00:00
|
|
|
|
2013-10-13 21:33:58 +00:00
|
|
|
this->Centre( wxBOTH );
|
2020-08-17 22:34:02 +00:00
|
|
|
|
2013-10-13 21:33:58 +00:00
|
|
|
// Connect Events
|
2018-07-20 17:46:56 +00:00
|
|
|
m_grid->Connect( wxEVT_GRID_CELL_CHANGED, wxGridEventHandler( DIALOG_FP_PLUGIN_OPTIONS_BASE::onGridCellChange ), NULL, this );
|
2018-03-14 04:51:59 +00:00
|
|
|
m_grid->Connect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_FP_PLUGIN_OPTIONS_BASE::onSize ), NULL, this );
|
|
|
|
m_grid->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_FP_PLUGIN_OPTIONS_BASE::onUpdateUI ), NULL, this );
|
|
|
|
m_append_button->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FP_PLUGIN_OPTIONS_BASE::onAppendRow ), NULL, this );
|
|
|
|
m_delete_button->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FP_PLUGIN_OPTIONS_BASE::onDeleteRow ), NULL, this );
|
2013-11-12 20:49:17 +00:00
|
|
|
m_listbox->Connect( wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler( DIALOG_FP_PLUGIN_OPTIONS_BASE::onListBoxItemSelected ), NULL, this );
|
|
|
|
m_listbox->Connect( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, wxCommandEventHandler( DIALOG_FP_PLUGIN_OPTIONS_BASE::onListBoxItemDoubleClicked ), NULL, this );
|
|
|
|
m_append_choice_button->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FP_PLUGIN_OPTIONS_BASE::onAppendOption ), NULL, this );
|
2013-10-13 21:33:58 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
DIALOG_FP_PLUGIN_OPTIONS_BASE::~DIALOG_FP_PLUGIN_OPTIONS_BASE()
|
|
|
|
{
|
|
|
|
// Disconnect Events
|
2018-07-20 17:46:56 +00:00
|
|
|
m_grid->Disconnect( wxEVT_GRID_CELL_CHANGED, wxGridEventHandler( DIALOG_FP_PLUGIN_OPTIONS_BASE::onGridCellChange ), NULL, this );
|
2018-03-14 04:51:59 +00:00
|
|
|
m_grid->Disconnect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_FP_PLUGIN_OPTIONS_BASE::onSize ), NULL, this );
|
|
|
|
m_grid->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_FP_PLUGIN_OPTIONS_BASE::onUpdateUI ), NULL, this );
|
|
|
|
m_append_button->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FP_PLUGIN_OPTIONS_BASE::onAppendRow ), NULL, this );
|
|
|
|
m_delete_button->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FP_PLUGIN_OPTIONS_BASE::onDeleteRow ), NULL, this );
|
2013-11-12 20:49:17 +00:00
|
|
|
m_listbox->Disconnect( wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler( DIALOG_FP_PLUGIN_OPTIONS_BASE::onListBoxItemSelected ), NULL, this );
|
|
|
|
m_listbox->Disconnect( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, wxCommandEventHandler( DIALOG_FP_PLUGIN_OPTIONS_BASE::onListBoxItemDoubleClicked ), NULL, this );
|
|
|
|
m_append_choice_button->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FP_PLUGIN_OPTIONS_BASE::onAppendOption ), NULL, this );
|
2020-08-17 22:34:02 +00:00
|
|
|
|
2013-10-13 21:33:58 +00:00
|
|
|
}
|