2013-10-13 21:33:58 +00:00
|
|
|
///////////////////////////////////////////////////////////////////////////
|
2018-08-19 16:05:48 +00:00
|
|
|
// C++ code generated with wxFormBuilder (version Dec 30 2017)
|
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
|
|
|
///////////////////////////////////////////////////////////////////////////
|
|
|
|
|
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 );
|
|
|
|
|
2018-03-14 04:51:59 +00:00
|
|
|
wxBoxSizer* bMainSizer;
|
|
|
|
bMainSizer = new wxBoxSizer( wxVERTICAL );
|
2013-10-13 21:33:58 +00:00
|
|
|
|
|
|
|
wxBoxSizer* m_horizontal_sizer;
|
|
|
|
m_horizontal_sizer = new wxBoxSizer( wxHORIZONTAL );
|
|
|
|
|
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 );
|
2013-10-13 21:33:58 +00:00
|
|
|
|
2018-03-14 04:51:59 +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 );
|
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 );
|
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 );
|
2018-03-14 04:51:59 +00:00
|
|
|
m_grid->SetColLabelSize( 22 );
|
2013-10-23 18:56:03 +00:00
|
|
|
m_grid->SetColLabelValue( 0, _("Option") );
|
|
|
|
m_grid->SetColLabelValue( 1, _("Value") );
|
|
|
|
m_grid->SetColLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
|
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 );
|
2013-10-23 18:56:03 +00:00
|
|
|
m_grid->SetRowLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
|
2013-10-13 21:33:58 +00:00
|
|
|
|
|
|
|
// Label Appearance
|
|
|
|
|
|
|
|
// 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 );
|
2013-10-13 21:33:58 +00:00
|
|
|
|
2018-03-14 04:51:59 +00:00
|
|
|
wxBoxSizer* bButtonsSizer;
|
|
|
|
bButtonsSizer = new wxBoxSizer( wxHORIZONTAL );
|
2013-10-13 21:33:58 +00:00
|
|
|
|
2018-08-02 17:00:41 +00:00
|
|
|
m_append_button = new wxBitmapButton( m_grid_sizer->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 30,30 ), 0 );
|
2018-07-17 21:14:02 +00:00
|
|
|
bButtonsSizer->Add( m_append_button, 0, wxRIGHT|wxLEFT, 5 );
|
2013-10-13 21:33:58 +00:00
|
|
|
|
2018-08-19 16:05:48 +00:00
|
|
|
|
|
|
|
bButtonsSizer->Add( 0, 0, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
|
|
|
|
|
2018-08-02 17:00:41 +00:00
|
|
|
m_delete_button = new wxBitmapButton( m_grid_sizer->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 30,30 ), 0 );
|
2018-08-19 16:05:48 +00:00
|
|
|
bButtonsSizer->Add( m_delete_button, 0, wxRIGHT|wxLEFT, 5 );
|
2013-11-12 00:17:27 +00:00
|
|
|
|
|
|
|
|
2018-03-14 04:51:59 +00:00
|
|
|
m_grid_sizer->Add( bButtonsSizer, 0, wxEXPAND|wxTOP, 5 );
|
2013-10-13 21:33:58 +00:00
|
|
|
|
2013-11-12 00:17:27 +00:00
|
|
|
|
2018-03-14 04:51:59 +00:00
|
|
|
m_horizontal_sizer->Add( m_grid_sizer, 3, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
|
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 );
|
2013-11-12 00:17:27 +00:00
|
|
|
|
2017-12-27 17:09:27 +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") );
|
2013-11-12 00:17:27 +00:00
|
|
|
|
2018-03-14 04:51:59 +00:00
|
|
|
m_options_sizer->Add( m_listbox, 3, wxALL|wxEXPAND, 5 );
|
2013-10-13 21:33:58 +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 );
|
2013-11-12 00:17:27 +00:00
|
|
|
|
2018-03-14 04:51:59 +00:00
|
|
|
|
|
|
|
m_options_sizer->Add( 0, 0, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );
|
2013-11-12 00:17:27 +00:00
|
|
|
|
2018-08-02 17:00:41 +00:00
|
|
|
m_html = new wxHtmlWindow( 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 ) );
|
2013-11-12 00:17:27 +00:00
|
|
|
|
2018-03-14 04:51:59 +00:00
|
|
|
m_options_sizer->Add( m_html, 2, wxALL|wxEXPAND, 5 );
|
2013-10-13 21:33:58 +00:00
|
|
|
|
|
|
|
|
2018-03-14 04:51:59 +00:00
|
|
|
m_horizontal_sizer->Add( m_options_sizer, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
|
2013-10-13 21:33:58 +00:00
|
|
|
|
|
|
|
|
2018-08-19 16:05:48 +00:00
|
|
|
bMainSizer->Add( m_horizontal_sizer, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
|
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();
|
|
|
|
|
2018-03-14 04:51:59 +00:00
|
|
|
bMainSizer->Add( m_sdbSizer1, 0, wxEXPAND, 5 );
|
2013-10-13 21:33:58 +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 );
|
2013-10-13 21:33:58 +00:00
|
|
|
|
|
|
|
this->Centre( wxBOTH );
|
|
|
|
|
|
|
|
// 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 );
|
2013-10-13 21:33:58 +00:00
|
|
|
|
|
|
|
}
|