38 std::deque<SCH_ITEM*>& aItems ) :
42 m_wireWidth( aParent, m_staticTextWidth, m_lineWidth, m_staticWidthUnits ),
43 m_junctionSize( aParent, m_dotSizeLabel, m_dotSizeCtrl, m_dotSizeUnits )
55 for(
const auto& [ lineStyle, lineStyleDesc ] :
lineTypeNames )
75 if( item->HasLineStroke() )
77 stroke = item->GetStroke();
92 return !item->HasLineStroke() || item->GetStroke().GetWidth() == stroke.GetWidth();
105 if( item->HasLineStroke() )
106 return item->GetStroke().GetColor() == color;
108 return static_cast<const SCH_JUNCTION*>( item )->GetColor() == color;
121 return !item->HasLineStroke()
122 || item->GetStroke().GetLineStyle() == stroke.GetLineStyle();
132 wxFAIL_MSG(
"Line type not found in the type lookup map" );
143 return item->Type() != SCH_JUNCTION_T
144 || static_cast<const SCH_JUNCTION*>( item )->GetDiameter() == dotSize;
184 if( item->HasLineStroke() )
191 static_cast<SCH_LINE*
>( item )->SetLineWidth( width );
200 size_t lineTypeSelection =
m_typeCombo->GetSelection();
202 std::advance( it, lineTypeSelection );
205 lineStyle = it->first;
208 static_cast<SCH_LINE*
>( item )->SetLineStyle( lineStyle );
231 commit.
Push( wxString::Format(
_(
"Edit %s" ),
m_items.size() == 1 ?
_(
"Wire/Bus" )
232 :
_(
"Wires/Buses" ) ) );
wxBitmapBundle KiBitmapBundle(BITMAPS aBitmap)
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.
COMMIT & Modify(EDA_ITEM *aItem, BASE_SCREEN *aScreen=nullptr)
Create an undo entry for an item that has been already modified.
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
A color representation with 4 components: red, green, blue, alpha.
wxColour ToColour() const
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(LINE_STYLE aStyle)
virtual void Push(const wxString &aMessage=wxT("A commit"), int aCommitFlags=0) override
Revert the commit by restoring the modified items state.
Schematic editor (Eeschema) main window.
SCH_SCREEN * GetScreen() const override
Return a pointer to a BASE_SCREEN or one of its derivatives.
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.
LINE_STYLE GetLineStyle() const
KIGFX::COLOR4D GetColor() 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
KICOMMON_API wxFont GetInfoFont(wxWindow *aWindow)
void Refresh()
Update the board display after modifying it by a python script (note: it is automatically called by a...
const std::map< LINE_STYLE, struct LINE_STYLE_DESC > lineTypeNames
LINE_STYLE
Dashed line types.
#define INDETERMINATE_STYLE
#define INDETERMINATE_ACTION