KiCad PCB EDA Suite
Loading...
Searching...
No Matches
PCB_EDITOR_CONDITIONS Class Reference

Group generic conditions for PCB editor states. More...

#include <pcb_editor_conditions.h>

Inheritance diagram for PCB_EDITOR_CONDITIONS:
EDITOR_CONDITIONS SELECTION_CONDITIONS

Public Member Functions

 PCB_EDITOR_CONDITIONS (PCB_BASE_FRAME *aFrame)
 
SELECTION_CONDITION HasItems ()
 Create a functor that tests if there are items in the board. More...
 
SELECTION_CONDITION PadNumbersDisplay ()
 Create a functor that tests if the pad numbers are displayed. More...
 
SELECTION_CONDITION PadFillDisplay ()
 Create a functor that tests if the frame fills the pads. More...
 
SELECTION_CONDITION TextFillDisplay ()
 Create a functor that tests if the frame fills text items. More...
 
SELECTION_CONDITION GraphicsFillDisplay ()
 Create a functor that tests if the frame fills graphics items. More...
 
SELECTION_CONDITION ViaFillDisplay ()
 Create a functor that tests if the frame fills vias. More...
 
SELECTION_CONDITION TrackFillDisplay ()
 Create a functor that tests if the frame fills tracks. More...
 
SELECTION_CONDITION ZoneDisplayMode (ZONE_DISPLAY_MODE aMode)
 Create a functor that tests the current zone display mode in the frame. More...
 
SELECTION_CONDITION Get45degMode ()
 Create a functor that tests whether only 45 degree lines should be allowed. More...
 
SELECTION_CONDITION ContentModified ()
 Create a functor that tests if the content of the frame is modified. More...
 
virtual SELECTION_CONDITION UndoAvailable ()
 Create a functor that tests if there are any items in the undo queue. More...
 
SELECTION_CONDITION RedoAvailable ()
 Create a functor that tests if there are any items in the redo queue. More...
 
SELECTION_CONDITION Units (EDA_UNITS aUnit)
 Create a functor that tests if the frame has the specified units. More...
 
SELECTION_CONDITION CurrentTool (const TOOL_ACTION &aTool)
 Create a functor testing if the specified tool is the current active tool in the frame. More...
 
SELECTION_CONDITION NoActiveTool ()
 Create a functor testing if there are no tools active in the frame. More...
 
SELECTION_CONDITION GridVisible ()
 Create a functor testing if the grid is visible in a frame. More...
 
SELECTION_CONDITION GridOverrides ()
 Create a functor testing if the grid overrides wires is enabled in a frame. More...
 
SELECTION_CONDITION PolarCoordinates ()
 Create a functor testing if polar coordinates are current being used. More...
 
SELECTION_CONDITION FullscreenCursor ()
 Create a functor testing if the cursor is full screen in a frame. More...
 
SELECTION_CONDITION BoundingBoxes ()
 
SELECTION_CONDITION ScriptingConsoleVisible ()
 Create a functor testing if the python scripting console window is visible. More...
 

Static Public Member Functions

static bool ShowAlways (const SELECTION &aSelection)
 The default condition function (always returns true). More...
 
static bool ShowNever (const SELECTION &aSelection)
 Always returns false. More...
 
static bool NotEmpty (const SELECTION &aSelection)
 Test if there are any items selected. More...
 
static bool Empty (const SELECTION &aSelection)
 Test if there are no items selected. More...
 
static bool Idle (const SELECTION &aSelection)
 Test if there no items selected or being edited. More...
 
static bool IdleSelection (const SELECTION &aSelection)
 Test if all selected items are not being edited. More...
 
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. More...
 
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. More...
 
static SELECTION_CONDITION OnlyTypes (std::vector< KICAD_T > aTypes)
 Create a functor that tests if the selected items are only of given types. More...
 
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. More...
 
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. More...
 
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. More...
 

Static Protected Member Functions

static bool hasItemsFunc (const SELECTION &aSelection, PCB_BASE_FRAME *aFrame)
 < Helper function used by HasItems() More...
 
static bool padNumberDisplayFunc (const SELECTION &aSelection, PCB_BASE_FRAME *aFrame)
 Helper function used by PadFillDisplay() More...
 
static bool padFillDisplayFunc (const SELECTION &aSelection, PCB_BASE_FRAME *aFrame)
 Helper function used by TextFillDisplay() More...
 
static bool textFillDisplayFunc (const SELECTION &aSelection, PCB_BASE_FRAME *aFrame)
 Helper function used by GraphicsFillDisplay() More...
 
