diff --git a/eeschema/dialogs/dialog_tablecell_properties.cpp b/eeschema/dialogs/dialog_tablecell_properties.cpp index c6b7c9f1de..c9b104eb73 100644 --- a/eeschema/dialogs/dialog_tablecell_properties.cpp +++ b/eeschema/dialogs/dialog_tablecell_properties.cpp @@ -33,22 +33,50 @@ #include #include - -DIALOG_TABLECELL_PROPERTIES::DIALOG_TABLECELL_PROPERTIES( SCH_EDIT_FRAME* aFrame, +DIALOG_TABLECELL_PROPERTIES::DIALOG_TABLECELL_PROPERTIES( SCH_EDIT_FRAME* aFrame, std::vector aCells ) : - DIALOG_TABLECELL_PROPERTIES_BASE( aFrame ), - m_frame( aFrame ), - m_table( nullptr ), + DIALOG_TABLECELL_PROPERTIES_BASE( aFrame ), m_frame( aFrame ), m_table( nullptr ), m_cells( std::move( aCells ) ), m_textSize( aFrame, m_textSizeLabel, m_textSizeCtrl, m_textSizeUnits ), m_marginLeft( aFrame, nullptr, m_marginLeftCtrl, nullptr ), m_marginTop( aFrame, nullptr, m_marginTopCtrl, m_marginTopUnits ), m_marginRight( aFrame, nullptr, m_marginRightCtrl, nullptr ), m_marginBottom( aFrame, nullptr, m_marginBottomCtrl, nullptr ), + m_scintillaTricks( nullptr ), m_cellText( m_cellTextCtrl ), m_returnValue( TABLECELL_PROPS_CANCEL ) { wxASSERT( m_cells.size() > 0 && m_cells[0] ); + m_cellText->SetEOLMode( wxSTC_EOL_LF ); + +#ifdef _WIN32 + // Without this setting, on Windows, some esoteric unicode chars create display issue + // in a wxStyledTextCtrl. + // for SetTechnology() info, see https://www.scintilla.org/ScintillaDoc.html#SCI_SETTECHNOLOGY + m_cellText->SetTechnology( wxSTC_TECHNOLOGY_DIRECTWRITE ); +#endif + + m_scintillaTricks = new SCINTILLA_TRICKS( + m_cellText, wxT( "{}" ), false, + // onAcceptFn + [this]( wxKeyEvent& aEvent ) + { + wxPostEvent( this, wxCommandEvent( wxEVT_COMMAND_BUTTON_CLICKED, wxID_OK ) ); + }, + + // onCharFn + [this]( wxStyledTextEvent& aEvent ) + { + m_scintillaTricks->DoTextVarAutocomplete( + // getTokensFn + [this]( const wxString& xRef, wxArrayString* tokens ) + { + getContextualTextVars( xRef, tokens ); + } ); + } ); + + SetInitialFocus( m_cellText ); + m_table = static_cast( m_cells[0]->GetParent() ); if( m_frame->GetColorSettings()->GetOverrideSchItemColors() ) @@ -86,6 +114,54 @@ DIALOG_TABLECELL_PROPERTIES::DIALOG_TABLECELL_PROPERTIES( SCH_EDIT_FRAME* aFrame finishDialogSettings(); } +DIALOG_TABLECELL_PROPERTIES::~DIALOG_TABLECELL_PROPERTIES() +{ + delete m_scintillaTricks; +} + +void DIALOG_TABLECELL_PROPERTIES::getContextualTextVars( const wxString& aCrossRef, + wxArrayString* aTokens ) +{ + SCHEMATIC* schematic = m_table->Schematic(); + + if( !aCrossRef.IsEmpty() ) + { + SCH_SYMBOL* refSymbol = nullptr; + + if( schematic ) + { + SCH_REFERENCE_LIST refs; + schematic->Hierarchy().GetSymbols( refs ); + + for( int jj = 0; jj < (int) refs.GetCount(); jj++ ) + { + SCH_REFERENCE& ref = refs[jj]; + + if( ref.GetSymbol()->GetRef( &ref.GetSheetPath(), true ) == aCrossRef ) + { + refSymbol = ref.GetSymbol(); + break; + } + } + } + + if( refSymbol ) + refSymbol->GetContextualTextVars( aTokens ); + } + else + { + if( schematic && schematic->CurrentSheet().Last() ) + { + schematic->CurrentSheet().Last()->GetContextualTextVars( aTokens ); + } + else + { + for( std::pair entry : Prj().GetTextVars() ) + aTokens->push_back( entry.first ); + } + } +} + bool DIALOG_TABLECELL_PROPERTIES::TransferDataToWindow() { @@ -98,6 +174,11 @@ bool DIALOG_TABLECELL_PROPERTIES::TransferDataToWindow() for( SCH_TABLECELL* cell : m_cells ) { + wxString text = cell->GetText(); + + m_cellText->SetValue( text ); + m_cellText->EmptyUndoBuffer(); + if( firstCell ) { m_fontCtrl->SetFontSelection( cell->GetFont() ); @@ -258,6 +339,19 @@ bool DIALOG_TABLECELL_PROPERTIES::TransferDataFromWindow() for( SCH_TABLECELL* cell : m_cells ) { + wxString text = m_cellTextCtrl->GetValue(); + +#ifdef __WXMAC__ + // On macOS CTRL+Enter produces '\r' instead of '\n' regardless of EOL setting + text.Replace( "\r", "\n" ); +#elif defined( __WINDOWS__ ) + // On Windows, a new line is coded as \r\n. We use only \n in KiCad files and in + // drawing routines so strip the \r char. + text.Replace( "\r", "" ); +#endif + + cell->SetText( text ); + if( m_bold->Get3StateValue() == wxCHK_CHECKED ) cell->SetBold( true ); else if( m_bold->Get3StateValue() == wxCHK_UNCHECKED ) @@ -335,3 +429,11 @@ void DIALOG_TABLECELL_PROPERTIES::onEditTable( wxCommandEvent& aEvent ) Close(); } } + +void DIALOG_TABLECELL_PROPERTIES::onMultiLineTCLostFocus( wxFocusEvent& event ) +{ + if( m_scintillaTricks ) + m_scintillaTricks->CancelAutocomplete(); + + event.Skip(); +} \ No newline at end of file diff --git a/eeschema/dialogs/dialog_tablecell_properties.h b/eeschema/dialogs/dialog_tablecell_properties.h index e8a60b12c3..71bdd34ad6 100644 --- a/eeschema/dialogs/dialog_tablecell_properties.h +++ b/eeschema/dialogs/dialog_tablecell_properties.h @@ -31,7 +31,7 @@ class SCH_EDIT_FRAME; class SCH_TABLE; class SCH_TABLECELL; - +class SCINTILLA_TRICKS; class DIALOG_TABLECELL_PROPERTIES : public DIALOG_TABLECELL_PROPERTIES_BASE { @@ -45,11 +45,15 @@ public: }; DIALOG_TABLECELL_PROPERTIES( SCH_EDIT_FRAME* aParentFrame, std::vector aCells ); + ~DIALOG_TABLECELL_PROPERTIES(); ///< @return the value depending on the way the dialog was closed. enum TABLECELL_PROPS_RETVALUE GetReturnValue() { return m_returnValue; } private: + void getContextualTextVars( const wxString& aCrossRef, wxArrayString* aTokens ); + void onMultiLineTCLostFocus( wxFocusEvent& event ) override; + bool TransferDataToWindow() override; bool TransferDataFromWindow() override; @@ -60,16 +64,21 @@ private: void onEditTable( wxCommandEvent& aEvent ) override; + void OnSystemColourChanged( wxSysColourChangedEvent& event ); + + void UpdateTheme( void ); private: SCH_EDIT_FRAME* m_frame; SCH_TABLE* m_table; std::vector m_cells; + SCINTILLA_TRICKS* m_scintillaTricks; UNIT_BINDER m_textSize; UNIT_BINDER m_marginLeft; UNIT_BINDER m_marginTop; UNIT_BINDER m_marginRight; UNIT_BINDER m_marginBottom; + wxStyledTextCtrl* m_cellText; enum TABLECELL_PROPS_RETVALUE m_returnValue; // the option that closed the dialog }; diff --git a/eeschema/dialogs/dialog_tablecell_properties_base.cpp b/eeschema/dialogs/dialog_tablecell_properties_base.cpp index a6d8bd914f..98d9b6c946 100644 --- a/eeschema/dialogs/dialog_tablecell_properties_base.cpp +++ b/eeschema/dialogs/dialog_tablecell_properties_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version 4.1.0-0-g733bf3d) +// C++ code generated with wxFormBuilder (version 4.2.1-0-g80c4cb6) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -28,11 +28,70 @@ DIALOG_TABLECELL_PROPERTIES_BASE::DIALOG_TABLECELL_PROPERTIES_BASE( wxWindow* pa bMainSizer->Add( m_infoBar, 0, wxEXPAND|wxBOTTOM, 5 ); + wxBoxSizer* bSizer151; + bSizer151 = new wxBoxSizer( wxVERTICAL ); + + wxBoxSizer* bSizer16; + bSizer16 = new wxBoxSizer( wxHORIZONTAL ); + + wxBoxSizer* bSizer18; + bSizer18 = new wxBoxSizer( wxVERTICAL ); + + m_cellTextLabel = new wxStaticText( this, wxID_ANY, _("Cell contents:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_cellTextLabel->Wrap( -1 ); + bSizer18->Add( m_cellTextLabel, 0, wxALL, 5 ); + + m_cellTextCtrl = new wxStyledTextCtrl( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxBORDER_SUNKEN, wxEmptyString ); + m_cellTextCtrl->SetUseTabs( false ); + m_cellTextCtrl->SetTabWidth( 4 ); + m_cellTextCtrl->SetIndent( 4 ); + m_cellTextCtrl->SetTabIndents( false ); + m_cellTextCtrl->SetBackSpaceUnIndents( false ); + m_cellTextCtrl->SetViewEOL( false ); + m_cellTextCtrl->SetViewWhiteSpace( false ); + m_cellTextCtrl->SetMarginWidth( 2, 0 ); + m_cellTextCtrl->SetIndentationGuides( false ); + m_cellTextCtrl->SetReadOnly( false ); + m_cellTextCtrl->SetMarginWidth( 1, 0 ); + m_cellTextCtrl->SetMarginWidth( 0, 0 ); + { + wxFont font = wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ); + m_cellTextCtrl->StyleSetFont( wxSTC_STYLE_DEFAULT, font ); + } + m_cellTextCtrl->MarkerDefine( wxSTC_MARKNUM_FOLDER, wxSTC_MARK_BOXPLUS ); + m_cellTextCtrl->MarkerSetBackground( wxSTC_MARKNUM_FOLDER, wxColour( wxT("BLACK") ) ); + m_cellTextCtrl->MarkerSetForeground( wxSTC_MARKNUM_FOLDER, wxColour( wxT("WHITE") ) ); + m_cellTextCtrl->MarkerDefine( wxSTC_MARKNUM_FOLDEROPEN, wxSTC_MARK_BOXMINUS ); + m_cellTextCtrl->MarkerSetBackground( wxSTC_MARKNUM_FOLDEROPEN, wxColour( wxT("BLACK") ) ); + m_cellTextCtrl->MarkerSetForeground( wxSTC_MARKNUM_FOLDEROPEN, wxColour( wxT("WHITE") ) ); + m_cellTextCtrl->MarkerDefine( wxSTC_MARKNUM_FOLDERSUB, wxSTC_MARK_EMPTY ); + m_cellTextCtrl->MarkerDefine( wxSTC_MARKNUM_FOLDEREND, wxSTC_MARK_BOXPLUS ); + m_cellTextCtrl->MarkerSetBackground( wxSTC_MARKNUM_FOLDEREND, wxColour( wxT("BLACK") ) ); + m_cellTextCtrl->MarkerSetForeground( wxSTC_MARKNUM_FOLDEREND, wxColour( wxT("WHITE") ) ); + m_cellTextCtrl->MarkerDefine( wxSTC_MARKNUM_FOLDEROPENMID, wxSTC_MARK_BOXMINUS ); + m_cellTextCtrl->MarkerSetBackground( wxSTC_MARKNUM_FOLDEROPENMID, wxColour( wxT("BLACK") ) ); + m_cellTextCtrl->MarkerSetForeground( wxSTC_MARKNUM_FOLDEROPENMID, wxColour( wxT("WHITE") ) ); + m_cellTextCtrl->MarkerDefine( wxSTC_MARKNUM_FOLDERMIDTAIL, wxSTC_MARK_EMPTY ); + m_cellTextCtrl->MarkerDefine( wxSTC_MARKNUM_FOLDERTAIL, wxSTC_MARK_EMPTY ); + m_cellTextCtrl->SetSelBackground( true, wxSystemSettings::GetColour( wxSYS_COLOUR_HIGHLIGHT ) ); + m_cellTextCtrl->SetSelForeground( true, wxSystemSettings::GetColour( wxSYS_COLOUR_HIGHLIGHTTEXT ) ); + m_cellTextCtrl->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) ); + m_cellTextCtrl->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) ); + m_cellTextCtrl->SetMinSize( wxSize( 200,100 ) ); + + bSizer18->Add( m_cellTextCtrl, 1, wxEXPAND | wxALL, 5 ); + + + bSizer16->Add( bSizer18, 1, wxEXPAND, 5 ); + + wxBoxSizer* bSizer17; + bSizer17 = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bSizer13; bSizer13 = new wxBoxSizer( wxVERTICAL ); - wxBoxSizer* bMargins; - bMargins = new wxBoxSizer( wxVERTICAL ); + + bSizer13->Add( 0, 20, 0, 0, 5 ); wxFlexGridSizer* fgTextStyleSizer; fgTextStyleSizer = new wxFlexGridSizer( 0, 2, 5, 5 ); @@ -44,7 +103,7 @@ DIALOG_TABLECELL_PROPERTIES_BASE::DIALOG_TABLECELL_PROPERTIES_BASE( wxWindow* pa hAlignLabel->Wrap( -1 ); hAlignLabel->SetToolTip( _("Horizontal alignment") ); - fgTextStyleSizer->Add( hAlignLabel, 0, wxALIGN_CENTER_VERTICAL, 5 ); + fgTextStyleSizer->Add( hAlignLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); wxBoxSizer* hAlignButtons; hAlignButtons = new wxBoxSizer( wxHORIZONTAL ); @@ -65,13 +124,13 @@ DIALOG_TABLECELL_PROPERTIES_BASE::DIALOG_TABLECELL_PROPERTIES_BASE( wxWindow* pa hAlignButtons->Add( m_hAlignRight, 0, wxALIGN_CENTER_VERTICAL, 5 ); - fgTextStyleSizer->Add( hAlignButtons, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); + fgTextStyleSizer->Add( hAlignButtons, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); vAlignLabel = new wxStaticText( this, wxID_ANY, _("Vertical alignment:"), wxDefaultPosition, wxDefaultSize, 0 ); vAlignLabel->Wrap( -1 ); vAlignLabel->SetToolTip( _("Vertical alignment") ); - fgTextStyleSizer->Add( vAlignLabel, 0, wxALIGN_CENTER_VERTICAL, 5 ); + fgTextStyleSizer->Add( vAlignLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); wxBoxSizer* vAlignButtons; vAlignButtons = new wxBoxSizer( wxHORIZONTAL ); @@ -95,7 +154,10 @@ DIALOG_TABLECELL_PROPERTIES_BASE::DIALOG_TABLECELL_PROPERTIES_BASE( wxWindow* pa fgTextStyleSizer->Add( vAlignButtons, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); - bMargins->Add( fgTextStyleSizer, 0, wxEXPAND|wxBOTTOM, 6 ); + bSizer13->Add( fgTextStyleSizer, 0, wxBOTTOM|wxEXPAND, 6 ); + + wxBoxSizer* bMargins; + bMargins = new wxBoxSizer( wxVERTICAL ); bMargins->Add( 0, 10, 0, wxEXPAND, 5 ); @@ -108,7 +170,7 @@ DIALOG_TABLECELL_PROPERTIES_BASE::DIALOG_TABLECELL_PROPERTIES_BASE( wxWindow* pa m_styleLabel = new wxStaticText( this, wxID_ANY, _("Style:"), wxDefaultPosition, wxDefaultSize, 0 ); m_styleLabel->Wrap( -1 ); - gbFontSizer->Add( m_styleLabel, wxGBPosition( 2, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 ); + gbFontSizer->Add( m_styleLabel, wxGBPosition( 3, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 ); wxBoxSizer* bSizer14; bSizer14 = new wxBoxSizer( wxHORIZONTAL ); @@ -120,21 +182,21 @@ DIALOG_TABLECELL_PROPERTIES_BASE::DIALOG_TABLECELL_PROPERTIES_BASE( wxWindow* pa bSizer14->Add( m_italic, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 45 ); - gbFontSizer->Add( bSizer14, wxGBPosition( 2, 1 ), wxGBSpan( 1, 1 ), wxEXPAND, 5 ); + gbFontSizer->Add( bSizer14, wxGBPosition( 3, 1 ), wxGBSpan( 1, 1 ), wxEXPAND, 5 ); m_fontLabel = new wxStaticText( this, wxID_ANY, _("Font:"), wxDefaultPosition, wxDefaultSize, 0 ); m_fontLabel->Wrap( -1 ); - gbFontSizer->Add( m_fontLabel, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxLEFT, 1 ); + gbFontSizer->Add( m_fontLabel, wxGBPosition( 1, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxLEFT, 1 ); 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 ); - gbFontSizer->Add( m_fontCtrl, wxGBPosition( 0, 1 ), wxGBSpan( 1, 3 ), wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); + gbFontSizer->Add( m_fontCtrl, wxGBPosition( 1, 1 ), wxGBSpan( 1, 3 ), wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); m_textSizeLabel = new wxStaticText( this, wxID_ANY, _("Size:"), wxDefaultPosition, wxDefaultSize, 0 ); m_textSizeLabel->Wrap( -1 ); - gbFontSizer->Add( m_textSizeLabel, wxGBPosition( 1, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 ); + gbFontSizer->Add( m_textSizeLabel, wxGBPosition( 2, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 ); wxBoxSizer* bSizer15; bSizer15 = new wxBoxSizer( wxHORIZONTAL ); @@ -147,7 +209,7 @@ DIALOG_TABLECELL_PROPERTIES_BASE::DIALOG_TABLECELL_PROPERTIES_BASE( wxWindow* pa bSizer15->Add( m_textSizeUnits, 0, wxLEFT|wxALIGN_CENTER_VERTICAL, 3 ); - gbFontSizer->Add( bSizer15, wxGBPosition( 1, 1 ), wxGBSpan( 1, 3 ), wxALIGN_CENTER_VERTICAL, 5 ); + gbFontSizer->Add( bSizer15, wxGBPosition( 2, 1 ), wxGBSpan( 1, 3 ), wxALIGN_CENTER_VERTICAL, 5 ); gbFontSizer->AddGrowableCol( 1 ); @@ -294,7 +356,16 @@ DIALOG_TABLECELL_PROPERTIES_BASE::DIALOG_TABLECELL_PROPERTIES_BASE( wxWindow* pa bSizer13->Add( bMargins, 1, wxEXPAND|wxALL, 5 ); - bMainSizer->Add( bSizer13, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 ); + bSizer17->Add( bSizer13, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 ); + + + bSizer16->Add( bSizer17, 1, wxEXPAND, 5 ); + + + bSizer151->Add( bSizer16, 1, wxEXPAND, 5 ); + + + bMainSizer->Add( bSizer151, 1, wxEXPAND, 5 ); m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); bMainSizer->Add( m_staticline1, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); @@ -328,6 +399,7 @@ DIALOG_TABLECELL_PROPERTIES_BASE::DIALOG_TABLECELL_PROPERTIES_BASE( wxWindow* pa bMainSizer->Fit( this ); // Connect Events + this->Connect( wxEVT_KILL_FOCUS, wxFocusEventHandler( DIALOG_TABLECELL_PROPERTIES_BASE::onMultiLineTCLostFocus ) ); m_textColorPopup->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_TABLECELL_PROPERTIES_BASE::onTextColorPopup ), NULL, this ); m_fillColorPopup->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_TABLECELL_PROPERTIES_BASE::onFillColorPopup ), NULL, this ); m_editTable->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_TABLECELL_PROPERTIES_BASE::onEditTable ), NULL, this ); @@ -336,6 +408,7 @@ DIALOG_TABLECELL_PROPERTIES_BASE::DIALOG_TABLECELL_PROPERTIES_BASE( wxWindow* pa DIALOG_TABLECELL_PROPERTIES_BASE::~DIALOG_TABLECELL_PROPERTIES_BASE() { // Disconnect Events + this->Disconnect( wxEVT_KILL_FOCUS, wxFocusEventHandler( DIALOG_TABLECELL_PROPERTIES_BASE::onMultiLineTCLostFocus ) ); m_textColorPopup->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_TABLECELL_PROPERTIES_BASE::onTextColorPopup ), NULL, this ); m_fillColorPopup->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_TABLECELL_PROPERTIES_BASE::onFillColorPopup ), NULL, this ); m_editTable->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_TABLECELL_PROPERTIES_BASE::onEditTable ), NULL, this ); diff --git a/eeschema/dialogs/dialog_tablecell_properties_base.fbp b/eeschema/dialogs/dialog_tablecell_properties_base.fbp index bbbce631d9..0f00108ac6 100644 --- a/eeschema/dialogs/dialog_tablecell_properties_base.fbp +++ b/eeschema/dialogs/dialog_tablecell_properties_base.fbp @@ -1,34 +1,36 @@ - + - C++ - 1 - source_name - 0 - 0 + + 1 + connect + none + + + 0 + 1 res UTF-8 - connect dialog_tablecell_properties_base 1000 - none - - 1 + 1 + UI dialog_tablecell_properties_base - . - + 0 + source_name + 1 + 0 + source_name + + + 1 1 - 1 - 1 - 1 - UI - 0 - 1 0 + 0 0 wxAUI_MGR_DEFAULT @@ -57,6 +59,7 @@ + onMultiLineTCLostFocus bMainSizer @@ -71,10 +74,10 @@ 1 1 1 - + 0 - - + 0 + 0 @@ -125,671 +128,44 @@ 5 - wxEXPAND|wxTOP|wxRIGHT|wxLEFT + wxEXPAND 1 - bSizer13 + bSizer151 wxVERTICAL none 5 - wxEXPAND|wxALL + wxEXPAND 1 - bMargins - wxVERTICAL + bSizer16 + wxHORIZONTAL none - - 6 - wxEXPAND|wxBOTTOM - 0 - - 2 - wxBOTH - - - 5 - -1,-1 - fgTextStyleSizer - wxFLEX_GROWMODE_SPECIFIED - none - 0 - 5 - - 5 - wxALIGN_CENTER_VERTICAL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 0 - 1 - - 1 - - 0 - 0 - wxID_ANY - Horizontal alignment: - 0 - - 0 - - - 0 - - 1 - hAlignLabel - 1 - - - none - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - Horizontal alignment - - - - -1 - - - - 5 - wxEXPAND|wxALIGN_CENTER_VERTICAL - 1 - - - hAlignButtons - wxHORIZONTAL - none - - 5 - wxALIGN_CENTER_VERTICAL - 0 - - 1 - 1 - 1 - 1 - - - - - 0 - - - - - 1 - 0 - 1 - - 1 - - 0 - 0 - - Dock - 0 - Left - 0 - 1 - - 1 - - - 0 - 0 - wxID_ANY - Align left - - 0 - - 0 - - - 0 - - 1 - m_hAlignLeft - 1 - - - protected - 1 - - - - Resizable - 1 - - wxBORDER_NONE - BITMAP_BUTTON; widgets/bitmap_button.h; forward_declare - 0 - Align left - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - 5 - wxALIGN_CENTER_VERTICAL - 0 - - 1 - 1 - 1 - 1 - - - - - 0 - - - - - 1 - 0 - 1 - - 1 - - 0 - 0 - - Dock - 0 - Left - 0 - 1 - - 1 - - - 0 - 0 - wxID_ANY - Align center - - 0 - - 0 - - - 0 - - 1 - m_hAlignCenter - 1 - - - protected - 1 - - - - Resizable - 1 - - wxBORDER_NONE - BITMAP_BUTTON; widgets/bitmap_button.h; forward_declare - 0 - Align horizontal center - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - 5 - wxALIGN_CENTER_VERTICAL - 0 - - 1 - 1 - 1 - 1 - - - - - 0 - - - - - 1 - 0 - 1 - - 1 - - 0 - 0 - - Dock - 0 - Left - 0 - 1 - - 1 - - - 0 - 0 - wxID_ANY - Align right - - 0 - - 0 - - - 0 - - 1 - m_hAlignRight - 1 - - - protected - 1 - - - - Resizable - 1 - - wxBORDER_NONE - BITMAP_BUTTON; widgets/bitmap_button.h; forward_declare - 0 - Align right - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - 5 - wxALIGN_CENTER_VERTICAL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 0 - 1 - - 1 - - 0 - 0 - wxID_ANY - Vertical alignment: - 0 - - 0 - - - 0 - - 1 - vAlignLabel - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - Vertical alignment - - - - -1 - - - - 5 - wxEXPAND|wxALIGN_CENTER_VERTICAL - 1 - - - vAlignButtons - wxHORIZONTAL - none - - 5 - wxALIGN_CENTER_VERTICAL - 0 - - 1 - 1 - 1 - 1 - - - - - 0 - - - - - 1 - 0 - 1 - - 1 - - 0 - 0 - - Dock - 0 - Left - 0 - 1 - - 1 - - - 0 - 0 - wxID_ANY - Align top - - 0 - - 0 - - - 0 - - 1 - m_vAlignTop - 1 - - - protected - 1 - - - - Resizable - 1 - - wxBORDER_NONE - BITMAP_BUTTON; widgets/bitmap_button.h; forward_declare - 0 - Align top - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - 5 - wxALIGN_CENTER_VERTICAL - 0 - - 1 - 1 - 1 - 1 - - - - - 0 - - - - - 1 - 0 - 1 - - 1 - - 0 - 0 - - Dock - 0 - Left - 0 - 1 - - 1 - - - 0 - 0 - wxID_ANY - Align middle - - 0 - - 0 - - - 0 - - 1 - m_vAlignCenter - 1 - - - protected - 1 - - - - Resizable - 1 - - wxBORDER_NONE - BITMAP_BUTTON; widgets/bitmap_button.h; forward_declare - 0 - Align vertical center - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - 5 - wxALIGN_CENTER_VERTICAL - 0 - - 1 - 1 - 1 - 1 - - - - - 0 - - - - - 1 - 0 - 1 - - 1 - - 0 - 0 - - Dock - 0 - Left - 0 - 1 - - 1 - - - 0 - 0 - wxID_ANY - Align bottom - - 0 - - 0 - - - 0 - - 1 - m_vAlignBottom - 1 - - - protected - 1 - - - - Resizable - 1 - - wxBORDER_NONE - BITMAP_BUTTON; widgets/bitmap_button.h; forward_declare - 0 - Align bottom - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - 5 wxEXPAND - 0 - - 10 - protected - 0 - - - - 5 - wxEXPAND|wxTOP|wxBOTTOM - 0 - - -1,5 - wxBOTH - 1 - - 5 + 1 + - gbFontSizer - wxFLEX_GROWMODE_SPECIFIED + bSizer18 + wxVERTICAL none - 6 - + 5 - 1 - 0 - wxALIGN_CENTER_VERTICAL - 2 - 1 - + wxALL + 0 + 1 1 1 1 - + 0 - - + 0 + 0 @@ -810,7 +186,7 @@ 0 0 wxID_ANY - Style: + Cell contents: 0 0 @@ -819,7 +195,7 @@ 0 1 - m_styleLabel + m_cellTextLabel 1 @@ -839,166 +215,20 @@ -1 - + 5 - 1 - 1 - wxEXPAND - 2 - 1 - - - bSizer14 - wxHORIZONTAL - none - - 5 - wxALIGN_CENTER_VERTICAL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 0 - 1 - - 1 - - 0 - 0 - wxID_ANY - Bold - - 0 - - - 0 - - 1 - m_bold - 1 - - - protected - 1 - - Resizable - 1 - - wxCHK_3STATE|wxCHK_ALLOW_3RD_STATE_FOR_USER - ; ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - 45 - wxALIGN_CENTER_VERTICAL|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 0 - 1 - - 1 - - 0 - 0 - wxID_ANY - Italic - - 0 - - - 0 - - 1 - m_italic - 1 - - - protected - 1 - - Resizable - 1 - - wxCHK_3STATE|wxCHK_ALLOW_3RD_STATE_FOR_USER - ; ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - 1 - 1 - 0 - wxALIGN_CENTER_VERTICAL|wxLEFT - 0 - 1 - + wxEXPAND | wxALL + 1 + 1 1 1 1 - + 0 - - + 0 + 0 + 0 @@ -1013,725 +243,817 @@ Left 0 1 - + wxSYS_COLOUR_WINDOW 1 - + 0 + ,90,400,-1,70,0 0 0 wxID_ANY - Font: - 0 + 0 + 0 0 0 - + 200,100 1 - m_fontLabel + m_cellTextCtrl 1 protected 1 + 0 Resizable 1 - - ; ; forward_declare - 0 - - - - - -1 - - - - 5 - 3 - 1 - wxALIGN_CENTER_VERTICAL|wxEXPAND - 0 - 1 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - "Default Font" "KiCad Font" - 1 - - 1 - 0 - Dock - 0 - Left - 0 - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - 0 - - 1 - m_fontCtrl - 1 - - - protected - 1 - - Resizable - 0 - 1 - - - FONT_CHOICE; widgets/font_choice.h; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - 5 - 1 - 0 - wxALIGN_CENTER_VERTICAL - 1 - 1 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 0 - 1 - - 1 - - 0 - 0 - wxID_ANY - Size: - 0 - - 0 - - - 0 - - 1 - m_textSizeLabel - 1 - - - protected - 1 - - Resizable - 1 - - + 0 + 4 0 + 0 + 0 + 0 - - -1 + wxBORDER_SUNKEN - + + + + 5 + wxEXPAND + 1 + + + bSizer17 + wxVERTICAL + none + 5 - 3 - 1 - wxALIGN_CENTER_VERTICAL - 1 - 1 + wxEXPAND|wxTOP|wxRIGHT|wxLEFT + 1 - bSizer15 - wxHORIZONTAL + bSizer13 + wxVERTICAL none 5 - wxALIGN_CENTER_VERTICAL + 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 0 - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - 0 - -1,-1 - 0 - -1,-1 - 1 - m_textSizeCtrl - 1 - - + + 20 protected - 1 - - Resizable - 1 - -1,-1 - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - + 0 - - 3 - wxLEFT|wxALIGN_CENTER_VERTICAL + + 6 + wxBOTTOM|wxEXPAND 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 0 - 1 - - 1 - - 0 - 0 - wxID_ANY - mm - 0 - - 0 - - - 0 + + 2 + wxBOTH + + + 5 -1,-1 - 1 - m_textSizeUnits - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - - - - - 20 - wxEXPAND|wxTOP|wxBOTTOM - 0 - - 2 - wxBOTH - - - 5 - - fgColorSizer - wxFLEX_GROWMODE_SPECIFIED - none - 0 - 4 - - 5 - wxALIGN_CENTER_VERTICAL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 0 - 1 - - 1 - - 0 - 0 - wxID_ANY - Text color: - 0 - - 0 - - - 0 - - 1 - m_textColorLabel - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - - - -1 - - - - 5 - wxALIGN_CENTER_VERTICAL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 0 - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - 0 - - 1 - m_textColorBook - 1 - - - protected - 1 - - Resizable - 1 - - ; ; forward_declare - 0 - - - - - - a page - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 0 - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - 0 - - 1 - textColorPopupPanel - 1 - - + fgTextStyleSizer + wxFLEX_GROWMODE_SPECIFIED none - 1 - - Resizable - 1 - - ; ; forward_declare - 0 - - - - wxTAB_TRAVERSAL - - - bSizer20 - wxVERTICAL - none - - 5 - - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - "-- mixed values --" "Set Color..." - 1 - - 1 - 0 - Dock - 0 - Left - 0 - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - 0 - - 1 - m_textColorPopup - 1 - - - protected - 1 - - Resizable - 0 - 1 - - - ; ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - onTextColorPopup + 0 + 5 + + 5 + wxALIGN_CENTER_VERTICAL|wxLEFT + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Horizontal alignment: + 0 + + 0 + + + 0 + + 1 + hAlignLabel + 1 + + + none + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + Horizontal alignment + + + + -1 + + + + 5 + wxALIGN_CENTER_VERTICAL|wxEXPAND + 1 + + + hAlignButtons + wxHORIZONTAL + none + + 5 + wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + 0 + + + + + 1 + 0 + 1 + + 1 + + 0 + 0 + + Dock + 0 + Left + 0 + 1 + + 1 + + + 0 + 0 + wxID_ANY + Align left + + 0 + + 0 + + + 0 + + 1 + m_hAlignLeft + 1 + + + protected + 1 + + + + Resizable + 1 + + wxBORDER_NONE + BITMAP_BUTTON; widgets/bitmap_button.h; forward_declare + 0 + Align left + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + 0 + + + + + 1 + 0 + 1 + + 1 + + 0 + 0 + + Dock + 0 + Left + 0 + 1 + + 1 + + + 0 + 0 + wxID_ANY + Align center + + 0 + + 0 + + + 0 + + 1 + m_hAlignCenter + 1 + + + protected + 1 + + + + Resizable + 1 + + wxBORDER_NONE + BITMAP_BUTTON; widgets/bitmap_button.h; forward_declare + 0 + Align horizontal center + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + 0 + + + + + 1 + 0 + 1 + + 1 + + 0 + 0 + + Dock + 0 + Left + 0 + 1 + + 1 + + + 0 + 0 + wxID_ANY + Align right + + 0 + + 0 + + + 0 + + 1 + m_hAlignRight + 1 + + + protected + 1 + + + + Resizable + 1 + + wxBORDER_NONE + BITMAP_BUTTON; widgets/bitmap_button.h; forward_declare + 0 + Align right + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL|wxLEFT + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Vertical alignment: + 0 + + 0 + + + 0 + + 1 + vAlignLabel + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + Vertical alignment + + + + -1 + + + + 5 + wxEXPAND|wxALIGN_CENTER_VERTICAL + 1 + + + vAlignButtons + wxHORIZONTAL + none + + 5 + wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + 0 + + + + + 1 + 0 + 1 + + 1 + + 0 + 0 + + Dock + 0 + Left + 0 + 1 + + 1 + + + 0 + 0 + wxID_ANY + Align top + + 0 + + 0 + + + 0 + + 1 + m_vAlignTop + 1 + + + protected + 1 + + + + Resizable + 1 + + wxBORDER_NONE + BITMAP_BUTTON; widgets/bitmap_button.h; forward_declare + 0 + Align top + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + 0 + + + + + 1 + 0 + 1 + + 1 + + 0 + 0 + + Dock + 0 + Left + 0 + 1 + + 1 + + + 0 + 0 + wxID_ANY + Align middle + + 0 + + 0 + + + 0 + + 1 + m_vAlignCenter + 1 + + + protected + 1 + + + + Resizable + 1 + + wxBORDER_NONE + BITMAP_BUTTON; widgets/bitmap_button.h; forward_declare + 0 + Align vertical center + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + 0 + + + + + 1 + 0 + 1 + + 1 + + 0 + 0 + + Dock + 0 + Left + 0 + 1 + + 1 + + + 0 + 0 + wxID_ANY + Align bottom + + 0 + + 0 + + + 0 + + 1 + m_vAlignBottom + 1 + + + protected + 1 + + + + Resizable + 1 + + wxBORDER_NONE + BITMAP_BUTTON; widgets/bitmap_button.h; forward_declare + 0 + Align bottom + + wxFILTER_NONE + wxDefaultValidator + + + + + - - a page - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 0 - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - 0 + + 5 + wxEXPAND|wxALL + 1 + - 1 - textColorSwatchPanel - 1 - - - protected - 1 - - Resizable - 1 - - ; ; forward_declare - 0 - - - - wxTAB_TRAVERSAL - - - bSizer222 - wxHORIZONTAL - none - - 5 - wxALIGN_CENTER_VERTICAL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 0 - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - 0 - - 1 - m_panelTextColor - 1 - - - protected - 1 - - Resizable - 1 - - ; ; forward_declare - 0 - - - - wxBORDER_SIMPLE|wxTAB_TRAVERSAL - + bMargins + wxVERTICAL + none + + 5 + wxEXPAND + 0 + + 10 + protected + 0 + + + + 5 + wxEXPAND|wxTOP|wxBOTTOM + 0 + + -1,5 + wxBOTH + 1 + + 5 + + gbFontSizer + wxFLEX_GROWMODE_SPECIFIED + none + 6 + + 5 + 1 + 0 + wxALIGN_CENTER_VERTICAL + 3 + 1 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Style: + 0 + + 0 + + + 0 - bSizer221 - wxVERTICAL + 1 + m_styleLabel + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + + + -1 + + + + 5 + 1 + 1 + wxEXPAND + 3 + 1 + + + bSizer14 + wxHORIZONTAL none 5 - wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL + wxALIGN_CENTER_VERTICAL 0 - + 1 1 1 1 - + 0 - - + 0 + 0 1 0 - COLOR_SWATCH + 0 1 - 1 - 0 Dock 0 @@ -1744,15 +1066,15 @@ 0 0 wxID_ANY - + Bold 0 0 - -1,-1 + 1 - m_textColorSwatch + m_bold 1 @@ -1760,417 +1082,43 @@ 1 Resizable - 1 - COLOR_SWATCH; widgets/color_swatch.h; forward_declare + wxCHK_3STATE|wxCHK_ALLOW_3RD_STATE_FOR_USER + ; ; forward_declare 0 + + wxFILTER_NONE + wxDefaultValidator + - - - - - - - - - - 5 - wxALIGN_CENTER_VERTICAL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 0 - 1 - - 1 - - 0 - 0 - wxID_ANY - Background fill: - 0 - - 0 - - - 0 - - 1 - m_fillColorLabel - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - - - -1 - - - - 5 - wxALIGN_CENTER_VERTICAL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 0 - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - 0 - - 1 - m_fillColorBook - 1 - - - protected - 1 - - Resizable - 1 - - ; ; forward_declare - 0 - - - - - - a page - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 0 - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - 0 - - 1 - fillColorPopupPanel - 1 - - - none - 1 - - Resizable - 1 - - ; ; forward_declare - 0 - - - - wxTAB_TRAVERSAL - - - bSizer211 - wxVERTICAL - none - - 5 - - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - "-- mixed values --" "Set Color..." - 1 - - 1 - 0 - Dock - 0 - Left - 0 - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - 0 - - 1 - m_fillColorPopup - 1 - - - protected - 1 - - Resizable - 0 - 1 - - - ; ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - onFillColorPopup - - - - - - - a page - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 0 - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - 0 - - 1 - fillColorSwatchPanel - 1 - - - protected - 1 - - Resizable - 1 - - ; ; forward_declare - 0 - - - - wxTAB_TRAVERSAL - - - bSizer23 - wxHORIZONTAL - none - - 5 - wxALIGN_CENTER_VERTICAL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 0 - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - 0 - - 1 - m_panelFillColor - 1 - - - protected - 1 - - Resizable - 1 - - ; ; forward_declare - 0 - - - - wxBORDER_SIMPLE|wxTAB_TRAVERSAL - - - bSizer22 - wxVERTICAL - none - 5 - wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL + 45 + wxALIGN_CENTER_VERTICAL|wxLEFT 0 - + 1 1 1 1 - + 0 - - + 0 + 0 1 0 - COLOR_SWATCH + 0 1 - 1 - 0 Dock 0 @@ -2183,15 +1131,15 @@ 0 0 wxID_ANY - + Italic 0 0 - -1,-1 + 1 - m_fillColorSwatch + m_italic 1 @@ -2199,12 +1147,16 @@ 1 Resizable - 1 - COLOR_SWATCH; widgets/color_swatch.h; forward_declare + wxCHK_3STATE|wxCHK_ALLOW_3RD_STATE_FOR_USER + ; ; forward_declare 0 + + wxFILTER_NONE + wxDefaultValidator + @@ -2212,6 +1164,1669 @@ + + 1 + 1 + 0 + wxALIGN_CENTER_VERTICAL|wxLEFT + 1 + 1 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Font: + 0 + + 0 + + + 0 + + 1 + m_fontLabel + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + + + -1 + + + + 5 + 3 + 1 + wxALIGN_CENTER_VERTICAL|wxEXPAND + 1 + 1 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + "Default Font" "KiCad Font" + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_fontCtrl + 1 + + + protected + 1 + + Resizable + 0 + 1 + + + FONT_CHOICE; widgets/font_choice.h; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + 5 + 1 + 0 + wxALIGN_CENTER_VERTICAL + 2 + 1 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Size: + 0 + + 0 + + + 0 + + 1 + m_textSizeLabel + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + 5 + 3 + 1 + wxALIGN_CENTER_VERTICAL + 2 + 1 + + + bSizer15 + wxHORIZONTAL + none + + 5 + wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + -1,-1 + 0 + -1,-1 + 1 + m_textSizeCtrl + 1 + + + protected + 1 + + Resizable + 1 + -1,-1 + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + 3 + wxLEFT|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + mm + 0 + + 0 + + + 0 + -1,-1 + 1 + m_textSizeUnits + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + 20 + wxEXPAND|wxTOP|wxBOTTOM + 0 + + 2 + wxBOTH + + + 5 + + fgColorSizer + wxFLEX_GROWMODE_SPECIFIED + none + 0 + 4 + + 5 + wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Text color: + 0 + + 0 + + + 0 + + 1 + m_textColorLabel + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + + + -1 + + + + 5 + wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_textColorBook + 1 + + + protected + 1 + + Resizable + 1 + + ; ; forward_declare + 0 + + + + + + a page + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + textColorPopupPanel + 1 + + + none + 1 + + Resizable + 1 + + ; ; forward_declare + 0 + + + + wxTAB_TRAVERSAL + + + bSizer20 + wxVERTICAL + none + + 5 + + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + "-- mixed values --" "Set Color..." + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_textColorPopup + 1 + + + protected + 1 + + Resizable + 0 + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + onTextColorPopup + + + + + + + a page + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + textColorSwatchPanel + 1 + + + protected + 1 + + Resizable + 1 + + ; ; forward_declare + 0 + + + + wxTAB_TRAVERSAL + + + bSizer222 + wxHORIZONTAL + none + + 5 + wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_panelTextColor + 1 + + + protected + 1 + + Resizable + 1 + + ; ; forward_declare + 0 + + + + wxBORDER_SIMPLE|wxTAB_TRAVERSAL + + + bSizer221 + wxVERTICAL + none + + 5 + wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + COLOR_SWATCH + 1 + + + 1 + + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + + + 0 + + + 0 + -1,-1 + 1 + m_textColorSwatch + 1 + + + protected + 1 + + Resizable + + 1 + + COLOR_SWATCH; widgets/color_swatch.h; forward_declare + 0 + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Background fill: + 0 + + 0 + + + 0 + + 1 + m_fillColorLabel + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + + + -1 + + + + 5 + wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_fillColorBook + 1 + + + protected + 1 + + Resizable + 1 + + ; ; forward_declare + 0 + + + + + + a page + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + fillColorPopupPanel + 1 + + + none + 1 + + Resizable + 1 + + ; ; forward_declare + 0 + + + + wxTAB_TRAVERSAL + + + bSizer211 + wxVERTICAL + none + + 5 + + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + "-- mixed values --" "Set Color..." + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_fillColorPopup + 1 + + + protected + 1 + + Resizable + 0 + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + onFillColorPopup + + + + + + + a page + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + fillColorSwatchPanel + 1 + + + protected + 1 + + Resizable + 1 + + ; ; forward_declare + 0 + + + + wxTAB_TRAVERSAL + + + bSizer23 + wxHORIZONTAL + none + + 5 + wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_panelFillColor + 1 + + + protected + 1 + + Resizable + 1 + + ; ; forward_declare + 0 + + + + wxBORDER_SIMPLE|wxTAB_TRAVERSAL + + + bSizer22 + wxVERTICAL + none + + 5 + wxALIGN_CENTER_VERTICAL|wxALIGN_CENTER_HORIZONTAL + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + COLOR_SWATCH + 1 + + + 1 + + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + + + 0 + + + 0 + -1,-1 + 1 + m_fillColorSwatch + 1 + + + protected + 1 + + Resizable + + 1 + + COLOR_SWATCH; widgets/color_swatch.h; forward_declare + 0 + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 0 + + 5 + protected + 0 + + + + 5 + wxEXPAND + 0 + + 3 + 2 + + gMarginsSizer + none + 0 + 4 + + 5 + wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Cell margins: + 0 + + 0 + + + 0 + + 1 + marginsLabel + 1 + + + none + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + + + -1 + + + + 5 + wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_marginTopCtrl + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + 2 + wxALIGN_CENTER_VERTICAL|wxLEFT + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + mm + 0 + + 0 + + + 0 + + 1 + m_marginTopUnits + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + + + -1 + + + + 5 + wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_marginLeftCtrl + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + 5 + wxEXPAND + 1 + + 0 + protected + 0 + + + + 5 + wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_marginRightCtrl + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + 5 + wxEXPAND + 1 + + 0 + protected + 0 + + + + 5 + wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_marginBottomCtrl + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + @@ -2220,434 +2835,6 @@ - - 5 - wxEXPAND - 0 - - 5 - protected - 0 - - - - 5 - wxEXPAND - 0 - - 3 - 2 - - gMarginsSizer - none - 0 - 4 - - 5 - wxALIGN_CENTER_VERTICAL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 0 - 1 - - 1 - - 0 - 0 - wxID_ANY - Cell margins: - 0 - - 0 - - - 0 - - 1 - marginsLabel - 1 - - - none - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - - - -1 - - - - 5 - wxALIGN_CENTER_VERTICAL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 0 - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - - 0 - - 1 - m_marginTopCtrl - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - 2 - wxALIGN_CENTER_VERTICAL|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 0 - 1 - - 1 - - 0 - 0 - wxID_ANY - mm - 0 - - 0 - - - 0 - - 1 - m_marginTopUnits - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - - - -1 - - - - 5 - wxALIGN_CENTER_VERTICAL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 0 - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - - 0 - - 1 - m_marginLeftCtrl - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - 5 - wxEXPAND - 1 - - 0 - protected - 0 - - - - 5 - wxALIGN_CENTER_VERTICAL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 0 - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - - 0 - - 1 - m_marginRightCtrl - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - 5 - wxEXPAND - 1 - - 0 - protected - 0 - - - - 5 - wxALIGN_CENTER_VERTICAL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 0 - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - - 0 - - 1 - m_marginBottomCtrl - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - @@ -2661,10 +2848,10 @@ 1 1 1 - + 0 - - + 0 + 0 @@ -2729,10 +2916,10 @@ 1 1 1 - + 0 - - + 0 + 0 0 diff --git a/eeschema/dialogs/dialog_tablecell_properties_base.h b/eeschema/dialogs/dialog_tablecell_properties_base.h index c93fd0f1e6..af5423c12b 100644 --- a/eeschema/dialogs/dialog_tablecell_properties_base.h +++ b/eeschema/dialogs/dialog_tablecell_properties_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version 4.1.0-0-g733bf3d) +// C++ code generated with wxFormBuilder (version 4.2.1-0-g80c4cb6) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -23,12 +23,13 @@ class WX_INFOBAR; #include #include #include +#include +#include #include #include #include #include #include -#include #include #include #include @@ -49,6 +50,8 @@ class DIALOG_TABLECELL_PROPERTIES_BASE : public DIALOG_SHIM protected: WX_INFOBAR* m_infoBar; + wxStaticText* m_cellTextLabel; + wxStyledTextCtrl* m_cellTextCtrl; BITMAP_BUTTON* m_hAlignLeft; BITMAP_BUTTON* m_hAlignCenter; BITMAP_BUTTON* m_hAlignRight; @@ -88,6 +91,7 @@ class DIALOG_TABLECELL_PROPERTIES_BASE : public DIALOG_SHIM wxButton* m_sdbSizer1Cancel; // Virtual event handlers, override them in your derived class + virtual void onMultiLineTCLostFocus( wxFocusEvent& event ) { event.Skip(); } virtual void onTextColorPopup( wxCommandEvent& event ) { event.Skip(); } virtual void onFillColorPopup( wxCommandEvent& event ) { event.Skip(); } virtual void onEditTable( wxCommandEvent& event ) { event.Skip(); } diff --git a/pcbnew/dialogs/dialog_tablecell_properties.cpp b/pcbnew/dialogs/dialog_tablecell_properties.cpp index 23cdd3bf7b..1f93daeb24 100644 --- a/pcbnew/dialogs/dialog_tablecell_properties.cpp +++ b/pcbnew/dialogs/dialog_tablecell_properties.cpp @@ -52,10 +52,44 @@ DIALOG_TABLECELL_PROPERTIES::DIALOG_TABLECELL_PROPERTIES( PCB_BASE_EDIT_FRAME* a m_marginTop( aFrame, nullptr, m_marginTopCtrl, m_marginTopUnits ), m_marginRight( aFrame, nullptr, m_marginRightCtrl, nullptr ), m_marginBottom( aFrame, nullptr, m_marginBottomCtrl, nullptr ), + m_cellText( m_cellTextCtrl ), m_returnValue( TABLECELL_PROPS_CANCEL ) { wxASSERT( m_cells.size() > 0 && m_cells[0] ); + m_cellText->SetEOLMode( wxSTC_EOL_LF ); + +#ifdef _WIN32 + // Without this setting, on Windows, some esoteric unicode chars create display issue + // in a wxStyledTextCtrl. + // for SetTechnology() info, see https://www.scintilla.org/ScintillaDoc.html#SCI_SETTECHNOLOGY + m_cellText->SetTechnology(wxSTC_TECHNOLOGY_DIRECTWRITE); +#endif + + m_scintillaTricks = new SCINTILLA_TRICKS( m_cellText, wxT( "{}" ), false, + // onAcceptFn + [this]( wxKeyEvent& aEvent ) + { + wxPostEvent( this, wxCommandEvent( wxEVT_COMMAND_BUTTON_CLICKED, wxID_OK ) ); + }, + // onCharFn + [this]( wxStyledTextEvent& aEvent ) + { + m_scintillaTricks->DoTextVarAutocomplete( + // getTokensFn + [this]( const wxString& xRef, wxArrayString* tokens ) + { + m_frame->GetContextualTextVars( m_table, xRef, tokens ); + } ); + } ); + + // A hack which causes Scintilla to auto-size the text editor canvas + // See: https://github.com/jacobslusser/ScintillaNET/issues/216 + m_cellText->SetScrollWidth( 1 ); + m_cellText->SetScrollWidthTracking( true ); + + SetInitialFocus( m_cellText ); + m_table = static_cast( m_cells[0]->GetParent() ); m_hAlignLeft->SetIsRadioButton(); @@ -75,6 +109,9 @@ DIALOG_TABLECELL_PROPERTIES::DIALOG_TABLECELL_PROPERTIES( PCB_BASE_EDIT_FRAME* a SetupStandardButtons(); Layout(); + Connect( wxEVT_CHAR_HOOK, wxKeyEventHandler( DIALOG_TABLECELL_PROPERTIES::OnCharHook ), + nullptr, this ); + m_hAlignLeft->Bind( wxEVT_BUTTON, &DIALOG_TABLECELL_PROPERTIES::onHAlignButton, this ); m_hAlignCenter->Bind( wxEVT_BUTTON, &DIALOG_TABLECELL_PROPERTIES::onHAlignButton, this ); m_hAlignRight->Bind( wxEVT_BUTTON, &DIALOG_TABLECELL_PROPERTIES::onHAlignButton, this ); @@ -86,6 +123,14 @@ DIALOG_TABLECELL_PROPERTIES::DIALOG_TABLECELL_PROPERTIES( PCB_BASE_EDIT_FRAME* a finishDialogSettings(); } +DIALOG_TABLECELL_PROPERTIES::~DIALOG_TABLECELL_PROPERTIES() +{ + Disconnect( wxEVT_CHAR_HOOK, wxKeyEventHandler( DIALOG_TABLECELL_PROPERTIES::OnCharHook ), + nullptr, this ); + + delete m_scintillaTricks; +} + bool DIALOG_TABLECELL_PROPERTIES::TransferDataToWindow() { @@ -98,6 +143,7 @@ bool DIALOG_TABLECELL_PROPERTIES::TransferDataToWindow() for( PCB_TABLECELL* cell : m_cells ) { + m_cellTextCtrl->SetValue( cell->GetText() ); if( firstCell ) { m_fontCtrl->SetFontSelection( cell->GetFont() ); @@ -221,6 +267,20 @@ bool DIALOG_TABLECELL_PROPERTIES::TransferDataFromWindow() for( PCB_TABLECELL* cell : m_cells ) { + wxString txt = m_cellTextCtrl->GetValue(); + +#ifdef __WXMAC__ + // On macOS CTRL+Enter produces '\r' instead of '\n' regardless of EOL setting. + // Replace it now. + txt.Replace( "\r", "\n" ); +#elif defined( __WINDOWS__ ) + // On Windows, a new line is coded as \r\n. We use only \n in kicad files and in + // drawing routines so strip the \r char. + txt.Replace( "\r", "" ); +#endif + + cell->SetText( txt ); + if( m_bold->Get3StateValue() == wxCHK_CHECKED ) cell->SetBold( true ); else if( m_bold->Get3StateValue() == wxCHK_UNCHECKED ) diff --git a/pcbnew/dialogs/dialog_tablecell_properties.h b/pcbnew/dialogs/dialog_tablecell_properties.h index 2518a2fc42..3ec533f460 100644 --- a/pcbnew/dialogs/dialog_tablecell_properties.h +++ b/pcbnew/dialogs/dialog_tablecell_properties.h @@ -33,7 +33,7 @@ class PCB_BASE_EDIT_FRAME; class PCB_TABLE; class PCB_TABLECELL; - +class SCINTILLA_TRICKS; class DIALOG_TABLECELL_PROPERTIES : public DIALOG_TABLECELL_PROPERTIES_BASE { @@ -48,7 +48,7 @@ public: DIALOG_TABLECELL_PROPERTIES( PCB_BASE_EDIT_FRAME* aParentFrame, std::vector aCells ); - + ~DIALOG_TABLECELL_PROPERTIES(); ///< @return the value depending on the way the dialog was closed. enum TABLECELL_PROPS_RETVALUE GetReturnValue() { return m_returnValue; } @@ -61,6 +61,11 @@ private: void onEditTable( wxCommandEvent& aEvent ) override; + virtual void onMultiLineTCLostFocus( wxFocusEvent& event ) { event.Skip(); } + + void OnSystemColourChanged( wxSysColourChangedEvent& event ); + void UpdateTheme( void ); + private: PCB_BASE_EDIT_FRAME* m_frame; PCB_TABLE* m_table; @@ -73,6 +78,9 @@ private: UNIT_BINDER m_marginTop; UNIT_BINDER m_marginRight; UNIT_BINDER m_marginBottom; + + wxStyledTextCtrl* m_cellText; + SCINTILLA_TRICKS* m_scintillaTricks; enum TABLECELL_PROPS_RETVALUE m_returnValue; // the option that closed the dialog }; diff --git a/pcbnew/dialogs/dialog_tablecell_properties_base.cpp b/pcbnew/dialogs/dialog_tablecell_properties_base.cpp index 123a8926dd..f4b61caba2 100644 --- a/pcbnew/dialogs/dialog_tablecell_properties_base.cpp +++ b/pcbnew/dialogs/dialog_tablecell_properties_base.cpp @@ -27,9 +27,60 @@ DIALOG_TABLECELL_PROPERTIES_BASE::DIALOG_TABLECELL_PROPERTIES_BASE( wxWindow* pa bMainSizer->Add( m_infoBar, 0, wxEXPAND|wxBOTTOM, 5 ); + wxBoxSizer* bSizer7; + bSizer7 = new wxBoxSizer( wxHORIZONTAL ); + + wxBoxSizer* bSizer8; + bSizer8 = new wxBoxSizer( wxVERTICAL ); + + m_cellTextLabel = new wxStaticText( this, wxID_ANY, _("Cell contents:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_cellTextLabel->Wrap( -1 ); + bSizer8->Add( m_cellTextLabel, 0, wxALL, 5 ); + + m_cellTextCtrl = new wxStyledTextCtrl( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxBORDER_SUNKEN, wxEmptyString ); + m_cellTextCtrl->SetUseTabs( false ); + m_cellTextCtrl->SetTabWidth( 4 ); + m_cellTextCtrl->SetIndent( 4 ); + m_cellTextCtrl->SetTabIndents( false ); + m_cellTextCtrl->SetBackSpaceUnIndents( false ); + m_cellTextCtrl->SetViewEOL( false ); + m_cellTextCtrl->SetViewWhiteSpace( false ); + m_cellTextCtrl->SetMarginWidth( 2, 0 ); + m_cellTextCtrl->SetIndentationGuides( false ); + m_cellTextCtrl->SetReadOnly( false ); + m_cellTextCtrl->SetMarginWidth( 1, 0 ); + m_cellTextCtrl->SetMarginWidth( 0, 0 ); + m_cellTextCtrl->MarkerDefine( wxSTC_MARKNUM_FOLDER, wxSTC_MARK_BOXPLUS ); + m_cellTextCtrl->MarkerSetBackground( wxSTC_MARKNUM_FOLDER, wxColour( wxT("BLACK") ) ); + m_cellTextCtrl->MarkerSetForeground( wxSTC_MARKNUM_FOLDER, wxColour( wxT("WHITE") ) ); + m_cellTextCtrl->MarkerDefine( wxSTC_MARKNUM_FOLDEROPEN, wxSTC_MARK_BOXMINUS ); + m_cellTextCtrl->MarkerSetBackground( wxSTC_MARKNUM_FOLDEROPEN, wxColour( wxT("BLACK") ) ); + m_cellTextCtrl->MarkerSetForeground( wxSTC_MARKNUM_FOLDEROPEN, wxColour( wxT("WHITE") ) ); + m_cellTextCtrl->MarkerDefine( wxSTC_MARKNUM_FOLDERSUB, wxSTC_MARK_EMPTY ); + m_cellTextCtrl->MarkerDefine( wxSTC_MARKNUM_FOLDEREND, wxSTC_MARK_BOXPLUS ); + m_cellTextCtrl->MarkerSetBackground( wxSTC_MARKNUM_FOLDEREND, wxColour( wxT("BLACK") ) ); + m_cellTextCtrl->MarkerSetForeground( wxSTC_MARKNUM_FOLDEREND, wxColour( wxT("WHITE") ) ); + m_cellTextCtrl->MarkerDefine( wxSTC_MARKNUM_FOLDEROPENMID, wxSTC_MARK_BOXMINUS ); + m_cellTextCtrl->MarkerSetBackground( wxSTC_MARKNUM_FOLDEROPENMID, wxColour( wxT("BLACK") ) ); + m_cellTextCtrl->MarkerSetForeground( wxSTC_MARKNUM_FOLDEROPENMID, wxColour( wxT("WHITE") ) ); + m_cellTextCtrl->MarkerDefine( wxSTC_MARKNUM_FOLDERMIDTAIL, wxSTC_MARK_EMPTY ); + m_cellTextCtrl->MarkerDefine( wxSTC_MARKNUM_FOLDERTAIL, wxSTC_MARK_EMPTY ); + m_cellTextCtrl->SetSelBackground( true, wxSystemSettings::GetColour( wxSYS_COLOUR_HIGHLIGHT ) ); + m_cellTextCtrl->SetSelForeground( true, wxSystemSettings::GetColour( wxSYS_COLOUR_HIGHLIGHTTEXT ) ); + bSizer8->Add( m_cellTextCtrl, 1, wxEXPAND | wxALL, 5 ); + + + bSizer7->Add( bSizer8, 1, wxEXPAND, 5 ); + + wxBoxSizer* bSizer9; + bSizer9 = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bMargins; bMargins = new wxBoxSizer( wxVERTICAL ); + + bMargins->Add( 0, 15, 0, wxEXPAND, 5 ); + wxFlexGridSizer* fgTextStyleSizer; fgTextStyleSizer = new wxFlexGridSizer( 0, 2, 5, 5 ); fgTextStyleSizer->SetFlexibleDirection( wxBOTH ); @@ -104,17 +155,17 @@ DIALOG_TABLECELL_PROPERTIES_BASE::DIALOG_TABLECELL_PROPERTIES_BASE( wxWindow* pa m_fontLabel = new wxStaticText( this, wxID_ANY, _("Font:"), wxDefaultPosition, wxDefaultSize, 0 ); m_fontLabel->Wrap( -1 ); - gbFontSizer->Add( m_fontLabel, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxLEFT, 1 ); + gbFontSizer->Add( m_fontLabel, wxGBPosition( 1, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxLEFT, 1 ); wxString m_fontCtrlChoices[] = { _("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 ); - gbFontSizer->Add( m_fontCtrl, wxGBPosition( 0, 1 ), wxGBSpan( 1, 3 ), wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); + gbFontSizer->Add( m_fontCtrl, wxGBPosition( 1, 1 ), wxGBSpan( 1, 3 ), wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); m_styleLabel = new wxStaticText( this, wxID_ANY, _("Style:"), wxDefaultPosition, wxDefaultSize, 0 ); m_styleLabel->Wrap( -1 ); - gbFontSizer->Add( m_styleLabel, wxGBPosition( 1, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 ); + gbFontSizer->Add( m_styleLabel, wxGBPosition( 2, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 ); wxBoxSizer* bSizer14; bSizer14 = new wxBoxSizer( wxHORIZONTAL ); @@ -126,7 +177,7 @@ DIALOG_TABLECELL_PROPERTIES_BASE::DIALOG_TABLECELL_PROPERTIES_BASE( wxWindow* pa bSizer14->Add( m_italic, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 45 ); - gbFontSizer->Add( bSizer14, wxGBPosition( 1, 1 ), wxGBSpan( 1, 1 ), wxEXPAND, 5 ); + gbFontSizer->Add( bSizer14, wxGBPosition( 2, 1 ), wxGBSpan( 1, 1 ), wxEXPAND, 5 ); gbFontSizer->AddGrowableCol( 1 ); @@ -218,7 +269,13 @@ DIALOG_TABLECELL_PROPERTIES_BASE::DIALOG_TABLECELL_PROPERTIES_BASE( wxWindow* pa bMargins->Add( gMarginsSizer, 0, wxEXPAND, 5 ); - bMainSizer->Add( bMargins, 1, wxEXPAND|wxALL, 10 ); + bSizer9->Add( bMargins, 1, wxEXPAND|wxALL, 10 ); + + + bSizer7->Add( bSizer9, 1, wxEXPAND, 5 ); + + + bMainSizer->Add( bSizer7, 1, wxEXPAND, 5 ); m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); bMainSizer->Add( m_staticline1, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); diff --git a/pcbnew/dialogs/dialog_tablecell_properties_base.fbp b/pcbnew/dialogs/dialog_tablecell_properties_base.fbp index 62c13a3cbd..fecda35d21 100644 --- a/pcbnew/dialogs/dialog_tablecell_properties_base.fbp +++ b/pcbnew/dialogs/dialog_tablecell_properties_base.fbp @@ -126,35 +126,28 @@ - 10 - wxEXPAND|wxALL + 5 + wxEXPAND 1 - bMargins - wxVERTICAL + bSizer7 + wxHORIZONTAL none - + 5 wxEXPAND - 0 - - 2 - wxBOTH - - - 5 - -1,-1 - fgTextStyleSizer - wxFLEX_GROWMODE_SPECIFIED + 1 + + + bSizer8 + wxVERTICAL none - 0 - 5 - + 5 - wxALIGN_CENTER_VERTICAL + wxALL 0 - + 1 1 1 @@ -183,7 +176,7 @@ 0 0 wxID_ANY - Horizontal alignment: + Cell contents: 0 0 @@ -192,11 +185,11 @@ 0 1 - hAlignLabel + m_cellTextLabel 1 - none + protected 1 Resizable @@ -205,1954 +198,2134 @@ ; ; forward_declare 0 - Horizontal alignment + -1 - + 5 - wxEXPAND|wxALIGN_CENTER_VERTICAL + wxEXPAND | wxALL + 1 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + 0 + + 0 + 0 + wxID_ANY + 0 + 0 + + 0 + + + 0 + + 1 + m_cellTextCtrl + 1 + + + protected + 1 + + 0 + Resizable + 1 + + + 0 + 4 + 0 + + 0 + 0 + 0 + + + wxBORDER_SUNKEN + + + + + + 5 + wxEXPAND + 1 + + + bSizer9 + wxVERTICAL + none + + 10 + wxEXPAND|wxALL 1 - hAlignButtons - wxHORIZONTAL + bMargins + wxVERTICAL none 5 - wxALIGN_CENTER_VERTICAL + wxEXPAND 0 - - 1 - 1 - 1 - 1 - 0 - - 0 - 0 - 0 - - - - - 1 - 0 - 1 - - 1 - - 0 - 0 - - Dock - 0 - Left - 0 - 1 - - 1 - - - 0 - 0 - wxID_ANY - Align left - - 0 - - 0 - - - 0 - - 1 - m_hAlignLeft - 1 - - + + 15 protected - 1 - - - - Resizable - 1 - - wxBORDER_NONE - BITMAP_BUTTON; widgets/bitmap_button.h; forward_declare - 0 - Align left - - wxFILTER_NONE - wxDefaultValidator - - - - + 0 - + 5 - wxALIGN_CENTER_VERTICAL + wxEXPAND 0 - - 1 - 1 - 1 - 1 - 0 - - 0 - 0 - 0 - - - - - 1 - 0 - 1 - - 1 - - 0 - 0 - - Dock - 0 - Left - 0 - 1 - - 1 - - - 0 - 0 - wxID_ANY - Align center - - 0 - - 0 - - - 0 - - 1 - m_hAlignCenter - 1 - - - protected - 1 - - - - Resizable - 1 - - wxBORDER_NONE - BITMAP_BUTTON; widgets/bitmap_button.h; forward_declare - 0 - Align horizontal center - - wxFILTER_NONE - wxDefaultValidator - - - - + + 2 + wxBOTH + + + 5 + -1,-1 + fgTextStyleSizer + wxFLEX_GROWMODE_SPECIFIED + none + 0 + 5 + + 5 + wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Horizontal alignment: + 0 + + 0 + + + 0 + + 1 + hAlignLabel + 1 + + + none + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + Horizontal alignment + + + + -1 + + + + 5 + wxEXPAND|wxALIGN_CENTER_VERTICAL + 1 + + + hAlignButtons + wxHORIZONTAL + none + + 5 + wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + 0 + + + + + 1 + 0 + 1 + + 1 + + 0 + 0 + + Dock + 0 + Left + 0 + 1 + + 1 + + + 0 + 0 + wxID_ANY + Align left + + 0 + + 0 + + + 0 + + 1 + m_hAlignLeft + 1 + + + protected + 1 + + + + Resizable + 1 + + wxBORDER_NONE + BITMAP_BUTTON; widgets/bitmap_button.h; forward_declare + 0 + Align left + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + 0 + + + + + 1 + 0 + 1 + + 1 + + 0 + 0 + + Dock + 0 + Left + 0 + 1 + + 1 + + + 0 + 0 + wxID_ANY + Align center + + 0 + + 0 + + + 0 + + 1 + m_hAlignCenter + 1 + + + protected + 1 + + + + Resizable + 1 + + wxBORDER_NONE + BITMAP_BUTTON; widgets/bitmap_button.h; forward_declare + 0 + Align horizontal center + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + 0 + + + + + 1 + 0 + 1 + + 1 + + 0 + 0 + + Dock + 0 + Left + 0 + 1 + + 1 + + + 0 + 0 + wxID_ANY + Align right + + 0 + + 0 + + + 0 + + 1 + m_hAlignRight + 1 + + + protected + 1 + + + + Resizable + 1 + + wxBORDER_NONE + BITMAP_BUTTON; widgets/bitmap_button.h; forward_declare + 0 + Align right + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Vertical alignment: + 0 + + 0 + + + 0 + + 1 + vAlignLabel + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + Vertical alignment + + + + -1 + + + + 5 + wxEXPAND|wxALIGN_CENTER_VERTICAL + 1 + + + vAlignButtons + wxHORIZONTAL + none + + 5 + wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + 0 + + + + + 1 + 0 + 1 + + 1 + + 0 + 0 + + Dock + 0 + Left + 0 + 1 + + 1 + + + 0 + 0 + wxID_ANY + Align top + + 0 + + 0 + + + 0 + + 1 + m_vAlignTop + 1 + + + protected + 1 + + + + Resizable + 1 + + wxBORDER_NONE + BITMAP_BUTTON; widgets/bitmap_button.h; forward_declare + 0 + Align top + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + 0 + + + + + 1 + 0 + 1 + + 1 + + 0 + 0 + + Dock + 0 + Left + 0 + 1 + + 1 + + + 0 + 0 + wxID_ANY + Align middle + + 0 + + 0 + + + 0 + + 1 + m_vAlignCenter + 1 + + + protected + 1 + + + + Resizable + 1 + + wxBORDER_NONE + BITMAP_BUTTON; widgets/bitmap_button.h; forward_declare + 0 + Align vertical center + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + 0 + + + + + 1 + 0 + 1 + + 1 + + 0 + 0 + + Dock + 0 + Left + 0 + 1 + + 1 + + + 0 + 0 + wxID_ANY + Align bottom + + 0 + + 0 + + + 0 + + 1 + m_vAlignBottom + 1 + + + protected + 1 + + + + Resizable + 1 + + wxBORDER_NONE + BITMAP_BUTTON; widgets/bitmap_button.h; forward_declare + 0 + Align bottom + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + - + 5 - wxALIGN_CENTER_VERTICAL + wxEXPAND 0 - - 1 - 1 - 1 - 1 - 0 - - 0 - 0 - 0 - - - - - 1 - 0 - 1 - - 1 - - 0 - 0 - - Dock - 0 - Left - 0 - 1 - - 1 - - - 0 - 0 - wxID_ANY - Align right - - 0 - - 0 - - - 0 - - 1 - m_hAlignRight - 1 - - + + 20 protected - 1 - - - - Resizable - 1 - - wxBORDER_NONE - BITMAP_BUTTON; widgets/bitmap_button.h; forward_declare - 0 - Align right - - wxFILTER_NONE - wxDefaultValidator - - - - + 0 - - - - 5 - wxALIGN_CENTER_VERTICAL - 0 - - 1 - 1 - 1 - 1 - 0 - - 0 - 0 - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 0 - 1 - - 1 - - 0 - 0 - wxID_ANY - Vertical alignment: - 0 - - 0 - - - 0 - - 1 - vAlignLabel - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - Vertical alignment - - - - -1 - - - - 5 - wxEXPAND|wxALIGN_CENTER_VERTICAL - 1 - - - vAlignButtons - wxHORIZONTAL - none - + + 1 + wxEXPAND|wxBOTTOM + 0 + + -1,5 + wxBOTH + 1 + + 5 + + gbFontSizer + wxFLEX_GROWMODE_SPECIFIED + none + 7 + + 1 + 1 + 0 + wxALIGN_CENTER_VERTICAL|wxLEFT + 1 + 1 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Font: + 0 + + 0 + + + 0 + + 1 + m_fontLabel + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + + + -1 + + + + 5 + 3 + 1 + wxALIGN_CENTER_VERTICAL|wxEXPAND + 1 + 1 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + "KiCad Font" + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_fontCtrl + 1 + + + protected + 1 + + Resizable + 0 + 1 + + + FONT_CHOICE; widgets/font_choice.h; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + 5 + 1 + 0 + wxALIGN_CENTER_VERTICAL + 2 + 1 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Style: + 0 + + 0 + + + 0 + + 1 + m_styleLabel + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + + + -1 + + + + 5 + 1 + 1 + wxEXPAND + 2 + 1 + + + bSizer14 + wxHORIZONTAL + none + + 5 + wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Bold + + 0 + + + 0 + + 1 + m_bold + 1 + + + protected + 1 + + Resizable + 1 + + wxCHK_3STATE|wxCHK_ALLOW_3RD_STATE_FOR_USER + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + 45 + wxALIGN_CENTER_VERTICAL|wxLEFT + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Italic + + 0 + + + 0 + + 1 + m_italic + 1 + + + protected + 1 + + Resizable + 1 + + wxCHK_3STATE|wxCHK_ALLOW_3RD_STATE_FOR_USER + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + 5 - wxALIGN_CENTER_VERTICAL + wxEXPAND|wxTOP 0 - - 1 - 1 - 1 - 1 - 0 - - 0 - 0 - 0 - - - - - 1 - 0 - 1 - - 1 - - 0 - 0 - - Dock - 0 - Left - 0 - 1 - - 1 - - - 0 - 0 - wxID_ANY - Align top - - 0 - - 0 - - - 0 + + -1,8 + wxBOTH + + + 5 - 1 - m_vAlignTop - 1 - - - protected - 1 - - - - Resizable - 1 - - wxBORDER_NONE - BITMAP_BUTTON; widgets/bitmap_button.h; forward_declare - 0 - Align top - - wxFILTER_NONE - wxDefaultValidator - - - - + gbSizer1 + wxFLEX_GROWMODE_SPECIFIED + none + 4 + + 4 + 1 + 0 + wxALIGN_CENTER_VERTICAL + 0 + 1 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 0 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Text width: + 0 + + 0 + + + 0 + + 1 + m_SizeXLabel + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + Text width + + + + -1 + + + + 5 + 1 + 1 + wxALIGN_CENTER_VERTICAL|wxEXPAND + 0 + 1 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_SizeXCtrl + 1 + + + protected + 1 + + Resizable + 1 + + wxTE_PROCESS_ENTER + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnOkClick + + + + 5 + 1 + 2 + wxALIGN_CENTER_VERTICAL + 0 + 1 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + unit + 0 + + 0 + + + 0 + + 1 + m_SizeXUnits + 1 + + + protected + 1 + + Resizable + 1 + + + ; forward_declare + 0 + + + + + -1 + + + + 4 + 1 + 0 + wxALIGN_CENTER_VERTICAL + 1 + 1 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 0 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Text height: + 0 + + 0 + + + 0 + + 1 + m_SizeYLabel + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + Text height + + + + -1 + + + + 5 + 1 + 1 + wxALIGN_CENTER_VERTICAL|wxEXPAND + 1 + 1 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_SizeYCtrl + 1 + + + protected + 1 + + Resizable + 1 + + wxTE_PROCESS_ENTER + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnOkClick + + + + 5 + 1 + 2 + wxALIGN_CENTER_VERTICAL + 1 + 1 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + unit + 0 + + 0 + + + 0 + + 1 + m_SizeYUnits + 1 + + + protected + 1 + + Resizable + 1 + + + ; forward_declare + 0 + + + + + -1 + + + + 4 + 1 + 0 + wxALIGN_CENTER_VERTICAL + 2 + 1 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 0 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Thickness: + 0 + + 0 + + + 0 + + 1 + m_ThicknessLabel + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + Text thickness + + + + -1 + + + + 5 + 1 + 1 + wxALIGN_CENTER_VERTICAL|wxEXPAND + 2 + 1 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_ThicknessCtrl + 1 + + + protected + 1 + + Resizable + 1 + + wxTE_PROCESS_ENTER + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + onThickness + + + + 5 + 1 + 2 + wxALIGN_CENTER_VERTICAL + 2 + 1 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + unit + 0 + + 0 + + + 0 + + 1 + m_ThicknessUnits + 1 + + + protected + 1 + + Resizable + 1 + + + ; forward_declare + 0 + + + + + -1 + + - + 5 - wxALIGN_CENTER_VERTICAL + wxEXPAND 0 - - 1 - 1 - 1 - 1 - 0 - - 0 - 0 - 0 - - - - - 1 - 0 - 1 - - 1 - - 0 - 0 - - Dock - 0 - Left - 0 - 1 - - 1 - - - 0 - 0 - wxID_ANY - Align middle - - 0 - - 0 - - - 0 - - 1 - m_vAlignCenter - 1 - - + + 20 protected - 1 - - - - Resizable - 1 - - wxBORDER_NONE - BITMAP_BUTTON; widgets/bitmap_button.h; forward_declare - 0 - Align vertical center - - wxFILTER_NONE - wxDefaultValidator - - - - + 0 - + 5 - wxALIGN_CENTER_VERTICAL + wxEXPAND 0 - - 1 - 1 - 1 - 1 - 0 - - 0 - 0 - 0 - - - - - 1 - 0 - 1 - - 1 - - 0 - 0 - - Dock - 0 - Left - 0 - 1 - - 1 - - - 0 - 0 - wxID_ANY - Align bottom - - 0 - - 0 - - - 0 + + 3 + 2 - 1 - m_vAlignBottom - 1 - - - protected - 1 - - - - Resizable - 1 - - wxBORDER_NONE - BITMAP_BUTTON; widgets/bitmap_button.h; forward_declare - 0 - Align bottom - - wxFILTER_NONE - wxDefaultValidator - - - - + gMarginsSizer + none + 0 + 4 + + 5 + wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Cell margins: + 0 + + 0 + + + 0 + + 1 + marginsLabel + 1 + + + none + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + + + -1 + + + + 5 + wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_marginTopCtrl + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + 2 + wxALIGN_CENTER_VERTICAL|wxLEFT + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + mm + 0 + + 0 + + + 0 + + 1 + m_marginTopUnits + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + + + -1 + + + + 5 + wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_marginLeftCtrl + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + 5 + wxEXPAND + 1 + + 0 + protected + 0 + + + + 5 + wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_marginRightCtrl + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + 5 + wxEXPAND + 1 + + 0 + protected + 0 + + + + 5 + wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_marginBottomCtrl + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + - - 5 - wxEXPAND - 0 - - 20 - protected - 0 - - - - 1 - wxEXPAND|wxBOTTOM - 0 - - -1,5 - wxBOTH - 1 - - 5 - - gbFontSizer - wxFLEX_GROWMODE_SPECIFIED - none - 7 - - 1 - 1 - 0 - wxALIGN_CENTER_VERTICAL|wxLEFT - 0 - 1 - - 1 - 1 - 1 - 1 - 0 - - 0 - 0 - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 0 - 1 - - 1 - - 0 - 0 - wxID_ANY - Font: - 0 - - 0 - - - 0 - - 1 - m_fontLabel - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - - - -1 - - - - 5 - 3 - 1 - wxALIGN_CENTER_VERTICAL|wxEXPAND - 0 - 1 - - 1 - 1 - 1 - 1 - 0 - - 0 - 0 - - - - 1 - 0 - "KiCad Font" - 1 - - 1 - 0 - Dock - 0 - Left - 0 - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - 0 - - 1 - m_fontCtrl - 1 - - - protected - 1 - - Resizable - 0 - 1 - - - FONT_CHOICE; widgets/font_choice.h; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - 5 - 1 - 0 - wxALIGN_CENTER_VERTICAL - 1 - 1 - - 1 - 1 - 1 - 1 - 0 - - 0 - 0 - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 0 - 1 - - 1 - - 0 - 0 - wxID_ANY - Style: - 0 - - 0 - - - 0 - - 1 - m_styleLabel - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - - - -1 - - - - 5 - 1 - 1 - wxEXPAND - 1 - 1 - - - bSizer14 - wxHORIZONTAL - none - - 5 - wxALIGN_CENTER_VERTICAL - 0 - - 1 - 1 - 1 - 1 - 0 - - 0 - 0 - - - - 1 - 0 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 0 - 1 - - 1 - - 0 - 0 - wxID_ANY - Bold - - 0 - - - 0 - - 1 - m_bold - 1 - - - protected - 1 - - Resizable - 1 - - wxCHK_3STATE|wxCHK_ALLOW_3RD_STATE_FOR_USER - ; ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - 45 - wxALIGN_CENTER_VERTICAL|wxLEFT - 0 - - 1 - 1 - 1 - 1 - 0 - - 0 - 0 - - - - 1 - 0 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 0 - 1 - - 1 - - 0 - 0 - wxID_ANY - Italic - - 0 - - - 0 - - 1 - m_italic - 1 - - - protected - 1 - - Resizable - 1 - - wxCHK_3STATE|wxCHK_ALLOW_3RD_STATE_FOR_USER - ; ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - 5 - wxEXPAND|wxTOP - 0 - - -1,8 - wxBOTH - - - 5 - - gbSizer1 - wxFLEX_GROWMODE_SPECIFIED - none - 4 - - 4 - 1 - 0 - wxALIGN_CENTER_VERTICAL - 0 - 1 - - 1 - 1 - 1 - 1 - 0 - - 0 - 0 - - - - 1 - 0 - 1 - - 0 - 0 - Dock - 0 - Left - 0 - 1 - - 1 - - 0 - 0 - wxID_ANY - Text width: - 0 - - 0 - - - 0 - - 1 - m_SizeXLabel - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - Text width - - - - -1 - - - - 5 - 1 - 1 - wxALIGN_CENTER_VERTICAL|wxEXPAND - 0 - 1 - - 1 - 1 - 1 - 1 - 0 - - 0 - 0 - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 0 - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - 0 - - 0 - - 1 - m_SizeXCtrl - 1 - - - protected - 1 - - Resizable - 1 - - wxTE_PROCESS_ENTER - ; ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - OnOkClick - - - - 5 - 1 - 2 - wxALIGN_CENTER_VERTICAL - 0 - 1 - - 1 - 1 - 1 - 1 - 0 - - 0 - 0 - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 0 - 1 - - 1 - - 0 - 0 - wxID_ANY - unit - 0 - - 0 - - - 0 - - 1 - m_SizeXUnits - 1 - - - protected - 1 - - Resizable - 1 - - - ; forward_declare - 0 - - - - - -1 - - - - 4 - 1 - 0 - wxALIGN_CENTER_VERTICAL - 1 - 1 - - 1 - 1 - 1 - 1 - 0 - - 0 - 0 - - - - 1 - 0 - 1 - - 0 - 0 - Dock - 0 - Left - 0 - 1 - - 1 - - 0 - 0 - wxID_ANY - Text height: - 0 - - 0 - - - 0 - - 1 - m_SizeYLabel - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - Text height - - - - -1 - - - - 5 - 1 - 1 - wxALIGN_CENTER_VERTICAL|wxEXPAND - 1 - 1 - - 1 - 1 - 1 - 1 - 0 - - 0 - 0 - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 0 - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - 0 - - 0 - - 1 - m_SizeYCtrl - 1 - - - protected - 1 - - Resizable - 1 - - wxTE_PROCESS_ENTER - ; ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - OnOkClick - - - - 5 - 1 - 2 - wxALIGN_CENTER_VERTICAL - 1 - 1 - - 1 - 1 - 1 - 1 - 0 - - 0 - 0 - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 0 - 1 - - 1 - - 0 - 0 - wxID_ANY - unit - 0 - - 0 - - - 0 - - 1 - m_SizeYUnits - 1 - - - protected - 1 - - Resizable - 1 - - - ; forward_declare - 0 - - - - - -1 - - - - 4 - 1 - 0 - wxALIGN_CENTER_VERTICAL - 2 - 1 - - 1 - 1 - 1 - 1 - 0 - - 0 - 0 - - - - 1 - 0 - 1 - - 0 - 0 - Dock - 0 - Left - 0 - 1 - - 1 - - 0 - 0 - wxID_ANY - Thickness: - 0 - - 0 - - - 0 - - 1 - m_ThicknessLabel - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - Text thickness - - - - -1 - - - - 5 - 1 - 1 - wxALIGN_CENTER_VERTICAL|wxEXPAND - 2 - 1 - - 1 - 1 - 1 - 1 - 0 - - 0 - 0 - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 0 - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - 0 - - 0 - - 1 - m_ThicknessCtrl - 1 - - - protected - 1 - - Resizable - 1 - - wxTE_PROCESS_ENTER - ; ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - onThickness - - - - 5 - 1 - 2 - wxALIGN_CENTER_VERTICAL - 2 - 1 - - 1 - 1 - 1 - 1 - 0 - - 0 - 0 - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 0 - 1 - - 1 - - 0 - 0 - wxID_ANY - unit - 0 - - 0 - - - 0 - - 1 - m_ThicknessUnits - 1 - - - protected - 1 - - Resizable - 1 - - - ; forward_declare - 0 - - - - - -1 - - - - - - 5 - wxEXPAND - 0 - - 20 - protected - 0 - - - - 5 - wxEXPAND - 0 - - 3 - 2 - - gMarginsSizer - none - 0 - 4 - - 5 - wxALIGN_CENTER_VERTICAL - 0 - - 1 - 1 - 1 - 1 - 0 - - 0 - 0 - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 0 - 1 - - 1 - - 0 - 0 - wxID_ANY - Cell margins: - 0 - - 0 - - - 0 - - 1 - marginsLabel - 1 - - - none - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - - - -1 - - - - 5 - wxALIGN_CENTER_VERTICAL - 0 - - 1 - 1 - 1 - 1 - 0 - - 0 - 0 - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 0 - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - 0 - - 0 - - 1 - m_marginTopCtrl - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - 2 - wxALIGN_CENTER_VERTICAL|wxLEFT - 0 - - 1 - 1 - 1 - 1 - 0 - - 0 - 0 - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 0 - 1 - - 1 - - 0 - 0 - wxID_ANY - mm - 0 - - 0 - - - 0 - - 1 - m_marginTopUnits - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - - - -1 - - - - 5 - wxALIGN_CENTER_VERTICAL - 0 - - 1 - 1 - 1 - 1 - 0 - - 0 - 0 - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 0 - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - 0 - - 0 - - 1 - m_marginLeftCtrl - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - 5 - wxEXPAND - 1 - - 0 - protected - 0 - - - - 5 - wxALIGN_CENTER_VERTICAL - 0 - - 1 - 1 - 1 - 1 - 0 - - 0 - 0 - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 0 - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - 0 - - 0 - - 1 - m_marginRightCtrl - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - 5 - wxEXPAND - 1 - - 0 - protected - 0 - - - - 5 - wxALIGN_CENTER_VERTICAL - 0 - - 1 - 1 - 1 - 1 - 0 - - 0 - 0 - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 0 - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - 0 - - 0 - - 1 - m_marginBottomCtrl - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - diff --git a/pcbnew/dialogs/dialog_tablecell_properties_base.h b/pcbnew/dialogs/dialog_tablecell_properties_base.h index 516a3de1b9..a07cd5cdf4 100644 --- a/pcbnew/dialogs/dialog_tablecell_properties_base.h +++ b/pcbnew/dialogs/dialog_tablecell_properties_base.h @@ -22,12 +22,13 @@ class WX_INFOBAR; #include #include #include +#include +#include #include #include #include #include #include -#include #include #include #include @@ -46,6 +47,8 @@ class DIALOG_TABLECELL_PROPERTIES_BASE : public DIALOG_SHIM protected: WX_INFOBAR* m_infoBar; + wxStaticText* m_cellTextLabel; + wxStyledTextCtrl* m_cellTextCtrl; BITMAP_BUTTON* m_hAlignLeft; BITMAP_BUTTON* m_hAlignCenter; BITMAP_BUTTON* m_hAlignRight;