29#include <wx/listbox.h>
30#include <wx/numformatter.h>
31#include <wx/statline.h>
32#include <wx/tokenzr.h>
33#include <wx/wupdlock.h>
53#include <nlohmann/json.hpp>
54#include <wx/wupdlock.h>
88 wxDefaultPosition, wxDefaultSize,
139 GetBoard()->GetDesignSettings().m_NetSettings->GetDefaultNetclass()->SetClearance( 0 );
171 wxDefaultPosition, wxDefaultSize,
172 wxTE_MULTILINE | wxTE_READONLY | wxNO_BORDER );
183 .Caption(
_(
"Parameters" ) ).MinSize( 200, 320 ) );
185 .CaptionVisible(
false ).MinSize( 120, -1 ) );
187 m_auimgr.AddPane(
GetCanvas(), wxAuiPaneInfo().Name(
"DrawFrame" ).CentrePane() );
191 galOpts.m_forceDisplayCursor =
true;
192 galOpts.m_axesEnabled =
true;
217 GetCanvas()->SetEvtHandlerEnabled(
false );
285 std::vector<MSG_PANEL_ITEM> items;
329#if wxCHECK_VERSION( 3, 3, 0 )
332 nlohmann::json state = serializer.
Serialize();
334 if( state.is_null() || state.empty() )
351 return &cfg->m_FootprintWizard;
353 wxFAIL_MSG( wxT(
"FOOTPRINT_CHOOSER not running with PCBNEW_SETTINGS" ) );
361 if( !event.GetActive() )
375 bool footprintWizardsChanged =
false;
377 if( footprintWizardsChanged )
391 frm3Dtitle.Printf(
_(
"3D Viewer [%s]" ), wizardName );
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 zoomFitScreen
APP_SETTINGS_BASE is a settings class that should be derived for each standalone KiCad application.
wxString m_ColorTheme
Active color theme name.
Abstract interface for BOARD_ITEMs capable of storing other items inside.
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
FOOTPRINT * GetFirstFootprint() const
Get the first footprint on the board or nullptr.
Color settings are a bit different than most of the settings objects in that there can be more than o...
Handle actions that are shared between different applications.
Create and handle a window for the 3d viewer connected to a Kiway and a pcbboard.
TOOLBAR_SETTINGS * m_toolbarSettings
virtual void RecreateToolbars()
ACTION_TOOLBAR * m_tbTopMain
virtual void ClearMsgPanel()
Clear all messages from the message panel.
EDA_DRAW_PANEL_GAL::GAL_TYPE m_canvasType
The current canvas type.
void SetMsgPanel(const std::vector< MSG_PANEL_ITEM > &aList)
Clear the message panel and populates it with the contents of aList.
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 ReCreateHToolbar()
static constexpr GAL_TYPE GAL_FALLBACK
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 void Refresh(bool aEraseBackground=true, const wxRect *aRect=nullptr) override
void SetEventDispatcher(TOOL_DISPATCHER *aEventDispatcher)
Set a dispatcher that processes events and forwards them to tools.
virtual void GetMsgPanelInfo(EDA_DRAW_FRAME *aFrame, std::vector< MSG_PANEL_ITEM > &aList)
Populate aList of MSG_PANEL_ITEM objects with it's internal state for display purposes.
Specialization of the wxAuiPaneInfo class for KiCad panels.
void SetModal(bool aIsModal)
bool Destroy() override
Our version of Destroy() which is virtual from wxWidgets.
void DismissModal(bool aRetVal, const wxString &aResult=wxEmptyString)
bool IsModal() const override
Return true if the frame is shown in our modal mode and false if the frame is shown as an usual frame...
A minimalistic software bus for communications between various DLLs/DSOs (DSOs) within the same KiCad...
WINDOW_SETTINGS m_FootprintViewer
Gather all the actions that are shared by tools.
Common, abstract interface for edit frames.
virtual void SetBoard(BOARD *aBoard, PROGRESS_REPORTER *aReporter=nullptr) override
Set the #m_Pcb member in such as way as to ensure deleting any previous BOARD.
void configureToolbars() override
PCB_BASE_EDIT_FRAME(KIWAY *aKiway, wxWindow *aParent, FRAME_T aFrameType, const wxString &aTitle, const wxPoint &aPos, const wxSize &aSize, long aStyle, const wxString &aFrameName)
void ActivateGalCanvas() override
Set the #m_Pcb member in such as way as to ensure deleting any previous BOARD.
void LoadSettings(APP_SETTINGS_BASE *aCfg) override
Load common frame parameters from a configuration file.
const VECTOR2I GetPageSizeIU() const override
Works off of GetPageSettings() to return the size of the paper page in the internal units of this par...
PCB_BASE_FRAME(KIWAY *aKiway, wxWindow *aParent, FRAME_T aFrameType, const wxString &aTitle, const wxPoint &aPos, const wxSize &aSize, long aStyle, const wxString &aFrameName)
virtual void SetActiveLayer(PCB_LAYER_ID aLayer)
PCB_DRAW_PANEL_GAL * GetCanvas() const override
Return a pointer to GAL-based canvas of given EDA draw frame.
void SaveSettings(APP_SETTINGS_BASE *aCfg) override
Save common frame parameters to a configuration data file.
PCB_SCREEN * GetScreen() const override
Return a pointer to a BASE_SCREEN or one of its derivatives.
FOOTPRINT_EDITOR_SETTINGS * GetFootprintEditorSettings() const
EDA_3D_VIEWER_FRAME * Get3DViewerFrame()
virtual void Update3DView(bool aMarkDirty, bool aRefresh, const wxString *aTitle=nullptr)
Update the 3D view, if the viewer is opened by this frame.
Handle actions that are shared between different frames in PcbNew.
void UpdateColors()
Update the color settings in the painter and GAL.
virtual KIGFX::PCB_VIEW * GetView() const override
Return a pointer to the #VIEW instance used in the panel.
void DisplayBoard(BOARD *aBoard, PROGRESS_REPORTER *aReporter=nullptr)
Add all items from the current board to the VIEW, so they can be displayed by GAL.
EDA_UNITS GetUserUnits() const
void SetUserUnits(EDA_UNITS aUnits)
nlohmann::json Serialize() const
Declaration of the eda_3d_viewer class.
#define KICAD_DEFAULT_DRAWFRAME_STYLE
#define FOOTPRINT_WIZARD_FRAME_NAME
FRAME_T
The set of EDA_BASE_FRAME derivatives, typically stored in EDA_BASE_FRAME::m_Ident.
Message panel definition file.
@ ID_FOOTPRINT_WIZARD_DONE
@ ID_FOOTPRINT_WIZARD_SELECT_WIZARD
T * GetToolbarSettings(const wxString &aFilename)
Store the common settings that are saved and loaded for each window / frame.