28#include <wx/tooltip.h> 
   29#include <wx/wupdlock.h> 
   43    wxToolTip::Enable( 
true );
 
   55                                                     [
this]( wxCommandEvent& aEvent )
 
   60    m_fieldsGrid->SetSelectionMode( wxGrid::wxGridSelectRows );
 
 
   81    for( 
const auto& field : source )
 
   83        m_fields[field.first] = field.second;
 
 
   96    if( illegalCh == 0 && 
m_textName->GetValue().Find( 
'/' ) != wxNOT_FOUND )
 
  101        wxString msg = wxString::Format( 
_( 
"Illegal character '%c' in name '%s'." ),
 
  105        wxMessageDialog errdlg( 
this, msg, 
_( 
"Error" ) );
 
 
  121            [&]() -> std::pair<int, int>
 
  130                m_fieldsGrid->SetCellAlignment( row, 0, wxALIGN_LEFT, wxALIGN_CENTRE );
 
  131                m_fieldsGrid->SetCellAlignment( row, 1, wxALIGN_LEFT, wxALIGN_CENTRE );
 
 
  177    for( 
const auto& [fieldName, fieldValue] : 
m_fields )
 
  183        m_fieldsGrid->SetCellAlignment( row, 0, wxALIGN_LEFT, wxALIGN_CENTRE );
 
  184        m_fieldsGrid->SetCellAlignment( row, 1, wxALIGN_LEFT, wxALIGN_CENTRE );
 
 
  200    for( 
int row = 0; row < 
m_fieldsGrid->GetNumberRows(); row++ )
 
  202        wxString fieldName = 
m_fieldsGrid->GetCellValue( row, 0 ).Strip();
 
  203        fieldName.Replace( wxT( 
"\n" ), wxT( 
"" ), 
true );  
 
  204        fieldName.Replace( wxT( 
"  " ), wxT( 
" " ), 
true ); 
 
  208            wxMessageBox( 
_( 
"Duplicate fields are not allowed." ) );
 
 
wxBitmapBundle KiBitmapBundle(BITMAPS aBitmap, int aMinHeight)
 
STD_BITMAP_BUTTON * m_bpMoveUp
 
DIALOG_DESIGN_BLOCK_PROPERTIES_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Design Block Properties"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
 
STD_BITMAP_BUTTON * m_bpMoveDown
 
STD_BITMAP_BUTTON * m_bpDelete
 
STD_BITMAP_BUTTON * m_bpAdd
 
wxTextCtrl * m_textKeywords
 
wxTextCtrl * m_textDescription
 
void OnDeleteField(wxCommandEvent &aEvent) override
 
DESIGN_BLOCK * m_designBlock
 
void OnMoveFieldUp(wxCommandEvent &aEvent) override
 
bool TransferDataToWindow() override
 
void OnMoveFieldDown(wxCommandEvent &aEvent) override
 
void OnAddField(wxCommandEvent &aEvent) override
 
bool TransferDataFromGrid()
 
~DIALOG_DESIGN_BLOCK_PROPERTIES() override
 
bool TransferDataToGrid()
 
bool TransferDataFromWindow() override
 
DIALOG_DESIGN_BLOCK_PROPERTIES(wxWindow *aParent, DESIGN_BLOCK *aDesignBlock, bool aDisableName=false)
 
nlohmann::ordered_map< wxString, wxString > m_fields
 
void SetupStandardButtons(std::map< int, wxString > aLabels={})
 
Add mouse and command handling (such as cut, copy, and paste) to a WX_GRID instance.
 
A logical library item identifier and consists of various portions much like a URI.
 
static unsigned FindIllegalLibraryNameChar(const UTF8 &aLibraryName)
Looks for characters that are illegal in library nicknames.