2013-05-26 04:36:44 +00:00
|
|
|
///////////////////////////////////////////////////////////////////////////
|
2020-10-24 22:29:29 +00:00
|
|
|
// C++ code generated with wxFormBuilder (version Oct 26 2018)
|
2013-05-26 04:36:44 +00:00
|
|
|
// http://www.wxformbuilder.org/
|
|
|
|
//
|
2018-02-02 15:56:09 +00:00
|
|
|
// PLEASE DO *NOT* EDIT THIS FILE!
|
2013-05-26 04:36:44 +00:00
|
|
|
///////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2020-03-06 20:02:58 +00:00
|
|
|
#include "widgets/wx_grid.h"
|
|
|
|
|
2020-10-06 13:17:45 +00:00
|
|
|
#include "dialog_sheet_properties_base.h"
|
2013-05-26 04:36:44 +00:00
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2020-10-06 13:17:45 +00:00
|
|
|
DIALOG_SHEET_PROPERTIES_BASE::DIALOG_SHEET_PROPERTIES_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
|
2013-05-26 04:36:44 +00:00
|
|
|
{
|
2020-03-06 20:02:58 +00:00
|
|
|
this->SetSizeHints( wxDefaultSize, wxDefaultSize );
|
2019-08-25 23:45:10 +00:00
|
|
|
|
2013-05-26 04:36:44 +00:00
|
|
|
wxBoxSizer* mainSizer;
|
|
|
|
mainSizer = new wxBoxSizer( wxVERTICAL );
|
2019-08-25 23:45:10 +00:00
|
|
|
|
2020-03-06 20:02:58 +00:00
|
|
|
m_longForm = new wxBoxSizer( wxVERTICAL );
|
2019-08-25 23:45:10 +00:00
|
|
|
|
2020-03-06 20:02:58 +00:00
|
|
|
wxStaticBoxSizer* sbFields;
|
|
|
|
sbFields = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Fields") ), wxVERTICAL );
|
2019-08-25 23:45:10 +00:00
|
|
|
|
2020-03-06 20:02:58 +00:00
|
|
|
m_grid = new WX_GRID( sbFields->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
|
2019-08-25 23:45:10 +00:00
|
|
|
|
2020-03-06 20:02:58 +00:00
|
|
|
// Grid
|
|
|
|
m_grid->CreateGrid( 4, 11 );
|
|
|
|
m_grid->EnableEditing( true );
|
|
|
|
m_grid->EnableGridLines( true );
|
|
|
|
m_grid->EnableDragGridSize( false );
|
|
|
|
m_grid->SetMargins( 0, 0 );
|
2019-08-25 23:45:10 +00:00
|
|
|
|
2020-03-06 20:02:58 +00:00
|
|
|
// Columns
|
|
|
|
m_grid->SetColSize( 0, 72 );
|
|
|
|
m_grid->SetColSize( 1, 120 );
|
|
|
|
m_grid->SetColSize( 2, 48 );
|
|
|
|
m_grid->SetColSize( 3, 72 );
|
|
|
|
m_grid->SetColSize( 4, 72 );
|
|
|
|
m_grid->SetColSize( 5, 48 );
|
|
|
|
m_grid->SetColSize( 6, 48 );
|
|
|
|
m_grid->SetColSize( 7, 84 );
|
|
|
|
m_grid->SetColSize( 8, 84 );
|
|
|
|
m_grid->SetColSize( 9, 84 );
|
|
|
|
m_grid->SetColSize( 10, 84 );
|
|
|
|
m_grid->EnableDragColMove( false );
|
|
|
|
m_grid->EnableDragColSize( true );
|
|
|
|
m_grid->SetColLabelSize( 22 );
|
|
|
|
m_grid->SetColLabelValue( 0, _("Name") );
|
|
|
|
m_grid->SetColLabelValue( 1, _("Value") );
|
|
|
|
m_grid->SetColLabelValue( 2, _("Show") );
|
|
|
|
m_grid->SetColLabelValue( 3, _("H Align") );
|
|
|
|
m_grid->SetColLabelValue( 4, _("V Align") );
|
|
|
|
m_grid->SetColLabelValue( 5, _("Italic") );
|
|
|
|
m_grid->SetColLabelValue( 6, _("Bold") );
|
|
|
|
m_grid->SetColLabelValue( 7, _("Text Size") );
|
|
|
|
m_grid->SetColLabelValue( 8, _("Orientation") );
|
|
|
|
m_grid->SetColLabelValue( 9, _("X Position") );
|
|
|
|
m_grid->SetColLabelValue( 10, _("Y Position") );
|
|
|
|
m_grid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
|
2019-08-25 23:45:10 +00:00
|
|
|
|
2020-03-06 20:02:58 +00:00
|
|
|
// Rows
|
|
|
|
m_grid->EnableDragRowSize( true );
|
|
|
|
m_grid->SetRowLabelSize( 0 );
|
|
|
|
m_grid->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
|
2019-08-25 23:45:10 +00:00
|
|
|
|
2020-03-06 20:02:58 +00:00
|
|
|
// Label Appearance
|
2019-08-25 23:45:10 +00:00
|
|
|
|
2020-03-06 20:02:58 +00:00
|
|
|
// Cell Defaults
|
|
|
|
m_grid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
|
|
|
|
m_grid->SetMinSize( wxSize( -1,180 ) );
|
2019-08-25 23:45:10 +00:00
|
|
|
|
2020-03-06 20:02:58 +00:00
|
|
|
sbFields->Add( m_grid, 1, wxALL|wxEXPAND, 5 );
|
2020-02-20 21:29:21 +00:00
|
|
|
|
2020-03-06 20:02:58 +00:00
|
|
|
wxBoxSizer* bButtonSize;
|
|
|
|
bButtonSize = new wxBoxSizer( wxHORIZONTAL );
|
2020-02-20 21:29:21 +00:00
|
|
|
|
2020-03-06 20:02:58 +00:00
|
|
|
m_bpAdd = new wxBitmapButton( sbFields->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
|
|
|
|
m_bpAdd->SetToolTip( _("Add field") );
|
2019-08-25 23:45:10 +00:00
|
|
|
|
2020-03-06 20:02:58 +00:00
|
|
|
bButtonSize->Add( m_bpAdd, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
|
2019-08-25 23:45:10 +00:00
|
|
|
|
2020-03-06 20:02:58 +00:00
|
|
|
m_bpMoveUp = new wxBitmapButton( sbFields->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
|
|
|
|
m_bpMoveUp->SetToolTip( _("Move up") );
|
2019-08-25 23:45:10 +00:00
|
|
|
|
2020-03-06 20:02:58 +00:00
|
|
|
bButtonSize->Add( m_bpMoveUp, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
|
2020-02-20 21:29:21 +00:00
|
|
|
|
2020-03-06 20:02:58 +00:00
|
|
|
m_bpMoveDown = new wxBitmapButton( sbFields->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
|
|
|
|
m_bpMoveDown->SetToolTip( _("Move down") );
|
2020-02-20 21:29:21 +00:00
|
|
|
|
2020-03-06 20:02:58 +00:00
|
|
|
bButtonSize->Add( m_bpMoveDown, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
|
2020-02-20 21:29:21 +00:00
|
|
|
|
|
|
|
|
2020-08-17 22:34:02 +00:00
|
|
|
bButtonSize->Add( 20, 0, 0, wxEXPAND, 10 );
|
2020-03-06 20:02:58 +00:00
|
|
|
|
|
|
|
m_bpDelete = new wxBitmapButton( sbFields->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
|
|
|
|
m_bpDelete->SetToolTip( _("Delete field") );
|
|
|
|
|
2020-08-17 22:34:02 +00:00
|
|
|
bButtonSize->Add( m_bpDelete, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
|
2020-03-06 20:02:58 +00:00
|
|
|
|
|
|
|
|
|
|
|
bButtonSize->Add( 0, 0, 1, wxEXPAND, 5 );
|
2020-02-20 21:29:21 +00:00
|
|
|
|
2019-08-25 23:45:10 +00:00
|
|
|
|
2020-03-06 20:02:58 +00:00
|
|
|
sbFields->Add( bButtonSize, 0, wxALL|wxEXPAND, 5 );
|
2019-08-25 23:45:10 +00:00
|
|
|
|
|
|
|
|
2020-03-06 20:02:58 +00:00
|
|
|
m_longForm->Add( sbFields, 1, wxALL|wxEXPAND, 5 );
|
2019-08-25 23:45:10 +00:00
|
|
|
|
2020-03-06 20:02:58 +00:00
|
|
|
wxBoxSizer* bSizer5;
|
|
|
|
bSizer5 = new wxBoxSizer( wxHORIZONTAL );
|
2019-08-25 23:45:10 +00:00
|
|
|
|
2020-03-08 02:18:45 +00:00
|
|
|
wxStaticBoxSizer* sbSizer2;
|
|
|
|
sbSizer2 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Style") ), wxHORIZONTAL );
|
|
|
|
|
|
|
|
m_borderWidthLabel = new wxStaticText( sbSizer2->GetStaticBox(), wxID_ANY, _("Border width:"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
|
|
m_borderWidthLabel->Wrap( -1 );
|
2020-05-03 12:24:08 +00:00
|
|
|
sbSizer2->Add( m_borderWidthLabel, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT, 5 );
|
2020-03-08 02:18:45 +00:00
|
|
|
|
|
|
|
m_borderWidthCtrl = new wxTextCtrl( sbSizer2->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
2020-05-03 12:24:08 +00:00
|
|
|
sbSizer2->Add( m_borderWidthCtrl, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT, 5 );
|
2020-03-08 02:18:45 +00:00
|
|
|
|
|
|
|
m_borderWidthUnits = new wxStaticText( sbSizer2->GetStaticBox(), wxID_ANY, _("units"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
|
|
m_borderWidthUnits->Wrap( -1 );
|
|
|
|
sbSizer2->Add( m_borderWidthUnits, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 );
|
|
|
|
|
|
|
|
|
|
|
|
sbSizer2->Add( 0, 0, 1, wxEXPAND, 5 );
|
|
|
|
|
|
|
|
m_borderColorLabel = new wxStaticText( sbSizer2->GetStaticBox(), wxID_ANY, _("Border color:"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
|
|
m_borderColorLabel->Wrap( -1 );
|
|
|
|
sbSizer2->Add( m_borderColorLabel, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
|
|
|
|
2020-05-03 12:24:08 +00:00
|
|
|
m_borderSwatch = new COLOR_SWATCH( sbSizer2->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
|
2020-04-09 16:15:57 +00:00
|
|
|
m_borderSwatch->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
|
2020-05-03 12:24:08 +00:00
|
|
|
m_borderSwatch->SetMinSize( wxSize( 48,24 ) );
|
2020-03-08 02:18:45 +00:00
|
|
|
|
2020-05-03 12:24:08 +00:00
|
|
|
sbSizer2->Add( m_borderSwatch, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
|
2019-08-25 23:45:10 +00:00
|
|
|
|
2020-03-08 02:18:45 +00:00
|
|
|
|
|
|
|
sbSizer2->Add( 40, 0, 1, wxEXPAND, 5 );
|
|
|
|
|
|
|
|
m_backgroundColorLabel = new wxStaticText( sbSizer2->GetStaticBox(), wxID_ANY, _("Background fill:"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
|
|
m_backgroundColorLabel->Wrap( -1 );
|
|
|
|
sbSizer2->Add( m_backgroundColorLabel, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
|
|
|
|
2020-05-03 12:24:08 +00:00
|
|
|
m_backgroundSwatch = new COLOR_SWATCH( sbSizer2->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
|
|
|
|
m_backgroundSwatch->SetMinSize( wxSize( 48,24 ) );
|
2020-03-08 02:18:45 +00:00
|
|
|
|
2020-05-03 12:24:08 +00:00
|
|
|
sbSizer2->Add( m_backgroundSwatch, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
|
2020-03-08 02:18:45 +00:00
|
|
|
|
|
|
|
|
|
|
|
bSizer5->Add( sbSizer2, 1, wxEXPAND|wxBOTTOM, 5 );
|
2019-08-25 23:45:10 +00:00
|
|
|
|
|
|
|
|
2020-08-13 19:58:36 +00:00
|
|
|
m_longForm->Add( bSizer5, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
2019-08-25 23:45:10 +00:00
|
|
|
|
|
|
|
|
2020-03-06 20:02:58 +00:00
|
|
|
mainSizer->Add( m_longForm, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
|
|
|
|
|
2020-10-18 20:30:37 +00:00
|
|
|
wxBoxSizer* bSizer6;
|
|
|
|
bSizer6 = new wxBoxSizer( wxHORIZONTAL );
|
|
|
|
|
|
|
|
m_pageNumberStaticText = new wxStaticText( this, wxID_ANY, _("Page number:"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
|
|
m_pageNumberStaticText->Wrap( -1 );
|
|
|
|
bSizer6->Add( m_pageNumberStaticText, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
|
|
|
|
|
|
|
|
m_pageNumberTextCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
|
|
|
bSizer6->Add( m_pageNumberTextCtrl, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 );
|
|
|
|
|
|
|
|
|
|
|
|
bSizer6->Add( 0, 0, 3, wxEXPAND, 5 );
|
|
|
|
|
|
|
|
|
|
|
|
mainSizer->Add( bSizer6, 0, wxALL|wxEXPAND, 5 );
|
|
|
|
|
2020-08-13 19:58:36 +00:00
|
|
|
m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
|
2020-10-18 20:30:37 +00:00
|
|
|
mainSizer->Add( m_staticline1, 0, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 );
|
2020-08-13 19:58:36 +00:00
|
|
|
|
2020-03-06 20:02:58 +00:00
|
|
|
wxBoxSizer* bSizerBottom;
|
|
|
|
bSizerBottom = new wxBoxSizer( wxHORIZONTAL );
|
2020-03-05 12:20:38 +00:00
|
|
|
|
2020-10-24 22:29:29 +00:00
|
|
|
m_hierarchicalPathLabel = new wxStaticText( this, wxID_ANY, _("Hierarchical path:"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
|
|
m_hierarchicalPathLabel->Wrap( -1 );
|
|
|
|
bSizerBottom->Add( m_hierarchicalPathLabel, 1, wxLEFT|wxALIGN_CENTER_VERTICAL, 10 );
|
2019-08-25 23:45:10 +00:00
|
|
|
|
2020-03-06 20:02:58 +00:00
|
|
|
m_stdDialogButtonSizer = new wxStdDialogButtonSizer();
|
|
|
|
m_stdDialogButtonSizerOK = new wxButton( this, wxID_OK );
|
|
|
|
m_stdDialogButtonSizer->AddButton( m_stdDialogButtonSizerOK );
|
|
|
|
m_stdDialogButtonSizerCancel = new wxButton( this, wxID_CANCEL );
|
|
|
|
m_stdDialogButtonSizer->AddButton( m_stdDialogButtonSizerCancel );
|
|
|
|
m_stdDialogButtonSizer->Realize();
|
2019-08-25 23:45:10 +00:00
|
|
|
|
2020-10-18 20:30:37 +00:00
|
|
|
bSizerBottom->Add( m_stdDialogButtonSizer, 0, wxEXPAND, 5 );
|
2020-08-13 19:58:36 +00:00
|
|
|
|
|
|
|
|
2020-10-18 20:30:37 +00:00
|
|
|
mainSizer->Add( bSizerBottom, 0, wxBOTTOM|wxEXPAND|wxTOP, 5 );
|
2019-08-25 23:45:10 +00:00
|
|
|
|
|
|
|
|
2013-05-26 04:36:44 +00:00
|
|
|
this->SetSizer( mainSizer );
|
|
|
|
this->Layout();
|
2020-05-03 12:24:08 +00:00
|
|
|
mainSizer->Fit( this );
|
2019-08-25 23:45:10 +00:00
|
|
|
|
2020-03-06 20:02:58 +00:00
|
|
|
// Connect Events
|
2020-10-06 13:17:45 +00:00
|
|
|
this->Connect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DIALOG_SHEET_PROPERTIES_BASE::OnInitDlg ) );
|
|
|
|
this->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_SHEET_PROPERTIES_BASE::OnUpdateUI ) );
|
|
|
|
m_grid->Connect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_SHEET_PROPERTIES_BASE::OnSizeGrid ), NULL, this );
|
|
|
|
m_bpAdd->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SHEET_PROPERTIES_BASE::OnAddField ), NULL, this );
|
|
|
|
m_bpMoveUp->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SHEET_PROPERTIES_BASE::OnMoveUp ), NULL, this );
|
|
|
|
m_bpMoveDown->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SHEET_PROPERTIES_BASE::OnMoveDown ), NULL, this );
|
|
|
|
m_bpDelete->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SHEET_PROPERTIES_BASE::OnDeleteField ), NULL, this );
|
2013-05-26 04:36:44 +00:00
|
|
|
}
|
|
|
|
|
2020-10-06 13:17:45 +00:00
|
|
|
DIALOG_SHEET_PROPERTIES_BASE::~DIALOG_SHEET_PROPERTIES_BASE()
|
2013-05-26 04:36:44 +00:00
|
|
|
{
|
2020-03-06 20:02:58 +00:00
|
|
|
// Disconnect Events
|
2020-10-06 13:17:45 +00:00
|
|
|
this->Disconnect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DIALOG_SHEET_PROPERTIES_BASE::OnInitDlg ) );
|
|
|
|
this->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_SHEET_PROPERTIES_BASE::OnUpdateUI ) );
|
|
|
|
m_grid->Disconnect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_SHEET_PROPERTIES_BASE::OnSizeGrid ), NULL, this );
|
|
|
|
m_bpAdd->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SHEET_PROPERTIES_BASE::OnAddField ), NULL, this );
|
|
|
|
m_bpMoveUp->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SHEET_PROPERTIES_BASE::OnMoveUp ), NULL, this );
|
|
|
|
m_bpMoveDown->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SHEET_PROPERTIES_BASE::OnMoveDown ), NULL, this );
|
|
|
|
m_bpDelete->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SHEET_PROPERTIES_BASE::OnDeleteField ), NULL, this );
|
2020-03-06 20:02:58 +00:00
|
|
|
|
2013-05-26 04:36:44 +00:00
|
|
|
}
|