32using namespace std::placeholders;
 
   37    return !aSelection.
Empty();
 
 
   43    return aSelection.
Empty();
 
 
   51    return !aSelection.
Front() || ( aSelection.
Front()->GetEditFlags() & busyMask ) == 0;
 
 
   99    if( aSelection.
Empty() )
 
  102    for( 
const EDA_ITEM* item : aSelection )
 
  104        if( item->Type() == aType )
 
 
  114    if( aSelection.
Empty() )
 
  117    for( 
const EDA_ITEM* item : aSelection )
 
  119        if( item->IsType( aTypes ) )
 
 
  129    if( aSelection.
Empty() )
 
  132    for( 
const EDA_ITEM* item : aSelection )
 
  134        if( !item->IsType( aTypes ) )
 
 
  144    return aSelection.
Size() == aNumber;
 
 
  150    return aSelection.
Size() > aNumber;
 
 
  156    return aSelection.
Size() < aNumber;
 
 
  190    return aConditionB || aConditionA;
 
 
  198                      std::ref( aConditionB ), _1 );
 
 
  205    return aConditionB && aConditionA;
 
 
A base class for most all the KiCad significant classes used in schematics and boards.
 
EDA_ITEM_FLAGS GetEditFlags() const
 
static bool hasTypesFunc(const SELECTION &aSelection, std::vector< KICAD_T > aTypes)
Helper function used by HasTypes().
 
static SELECTION_CONDITION HasTypes(std::vector< KICAD_T > aTypes)
Create a functor that tests if among the selected items there is at least one of a given types.
 
static SELECTION_CONDITION HasType(KICAD_T aType)
Create a functor that tests if among the selected items there is at least one of a given type.
 
static bool Empty(const SELECTION &aSelection)
Test if there are no items selected.
 
static bool moreThanFunc(const SELECTION &aSelection, int aNumber)
Helper function used by MoreThan().
 
static bool NotEmpty(const SELECTION &aSelection)
Test if there are any items selected.
 
static bool countFunc(const SELECTION &aSelection, int aNumber)
Helper function used by Count().
 
static bool orFunc(const SELECTION_CONDITION &aConditionA, const SELECTION_CONDITION &aConditionB, const SELECTION &aSelection)
Helper function used by operator ||.
 
static SELECTION_CONDITION MoreThan(int aNumber)
Create a functor that tests if the number of selected items is greater than the value given as parame...
 
static bool orBoolFunc(const SELECTION_CONDITION &aConditionA, SELECTION_BOOL &aConditionB, const SELECTION &aSelection)
Helper function used by operator ||.
 
static bool lessThanFunc(const SELECTION &aSelection, int aNumber)
Helper function used by LessThan().
 
static bool Idle(const SELECTION &aSelection)
Test if there no items selected or being edited.
 
static bool IdleSelection(const SELECTION &aSelection)
Test if all selected items are not being edited.
 
static bool andBoolFunc(const SELECTION_CONDITION &aConditionA, SELECTION_BOOL &aConditionB, const SELECTION &aSelection)
Helper function used by operator &&.
 
static SELECTION_CONDITION LessThan(int aNumber)
Create a functor that tests if the number of selected items is smaller than the value given as parame...
 
static SELECTION_CONDITION Count(int aNumber)
Create a functor that tests if the number of selected items is equal to the value given as parameter.
 
static bool onlyTypesFunc(const SELECTION &aSelection, std::vector< KICAD_T > aTypes)
Helper function used by OnlyTypes().
 
static bool andFunc(const SELECTION_CONDITION &aConditionA, const SELECTION_CONDITION &aConditionB, const SELECTION &aSelection)
Helper function used by operator &&.
 
static bool notFunc(const SELECTION_CONDITION &aCondition, const SELECTION &aSelection)
Helper function used by operator !.
 
static SELECTION_CONDITION OnlyTypes(std::vector< KICAD_T > aTypes)
Create a functor that tests if the selected items are only of given types.
 
static bool hasTypeFunc(const SELECTION &aSelection, KICAD_T aType)
Helper function used by HasType().
 
int Size() const
Returns the number of selected parts.
 
bool Empty() const
Checks if there is anything selected.
 
#define IS_PASTED
Modifier on IS_NEW which indicates it came from clipboard.
 
#define IS_NEW
New item, just created.
 
#define IS_MOVING
Item being moved.
 
SELECTION_CONDITION operator||(const SELECTION_CONDITION &aConditionA, const SELECTION_CONDITION &aConditionB)
 
SELECTION_CONDITION operator&&(const SELECTION_CONDITION &aConditionA, const SELECTION_CONDITION &aConditionB)
 
SELECTION_CONDITION operator!(const SELECTION_CONDITION &aCondition)
 
std::function< bool(const SELECTION &)> SELECTION_CONDITION
Functor type that checks a specific condition for selected items.
 
bool(& SELECTION_BOOL)(const SELECTION &)
Signature for a reference to a function that takes a SELECTION and returns a boolean.
 
KICAD_T
The set of class identification values stored in EDA_ITEM::m_structType.