| 
    KiCad PCB EDA Suite
    
   | 
 
#include <eda_3d_conditions.h>
  
Public Member Functions | |
| EDA_3D_CONDITIONS (BOARD_ADAPTER *aAdapter) | |
| Define conditions for a 3D viewer frame.   | |
| SELECTION_CONDITION | GridSize (GRID3D_TYPE aGridSize) | 
| Creates a functor that tests the current grid size.   | |
Static Public Member Functions | |
| static bool | ShowAlways (const SELECTION &aSelection) | 
| The default condition function (always returns true).   | |
| static bool | ShowNever (const SELECTION &aSelection) | 
| Always returns false.   | |
| static bool | NotEmpty (const SELECTION &aSelection) | 
| Test if there are any items selected.   | |
| static bool | Empty (const SELECTION &aSelection) | 
| Test if there are no items selected.   | |
| 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 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 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 | OnlyTypes (std::vector< KICAD_T > aTypes) | 
| Create a functor that tests if the selected items are only of given types.   | |
| 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 SELECTION_CONDITION | MoreThan (int aNumber) | 
| Create a functor that tests if the number of selected items is greater than the value given as parameter.   | |
| static SELECTION_CONDITION | LessThan (int aNumber) | 
| Create a functor that tests if the number of selected items is smaller than the value given as parameter.   | |
Static Private Member Functions | |
| static bool | gridSizeFunction (const SELECTION &aSelection, BOARD_ADAPTER *aAdapter, GRID3D_TYPE aGridSize) | 
| Helper function used by GridDize().   | |
| static bool | hasTypeFunc (const SELECTION &aSelection, KICAD_T aType) | 
| Helper function used by HasType().   | |
| static bool | hasTypesFunc (const SELECTION &aSelection, std::vector< KICAD_T > aTypes) | 
| Helper function used by HasTypes().   | |
| static bool | onlyTypesFunc (const SELECTION &aSelection, std::vector< KICAD_T > aTypes) | 
| Helper function used by OnlyTypes().   | |
| static bool | countFunc (const SELECTION &aSelection, int aNumber) | 
| Helper function used by Count().   | |
| static bool | moreThanFunc (const SELECTION &aSelection, int aNumber) | 
| Helper function used by MoreThan().   | |
| static bool | lessThanFunc (const SELECTION &aSelection, int aNumber) | 
| Helper function used by LessThan().   | |
| static bool | orFunc (const SELECTION_CONDITION &aConditionA, const SELECTION_CONDITION &aConditionB, const SELECTION &aSelection) | 
| Helper function used by operator ||.   | |
| 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 bool | orBoolFunc (const SELECTION_CONDITION &aConditionA, SELECTION_BOOL &aConditionB, const SELECTION &aSelection) | 
| Helper function used by operator ||.   | |
| static bool | andBoolFunc (const SELECTION_CONDITION &aConditionA, SELECTION_BOOL &aConditionB, const SELECTION &aSelection) | 
| Helper function used by operator &&.   | |
Private Attributes | |
| BOARD_ADAPTER * | m_adapter | 
| The board adapter to read the 3D viewer state from.   | |
Definition at line 35 of file eda_3d_conditions.h.
      
  | 
  inline | 
Define conditions for a 3D viewer frame.
| aAdapter | is the board adapter to query for information. | 
Definition at line 43 of file eda_3d_conditions.h.
References m_adapter.
      
  | 
  inlinestaticprivateinherited | 
Helper function used by operator &&.
Definition at line 202 of file selection_conditions.h.
Referenced by operator&&.
      
  | 
  inlinestaticprivateinherited | 
Helper function used by operator &&.
Definition at line 182 of file selection_conditions.h.
Referenced by operator&&.
      
  | 
  staticinherited | 
Create a functor that tests if the number of selected items is equal to the value given as parameter.
| aNumber | is the number of expected items. | 
Definition at line 79 of file selection_conditions.cpp.
References countFunc().
Referenced by CONVERT_TOOL::Init(), EDIT_TOOL::Init(), PAD_TOOL::Init(), PCB_POINT_EDITOR::Init(), PCB_SELECTION_TOOL::Init(), SCH_POINT_EDITOR::Init(), SCH_SELECTION_TOOL::Init(), SYMBOL_EDITOR_EDIT_TOOL::Init(), SYMBOL_EDITOR_PIN_TOOL::Init(), makeShapeModificationMenu(), and PCB_EDIT_FRAME::setupUIConditions().
      
  | 
  staticprivateinherited | 
Helper function used by Count().
Definition at line 142 of file selection_conditions.cpp.
References SELECTION::Size().
Referenced by Count().
      
  | 
  staticinherited | 
