Rename GetSelectMenuText to GetItemDescription

This descriptive text is used for many more things than
just the select menu these days.
This commit is contained in:
Jon Evans 2023-01-11 22:27:44 -05:00
parent 1ff1571849
commit c530bdb5a1
85 changed files with 137 additions and 137 deletions

View File

@ -188,7 +188,7 @@ bool DS_DRAW_ITEM_TEXT::HitTest( const BOX2I& aRect, bool aContains, int aAccura
}
wxString DS_DRAW_ITEM_TEXT::GetSelectMenuText( UNITS_PROVIDER* aUnitsProvider ) const
wxString DS_DRAW_ITEM_TEXT::GetItemDescription( UNITS_PROVIDER* aUnitsProvider ) const
{
return wxString::Format( _( "Text '%s'" ), GetShownText() );
}
@ -283,7 +283,7 @@ bool DS_DRAW_ITEM_POLYPOLYGONS::HitTest( const BOX2I& aRect, bool aContained, in
}
wxString DS_DRAW_ITEM_POLYPOLYGONS::GetSelectMenuText( UNITS_PROVIDER* aUnitsProvider ) const
wxString DS_DRAW_ITEM_POLYPOLYGONS::GetItemDescription( UNITS_PROVIDER* aUnitsProvider ) const
{
return _( "Imported Shape" );
}
@ -379,7 +379,7 @@ bool DS_DRAW_ITEM_RECT::HitTest( const BOX2I& aRect, bool aContained, int aAccur
}
wxString DS_DRAW_ITEM_RECT::GetSelectMenuText( UNITS_PROVIDER* aUnitsProvider ) const
wxString DS_DRAW_ITEM_RECT::GetItemDescription( UNITS_PROVIDER* aUnitsProvider ) const
{
return wxString::Format( _( "Rectangle, width %s height %s" ),
aUnitsProvider->MessageTextFromValue( std::abs( GetStart().x - GetEnd().x ) ),
@ -412,7 +412,7 @@ bool DS_DRAW_ITEM_LINE::HitTest( const VECTOR2I& aPosition, int aAccuracy ) cons
}
wxString DS_DRAW_ITEM_LINE::GetSelectMenuText( UNITS_PROVIDER* aUnitsProvider ) const
wxString DS_DRAW_ITEM_LINE::GetItemDescription( UNITS_PROVIDER* aUnitsProvider ) const
{
return wxString::Format( _( "Line, length %s" ),
aUnitsProvider->MessageTextFromValue( EuclideanNorm( GetStart() - GetEnd() ) ) );
@ -460,13 +460,13 @@ bool DS_DRAW_ITEM_BITMAP::HitTest( const BOX2I& aRect, bool aContains, int aAccu
}
wxString DS_DRAW_ITEM_BITMAP::GetSelectMenuText( UNITS_PROVIDER* aUnitsProvider ) const
wxString DS_DRAW_ITEM_BITMAP::GetItemDescription( UNITS_PROVIDER* aUnitsProvider ) const
{
return _( "Image" );
}
wxString DS_DRAW_ITEM_PAGE::GetSelectMenuText( UNITS_PROVIDER* aUnitsProvider ) const
wxString DS_DRAW_ITEM_PAGE::GetItemDescription( UNITS_PROVIDER* aUnitsProvider ) const
{
return _( "Page Limits" );
}

View File

@ -105,12 +105,12 @@ INSPECT_RESULT EDA_ITEM::Visit( INSPECTOR inspector, void* testData,
}
wxString EDA_ITEM::GetSelectMenuText( UNITS_PROVIDER* aUnitsProvider ) const
wxString EDA_ITEM::GetItemDescription( UNITS_PROVIDER* aUnitsProvider ) const
{
wxFAIL_MSG( wxT( "GetSelectMenuText() was not overridden for schematic item type " ) +
wxFAIL_MSG( wxT( "GetItemDescription() was not overridden for schematic item type " ) +
GetClass() );
return wxString( wxT( "Undefined menu text for " ) + GetClass() );
return wxString( wxT( "Undefined item description for " ) + GetClass() );
}

View File

@ -121,9 +121,9 @@ wxString RC_ITEM::ShowReport( UNITS_PROVIDER* aUnitsProvider, SEVERITY aSeverity
GetViolatingRuleDesc(),
severity,
showCoord( aUnitsProvider, mainItem->GetPosition()),
mainItem->GetSelectMenuText( aUnitsProvider ),
mainItem->GetItemDescription( aUnitsProvider ),
showCoord( aUnitsProvider, auxItem->GetPosition()),
auxItem->GetSelectMenuText( aUnitsProvider ) );
auxItem->GetItemDescription( aUnitsProvider ) );
}
else if( mainItem )
{
@ -133,7 +133,7 @@ wxString RC_ITEM::ShowReport( UNITS_PROVIDER* aUnitsProvider, SEVERITY aSeverity
GetViolatingRuleDesc(),
severity,
showCoord( aUnitsProvider, mainItem->GetPosition()),
mainItem->GetSelectMenuText( aUnitsProvider ) );
mainItem->GetItemDescription( aUnitsProvider ) );
}
else
{
@ -374,7 +374,7 @@ void RC_TREE_MODEL::GetValue( wxVariant& aVariant,
else
{
EDA_ITEM* item = m_editFrame->GetItem( rcItem->GetMainItemID() );
aVariant = item->GetSelectMenuText( m_editFrame );
aVariant = item->GetItemDescription( m_editFrame );
}
break;
@ -382,21 +382,21 @@ void RC_TREE_MODEL::GetValue( wxVariant& aVariant,
case RC_TREE_NODE::AUX_ITEM:
{
EDA_ITEM* item = m_editFrame->GetItem( rcItem->GetAuxItemID() );
aVariant = item->GetSelectMenuText( m_editFrame );
aVariant = item->GetItemDescription( m_editFrame );
}
break;
case RC_TREE_NODE::AUX_ITEM2:
{
EDA_ITEM* item = m_editFrame->GetItem( rcItem->GetAuxItem2ID() );
aVariant = item->GetSelectMenuText( m_editFrame );
aVariant = item->GetItemDescription( m_editFrame );
}
break;
case RC_TREE_NODE::AUX_ITEM3:
{
EDA_ITEM* item = m_editFrame->GetItem( rcItem->GetAuxItem3ID() );
aVariant = item->GetSelectMenuText( m_editFrame );
aVariant = item->GetItemDescription( m_editFrame );
}
break;
}

View File

@ -273,18 +273,18 @@ bool SELECTION_TOOL::doSelectionMenu( COLLECTOR* aCollector )
{
#ifdef __WXMAC__
menuText = wxString::Format( "%s\t%d",
item->GetSelectMenuText( unitsProvider ),
item->GetItemDescription( unitsProvider ),
i + 1 );
#else
menuText = wxString::Format( "&%d %s\t%d",
i + 1,
item->GetSelectMenuText( unitsProvider ),
item->GetItemDescription( unitsProvider ),
i + 1 );
#endif
}
else
{
menuText = item->GetSelectMenuText( unitsProvider );
menuText = item->GetItemDescription( unitsProvider );
}
menu.Add( menuText, i + 1, item->GetMenuImage() );

View File

@ -992,7 +992,7 @@ void CONNECTION_GRAPH::collectAllDriverValues()
UNITS_PROVIDER unitsProvider( schIUScale, EDA_UNITS::MILLIMETRES );
wxLogTrace( ConnTrace, "Unexpected strong driver %s",
driver->GetSelectMenuText( &unitsProvider ) );
driver->GetItemDescription( &unitsProvider ) );
break;
}
}
@ -1187,7 +1187,7 @@ void CONNECTION_GRAPH::processSubGraphs()
wxLogTrace( ConnTrace,
"%ld (%s) weakly driven by unique sheet pin %s, promoting",
subgraph->m_code, name,
subgraph->m_driver->GetSelectMenuText( &unitsProvider ) );
subgraph->m_driver->GetItemDescription( &unitsProvider ) );
subgraph->m_strong_driver = true;
}