static bool graphicsFillDisplayFunc (const SELECTION &aSelection, PCB_BASE_FRAME *aFrame)
 Helper function used by ViaFillDisplay() More...
 
static bool viaFillDisplayFunc (const SELECTION &aSelection, PCB_BASE_FRAME *aFrame)
 Helper function used by TrackFillDisplay() More...
 
static bool trackFillDisplayFunc (const SELECTION &aSelection, PCB_BASE_FRAME *aFrame)
 Helper function used by ZoneDisplayMode() More...
 
static bool zoneDisplayModeFunc (const SELECTION &aSelection, PCB_BASE_FRAME *aFrame, ZONE_DISPLAY_MODE aMode)
 Helper function used by Line45degMode() More...
 
static bool get45degModeFunc (const SELECTION &aSelection, PCB_BASE_FRAME *aFrame)
 
static bool contentModifiedFunc (const SELECTION &aSelection, EDA_BASE_FRAME *aFrame)
 < Helper function used by ContentModified(). More...
 
static bool undoFunc (const SELECTION &aSelection, EDA_BASE_FRAME *aFrame)
 Helper function used by RedoAvailable(). More...
 
static bool redoFunc (const SELECTION &aSelection, EDA_BASE_FRAME *aFrame)
 Helper function used by Units(). More...
 
static bool unitsFunc (const SELECTION &aSelection, EDA_BASE_FRAME *aFrame, EDA_UNITS aUnits)
 Helper function used by CurrentTool(). More...
 
static bool toolFunc (const SELECTION &aSelection, EDA_BASE_FRAME *aFrame, const TOOL_ACTION &aTool)
 Helper function used by NoActiveTool(). More...
 
static bool noToolFunc (const SELECTION &aSelection, EDA_BASE_FRAME *aFrame)
 Helper function used by GridVisible(). More...
 
static bool gridFunc (const SELECTION &aSelection, EDA_DRAW_FRAME *aFrame)
 Helper function used by GridOverrides(). More...
 
static bool gridOverridesFunc (const SELECTION &aSelection, EDA_DRAW_FRAME *aFrame)
 Helper function used by PolarCoordinates(). More...
 
static bool polarCoordFunc (const SELECTION &aSelection, EDA_DRAW_FRAME *aFrame)
 Helper function used by FullscreenCursor(). More...
 
static bool cursorFunc (const SELECTION &aSelection, EDA_DRAW_FRAME *aFrame)
 Helper function used by DrawBoundingBoxes(). More...
 
static bool bboxesFunc (const SELECTION &aSelection, EDA_DRAW_FRAME *aFrame)
 Helper function used by ScriptingConsoleVisible(). More...
 
static bool consoleVisibleFunc (const SELECTION &aSelection, EDA_DRAW_FRAME *aFrame)
 The frame to apply the conditions to. More...
 

Protected Attributes

EDA_BASE_FRAMEm_frame
 

Static Private Member Functions

static bool hasTypeFunc (const SELECTION &aSelection, KICAD_T aType)
 < Helper function used by HasType() More...
 
static bool hasTypesFunc (const SELECTION &aSelection, std::vector< KICAD_T > aTypes)
 Helper function used by OnlyTypes() More...
 
static bool onlyTypesFunc (const SELECTION &aSelection, std::vector< KICAD_T > aTypes)
 Helper function used by Count() More...
 
static bool countFunc (const SELECTION &aSelection, int aNumber)
 Helper function used by MoreThan() More...
 
static bool moreThanFunc (const SELECTION &aSelection, int aNumber)
 Helper function used by LessThan() More...
 
static bool lessThanFunc (const SELECTION &aSelection, int aNumber)
 Helper function used by operator||. More...
 
static bool orFunc (const SELECTION_CONDITION &aConditionA, const SELECTION_CONDITION &aConditionB, const SELECTION &aSelection)
 Helper function used by operator&&. More...
 
static bool andFunc (const SELECTION_CONDITION &aConditionA, const SELECTION_CONDITION &aConditionB, const SELECTION &aSelection)
 Helper function used by operator! More...
 
static bool notFunc (const SELECTION_CONDITION &aCondition, const SELECTION &aSelection)
 Helper function used by operator||. More...
 
static bool orBoolFunc (const SELECTION_CONDITION &aConditionA, SELECTION_BOOL &aConditionB, const SELECTION &aSelection)
 Helper function used by operator&&. More...
 
static bool andBoolFunc (const SELECTION_CONDITION &aConditionA, SELECTION_BOOL &aConditionB, const SELECTION &aSelection)
 

Detailed Description