Test if there are no items selected.
Definition at line 41 of file selection_conditions.cpp.
References SELECTION::Empty().
Referenced by PL_SELECTION_TOOL::Init(), and SCH_SELECTION_TOOL::Init().
| SELECTION_CONDITION EDA_3D_CONDITIONS::GridSize | ( | GRID3D_TYPE | aGridSize | ) | 
Creates a functor that tests the current grid size.
| aAdapter | is the board adapter the setting is in | 
| aGridSize | is the grid size to test for. | 
Definition at line 33 of file eda_3d_conditions.cpp.
References gridSizeFunction(), and m_adapter.
      
  | 
  staticprivate | 
Helper function used by GridDize().
Definition at line 39 of file eda_3d_conditions.cpp.
References EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS::grid_type, BOARD_ADAPTER::m_Cfg, and EDA_3D_VIEWER_SETTINGS::m_Render.
Referenced by GridSize().
      
  | 
  staticinherited | 
Create a functor that tests if among the selected items there is at least one of a given type.
| aType | is the type that is searched. | 
Definition at line 61 of file selection_conditions.cpp.
References hasTypeFunc().
Referenced by EDIT_TOOL::Init(), PAD_TOOL::Init(), PCB_SELECTION_TOOL::Init(), SCH_SELECTION_TOOL::Init(), FOOTPRINT_EDIT_FRAME::setupUIConditions(), and SCH_EDIT_FRAME::setupUIConditions().
      
  | 
  staticprivateinherited | 
Helper function used by HasType().
Definition at line 97 of file selection_conditions.cpp.
References SELECTION::Empty().
Referenced by HasType().
      
  | 
  staticinherited | 
Create a functor that tests if among the selected items there is at least one of a given types.
| aTypes | is an array containing types that are searched. | 
Definition at line 67 of file selection_conditions.cpp.
References hasTypesFunc().
Referenced by EDIT_TOOL::Init(), SCH_SELECTION_TOOL::Init(), makeShapeModificationMenu(), and PCB_EDIT_FRAME::setupUIConditions().
      
  | 
  staticprivateinherited | 
Helper function used by HasTypes().
Definition at line 112 of file selection_conditions.cpp.
References SELECTION::Empty().
Referenced by HasTypes().
      
  | 
  staticinherited | 
Test if there no items selected or being edited.
Definition at line 47 of file selection_conditions.cpp.
References SELECTION::Front(), IS_MOVING, IS_NEW, and IS_PASTED.
Referenced by EDIT_TABLE_TOOL_BASE< T_TABLE, T_TABLECELL, T_COMMIT >::addMenus(), SCH_INSPECTION_TOOL::Init(), SCH_LINE_WIRE_BUS_TOOL::Init(), SCH_SELECTION_TOOL::Init(), SYMBOL_EDITOR_EDIT_TOOL::Init(), FOOTPRINT_EDIT_FRAME::setupUIConditions(), PCB_EDIT_FRAME::setupUIConditions(), PL_EDITOR_FRAME::setupUIConditions(), SCH_EDIT_FRAME::setupUIConditions(), and SYMBOL_EDIT_FRAME::setupUIConditions().
      
  | 
  staticinherited | 
Test if all selected items are not being edited.
Definition at line 55 of file selection_conditions.cpp.
References SELECTION::Front(), and EDA_ITEM::GetEditFlags().
Referenced by SYMBOL_EDITOR_EDIT_TOOL::Init(), and SYMBOL_EDITOR_MOVE_TOOL::Init().
      
  | 
  staticinherited | 
Create a functor that tests if the number of selected items is smaller than the value given as parameter.
| aNumber | is the number used for comparison. | 
Definition at line 91 of file selection_conditions.cpp.
References lessThanFunc().
Referenced by SCH_SELECTION_TOOL::Init().
      
  | 
  staticprivateinherited | 
Helper function used by LessThan().
Definition at line 154 of file selection_conditions.cpp.
References SELECTION::Size().
Referenced by LessThan().
      
  | 
  staticinherited | 
Create a functor that tests if the number of selected items is greater than the value given as parameter.
| aNumber | is the number used for comparison. | 
Definition at line 85 of file selection_conditions.cpp.
References moreThanFunc().
Referenced by EDIT_TABLE_TOOL_BASE< T_TABLE, T_TABLECELL, T_COMMIT >::addMenus(), ALIGN_DISTRIBUTE_TOOL::Init(), CONVERT_TOOL::Init(), EDIT_TOOL::Init(), PCB_SELECTION_TOOL::Init(), SCH_ALIGN_TOOL::Init(), SCH_LINE_WIRE_BUS_TOOL::Init(), SCH_SELECTION_TOOL::Init(), SYMBOL_EDITOR_EDIT_TOOL::Init(), makeShapeModificationMenu(), PCB_EDIT_FRAME::setupUIConditions(), and SCH_EDIT_FRAME::setupUIConditions().
      
  | 
  staticprivateinherited | 
Helper function used by MoreThan().
Definition at line 148 of file selection_conditions.cpp.
References SELECTION::Size().
Referenced by MoreThan().
      
  | 
  staticinherited | 