View File

@ -508,7 +508,7 @@ void LIB_FIELD::SetName( const wxString& aName )
}
wxString LIB_FIELD::GetSelectMenuText( UNITS_PROVIDER* aUnitsProvider ) const
wxString LIB_FIELD::GetItemDescription( UNITS_PROVIDER* aUnitsProvider ) const
{
return wxString::Format( "%s '%s'", GetName(), KIUI::EllipsizeMenuText( GetShownText() ) );
}

View File

@ -166,7 +166,7 @@ public:
void Plot( PLOTTER* aPlotter, bool aBackground, const VECTOR2I& aOffset,
const TRANSFORM& aTransform, bool aDimmed ) const override;
wxString GetSelectMenuText( UNITS_PROVIDER* aUnitsProvider ) const override;
wxString GetItemDescription( UNITS_PROVIDER* aUnitsProvider ) const override;
BITMAPS GetMenuImage() const override;

View File

@ -1338,7 +1338,7 @@ BITMAPS LIB_PIN::GetMenuImage() const
}
wxString LIB_PIN::GetSelectMenuText( UNITS_PROVIDER* aUnitsProvider ) const
wxString LIB_PIN::GetItemDescription( UNITS_PROVIDER* aUnitsProvider ) const
{
// This code previously checked "m_name.IsEmpty()" to choose the correct
// formatting path, but that check fails if the pin is called "~" which is

View File

@ -233,7 +233,7 @@ public:
BITMAPS GetMenuImage() const override;
wxString GetSelectMenuText( UNITS_PROVIDER* aUnitsProvider ) const override;
wxString GetItemDescription( UNITS_PROVIDER* aUnitsProvider ) const override;
EDA_ITEM* Clone() const override;

View File

@ -461,7 +461,7 @@ void LIB_SHAPE::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_I
}
wxString LIB_SHAPE::GetSelectMenuText( UNITS_PROVIDER* aUnitsProvider ) const
wxString LIB_SHAPE::GetItemDescription( UNITS_PROVIDER* aUnitsProvider ) const
{
switch( GetShape() )
{

View File

@ -107,7 +107,7 @@ public:
void Plot( PLOTTER* aPlotter, bool aBackground, const VECTOR2I& aOffset,
const TRANSFORM& aTransform, bool aDimmed ) const override;
wxString GetSelectMenuText( UNITS_PROVIDER* aUnitsProvider ) const override;
wxString GetItemDescription( UNITS_PROVIDER* aUnitsProvider ) const override;
BITMAPS GetMenuImage() const override;

View File

@ -455,7 +455,7 @@ const BOX2I LIB_TEXT::GetBoundingBox() const
}
wxString LIB_TEXT::GetSelectMenuText( UNITS_PROVIDER* aUnitsProvider ) const
wxString LIB_TEXT::GetItemDescription( UNITS_PROVIDER* aUnitsProvider ) const
{
return wxString::Format( _( "Graphic Text '%s'" ), KIUI::EllipsizeMenuText( GetShownText() ) );
}

View File

@ -101,7 +101,7 @@ public:
void Plot( PLOTTER* aPlotter, bool aBackground, const VECTOR2I& aOffset,
const TRANSFORM& aTransform, bool aDimmed ) const override;
wxString GetSelectMenuText( UNITS_PROVIDER* aUnitsProvider ) const override;
wxString GetItemDescription( UNITS_PROVIDER* aUnitsProvider ) const override;
void GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_ITEM>& aList ) override;
BITMAPS GetMenuImage() const override;

View File

@ -370,7 +370,7 @@ bool LIB_TEXTBOX::HitTest( const BOX2I& aRect, bool aContained, int aAccuracy )
}
wxString LIB_TEXTBOX::GetSelectMenuText( UNITS_PROVIDER* aUnitsProvider ) const
wxString LIB_TEXTBOX::GetItemDescription( UNITS_PROVIDER* aUnitsProvider ) const
{
return wxString::Format( _( "Graphic Text Box" ) );
}

View File

@ -77,7 +77,7 @@ public:
virtual bool IsReplaceable() const override { return true; }
wxString GetSelectMenuText( UNITS_PROVIDER* aUnitsProvider ) const override;
wxString GetItemDescription( UNITS_PROVIDER* aUnitsProvider ) const override;
BITMAPS GetMenuImage() const override;

View File

@ -124,7 +124,7 @@ public:
void MirrorVertically( int aCenter ) override;
void Rotate( const VECTOR2I& aCenter ) override;
wxString GetSelectMenuText( UNITS_PROVIDER* aUnitsProvider ) const override
wxString GetItemDescription( UNITS_PROVIDER* aUnitsProvider ) const override
{
return wxString( _( "Image" ) );
}

View File

@ -413,13 +413,13 @@ std::vector<VECTOR2I> SCH_BUS_ENTRY_BASE::GetConnectionPoints() const
}
wxString SCH_BUS_WIRE_ENTRY::GetSelectMenuText( UNITS_PROVIDER* aUnitsProvider ) const
wxString SCH_BUS_WIRE_ENTRY::GetItemDescription( UNITS_PROVIDER* aUnitsProvider ) const
{
return wxString( _( "Bus to Wire Entry" ) );
}
wxString SCH_BUS_BUS_ENTRY::GetSelectMenuText( UNITS_PROVIDER* aUnitsProvider ) const
wxString SCH_BUS_BUS_ENTRY::GetItemDescription( UNITS_PROVIDER* aUnitsProvider ) const
{
return wxString( _( "Bus to Bus Entry" ) );
}

View File

@ -178,7 +178,7 @@ public:
( aItem->GetLayer() == LAYER_WIRE || aItem->GetLayer() == LAYER_BUS );
}
wxString GetSelectMenuText( UNITS_PROVIDER* aUnitsProvider ) const override;
wxString GetItemDescription( UNITS_PROVIDER* aUnitsProvider ) const override;
EDA_ITEM* Clone() const override;
@ -225,7 +225,7 @@ public:
return aItem->Type() == SCH_LINE_T && aItem->GetLayer() == LAYER_BUS;
}
wxString GetSelectMenuText( UNITS_PROVIDER* aUnitsProvider ) const override;
wxString GetItemDescription( UNITS_PROVIDER* aUnitsProvider ) const override;
EDA_ITEM* Clone() const override;