Group generic conditions for PCB editor states.

Definition at line 41 of file pcb_editor_conditions.h.

Constructor & Destructor Documentation

◆ PCB_EDITOR_CONDITIONS()

PCB_EDITOR_CONDITIONS::PCB_EDITOR_CONDITIONS ( PCB_BASE_FRAME aFrame)
inline

Definition at line 44 of file pcb_editor_conditions.h.

Member Function Documentation

◆ andBoolFunc()

static bool SELECTION_CONDITIONS::andBoolFunc ( const SELECTION_CONDITION aConditionA,
SELECTION_BOOL aConditionB,
const SELECTION aSelection 
)
inlinestaticprivateinherited

Definition at line 201 of file selection_conditions.h.

◆ andFunc()

static bool SELECTION_CONDITIONS::andFunc ( const SELECTION_CONDITION aConditionA,
const SELECTION_CONDITION aConditionB,
const SELECTION aSelection 
)
inlinestaticprivateinherited

Helper function used by operator!

Definition at line 181 of file selection_conditions.h.

◆ bboxesFunc()

bool EDITOR_CONDITIONS::bboxesFunc ( const SELECTION aSelection,
EDA_DRAW_FRAME aFrame 
)
staticprotectedinherited

◆ BoundingBoxes()

◆ consoleVisibleFunc()

bool EDITOR_CONDITIONS::consoleVisibleFunc ( const SELECTION aSelection,
EDA_DRAW_FRAME aFrame 
)
staticprotectedinherited

The frame to apply the conditions to.

Definition at line 208 of file editor_conditions.cpp.

References EDA_DRAW_FRAME::IsScriptingConsoleVisible().

Referenced by EDITOR_CONDITIONS::ScriptingConsoleVisible().

◆ ContentModified()

SELECTION_CONDITION EDITOR_CONDITIONS::ContentModified ( )
inherited

Create a functor that tests if the content of the frame is modified.

Returns
Functor testing for modified content.

Definition at line 40 of file editor_conditions.cpp.

References EDITOR_CONDITIONS::contentModifiedFunc(), and EDITOR_CONDITIONS::m_frame.

Referenced by CVPCB_MAINFRAME::setupUIConditions(), and FOOTPRINT_EDIT_FRAME::setupUIConditions().

◆ contentModifiedFunc()

bool EDITOR_CONDITIONS::contentModifiedFunc ( const SELECTION aSelection,
EDA_BASE_FRAME aFrame 
)
staticprotectedinherited

< Helper function used by ContentModified().

Helper function used by UndoAvailable().

Definition at line 140 of file editor_conditions.cpp.

References EDA_BASE_FRAME::IsContentModified().

Referenced by EDITOR_CONDITIONS::ContentModified().

◆ Count()

SELECTION_CONDITION SELECTION_CONDITIONS::Count ( int  aNumber)
staticinherited

Create a functor that tests if the number of selected items is equal to the value given as parameter.

Parameters
aNumberis the number of expected items.
Returns
Functor testing if the number of selected items is equal aNumber.

Definition at line 79 of file selection_conditions.cpp.

References SELECTION_CONDITIONS::countFunc().

Referenced by EE_SELECTION_TOOL::Init(), SCH_EDIT_TOOL::Init(), SYMBOL_EDITOR_EDIT_TOOL::Init(), SYMBOL_EDITOR_PIN_TOOL::Init(), CONVERT_TOOL::Init(), EDIT_TOOL::Init(), PAD_TOOL::Init(), PCB_SELECTION_TOOL::Init(), makeShapeModificationMenu(), and PCB_EDIT_FRAME::setupUIConditions().

◆ countFunc()

bool SELECTION_CONDITIONS::countFunc ( const SELECTION aSelection,
int  aNumber 
)
staticprivateinherited

Helper function used by MoreThan()

Definition at line 142 of file selection_conditions.cpp.

References SELECTION::Size().

Referenced by SELECTION_CONDITIONS::Count().

◆ CurrentTool()

SELECTION_CONDITION EDITOR_CONDITIONS::CurrentTool ( const TOOL_ACTION aTool)
inherited

◆ cursorFunc()

bool EDITOR_CONDITIONS::cursorFunc ( const SELECTION aSelection,
EDA_DRAW_FRAME aFrame 
)
staticprotectedinherited

Helper function used by DrawBoundingBoxes().

Definition at line 196 of file editor_conditions.cpp.

References EDA_DRAW_FRAME::GetGalDisplayOptions(), and KIGFX::GAL_DISPLAY_OPTIONS::m_fullscreenCursor.

