2012-09-07 16:15:18 +00:00
|
|
|
///////////////////////////////////////////////////////////////////////////
|
2016-04-04 14:31:34 +00:00
|
|
|
// C++ code generated with wxFormBuilder (version Jun 5 2014)
|
2012-09-07 16:15:18 +00:00
|
|
|
// http://www.wxformbuilder.org/
|
|
|
|
//
|
|
|
|
// PLEASE DO "NOT" EDIT THIS FILE!
|
|
|
|
///////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#include "dialog_lib_edit_text_base.h"
|
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
DIALOG_LIB_EDIT_TEXT_BASE::DIALOG_LIB_EDIT_TEXT_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 );
|
|
|
|
|
|
|
|
wxBoxSizer* bMainSizer;
|
|
|
|
bMainSizer = new wxBoxSizer( wxVERTICAL );
|
|
|
|
|
|
|
|
wxBoxSizer* bPropertiesSizer;
|
|
|
|
bPropertiesSizer = new wxBoxSizer( wxVERTICAL );
|
|
|
|
|
|
|
|
wxBoxSizer* bUpperBoxSizer;
|
|
|
|
bUpperBoxSizer = new wxBoxSizer( wxHORIZONTAL );
|
|
|
|
|
|
|
|
wxBoxSizer* bTextValueBoxSizer;
|
|
|
|
bTextValueBoxSizer = new wxBoxSizer( wxVERTICAL );
|
|
|
|
|
2013-11-09 16:30:49 +00:00
|
|
|
m_staticText1 = new wxStaticText( this, wxID_ANY, _("Text"), wxDefaultPosition, wxDefaultSize, 0 );
|
2012-09-07 16:15:18 +00:00
|
|
|
m_staticText1->Wrap( -1 );
|
|
|
|
bTextValueBoxSizer->Add( m_staticText1, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
|
|
|
|
2014-10-14 20:39:25 +00:00
|
|
|
wxBoxSizer* bTextValueOptsSizer;
|
|
|
|
bTextValueOptsSizer = new wxBoxSizer( wxHORIZONTAL );
|
|
|
|
|
2012-09-07 16:15:18 +00:00
|
|
|
m_TextValue = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
2013-10-17 18:59:54 +00:00
|
|
|
m_TextValue->SetMaxLength( 0 );
|
2012-09-07 16:15:18 +00:00
|
|
|
m_TextValue->SetMinSize( wxSize( 200,-1 ) );
|
|
|
|
|
2016-04-04 14:31:34 +00:00
|
|
|
bTextValueOptsSizer->Add( m_TextValue, 1, wxALIGN_CENTER_HORIZONTAL|wxALL|wxEXPAND, 5 );
|
2014-10-14 20:39:25 +00:00
|
|
|
|
|
|
|
m_TextValueSelectButton = new wxButton( this, wxID_ANY, _("Select"), wxDefaultPosition, wxDefaultSize, 0 );
|
2016-04-04 14:31:34 +00:00
|
|
|
bTextValueOptsSizer->Add( m_TextValueSelectButton, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
2014-10-14 20:39:25 +00:00
|
|
|
|
|
|
|
|
|
|
|
bTextValueBoxSizer->Add( bTextValueOptsSizer, 1, wxEXPAND, 5 );
|
2012-09-07 16:15:18 +00:00
|
|
|
|
|
|
|
|
|
|
|
bUpperBoxSizer->Add( bTextValueBoxSizer, 1, wxEXPAND, 5 );
|
|
|
|
|
|
|
|
wxBoxSizer* bTextSizeSizer;
|
|
|
|
bTextSizeSizer = new wxBoxSizer( wxVERTICAL );
|
|
|
|
|
|
|
|
m_TextSizeText = new wxStaticText( this, wxID_ANY, _("Size"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
|
|
m_TextSizeText->Wrap( -1 );
|
|
|
|
bTextSizeSizer->Add( m_TextSizeText, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
|
|
|
|
|
|
|
m_TextSize = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
2013-10-17 18:59:54 +00:00
|
|
|
m_TextSize->SetMaxLength( 0 );
|
2016-04-04 14:31:34 +00:00
|
|
|
bTextSizeSizer->Add( m_TextSize, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxRIGHT|wxTOP, 5 );
|
2012-09-07 16:15:18 +00:00
|
|
|
|
|
|
|
|
2016-04-04 14:31:34 +00:00
|
|
|
bUpperBoxSizer->Add( bTextSizeSizer, 0, wxEXPAND, 5 );
|
2012-09-07 16:15:18 +00:00
|
|
|
|
|
|
|
|
|
|
|
bPropertiesSizer->Add( bUpperBoxSizer, 0, wxEXPAND, 5 );
|
|
|
|
|
2015-03-23 11:45:31 +00:00
|
|
|
m_PowerComponentValues = new wxStaticText( this, wxID_ANY, _("Power component value text cannot be modified!"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
|
|
m_PowerComponentValues->Wrap( -1 );
|
|
|
|
m_PowerComponentValues->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
|
|
|
|
|
|
|
|
bPropertiesSizer->Add( m_PowerComponentValues, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
|
|
|
|
2012-09-07 16:15:18 +00:00
|
|
|
wxBoxSizer* bBottomtBoxSizer;
|
|
|
|
bBottomtBoxSizer = new wxBoxSizer( wxHORIZONTAL );
|
|
|
|
|
|
|
|
wxStaticBoxSizer* sOptionsSizer;
|
2013-11-09 16:30:49 +00:00
|
|
|
sOptionsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Options") ), wxVERTICAL );
|
2012-09-07 16:15:18 +00:00
|
|
|
|
2016-04-04 14:31:34 +00:00
|
|
|
m_Orient = new wxCheckBox( this, wxID_ANY, _("Vertical"), wxDefaultPosition, wxDefaultSize, 0 );
|
2012-09-07 16:15:18 +00:00
|
|
|
sOptionsSizer->Add( m_Orient, 0, wxALL, 5 );
|
|
|
|
|
2016-04-04 14:31:34 +00:00
|
|
|
m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
|
2012-09-07 16:15:18 +00:00
|
|
|
sOptionsSizer->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 );
|
|
|
|
|
2016-04-04 14:31:34 +00:00
|
|
|
m_CommonUnit = new wxCheckBox( this, wxID_ANY, _("Common to all units"), wxDefaultPosition, wxDefaultSize, 0 );
|
2012-09-07 16:15:18 +00:00
|
|
|
sOptionsSizer->Add( m_CommonUnit, 0, wxALL, 5 );
|
|
|
|
|
2016-04-04 14:31:34 +00:00
|
|
|
m_CommonConvert = new wxCheckBox( this, wxID_ANY, _("Common to all body styles"), wxDefaultPosition, wxDefaultSize, 0 );
|
2012-09-07 16:15:18 +00:00
|
|
|
sOptionsSizer->Add( m_CommonConvert, 0, wxALL|wxEXPAND, 5 );
|
|
|
|
|
2016-04-04 14:31:34 +00:00
|
|
|
m_Invisible = new wxCheckBox( this, wxID_ANY, _("Invisible"), wxDefaultPosition, wxDefaultSize, 0 );
|
2012-09-07 16:15:18 +00:00
|
|
|
sOptionsSizer->Add( m_Invisible, 0, wxALL, 5 );
|
|
|
|
|
|
|
|
|
2014-06-04 17:34:23 +00:00
|
|
|
bBottomtBoxSizer->Add( sOptionsSizer, 0, wxALL|wxEXPAND, 5 );
|
2012-09-07 16:15:18 +00:00
|
|
|
|
|
|
|
wxString m_TextShapeOptChoices[] = { _("Normal"), _("Italic"), _("Bold"), _("Bold Italic") };
|
|
|
|
int m_TextShapeOptNChoices = sizeof( m_TextShapeOptChoices ) / sizeof( wxString );
|
2013-11-09 16:30:49 +00:00
|
|
|
m_TextShapeOpt = new wxRadioBox( this, wxID_ANY, _("Style"), wxDefaultPosition, wxDefaultSize, m_TextShapeOptNChoices, m_TextShapeOptChoices, 1, wxRA_SPECIFY_COLS );
|
2015-03-23 11:45:31 +00:00
|
|
|
m_TextShapeOpt->SetSelection( 0 );
|
2013-10-17 18:59:54 +00:00
|
|
|
bBottomtBoxSizer->Add( m_TextShapeOpt, 1, wxALL|wxEXPAND, 5 );
|
2012-09-07 16:15:18 +00:00
|
|
|
|
|
|
|
wxString m_TextHJustificationOptChoices[] = { _("Align left"), _("Align center"), _("Align right") };
|
|
|
|
int m_TextHJustificationOptNChoices = sizeof( m_TextHJustificationOptChoices ) / sizeof( wxString );
|
2013-11-09 16:30:49 +00:00
|
|
|
m_TextHJustificationOpt = new wxRadioBox( this, wxID_ANY, _("Horizontal Justify"), wxDefaultPosition, wxDefaultSize, m_TextHJustificationOptNChoices, m_TextHJustificationOptChoices, 1, wxRA_SPECIFY_COLS );
|
2012-09-07 16:15:18 +00:00
|
|
|
m_TextHJustificationOpt->SetSelection( 1 );
|
2013-10-17 18:59:54 +00:00
|
|
|
bBottomtBoxSizer->Add( m_TextHJustificationOpt, 1, wxALL|wxEXPAND, 5 );
|
2012-09-07 16:15:18 +00:00
|
|
|
|
|
|
|
wxString m_TextVJustificationOptChoices[] = { _("Align bottom"), _("Align center"), _("Align top") };
|
|
|
|
int m_TextVJustificationOptNChoices = sizeof( m_TextVJustificationOptChoices ) / sizeof( wxString );
|
2013-11-18 17:52:18 +00:00
|
|
|
m_TextVJustificationOpt = new wxRadioBox( this, wxID_ANY, _("Vertical Justify"), wxDefaultPosition, wxDefaultSize, m_TextVJustificationOptNChoices, m_TextVJustificationOptChoices, 1, wxRA_SPECIFY_COLS );
|
2012-09-07 16:15:18 +00:00
|
|
|
m_TextVJustificationOpt->SetSelection( 1 );
|
2013-10-17 18:59:54 +00:00
|
|
|
bBottomtBoxSizer->Add( m_TextVJustificationOpt, 1, wxALL|wxEXPAND, 5 );
|
2012-09-07 16:15:18 +00:00
|
|
|
|
|
|
|
|
2015-06-15 13:54:58 +00:00
|
|
|
bPropertiesSizer->Add( bBottomtBoxSizer, 1, wxEXPAND, 5 );
|
2012-09-07 16:15:18 +00:00
|
|
|
|
|
|
|
|
2016-04-04 14:31:34 +00:00
|
|
|
bMainSizer->Add( bPropertiesSizer, 1, wxEXPAND, 6 );
|
2012-09-07 16:15:18 +00:00
|
|
|
|
|
|
|
m_sdbSizerButtons = new wxStdDialogButtonSizer();
|
|
|
|
m_sdbSizerButtonsOK = new wxButton( this, wxID_OK );
|
|
|
|
m_sdbSizerButtons->AddButton( m_sdbSizerButtonsOK );
|
|
|
|
m_sdbSizerButtonsCancel = new wxButton( this, wxID_CANCEL );
|
|
|
|
m_sdbSizerButtons->AddButton( m_sdbSizerButtonsCancel );
|
|
|
|
m_sdbSizerButtons->Realize();
|
|
|
|
|
2016-04-04 14:31:34 +00:00
|
|
|
bMainSizer->Add( m_sdbSizerButtons, 0, wxBOTTOM|wxEXPAND|wxTOP, 5 );
|
2012-09-07 16:15:18 +00:00
|
|
|
|
|
|
|
|
|
|
|
this->SetSizer( bMainSizer );
|
|
|
|
this->Layout();
|
2016-04-04 14:31:34 +00:00
|
|
|
bMainSizer->Fit( this );
|
2012-09-07 16:15:18 +00:00
|
|
|
|
|
|
|
// Connect Events
|
2014-10-14 20:39:25 +00:00
|
|
|
this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_LIB_EDIT_TEXT_BASE::OnCloseDialog ) );
|
|
|
|
m_TextValueSelectButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LIB_EDIT_TEXT_BASE::OnTextValueSelectButtonClick ), NULL, this );
|
2012-09-07 16:15:18 +00:00
|
|
|
m_sdbSizerButtonsCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LIB_EDIT_TEXT_BASE::OnCancelClick ), NULL, this );
|
|
|
|
m_sdbSizerButtonsOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LIB_EDIT_TEXT_BASE::OnOkClick ), NULL, this );
|
|
|
|
}
|
|
|
|
|
|
|
|
DIALOG_LIB_EDIT_TEXT_BASE::~DIALOG_LIB_EDIT_TEXT_BASE()
|
|
|
|
{
|
|
|
|
// Disconnect Events
|
2014-10-14 20:39:25 +00:00
|
|
|
this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_LIB_EDIT_TEXT_BASE::OnCloseDialog ) );
|
|
|
|
m_TextValueSelectButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LIB_EDIT_TEXT_BASE::OnTextValueSelectButtonClick ), NULL, this );
|
2012-09-07 16:15:18 +00:00
|
|
|
m_sdbSizerButtonsCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LIB_EDIT_TEXT_BASE::OnCancelClick ), NULL, this );
|
|
|
|
m_sdbSizerButtonsOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LIB_EDIT_TEXT_BASE::OnOkClick ), NULL, this );
|
|
|
|
|
|
|
|
}
|