26 #include <wx/checkbox.h> 27 #include <wx/filedlg.h> 91 #define RR LAYER_WIDGET::ROW // Render Row abbreviation to reduce source width 94 _(
"Show DCodes identification" ) ),
96 _(
"Show negative objects in this color" ) ),
99 _(
"Show the (x,y) grid dots" ) ),
101 _(
"Show drawing sheet border and title block") ),
103 _(
"PCB Background" ),
true,
false )
106 for(
unsigned row = 0; row <
arrayDim( renderRows ); ++row )
108 if( renderRows[row].
color != COLOR4D::UNSPECIFIED )
111 if( renderRows[row].
id )
126 _(
"Hide All Layers But Active" ),
130 _(
"Always Hide All Layers But Active" ),
136 aMenu->AppendSeparator();
156 int menuId =
event.GetId();
159 bool force_active_layer_visible;
175 for(
int row = 0; row < rowCount; ++row )
179 bool loc_visible = visible;
184 cb->SetValue( loc_visible );
185 visibleLayers[ row ] = loc_visible;
204 wxCommandEvent event;
278 auto settings = static_cast<KIGFX::GERBVIEW_PAINTER*>
281 settings->m_dcodeHighlightValue = dcodeSelected;
295 visibleLayers[ aLayer ] = isVisible;
311 view->GetPainter()->GetSettings()->LoadColors( settings );
312 view->UpdateLayerColor( aId );
void SortLayersByX2Attributes()
void SetLayerColor(int aLayer, const COLOR4D &aColor)
SETTINGS_MANAGER * GetSettingsManager() const
void syncLayerBox(bool aRebuildLayerBox=false)
Update the currently "selected" layer within m_SelLayerBox.
COLOR4D GetVisibleElementColor(int aLayerID)
Return the color of a gerber visible element.
LSET GetVisibleLayers() const
A proxy function that calls the correspondent function in m_BoardSettings.
wxMenuItem * AddMenuItem(wxMenu *aMenu, int aId, const wxString &aText, const wxBitmap &aImage, wxItemKind aType=wxITEM_NORMAL)
Create and insert a menu item with an icon into aMenu.
void SetVisibleElementColor(int aLayerID, const COLOR4D &aColor)
virtual EDA_DRAW_PANEL_GAL * GetCanvas() const
Return a pointer to GAL-based canvas of given EDA draw frame.
void UpdateAllItems(int aUpdateFlags)
Update all items in the view according to the given flags.
void SetActiveLayer(int aLayer, bool doLayerWidgetUpdate=true)
change the currently active layer to aLayer and update the GERBER_LAYER_WIDGET.
GBR_LAYER_BOX_SELECTOR * m_SelLayerBox
GERBER_FILE_IMAGE_LIST is a helper class to handle a list of GERBER_FILE_IMAGE files which are loaded...
PAINTER * GetPainter() const
Return the painter object used by the view for drawing #VIEW_ITEMS.
Auxiliary rendering target (noncached)
LSET is a set of PCB_LAYER_IDs.
GERBER_FILE_IMAGE * GetGbrImage(int aIdx)
void MarkTargetDirty(int aTarget)
Set or clear target 'dirty' flag.
bool IsGridVisible() const
#define GERBER_DRAWLAYERS_COUNT
static GERBER_FILE_IMAGE_LIST & GetImagesList()
bool IsElementVisible(int aLayerID) const
Test whether a given element category is visible.
KIGFX::GAL * GetGAL() const
Return a pointer to the GAL instance used in the panel.
virtual KIGFX::VIEW * GetView() const
Return a pointer to the #VIEW instance used in the panel.
constexpr std::size_t arrayDim(T const (&)[N]) noexcept
Returns # of elements in an array.
void SetLayerVisible(int aLayer, bool aVisible=true)
Control the visibility of a particular layer.
wxBitmap KiBitmap(BITMAPS aBitmap, int aHeightTag)
Construct a wxBitmap from an image identifier Returns the image from the active theme if the image ha...
#define GERBER_DRAW_LAYER(x)
DCODE_SELECTION_BOX * m_DCodeSelector
void UpdateLayerColor(int aLayer)
Apply the new coloring scheme held by RENDER_SETTINGS in case that it has changed.
COLOR_SETTINGS * GetColorSettings(const wxString &aName="user")
Retrieves a color settings object that applications can read colors from.
virtual RENDER_SETTINGS * GetSettings()=0
Return a pointer to current settings that are going to be used when drawing items.
int GetActiveLayer() const
Return the active layer.
COLOR4D GetLayerColor(int aLayer) const
virtual void Refresh(bool aEraseBackground=true, const wxRect *aRect=nullptr) override
Update the board display after modifying it by a python script (note: it is automatically called by a...
void SetGridVisibility(bool aVisibility)
Set the visibility setting of the grid.
Color settings are a bit different than most of the settings objects in that there can be more than o...
void SetVisibleLayers(LSET aLayerMask)
A proxy function that calls the correspondent function in m_BoardSettings.
Hold a (potentially large) number of VIEW_ITEMs and renders them on a graphics device provided by the...
virtual void LoadColors(const COLOR_SETTINGS *aSettings)
bool IsLayerVisible(int aLayer) const
Test whether a given layer is visible.
void SetElementVisibility(int aLayerID, bool aNewState)
Change the visibility of an element category.
const wxString GetDisplayName(int aIdx, bool aNameOnly=false, bool aFullName=false)
Get the display name for the layer at aIdx.
bool IsLayerVisible(int aLayer) const
Return information about visibility of a particular layer.
A color representation with 4 components: red, green, blue, alpha.