View File

@ -441,7 +441,7 @@ void SCH_CONNECTION::AppendInfoToMsgPanel( std::vector<MSG_PANEL_ITEM>& aList )
{
UNITS_PROVIDER unitsProvider( schIUScale, EDA_UNITS::MILLIMETRES );
msg.Printf( "%s at %p", driver->GetSelectMenuText( &unitsProvider ), driver );
msg.Printf( "%s at %p", driver->GetItemDescription( &unitsProvider ), driver );
aList.emplace_back( wxT( "Connection Source" ), msg );
}
#endif

View File

@ -751,7 +751,7 @@ void SCH_FIELD::Rotate( const VECTOR2I& aCenter )
}
wxString SCH_FIELD::GetSelectMenuText( UNITS_PROVIDER* aUnitsProvider ) const
wxString SCH_FIELD::GetItemDescription( UNITS_PROVIDER* aUnitsProvider ) const
{
return wxString::Format( "%s '%s'", GetName(), KIUI::EllipsizeMenuText( GetShownText() ) );
}

View File

@ -216,7 +216,7 @@ public:
bool Replace( const EDA_SEARCH_DATA& aSearchData, void* aAuxData = nullptr ) override;
wxString GetSelectMenuText( UNITS_PROVIDER* aUnitsProvider ) const override;
wxString GetItemDescription( UNITS_PROVIDER* aUnitsProvider ) const override;
void GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_ITEM>& aList ) override;
BITMAPS GetMenuImage() const override;

View File

@ -92,7 +92,7 @@ public:
|| aItem->Type() == SCH_SYMBOL_T );
}
wxString GetSelectMenuText( UNITS_PROVIDER* aUnitsProvider ) const override
wxString GetItemDescription( UNITS_PROVIDER* aUnitsProvider ) const override
{
return wxString( _( "Junction" ) );
}

View File

@ -1059,7 +1059,7 @@ const BOX2I SCH_LABEL::GetBodyBoundingBox() const
}
wxString SCH_LABEL::GetSelectMenuText( UNITS_PROVIDER* aUnitsProvider ) const
wxString SCH_LABEL::GetItemDescription( UNITS_PROVIDER* aUnitsProvider ) const
{
return wxString::Format( _( "Label '%s'" ), KIUI::EllipsizeMenuText( GetShownText() ) );
}
@ -1230,7 +1230,7 @@ void SCH_DIRECTIVE_LABEL::AutoplaceFields( SCH_SCREEN* aScreen, bool aManual )
}
wxString SCH_DIRECTIVE_LABEL::GetSelectMenuText( UNITS_PROVIDER* aUnitsProvider ) const
wxString SCH_DIRECTIVE_LABEL::GetItemDescription( UNITS_PROVIDER* aUnitsProvider ) const
{
if( m_fields.empty() )
{
@ -1512,7 +1512,7 @@ void SCH_GLOBALLABEL::CreateGraphicShape( const RENDER_SETTINGS* aRenderSettings
}
wxString SCH_GLOBALLABEL::GetSelectMenuText( UNITS_PROVIDER* aUnitsProvider ) const
wxString SCH_GLOBALLABEL::GetItemDescription( UNITS_PROVIDER* aUnitsProvider ) const
{
return wxString::Format( _( "Global Label '%s'" ), KIUI::EllipsizeMenuText( GetShownText() ) );
}
@ -1645,7 +1645,7 @@ VECTOR2I SCH_HIERLABEL::GetSchematicTextOffset( const RENDER_SETTINGS* aSettings
}
wxString SCH_HIERLABEL::GetSelectMenuText( UNITS_PROVIDER* aUnitsProvider ) const
wxString SCH_HIERLABEL::GetItemDescription( UNITS_PROVIDER* aUnitsProvider ) const
{
return wxString::Format( _( "Hierarchical Label '%s'" ),
KIUI::EllipsizeMenuText( GetShownText() ) );

View File

@ -241,7 +241,7 @@ public:
bool IsConnectable() const override { return true; }
wxString GetSelectMenuText( UNITS_PROVIDER* aUnitsProvider ) const override;
wxString GetItemDescription( UNITS_PROVIDER* aUnitsProvider ) const override;
BITMAPS GetMenuImage() const override;
@ -303,7 +303,7 @@ public:
void AutoplaceFields( SCH_SCREEN* aScreen, bool aManual ) override;
wxString GetSelectMenuText( UNITS_PROVIDER* aUnitsProvider ) const override;
wxString GetItemDescription( UNITS_PROVIDER* aUnitsProvider ) const override;
bool IsConnectable() const override { return true; }
@ -359,7 +359,7 @@ public:
void ViewGetLayers( int aLayers[], int& aCount ) const override;
wxString GetSelectMenuText( UNITS_PROVIDER* aUnitsProvider ) const override;
wxString GetItemDescription( UNITS_PROVIDER* aUnitsProvider ) const override;
BITMAPS GetMenuImage() const override;
@ -411,7 +411,7 @@ public:
bool IsConnectable() const override { return true; }
wxString GetSelectMenuText( UNITS_PROVIDER* aUnitsProvider ) const override;
wxString GetItemDescription( UNITS_PROVIDER* aUnitsProvider ) const override;
BITMAPS GetMenuImage() const override;

View File

@ -690,7 +690,7 @@ void SCH_LINE::GetSelectedPoints( std::vector<VECTOR2I>& aPoints ) const
}
wxString SCH_LINE::GetSelectMenuText( UNITS_PROVIDER* aUnitsProvider ) const
wxString SCH_LINE::GetItemDescription( UNITS_PROVIDER* aUnitsProvider ) const
{
wxString txtfmt;

View File

@ -253,7 +253,7 @@ public:
bool CanConnect( const SCH_ITEM* aItem ) const override;
wxString GetSelectMenuText( UNITS_PROVIDER* aUnitsProvider ) const override;
wxString GetItemDescription( UNITS_PROVIDER* aUnitsProvider ) const override;
BITMAPS GetMenuImage() const override;

View File

@ -94,7 +94,7 @@ public:
void GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_ITEM>& aList ) override;
wxString GetSelectMenuText( UNITS_PROVIDER* aUnitsProvider ) const override
wxString GetItemDescription( UNITS_PROVIDER* aUnitsProvider ) const override
{
return wxString( _( "ERC Marker" ) );
}

View File

@ -92,7 +92,7 @@ public:
std::vector<VECTOR2I> GetConnectionPoints() const override;
wxString GetSelectMenuText( UNITS_PROVIDER* aUnitsProvider ) const override
wxString GetItemDescription( UNITS_PROVIDER* aUnitsProvider ) const override
{
return wxString( _( "No Connect" ) );
}

View File

@ -191,11 +191,11 @@ SCH_SYMBOL* SCH_PIN::GetParentSymbol() const
}
wxString SCH_PIN::GetSelectMenuText( UNITS_PROVIDER* aUnitsProvider ) const
wxString SCH_PIN::GetItemDescription( UNITS_PROVIDER* aUnitsProvider ) const
{
return wxString::Format( "Symbol %s %s",
GetParentSymbol()->GetField( REFERENCE_FIELD )->GetShownText(),
m_libPin->GetSelectMenuText( aUnitsProvider ) );
m_libPin->GetItemDescription( aUnitsProvider ) );
}