Referenced by EDITOR_CONDITIONS::FullscreenCursor().

◆ Empty()

bool SELECTION_CONDITIONS::Empty ( const SELECTION aSelection)
staticinherited

Test if there are no items selected.

Definition at line 41 of file selection_conditions.cpp.

References SELECTION::Empty().

Referenced by EE_SELECTION_TOOL::Init(), and PL_SELECTION_TOOL::Init().

◆ FullscreenCursor()

SELECTION_CONDITION EDITOR_CONDITIONS::FullscreenCursor ( )
inherited

Create a functor testing if the cursor is full screen in a frame.

Note
This requires the frame passed into the constructor be be derived from EDA_DRAW_FRAME.
Returns
Functor testing if the cursor is full screen

Definition at line 109 of file editor_conditions.cpp.

References EDITOR_CONDITIONS::cursorFunc(), and EDITOR_CONDITIONS::m_frame.

Referenced by DISPLAY_FOOTPRINTS_FRAME::setupUIConditions(), SCH_EDIT_FRAME::setupUIConditions(), SYMBOL_EDIT_FRAME::setupUIConditions(), GERBVIEW_FRAME::setupUIConditions(), PL_EDITOR_FRAME::setupUIConditions(), FOOTPRINT_EDIT_FRAME::setupUIConditions(), FOOTPRINT_VIEWER_FRAME::setupUIConditions(), and PCB_EDIT_FRAME::setupUIConditions().

◆ Get45degMode()

SELECTION_CONDITION PCB_EDITOR_CONDITIONS::Get45degMode ( )

Create a functor that tests whether only 45 degree lines should be allowed.

Returns
Functor returning true if only 45 degree lines should be allowed

Definition at line 129 of file pcb_editor_conditions.cpp.

References get45degModeFunc(), and EDITOR_CONDITIONS::m_frame.

Referenced by PCB_EDIT_FRAME::setupUIConditions().

◆ get45degModeFunc()

bool PCB_EDITOR_CONDITIONS::get45degModeFunc ( const SELECTION aSelection,
PCB_BASE_FRAME aFrame 
)
staticprotected

◆ GraphicsFillDisplay()

SELECTION_CONDITION PCB_EDITOR_CONDITIONS::GraphicsFillDisplay ( )

Create a functor that tests if the frame fills graphics items.

Returns
Functor returning true if graphics items are filled

Definition at line 85 of file pcb_editor_conditions.cpp.

References graphicsFillDisplayFunc(), and EDITOR_CONDITIONS::m_frame.

Referenced by DISPLAY_FOOTPRINTS_FRAME::setupUIConditions(), FOOTPRINT_EDIT_FRAME::setupUIConditions(), FOOTPRINT_VIEWER_FRAME::setupUIConditions(), and PCB_EDIT_FRAME::setupUIConditions().

◆ graphicsFillDisplayFunc()

bool PCB_EDITOR_CONDITIONS::graphicsFillDisplayFunc ( const SELECTION aSelection,
PCB_BASE_FRAME aFrame 
)
staticprotected

◆ gridFunc()

bool EDITOR_CONDITIONS::gridFunc ( const SELECTION aSelection,
EDA_DRAW_FRAME aFrame 
)
staticprotectedinherited

Helper function used by GridOverrides().

Definition at line 178 of file editor_conditions.cpp.

References EDA_DRAW_FRAME::IsGridVisible().

Referenced by EDITOR_CONDITIONS::GridVisible().

◆ GridOverrides()

SELECTION_CONDITION EDITOR_CONDITIONS::GridOverrides ( )
inherited

Create a functor testing if the grid overrides wires is enabled in a frame.

Note
This requires the frame passed into the constructor be be derived from EDA_DRAW_FRAME.
Returns
Functor testing if grid overrides are enabled

Definition at line 87 of file editor_conditions.cpp.

References EDITOR_CONDITIONS::gridOverridesFunc(), and EDITOR_CONDITIONS::m_frame.

Referenced by SCH_EDIT_FRAME::setupUIConditions(), SYMBOL_EDIT_FRAME::setupUIConditions(), FOOTPRINT_EDIT_FRAME::setupUIConditions(), and PCB_EDIT_FRAME::setupUIConditions().

◆ gridOverridesFunc()

bool EDITOR_CONDITIONS::gridOverridesFunc ( const SELECTION aSelection,
EDA_DRAW_FRAME aFrame 
)
staticprotectedinherited

Helper function used by PolarCoordinates().

Definition at line 184 of file editor_conditions.cpp.

