38 m_subtractive( false ),
39 m_exclusive_or( false ),
41 m_skip_heuristics( false ),
42 m_highlight_modifier( false ),
43 m_drag_additive( false ),
44 m_drag_subtractive( false ),
45 m_canceledMenu( false )
213 removeItems.push_back( item );
240 if( !getEditFrame<EDA_DRAW_FRAME>()->ToolStackIsEmpty() )
263 bool selectAll =
false;
264 bool expandSelection =
false;
272 if( expandSelection )
275 expandSelection =
false;
277 int limit = std::min( 100, aCollector->
GetCount() );
280 for(
int i = 0; i < limit; ++i )
282 EDA_ITEM* item = ( *aCollector )[i];
288 menuText = wxString::Format(
"%s\t%d",
292 menuText = wxString::Format(
"&%d %s\t%d",
306 menu.AppendSeparator();
307 menu.
Add(
_(
"Select &All\tA" ), limit + 1, BITMAPS::INVALID_BITMAP );
310 menu.
Add(
_(
"&Expand Selection\tE" ), limit + 2, BITMAPS::INVALID_BITMAP );
331 for(
int i = 0; i < aCollector->
GetCount(); ++i )
339 int id = *evt->GetCommandId();
342 if(
id > 0 &&
id <= limit )
344 current = ( *aCollector )[
id - 1];
353 if(
id == limit + 1 )
355 for(
int i = 0; i < aCollector->
GetCount(); ++i )
369 for(
int i = 0; i < aCollector->
GetCount(); ++i )
377 std::optional<int>
id = evt->GetCommandId();
380 if(
id == limit + 1 )
386 else if(
id == limit + 2 )
390 expandSelection =
true;
393 else if(
id && ( *
id > 0 ) && ( *
id <= limit ) )
396 current = ( *aCollector )[*
id - 1];
411 getEditFrame<EDA_DRAW_FRAME>()->GetCanvas()->Refresh();
413 }
while( expandSelection );
424 aCollector->
Append( current );
An abstract class that will find and hold all the objects according to an inspection done by the Insp...
void Empty()
Clear the list.
int GetCount() const
Return the number of objects in the list.
bool HasAdditionalItems()
Test if the collector has heuristic backup items.
void Combine()
Re-combine the backup list into the main list of the collector.
void Append(EDA_ITEM *item)
Add an item to the end of the list.
A base class for most all the KiCad significant classes used in schematics and boards.
virtual wxString GetItemDescription(UNITS_PROVIDER *aUnitsProvider, bool aFull) const
Return a user-visible description string of this item.
virtual BITMAPS GetMenuImage() const
Return a pointer to an image to be used in menus.
static const TOOL_EVENT DisambiguatePoint
Used for hotkey feedback.
static const TOOL_EVENT SelectedEvent
static const TOOL_EVENT UnselectedEvent
virtual void SetLayer(int aLayer)
Set layer used to draw the group.
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.
void UpdateItems()
Iterate through the list of items that asked for updating and updates them.
void SetIsHover(bool aIsHover)
std::vector< EDA_ITEM * > EDA_ITEMS
Define list of drawing items for screens.
#define BRIGHTENED
item is drawn with a bright contour
@ LAYER_SELECT_OVERLAY
currently selected items overlay
bool contains(const _Container &__container, _Value __value)
Returns true if the container contains the given value.
Functions to provide common constants and other functions to assist in making a consistent UI.