24#ifndef SCH_RULE_AREA_H
25#define SCH_RULE_AREA_H
27#include <unordered_set>
58 void ViewGetLayers(
int aLayers[],
int& aCount )
const override;
68 int aUnit,
int aBodyStyle,
const VECTOR2I& aOffset,
bool aDimmed )
override;
78 std::vector<std::pair<SCH_RULE_AREA*, SCH_SCREEN*>>& forceUpdateRuleAreas );
85 static std::vector<std::pair<SCH_RULE_AREA*, SCH_SCREEN*>>
92 const std::unordered_set<SCH_DIRECTIVE_LABEL*>&
GetDirectives()
const;
The base class for create windows for drawing purpose.
A base class for most all the KiCad significant classes used in schematics and boards.
Base plotter engine class.
Holds all the data relating to one schematic.
Base class for any item which can be embedded within the SCHEMATIC container class,...
void SetLayer(SCH_LAYER_ID aLayer)
wxString GetItemDescription(UNITS_PROVIDER *aUnitsProvider, bool aFull) const override
Return a user-visible description string of this item.
virtual std::vector< SHAPE * > MakeEffectiveShapes(bool aEdgeOnly=false) const override
Make a set of SHAPE objects representing the EDA_SHAPE.
const std::unordered_set< SCH_ITEM * > & GetContainedItems() const
Returns a set of all items contained within the rule area.
void ResetDirectivesAndItems(KIGFX::SCH_VIEW *view)
Clears and resets items and directives attached to this rule area.
void ResetCaches(KIGFX::SCH_VIEW *view)
Resets all item and directive caches, saving the current state first.
void addContainedItem(SCH_ITEM *item)
@briefs Adds an item to the list of items which this rule area affects
void addDirective(SCH_DIRECTIVE_LABEL *label, KIGFX::SCH_VIEW *view)
Adds a directive label which applies to items within ths rule area.
const std::unordered_set< SCH_DIRECTIVE_LABEL * > & GetDirectives() const
Returns the set of all directive labels attached to the rule area border.
wxString GetFriendlyName() const override
virtual void Plot(PLOTTER *aPlotter, bool aBackground, const SCH_PLOT_OPTS &aPlotOpts, int aUnit, int aBodyStyle, const VECTOR2I &aOffset, bool aDimmed) override
Plot the item to aPlotter.
bool IsFilledForHitTesting() const override
std::unordered_set< SCH_DIRECTIVE_LABEL * > m_directives
All SCH_DIRECTIVE_LABELs attached to the rule area border.
EDA_ITEM * Clone() const override
Create a duplicate of this item with linked list members set to NULL.
std::unordered_set< SCH_ITEM * > m_prev_items
All SCH_ITEMs contained or intersecting the rule area in the previous update.
void RefreshContainedItemsAndDirectives(SCH_SCREEN *screen, KIGFX::SCH_VIEW *view, std::vector< std::pair< SCH_RULE_AREA *, SCH_SCREEN * > > &forceUpdateRuleAreas)
Refreshes the list of items which this rule area affects.
std::unordered_set< SCH_DIRECTIVE_LABEL * > m_prev_directives
All SCH_DIRECTIVE_LABELs attached to the rule area border in the previous update.
std::unordered_set< SCH_ITEM * > GetPastAndPresentContainedItems() const
Fetches all items which were, or are, within the rule area.
static std::vector< std::pair< SCH_RULE_AREA *, SCH_SCREEN * > > UpdateRuleAreasInScreens(std::unordered_set< SCH_SCREEN * > &screens, KIGFX::SCH_VIEW *view)
Updates all rule area connectvity / caches in the given sheet paths.
std::unordered_set< SCH_ITEM * > m_items
All SCH_ITEMs currently contained or intersecting the rule area.
const std::vector< std::pair< wxString, SCH_ITEM * > > GetResolvedNetclasses() const
Resolves the netclass of this rule area from connected directive labels.
void clearContainedItems()
Clears the list of items which this rule area affects.
void ViewGetLayers(int aLayers[], int &aCount) const override
Return the layers the item is drawn on (which may be more than its "home" layer)
void clearDirectives(KIGFX::SCH_VIEW *view)
Clears the list of directives.
wxString GetClass() const override
Return the class name.
void GetMsgPanelInfo(EDA_DRAW_FRAME *aFrame, std::vector< MSG_PANEL_ITEM > &aList) override
Gets the message panel info for the rule area.
Definition of the SCH_SHEET_PATH and SCH_SHEET_LIST classes for Eeschema.