References EDA_DRAW_FRAME::IsGridOverridden().

Referenced by EDITOR_CONDITIONS::GridOverrides().

◆ GridVisible()

SELECTION_CONDITION EDITOR_CONDITIONS::GridVisible ( )
inherited

◆ HasItems()

SELECTION_CONDITION PCB_EDITOR_CONDITIONS::HasItems ( )

Create a functor that tests if there are items in the board.

Returns
Functor returning true if the current board has items

Definition at line 41 of file pcb_editor_conditions.cpp.

References hasItemsFunc(), and EDITOR_CONDITIONS::m_frame.

Referenced by FOOTPRINT_EDIT_FRAME::setupUIConditions(), and PCB_EDIT_FRAME::setupUIConditions().

◆ hasItemsFunc()

bool PCB_EDITOR_CONDITIONS::hasItemsFunc ( const SELECTION aSelection,
PCB_BASE_FRAME aFrame 
)
staticprotected

< Helper function used by HasItems()

Helper function used by PadNumbersDisplay()

Definition at line 139 of file pcb_editor_conditions.cpp.

References PCB_BASE_FRAME::GetBoard(), and BOARD::IsEmpty().

Referenced by HasItems().

◆ HasType()

SELECTION_CONDITION SELECTION_CONDITIONS::HasType ( KICAD_T  aType)
staticinherited

Create a functor that tests if among the selected items there is at least one of a given type.

Parameters
aTypeis the type that is searched.
Returns
Functor testing for presence of items of a given type.

Definition at line 61 of file selection_conditions.cpp.

References SELECTION_CONDITIONS::hasTypeFunc().

Referenced by SCH_EDIT_TOOL::Init(), EDIT_TOOL::Init(), PAD_TOOL::Init(), PCB_SELECTION_TOOL::Init(), and FOOTPRINT_EDIT_FRAME::setupUIConditions().

◆ hasTypeFunc()

bool SELECTION_CONDITIONS::hasTypeFunc ( const SELECTION aSelection,
KICAD_T  aType 
)
staticprivateinherited

< Helper function used by HasType()

Helper function used by HasTypes()

Definition at line 97 of file selection_conditions.cpp.

References SELECTION::Empty().

Referenced by SELECTION_CONDITIONS::HasType().

◆ HasTypes()

SELECTION_CONDITION SELECTION_CONDITIONS::HasTypes ( std::vector< KICAD_T aTypes)
staticinherited

Create a functor that tests if among the selected items there is at least one of a given types.

Parameters
aTypesis an array containing types that are searched.
Returns
Functor testing for presence of items of a given types.

Definition at line 67 of file selection_conditions.cpp.

References SELECTION_CONDITIONS::hasTypesFunc().

Referenced by EE_SELECTION_TOOL::Init(), SCH_EDIT_TOOL::Init(), EDIT_TOOL::Init(), makeShapeModificationMenu(), and PCB_EDIT_FRAME::setupUIConditions().

◆ hasTypesFunc()

bool SELECTION_CONDITIONS::hasTypesFunc ( const SELECTION aSelection,
std::vector< KICAD_T aTypes 
)
staticprivateinherited

Helper function used by OnlyTypes()

Definition at line 112 of file selection_conditions.cpp.

References SELECTION::Empty().

Referenced by SELECTION_CONDITIONS::HasTypes().

◆ Idle()

◆ IdleSelection()

bool SELECTION_CONDITIONS::IdleSelection ( const SELECTION aSelection)
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 SCH_EDIT_TOOL::Init(), SYMBOL_EDITOR_EDIT_TOOL::Init(), and SYMBOL_EDITOR_MOVE_TOOL::Init().

◆ LessThan()

SELECTION_CONDITION SELECTION_CONDITIONS::LessThan ( int  aNumber)
staticinherited

Create a functor that tests if the number of selected items is smaller than the value given as parameter.

Parameters
aNumberis the number used for comparison.
Returns
Functor testing if the number of selected items is smaller than aNumber.

Definition at line 91 of file selection_conditions.cpp.

References SELECTION_CONDITIONS::lessThanFunc().

Referenced by EE_SELECTION_TOOL::Init().

◆ lessThanFunc()

bool SELECTION_CONDITIONS::lessThanFunc ( const SELECTION aSelection,
int  aNumber 
)
staticprivateinherited

Helper function used by operator||.

Definition at line 154 of file selection_conditions.cpp.

References SELECTION::Size().

Referenced by SELECTION_CONDITIONS::LessThan().

◆ MoreThan()

SELECTION_CONDITION SELECTION_CONDITIONS::MoreThan ( int  aNumber)
staticinherited

