2018-05-14 17:34:18 +00:00
|
|
|
///////////////////////////////////////////////////////////////////////////
|
2022-12-13 20:47:28 +00:00
|
|
|
// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b)
|
2018-05-14 17:34:18 +00:00
|
|
|
// http://www.wxformbuilder.org/
|
|
|
|
//
|
|
|
|
// PLEASE DO *NOT* EDIT THIS FILE!
|
|
|
|
///////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2022-12-13 20:47:28 +00:00
|
|
|
#include "widgets/std_bitmap_button.h"
|
2018-05-30 10:52:19 +00:00
|
|
|
#include "widgets/wx_grid.h"
|
|
|
|
|
2021-08-29 23:33:08 +00:00
|
|
|
#include "panel_template_fieldnames_base.h"
|
2018-05-14 17:34:18 +00:00
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2021-08-29 23:33:08 +00:00
|
|
|
PANEL_TEMPLATE_FIELDNAMES_BASE::PANEL_TEMPLATE_FIELDNAMES_BASE( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) : wxPanel( parent, id, pos, size, style, name )
|
2018-05-14 17:34:18 +00:00
|
|
|
{
|
|
|
|
wxBoxSizer* bPanelSizer;
|
2023-01-11 01:00:47 +00:00
|
|
|
bPanelSizer = new wxBoxSizer( wxVERTICAL );
|
2020-03-10 18:46:57 +00:00
|
|
|
|
2020-04-11 12:06:45 +00:00
|
|
|
m_title = new wxStaticText( this, wxID_ANY, _("Field name templates:"), wxDefaultPosition, wxDefaultSize, 0 );
|
2020-03-10 18:46:57 +00:00
|
|
|
m_title->Wrap( -1 );
|
2023-01-11 01:00:47 +00:00
|
|
|
bPanelSizer->Add( m_title, 0, wxTOP|wxLEFT|wxEXPAND, 8 );
|
|
|
|
|
|
|
|
|
|
|
|
bPanelSizer->Add( 0, 3, 0, wxEXPAND, 5 );
|
2020-03-10 18:46:57 +00:00
|
|
|
|
2018-08-27 19:11:05 +00:00
|
|
|
m_grid = new WX_GRID( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
|
2020-03-10 18:46:57 +00:00
|
|
|
|
2018-05-14 17:34:18 +00:00
|
|
|
// Grid
|
2018-08-08 20:57:53 +00:00
|
|
|
m_grid->CreateGrid( 0, 3 );
|
2018-05-14 17:34:18 +00:00
|
|
|
m_grid->EnableEditing( true );
|
|
|
|
m_grid->EnableGridLines( true );
|
|
|
|
m_grid->EnableDragGridSize( false );
|
|
|
|
m_grid->SetMargins( 0, 0 );
|
2020-03-10 18:46:57 +00:00
|
|
|
|
2018-05-14 17:34:18 +00:00
|
|
|
// Columns
|
|
|
|
m_grid->SetColSize( 0, 300 );
|
|
|
|
m_grid->SetColSize( 1, 60 );
|
2018-08-08 20:57:53 +00:00
|
|
|
m_grid->SetColSize( 2, 60 );
|
2018-05-14 17:34:18 +00:00
|
|
|
m_grid->EnableDragColMove( false );
|
|
|
|
m_grid->EnableDragColSize( true );
|
|
|
|
m_grid->SetColLabelValue( 0, _("Name") );
|
|
|
|
m_grid->SetColLabelValue( 1, _("Visible") );
|
2018-08-08 20:57:53 +00:00
|
|
|
m_grid->SetColLabelValue( 2, _("URL") );
|
2023-01-11 01:00:47 +00:00
|
|
|
m_grid->SetColLabelSize( wxGRID_AUTOSIZE );
|
2020-03-10 18:46:57 +00:00
|
|
|
m_grid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
|
|
|
|
|
2018-05-14 17:34:18 +00:00
|
|
|
// Rows
|
|
|
|
m_grid->EnableDragRowSize( true );
|
|
|
|
m_grid->SetRowLabelSize( 0 );
|
2020-03-10 18:46:57 +00:00
|
|
|
m_grid->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
|
|
|
|
|
2018-05-14 17:34:18 +00:00
|
|
|
// Label Appearance
|
2020-03-10 18:46:57 +00:00
|
|
|
|
2018-05-14 17:34:18 +00:00
|
|
|
// Cell Defaults
|
2023-09-18 14:15:22 +00:00
|
|
|
m_grid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
|
2020-03-10 18:46:57 +00:00
|
|
|
m_grid->SetMinSize( wxSize( -1,180 ) );
|
|
|
|
|
2023-10-19 15:59:35 +00:00
|
|
|
bPanelSizer->Add( m_grid, 1, wxEXPAND|wxRIGHT, 5 );
|
2020-03-10 18:46:57 +00:00
|
|
|
|
2018-05-14 17:34:18 +00:00
|
|
|
wxBoxSizer* bSizer10;
|
|
|
|
bSizer10 = new wxBoxSizer( wxHORIZONTAL );
|
2020-03-10 18:46:57 +00:00
|
|
|
|
2022-12-13 20:47:28 +00:00
|
|
|
m_addFieldButton = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
|
2023-01-11 01:00:47 +00:00
|
|
|
bSizer10->Add( m_addFieldButton, 0, wxTOP|wxBOTTOM|wxLEFT, 5 );
|
2020-03-10 18:46:57 +00:00
|
|
|
|
|
|
|
|
2020-08-17 22:34:02 +00:00
|
|
|
bSizer10->Add( 20, 0, 0, wxEXPAND, 5 );
|
2020-03-10 18:46:57 +00:00
|
|
|
|
2022-12-13 20:47:28 +00:00
|
|
|
m_deleteFieldButton = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
|
2023-01-11 01:00:47 +00:00
|
|
|
bSizer10->Add( m_deleteFieldButton, 0, wxALL, 5 );
|
2020-03-10 18:46:57 +00:00
|
|
|
|
|
|
|
|
2023-01-11 01:00:47 +00:00
|
|
|
bPanelSizer->Add( bSizer10, 0, wxEXPAND, 10 );
|
2020-03-10 18:46:57 +00:00
|
|
|
|
|
|
|
|
2018-05-14 17:34:18 +00:00
|
|
|
this->SetSizer( bPanelSizer );
|
|
|
|
this->Layout();
|
|
|
|
bPanelSizer->Fit( this );
|
2020-03-10 18:46:57 +00:00
|
|
|
|
2018-05-14 17:34:18 +00:00
|
|
|
// Connect Events
|
2021-08-29 23:33:08 +00:00
|
|
|
m_grid->Connect( wxEVT_SIZE, wxSizeEventHandler( PANEL_TEMPLATE_FIELDNAMES_BASE::OnSizeGrid ), NULL, this );
|
|
|
|
m_addFieldButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_TEMPLATE_FIELDNAMES_BASE::OnAddButtonClick ), NULL, this );
|
|
|
|
m_deleteFieldButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_TEMPLATE_FIELDNAMES_BASE::OnDeleteButtonClick ), NULL, this );
|
2018-05-14 17:34:18 +00:00
|
|
|
}
|
|
|
|
|
2021-08-29 23:33:08 +00:00
|
|
|
PANEL_TEMPLATE_FIELDNAMES_BASE::~PANEL_TEMPLATE_FIELDNAMES_BASE()
|
2018-05-14 17:34:18 +00:00
|
|
|
{
|
|
|
|
// Disconnect Events
|
2021-08-29 23:33:08 +00:00
|
|
|
m_grid->Disconnect( wxEVT_SIZE, wxSizeEventHandler( PANEL_TEMPLATE_FIELDNAMES_BASE::OnSizeGrid ), NULL, this );
|
|
|
|
m_addFieldButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_TEMPLATE_FIELDNAMES_BASE::OnAddButtonClick ), NULL, this );
|
|
|
|
m_deleteFieldButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_TEMPLATE_FIELDNAMES_BASE::OnDeleteButtonClick ), NULL, this );
|
2020-03-10 18:46:57 +00:00
|
|
|
|
2018-05-14 17:34:18 +00:00
|
|
|
}
|