View File

@ -68,7 +68,7 @@ public:
void ViewGetLayers( int aLayers[], int& aCount ) const override;
wxString GetSelectMenuText( UNITS_PROVIDER* aUnitsProvider ) const override;
wxString GetItemDescription( UNITS_PROVIDER* aUnitsProvider ) const override;
void GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_ITEM>& aList ) override;
void Print( const RENDER_SETTINGS* aSettings, const VECTOR2I& aOffset ) override {}

View File

@ -399,7 +399,7 @@ void SCH_SHAPE::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_I
}
wxString SCH_SHAPE::GetSelectMenuText( UNITS_PROVIDER* aUnitsProvider ) const
wxString SCH_SHAPE::GetItemDescription( UNITS_PROVIDER* aUnitsProvider ) const
{
switch( GetShape() )
{

View File

@ -99,7 +99,7 @@ public:
void GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_ITEM>& aList ) override;
wxString GetSelectMenuText( UNITS_PROVIDER* aUnitsProvider ) const override;
wxString GetItemDescription( UNITS_PROVIDER* aUnitsProvider ) const override;
BITMAPS GetMenuImage() const override;

View File

@ -1034,7 +1034,7 @@ void SCH_SHEET::RunOnChildren( const std::function<void( SCH_ITEM* )>& aFunction
}
wxString SCH_SHEET::GetSelectMenuText( UNITS_PROVIDER* aUnitsProvider ) const
wxString SCH_SHEET::GetItemDescription( UNITS_PROVIDER* aUnitsProvider ) const
{
return wxString::Format( _( "Hierarchical Sheet %s" ),
m_fields[ SHEETNAME ].GetText() );

View File

@ -355,7 +355,7 @@ public:
void RunOnChildren( const std::function<void( SCH_ITEM* )>& aFunction ) override;
wxString GetSelectMenuText( UNITS_PROVIDER* aUnitsProvider ) const override;
wxString GetItemDescription( UNITS_PROVIDER* aUnitsProvider ) const override;
BITMAPS GetMenuImage() const override;

View File

@ -52,7 +52,7 @@ public:
SCH_ITEM( nullptr, NOT_USED )
{}
wxString GetSelectMenuText( UNITS_PROVIDER* aUnitsProvider ) const override
wxString GetItemDescription( UNITS_PROVIDER* aUnitsProvider ) const override
{
return _( "(Deleted Item)" );
}

View File

@ -325,7 +325,7 @@ void SCH_SHEET_PIN::GetEndPoints( std::vector<DANGLING_END_ITEM>& aItemList )
}
wxString SCH_SHEET_PIN::GetSelectMenuText( UNITS_PROVIDER* aUnitsProvider ) const
wxString SCH_SHEET_PIN::GetItemDescription( UNITS_PROVIDER* aUnitsProvider ) const
{
return wxString::Format( _( "Hierarchical Sheet Pin %s" ),
KIUI::EllipsizeMenuText( GetShownText() ) );

View File

@ -182,7 +182,7 @@ public:
bool IsConnectable() const override { return true; }
wxString GetSelectMenuText( UNITS_PROVIDER* aUnitsProvider ) const override;
wxString GetItemDescription( UNITS_PROVIDER* aUnitsProvider ) const override;
BITMAPS GetMenuImage() const override;

View File

@ -1857,7 +1857,7 @@ LIB_ITEM* SCH_SYMBOL::GetDrawItem( const VECTOR2I& aPosition, KICAD_T aType )
}
wxString SCH_SYMBOL::GetSelectMenuText( UNITS_PROVIDER* aUnitsProvider ) const
wxString SCH_SYMBOL::GetItemDescription( UNITS_PROVIDER* aUnitsProvider ) const
{
return wxString::Format( _( "Symbol %s [%s]" ),
GetField( REFERENCE_FIELD )->GetShownText(),

View File

@ -696,7 +696,7 @@ public:
*/
LIB_ITEM* GetDrawItem( const VECTOR2I& aPosition, KICAD_T aType = TYPE_NOT_INIT );
wxString GetSelectMenuText( UNITS_PROVIDER* aUnitsProvider ) const override;
wxString GetItemDescription( UNITS_PROVIDER* aUnitsProvider ) const override;
BITMAPS GetMenuImage() const override;

View File

@ -398,7 +398,7 @@ void SCH_TEXT::DoHypertextAction( EDA_DRAW_FRAME* aFrame ) const
}
wxString SCH_TEXT::GetSelectMenuText( UNITS_PROVIDER* aUnitsProvider ) const
wxString SCH_TEXT::GetItemDescription( UNITS_PROVIDER* aUnitsProvider ) const
{
return wxString::Format( _( "Graphic Text '%s'" ), KIUI::EllipsizeMenuText( GetShownText() ) );
}

View File

@ -196,7 +196,7 @@ public:
void ViewGetLayers( int aLayers[], int& aCount ) const override;
wxString GetSelectMenuText( UNITS_PROVIDER* aUnitsProvider ) const override;
wxString GetItemDescription( UNITS_PROVIDER* aUnitsProvider ) const override;
BITMAPS GetMenuImage() const override;

View File

@ -367,7 +367,7 @@ void SCH_TEXTBOX::DoHypertextAction( EDA_DRAW_FRAME* aFrame ) const
}
wxString SCH_TEXTBOX::GetSelectMenuText( UNITS_PROVIDER* aUnitsProvider ) const
wxString SCH_TEXTBOX::GetItemDescription( UNITS_PROVIDER* aUnitsProvider ) const
{
return wxString::Format( _( "Graphic Text Box" ) );
}

View File

@ -98,7 +98,7 @@ public:
virtual bool IsReplaceable() const override { return true; }
wxString GetSelectMenuText( UNITS_PROVIDER* aUnitsProvider ) const override;
wxString GetItemDescription( UNITS_PROVIDER* aUnitsProvider ) const override;
BITMAPS GetMenuImage() const override;

View File

@ -993,7 +993,7 @@ INSPECT_RESULT GERBER_DRAW_ITEM::Visit( INSPECTOR inspector, void* testData,
}
wxString GERBER_DRAW_ITEM::GetSelectMenuText( UNITS_PROVIDER* aUnitsProvider ) const
wxString GERBER_DRAW_ITEM::GetItemDescription( UNITS_PROVIDER* aUnitsProvider ) const
{
wxString layerName = GERBER_FILE_IMAGE_LIST::GetImagesList().GetDisplayName( GetLayer(), true );

View File

@ -221,8 +221,8 @@ public:
INSPECT_RESULT Visit( INSPECTOR inspector, void* testData,
const std::vector<KICAD_T>& aScanTypes ) override;
///< @copydoc EDA_ITEM::GetSelectMenuText()
virtual wxString GetSelectMenuText( UNITS_PROVIDER* aUnitsProvider ) const override;
///< @copydoc EDA_ITEM::GetItemDescription()
virtual wxString GetItemDescription( UNITS_PROVIDER* aUnitsProvider ) const override;
///< @copydoc EDA_ITEM::GetMenuImage()
BITMAPS GetMenuImage() const override;

View File

@ -351,7 +351,7 @@ public:
BOARD_ITEM( nullptr, NOT_USED )
{}
wxString GetSelectMenuText( UNITS_PROVIDER* aUnitsProvider ) const override
wxString GetItemDescription( UNITS_PROVIDER* aUnitsProvider ) const override
{
return _( "(Deleted Item)" );
}

View File

@ -144,7 +144,7 @@ public:
void PrintWsItem( const RENDER_SETTINGS* aSettings, const VECTOR2I& aOffset ) override;
wxString GetSelectMenuText( UNITS_PROVIDER* aUnitsProvider ) const override;
wxString GetItemDescription( UNITS_PROVIDER* aUnitsProvider ) const override;
#if defined(DEBUG)
void Show( int nestLevel, std::ostream& os ) const override { ShowDummy( os ); }
@ -179,7 +179,7 @@ public:
void PrintWsItem( const RENDER_SETTINGS* aSettings, const VECTOR2I& aOffset ) override;
wxString GetSelectMenuText( UNITS_PROVIDER* aUnitsProvider ) const override;
wxString GetItemDescription( UNITS_PROVIDER* aUnitsProvider ) const override;
#if defined(DEBUG)
void Show( int nestLevel, std::ostream& os ) const override { ShowDummy( os ); }
@ -233,7 +233,7 @@ public:
bool HitTest( const VECTOR2I& aPosition, int aAccuracy = 0 ) const override;
bool HitTest( const BOX2I& aRect, bool aContained, int aAccuracy = 0 ) const override;
wxString GetSelectMenuText( UNITS_PROVIDER* aUnitsProvider ) const override;
wxString GetItemDescription( UNITS_PROVIDER* aUnitsProvider ) const override;
#if defined(DEBUG)
void Show( int nestLevel, std::ostream& os ) const override { ShowDummy( os ); }
@ -280,7 +280,7 @@ public:
const BOX2I GetBoundingBox() const override;
bool HitTest( const VECTOR2I& aPosition, int aAccuracy = 0 ) const override { return false; }
wxString GetSelectMenuText( UNITS_PROVIDER* aUnitsProvider ) const override;
wxString GetItemDescription( UNITS_PROVIDER* aUnitsProvider ) const override;
#if defined(DEBUG)
void Show( int nestLevel, std::ostream& os ) const override { ShowDummy( os ); }
@ -330,7 +330,7 @@ public:
bool HitTest( const VECTOR2I& aPosition, int aAccuracy = 0 ) const override;
bool HitTest( const BOX2I& aRect, bool aContained, int aAccuracy = 0 ) const override;
wxString GetSelectMenuText( UNITS_PROVIDER* aUnitsProvider ) const override;
wxString GetItemDescription( UNITS_PROVIDER* aUnitsProvider ) const override;
#if defined(DEBUG)
void Show( int nestLevel, std::ostream& os ) const override { ShowDummy( os ); }
@ -364,7 +364,7 @@ public:
const BOX2I GetBoundingBox() const override;
wxString GetSelectMenuText( UNITS_PROVIDER* aUnitsProvider ) const override;
wxString GetItemDescription( UNITS_PROVIDER* aUnitsProvider ) const override;
#if defined(DEBUG)
void Show( int nestLevel, std::ostream& os ) const override { ShowDummy( os ); }

View File

@ -347,8 +347,8 @@ public:
wxString GetTypeDesc() const;
/**
* Return the text to display to be used in the selection clarification context menu
* when multiple items are found at the current cursor position.
* Return a user-visible description string of this item. This description is used in
* disambiguation menus, the message panel, ERC/DRC reports, etc.
*
* The default version of this function raises an assertion in the debug mode and
* returns a string to indicate that it was not overridden to provide the object
@ -356,7 +356,7 @@ public:
*
* @return The menu text string.
*/
virtual wxString GetSelectMenuText( UNITS_PROVIDER* aUnitsProvider ) const;
virtual wxString GetItemDescription( UNITS_PROVIDER* aUnitsProvider ) const;
/**
* Return a pointer to an image to be used in menus.

View File

@ -180,8 +180,8 @@ public:
///< @copydoc BOARD_ITEM::Flip
void Flip( const VECTOR2I& aCentre, bool aFlipLeftRight ) override;
///< @copydoc EDA_ITEM::GetSelectMenuText
wxString GetSelectMenuText( UNITS_PROVIDER* aUnitsProvider ) const override;
///< @copydoc EDA_ITEM::GetItemDescription
wxString GetItemDescription( UNITS_PROVIDER* aUnitsProvider ) const override;
///< @copydoc EDA_ITEM::GetMenuImage
BITMAPS GetMenuImage() const override;

View File

@ -923,7 +923,7 @@ void BOARD::Remove( BOARD_ITEM* aBoardItem, REMOVE_MODE aRemoveMode )
}
wxString BOARD::GetSelectMenuText( UNITS_PROVIDER* aUnitsProvider ) const
wxString BOARD::GetItemDescription( UNITS_PROVIDER* aUnitsProvider ) const
{
return wxString::Format( _( "PCB" ) );
}

View File

@ -633,7 +633,7 @@ public:
const TITLE_BLOCK& GetTitleBlock() const { return m_titles; }
void SetTitleBlock( const TITLE_BLOCK& aTitleBlock ) { m_titles = aTitleBlock; }
wxString GetSelectMenuText( UNITS_PROVIDER* aUnitsProvider ) const override;
wxString GetItemDescription( UNITS_PROVIDER* aUnitsProvider ) const override;
/**
* Extract the board outlines and build a closed polygon from lines, arcs and circle items

View File

@ -49,7 +49,7 @@ DIALOG_GROUP_PROPERTIES::DIALOG_GROUP_PROPERTIES( PCB_BASE_EDIT_FRAME* aParent,
m_locked->Show( dynamic_cast<PCB_EDIT_FRAME*>( aParent ) != nullptr );
for( BOARD_ITEM* item : m_group->GetItems() )
m_membersList->Append( item->GetSelectMenuText( m_brdEditor ), item );
m_membersList->Append( item->GetItemDescription( m_brdEditor ), item );
SetupStandardButtons();
@ -157,7 +157,7 @@ void DIALOG_GROUP_PROPERTIES::DoAddMember( EDA_ITEM* aItem )
if( aItem == m_group )
return;
m_membersList->Append( aItem->GetSelectMenuText( m_brdEditor ), aItem );
m_membersList->Append( aItem->GetItemDescription( m_brdEditor ), aItem );
}

View File

@ -239,7 +239,7 @@ void DIALOG_POSITION_RELATIVE::updateAnchorInfo( BOARD_ITEM* aItem )
wxString msg = _( "<none selected>" );
if( aItem )
msg = aItem->GetSelectMenuText( &unitsProvider );
msg = aItem->GetItemDescription( &unitsProvider );
m_referenceInfo->SetLabel( wxString::Format( _( "Reference item: %s" ), msg ) );
break;

View File

@ -733,7 +733,7 @@ DRC_CONSTRAINT DRC_ENGINE::EvalRules( DRC_CONSTRAINT_T aConstraintType, const BO
{
REPORT( "" )
REPORT( wxString::Format( _( "Local override on %s; clearance: %s." ),
EscapeHTML( a->GetSelectMenuText( this ) ),
EscapeHTML( a->GetItemDescription( this ) ),
MessageTextFromValue( overrideA ) ) )
override_val = ac->GetLocalClearanceOverrides( &msg );
@ -743,7 +743,7 @@ DRC_CONSTRAINT DRC_ENGINE::EvalRules( DRC_CONSTRAINT_T aConstraintType, const BO
{
REPORT( "" )
REPORT( wxString::Format( _( "Local override on %s; clearance: %s." ),
EscapeHTML( b->GetSelectMenuText( this ) ),
EscapeHTML( b->GetItemDescription( this ) ),
EscapeHTML( MessageTextFromValue( overrideB ) ) ) )
if( overrideB > override_val )
@ -792,7 +792,7 @@ DRC_CONSTRAINT DRC_ENGINE::EvalRules( DRC_CONSTRAINT_T aConstraintType, const BO
REPORT( "" )
REPORT( wxString::Format( _( "Local override on %s; zone connection: %s." ),
EscapeHTML( pad->GetSelectMenuText( this ) ),
EscapeHTML( pad->GetItemDescription( this ) ),
EscapeHTML( PrintZoneConnection( override ) ) ) )
constraint.SetName( msg );
@ -809,7 +809,7 @@ DRC_CONSTRAINT DRC_ENGINE::EvalRules( DRC_CONSTRAINT_T aConstraintType, const BO
REPORT( "" )
REPORT( wxString::Format( _( "Local override on %s; thermal relief gap: %s." ),
EscapeHTML( pad->GetSelectMenuText( this ) ),
EscapeHTML( pad->GetItemDescription( this ) ),
EscapeHTML( MessageTextFromValue( gap_override ) ) ) )
constraint.SetName( msg );
@ -826,7 +826,7 @@ DRC_CONSTRAINT DRC_ENGINE::EvalRules( DRC_CONSTRAINT_T aConstraintType, const BO
REPORT( "" )
REPORT( wxString::Format( _( "Local override on %s; thermal spoke width: %s." ),
EscapeHTML( pad->GetSelectMenuText( this ) ),
EscapeHTML( pad->GetItemDescription( this ) ),
EscapeHTML( MessageTextFromValue( spoke_override ) ) ) )
if( zone && zone->GetMinThickness() > spoke_override )
@ -835,7 +835,7 @@ DRC_CONSTRAINT DRC_ENGINE::EvalRules( DRC_CONSTRAINT_T aConstraintType, const BO
REPORT( "" )
REPORT( wxString::Format( _( "%s min thickness: %s." ),
EscapeHTML( zone->GetSelectMenuText( this ) ),
EscapeHTML( zone->GetItemDescription( this ) ),
EscapeHTML( MessageTextFromValue( spoke_override ) ) ) )
}
@ -1192,7 +1192,7 @@ DRC_CONSTRAINT DRC_ENGINE::EvalRules( DRC_CONSTRAINT_T aConstraintType, const BO
const BOARD_ITEM* x = !hasDrilledHole( a ) ? a : b;
REPORT( wxString::Format( _( "%s is not a drilled hole; rule ignored." ),
x->GetSelectMenuText( this ) ) )
x->GetItemDescription( this ) ) )
}
return false;
@ -1330,7 +1330,7 @@ DRC_CONSTRAINT DRC_ENGINE::EvalRules( DRC_CONSTRAINT_T aConstraintType, const BO
{
REPORT( "" )
REPORT( wxString::Format( _( "Local clearance on %s; clearance: %s." ),
EscapeHTML( a->GetSelectMenuText( this ) ),
EscapeHTML( a->GetItemDescription( this ) ),
MessageTextFromValue( localA ) ) )
if( localA > clearance )
@ -1347,7 +1347,7 @@ DRC_CONSTRAINT DRC_ENGINE::EvalRules( DRC_CONSTRAINT_T aConstraintType, const BO
{
REPORT( "" )
REPORT( wxString::Format( _( "Local clearance on %s; clearance: %s." ),
EscapeHTML( b->GetSelectMenuText( this ) ),
EscapeHTML( b->GetItemDescription( this ) ),
MessageTextFromValue( localB ) ) )
if( localB > clearance )
@ -1398,7 +1398,7 @@ DRC_CONSTRAINT DRC_ENGINE::EvalRules( DRC_CONSTRAINT_T aConstraintType, const BO
{
REPORT( "" )
REPORT( wxString::Format( _( "%s zone connection: %s." ),
EscapeHTML( parentFootprint->GetSelectMenuText( this ) ),
EscapeHTML( parentFootprint->GetItemDescription( this ) ),
EscapeHTML( PrintZoneConnection( local ) ) ) )
constraint.SetParentRule( nullptr );
@ -1414,7 +1414,7 @@ DRC_CONSTRAINT DRC_ENGINE::EvalRules( DRC_CONSTRAINT_T aConstraintType, const BO
REPORT( "" )
REPORT( wxString::Format( _( "%s pad connection: %s." ),
EscapeHTML( zone->GetSelectMenuText( this ) ),
EscapeHTML( zone->GetItemDescription( this ) ),
EscapeHTML( PrintZoneConnection( local ) ) ) )
constraint.SetParentRule( nullptr );
@ -1431,7 +1431,7 @@ DRC_CONSTRAINT DRC_ENGINE::EvalRules( DRC_CONSTRAINT_T aConstraintType, const BO
REPORT( "" )
REPORT( wxString::Format( _( "%s thermal relief gap: %s." ),
EscapeHTML( zone->GetSelectMenuText( this ) ),
EscapeHTML( zone->GetItemDescription( this ) ),
EscapeHTML( MessageTextFromValue( local ) ) ) )
constraint.SetParentRule( nullptr );
@ -1448,7 +1448,7 @@ DRC_CONSTRAINT DRC_ENGINE::EvalRules( DRC_CONSTRAINT_T aConstraintType, const BO
REPORT( "" )
REPORT( wxString::Format( _( "%s thermal spoke width: %s." ),
EscapeHTML( zone->GetSelectMenuText( this ) ),
EscapeHTML( zone->GetItemDescription( this ) ),
EscapeHTML( MessageTextFromValue( local ) ) ) )
constraint.SetParentRule( nullptr );

View File

@ -1346,7 +1346,7 @@ INSPECT_RESULT FOOTPRINT::Visit( INSPECTOR inspector, void* testData,
}
wxString FOOTPRINT::GetSelectMenuText( UNITS_PROVIDER* aUnitsProvider ) const
wxString FOOTPRINT::GetItemDescription( UNITS_PROVIDER* aUnitsProvider ) const
{
wxString reference = GetReference();

View File

@ -704,7 +704,7 @@ public:
return wxT( "FOOTPRINT" );
}
wxString GetSelectMenuText( UNITS_PROVIDER* aUnitsProvider ) const override;
wxString GetItemDescription( UNITS_PROVIDER* aUnitsProvider ) const override;
BITMAPS GetMenuImage() const override;

View File

@ -121,7 +121,7 @@ void FP_SHAPE::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_IT
}
wxString FP_SHAPE::GetSelectMenuText( UNITS_PROVIDER* aUnitsProvider ) const
wxString FP_SHAPE::GetItemDescription( UNITS_PROVIDER* aUnitsProvider ) const
{
return wxString::Format( _( "%s on %s" ),
ShowShape(),

View File

@ -127,7 +127,7 @@ public:
wxString GetParentAsString() const;
wxString GetSelectMenuText( UNITS_PROVIDER* aUnitsProvider ) const override;
wxString GetItemDescription( UNITS_PROVIDER* aUnitsProvider ) const override;
BITMAPS GetMenuImage() const override;

View File

@ -313,7 +313,7 @@ void FP_TEXT::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_ITE
}
wxString FP_TEXT::GetSelectMenuText( UNITS_PROVIDER* aUnitsProvider ) const
wxString FP_TEXT::GetItemDescription( UNITS_PROVIDER* aUnitsProvider ) const
{
switch( m_Type )
{

View File

@ -171,7 +171,7 @@ public:
return wxT( "FP_TEXT" );
}
wxString GetSelectMenuText( UNITS_PROVIDER* aUnitsProvider ) const override;
wxString GetItemDescription( UNITS_PROVIDER* aUnitsProvider ) const override;
BITMAPS GetMenuImage() const override;

View File

@ -327,7 +327,7 @@ void FP_TEXTBOX::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_
}
wxString FP_TEXTBOX::GetSelectMenuText( UNITS_PROVIDER* aUnitsProvider ) const
wxString FP_TEXTBOX::GetItemDescription( UNITS_PROVIDER* aUnitsProvider ) const
{
return wxString::Format( _( "Footprint Text Box of %s" ),
static_cast<FOOTPRINT*>( GetParent() )->GetReference() );

View File

@ -122,7 +122,7 @@ public:
return wxT( "FP_TEXTBOX" );
}
wxString GetSelectMenuText( UNITS_PROVIDER* aUnitsProvider ) const override;
wxString GetItemDescription( UNITS_PROVIDER* aUnitsProvider ) const override;
BITMAPS GetMenuImage() const override;

View File

@ -1237,7 +1237,7 @@ wxString PAD::ShowPadAttr() const
}
wxString PAD::GetSelectMenuText( UNITS_PROVIDER* aUnitsProvider ) const
wxString PAD::GetItemDescription( UNITS_PROVIDER* aUnitsProvider ) const
{
if( GetNumber().IsEmpty() )
{

View File

@ -695,7 +695,7 @@ public:
void Rotate( const VECTOR2I& aRotCentre, const EDA_ANGLE& aAngle ) override;
wxString GetSelectMenuText( UNITS_PROVIDER* aUnitsProvider ) const override;
wxString GetItemDescription( UNITS_PROVIDER* aUnitsProvider ) const override;
BITMAPS GetMenuImage() const override;

View File

@ -105,7 +105,7 @@ public:
void Flip( const VECTOR2I& aCentre, bool aFlipLeftRight ) override;
void Rotate( const VECTOR2I& aCenter, const EDA_ANGLE& aAngle ) override;
wxString GetSelectMenuText( UNITS_PROVIDER* aUnitsProvider ) const override
wxString GetItemDescription( UNITS_PROVIDER* aUnitsProvider ) const override
{
return wxString( _( "Image" ) );
}

View File

@ -448,7 +448,7 @@ const BOX2I PCB_DIMENSION_BASE::GetBoundingBox() const
}
wxString PCB_DIMENSION_BASE::GetSelectMenuText( UNITS_PROVIDER* aUnitsProvider ) const
wxString PCB_DIMENSION_BASE::GetItemDescription( UNITS_PROVIDER* aUnitsProvider ) const
{
return wxString::Format( _( "Dimension '%s' on %s" ), GetText(), GetLayerName() );
}

View File

@ -245,7 +245,7 @@ public:
std::shared_ptr<SHAPE> GetEffectiveShape( PCB_LAYER_ID aLayer,
FLASHING aFlash = FLASHING::DEFAULT ) const override;
wxString GetSelectMenuText( UNITS_PROVIDER* aUnitsProvider ) const override;
wxString GetItemDescription( UNITS_PROVIDER* aUnitsProvider ) const override;
const BOX2I ViewBBox() const override;

View File

@ -379,7 +379,7 @@ void PCB_GROUP::Flip( const VECTOR2I& aCentre, bool aFlipLeftRight )
}
wxString PCB_GROUP::GetSelectMenuText( UNITS_PROVIDER* aUnitsProvider ) const
wxString PCB_GROUP::GetItemDescription( UNITS_PROVIDER* aUnitsProvider ) const
{
if( m_name.empty() )
return wxString::Format( _( "Unnamed Group, %zu members" ), m_items.size() );

View File

@ -226,10 +226,10 @@ void PCB_MARKER::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_
auxItem = aFrame->GetItem( m_rcItem->GetAuxItemID() );
if( mainItem )
mainText = mainItem->GetSelectMenuText( aFrame );
mainText = mainItem->GetItemDescription( aFrame );
if( auxItem )
auxText = auxItem->GetSelectMenuText( aFrame );
auxText = auxItem->GetItemDescription( aFrame );
aList.emplace_back( mainText, auxText );
}
@ -256,7 +256,7 @@ std::shared_ptr<SHAPE> PCB_MARKER::GetEffectiveShape( PCB_LAYER_ID aLayer, FLASH
}
wxString PCB_MARKER::GetSelectMenuText( UNITS_PROVIDER* aUnitsProvider ) const
wxString PCB_MARKER::GetItemDescription( UNITS_PROVIDER* aUnitsProvider ) const
{
// m_rcItem->GetErrorMessage() could be used instead, but is probably too long
// for menu duty.

View File

@ -98,7 +98,7 @@ public:
return BOARD_ITEM::Matches( m_rcItem->GetErrorMessage(), aSearchData );
}
wxString GetSelectMenuText( UNITS_PROVIDER* aUnitsProvider ) const override;
wxString GetItemDescription( UNITS_PROVIDER* aUnitsProvider ) const override;
BITMAPS GetMenuImage() const override;

View File

@ -312,7 +312,7 @@ void PCB_SHAPE::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_I
}
wxString PCB_SHAPE::GetSelectMenuText( UNITS_PROVIDER* aUnitsProvider ) const
wxString PCB_SHAPE::GetItemDescription( UNITS_PROVIDER* aUnitsProvider ) const
{
return wxString::Format( _( "%s on %s" ), ShowShape(), GetLayerName() );
}

View File

@ -136,7 +136,7 @@ public:
int aError, ERROR_LOC aErrorLoc,
bool ignoreLineWidth = false ) const override;
virtual wxString GetSelectMenuText( UNITS_PROVIDER* aUnitsProvider ) const override;
virtual wxString GetItemDescription( UNITS_PROVIDER* aUnitsProvider ) const override;
virtual BITMAPS GetMenuImage() const override;

View File

@ -119,7 +119,7 @@ std::shared_ptr<SHAPE> PCB_TARGET::GetEffectiveShape( PCB_LAYER_ID aLayer, FLASH
}
wxString PCB_TARGET::GetSelectMenuText( UNITS_PROVIDER* aUnitsProvider ) const
wxString PCB_TARGET::GetItemDescription( UNITS_PROVIDER* aUnitsProvider ) const
{
// Targets are on *every* layer by definition
return _( "Target" );

View File

@ -86,7 +86,7 @@ public:
std::shared_ptr<SHAPE>
GetEffectiveShape( PCB_LAYER_ID aLayer, FLASHING aFlash = FLASHING::DEFAULT ) const override;
wxString GetSelectMenuText( UNITS_PROVIDER* aUnitsProvider ) const override;
wxString GetItemDescription( UNITS_PROVIDER* aUnitsProvider ) const override;
BITMAPS GetMenuImage() const override;

View File

@ -252,7 +252,7 @@ void PCB_TEXT::Flip( const VECTOR2I& aCentre, bool aFlipLeftRight )
}
wxString PCB_TEXT::GetSelectMenuText( UNITS_PROVIDER* aUnitsProvider ) const
wxString PCB_TEXT::GetItemDescription( UNITS_PROVIDER* aUnitsProvider ) const
{
return wxString::Format( _( "PCB Text '%s' on %s"),
KIUI::EllipsizeMenuText( GetShownText() ),

View File

@ -135,7 +135,7 @@ public:
GetEffectiveShape( PCB_LAYER_ID aLayer = UNDEFINED_LAYER,
FLASHING aFlash = FLASHING::DEFAULT ) const override;
wxString GetSelectMenuText( UNITS_PROVIDER* aUnitsProvider ) const override;
wxString GetItemDescription( UNITS_PROVIDER* aUnitsProvider ) const override;
BITMAPS GetMenuImage() const override;

View File

@ -413,7 +413,7 @@ bool PCB_TEXTBOX::HitTest( const BOX2I& aRect, bool aContained, int aAccuracy )
}
wxString PCB_TEXTBOX::GetSelectMenuText( UNITS_PROVIDER* aUnitsProvider ) const
wxString PCB_TEXTBOX::GetItemDescription( UNITS_PROVIDER* aUnitsProvider ) const
{
return wxString::Format( _( "PCB Text Box on %s"), GetLayerName() );
}

View File

@ -127,7 +127,7 @@ public:
GetEffectiveShape( PCB_LAYER_ID aLayer = UNDEFINED_LAYER,
FLASHING aFlash = FLASHING::DEFAULT ) const override;
wxString GetSelectMenuText( UNITS_PROVIDER* aUnitsProvider ) const override;
wxString GetItemDescription( UNITS_PROVIDER* aUnitsProvider ) const override;
BITMAPS GetMenuImage() const override;

View File

@ -102,7 +102,7 @@ EDA_ITEM* PCB_VIA::Clone() const
}
wxString PCB_VIA::GetSelectMenuText( UNITS_PROVIDER* aUnitsProvider ) const
wxString PCB_VIA::GetItemDescription( UNITS_PROVIDER* aUnitsProvider ) const
{
wxString formatStr;
@ -1064,7 +1064,7 @@ bool PCB_VIA::HitTest( const BOX2I& aRect, bool aContained, int aAccuracy ) cons
}
wxString PCB_TRACK::GetSelectMenuText( UNITS_PROVIDER* aUnitsProvider ) const
wxString PCB_TRACK::GetItemDescription( UNITS_PROVIDER* aUnitsProvider ) const
{
return wxString::Format( Type() == PCB_ARC_T ? _("Track (arc) %s on %s, length %s" )
: _("Track %s on %s, length %s" ),

View File

@ -199,7 +199,7 @@ public:
MINOPTMAX<int> GetWidthConstraint( wxString* aSource ) const;
wxString GetSelectMenuText( UNITS_PROVIDER* aUnitsProvider ) const override;
wxString GetItemDescription( UNITS_PROVIDER* aUnitsProvider ) const override;
BITMAPS GetMenuImage() const override;
@ -449,7 +449,7 @@ public:
return wxT( "PCB_VIA" );
}
wxString GetSelectMenuText( UNITS_PROVIDER* aUnitsProvider ) const override;
wxString GetItemDescription( UNITS_PROVIDER* aUnitsProvider ) const override;
BITMAPS GetMenuImage() const override;

View File

@ -1226,7 +1226,7 @@ bool PNS_KICAD_IFACE_BASE::syncZone( PNS::NODE* aWorld, ZONE* aZone, SHAPE_POLY_
{
UNITS_PROVIDER unitsProvider( pcbIUScale, GetUnits() );
KIDIALOG dlg( nullptr, wxString::Format( _( "%s is malformed." ),
aZone->GetSelectMenuText( &unitsProvider ) ),
aZone->GetItemDescription( &unitsProvider ) ),
KIDIALOG::KD_WARNING );
dlg.ShowDetailedText( wxString::Format( _( "This zone cannot be handled by the router.\n"
"Please verify it is not a self-intersecting "

View File

@ -155,7 +155,7 @@ wxString BOARD_INSPECTION_TOOL::getItemDescription( BOARD_ITEM* aItem )
if( !aItem )
return wxString();
wxString msg = aItem->GetSelectMenuText( m_frame );
wxString msg = aItem->GetItemDescription( m_frame );
if( aItem->IsConnected() && !isNPTHPad( aItem ) )
{

View File

@ -1389,8 +1389,8 @@ int PCB_CONTROL::UpdateMessagePanel( const TOOL_EVENT& aEvent )
BOARD_ITEM* a = static_cast<BOARD_ITEM*>( selection[0] );
BOARD_ITEM* b = static_cast<BOARD_ITEM*>( selection[1] );
msgItems.emplace_back( MSG_PANEL_ITEM( a->GetSelectMenuText( m_frame ),
b->GetSelectMenuText( m_frame ) ) );
msgItems.emplace_back( MSG_PANEL_ITEM( a->GetItemDescription( m_frame ),
b->GetItemDescription( m_frame ) ) );
BOARD_CONNECTED_ITEM* a_conn = dyn_cast<BOARD_CONNECTED_ITEM*>( a );
BOARD_CONNECTED_ITEM* b_conn = dyn_cast<BOARD_CONNECTED_ITEM*>( b );

View File

@ -777,7 +777,7 @@ bool ZONE::AppendCorner( VECTOR2I aPosition, int aHoleIdx, bool aAllowDuplicatio
}
wxString ZONE::GetSelectMenuText( UNITS_PROVIDER* aUnitsProvider ) const
wxString ZONE::GetItemDescription( UNITS_PROVIDER* aUnitsProvider ) const
{
wxString layerDesc;
int count = 0;

View File

@ -669,7 +669,7 @@ public:
void AddPolygon( const SHAPE_LINE_CHAIN& aPolygon );
wxString GetSelectMenuText( UNITS_PROVIDER* aUnitsProvider ) const override;
wxString GetItemDescription( UNITS_PROVIDER* aUnitsProvider ) const override;
BITMAPS GetMenuImage() const override;