Test if there are any items selected.
Definition at line 35 of file selection_conditions.cpp.
References SELECTION::Empty().
Referenced by BOARD_EDITOR_CONTROL::Init(), EDIT_TOOL::Init(), GROUP_TOOL::Init(), PCB_SELECTION_TOOL::Init(), PL_EDIT_TOOL::Init(), ROUTER_TOOL::Init(), SYMBOL_EDITOR_EDIT_TOOL::Init(), makePositioningToolsMenu(), FOOTPRINT_EDIT_FRAME::setupUIConditions(), PCB_EDIT_FRAME::setupUIConditions(), PL_EDITOR_FRAME::setupUIConditions(), and SCH_EDIT_FRAME::setupUIConditions().
      
  | 
  inlinestaticprivateinherited | 
Helper function used by operator !.
Definition at line 189 of file selection_conditions.h.
Referenced by operator!.
      
  | 
  staticinherited | 
Create a functor that tests if the selected items are only of given types.
| aTypes | is an array containing types that are searched. | 
Definition at line 73 of file selection_conditions.cpp.
References onlyTypesFunc().
Referenced by EDIT_TABLE_TOOL_BASE< T_TABLE, T_TABLECELL, T_COMMIT >::addMenus(), EDIT_TOOL::DeleteItems(), BOARD_EDITOR_CONTROL::Init(), CONVERT_TOOL::Init(), EDIT_TOOL::Init(), PAD_TOOL::Init(), PCB_SELECTION_TOOL::Init(), SCH_LINE_WIRE_BUS_TOOL::Init(), SCH_MOVE_TOOL::Init(), SCH_SELECTION_TOOL::Init(), SYMBOL_EDITOR_EDIT_TOOL::Init(), SYMBOL_EDITOR_PIN_TOOL::Init(), PCB_SELECTION_TOOL::Main(), makeShapeModificationMenu(), EDIT_TOOL::Properties(), SCH_EDIT_TOOL::Properties(), PCB_EDIT_FRAME::setupUIConditions(), BOARD_EDITOR_CONTROL::TrackWidthDec(), BOARD_EDITOR_CONTROL::TrackWidthInc(), BOARD_EDITOR_CONTROL::ViaSizeDec(), and BOARD_EDITOR_CONTROL::ViaSizeInc().
      
  | 
  staticprivateinherited | 
Helper function used by OnlyTypes().
Definition at line 127 of file selection_conditions.cpp.
References SELECTION::Empty().
Referenced by OnlyTypes().
      
  | 
  inlinestaticprivateinherited | 
Helper function used by operator ||.
Definition at line 195 of file selection_conditions.h.
Referenced by operator||.
      
  | 
  inlinestaticprivateinherited | 
Helper function used by operator ||.
Definition at line 175 of file selection_conditions.h.
Referenced by operator||.
      
  | 
  inlinestaticinherited | 
The default condition function (always returns true).
Definition at line 75 of file selection_conditions.h.
Referenced by ACTION_CONDITIONS::ACTION_CONDITIONS(), DESIGN_BLOCK_CONTROL::AddContextMenuItems(), LIBRARY_EDITOR_CONTROL::AddContextMenuItems(), CONDITIONAL_MENU::AddSeparator(), EDA_DRAW_FRAME::AddStandardSubMenus(), EDA_3D_CONTROLLER::Init(), FOOTPRINT_CHOOSER_SELECTION_TOOL::Init(), FOOTPRINT_EDITOR_CONTROL::Init(), GENERATOR_TOOL::Init(), PAD_TOOL::Init(), PCB_PICKER_TOOL::Init(), PCB_TOOL_BASE::Init(), PICKER_TOOL::Init(), PL_DRAWING_TOOLS::Init(), PL_EDIT_TOOL::Init(), ROUTER_TOOL::Init(), SCH_LINE_WIRE_BUS_TOOL::Init(), SCH_TOOL_BASE< T >::Init(), ZOOM_TOOL::Init(), LOCK_CONTEXT_MENU::LOCK_CONTEXT_MENU(), FOOTPRINT_EDIT_FRAME::setupUIConditions(), PCB_EDIT_FRAME::setupUIConditions(), PL_EDITOR_FRAME::setupUIConditions(), SCH_EDIT_FRAME::setupUIConditions(), SIMULATOR_FRAME::setupUIConditions(), and SYMBOL_EDIT_FRAME::setupUIConditions().
      
  | 
  inlinestaticinherited | 
Always returns false.
Definition at line 80 of file selection_conditions.h.
Referenced by ACTION_CONDITIONS::ACTION_CONDITIONS(), KICAD_MANAGER_FRAME::setupUIConditions(), and PL_EDITOR_FRAME::setupUIConditions().
      
  | 
  private | 
The board adapter to read the 3D viewer state from.
Definition at line 62 of file eda_3d_conditions.h.
Referenced by EDA_3D_CONDITIONS(), and GridSize().