37 std::deque<SCH_ITEM*>& aItems ) :
41 m_wireWidth( aParent, m_staticTextWidth, m_lineWidth, m_staticWidthUnits ),
42 m_junctionSize( aParent, m_dotSizeLabel, m_dotSizeCtrl, m_dotSizeUnits )
54 for(
const std::pair<const PLOT_DASH_TYPE, lineTypeStruct>& typeEntry :
lineTypeNames )
74 if( item->HasLineStroke() )
76 stroke = item->GetStroke();
91 return !item->HasLineStroke() || item->GetStroke().GetWidth() == stroke.GetWidth();
104 if( item->HasLineStroke() )
105 return item->GetStroke().GetColor() == color;
107 return static_cast<const SCH_JUNCTION*>( item )->GetColor() == color;
120 return !item->HasLineStroke()
121 || item->GetStroke().GetPlotStyle() == stroke.GetPlotStyle();
131 wxFAIL_MSG(
"Line type not found in the type lookup map" );
142 return item->Type() != SCH_JUNCTION_T
143 || static_cast<const SCH_JUNCTION*>( item )->GetDiameter() == dotSize;
186 if( item->HasLineStroke() )
193 static_cast<SCH_LINE*
>( item )->SetLineWidth( width );
204 lineStyle = it->first;
207 static_cast<SCH_LINE*
>( item )->SetLineStyle( lineStyle );
wxBitmap KiBitmap(BITMAPS aBitmap, int aHeightTag)
Construct a wxBitmap from an image identifier Returns the image from the active theme if the image ha...
COLOR4D GetColor(int aLayer) const
void SetSwatchColor(const KIGFX::COLOR4D &aColor, bool aSendEvent)
Set the current swatch color directly.
KIGFX::COLOR4D GetSwatchColor() const
void SetDefaultColor(const KIGFX::COLOR4D &aColor)
Sets the color that will be chosen with the "Reset to Default" button in the chooser.
void SetSwatchBackground(const KIGFX::COLOR4D &aBackground)
Set the swatch background color.
void SetInitialFocus(wxWindow *aWindow)
Sets the window (usually a wxTextCtrl) that should be focused when the dialog is shown.
void SetupStandardButtons(std::map< int, wxString > aLabels={})
void finishDialogSettings()
In all dialogs, we must call the same functions to fix minimal dlg size, the default position and per...
Class DIALOG_WIRE_BUS_PROPERTIES_BASE.
COLOR_SWATCH * m_colorSwatch
wxBitmapComboBox * m_typeCombo
wxStaticText * m_helpLabel1
wxStaticText * m_helpLabel2
std::deque< SCH_ITEM * > m_items
DIALOG_WIRE_BUS_PROPERTIES(SCH_EDIT_FRAME *aParent, std::deque< SCH_ITEM * > &aItems)
bool TransferDataToWindow() override
UNIT_BINDER m_junctionSize
bool TransferDataFromWindow() override
void resetDefaults(wxCommandEvent &event) override
virtual void Refresh(bool aEraseBackground=true, const wxRect *aRect=nullptr) override
A color representation with 4 components: red, green, blue, alpha.
wxColour ToColour() const
A holder to handle information on schematic or board items.
void PushItem(const ITEM_PICKER &aItem)
Push aItem to the top of the list.
SCH_DRAW_PANEL * GetCanvas() const override
Return a pointer to GAL-based canvas of given EDA draw frame.
COLOR_SETTINGS * GetColorSettings(bool aForceRefresh=false) const override
Returns a pointer to the active color theme settings.
Base class for a bus or wire entry.
void SetBusEntryColor(const COLOR4D &aColor)
void SetPenWidth(int aWidth)
void SetLineStyle(PLOT_DASH_TYPE aStyle)
Schematic editor (Eeschema) main window.
void OnModify() override
Must be called after a schematic change in order to set the "modify" flag and update other data struc...
SCH_SCREEN * GetScreen() const override
Return a pointer to a BASE_SCREEN or one of its derivatives.
void SaveCopyInUndoList(SCH_SCREEN *aScreen, SCH_ITEM *aItemToCopy, UNDO_REDO aTypeCommand, bool aAppend, bool aDirtyConnectivity=true)
Create a copy of the current schematic item, and put it in the undo list.
void UpdateItem(EDA_ITEM *aItem, bool isAddOrDelete=false, bool aUpdateRtree=false) override
Mark an item for refresh.
Base class for any item which can be embedded within the SCHEMATIC container class,...
void SetDiameter(int aDiameter)
void SetColor(const COLOR4D &aColor)
Segment description base class to describe items which have 2 end points (track, wire,...
void SetLineColor(const COLOR4D &aColor)
Simple container to manage line stroke parameters.
KIGFX::COLOR4D GetColor() const
PLOT_DASH_TYPE GetPlotStyle() const
virtual long long int GetValue()
Return the current value in Internal Units.
void Enable(bool aEnable)
Enable/disable the label, widget and units label.
bool IsIndeterminate() const
Return true if the control holds the indeterminate value (for instance, if it represents a multiple s...
virtual void SetValue(long long int aValue)
Set new value (in Internal Units) for the text field, taking care of units conversion.
@ LAYER_SCHEMATIC_BACKGROUND
wxFont GetInfoFont(wxWindow *aWindow)
void Refresh()
Update the board display after modifying it by a python script (note: it is automatically called by a...
PLOT_DASH_TYPE
Dashed line types.
#define INDETERMINATE_STYLE
const std::map< PLOT_DASH_TYPE, struct lineTypeStruct > lineTypeNames
#define INDETERMINATE_ACTION