Create a functor that tests if the number of selected items is greater than the value given as parameter.

Parameters
aNumberis the number used for comparison.
Returns
Functor testing if the number of selected items is greater than aNumber.

Definition at line 85 of file selection_conditions.cpp.

References SELECTION_CONDITIONS::moreThanFunc().

Referenced by EDIT_TABLE_TOOL_BASE< T_TABLE, T_TABLECELL, T_COMMIT >::addMenus(), EE_SELECTION_TOOL::Init(), SCH_EDIT_TOOL::Init(), SCH_LINE_WIRE_BUS_TOOL::Init(), CONVERT_TOOL::Init(), EDIT_TOOL::Init(), ALIGN_DISTRIBUTE_TOOL::Init(), makeShapeModificationMenu(), and PCB_EDIT_FRAME::setupUIConditions().

◆ moreThanFunc()

bool SELECTION_CONDITIONS::moreThanFunc ( const SELECTION aSelection,
int  aNumber 
)
staticprivateinherited

Helper function used by LessThan()

Definition at line 148 of file selection_conditions.cpp.

References SELECTION::Size().

Referenced by SELECTION_CONDITIONS::MoreThan().

◆ NoActiveTool()

SELECTION_CONDITION EDITOR_CONDITIONS::NoActiveTool ( )
inherited

Create a functor testing if there are no tools active in the frame.

Returns
Functor testing the frame has no tools running.

Definition at line 70 of file editor_conditions.cpp.

References EDITOR_CONDITIONS::m_frame, and EDITOR_CONDITIONS::noToolFunc().

Referenced by FOOTPRINT_EDIT_FRAME::setupUIConditions(), and PCB_EDIT_FRAME::setupUIConditions().

◆ NotEmpty()

◆ notFunc()

static bool SELECTION_CONDITIONS::notFunc ( const SELECTION_CONDITION aCondition,
const SELECTION aSelection 
)
inlinestaticprivateinherited

Helper function used by operator||.

Definition at line 188 of file selection_conditions.h.

◆ noToolFunc()

bool EDITOR_CONDITIONS::noToolFunc ( const SELECTION aSelection,
EDA_BASE_FRAME aFrame 
)
staticprotectedinherited

Helper function used by GridVisible().

Definition at line 172 of file editor_conditions.cpp.

References TOOLS_HOLDER::ToolStackIsEmpty().

Referenced by EDITOR_CONDITIONS::NoActiveTool().

◆ OnlyTypes()

◆ onlyTypesFunc()

bool SELECTION_CONDITIONS::onlyTypesFunc ( const SELECTION aSelection,
std::vector< KICAD_T aTypes 
)
staticprivateinherited

Helper function used by Count()

Definition at line 127 of file selection_conditions.cpp.

References SELECTION::Empty().

Referenced by SELECTION_CONDITIONS::OnlyTypes().

◆ orBoolFunc()

static bool SELECTION_CONDITIONS::orBoolFunc ( const SELECTION_CONDITION aConditionA,
SELECTION_BOOL aConditionB,
const SELECTION aSelection 
)
inlinestaticprivateinherited

Helper function used by operator&&.

Definition at line 194 of file selection_conditions.h.

◆ orFunc()

static bool SELECTION_CONDITIONS::orFunc ( const SELECTION_CONDITION aConditionA,
const SELECTION_CONDITION aConditionB,
const SELECTION aSelection 
)
inlinestaticprivateinherited

Helper function used by operator&&.

Definition at line 174 of file selection_conditions.h.

◆ PadFillDisplay()

SELECTION_CONDITION PCB_EDITOR_CONDITIONS::PadFillDisplay ( )

Create a functor that tests if the frame fills the pads.

Returns
Functor returning true if the pads are filled

Definition at line 63 of file pcb_editor_conditions.cpp.

References EDITOR_CONDITIONS::m_frame, and padFillDisplayFunc().

Referenced by DISPLAY_FOOTPRINTS_FRAME::setupUIConditions(), FOOTPRINT_EDIT_FRAME::setupUIConditions(), FOOTPRINT_VIEWER_FRAME::setupUIConditions(), and PCB_EDIT_FRAME::setupUIConditions().

◆ padFillDisplayFunc()

bool PCB_EDITOR_CONDITIONS::padFillDisplayFunc ( const SELECTION aSelection,
PCB_BASE_FRAME aFrame 
)
staticprotected

◆ padNumberDisplayFunc()

bool PCB_EDITOR_CONDITIONS::padNumberDisplayFunc ( const SELECTION aSelection,
PCB_BASE_FRAME aFrame 
)
staticprotected

