31 #ifndef PCB_BASE_FRAME_H 32 #define PCB_BASE_FRAME_H 77 const wxString& aTitle,
const wxPoint& aPos,
const wxSize& aSize,
78 long aStyle,
const wxString& aFrameName );
95 virtual void Update3DView(
bool aMarkDirty,
bool aRefresh,
96 const wxString* aTitle =
nullptr );
168 wxFAIL_MSG( wxT(
"Color settings requested for a PCB_BASE_FRAME that does not override!" ) );
353 wxPoint aDlgPosition = wxDefaultPosition );
412 #endif // PCB_BASE_FRAME_H
PCB_LAYER_ID SelectOneLayer(PCB_LAYER_ID aDefaultLayer, LSET aNotAllowedLayersMask=LSET(), wxPoint aDlgPosition=wxDefaultPosition)
Show the dialog box for a layer selection.
wxString SelectFootprintFromLibBrowser()
Launch the footprint viewer to select the name of a footprint to load.
const BOX2I GetDocumentExtents(bool aIncludeAllVisible=true) const override
Returns bbox of document with option to not include some items.
virtual void ShowChangedLanguage() override
Redraw the menus and what not in current language.
void DisplayGridMsg() override
Display the current grid pane on the status bar.
void SetDrawBgColor(const COLOR4D &aColor) override
virtual BOARD_DESIGN_SETTINGS & GetDesignSettings() const
Returns the BOARD_DESIGN_SETTINGS for the open project.
virtual void unitsChangeRefresh() override
Called when when the units setting has changed to allow for any derived classes to handle refreshing ...
bool canCloseWindow(wxCloseEvent &aCloseEvent) override
void SetGridOrigin(const wxPoint &aPoint) override
EDA_3D_VIEWER_FRAME * Get3DViewerFrame()
void Compile_Ratsnest(bool aDisplayStatus)
Create the entire board ratsnest.
virtual void OnDisplayOptionsChanged()
FOOTPRINT * SelectFootprintFromLibTree(LIB_ID aPreselect=LIB_ID())
Open a dialog to select a footprint.
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
FOOTPRINT_EDITOR_SETTINGS * GetFootprintEditorSettings() const
A progress reporter interface for use in multi-threaded environments.
FRAME_T
The set of EDA_BASE_FRAME derivatives, typically stored in EDA_BASE_FRAME::m_Ident.
void CommonSettingsChanged(bool aEnvVarsChanged, bool aTextVarsChanged) override
Notification event that some of the common (suite-wide) settings have changed.
FOOTPRINT * CreateNewFootprint(const wxString &aFootprintName, bool aQuiet=false)
Creates a new footprint, at position 0,0.
PCB_DRAW_PANEL_GAL * GetCanvas() const override
Return a pointer to GAL-based canvas of given EDA draw frame.
const wxPoint & GetGridOrigin() const override
Return the absolute coordinates of the origin of the snap grid.
const wxPoint GetUserOrigin() const
void SetTitleBlock(const TITLE_BLOCK &aTitleBlock) override
virtual MAGNETIC_SETTINGS * GetMagneticItemsSettings()
A logical library item identifier and consists of various portions much like a URI.
void LoadSettings(APP_SETTINGS_BASE *aCfg) override
Load common frame parameters from a configuration file.
PCB_BASE_FRAME(KIWAY *aKiway, wxWindow *aParent, FRAME_T aFrameType, const wxString &aTitle, const wxPoint &aPos, const wxSize &aSize, long aStyle, const wxString &aFrameName)
The base class for create windows for drawing purpose.
virtual const PCB_PLOT_PARAMS & GetPlotSettings() const
Return the PCB_PLOT_PARAMS for the BOARD owned by this frame.
PCBNEW_SETTINGS * m_settings
PCB_LAYER_ID m_Active_Layer
const PCB_DISPLAY_OPTIONS & GetDisplayOptions() const
Display options control the way tracks, vias, outlines and other things are shown (for instance solid...
Hold the information shown in the lower right corner of a plot, printout, or editing view.
A base class derived from BOARD_ITEM for items that can be connected and have a net,...
UNDO_REDO
Undo Redo considerations: Basically we have 3 cases New item Deleted item Modified item there is also...
void PlaceFootprint(FOOTPRINT *aFootprint, bool aRecreateRatsnest=true)
Places aFootprint at the current cursor position and updates footprint coordinates with the new posit...
SEVERITY GetSeverity(int aErrorCode) const override
virtual COLOR_SETTINGS * GetColorSettings() const override
Helper to retrieve the current color settings.
virtual PCB_LAYER_ID GetActiveLayer() const
PCB_DISPLAY_OPTIONS m_displayOptions
virtual void SwitchLayer(PCB_LAYER_ID aLayer)
Change the active layer in the frame.
void SetDisplayOptions(const PCB_DISPLAY_OPTIONS &aOptions, bool aRefresh=true)
Updates the current display options from the given options struct.
Container for display options like enable/disable some optional drawings.
GENERAL_COLLECTORS_GUIDE GetCollectorsGuide()
LSET is a set of PCB_LAYER_IDs.
FOOTPRINT * loadFootprint(const LIB_ID &aFootprintId)
Attempts to load aFootprintId from the footprint library table.
APP_SETTINGS_BASE is a settings class that should be derived for each standalone KiCad application.
virtual void ActivateGalCanvas() override
Use to start up the GAL drawing canvas.
Create and handle a window for the 3d viewer connected to a Kiway and a pcbboard.
Describe the page size and margins of a paper page on which to eventually print or plot.
EDA_ITEM * GetItem(const KIID &aId) const override
Fetch an item by KIID.
const ZONE_SETTINGS & GetZoneSettings() const
void FocusOnItems(std::vector< BOARD_ITEM * > aItems, PCB_LAYER_ID aLayer=UNDEFINED_LAYER)
A minimalistic software bus for communications between various DLLs/DSOs (DSOs) within the same KiCad...
virtual void SetPlotSettings(const PCB_PLOT_PARAMS &aSettings)
EDA_RECT GetBoardBoundingBox(bool aBoardEdgesOnly=false) const
Calculate the bounding box containing all board items (or board edge segments).
FOOTPRINT * LoadFootprint(const LIB_ID &aFootprintId)
Attempt to load aFootprintId from the footprint library table.
virtual void SetActiveLayer(PCB_LAYER_ID aLayer)
virtual void SetBoard(BOARD *aBoard, PROGRESS_REPORTER *aReporter=nullptr)
Set the #m_Pcb member in such as way as to ensure deleting any previous BOARD.
A holder to handle information on schematic or board items.
virtual void ReCreateMenuBar() override
Recreates the menu bar.
Parameters and options when plotting/printing a board.
void FocusOnItem(BOARD_ITEM *aItem, PCB_LAYER_ID aLayer=UNDEFINED_LAYER)
void SaveSettings(APP_SETTINGS_BASE *aCfg) override
Save common frame parameters to a configuration data file.
ZONE_SETTINGS handles zones parameters.
virtual BOARD_ITEM_CONTAINER * GetModel() const =0
const TITLE_BLOCK & GetTitleBlock() const override
virtual void OnModify()
Must be called after a change in order to set the "modify" flag of the current screen and update the ...
virtual void UpdateStatusBar() override
Update the status bar information.
bool IsLayerVisible(PCB_LAYER_ID aLayer) const
A proxy function that calls the correspondent function in m_BoardSettings tests whether a given layer...
wxDECLARE_EVENT(BOARD_CHANGED, wxCommandEvent)
Information pertinent to a Pcbnew printed circuit board.
PCB_LAYER_ID
A quick note on layer IDs:
ORIGIN_TRANSFORMS & GetOriginTransforms() override
Return a reference to the default ORIGIN_TRANSFORMS object.
Used when the right click button is pressed, or when the select tool is in effect.
virtual void Update3DView(bool aMarkDirty, bool aRefresh, const wxString *aTitle=nullptr)
Update the 3D view, if the viewer is opened by this frame.
Handle the component boundary box.
PCBNEW_SETTINGS & Settings()
PCBNEW_SETTINGS * GetPcbNewSettings() const
const PAGE_INFO & GetPageSettings() const override
virtual void AddFootprintToBoard(FOOTPRINT *aFootprint)
Add the given footprint to the board.
A base class for most all the KiCad significant classes used in schematics and boards.
PCB_SCREEN * GetScreen() const override
Return a pointer to a BASE_SCREEN or one of its derivatives.
virtual void SaveCopyInUndoList(EDA_ITEM *aItemToCopy, UNDO_REDO aTypeCommand)=0
Create a new entry in undo list of commands.
virtual void SetPageSettings(const PAGE_INFO &aPageSettings) override
const wxSize GetPageSizeIU() const override
Works off of GetPageSettings() to return the size of the paper page in the internal units of this par...
Color settings are a bit different than most of the settings objects in that there can be more than o...
void SetZoneSettings(const ZONE_SETTINGS &aSettings)
EDA_3D_VIEWER_FRAME * CreateAndShow3D_Frame()
Shows the 3D view frame.
wxString SelectLibrary(const wxString &aNicknameExisting)
Put up a dialog and allows the user to pick a library, for unspecified use.
Abstract interface for BOARD_ITEMs capable of storing other items inside.
virtual void ReCreateOptToolbar() override
A general implementation of a COLLECTORS_GUIDE.
void ShowPadPropertiesDialog(PAD *aPad)
Definition of PCB_DISPLAY_OPTIONS class.
virtual BASE_SCREEN * GetScreen() const
Return a pointer to a BASE_SCREEN or one of its derivatives.
Base PCB main window class for Pcbnew, Gerbview, and CvPcb footprint viewer.
FOOTPRINT * GetFootprintFromBoardByReference()
PCB_ORIGIN_TRANSFORMS m_originTransforms
Container for design settings for a BOARD object.
A color representation with 4 components: red, green, blue, alpha.
const wxPoint & GetAuxOrigin() const