22 #ifndef WX_GERBER_STRUCT_H 23 #define WX_GERBER_STRUCT_H 37 #define NO_AVAILABLE_LAYERS UNDEFINED_LAYER 53 #define GERBVIEW_FRAME_NAME wxT( "GerberFrame" ) 63 bool OpenProjectFiles(
const std::vector<wxString>& aFileSet,
int aCtl )
override;
75 const wxArrayString& aFilenameList,
76 const std::vector<int>* aFileType =
nullptr );
179 void SetActiveLayer(
int aLayer,
bool doLayerWidgetUpdate =
true );
262 void OnQuit( wxCommandEvent& event );
451 int SelectPCBLayer(
int aDefaultLayer,
int aCopperLayerCount, wxString aGerberName );
467 DECLARE_EVENT_TABLE()
const BOX2I GetDocumentExtents(bool aIncludeAllVisible=true) const override
Returns bbox of document with option to not include some items.
Class GBR_DISPLAY_OPTIONS is a helper class to handle display options (filling modes and afew other o...
A list of GERBER_DRAW_ITEM objects currently loaded.
void SetTitleBlock(const TITLE_BLOCK &aTitleBlock) override
void OnSelectHighlightChoice(wxCommandEvent &event)
Handles the changing of the highlighted component/net/attribute.
Class CLASS_GBR_LAYOUT to handle info to draw loaded Gerber images and page frame reference.
void SaveSettings(APP_SETTINGS_BASE *aCfg) override
Save common frame parameters to a configuration data file.
void SetVisibleElementColor(int aLayerID, COLOR4D aColor)
void SortLayersByX2Attributes()
void ToggleLayerManager()
bool Clear_DrawLayers(bool query)
const wxSize GetPageSizeIU() const override
Works off of GetPageSettings() to return the size of the paper page in the internal units of this par...
void OnUpdateSelectDCode(wxUpdateUIEvent &aEvent)
void setupUIConditions() override
Setup the UI conditions for the various actions and their controls in this frame.
void UpdateStatusBar() override
Update the status bar information.
COLOR4D GetNegativeItemsColor()
This is usually the background color, but can be another color in order to see negative objects.
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.
void OnQuit(wxCommandEvent &event)
Called on request of application quit.
void OnClearDrlFileHistory(wxCommandEvent &aEvent)
FILE_HISTORY m_jobFileHistory
void SetPageSettings(const PAGE_INFO &aPageSettings) override
const TITLE_BLOCK & GetTitleBlock() const override
GERBER_LAYER_WIDGET * m_LayersManager
bool OpenProjectFiles(const std::vector< wxString > &aFileSet, int aCtl) override
Open a project or set of files given by aFileList.
bool Read_GERBER_File(const wxString &GERBER_FullFileName)
Hold the image data and parameters for one gerber file and layer parameters.
void SetActiveLayer(int aLayer, bool doLayerWidgetUpdate=true)
change the currently active layer to aLayer and update the GERBER_LAYER_WIDGET.
void OnGbrFileHistory(wxCommandEvent &event)
Delete the current data and loads a Gerber file selected from history list on current layer.
GBR_LAYER_BOX_SELECTOR * m_SelLayerBox
const GBR_DISPLAY_OPTIONS & GetDisplayOptions() const
void OnUpdateLayerSelectBox(wxUpdateUIEvent &aEvent)
void updateNetnameListSelectBox()
A pure virtual class used to derive REPORTER objects from.
This class implements a file history object to store a list of files, that can then be added to a men...
void Erase_Current_DrawLayer(bool query)
The base class for create windows for drawing purpose.
GERBER_FILE_IMAGE_LIST is a helper class to handle a list of GERBER_FILE_IMAGE files which are loaded...
void OnClearZipFileHistory(wxCommandEvent &aEvent)
Hold the information shown in the lower right corner of a plot, printout, or editing view.
UNDO_REDO
Undo Redo considerations: Basically we have 3 cases New item Deleted item Modified item there is also...
void OnSelectActiveDCode(wxCommandEvent &event)
Select the active DCode for the current active layer.
void SaveCopyInUndoList(const PICKED_ITEMS_LIST &aItemsList, UNDO_REDO aTypeCommand)
Create a new entry in undo list of commands and add a list of pickers to handle a list of items.
wxChoice * m_SelNetnameBox
void ActivateGalCanvas() override
Use to start up the GAL drawing canvas.
void SetGridVisibility(bool aVisible) override
GERBVIEW_FRAME(KIWAY *aKiway, wxWindow *aParent)
void OnSelectDisplayMode(wxCommandEvent &event)
Called on a display mode selection.
void ReCreateHToolbar() override
bool LoadGerberJobFile(const wxString &aFileName)
Load a Gerber job file, and load gerber files found in job files.
void OnClearJobFileHistory(wxCommandEvent &aEvent)
void SetGridOrigin(const wxPoint &aPoint) override
void SaveCopyInUndoList(GERBER_DRAW_ITEM *aItemToCopy, UNDO_REDO aTypeCommand=UNDO_REDO::UNSPECIFIED)
FILE_HISTORY m_zipFileHistory
void CommonSettingsChanged(bool aEnvVarsChanged, bool aTextVarsChanged) override
Called after the preferences dialog is run.
void updateComponentListSelectBox()
void SetDisplayOptions(const GBR_DISPLAY_OPTIONS &aOptions)
void UpdateDisplayOptions(const GBR_DISPLAY_OPTIONS &aOptions)
Update the display options and refreshes the view as needed.
LSET is a set of PCB_LAYER_IDs.
unsigned ImagesMaxCount() const
The max number of file images.
COLOR4D GetGridColor() override
bool unarchiveFiles(const wxString &aFullFileName, REPORTER *aReporter=nullptr)
Extract gerber and drill files from the zip archive, and load them.
APP_SETTINGS_BASE is a settings class that should be derived for each standalone KiCad application.
void ReCreateAuxiliaryToolbar() override
void unitsChangeRefresh() override
Called when when the units setting has changed to allow for any derived classes to handle refreshing ...
void ReCreateVToolbar() override
Create or update the right vertical toolbar.
bool LoadGerberFiles(const wxString &aFileName)
Load a photoplot (Gerber) file or many files.
void InstallPreferences(PAGED_DIALOG *aParent, PANEL_HOTKEYS_EDITOR *aHotkeysPanel) override
Allow Gerbview to install its preferences panels into the preferences dialog.
bool LoadListOfGerberAndDrillFiles(const wxString &aPath, const wxArrayString &aFilenameList, const std::vector< int > *aFileType=nullptr)
Load a list of Gerber and NC drill files and updates the view based on them.
Describe the page size and margins of a paper page on which to eventually print or plot.
GERBER_FILE_IMAGE * GetGbrImage(int aIdx) const
bool LoadZipArchiveFile(const wxString &aFileName)
Load a zipped archive file.
GBR_DISPLAY_OPTIONS m_DisplayOptions
void applyDisplaySettingsToGAL()
Updates the GAL with display settings changes.
void ShowChangedLanguage() override
Redraw the menus and what not in current language.
bool IsElementVisible(int aLayerID) const
Test whether a given element category is visible.
GBR_LAYOUT * m_gerberLayout
A minimalistic software bus for communications between various DLLs/DSOs (DSOs) within the same KiCad...
void OnClearGbrFileHistory(wxCommandEvent &aEvent)
const wxPoint & GetGridOrigin() const override
Return the absolute coordinates of the origin of the snap grid.
A holder to handle information on schematic or board items.
void doCloseWindow() override
FILE_HISTORY m_drillFileHistory
void LoadSettings(APP_SETTINGS_BASE *aCfg) override
Load common frame parameters from a configuration file.
GBR_LAYOUT * GetGerberLayout() const
DCODE_SELECTION_BOX * m_DCodeSelector
void DisplayGridMsg() override
Display the current grid pane on the status bar.
const PAGE_INFO & GetPageSettings() const override
int GetActiveLayer() const
Return the active layer.
void OnJobFileHistory(wxCommandEvent &event)
Delete the current data and load a gerber job file selected from the history list.
void updateAperAttributesSelectBox()
wxChoice * m_SelAperAttributesBox
Board layer functions and definitions.
SELECTION & GetCurrentSelection() override
Get the current selection from the canvas area.
void OnUpdateDrawMode(wxUpdateUIEvent &aEvent)
COLOR4D GetLayerColor(int aLayer) const
int SelectPCBLayer(int aDefaultLayer, int aCopperLayerCount, wxString aGerberName)
Show the dialog box for layer selection.
GERBER_FILE_IMAGE_LIST * GetImagesList() const
void SetLayerColor(int aLayer, COLOR4D aColor)
wxStaticText * m_dcodeText
virtual void SetGridColor(COLOR4D aColor) override
void syncLayerWidget()
Update the currently "selected" layer within the GERBER_LAYER_WIDGET.
wxChoice * m_SelComponentBox
void OnDrlFileHistory(wxCommandEvent &event)
Delete the current data and load a drill file in Excellon format selected from history list on curren...
void updateDCodeSelectBox()
bool LoadExcellonFiles(const wxString &aFileName)
Load a drill (EXCELLON) file or many files.
void OnZipFileHistory(wxCommandEvent &event)
Delete the current data and load a zip archive file selected from the history list.
void SetVisibleLayers(LSET aLayerMask)
A proxy function that calls the correspondent function in m_BoardSettings.
bool m_show_layer_manager_tools
void ReCreateMenuBar() override
Recreates the menu bar.
wxStaticText * m_apertText
int getNextAvailableLayer(int aLayer=0) const
Find the next empty layer starting at aLayer and returns it to the caller.
virtual const BOX2I ViewBBox() const override
Return the bounding box of the item covering all its layers.
void SetLayout(GBR_LAYOUT *aLayout)
Set the m_gerberLayout member in such as way as to ensure deleting any previous GBR_LAYOUT.
bool IsLayerVisible(int aLayer) const
Test whether a given layer is visible.
GERBER_FILE_IMAGE_LIST * GetImagesList() const
Accessors to GERBER_FILE_IMAGE_LIST and GERBER_FILE_IMAGE data.
void SetElementVisibility(int aLayerID, bool aNewState)
Change the visibility of an element category.
void ReFillLayerWidget()
Change out all the layers in m_Layers; called upon loading new gerber files.
void OnSelectActiveLayer(wxCommandEvent &event)
Select the active layer:
void UpdateTitleAndInfo()
Display the short filename (if exists) of the selected layer on the caption of the main GerbView wind...
void SetDisplayMode(int aMode)
A color representation with 4 components: red, green, blue, alpha.
bool Read_EXCELLON_File(const wxString &aFullFileName)
void ReCreateOptToolbar() override
Create or update the left vertical toolbar (option toolbar)