◆ PadNumbersDisplay()

SELECTION_CONDITION PCB_EDITOR_CONDITIONS::PadNumbersDisplay ( )

Create a functor that tests if the pad numbers are displayed.

Returns
Functor returning true if the pad numbers are displayed

Definition at line 52 of file pcb_editor_conditions.cpp.

References EDITOR_CONDITIONS::m_frame, and padNumberDisplayFunc().

Referenced by DISPLAY_FOOTPRINTS_FRAME::setupUIConditions(), and FOOTPRINT_VIEWER_FRAME::setupUIConditions().

◆ polarCoordFunc()

bool EDITOR_CONDITIONS::polarCoordFunc ( const SELECTION aSelection,
EDA_DRAW_FRAME aFrame 
)
staticprotectedinherited

Helper function used by FullscreenCursor().

Definition at line 190 of file editor_conditions.cpp.

References EDA_DRAW_FRAME::GetShowPolarCoords().

Referenced by EDITOR_CONDITIONS::PolarCoordinates().

◆ PolarCoordinates()

SELECTION_CONDITION EDITOR_CONDITIONS::PolarCoordinates ( )
inherited

Create a functor testing if polar coordinates are current being used.

Note
This requires the frame passed into the constructor be be derived from EDA_DRAW_FRAME.
Returns
Functor testing if the grid is visible

Definition at line 98 of file editor_conditions.cpp.

References EDITOR_CONDITIONS::m_frame, and EDITOR_CONDITIONS::polarCoordFunc().

Referenced by GERBVIEW_FRAME::setupUIConditions(), and PCB_EDIT_FRAME::setupUIConditions().

◆ RedoAvailable()

SELECTION_CONDITION EDITOR_CONDITIONS::RedoAvailable ( )
inherited

Create a functor that tests if there are any items in the redo queue.

Returns
Functor testing if the redo queue has items.

Definition at line 52 of file editor_conditions.cpp.

References EDITOR_CONDITIONS::m_frame, and EDITOR_CONDITIONS::redoFunc().

Referenced by CVPCB_MAINFRAME::setupUIConditions(), SCH_EDIT_FRAME::setupUIConditions(), SYMBOL_EDIT_FRAME::setupUIConditions(), PL_EDITOR_FRAME::setupUIConditions(), FOOTPRINT_EDIT_FRAME::setupUIConditions(), and PCB_EDIT_FRAME::setupUIConditions().

◆ redoFunc()

bool EDITOR_CONDITIONS::redoFunc ( const SELECTION aSelection,
EDA_BASE_FRAME aFrame 
)
staticprotectedinherited

Helper function used by Units().

Definition at line 152 of file editor_conditions.cpp.

References EDA_BASE_FRAME::GetRedoCommandCount().

Referenced by EDITOR_CONDITIONS::RedoAvailable().

◆ ScriptingConsoleVisible()

SELECTION_CONDITION EDITOR_CONDITIONS::ScriptingConsoleVisible ( )
inherited

Create a functor testing if the python scripting console window is visible.

Note
This requires the frame passed into the constructor be be derived from EDA_DRAW_FRAME.
Returns
Functor testing if the python scripting console window is visible

Definition at line 130 of file editor_conditions.cpp.

References EDITOR_CONDITIONS::consoleVisibleFunc(), and EDITOR_CONDITIONS::m_frame.

Referenced by SCH_EDIT_FRAME::setupUIConditions(), and PCB_EDIT_FRAME::setupUIConditions().

◆ ShowAlways()

◆ ShowNever()

static bool SELECTION_CONDITIONS::ShowNever ( const SELECTION aSelection)
inlinestaticinherited

◆ TextFillDisplay()

SELECTION_CONDITION PCB_EDITOR_CONDITIONS::TextFillDisplay ( )

Create a functor that tests if the frame fills text items.

Returns
Functor returning true if the text items are filled

Definition at line 74 of file pcb_editor_conditions.cpp.

References EDITOR_CONDITIONS::m_frame, and textFillDisplayFunc().

Referenced by DISPLAY_FOOTPRINTS_FRAME::setupUIConditions(), FOOTPRINT_EDIT_FRAME::setupUIConditions(), FOOTPRINT_VIEWER_FRAME::setupUIConditions(), and PCB_EDIT_FRAME::setupUIConditions().

◆ textFillDisplayFunc()

bool PCB_EDITOR_CONDITIONS::textFillDisplayFunc ( const SELECTION aSelection,
PCB_BASE_FRAME aFrame 
)
staticprotected

