23using namespace std::placeholders;
45 SetIcon( BITMAPS::net_highlight_schematic );
53 bool addSeparator =
false;
59 if( selection.Size() == 1 )
68 menuEntry->SetItemLabel( wxString::Format(
_(
"Highlight Items of Component '%s'" ),
69 net_attr.m_Cmpref ) );
76 menuEntry->SetItemLabel( wxString::Format(
_(
"Highlight Items of Net '%s'" ),
81 D_CODE* apertDescr = item->GetDcodeDescr();
86 menuEntry->SetItemLabel( wxString::Format(
_(
"Highlight Aperture Type '%s'" ),
94 menuEntry->SetItemLabel( wxString::Format(
_(
"Highlight DCode D%d" ),
128 std::shared_ptr<HIGHLIGHT_MENU> highlightSubMenu = std::make_shared<HIGHLIGHT_MENU>();
129 highlightSubMenu->SetTool(
this );
130 m_menu->RegisterSubMenu( highlightSubMenu );
132 m_menu->GetMenu().AddMenu( highlightSubMenu.get() );
133 m_menu->GetMenu().AddSeparator( 1000 );
135 getEditFrame<GERBVIEW_FRAME>()->AddStandardSubMenus( *
m_menu.get() );
143 m_frame = getEditFrame<GERBVIEW_FRAME>();
175 evt->Modifier(
MD_ALT ) );
225 EDA_ITEM* model = getModel<EDA_ITEM>();
230 for(
int i = collector.
GetCount() - 1; i >= 0; --i )
249 item = collector[ 0 ];
289 std::vector<EDA_ITEM*>* items = aEvent.
Parameter<std::vector<EDA_ITEM*>*>();
323 std::vector<EDA_ITEM*>* items = aEvent.
Parameter<std::vector<EDA_ITEM*>*>();
static TOOL_ACTION updateMenu
static TOOL_ACTION zoomFitScreen
int GetCount() const
Return the number of objects in the list.
void Remove(int aIndex)
Remove the item at aIndex (first position is 0).
A gerber DCODE (also called Aperture) definition.
wxString m_AperFunction
the aperture attribute (created by a TA.AperFunction command).
int m_Num_Dcode
D code value ( >= 10 )
virtual EDA_DRAW_PANEL_GAL * GetCanvas() const
Return a pointer to GAL-based canvas of given EDA draw frame.
void ForceRefresh()
Force a redraw.
void SetCurrentCursor(KICURSOR aCursor)
Set the current cursor shape for this panel.
A base class for most all the KiCad significant classes used in schematics and boards.
static const TOOL_EVENT ClearedEvent
static const TOOL_EVENT SelectedEvent
static const TOOL_EVENT UnselectedEvent
bool m_HighContrastMode
High contrast mode (dim un-highlighted objects)
Use when the right click button is pressed or when the select tool is in effect.
void Collect(EDA_ITEM *aItem, const std::vector< KICAD_T > &aScanTypes, const VECTOR2I &aRefPos)
Scan an EDA_ITEM using this class's Inspector method, which does the collection.
bool GetLayerPolarity() const
int GetLayer() const
Return the layer this item is on.
const GBR_NETLIST_METADATA & GetNetAttributes() const
static TOOL_ACTION selectionActivate
Activation of the selection tool.
static TOOL_ACTION selectItem
Selects an item (specified as the event parameter).
static TOOL_ACTION highlightAttribute
static TOOL_ACTION unselectItem
Unselects an item (specified as the event parameter).
static TOOL_ACTION highlightNet
static TOOL_ACTION selectionClear
Clear the current selection.
static TOOL_ACTION highlightComponent
static TOOL_ACTION highlightDCode
static TOOL_ACTION highlightClear
GERBVIEW_SETTINGS * gvconfig() const
bool IsLayerVisible(int aLayer) const
Test whether a given layer is visible.
int GetActiveLayer() const
Return the active layer.
void SetActiveLayer(int aLayer, bool doLayerWidgetUpdate=true)
change the currently active layer to aLayer and update the GERBER_LAYER_WIDGET.
GBR_DISPLAY_OPTIONS m_Display
virtual RENDER_SETTINGS * GetSettings()=0
Return a pointer to current settings that are going to be used when drawing items.
void SetHighlight(bool aEnabled, int aNetcode=-1, bool aMulti=false)
Turns on/off highlighting.
virtual void Add(VIEW_ITEM *aItem, int aDrawPriority=-1)
Add a VIEW_ITEM to the view.
virtual void Remove(VIEW_ITEM *aItem)
Remove a VIEW_ITEM from the view.
virtual void Update(const VIEW_ITEM *aItem, int aUpdateFlags) const
For dynamic VIEWs, inform the associated VIEW that the graphical representation of this item has chan...
void Hide(VIEW_ITEM *aItem, bool aHide=true, bool aHideOverlay=false)
Temporarily hide the item in the view (e.g.
PAINTER * GetPainter() const
Return the painter object used by the view for drawing #VIEW_ITEMS.
virtual void Add(EDA_ITEM *aItem)
void SetIsHover(bool aIsHover)
virtual void Remove(EDA_ITEM *aItem)
virtual void Clear() override
Remove all the stored items from the group.
bool Empty() const
Checks if there is anything selected.
@ ALL
All except INITIAL_ADD.
wxString UnescapeString(const wxString &aSource)
bool show_negative_objects