26#include <wx/checkbox.h>
27#include <wx/filedlg.h>
90 for(
int layer: render_layers )
99 if(
color != COLOR4D::UNSPECIFIED )
112 if(
color != COLOR4D::UNSPECIFIED )
128#define RR LAYER_WIDGET::ROW
131 _(
"Show DCodes identification" ) ),
133 _(
"Show negative objects in this color" ) ),
136 _(
"Show the (x,y) grid dots" ) ),
138 _(
"Show drawing sheet border and title block") ),
140 _(
"Show drawing sheet page limits" ) ),
142 _(
"PCB Background" ),
true,
false )
145 for(
unsigned row = 0; row <
arrayDim( renderRows ); ++row )
147 if( renderRows[row].
color != COLOR4D::UNSPECIFIED )
150 if( renderRows[row].
id )
162 KiBitmap( BITMAPS::show_all_layers ) );
165 KiBitmap( BITMAPS::select_w_layer ) );
168 _(
"Always Hide All Layers But Active" ),
169 KiBitmap( BITMAPS::select_w_layer ) );
172 KiBitmap( BITMAPS::show_no_layers ) );
174 aMenu->AppendSeparator();
182 aMenu->AppendSeparator();
185 _(
"Layers Display Parameters: Offset and Rotation" ),
188 aMenu->AppendSeparator();
197 KiBitmap( BITMAPS::delete_gerber ) );
216 int menuId =
event.GetId();
219 bool force_active_layer_visible;
235 for(
int row = 0; row < rowCount; ++row )
239 bool loc_visible = visible;
244 cb->SetValue( loc_visible );
245 visibleLayers[ row ] = loc_visible;
285 wxCommandEvent event;
346 color_settings->
SetColor( aLayer, aColor );
371 settings->m_dcodeHighlightValue = dcodeSelected;
385 visibleLayers[ aLayer ] = isVisible;
401 color_settings->
SetColor( aId, aColor );
403 view->GetPainter()->GetSettings()->LoadColors( color_settings );
404 view->UpdateLayerColor( aId );
constexpr std::size_t arrayDim(T const (&)[N]) noexcept
Returns # of elements in an array.
wxBitmap KiBitmap(BITMAPS aBitmap, int aHeightTag)
Construct a wxBitmap from an image identifier Returns the image from the active theme if the image ha...
Color settings are a bit different than most of the settings objects in that there can be more than o...
void SetColor(int aLayer, const COLOR4D &aColor)
virtual EDA_DRAW_PANEL_GAL * GetCanvas() const
Return a pointer to GAL-based canvas of given EDA draw frame.
bool IsGridVisible() const
virtual KIGFX::VIEW * GetView() const
Return a pointer to the #VIEW instance used in the panel.
virtual void Refresh(bool aEraseBackground=true, const wxRect *aRect=nullptr) override
KIGFX::GAL * GetGAL() const
Return a pointer to the GAL instance used in the panel.
GERBER_FILE_IMAGE_LIST is a helper class to handle a list of GERBER_FILE_IMAGE files which are loaded...
static GERBER_FILE_IMAGE_LIST & GetImagesList()
const wxString GetDisplayName(int aIdx, bool aNameOnly=false, bool aFullName=false)
Get the display name for the layer at aIdx.
static TOOL_ACTION moveLayerUp
static TOOL_ACTION moveLayerDown
COLOR_SETTINGS * GetColorSettings(bool aForceRefresh=false) const override
Returns a pointer to the active color theme settings.
void SetLayerColor(int aLayer, const COLOR4D &aColor)
COLOR4D GetVisibleElementColor(int aLayerID)
Return the color of a gerber visible element.
bool IsLayerVisible(int aLayer) const
Test whether a given layer is visible.
void SortLayersByX2Attributes()
LSET GetVisibleLayers() const
A proxy function that calls the correspondent function in m_BoardSettings.
void syncLayerBox(bool aRebuildLayerBox=false)
Update the currently "selected" layer within m_SelLayerBox.
int GetActiveLayer() const
Return the active layer.
bool IsElementVisible(int aLayerID) const
Test whether a given element category is visible.
DCODE_SELECTION_BOX * m_DCodeSelector
void SetActiveLayer(int aLayer, bool doLayerWidgetUpdate=true)
change the currently active layer to aLayer and update the GERBER_LAYER_WIDGET.
void SetVisibleElementColor(int aLayerID, const COLOR4D &aColor)
void SetVisibleLayers(LSET aLayerMask)
A proxy function that calls the correspondent function in m_BoardSettings.
COLOR4D GetLayerColor(int aLayer) const
void SortLayersByFileExtension()
void Erase_Current_DrawLayer(bool query)
void SetElementVisibility(int aLayerID, bool aNewState)
Change the visibility of an element category.
A color representation with 4 components: red, green, blue, alpha.
void SetGridVisibility(bool aVisibility)
Set the visibility setting of the grid.
Methods for drawing GerbView specific items.
virtual RENDER_SETTINGS * GetSettings()=0
Return a pointer to current settings that are going to be used when drawing items.
virtual void LoadColors(const COLOR_SETTINGS *aSettings)
Hold a (potentially large) number of VIEW_ITEMs and renders them on a graphics device provided by the...
void SetLayerVisible(int aLayer, bool aVisible=true)
Control the visibility of a particular layer.
void UpdateAllItems(int aUpdateFlags)
Update all items in the view according to the given flags.
void UpdateLayerColor(int aLayer)
Apply the new coloring scheme held by RENDER_SETTINGS in case that it has changed.
bool IsLayerVisible(int aLayer) const
Return information about visibility of a particular layer.
PAINTER * GetPainter() const
Return the painter object used by the view for drawing #VIEW_ITEMS.
void MarkTargetDirty(int aTarget)
Set or clear target 'dirty' flag.
LSET is a set of PCB_LAYER_IDs.
@ LAYER_GERBVIEW_DRAWINGSHEET
@ GERBVIEW_LAYER_ID_START
@ LAYER_GERBVIEW_BACKGROUND
@ LAYER_GERBVIEW_PAGE_LIMITS
#define GERBER_DRAWLAYERS_COUNT
#define GERBER_DRAW_LAYER(x)
@ COLOR
Color has changed.
@ TARGET_NONCACHED
Auxiliary rendering target (noncached)
KICOMMON_API wxMenuItem * AddMenuItem(wxMenu *aMenu, int aId, const wxString &aText, const wxBitmapBundle &aImage, wxItemKind aType=wxITEM_NORMAL)
Create and insert a menu item with an icon into aMenu.