◆ toolFunc()

bool EDITOR_CONDITIONS::toolFunc ( const SELECTION aSelection,
EDA_BASE_FRAME aFrame,
const TOOL_ACTION aTool 
)
staticprotectedinherited

Helper function used by NoActiveTool().

Definition at line 165 of file editor_conditions.cpp.

References TOOLS_HOLDER::IsCurrentTool().

Referenced by EDITOR_CONDITIONS::CurrentTool().

◆ TrackFillDisplay()

SELECTION_CONDITION PCB_EDITOR_CONDITIONS::TrackFillDisplay ( )

Create a functor that tests if the frame fills tracks.

Returns
Functor returning true if tracks are filled

Definition at line 107 of file pcb_editor_conditions.cpp.

References EDITOR_CONDITIONS::m_frame, and trackFillDisplayFunc().

Referenced by PCB_EDIT_FRAME::setupUIConditions().

◆ trackFillDisplayFunc()

bool PCB_EDITOR_CONDITIONS::trackFillDisplayFunc ( const SELECTION aSelection,
PCB_BASE_FRAME aFrame 
)
staticprotected

◆ UndoAvailable()

SELECTION_CONDITION EDITOR_CONDITIONS::UndoAvailable ( )
virtualinherited

Create a functor that tests if there are any items in the undo queue.

Returns
Functor testing if the undo queue has items.

Definition at line 46 of file editor_conditions.cpp.

References EDITOR_CONDITIONS::m_frame, and EDITOR_CONDITIONS::undoFunc().

Referenced by CVPCB_MAINFRAME::setupUIConditions(), SYMBOL_EDIT_FRAME::setupUIConditions(), PL_EDITOR_FRAME::setupUIConditions(), and FOOTPRINT_EDIT_FRAME::setupUIConditions().

◆ undoFunc()

bool EDITOR_CONDITIONS::undoFunc ( const SELECTION aSelection,
EDA_BASE_FRAME aFrame 
)
staticprotectedinherited

Helper function used by RedoAvailable().

Definition at line 146 of file editor_conditions.cpp.

References EDA_BASE_FRAME::GetUndoCommandCount().

Referenced by EDITOR_CONDITIONS::UndoAvailable().

◆ Units()

◆ unitsFunc()

bool EDITOR_CONDITIONS::unitsFunc ( const SELECTION aSelection,
EDA_BASE_FRAME aFrame,
EDA_UNITS  aUnits 
)
staticprotectedinherited

Helper function used by CurrentTool().

Definition at line 158 of file editor_conditions.cpp.

References UNITS_PROVIDER::GetUserUnits().

Referenced by EDITOR_CONDITIONS::Units().

◆ ViaFillDisplay()

SELECTION_CONDITION PCB_EDITOR_CONDITIONS::ViaFillDisplay ( )

Create a functor that tests if the frame fills vias.

Returns
Functor returning true if vias are filled

Definition at line 96 of file pcb_editor_conditions.cpp.

References EDITOR_CONDITIONS::m_frame, and viaFillDisplayFunc().

Referenced by PCB_EDIT_FRAME::setupUIConditions().

◆ viaFillDisplayFunc()

bool PCB_EDITOR_CONDITIONS::viaFillDisplayFunc ( const SELECTION aSelection,
PCB_BASE_FRAME aFrame 
)
staticprotected

◆ ZoneDisplayMode()

SELECTION_CONDITION PCB_EDITOR_CONDITIONS::ZoneDisplayMode ( ZONE_DISPLAY_MODE  aMode)

Create a functor that tests the current zone display mode in the frame.

Parameters
aModeis the mode to test for
Returns
Functor returning true if the frame is using the specified mode

Definition at line 118 of file pcb_editor_conditions.cpp.

References EDITOR_CONDITIONS::m_frame, and zoneDisplayModeFunc().

Referenced by PCB_EDIT_FRAME::setupUIConditions().

◆ zoneDisplayModeFunc()

bool PCB_EDITOR_CONDITIONS::zoneDisplayModeFunc ( const SELECTION aSelection,
PCB_BASE_FRAME aFrame,
ZONE_DISPLAY_MODE  aMode 
)
staticprotected

Helper function used by Line45degMode()

Definition at line 183 of file pcb_editor_conditions.cpp.

References PCB_BASE_FRAME::GetDisplayOptions(), and PCB_DISPLAY_OPTIONS::m_ZoneDisplayMode.

Referenced by ZoneDisplayMode().

Member Data Documentation

◆ m_frame


The documentation for this class was generated from the following files: