66 wxT(
"Cannot swap junction data with invalid item." ) );
117 const VECTOR2I& aOffset,
bool aForceNoFill,
bool aDimmed )
122 if(
color == COLOR4D::UNSPECIFIED )
152 aItemList.push_back( item );
163void SCH_JUNCTION::Show(
int nestLevel, std::ostream& os )
const
168 NestedSpace( nestLevel, os ) <<
'<' << s.Lower().mb_str() <<
m_pos <<
", " <<
m_diameter
183 if(
m_color != COLOR4D::UNSPECIFIED )
210 return aPosition ==
m_pos;
221 BOX2I selRect( aRect );
230 return selRect.
Collide( &junction, aAccuracy );
245 wxCHECK( junction,
false );
253 return m_pos == aPosition;
258 int aUnit,
int aBodyStyle,
const VECTOR2I& aOffset,
bool aDimmed )
266 if(
color == COLOR4D::UNSPECIFIED )
277 return BITMAPS::add_junction;
306 aList.emplace_back(
_(
"Junction" ), wxEmptyString );
321 aList.emplace_back(
_(
"Resolved Netclass" ),
358 double similarity = 1.0;
383 PROPERTY_DISPLAY::PT_SIZE ) );
constexpr EDA_IU_SCALE schIUScale
BITMAPS
A list of all bitmap identifiers.
constexpr BOX2I KiROUND(const BOX2D &aBoxD)
constexpr const Vec & GetPosition() const
constexpr BOX2< Vec > & Inflate(coord_type dx, coord_type dy)
Inflates the rectangle horizontally by dx and vertically by dy.
constexpr size_type GetWidth() const
constexpr size_type GetHeight() const
constexpr bool Contains(const Vec &aPoint) const
Helper class used to store the state of schematic items that can be connected to other schematic item...
The base class for create windows for drawing purpose.
A base class for most all the KiCad significant classes used in schematics and boards.
KICAD_T Type() const
Returns the type of object.
A color representation with 4 components: red, green, blue, alpha.
Container for all the knowledge about how graphical objects are drawn on any output surface/device.
const COLOR4D & GetLayerColor(int aLayer) const
Return the color used to draw a layer.
wxDC * GetPrintDC() const
Base plotter engine class.
virtual void Circle(const VECTOR2I &pos, int diametre, FILL_T fill, int width=USE_DEFAULT_LINE_WIDTH)=0
RENDER_SETTINGS * RenderSettings()
virtual void SetColor(const COLOR4D &color)=0
Provide class metadata.Helper macro to map type hashes to names.
void InheritsAfter(TYPE_ID aDerived, TYPE_ID aBase)
Declare an inheritance relationship between types.
static PROPERTY_MANAGER & Instance()
PROPERTY_BASE & AddProperty(PROPERTY_BASE *aProperty, const wxString &aGroup=wxEmptyString)
Register a property.
SCHEMATIC_SETTINGS & Settings() const
Each graphical item can have a SCH_CONNECTION describing its logical connection (to a bus or net).
void AppendInfoToMsgPanel(std::vector< MSG_PANEL_ITEM > &aList) const
Adds information about the connection object to aList.
Schematic editor (Eeschema) main window.
Base class for any item which can be embedded within the SCHEMATIC container class,...
SCHEMATIC * Schematic() const
Searches the item hierarchy to find a SCHEMATIC.
std::shared_ptr< NETCLASS > GetEffectiveNetClass(const SCH_SHEET_PATH *aSheet=nullptr) const
SCH_LAYER_ID GetLayer() const
Return the layer this item is on.
bool IsConnectivityDirty() const
void SwapFlags(SCH_ITEM *aItem)
Swap the non-temp and non-edit flags.
SCH_CONNECTION * Connection(const SCH_SHEET_PATH *aSheet=nullptr) const
Retrieve the connection associated with this object in the given sheet.
void SwapData(SCH_ITEM *aItem) override
Swap the internal data structures aItem with the schematic item.
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.
virtual bool operator<(const SCH_ITEM &aItem) const override
int GetEffectiveDiameter() const
double Similarity(const SCH_ITEM &aOther) const override
Return a measure of how likely the other object is to represent the same object.
SHAPE_CIRCLE getEffectiveShape() const
SCH_JUNCTION(const VECTOR2I &aPosition=VECTOR2I(0, 0), int aDiameter=0, SCH_LAYER_ID aLayer=LAYER_JUNCTION)
BITMAPS GetMenuImage() const override
Return a pointer to an image to be used in menus.
COLOR4D m_lastResolvedColor
int m_diameter
Zero is user default.
bool operator==(const SCH_ITEM &aOther) const override
void SetDiameter(int aDiameter)
void GetEndPoints(std::vector< DANGLING_END_ITEM > &aItemList) override
Add the schematic item end points to aItemList if the item has end points.
COLOR4D m_color
#COLOR4D::UNSPECIFIED is user default.
void MirrorHorizontally(int aCenter) override
Mirror item horizontally about aCenter.
COLOR4D GetJunctionColor() const
void GetMsgPanelInfo(EDA_DRAW_FRAME *aFrame, std::vector< MSG_PANEL_ITEM > &aList) override
Populate aList of MSG_PANEL_ITEM objects with it's internal state for display purposes.
void Print(const SCH_RENDER_SETTINGS *aSettings, int aUnit, int aBodyStyle, const VECTOR2I &aOffset, bool aForceNoFill, bool aDimmed) override
Print an item.
bool doIsConnected(const VECTOR2I &aPosition) const override
Provide the object specific test to see if it is connected to aPosition.
std::vector< VECTOR2I > GetConnectionPoints() const override
Add all the connection points for this item to aPoints.
bool HasConnectivityChanges(const SCH_ITEM *aItem, const SCH_SHEET_PATH *aInstance=nullptr) const override
Check if aItem has connectivity changes against this object.
VECTOR2I GetPosition() const override
void SetColor(const COLOR4D &aColor)
void MirrorVertically(int aCenter) override
Mirror item vertically about aCenter.
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 Rotate(const VECTOR2I &aCenter, bool aRotateCCW) override
Rotate the item around aCenter 90 degrees in the clockwise direction.
int m_lastResolvedDiameter
wxString GetClass() const override
Return the class name.
EDA_ITEM * Clone() const override
Create a duplicate of this item with linked list members set to NULL.
bool HitTest(const VECTOR2I &aPosition, int aAccuracy=0) const override
Test if aPosition is inside or on the boundary of this item.
const BOX2I GetBoundingBox() const override
Return the orthogonal bounding box of this object for display purposes.
Handle access to a stack of flattened SCH_SHEET objects by way of a path for creating a flattened sch...
bool Collide(const SEG &aSeg, int aClearance=0, int *aActual=nullptr, VECTOR2I *aLocation=nullptr) const override
Check if the boundary of shape (this) lies closer to the segment aSeg than aClearance,...
const VECTOR2I GetCenter() const
bool Collide(const SHAPE *aShape, int aClearance, VECTOR2I *aMTV) const override
Check if the boundary of shape (this) lies closer to the shape aShape than aClearance,...
wxString MessageTextFromValue(double aValue, bool aAddUnitLabel=true, EDA_DATA_TYPE aType=EDA_DATA_TYPE::DISTANCE) const
A lower-precision version of StringFromValue().
#define DEFAULT_JUNCTION_DIAM
The default bus and wire entry size in mils.
#define DEFAULT_WIRE_WIDTH_MILS
The default bus width in mils. (can be changed in preference menu)
static constexpr EDA_ANGLE ANGLE_90
static constexpr EDA_ANGLE ANGLE_270
#define STRUCT_DELETED
flag indication structures to be erased
#define SKIP_STRUCT
flag indicating that the structure should be ignored
void GRFilledCircle(wxDC *aDC, const VECTOR2I &aPos, int aRadius, int aWidth, const COLOR4D &aStrokeColor, const COLOR4D &aFillColor)
Draw a circle onto the drawing context aDC centered at the user coordinates (x,y).
SCH_LAYER_ID
Eeschema drawing layers.
@ LAYER_SELECTION_SHADOWS
constexpr void MIRROR(T &aPoint, const T &aMirrorRef)
Updates aPoint with the mirror of aPoint relative to the aMirrorRef.
static struct SCH_JUNCTION_DESC _SCH_JUNCTION_DESC
wxString UnescapeString(const wxString &aSource)
constexpr int MilsToIU(int mils) const
void RotatePoint(int *pX, int *pY, const EDA_ANGLE &aAngle)
Calculate the new point of coord coord pX, pY, for a rotation center 0, 0.