55#include <wx/wupdlock.h>
70 m_TextInfo( nullptr ),
109 galCanvas->GetView()->UseDrawPriority(
true );
113 wxIconBundle icon_bundle;
115 icon.CopyFromBitmap(
KiBitmap( BITMAPS::icon_gerbview, 48 ) );
116 icon_bundle.AddIcon( icon );
117 icon.CopyFromBitmap(
KiBitmap( BITMAPS::icon_gerbview, 128 ) );
118 icon_bundle.AddIcon( icon );
119 icon.CopyFromBitmap(
KiBitmap( BITMAPS::icon_gerbview, 256 ) );
120 icon_bundle.AddIcon( icon );
121 icon.CopyFromBitmap(
KiBitmap( BITMAPS::icon_gerbview_32 ) );
122 icon_bundle.AddIcon( icon );
123 icon.CopyFromBitmap(
KiBitmap( BITMAPS::icon_gerbview_16 ) );
124 icon_bundle.AddIcon( icon );
126 SetIcons( icon_bundle );
167 .Layer( 3 ).Caption(
_(
"Layers Manager" ) ).PaneBorder(
false )
186 galOptions.m_axesEnabled =
true;
187 galOptions.NotifyChanged();
197 DragAcceptFiles(
true );
240 GetCanvas()->SetEvtHandlerEnabled(
false );
251 if( !IsShownOnScreen() )
256 if( aFileSet.size() > 0 )
258 wxString
path = aFileSet[0];
264 if(
path.Last() == wxChar(
'\"' ) )
267 if( !wxFileExists(
path ) && wxDirExists(
path ) )
273 const unsigned limit = std::min(
unsigned( aFileSet.size() ),
276 for(
unsigned i = 0; i < limit; ++i )
278 wxString ext = wxFileName( aFileSet[i] ).GetExt().Lower();
287 wxString fnameExtensionMatched;
290 fnameExtensionMatched );
294 case GERBER_ORDER_ENUM::GERBER_DRILL:
297 case GERBER_ORDER_ENUM::GERBER_LAYER_UNKNOWN:
326 GRID{ wxEmptyString, wxS(
"50 mil" ), wxS(
"50 mil" ) },
327 GRID{ wxEmptyString, wxS(
"25 mil" ), wxS(
"25 mil" ) },
328 GRID{ wxEmptyString, wxS(
"20 mil" ), wxS(
"20 mil" ) },
329 GRID{ wxEmptyString, wxS(
"10 mil" ), wxS(
"10 mil" ) },
330 GRID{ wxEmptyString, wxS(
"5 mil" ), wxS(
"5 mil" ) },
331 GRID{ wxEmptyString, wxS(
"2.5 mil" ), wxS(
"2.5 mil" ) },
332 GRID{ wxEmptyString, wxS(
"2 mil" ), wxS(
"2 mil" ) },
333 GRID{ wxEmptyString, wxS(
"1 mil" ), wxS(
"1 mil" ) },
334 GRID{ wxEmptyString, wxS(
"0.5 mil" ), wxS(
"0.5 mil" ) },
335 GRID{ wxEmptyString, wxS(
"0.2 mil" ), wxS(
"0.2 mil" ) },
336 GRID{ wxEmptyString, wxS(
"0.1 mil" ), wxS(
"0.1 mil" ) },
337 GRID{ wxEmptyString, wxS(
"5.0 mm" ), wxS(
"5.0 mm" ) },
338 GRID{ wxEmptyString, wxS(
"1.5 mm" ), wxS(
"2.5 mm" ) },
339 GRID{ wxEmptyString, wxS(
"1.0 mm" ), wxS(
"1.0 mm" ) },
340 GRID{ wxEmptyString, wxS(
"0.5 mm" ), wxS(
"0.5 mm" ) },
341 GRID{ wxEmptyString, wxS(
"0.25 mm" ), wxS(
"0.25 mm" ) },
342 GRID{ wxEmptyString, wxS(
"0.2 mm" ), wxS(
"0.2 mm" ) },
343 GRID{ wxEmptyString, wxS(
"0.1 mm" ), wxS(
"0.1 mm" ) },
344 GRID{ wxEmptyString, wxS(
"0.05 mm" ), wxS(
"0.0 mm" ) },
345 GRID{ wxEmptyString, wxS(
"0.025 mm" ), wxS(
"0.0 mm" ) },
346 GRID{ wxEmptyString, wxS(
"0.01 mm" ), wxS(
"0.0 mm" ) } };
417 lyrs.MinSize( bestz );
418 lyrs.BestSize( bestz );
419 lyrs.FloatingSize( bestz );
421 if( lyrs.IsDocked() )
484 wxFAIL_MSG( wxString::Format( wxT(
"GERBVIEW_FRAME::SetElementVisibility(): bad arg %d" ),
510 if( gerber ==
nullptr )
526 if( aRebuildLayerBox )
531 int dcodeSelected = -1;
578 std::unordered_map<int, int> view_remapping;
580 for(
const std::pair<const int, int>& entry : remapping )
598 newVisibility.
set( currlayer );
600 newVisibility.
set( currlayer,
false );
650 int lastVisibleLayer = -1;
657 if(
gvconfig()->m_Display.m_XORMode )
664 if( ( lastVisibleLayer == -1 )
667 lastVisibleLayer = i;
672 if( lastVisibleLayer != -1 )
689 if( gerber ==
nullptr )
691 SetTitle(
_(
"Gerber Viewer") );
693 SetStatusText( wxEmptyString, 0 );
696 info.Printf(
_(
"Drawing layer not in use" ) );
710 title = filename.GetFullName();
713 title += wxS(
" " ) +
_(
"(with X2 attributes)" );
715 title += wxT(
" \u2014 " ) +
_(
"Gerber Viewer" );
722 status.Printf(
_(
"Image name: \"%s\" Layer name: \"%s\"" ),
725 SetStatusText( status, 0 );
729 info.Printf( wxT(
"fmt: %s X%d.%d Y%d.%d no %cZ" ),
738 info << wxT(
" ") <<
_(
"X2 attr" );
760 wxFAIL_MSG( wxString::Format( wxT(
"GERBVIEW_FRAME::IsElementVisible(): bad arg %d" ),
788 bool v = aLayerMask[i];
792 gvconfig()->m_Appearance.show_dcodes && v );
824 wxFAIL_MSG( wxString::Format( wxT(
"GERBVIEW_FRAME::GetVisibleElementColor(): bad arg %d" ),
843 settings->
SetColor( aLayerID, aColor );
883 if(
gvconfig()->m_Display.m_XORMode )
886 if( doLayerWidgetUpdate )
977 line.Printf( wxT(
"grid X %s Y %s" ),
981 SetStatusText( line, 4 );
982 SetStatusText( line, 4 );
1000 double ro = hypot( v.
x, v.
y );
1002 line.Printf( wxT(
"r %s theta %s" ),
1006 SetStatusText( line, 3 );
1010 line.Printf( wxT(
"X %s Y %s" ),
1013 SetStatusText( line, 2 );
1021 line.Printf( wxT(
"dx %s dy %s dist %s" ),
1025 SetStatusText( line, 3 );
1087 catch(
const std::system_error& e )
1089 wxLogTrace( wxT(
"KI_TRACE_NAVLIB" ), e.what() );
1126#define ENABLE( x ) ACTION_CONDITIONS().Enable( x )
1127#define CHECK( x ) ACTION_CONDITIONS().Check( x )
1141 auto flashedDisplayOutlinesCond =
1147 auto linesFillCond =
1153 auto polygonsFilledCond =
1159 auto negativeObjectsCond =
1171 auto forceOpacityModeCond =
1183 auto highContrastModeCond =
1189 auto flipGerberCond =
1195 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)
Change the sheet-count number displayed in the title block.
void SetPageNumber(const std::string &aPageNumber)
Change the page number displayed in the title block.
void SetPageBorderColorLayer(int aLayerId)
Override 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
Return 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.
virtual void UpdateToolbarControlSizes()
Update the sizes of any controls in the toolbars of the frame.
TOOLBAR_SETTINGS * m_toolbarSettings
virtual void RecreateToolbars()
ACTION_TOOLBAR * m_tbLeft
ACTION_TOOLBAR * m_tbTopAux
std::map< const wxString, TOOL_ACTION * > m_acceptedExts
Associate file extensions with action to execute.
ACTION_TOOLBAR * m_tbTopMain
bool m_isClosing
Set by the close window event handler after frames are asked if they can close.
void ReCreateMenuBar()
Recreate 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
The current canvas type.
virtual BASE_SCREEN * GetScreen() const
Return a pointer to a BASE_SCREEN or one of its derivatives.
void setupUnits(APP_SETTINGS_BASE *aCfg)
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)
Change 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()
Determine 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)
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 ...
bool IsGridVisible() const
void CommonSettingsChanged(int aFlags) override
Notification event that some of the common (suite-wide) settings have changed.
bool m_showBorderAndTitleBlock
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)
wxStaticText * m_dcodeText
wxChoice * m_SelAperAttributesBox
void UpdateXORLayers()
Update each layers' differential option.
void UpdateStatusBar() override
Update the status bar information.
void configureToolbars() override
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.
LSET GetVisibleLayers() const
A proxy function that calls the correspondent function in m_BoardSettings.
GBR_LAYER_BOX_SELECTOR * m_SelLayerBox
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 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 SetVisibleLayers(const LSET &aLayerMask)
A proxy function that calls the correspondent function in m_BoardSettings.
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.
SELECTION & GetCurrentSelection() override
Get the current selection from the canvas area.
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 CommonSettingsChanged(int aFlags) override
Called after the preferences dialog is run.
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
COLOR_SETTINGS * GetColorSettings(const wxString &aName="user")
Retrieve a color settings object that applications can read colors from.
T * GetToolbarSettings(const wxString &aFilename)
Return a handle to the given toolbar settings.
void SaveColorSettings(COLOR_SETTINGS *aSettings, const std::string &aNamespace="")
Safely save a COLOR_SETTINGS to disk, preserving any changes outside the given namespace.
T * GetAppSettings(const wxString &aFilename)
Return a handle to the a given settings by type.
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
Sheet frame and title block.
#define GERBER_DRAWLAYERS_COUNT
Number of draw layers in Gerbview.
#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