54#include <wx/wupdlock.h>
69 m_TextInfo( nullptr ),
108 galCanvas->GetView()->UseDrawPriority(
true );
112 wxIconBundle icon_bundle;
114 icon.CopyFromBitmap(
KiBitmap( BITMAPS::icon_gerbview, 48 ) );
115 icon_bundle.AddIcon( icon );
116 icon.CopyFromBitmap(
KiBitmap( BITMAPS::icon_gerbview, 128 ) );
117 icon_bundle.AddIcon( icon );
118 icon.CopyFromBitmap(
KiBitmap( BITMAPS::icon_gerbview, 256 ) );
119 icon_bundle.AddIcon( icon );
120 icon.CopyFromBitmap(
KiBitmap( BITMAPS::icon_gerbview_32 ) );
121 icon_bundle.AddIcon( icon );
122 icon.CopyFromBitmap(
KiBitmap( BITMAPS::icon_gerbview_16 ) );
123 icon_bundle.AddIcon( icon );
125 SetIcons( icon_bundle );
165 .Layer( 3 ).Caption(
_(
"Layers Manager" ) ).PaneBorder(
false )
184 galOptions.m_axesEnabled =
true;
185 galOptions.NotifyChanged();
195 DragAcceptFiles(
true );
239 GetCanvas()->SetEvtHandlerEnabled(
false );
250 if( !IsShownOnScreen() )
255 if( aFileSet.size() > 0 )
257 wxString
path = aFileSet[0];
263 if(
path.Last() == wxChar(
'\"' ) )
266 if( !wxFileExists(
path ) && wxDirExists(
path ) )
272 const unsigned limit = std::min(
unsigned( aFileSet.size() ),
275 for(
unsigned i = 0; i < limit; ++i )
277 wxString ext = wxFileName( aFileSet[i] ).GetExt().Lower();
286 wxString fnameExtensionMatched;
289 fnameExtensionMatched );
293 case GERBER_ORDER_ENUM::GERBER_DRILL:
296 case GERBER_ORDER_ENUM::GERBER_LAYER_UNKNOWN:
325 GRID{ wxEmptyString, wxS(
"50 mil" ), wxS(
"50 mil" ) },
326 GRID{ wxEmptyString, wxS(
"25 mil" ), wxS(
"25 mil" ) },
327 GRID{ wxEmptyString, wxS(
"20 mil" ), wxS(
"20 mil" ) },
328 GRID{ wxEmptyString, wxS(
"10 mil" ), wxS(
"10 mil" ) },
329 GRID{ wxEmptyString, wxS(
"5 mil" ), wxS(
"5 mil" ) },
330 GRID{ wxEmptyString, wxS(
"2.5 mil" ), wxS(
"2.5 mil" ) },
331 GRID{ wxEmptyString, wxS(
"2 mil" ), wxS(
"2 mil" ) },
332 GRID{ wxEmptyString, wxS(
"1 mil" ), wxS(
"1 mil" ) },
333 GRID{ wxEmptyString, wxS(
"0.5 mil" ), wxS(
"0.5 mil" ) },
334 GRID{ wxEmptyString, wxS(
"0.2 mil" ), wxS(
"0.2 mil" ) },
335 GRID{ wxEmptyString, wxS(
"0.1 mil" ), wxS(
"0.1 mil" ) },
336 GRID{ wxEmptyString, wxS(
"5.0 mm" ), wxS(
"5.0 mm" ) },
337 GRID{ wxEmptyString, wxS(
"1.5 mm" ), wxS(
"2.5 mm" ) },
338 GRID{ wxEmptyString, wxS(
"1.0 mm" ), wxS(
"1.0 mm" ) },
339 GRID{ wxEmptyString, wxS(
"0.5 mm" ), wxS(
"0.5 mm" ) },
340 GRID{ wxEmptyString, wxS(
"0.25 mm" ), wxS(
"0.25 mm" ) },
341 GRID{ wxEmptyString, wxS(
"0.2 mm" ), wxS(
"0.2 mm" ) },
342 GRID{ wxEmptyString, wxS(
"0.1 mm" ), wxS(
"0.1 mm" ) },
343 GRID{ wxEmptyString, wxS(
"0.05 mm" ), wxS(
"0.0 mm" ) },
344 GRID{ wxEmptyString, wxS(
"0.025 mm" ), wxS(
"0.0 mm" ) },
345 GRID{ wxEmptyString, wxS(
"0.01 mm" ), wxS(
"0.0 mm" ) } };
413 lyrs.MinSize( bestz );
414 lyrs.BestSize( bestz );
415 lyrs.FloatingSize( bestz );
417 if( lyrs.IsDocked() )
480 wxFAIL_MSG( wxString::Format( wxT(
"GERBVIEW_FRAME::SetElementVisibility(): bad arg %d" ),
506 if( gerber ==
nullptr )
522 if( aRebuildLayerBox )
527 int dcodeSelected = -1;
574 std::unordered_map<int, int> view_remapping;
576 for(
const std::pair<const int, int>& entry : remapping )
594 newVisibility.
set( currlayer );
596 newVisibility.
set( currlayer,
false );
646 int lastVisibleLayer = -1;
653 if(
gvconfig()->m_Display.m_XORMode )
660 if( ( lastVisibleLayer == -1 )
663 lastVisibleLayer = i;
668 if( lastVisibleLayer != -1 )
685 if( gerber ==
nullptr )
687 SetTitle(
_(
"Gerber Viewer") );
689 SetStatusText( wxEmptyString, 0 );
692 info.Printf(
_(
"Drawing layer not in use" ) );
706 title = filename.GetFullName();
709 title += wxS(
" " ) +
_(
"(with X2 attributes)" );
711 title += wxT(
" \u2014 " ) +
_(
"Gerber Viewer" );
718 status.Printf(
_(
"Image name: \"%s\" Layer name: \"%s\"" ),
721 SetStatusText( status, 0 );
725 info.Printf( wxT(
"fmt: %s X%d.%d Y%d.%d no %cZ" ),
734 info << wxT(
" ") <<
_(
"X2 attr" );
756 wxFAIL_MSG( wxString::Format( wxT(
"GERBVIEW_FRAME::IsElementVisible(): bad arg %d" ),
784 bool v = aLayerMask[i];
788 gvconfig()->m_Appearance.show_dcodes && v );
820 wxFAIL_MSG( wxString::Format( wxT(
"GERBVIEW_FRAME::GetVisibleElementColor(): bad arg %d" ),
839 settings->
SetColor( aLayerID, aColor );
879 if(
gvconfig()->m_Display.m_XORMode )
882 if( doLayerWidgetUpdate )
973 line.Printf( wxT(
"grid X %s Y %s" ),
977 SetStatusText( line, 4 );
978 SetStatusText( line, 4 );
996 double ro = hypot( v.
x, v.
y );
998 line.Printf( wxT(
"r %s theta %s" ),
1002 SetStatusText( line, 3 );
1006 line.Printf( wxT(
"X %s Y %s" ),
1009 SetStatusText( line, 2 );
1017 line.Printf( wxT(
"dx %s dy %s dist %s" ),
1021 SetStatusText( line, 3 );
1083 catch(
const std::system_error& e )
1085 wxLogTrace( wxT(
"KI_TRACE_NAVLIB" ), e.what() );
1122#define ENABLE( x ) ACTION_CONDITIONS().Enable( x )
1123#define CHECK( x ) ACTION_CONDITIONS().Check( x )
1137 auto flashedDisplayOutlinesCond =
1143 auto linesFillCond =
1149 auto polygonsFilledCond =
1155 auto negativeObjectsCond =
1167 auto forceOpacityModeCond =
1179 auto highContrastModeCond =
1185 auto flipGerberCond =
1191 auto layersManagerShownCondition =
BASE_SCREEN class implementation.
constexpr EDA_IU_SCALE gerbIUScale
wxBitmap KiBitmap(BITMAPS aBitmap, int aHeightTag)
Construct a wxBitmap from an image identifier Returns the image from the active theme if the image ha...
static TOOL_ACTION toggleGrid
static TOOL_ACTION millimetersUnits
static TOOL_ACTION togglePolarCoords
static TOOL_ACTION milsUnits
static TOOL_ACTION inchesUnits
static TOOL_ACTION highContrastMode
static TOOL_ACTION toggleCursorStyle
static TOOL_ACTION measureTool
static TOOL_ACTION selectionTool
static TOOL_ACTION zoomFitScreen
static TOOL_ACTION zoomTool
Manage TOOL_ACTION objects.
void SetConditions(const TOOL_ACTION &aAction, const ACTION_CONDITIONS &aConditions)
Set the conditions the UI elements for activating a specific tool action should use for determining t...
APP_SETTINGS_BASE is a settings class that should be derived for each standalone KiCad application.
wxString m_ColorTheme
Active color theme name.
Handles how to draw a screen (a board, a schematic ...)
VECTOR2D m_LocalOrigin
Relative Screen cursor coordinate (on grid) in user units.
void InitDataPoints(const VECTOR2I &aPageSizeInternalUnits)
BASE_SET & set(size_t pos)
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)
COLOR4D GetColor(int aLayer) const
Handle actions that are shared between different applications.
void SetDCodeSelection(int aDCodeId)
void SetSheetCount(int aSheetCount)
Changes the sheet-count number displayed in the title block.
void SetPageNumber(const std::string &aPageNumber)
Changes the page number displayed in the title block.
void SetPageBorderColorLayer(int aLayerId)
Overrides the layer used to pick the color of the page border (normally LAYER_GRID)
void SetColorLayer(int aLayerId)
Can be used to override which layer ID is used for drawing sheet item colors.
virtual APP_SETTINGS_BASE * config() const
Returns the settings object used in SaveSettings(), and is overloaded in KICAD_MANAGER_FRAME.
virtual void handleIconizeEvent(wxIconizeEvent &aEvent)
Handle a window iconize event.
virtual void setupUIConditions()
Setup the UI conditions for the various actions and their controls in this frame.
std::map< const wxString, TOOL_ACTION * > m_acceptedExts
Associates files extensions with action to execute.
bool m_isClosing
Set by NonUserClose() to indicate that the user did not request the current close.
void ReCreateMenuBar()
Recreates the menu bar.
The base class for create windows for drawing purpose.
virtual void ClearMsgPanel()
Clear all messages from the message panel.
virtual void ActivateGalCanvas()
Use to start up the GAL drawing canvas.
void SaveSettings(APP_SETTINGS_BASE *aCfg) override
Save common frame parameters to a configuration data file.
EDA_DRAW_PANEL_GAL::GAL_TYPE m_canvasType
virtual BASE_SCREEN * GetScreen() const
Return a pointer to a BASE_SCREEN or one of its derivatives.
void setupUnits(APP_SETTINGS_BASE *aCfg)
ACTION_TOOLBAR * m_optionsToolBar
void UpdateGridSelectBox()
Rebuild the grid combobox to respond to any changes in the GUI (units, user grid changes,...
void LoadSettings(APP_SETTINGS_BASE *aCfg) override
Load common frame parameters from a configuration file.
virtual void SwitchCanvas(EDA_DRAW_PANEL_GAL::GAL_TYPE aCanvasType)
Changes the current rendering backend.
GAL_DISPLAY_OPTIONS_IMPL & GetGalDisplayOptions()
Return a reference to the gal rendering options used by GAL for rendering.
virtual void resolveCanvasType()
Determines the Canvas type to load (with prompt if required) and initializes m_canvasType.
EDA_MSG_PANEL * m_messagePanel
void SetCanvas(EDA_DRAW_PANEL_GAL *aPanel)
virtual void SetScreen(BASE_SCREEN *aScreen)
void RecreateToolbars()
Rebuild all toolbars, and update the checked state of check tools.
ACTION_TOOLBAR * m_mainToolBar
virtual void Zoom_Automatique(bool aWarpPointer)
Redraw the screen with best zoom level and the best centering that shows all the page or the board.
virtual void SetGridVisibility(bool aVisible)
virtual void handleActivateEvent(wxActivateEvent &aEvent)
Handle a window activation event.
virtual void SetDrawBgColor(const COLOR4D &aColor)
void UpdateStatusBar() override
Update the status bar information.
virtual EDA_DRAW_PANEL_GAL * GetCanvas() const
Return a pointer to GAL-based canvas of given EDA draw frame.
void unitsChangeRefresh() override
Called when when the units setting has changed to allow for any derived classes to handle refreshing ...
void CommonSettingsChanged(bool aEnvVarsChanged, bool aTextVarsChanged) override
Notification event that some of the common (suite-wide) settings have changed.
bool IsGridVisible() const
bool m_showBorderAndTitleBlock
ACTION_TOOLBAR * m_auxiliaryToolBar
bool GetShowPolarCoords() const
For those frames that support polar coordinates.
GAL_TYPE GetBackend() const
Return the type of backend currently used by GAL canvas.
virtual void SetHighContrastLayer(int aLayer)
Take care of display settings for the given layer to be displayed in high contrast mode.
void StopDrawing()
Prevent the GAL canvas from further drawing until it is recreated or StartDrawing() is called.
KIGFX::VIEW_CONTROLS * GetViewControls() const
Return a pointer to the #VIEW_CONTROLS instance used in the panel.
virtual KIGFX::VIEW * GetView() const
Return a pointer to the #VIEW instance used in the panel.
void ForceRefresh()
Force a redraw.
virtual void Refresh(bool aEraseBackground=true, const wxRect *aRect=nullptr) override
@ GAL_TYPE_OPENGL
OpenGL implementation.
@ GAL_TYPE_NONE
GAL not used (the legacy wxDC engine is used)
KIGFX::GAL * GetGAL() const
Return a pointer to the GAL instance used in the panel.
void SetEventDispatcher(TOOL_DISPATCHER *aEventDispatcher)
Set a dispatcher that processes events and forwards them to tools.
void StartDrawing()
Begin drawing if it was stopped previously.
void SetFlags(EDA_ITEM_FLAGS aMask)
void ClearFlags(EDA_ITEM_FLAGS aMask=EDA_ITEM_ALL_FLAGS)
bool HasFlag(EDA_ITEM_FLAGS aFlag) const
Specialization of the wxAuiPaneInfo class for KiCad panels.
Class that groups generic conditions for editor states.
SELECTION_CONDITION CurrentTool(const TOOL_ACTION &aTool)
Create a functor testing if the specified tool is the current active tool in the frame.
SELECTION_CONDITION Units(EDA_UNITS aUnit)
Create a functor that tests if the frame has the specified units.
SELECTION_CONDITION GridVisible()
Create a functor testing if the grid is visible in a frame.
SELECTION_CONDITION PolarCoordinates()
Create a functor testing if polar coordinates are current being used.
SELECTION_CONDITION FullscreenCursor()
Create a functor testing if the cursor is full screen in a frame.
void Save(APP_SETTINGS_BASE &aSettings)
Saves history into a JSON settings object.
void SetMaxFiles(size_t aMaxFiles)
Update the number of files that will be contained inside the file history.
void Load(const APP_SETTINGS_BASE &aSettings)
Loads history from a JSON settings object.
void ReadWindowSettings(WINDOW_SETTINGS &aCfg)
Read GAL config options from application-level config.
bool m_DisplayFlashedItemsFill
Option to draw flashed items (filled/sketch)
bool m_HighContrastMode
High contrast mode (dim un-highlighted objects)
bool m_XORMode
Display layers in exclusive-or mode.
bool m_FlipGerberView
Display as a mirror image.
bool m_ForceOpacityMode
Display layers in transparency (alpha channel) forced mode.
bool m_DisplayPolygonsFill
Option to draw polygons (filled/sketch)
bool m_DisplayLinesFill
Option to draw line items (filled/sketch)
A list of GERBER_DRAW_ITEM objects currently loaded.
void SetTitleBlock(const TITLE_BLOCK &aTitleBlock)
GERBER_FILE_IMAGE_LIST * GetImagesList() const
TITLE_BLOCK & GetTitleBlock()
bool GetLayerPolarity() const
static void GetGerberLayerFromFilename(const wxString &filename, enum GERBER_ORDER_ENUM &order, wxString &matchedExtension)
Utility function to guess which PCB layer of a gerber/drill file corresponds to based on its file ext...
const wxString GetDisplayName(int aIdx, bool aNameOnly=false, bool aFullName=false)
Get the display name for the layer at aIdx.
void DeleteAllImages()
Remove all loaded data in list, and delete all images, freeing the memory.
unsigned ImagesMaxCount()
GERBER_FILE_IMAGE * GetGbrImage(int aIdx)
Hold the image data and parameters for one gerber file and layer parameters.
wxSize m_FmtScale
Fmt 2.3: m_FmtScale = 3, fmt 3.4: m_FmtScale = 4.
wxString m_FileName
Full File Name for this layer.
wxString m_ImageName
Image name, from IN <name>* command.
bool m_IsX2_file
True if a X2 gerber attribute was found in file.
wxSize m_FmtLen
Nb chars per coord. ex fmt 2.3, m_FmtLen = 5.
bool m_GerbMetric
false = Inches, true = metric
bool m_NoTrailingZeros
true: remove tailing zeros.
GERBER_LAYER & GetLayerParams()
void DisplayImageInfo(GERBVIEW_FRAME *aMainFrame)
Display information about image parameters in the status bar.
Gather all the actions that are shared by tools.
static TOOL_ACTION dcodeDisplay
static TOOL_ACTION negativeObjectDisplay
static TOOL_ACTION flashedDisplayOutlines
static TOOL_ACTION toggleXORMode
static TOOL_ACTION loadZipFile
static TOOL_ACTION toggleLayerManager
static TOOL_ACTION flipGerberView
static TOOL_ACTION toggleForceOpacityMode
static TOOL_ACTION linesDisplayOutlines
static TOOL_ACTION polygonsDisplayOutlines
static TOOL_ACTION layerChanged
static TOOL_ACTION loadGerbFiles
Handle actions that are shared between different frames in Pcbnew.
void SetDrawingSheet(DS_PROXY_VIEW_ITEM *aDrawingSheet)
Set or update the drawing-sheet (borders and title block) used by the draw panel.
COLOR_SETTINGS * GetColorSettings(bool aForceRefresh=false) const override
Returns a pointer to the active color theme settings.
void SetLayerColor(int aLayer, const COLOR4D &aColor)
void CommonSettingsChanged(bool aEnvVarsChanged, bool aTextVarsChanged) override
Called after the preferences dialog is run.
wxStaticText * m_dcodeText
wxChoice * m_SelAperAttributesBox
void UpdateXORLayers()
Update each layers' differential option.
void UpdateStatusBar() override
Update the status bar information.
COLOR4D GetVisibleElementColor(int aLayerID)
Return the color of a gerber visible element.
GERBVIEW_SETTINGS * gvconfig() const
const PAGE_INFO & GetPageSettings() const override
bool IsLayerVisible(int aLayer) const
Test whether a given layer is visible.
void DisplayGridMsg() override
Display the current grid pane on the status bar.
void SortLayersByX2Attributes()
void SetLayout(GBR_LAYOUT *aLayout)
Set the m_gerberLayout member in such as way as to ensure deleting any previous GBR_LAYOUT.
void ReCreateHToolbar() override
LSET GetVisibleLayers() const
A proxy function that calls the correspondent function in m_BoardSettings.
GBR_LAYER_BOX_SELECTOR * m_SelLayerBox
void UpdateToolbarControlSizes() override
Update the sizes of any controls in the toolbars of the frame.
bool m_show_layer_manager_tools
void LoadSettings(APP_SETTINGS_BASE *aCfg) override
Load common frame parameters from a configuration file.
GBR_LAYOUT * m_gerberLayout
void SetPageSettings(const PAGE_INFO &aPageSettings) override
void ApplyDisplaySettingsToGAL()
Updates the GAL with display settings changes.
bool LoadGerberJobFile(const wxString &aFileName)
Load a Gerber job file, and load gerber files found in job files.
GERBER_FILE_IMAGE_LIST * GetImagesList() const
Accessors to GERBER_FILE_IMAGE_LIST and GERBER_FILE_IMAGE data.
void SaveSettings(APP_SETTINGS_BASE *aCfg) override
Save common frame parameters to a configuration data file.
void syncLayerBox(bool aRebuildLayerBox=false)
Update the currently "selected" layer within m_SelLayerBox.
GBR_LAYOUT * GetGerberLayout() const
bool LoadGerberFiles(const wxString &aFileName)
Load a given Gerber file or selected file(s), if the filename is empty.
void SetTitleBlock(const TITLE_BLOCK &aTitleBlock) override
void updateDCodeSelectBox()
void ReCreateAuxiliaryToolbar() override
void doCloseWindow() override
wxChoice * m_SelComponentBox
FILE_HISTORY m_jobFileHistory
std::unique_ptr< NL_GERBVIEW_PLUGIN > m_spaceMouse
wxChoice * m_SelNetnameBox
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
GERBER_LAYER_WIDGET * m_LayersManager
void SetActiveLayer(int aLayer, bool doLayerWidgetUpdate=true)
change the currently active layer to aLayer and update the GERBER_LAYER_WIDGET.
void syncLayerWidget()
Update the currently "selected" layer within the GERBER_LAYER_WIDGET.
void SetVisibleElementColor(int aLayerID, const COLOR4D &aColor)
GERBVIEW_FRAME(KIWAY *aKiway, wxWindow *aParent)
unsigned ImagesMaxCount() const
The max number of file images.
void ReCreateOptToolbar() override
Create or update the left vertical toolbar (option toolbar)
SELECTION & GetCurrentSelection() override
Get the current selection from the canvas area.
void SetVisibleLayers(LSET aLayerMask)
A proxy function that calls the correspondent function in m_BoardSettings.
wxStaticText * m_apertText
COLOR4D GetLayerColor(int aLayer) const
void SortLayersByFileExtension()
GERBER_FILE_IMAGE * GetGbrImage(int aIdx) const
void handleActivateEvent(wxActivateEvent &aEvent) override
Handle a window activation event.
void SetGridVisibility(bool aVisible) override
void ToggleLayerManager()
const TITLE_BLOCK & GetTitleBlock() const override
bool LoadAutodetectedFiles(const wxString &aFileName)
Load a given file or selected file(s), if the filename is empty.
void RemapLayers(const std::unordered_map< int, int > &remapping)
Takes a layer remapping and reorders the layers.
void ReFillLayerWidget()
Change out all the layers in m_Layers; called upon loading new gerber files.
FILE_HISTORY m_zipFileHistory
bool OpenProjectFiles(const std::vector< wxString > &aFileSet, int aCtl) override
Open a project or set of files given by aFileList.
void setupUIConditions() override
Setup the UI conditions for the various actions and their controls in this frame.
int getNextAvailableLayer() const
Find the next empty layer.
bool LoadZipArchiveFile(const wxString &aFileName)
Load a zipped archive file.
void UpdateTitleAndInfo()
Display the short filename (if exists) of the selected layer on the caption of the main GerbView wind...
void SetElementVisibility(int aLayerID, bool aNewState)
Change the visibility of an element category.
virtual void SetGridColor(const COLOR4D &aColor) override
void unitsChangeRefresh() override
Called when when the units setting has changed to allow for any derived classes to handle refreshing ...
const VECTOR2I GetPageSizeIU() const override
Works off of GetPageSettings() to return the size of the paper page in the internal units of this par...
void ActivateGalCanvas() override
Use to start up the GAL drawing canvas.
void handleIconizeEvent(wxIconizeEvent &aEvent) override
Handle a window iconize event.
FILE_HISTORY m_drillFileHistory
bool LoadExcellonFiles(const wxString &aFileName)
Load a drill (EXCELLON) file or many files.
COLOR4D GetGridColor() override
std::vector< wxString > m_JobFileHistory
std::vector< wxString > m_DrillFileHistory
GBR_DISPLAY_OPTIONS m_Display
std::vector< wxString > m_ZipFileHistory
A color representation with 4 components: red, green, blue, alpha.
void SetGridColor(const COLOR4D &aGridColor)
Set the grid color.
const VECTOR2D & GetGridSize() const
Return the grid size.
Methods for drawing GerbView specific items.
Store GerbView specific render settings.
void LoadColors(const COLOR_SETTINGS *aSettings) override
void SetHighContrast(bool aEnabled)
Turns on/off high contrast display mode.
VECTOR2D GetCursorPosition() const
Return the current cursor position in world coordinates.
An abstract base class for deriving all objects that can be added to a VIEW.
Hold a (potentially large) number of VIEW_ITEMs and renders them on a graphics device provided by the...
void SetLayerDiff(int aLayer, bool aDiff=true)
Set the whether the layer should drawn differentially.
void SetLayerTarget(int aLayer, RENDER_TARGET aTarget)
Change the rendering target for a particular layer.
void SetLayerVisible(int aLayer, bool aVisible=true)
Control the visibility of a particular layer.
void Clear()
Remove all items from the view.
void RecacheAllItems()
Rebuild GAL display lists.
void UpdateAllItems(int aUpdateFlags)
Update all items in the view according to the given flags.
void MarkDirty()
Force redraw of view on the next rendering.
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.
void UpdateAllItemsConditionally(int aUpdateFlags, std::function< bool(VIEW_ITEM *)> aCondition)
Update items in the view according to the given flags and condition.
void ReorderLayerData(std::unordered_map< int, int > aReorderMap)
Remap the data between layer ids without invalidating that data.
PROJECT & Prj() const
Return a reference to the PROJECT associated with this KIWAY.
bool Destroy() override
Our version of Destroy() which is virtual from wxWidgets.
A minimalistic software bus for communications between various DLLs/DSOs (DSOs) within the same KiCad...
LSET is a set of PCB_LAYER_IDs.
static LSET AllLayersMask()
Describe the page size and margins of a paper page on which to eventually print or plot.
const VECTOR2D GetSizeIU(double aIUScale) const
Gets the page size in internal units.
const wxString & GetType() const
bool SetType(const wxString &aStandardPageDescriptionName, bool aIsPortrait=false)
Set the name of the page type and also the sizes and margins commonly associated with that type name.
virtual COMMON_SETTINGS * GetCommonSettings() const
virtual SETTINGS_MANAGER & GetSettingsManager() const
T * GetAppSettings()
Returns a handle to the a given settings by type If the settings have already been loaded,...
COLOR_SETTINGS * GetColorSettings(const wxString &aName="user")
Retrieves a color settings object that applications can read colors from.
void SaveColorSettings(COLOR_SETTINGS *aSettings, const std::string &aNamespace="")
Safely saves a COLOR_SETTINGS to disk, preserving any changes outside the given namespace.
Represent a set of closed polygons.
Hold the information shown in the lower right corner of a plot, printout, or editing view.
wxString MessageTextFromValue(double aValue, bool aAddUnitLabel=true, EDA_DATA_TYPE aType=EDA_DATA_TYPE::DISTANCE) const
A lower-precision version of StringFromValue().
#define KICAD_DEFAULT_DRAWFRAME_STYLE
#define CANDIDATE
flag indicating that the structure is connected
#define NO_AVAILABLE_LAYERS
#define GERBVIEW_FRAME_NAME
The main window used in GerbView.
@ ID_GERBVIEW_JOB_FILE_LIST_CLEAR
@ ID_GERBVIEW_DRILL_FILE1
@ ID_GERBVIEW_ZIP_FILE_LIST_CLEAR
@ ID_GERBVIEW_DRILL_FILE_LIST_CLEAR
static const std::string GerberJobFileExtension
static const std::string GerberFileExtension
static const std::string DrillFileExtension
static const std::string ArchiveFileExtension
#define DEFAULT_FILE_HISTORY_SIZE
IDs range for menuitems file history: The default range file history size is 9 (compatible with defau...
@ LAYER_GERBVIEW_DRAWINGSHEET
@ LAYER_GERBVIEW_BACKGROUND
@ LAYER_GERBVIEW_PAGE_LIMITS
#define GERBER_DCODE_LAYER(x)
@ LAYER_DRAWINGSHEET
drawingsheet frame and titleblock
#define GERBER_DRAWLAYERS_COUNT
#define GERBER_DRAW_LAYER(x)
@ REPAINT
Item needs to be redrawn.
@ ALL
All except INITIAL_ADD.
@ TARGET_NONCACHED
Auxiliary rendering target (noncached)
@ TARGET_CACHED
Main rendering target (cached)
KICOMMON_API bool EnsureTextCtrlWidth(wxTextCtrl *aCtrl, const wxString *aString=nullptr)
Set the minimum pixel width on a text control in order to make a text string be fully visible within ...
Declaration of the NL_GERBVIEW_PLUGIN class.
PGM_BASE & Pgm()
The global Program "get" accessor.
std::vector< FAB_LAYER_COLOR > dummy
bool show_negative_objects
bool show_border_and_titleblock
std::vector< GRID > grids
Common grid settings, available to every frame.
std::vector< double > zoom_factors
VECTOR2< double > VECTOR2D
Definition of file extensions used in Kicad.
#define ZOOM_LIST_GERBVIEW