35#include <wx/dataview.h>
259 return defaultSettings;
266 LSET aLayers,
bool aFpEditorMode )
275 wxDataViewColumn* checkColumn = aList->AppendToggleColumn(
276 wxEmptyString, wxDATAVIEW_CELL_ACTIVATABLE, wxCOL_WIDTH_DEFAULT, wxALIGN_CENTER );
278 wxDataViewColumn* layerColumn = aList->AppendIconTextColumn( wxEmptyString );
279 wxDataViewColumn* layerIDColumn = aList->AppendTextColumn( wxEmptyString );
280 layerIDColumn->SetHidden(
true );
288 if( aFpEditorMode && layerID ==
In1_Cu )
289 layerName =
_(
"Inner layers" );
298 icon.CopyFromBitmap( bitmap );
300 wxVector<wxVariant> row;
301 row.push_back( wxVariant(
m_Layers.test( layerID ) ) );
302 row.push_back( wxVariant( wxDataViewIconText( layerName, icon ) ) );
303 row.push_back( wxVariant( wxString::Format( wxT(
"%i" ), layerID ) ) );
304 aList->AppendItem( row );
307 aList->SetToggleValue(
true, (
unsigned) aList->GetItemCount() - 1, 0 );
310 int checkColSize = aList->FromDIP( 22 );
315 aList->SetIndent( 0 );
316 aList->SetMinClientSize( wxSize( checkColSize + layerColSize,
317 aList->GetMinClientSize().y ) );
319 checkColumn->SetWidth( checkColSize );
320 layerColumn->SetWidth( layerColSize );
constexpr EDA_IU_SCALE pcbIUScale
BASE_SET & reset(size_t pos)
BASE_SET & set(size_t pos)
bool SetNetCode(int aNetCode, bool aNoAssert)
Set net using a net code.
virtual void SetLocked(bool aLocked)
virtual bool IsLocked() const
Information pertinent to a Pcbnew printed circuit board.
const wxString GetLayerName(PCB_LAYER_ID aLayer) const
Return the name of a aLayer.
COLOR4D GetColor(int aLayer) const
static wxBitmap MakeBitmap(const KIGFX::COLOR4D &aColor, const KIGFX::COLOR4D &aBackground, const wxSize &aSize, const wxSize &aCheckerboardSize, const KIGFX::COLOR4D &aCheckerboardBackground)
A color representation with 4 components: red, green, blue, alpha.
LSET is a set of PCB_LAYER_IDs.
LSEQ UIOrder() const
Returns the copper, technical and user layers in the order shown in layer widget.
Base PCB main window class for Pcbnew, Gerbview, and CvPcb footprint viewer.
virtual COLOR_SETTINGS * GetColorSettings(bool aForceRefresh=false) const override
Helper to retrieve the current color settings.
ZONE_SETTINGS handles zones parameters.
bool GetDoNotAllowCopperPour() const
bool m_keepoutDoNotAllowPads
void SetIsRuleArea(bool aEnable)
bool operator==(const ZONE_SETTINGS &aOther) const
unsigned int m_cornerRadius
bool GetDoNotAllowTracks() const
EDA_ANGLE m_HatchOrientation
RULE_AREA_PLACEMENT_SOURCE_TYPE GetRuleAreaPlacementSourceType() const
int m_HatchBorderAlgorithm
void SetDoNotAllowVias(bool aEnable)
bool GetDoNotAllowFootprints() const
void SetRuleAreaPlacementSourceType(RULE_AREA_PLACEMENT_SOURCE_TYPE aType)
long long int m_minIslandArea
wxString GetRuleAreaPlacementSource() const
bool m_keepoutDoNotAllowTracks
bool GetDoNotAllowPads() const
double m_HatchSmoothingValue
bool m_ruleAreaPlacementEnabled
Placement rule area data.
RULE_AREA_PLACEMENT_SOURCE_TYPE m_ruleAreaPlacementSourceType
void ExportSetting(ZONE &aTarget, bool aFullExport=true) const
Function ExportSetting copy settings to a given zone.
bool GetIsRuleArea() const
Accessors to parameters used in Rule Area zones:
int m_cornerSmoothingType
void SetDoNotAllowTracks(bool aEnable)
bool GetDoNotAllowVias() const
bool m_keepoutDoNotAllowCopperPour
ISLAND_REMOVAL_MODE m_removeIslands
double m_HatchHoleMinArea
bool GetRuleAreaPlacementEnabled() const
long long int GetMinIslandArea() const
long m_ThermalReliefSpokeWidth
TEARDROP_TYPE m_TeardropType
static const ZONE_SETTINGS & GetDefaultSettings()
void SetCornerRadius(int aRadius)
void SetupLayersList(wxDataViewListCtrl *aList, PCB_BASE_FRAME *aFrame, LSET aLayers, bool aFpEditorMode)
A helper routine for the various zone dialogs (copper, non-copper, keepout).
ZONE_FILL_MODE m_FillMode
ZONE_CONNECTION m_padConnection
void SetDoNotAllowFootprints(bool aEnable)
void SetDoNotAllowPads(bool aEnable)
ZONE_SETTINGS & operator<<(const ZONE &aSource)
operator << ( const ZONE& ) was Function ImportSetting copies settings from a given zone into this ob...
int m_HatchSmoothingLevel
ISLAND_REMOVAL_MODE GetIslandRemovalMode() const
ZONE_BORDER_DISPLAY_STYLE m_ZoneBorderDisplayStyle
Option to show the zone area (outlines only, short hatches or full hatches.
bool m_keepoutDoNotAllowFootprints
bool m_keepoutDoNotAllowVias
void SetDoNotAllowCopperPour(bool aEnable)
wxString m_ruleAreaPlacementSource
Handle a list of polygons defining a copper zone.
void SetHatchThickness(int aThickness)
void SetHatchBorderAlgorithm(int aAlgo)
void SetDoNotAllowPads(bool aEnable)
int GetHatchBorderAlgorithm() const
bool GetIsRuleArea() const
Accessors to parameters used in Rule Area zones:
std::optional< int > GetLocalClearance() const override
void SetRuleAreaPlacementEnabled(bool aEnabled)
void SetLocalClearance(std::optional< int > aClearance)
wxString GetRuleAreaPlacementSource() const
bool GetDoNotAllowVias() const
void SetCornerRadius(unsigned int aRadius)
void SetCornerSmoothingType(int aType)
void SetBorderDisplayStyle(ZONE_BORDER_DISPLAY_STYLE aBorderHatchStyle, int aBorderHatchPitch, bool aRebuilBorderdHatch)
Set all hatch parameters for the zone.
bool GetDoNotAllowPads() const
void SetMinThickness(int aMinThickness)
bool GetDoNotAllowTracks() const
void SetHatchOrientation(const EDA_ANGLE &aStep)
bool GetRuleAreaPlacementEnabled() const
void SetHatchSmoothingValue(double aValue)
void SetHatchSmoothingLevel(int aLevel)
void SetDoNotAllowCopperPour(bool aEnable)
void SetThermalReliefSpokeWidth(int aThermalReliefSpokeWidth)
ISLAND_REMOVAL_MODE GetIslandRemovalMode() const
long long int GetMinIslandArea() const
void SetRuleAreaPlacementSourceType(RULE_AREA_PLACEMENT_SOURCE_TYPE aType)
void SetIsRuleArea(bool aEnable)
void SetDoNotAllowTracks(bool aEnable)
const wxString & GetZoneName() const
int GetMinThickness() const
void SetFillMode(ZONE_FILL_MODE aFillMode)
ZONE_CONNECTION GetPadConnection() const
int GetHatchThickness() const
double GetHatchHoleMinArea() const
void SetLayerSet(const LSET &aLayerSet) override
void SetDoNotAllowVias(bool aEnable)
int GetThermalReliefSpokeWidth() const
int GetBorderHatchPitch() const
HatchBorder related methods.
ZONE_BORDER_DISPLAY_STYLE GetHatchStyle() const
void SetThermalReliefGap(int aThermalReliefGap)
EDA_ANGLE GetHatchOrientation() const
bool GetDoNotAllowFootprints() const
ZONE_FILL_MODE GetFillMode() const
virtual LSET GetLayerSet() const override
Return a std::bitset of all layers on which the item physically resides.
void SetDoNotAllowFootprints(bool aEnable)
bool GetDoNotAllowCopperPour() const
RULE_AREA_PLACEMENT_SOURCE_TYPE GetRuleAreaPlacementSourceType() const
void SetHatchHoleMinArea(double aPct)
TEARDROP_TYPE GetTeardropAreaType() const
double GetHatchSmoothingValue() const
int GetHatchSmoothingLevel() const
unsigned int GetCornerRadius() const
int GetCornerSmoothingType() const
void SetAssignedPriority(unsigned aPriority)
void SetPadConnection(ZONE_CONNECTION aPadConnection)
void SetZoneName(const wxString &aName)
void SetTeardropAreaType(TEARDROP_TYPE aType)
Set the type of teardrop if the zone is a teardrop area for non teardrop area, the type must be TEARD...
void SetIslandRemovalMode(ISLAND_REMOVAL_MODE aRemove)
void SetMinIslandArea(long long int aArea)
void SetRuleAreaPlacementSource(const wxString &aSource)
int GetThermalReliefGap() const
void SetHatchGap(int aStep)
unsigned GetAssignedPriority() const
static constexpr EDA_ANGLE ANGLE_0
@ LAYER_PCB_BACKGROUND
PCB background color.
PCB_LAYER_ID
A quick note on layer IDs:
KICOMMON_API wxSize GetTextSize(const wxString &aSingleLine, wxWindow *aWindow)
Return the size of aSingleLine of text when it is rendered in aWindow using whatever font is currentl...
constexpr int mmToIU(double mm) const
static const wxSize CHECKERBOARD_SIZE(8, 8)
static const wxSize LAYER_BITMAP_SIZE(24, 16)
Class ZONE_SETTINGS used to handle zones parameters in dialogs.
#define ZONE_THERMAL_RELIEF_GAP_MM
#define ZONE_BORDER_HATCH_DIST_MM
#define ZONE_THERMAL_RELIEF_COPPER_WIDTH_MM
#define ZONE_CLEARANCE_MM
#define ZONE_THICKNESS_MM