2008-12-19 20:40:08 +00:00
|
|
|
///////////////////////////////////////////////////////////////////////////
|
2009-04-26 17:00:59 +00:00
|
|
|
// C++ code generated with wxFormBuilder (version Apr 16 2008)
|
2008-12-19 20:40:08 +00:00
|
|
|
// http://www.wxformbuilder.org/
|
|
|
|
//
|
|
|
|
// PLEASE DO "NOT" EDIT THIS FILE!
|
|
|
|
///////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#include "dialog_edit_label_base.h"
|
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2009-05-13 10:26:11 +00:00
|
|
|
DialogLabelEditor_Base::DialogLabelEditor_Base( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
|
2008-12-19 20:40:08 +00:00
|
|
|
{
|
|
|
|
this->SetSizeHints( wxDefaultSize, wxDefaultSize );
|
|
|
|
|
|
|
|
wxBoxSizer* bMainSizer;
|
2009-05-13 10:26:11 +00:00
|
|
|
bMainSizer = new wxBoxSizer( wxVERTICAL );
|
2009-05-05 17:32:07 +00:00
|
|
|
|
2010-03-16 18:22:59 +00:00
|
|
|
m_textControlSizer = new wxFlexGridSizer( 2, 2, 3, 3 );
|
2010-03-30 10:10:33 +00:00
|
|
|
m_textControlSizer->AddGrowableCol( 1 );
|
|
|
|
m_textControlSizer->AddGrowableRow( 0 );
|
2010-03-16 18:22:59 +00:00
|
|
|
m_textControlSizer->SetFlexibleDirection( wxBOTH );
|
|
|
|
m_textControlSizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
|
|
|
|
|
|
|
m_staticText1 = new wxStaticText( this, wxID_ANY, _("&Text:"), wxDefaultPosition, wxDefaultSize, 0 );
|
2009-05-05 17:32:07 +00:00
|
|
|
m_staticText1->Wrap( -1 );
|
2010-03-16 18:22:59 +00:00
|
|
|
m_textControlSizer->Add( m_staticText1, 0, wxRIGHT, 3 );
|
|
|
|
|
2010-03-30 10:10:33 +00:00
|
|
|
wxBoxSizer* bSizeText;
|
|
|
|
bSizeText = new wxBoxSizer( wxVERTICAL );
|
2010-03-16 18:22:59 +00:00
|
|
|
|
2010-03-30 10:10:33 +00:00
|
|
|
m_textLabelSingleLine = new wxTextCtrl( this, wxID_VALUESINGLE, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER );
|
|
|
|
m_textLabelSingleLine->SetToolTip( _("Enter the text to be used within the schematic") );
|
|
|
|
|
|
|
|
bSizeText->Add( m_textLabelSingleLine, 0, wxEXPAND|wxLEFT, 3 );
|
|
|
|
|
|
|
|
m_textLabelMultiLine = new wxTextCtrl( this, wxID_VALUEMULTI, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_PROCESS_ENTER );
|
|
|
|
m_textLabelMultiLine->SetToolTip( _("Enter the text to be used within the schematic") );
|
2010-03-30 17:52:34 +00:00
|
|
|
m_textLabelMultiLine->SetMinSize( wxSize( -1,60 ) );
|
2010-03-30 10:10:33 +00:00
|
|
|
|
2010-03-30 17:52:34 +00:00
|
|
|
bSizeText->Add( m_textLabelMultiLine, 1, wxEXPAND|wxLEFT, 3 );
|
2010-03-30 10:10:33 +00:00
|
|
|
|
2010-03-30 17:52:34 +00:00
|
|
|
m_textControlSizer->Add( bSizeText, 1, wxEXPAND, 3 );
|
2010-03-16 18:22:59 +00:00
|
|
|
|
|
|
|
m_SizeTitle = new wxStaticText( this, wxID_ANY, _("&Size:"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
|
|
m_SizeTitle->Wrap( -1 );
|
|
|
|
m_textControlSizer->Add( m_SizeTitle, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 3 );
|
|
|
|
|
|
|
|
wxBoxSizer* bSizeCtrlSizer;
|
|
|
|
bSizeCtrlSizer = new wxBoxSizer( wxHORIZONTAL );
|
2009-05-13 10:26:11 +00:00
|
|
|
|
2010-03-16 18:22:59 +00:00
|
|
|
m_TextSize = new wxTextCtrl( this, wxID_SIZE, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
|
|
|
bSizeCtrlSizer->Add( m_TextSize, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxLEFT|wxRIGHT, 3 );
|
2009-05-13 10:26:11 +00:00
|
|
|
|
2010-03-16 18:22:59 +00:00
|
|
|
m_staticSizeUnits = new wxStaticText( this, wxID_ANY, _("units"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
|
|
m_staticSizeUnits->Wrap( -1 );
|
|
|
|
bSizeCtrlSizer->Add( m_staticSizeUnits, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 3 );
|
2009-05-05 17:32:07 +00:00
|
|
|
|
2010-03-16 18:22:59 +00:00
|
|
|
m_textControlSizer->Add( bSizeCtrlSizer, 1, wxEXPAND, 3 );
|
2009-02-09 20:27:16 +00:00
|
|
|
|
2010-03-16 18:22:59 +00:00
|
|
|
bMainSizer->Add( m_textControlSizer, 1, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 12 );
|
2008-12-19 20:40:08 +00:00
|
|
|
|
|
|
|
wxBoxSizer* m_OptionsSizer;
|
|
|
|
m_OptionsSizer = new wxBoxSizer( wxHORIZONTAL );
|
|
|
|
|
|
|
|
wxString m_TextOrientChoices[] = { _("Right"), _("Up"), _("Left"), _("Down") };
|
|
|
|
int m_TextOrientNChoices = sizeof( m_TextOrientChoices ) / sizeof( wxString );
|
2010-03-16 18:22:59 +00:00
|
|
|
m_TextOrient = new wxRadioBox( this, wxID_ANY, _("O&rietation"), wxDefaultPosition, wxDefaultSize, m_TextOrientNChoices, m_TextOrientChoices, 1, wxRA_SPECIFY_COLS );
|
2008-12-19 20:40:08 +00:00
|
|
|
m_TextOrient->SetSelection( 0 );
|
2010-03-16 18:22:59 +00:00
|
|
|
m_OptionsSizer->Add( m_TextOrient, 1, wxRIGHT|wxTOP, 3 );
|
2008-12-19 20:40:08 +00:00
|
|
|
|
|
|
|
wxString m_TextStyleChoices[] = { _("Normal"), _("Italic"), _("Bold"), _("Bold Italic") };
|
|
|
|
int m_TextStyleNChoices = sizeof( m_TextStyleChoices ) / sizeof( wxString );
|
2010-03-16 18:22:59 +00:00
|
|
|
m_TextStyle = new wxRadioBox( this, wxID_ANY, _("St&yle"), wxDefaultPosition, wxDefaultSize, m_TextStyleNChoices, m_TextStyleChoices, 1, wxRA_SPECIFY_COLS );
|
2008-12-19 20:40:08 +00:00
|
|
|
m_TextStyle->SetSelection( 0 );
|
2010-03-16 18:22:59 +00:00
|
|
|
m_OptionsSizer->Add( m_TextStyle, 1, wxLEFT|wxRIGHT|wxTOP, 3 );
|
2008-12-19 20:40:08 +00:00
|
|
|
|
2010-03-16 18:22:59 +00:00
|
|
|
wxString m_TextShapeChoices[] = { _("Input"), _("Output"), _("Bidirectional"), _("Tri-State"), _("Passive") };
|
2008-12-19 20:40:08 +00:00
|
|
|
int m_TextShapeNChoices = sizeof( m_TextShapeChoices ) / sizeof( wxString );
|
2010-03-16 18:22:59 +00:00
|
|
|
m_TextShape = new wxRadioBox( this, wxID_ANY, _("S&hape"), wxDefaultPosition, wxDefaultSize, m_TextShapeNChoices, m_TextShapeChoices, 1, wxRA_SPECIFY_COLS );
|
|
|
|
m_TextShape->SetSelection( 2 );
|
|
|
|
m_OptionsSizer->Add( m_TextShape, 1, wxALL|wxLEFT|wxTOP, 3 );
|
2008-12-19 20:40:08 +00:00
|
|
|
|
2010-03-16 18:22:59 +00:00
|
|
|
bMainSizer->Add( m_OptionsSizer, 0, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 12 );
|
2009-05-13 10:26:11 +00:00
|
|
|
|
2010-03-16 18:22:59 +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();
|
|
|
|
bMainSizer->Add( m_sdbSizer1, 0, wxALL|wxEXPAND, 12 );
|
2008-12-19 20:40:08 +00:00
|
|
|
|
|
|
|
this->SetSizer( bMainSizer );
|
|
|
|
this->Layout();
|
|
|
|
|
|
|
|
// Connect Events
|
2010-03-30 10:10:33 +00:00
|
|
|
m_textLabelSingleLine->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DialogLabelEditor_Base::OnEnterKey ), NULL, this );
|
|
|
|
m_textLabelMultiLine->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DialogLabelEditor_Base::OnEnterKey ), NULL, this );
|
2010-03-16 18:22:59 +00:00
|
|
|
m_sdbSizer1Cancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogLabelEditor_Base::OnCancelClick ), NULL, this );
|
|
|
|
m_sdbSizer1OK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogLabelEditor_Base::OnOkClick ), NULL, this );
|
2008-12-19 20:40:08 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
DialogLabelEditor_Base::~DialogLabelEditor_Base()
|
|
|
|
{
|
|
|
|
// Disconnect Events
|
2010-03-30 10:10:33 +00:00
|
|
|
m_textLabelSingleLine->Disconnect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DialogLabelEditor_Base::OnEnterKey ), NULL, this );
|
|
|
|
m_textLabelMultiLine->Disconnect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DialogLabelEditor_Base::OnEnterKey ), NULL, this );
|
2010-03-16 18:22:59 +00:00
|
|
|
m_sdbSizer1Cancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogLabelEditor_Base::OnCancelClick ), NULL, this );
|
|
|
|
m_sdbSizer1OK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogLabelEditor_Base::OnOkClick ), NULL, this );
|
2008-12-19 20:40:08 +00:00
|
|
|
}
|