2021-10-12 20:05:37 +00:00
|
|
|
///////////////////////////////////////////////////////////////////////////
|
2023-10-24 21:12:49 +00:00
|
|
|
// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b3)
|
2021-10-12 20:05:37 +00:00
|
|
|
// http://www.wxformbuilder.org/
|
|
|
|
//
|
|
|
|
// PLEASE DO *NOT* EDIT THIS FILE!
|
|
|
|
///////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#include "widgets/bitmap_button.h"
|
2022-01-25 22:33:37 +00:00
|
|
|
#include "widgets/color_swatch.h"
|
2022-01-03 01:20:25 +00:00
|
|
|
#include "widgets/font_choice.h"
|
2022-08-28 22:25:01 +00:00
|
|
|
#include "widgets/wx_combobox.h"
|
2023-01-08 19:26:10 +00:00
|
|
|
#include "widgets/wx_infobar.h"
|
2021-10-12 20:05:37 +00:00
|
|
|
|
|
|
|
#include "dialog_text_properties_base.h"
|
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
DIALOG_TEXT_PROPERTIES_BASE::DIALOG_TEXT_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 )
|
|
|
|
{
|
|
|
|
this->SetSizeHints( wxDefaultSize, wxDefaultSize );
|
|
|
|
|
|
|
|
wxBoxSizer* bMainSizer;
|
|
|
|
bMainSizer = new wxBoxSizer( wxVERTICAL );
|
|
|
|
|
2022-03-29 19:41:03 +00:00
|
|
|
m_infoBar = new WX_INFOBAR( this );
|
|
|
|
m_infoBar->SetShowHideEffects( wxSHOW_EFFECT_NONE, wxSHOW_EFFECT_NONE );
|
|
|
|
m_infoBar->SetEffectDuration( 500 );
|
|
|
|
m_infoBar->Hide();
|
|
|
|
|
|
|
|
bMainSizer->Add( m_infoBar, 0, wxEXPAND|wxBOTTOM, 5 );
|
|
|
|
|
2023-02-13 16:58:35 +00:00
|
|
|
m_textEntrySizer = new wxGridBagSizer( 2, 3 );
|
2021-10-12 20:05:37 +00:00
|
|
|
m_textEntrySizer->SetFlexibleDirection( wxBOTH );
|
|
|
|
m_textEntrySizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
2023-09-07 16:09:53 +00:00
|
|
|
m_textEntrySizer->SetEmptyCellSize( wxSize( 0,12 ) );
|
2021-10-12 20:05:37 +00:00
|
|
|
|
|
|
|
m_textLabel = new wxStaticText( this, wxID_ANY, _("Text:"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
|
|
m_textLabel->Wrap( -1 );
|
2022-01-03 01:20:25 +00:00
|
|
|
m_textEntrySizer->Add( m_textLabel, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxRIGHT, 5 );
|
2021-10-12 20:05:37 +00:00
|
|
|
|
|
|
|
m_textCtrl = new wxStyledTextCtrl( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxBORDER_SUNKEN, wxEmptyString );
|
|
|
|
m_textCtrl->SetUseTabs( true );
|
|
|
|
m_textCtrl->SetTabWidth( 4 );
|
|
|
|
m_textCtrl->SetIndent( 4 );
|
|
|
|
m_textCtrl->SetTabIndents( false );
|
|
|
|
m_textCtrl->SetBackSpaceUnIndents( false );
|
|
|
|
m_textCtrl->SetViewEOL( false );
|
|
|
|
m_textCtrl->SetViewWhiteSpace( false );
|
|
|
|
m_textCtrl->SetMarginWidth( 2, 0 );
|
|
|
|
m_textCtrl->SetIndentationGuides( false );
|
2022-05-14 13:52:53 +00:00
|
|
|
m_textCtrl->SetReadOnly( false );
|
2021-10-12 20:05:37 +00:00
|
|
|
m_textCtrl->SetMarginWidth( 1, 0 );
|
|
|
|
m_textCtrl->SetMarginWidth( 0, 0 );
|
|
|
|
m_textCtrl->MarkerDefine( wxSTC_MARKNUM_FOLDER, wxSTC_MARK_BOXPLUS );
|
|
|
|
m_textCtrl->MarkerSetBackground( wxSTC_MARKNUM_FOLDER, wxColour( wxT("BLACK") ) );
|
|
|
|
m_textCtrl->MarkerSetForeground( wxSTC_MARKNUM_FOLDER, wxColour( wxT("WHITE") ) );
|
|
|
|
m_textCtrl->MarkerDefine( wxSTC_MARKNUM_FOLDEROPEN, wxSTC_MARK_BOXMINUS );
|
|
|
|
m_textCtrl->MarkerSetBackground( wxSTC_MARKNUM_FOLDEROPEN, wxColour( wxT("BLACK") ) );
|
|
|
|
m_textCtrl->MarkerSetForeground( wxSTC_MARKNUM_FOLDEROPEN, wxColour( wxT("WHITE") ) );
|
|
|
|
m_textCtrl->MarkerDefine( wxSTC_MARKNUM_FOLDERSUB, wxSTC_MARK_EMPTY );
|
|
|
|
m_textCtrl->MarkerDefine( wxSTC_MARKNUM_FOLDEREND, wxSTC_MARK_BOXPLUS );
|
|
|
|
m_textCtrl->MarkerSetBackground( wxSTC_MARKNUM_FOLDEREND, wxColour( wxT("BLACK") ) );
|
|
|
|
m_textCtrl->MarkerSetForeground( wxSTC_MARKNUM_FOLDEREND, wxColour( wxT("WHITE") ) );
|
|
|
|
m_textCtrl->MarkerDefine( wxSTC_MARKNUM_FOLDEROPENMID, wxSTC_MARK_BOXMINUS );
|
|
|
|
m_textCtrl->MarkerSetBackground( wxSTC_MARKNUM_FOLDEROPENMID, wxColour( wxT("BLACK") ) );
|
|
|
|
m_textCtrl->MarkerSetForeground( wxSTC_MARKNUM_FOLDEROPENMID, wxColour( wxT("WHITE") ) );
|
|
|
|
m_textCtrl->MarkerDefine( wxSTC_MARKNUM_FOLDERMIDTAIL, wxSTC_MARK_EMPTY );
|
|
|
|
m_textCtrl->MarkerDefine( wxSTC_MARKNUM_FOLDERTAIL, wxSTC_MARK_EMPTY );
|
|
|
|
m_textCtrl->SetSelBackground( true, wxSystemSettings::GetColour( wxSYS_COLOUR_HIGHLIGHT ) );
|
|
|
|
m_textCtrl->SetSelForeground( true, wxSystemSettings::GetColour( wxSYS_COLOUR_HIGHLIGHTTEXT ) );
|
|
|
|
m_textCtrl->SetMinSize( wxSize( 500,140 ) );
|
|
|
|
|
2022-01-31 19:11:21 +00:00
|
|
|
m_textEntrySizer->Add( m_textCtrl, wxGBPosition( 0, 1 ), wxGBSpan( 1, 5 ), wxEXPAND, 5 );
|
2021-10-12 20:05:37 +00:00
|
|
|
|
2022-05-14 13:52:53 +00:00
|
|
|
wxBoxSizer* bSizer41;
|
|
|
|
bSizer41 = new wxBoxSizer( wxVERTICAL );
|
|
|
|
|
|
|
|
m_syntaxHelp = new wxHyperlinkCtrl( this, wxID_ANY, _("Syntax help"), wxEmptyString, wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
|
|
|
|
m_syntaxHelp->SetToolTip( _("Show syntax help window") );
|
|
|
|
|
|
|
|
bSizer41->Add( m_syntaxHelp, 0, wxBOTTOM|wxRIGHT|wxLEFT, 6 );
|
|
|
|
|
|
|
|
|
2023-01-30 10:32:20 +00:00
|
|
|
m_textEntrySizer->Add( bSizer41, wxGBPosition( 1, 5 ), wxGBSpan( 1, 1 ), wxEXPAND|wxALIGN_RIGHT|wxLEFT, 5 );
|
2022-05-14 13:52:53 +00:00
|
|
|
|
2023-04-09 11:14:21 +00:00
|
|
|
m_excludeFromSim = new wxCheckBox( this, wxID_ANY, _("Exclude from simulation"), wxDefaultPosition, wxDefaultSize, 0 );
|
2023-09-07 16:09:53 +00:00
|
|
|
m_textEntrySizer->Add( m_excludeFromSim, wxGBPosition( 1, 0 ), wxGBSpan( 1, 2 ), wxTOP, 10 );
|
2023-04-09 11:14:21 +00:00
|
|
|
|
2022-01-03 01:20:25 +00:00
|
|
|
m_fontLabel = new wxStaticText( this, wxID_ANY, _("Font:"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
|
|
m_fontLabel->Wrap( -1 );
|
2023-09-07 16:09:53 +00:00
|
|
|
m_textEntrySizer->Add( m_fontLabel, wxGBPosition( 3, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
|
2022-01-03 01:20:25 +00:00
|
|
|
|
|
|
|
wxString m_fontCtrlChoices[] = { _("Default Font"), _("KiCad Font") };
|
|
|
|
int m_fontCtrlNChoices = sizeof( m_fontCtrlChoices ) / sizeof( wxString );
|
|
|
|
m_fontCtrl = new FONT_CHOICE( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_fontCtrlNChoices, m_fontCtrlChoices, 0 );
|
|
|
|
m_fontCtrl->SetSelection( 0 );
|
2023-09-07 16:09:53 +00:00
|
|
|
m_textEntrySizer->Add( m_fontCtrl, wxGBPosition( 3, 1 ), wxGBSpan( 1, 2 ), wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
|
2021-10-12 20:05:37 +00:00
|
|
|
|
|
|
|
wxBoxSizer* bSizeCtrlSizer;
|
|
|
|
bSizeCtrlSizer = new wxBoxSizer( wxHORIZONTAL );
|
|
|
|
|
|
|
|
m_separator1 = new BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 21,21 ), wxBU_AUTODRAW|wxBORDER_NONE );
|
|
|
|
m_separator1->Enable( false );
|
|
|
|
|
2022-01-31 19:11:21 +00:00
|
|
|
bSizeCtrlSizer->Add( m_separator1, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
|
2021-10-12 20:05:37 +00:00
|
|
|
|
|
|
|
m_bold = new BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 21,21 ), wxBU_AUTODRAW|wxBORDER_NONE );
|
|
|
|
m_bold->SetToolTip( _("Bold") );
|
|
|
|
|
2022-01-31 19:11:21 +00:00
|
|
|
bSizeCtrlSizer->Add( m_bold, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
2021-10-12 20:05:37 +00:00
|
|
|
|
|
|
|
m_italic = new BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 21,21 ), wxBU_AUTODRAW|wxBORDER_NONE );
|
|
|
|
m_italic->SetToolTip( _("Italic") );
|
|
|
|
|
2022-01-31 19:11:21 +00:00
|
|
|
bSizeCtrlSizer->Add( m_italic, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
2021-10-12 20:05:37 +00:00
|
|
|
|
|
|
|
m_separator2 = new BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 21,21 ), wxBU_AUTODRAW|wxBORDER_NONE );
|
|
|
|
m_separator2->Enable( false );
|
|
|
|
|
2022-01-31 19:11:21 +00:00
|
|
|
bSizeCtrlSizer->Add( m_separator2, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
2021-10-12 20:05:37 +00:00
|
|
|
|
2022-09-02 18:15:40 +00:00
|
|
|
m_hAlignLeft = new BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 21,21 ), wxBU_AUTODRAW|wxBORDER_NONE );
|
|
|
|
m_hAlignLeft->SetToolTip( _("Align left") );
|
2021-10-12 20:05:37 +00:00
|
|
|
|
2022-09-02 18:15:40 +00:00
|
|
|
bSizeCtrlSizer->Add( m_hAlignLeft, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
2021-10-12 20:05:37 +00:00
|
|
|
|
2022-09-02 18:15:40 +00:00
|
|
|
m_hAlignCenter = new BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 21,21 ), wxBU_AUTODRAW|wxBORDER_NONE );
|
|
|
|
m_hAlignCenter->SetToolTip( _("Align horizontal center") );
|
2021-10-12 20:05:37 +00:00
|
|
|
|
2022-09-02 18:15:40 +00:00
|
|
|
bSizeCtrlSizer->Add( m_hAlignCenter, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
2021-10-12 20:05:37 +00:00
|
|
|
|
2022-09-02 18:15:40 +00:00
|
|
|
m_hAlignRight = new BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 21,21 ), wxBU_AUTODRAW|wxBORDER_NONE );
|
|
|
|
m_hAlignRight->SetToolTip( _("Align right") );
|
2021-10-12 20:05:37 +00:00
|
|
|
|
2022-09-02 18:15:40 +00:00
|
|
|
bSizeCtrlSizer->Add( m_hAlignRight, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
2021-10-12 20:05:37 +00:00
|
|
|
|
2022-09-02 18:15:40 +00:00
|
|
|
m_separator3 = new BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 21,21 ), wxBU_AUTODRAW|wxBORDER_NONE );
|
|
|
|
m_separator3->Enable( false );
|
2021-10-12 20:05:37 +00:00
|
|
|
|
2022-09-02 18:15:40 +00:00
|
|
|
bSizeCtrlSizer->Add( m_separator3, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
2022-01-31 19:11:21 +00:00
|
|
|
|
2022-09-02 18:15:40 +00:00
|
|
|
m_vAlignTop = new BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 21,21 ), wxBU_AUTODRAW|wxBORDER_NONE );
|
2022-12-12 19:41:26 +00:00
|
|
|
m_vAlignTop->SetToolTip( _("Align top") );
|
2022-01-31 19:11:21 +00:00
|
|
|
|
2022-09-02 18:15:40 +00:00
|
|
|
bSizeCtrlSizer->Add( m_vAlignTop, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
2022-01-31 19:11:21 +00:00
|
|
|
|
2022-09-02 18:15:40 +00:00
|
|
|
m_vAlignCenter = new BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 21,21 ), wxBU_AUTODRAW|wxBORDER_NONE );
|
2022-12-12 19:41:26 +00:00
|
|
|
m_vAlignCenter->SetToolTip( _("Align vertical center") );
|
2022-01-31 19:11:21 +00:00
|
|
|
|
2022-09-02 18:15:40 +00:00
|
|
|
bSizeCtrlSizer->Add( m_vAlignCenter, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
2021-10-12 20:05:37 +00:00
|
|
|
|
2022-09-02 18:15:40 +00:00
|
|
|
m_vAlignBottom = new BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 21,21 ), wxBU_AUTODRAW|wxBORDER_NONE );
|
2022-12-12 19:41:26 +00:00
|
|
|
m_vAlignBottom->SetToolTip( _("Align bottom") );
|
2021-10-12 20:05:37 +00:00
|
|
|
|
2022-09-02 18:15:40 +00:00
|
|
|
bSizeCtrlSizer->Add( m_vAlignBottom, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
|
|
|
|
|
|
|
m_separator4 = new BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 21,21 ), wxBU_AUTODRAW|wxBORDER_NONE );
|
|
|
|
m_separator4->Enable( false );
|
|
|
|
|
|
|
|
bSizeCtrlSizer->Add( m_separator4, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
|
|
|
|
|
|
|
m_horizontal = new BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 21,21 ), wxBU_AUTODRAW|wxBORDER_NONE );
|
2022-12-12 19:41:26 +00:00
|
|
|
m_horizontal->SetToolTip( _("Horizontal text") );
|
2022-09-02 18:15:40 +00:00
|
|
|
|
|
|
|
bSizeCtrlSizer->Add( m_horizontal, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
|
|
|
|
|
|
|
m_vertical = new BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 21,21 ), wxBU_AUTODRAW|wxBORDER_NONE );
|
2022-12-12 19:41:26 +00:00
|
|
|
m_vertical->SetToolTip( _("Vertical text") );
|
2022-09-02 18:15:40 +00:00
|
|
|
|
|
|
|
bSizeCtrlSizer->Add( m_vertical, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
|
|
|
|
|
|
|
m_separator5 = new BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 21,21 ), wxBU_AUTODRAW|wxBORDER_NONE );
|
|
|
|
m_separator5->Enable( false );
|
|
|
|
|
|
|
|
bSizeCtrlSizer->Add( m_separator5, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
2021-10-12 20:05:37 +00:00
|
|
|
|
|
|
|
|
2023-09-07 16:09:53 +00:00
|
|
|
m_textEntrySizer->Add( bSizeCtrlSizer, wxGBPosition( 3, 3 ), wxGBSpan( 1, 2 ), wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
|
2022-01-03 01:20:25 +00:00
|
|
|
|
|
|
|
m_textSizeLabel = new wxStaticText( this, wxID_ANY, _("Text size:"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
|
|
m_textSizeLabel->Wrap( -1 );
|
2023-09-07 16:09:53 +00:00
|
|
|
m_textEntrySizer->Add( m_textSizeLabel, wxGBPosition( 4, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
|
2022-01-03 01:20:25 +00:00
|
|
|
|
2022-03-31 18:43:08 +00:00
|
|
|
wxBoxSizer* bSizer71;
|
|
|
|
bSizer71 = new wxBoxSizer( wxHORIZONTAL );
|
|
|
|
|
|
|
|
m_textSizeCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), 0 );
|
2022-05-14 13:52:53 +00:00
|
|
|
bSizer71->Add( m_textSizeCtrl, 0, wxEXPAND, 5 );
|
2022-01-03 01:20:25 +00:00
|
|
|
|
|
|
|
m_textSizeUnits = new wxStaticText( this, wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
|
|
m_textSizeUnits->Wrap( -1 );
|
2022-03-31 18:43:08 +00:00
|
|
|
bSizer71->Add( m_textSizeUnits, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 3 );
|
|
|
|
|
|
|
|
m_textColorLabel = new wxStaticText( this, wxID_ANY, _("Color:"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
|
|
m_textColorLabel->Wrap( -1 );
|
|
|
|
bSizer71->Add( m_textColorLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 15 );
|
|
|
|
|
|
|
|
|
|
|
|
bSizer71->Add( 5, 0, 0, 0, 5 );
|
|
|
|
|
|
|
|
m_panelBorderColor1 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxBORDER_SIMPLE|wxTAB_TRAVERSAL );
|
|
|
|
wxBoxSizer* bSizer22;
|
|
|
|
bSizer22 = new wxBoxSizer( wxVERTICAL );
|
|
|
|
|
|
|
|
m_textColorSwatch = new COLOR_SWATCH( m_panelBorderColor1, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
|
|
|
|
bSizer22->Add( m_textColorSwatch, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
|
|
|
|
|
|
|
|
|
|
|
|
m_panelBorderColor1->SetSizer( bSizer22 );
|
|
|
|
m_panelBorderColor1->Layout();
|
|
|
|
bSizer22->Fit( m_panelBorderColor1 );
|
|
|
|
bSizer71->Add( m_panelBorderColor1, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
|
|
|
|
|
|
|
|
2023-09-07 16:09:53 +00:00
|
|
|
m_textEntrySizer->Add( bSizer71, wxGBPosition( 4, 1 ), wxGBSpan( 1, 1 ), wxEXPAND, 5 );
|
2021-10-12 20:05:37 +00:00
|
|
|
|
2022-01-31 19:11:21 +00:00
|
|
|
m_borderCheckbox = new wxCheckBox( this, wxID_ANY, _("Border"), wxDefaultPosition, wxDefaultSize, 0 );
|
2023-09-07 16:09:53 +00:00
|
|
|
m_textEntrySizer->Add( m_borderCheckbox, wxGBPosition( 6, 0 ), wxGBSpan( 1, 2 ), wxBOTTOM, 2 );
|
2022-01-31 19:11:21 +00:00
|
|
|
|
|
|
|
m_borderWidthLabel = new wxStaticText( this, wxID_ANY, _("Width:"), wxDefaultPosition, wxDefaultSize, 0 );
|
2022-01-25 22:33:37 +00:00
|
|
|
m_borderWidthLabel->Wrap( -1 );
|
2023-09-07 16:09:53 +00:00
|
|
|
m_textEntrySizer->Add( m_borderWidthLabel, wxGBPosition( 7, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
|
2022-01-31 19:11:21 +00:00
|
|
|
|
|
|
|
wxBoxSizer* bSizer7;
|
|
|
|
bSizer7 = new wxBoxSizer( wxHORIZONTAL );
|
2021-10-12 20:05:37 +00:00
|
|
|
|
2022-01-25 22:33:37 +00:00
|
|
|
m_borderWidthCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), 0 );
|
2022-05-14 13:52:53 +00:00
|
|
|
bSizer7->Add( m_borderWidthCtrl, 0, wxEXPAND, 5 );
|
2022-01-25 22:33:37 +00:00
|
|
|
|
|
|
|
m_borderWidthUnits = new wxStaticText( this, wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
|
|
m_borderWidthUnits->Wrap( -1 );
|
2022-02-01 15:30:15 +00:00
|
|
|
bSizer7->Add( m_borderWidthUnits, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 3 );
|
2022-01-25 22:33:37 +00:00
|
|
|
|
2022-01-31 19:11:21 +00:00
|
|
|
m_borderColorLabel = new wxStaticText( this, wxID_ANY, _("Color:"), wxDefaultPosition, wxDefaultSize, 0 );
|
2022-01-25 22:33:37 +00:00
|
|
|
m_borderColorLabel->Wrap( -1 );
|
2022-01-31 19:11:21 +00:00
|
|
|
bSizer7->Add( m_borderColorLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 15 );
|
|
|
|
|
|
|
|
|
|
|
|
bSizer7->Add( 5, 0, 0, 0, 5 );
|
2022-01-25 22:33:37 +00:00
|
|
|
|
|
|
|
m_panelBorderColor = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxBORDER_SIMPLE|wxTAB_TRAVERSAL );
|
|
|
|
wxBoxSizer* bSizer2;
|
|
|
|
bSizer2 = new wxBoxSizer( wxVERTICAL );
|
|
|
|
|
|
|
|
m_borderColorSwatch = new COLOR_SWATCH( m_panelBorderColor, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
|
|
|
|
bSizer2->Add( m_borderColorSwatch, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
|
|
|
|
|
|
|
|
|
|
|
|
m_panelBorderColor->SetSizer( bSizer2 );
|
|
|
|
m_panelBorderColor->Layout();
|
|
|
|
bSizer2->Fit( m_panelBorderColor );
|
2022-01-31 19:11:21 +00:00
|
|
|
bSizer7->Add( m_panelBorderColor, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
|
|
|
|
|
|
|
|
2023-09-07 16:09:53 +00:00
|
|
|
m_textEntrySizer->Add( bSizer7, wxGBPosition( 7, 1 ), wxGBSpan( 1, 2 ), wxEXPAND, 5 );
|
2022-01-25 22:33:37 +00:00
|
|
|
|
2022-01-31 19:11:21 +00:00
|
|
|
m_borderStyleLabel = new wxStaticText( this, wxID_ANY, _("Style:"), wxDefaultPosition, wxDefaultSize, 0 );
|
2022-01-25 22:33:37 +00:00
|
|
|
m_borderStyleLabel->Wrap( -1 );
|
2023-09-07 16:09:53 +00:00
|
|
|
m_textEntrySizer->Add( m_borderStyleLabel, wxGBPosition( 8, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
|
2022-01-25 22:33:37 +00:00
|
|
|
|
2022-08-28 11:04:23 +00:00
|
|
|
m_borderStyleCombo = new wxBitmapComboBox( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, wxCB_READONLY );
|
2022-01-25 22:33:37 +00:00
|
|
|
m_borderStyleCombo->SetMinSize( wxSize( 240,-1 ) );
|
|
|
|
|
2023-09-07 16:09:53 +00:00
|
|
|
m_textEntrySizer->Add( m_borderStyleCombo, wxGBPosition( 8, 1 ), wxGBSpan( 1, 2 ), wxEXPAND, 5 );
|
2022-01-25 22:33:37 +00:00
|
|
|
|
|
|
|
m_filledCtrl = new wxCheckBox( this, wxID_ANY, _("Background fill"), wxDefaultPosition, wxDefaultSize, 0 );
|
2023-09-07 16:09:53 +00:00
|
|
|
m_textEntrySizer->Add( m_filledCtrl, wxGBPosition( 6, 4 ), wxGBSpan( 1, 2 ), wxRIGHT, 80 );
|
2022-01-31 19:11:21 +00:00
|
|
|
|
|
|
|
wxBoxSizer* bSizer8;
|
|
|
|
bSizer8 = new wxBoxSizer( wxHORIZONTAL );
|
2022-01-25 22:33:37 +00:00
|
|
|
|
|
|
|
m_fillColorLabel = new wxStaticText( this, wxID_ANY, _("Fill color:"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
|
|
m_fillColorLabel->Wrap( -1 );
|
2022-01-31 19:11:21 +00:00
|
|
|
bSizer8->Add( m_fillColorLabel, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 );
|
2022-01-25 22:33:37 +00:00
|
|
|
|
|
|
|
m_panelFillColor = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxBORDER_SIMPLE|wxTAB_TRAVERSAL );
|
|
|
|
wxBoxSizer* bSizer21;
|
|
|
|
bSizer21 = new wxBoxSizer( wxVERTICAL );
|
|
|
|
|
|
|
|
m_fillColorSwatch = new COLOR_SWATCH( m_panelFillColor, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
|
|
|
|
bSizer21->Add( m_fillColorSwatch, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL, 5 );
|
|
|
|
|
|
|
|
|
|
|
|
m_panelFillColor->SetSizer( bSizer21 );
|
|
|
|
m_panelFillColor->Layout();
|
|
|
|
bSizer21->Fit( m_panelFillColor );
|
2022-01-31 19:11:21 +00:00
|
|
|
bSizer8->Add( m_panelFillColor, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
|
|
|
|
|
|
|
|
2023-09-07 16:09:53 +00:00
|
|
|
m_textEntrySizer->Add( bSizer8, wxGBPosition( 7, 4 ), wxGBSpan( 1, 2 ), wxEXPAND, 5 );
|
2022-08-27 18:14:57 +00:00
|
|
|
|
|
|
|
m_hyperlinkCb = new wxCheckBox( this, wxID_ANY, _("Link:"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
|
|
m_hyperlinkCb->SetValue(true);
|
|
|
|
m_hyperlinkCb->SetToolTip( _("Make this text item a clickable hyperlink") );
|
|
|
|
|
2023-09-07 16:09:53 +00:00
|
|
|
m_textEntrySizer->Add( m_hyperlinkCb, wxGBPosition( 10, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM, 5 );
|
2022-08-27 18:14:57 +00:00
|
|
|
|
2022-08-28 11:04:23 +00:00
|
|
|
wxBoxSizer* bSizer11;
|
|
|
|
bSizer11 = new wxBoxSizer( wxHORIZONTAL );
|
|
|
|
|
2022-08-28 22:25:01 +00:00
|
|
|
m_hyperlinkCombo = new WX_COMBOBOX( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
|
2023-10-24 21:12:49 +00:00
|
|
|
bSizer11->Add( m_hyperlinkCombo, 1, wxALIGN_CENTER_VERTICAL|wxFIXED_MINSIZE, 5 );
|
2022-08-28 11:04:23 +00:00
|
|
|
|
|
|
|
|
2023-10-24 17:28:40 +00:00
|
|
|
m_textEntrySizer->Add( bSizer11, wxGBPosition( 10, 1 ), wxGBSpan( 1, 5 ), wxEXPAND|wxBOTTOM|wxALIGN_CENTER_VERTICAL, 5 );
|
2022-01-25 22:33:37 +00:00
|
|
|
|
|
|
|
|
2022-01-31 19:11:21 +00:00
|
|
|
m_textEntrySizer->AddGrowableCol( 3 );
|
2022-01-11 15:49:08 +00:00
|
|
|
|
2022-08-27 18:14:57 +00:00
|
|
|
bMainSizer->Add( m_textEntrySizer, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 10 );
|
2021-10-12 20:05:37 +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();
|
|
|
|
|
2023-01-08 19:26:10 +00:00
|
|
|
bMainSizer->Add( m_sdbSizer1, 0, wxALL|wxEXPAND, 5 );
|
2021-10-12 20:05:37 +00:00
|
|
|
|
|
|
|
|
|
|
|
this->SetSizer( bMainSizer );
|
|
|
|
this->Layout();
|
2023-10-24 21:12:49 +00:00
|
|
|
bMainSizer->Fit( this );
|
2021-10-12 20:05:37 +00:00
|
|
|
|
|
|
|
// Connect Events
|
|
|
|
m_textCtrl->Connect( wxEVT_KILL_FOCUS, wxFocusEventHandler( DIALOG_TEXT_PROPERTIES_BASE::onMultiLineTCLostFocus ), NULL, this );
|
|
|
|
m_syntaxHelp->Connect( wxEVT_COMMAND_HYPERLINK, wxHyperlinkEventHandler( DIALOG_TEXT_PROPERTIES_BASE::OnFormattingHelp ), NULL, this );
|
2022-01-31 19:11:21 +00:00
|
|
|
m_borderCheckbox->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_TEXT_PROPERTIES_BASE::onBorderChecked ), NULL, this );
|
|
|
|
m_filledCtrl->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_TEXT_PROPERTIES_BASE::onFillChecked ), NULL, this );
|
2022-08-27 18:14:57 +00:00
|
|
|
m_hyperlinkCb->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_TEXT_PROPERTIES_BASE::onHyperlinkChecked ), NULL, this );
|
2022-08-28 11:04:23 +00:00
|
|
|
m_hyperlinkCombo->Connect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( DIALOG_TEXT_PROPERTIES_BASE::onHyperlinkCombo ), NULL, this );
|
|
|
|
m_hyperlinkCombo->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_TEXT_PROPERTIES_BASE::onHyperlinkText ), NULL, this );
|
2021-10-12 20:05:37 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
DIALOG_TEXT_PROPERTIES_BASE::~DIALOG_TEXT_PROPERTIES_BASE()
|
|
|
|
{
|
|
|
|
// Disconnect Events
|
|
|
|
m_textCtrl->Disconnect( wxEVT_KILL_FOCUS, wxFocusEventHandler( DIALOG_TEXT_PROPERTIES_BASE::onMultiLineTCLostFocus ), NULL, this );
|
|
|
|
m_syntaxHelp->Disconnect( wxEVT_COMMAND_HYPERLINK, wxHyperlinkEventHandler( DIALOG_TEXT_PROPERTIES_BASE::OnFormattingHelp ), NULL, this );
|
2022-01-31 19:11:21 +00:00
|
|
|
m_borderCheckbox->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_TEXT_PROPERTIES_BASE::onBorderChecked ), NULL, this );
|
|
|
|
m_filledCtrl->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_TEXT_PROPERTIES_BASE::onFillChecked ), NULL, this );
|
2022-08-27 18:14:57 +00:00
|
|
|
m_hyperlinkCb->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_TEXT_PROPERTIES_BASE::onHyperlinkChecked ), NULL, this );
|
2022-08-28 11:04:23 +00:00
|
|
|
m_hyperlinkCombo->Disconnect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( DIALOG_TEXT_PROPERTIES_BASE::onHyperlinkCombo ), NULL, this );
|
|
|
|
m_hyperlinkCombo->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_TEXT_PROPERTIES_BASE::onHyperlinkText ), NULL, this );
|
2021-10-12 20:05:37 +00:00
|
|
|
|
|
|
|
}
|