You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

120 lines
5.8 KiB

  1. ///////////////////////////////////////////////////////////////////////////
  2. // C++ code generated with wxFormBuilder (version Nov 6 2013)
  3. // http://www.wxformbuilder.org/
  4. //
  5. // PLEASE DO "NOT" EDIT THIS FILE!
  6. ///////////////////////////////////////////////////////////////////////////
  7. #include "dialog_edit_label_base.h"
  8. ///////////////////////////////////////////////////////////////////////////
  9. DIALOG_LABEL_EDITOR_BASE::DIALOG_LABEL_EDITOR_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
  10. {
  11. this->SetSizeHints( wxDefaultSize, wxDefaultSize );
  12. wxBoxSizer* bMainSizer;
  13. bMainSizer = new wxBoxSizer( wxVERTICAL );
  14. m_textControlSizer = new wxFlexGridSizer( 2, 2, 3, 3 );
  15. m_textControlSizer->AddGrowableCol( 1 );
  16. m_textControlSizer->AddGrowableRow( 0 );
  17. m_textControlSizer->SetFlexibleDirection( wxBOTH );
  18. m_textControlSizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
  19. m_staticText1 = new wxStaticText( this, wxID_ANY, _("&Text:"), wxDefaultPosition, wxDefaultSize, 0 );
  20. m_staticText1->Wrap( -1 );
  21. m_staticText1->SetToolTip( _("Enter the text to be used within the schematic") );
  22. m_textControlSizer->Add( m_staticText1, 0, wxRIGHT, 3 );
  23. wxBoxSizer* bSizeText;
  24. bSizeText = new wxBoxSizer( wxVERTICAL );
  25. m_textLabelSingleLine = new wxTextCtrl( this, wxID_VALUESINGLE, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER );
  26. m_textLabelSingleLine->SetValidator( wxTextValidator( wxFILTER_EXCLUDE_CHAR_LIST, &m_labelText ) );
  27. bSizeText->Add( m_textLabelSingleLine, 0, wxEXPAND|wxLEFT, 3 );
  28. m_textLabelMultiLine = new wxTextCtrl( this, wxID_VALUEMULTI, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_PROCESS_ENTER );
  29. m_textLabelMultiLine->SetMinSize( wxSize( -1,60 ) );
  30. bSizeText->Add( m_textLabelMultiLine, 1, wxEXPAND|wxLEFT, 3 );
  31. m_textControlSizer->Add( bSizeText, 1, wxEXPAND, 3 );
  32. m_SizeTitle = new wxStaticText( this, wxID_ANY, _("&Size:"), wxDefaultPosition, wxDefaultSize, 0 );
  33. m_SizeTitle->Wrap( -1 );
  34. m_textControlSizer->Add( m_SizeTitle, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 3 );
  35. wxBoxSizer* bSizeCtrlSizer;
  36. bSizeCtrlSizer = new wxBoxSizer( wxHORIZONTAL );
  37. m_TextSize = new wxTextCtrl( this, wxID_SIZE, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
  38. bSizeCtrlSizer->Add( m_TextSize, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxLEFT|wxRIGHT, 3 );
  39. m_staticSizeUnits = new wxStaticText( this, wxID_ANY, _("units"), wxDefaultPosition, wxDefaultSize, 0 );
  40. m_staticSizeUnits->Wrap( -1 );
  41. bSizeCtrlSizer->Add( m_staticSizeUnits, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 3 );
  42. m_textControlSizer->Add( bSizeCtrlSizer, 1, wxEXPAND, 3 );
  43. bMainSizer->Add( m_textControlSizer, 1, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 12 );
  44. wxBoxSizer* m_OptionsSizer;
  45. m_OptionsSizer = new wxBoxSizer( wxHORIZONTAL );
  46. wxString m_TextOrientChoices[] = { _("Right"), _("Up"), _("Left"), _("Down") };
  47. int m_TextOrientNChoices = sizeof( m_TextOrientChoices ) / sizeof( wxString );
  48. m_TextOrient = new wxRadioBox( this, wxID_ANY, _("O&rientation"), wxDefaultPosition, wxDefaultSize, m_TextOrientNChoices, m_TextOrientChoices, 1, wxRA_SPECIFY_COLS );
  49. m_TextOrient->SetSelection( 0 );
  50. m_OptionsSizer->Add( m_TextOrient, 1, wxRIGHT|wxTOP, 3 );
  51. wxString m_TextStyleChoices[] = { _("Normal"), _("Italic"), _("Bold"), _("Bold Italic") };
  52. int m_TextStyleNChoices = sizeof( m_TextStyleChoices ) / sizeof( wxString );
  53. m_TextStyle = new wxRadioBox( this, wxID_ANY, _("St&yle"), wxDefaultPosition, wxDefaultSize, m_TextStyleNChoices, m_TextStyleChoices, 1, wxRA_SPECIFY_COLS );
  54. m_TextStyle->SetSelection( 0 );
  55. m_OptionsSizer->Add( m_TextStyle, 1, wxLEFT|wxRIGHT|wxTOP, 3 );
  56. wxString m_TextShapeChoices[] = { _("Input"), _("Output"), _("Bidirectional"), _("Tri-State"), _("Passive") };
  57. int m_TextShapeNChoices = sizeof( m_TextShapeChoices ) / sizeof( wxString );
  58. m_TextShape = new wxRadioBox( this, wxID_ANY, _("S&hape"), wxDefaultPosition, wxDefaultSize, m_TextShapeNChoices, m_TextShapeChoices, 1, wxRA_SPECIFY_COLS );
  59. m_TextShape->SetSelection( 0 );
  60. m_OptionsSizer->Add( m_TextShape, 1, wxALL|wxLEFT|wxTOP, 3 );
  61. bMainSizer->Add( m_OptionsSizer, 0, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 12 );
  62. m_sdbSizer1 = new wxStdDialogButtonSizer();
  63. m_sdbSizer1OK = new wxButton( this, wxID_OK );
  64. m_sdbSizer1->AddButton( m_sdbSizer1OK );
  65. m_sdbSizer1Cancel = new wxButton( this, wxID_CANCEL );
  66. m_sdbSizer1->AddButton( m_sdbSizer1Cancel );
  67. m_sdbSizer1->Realize();
  68. bMainSizer->Add( m_sdbSizer1, 0, wxALL|wxEXPAND, 12 );
  69. this->SetSizer( bMainSizer );
  70. this->Layout();
  71. bMainSizer->Fit( this );
  72. // Connect Events
  73. m_textLabelSingleLine->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_LABEL_EDITOR_BASE::OnEnterKey ), NULL, this );
  74. m_textLabelMultiLine->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_LABEL_EDITOR_BASE::OnEnterKey ), NULL, this );
  75. m_sdbSizer1Cancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LABEL_EDITOR_BASE::OnCancelClick ), NULL, this );
  76. m_sdbSizer1OK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LABEL_EDITOR_BASE::OnOkClick ), NULL, this );
  77. }
  78. DIALOG_LABEL_EDITOR_BASE::~DIALOG_LABEL_EDITOR_BASE()
  79. {
  80. // Disconnect Events
  81. m_textLabelSingleLine->Disconnect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_LABEL_EDITOR_BASE::OnEnterKey ), NULL, this );
  82. m_textLabelMultiLine->Disconnect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_LABEL_EDITOR_BASE::OnEnterKey ), NULL, this );
  83. m_sdbSizer1Cancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LABEL_EDITOR_BASE::OnCancelClick ), NULL, this );
  84. m_sdbSizer1OK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LABEL_EDITOR_BASE::OnOkClick ), NULL, this );
  85. }