38 std::deque<SCH_ITEM*>& aItems ) :
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;
186 if( item->HasLineStroke() )
190 int width = std::max( 0,
m_wireWidth.GetIntValue() );
193 static_cast<SCH_LINE*
>( item )->SetLineWidth( width );
202 size_t lineTypeSelection =
m_typeCombo->GetSelection();
204 std::advance( it, lineTypeSelection );
207 lineStyle = it->first;
210 static_cast<SCH_LINE*
>( item )->SetLineStyle( lineStyle );
233 commit.
Push( wxString::Format(
_(
"Edit %s" ),
m_items.size() == 1 ?
_(
"Wire/Bus" )
234 :
_(
"Wires/Buses" ) ) );
wxBitmapBundle KiBitmapBundle(BITMAPS aBitmap, int aMinHeight)
static const COLOR4D UNSPECIFIED
For legacy support; used as a value to indicate color hasn't been set yet.
COMMIT & Modify(EDA_ITEM *aItem, BASE_SCREEN *aScreen=nullptr, RECURSE_MODE aRecurse=RECURSE_MODE::NO_RECURSE)
Modify a given item in the model.
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...
wxStaticText * m_staticTextWidth
wxStaticText * m_dotSizeUnits
DIALOG_WIRE_BUS_PROPERTIES_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Wire & Bus Properties"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
wxStaticText * m_dotSizeLabel
wxTextCtrl * m_dotSizeCtrl
COLOR_SWATCH * m_colorSwatch
wxStaticText * m_staticWidthUnits
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
Base class for a bus or wire entry.
virtual void Push(const wxString &aMessage=wxT("A commit"), int aCommitFlags=0) override
Execute the changes.
Schematic editor (Eeschema) main window.
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,...
Simple container to manage line stroke parameters.
LINE_STYLE GetLineStyle() const
KIGFX::COLOR4D GetColor() const
@ 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
Conversion map between LINE_STYLE values and style names displayed.
LINE_STYLE
Dashed line types.
#define INDETERMINATE_STYLE
#define DEFAULT_WIRE_STYLE_LABEL
#define INDETERMINATE_ACTION