42class wxSingleInstanceChecker;
49class wxFindReplaceData;
58 class GAL_DISPLAY_OPTIONS;
65#define LIB_EDIT_FRAME_NAME wxT( "LibeditFrame" )
66#define LIB_VIEW_FRAME_NAME wxT( "ViewlibFrame" )
67#define SCH_EDIT_FRAME_NAME wxT( "SchematicFrame" )
68#define SYMBOL_CHOOSER_FRAME_NAME wxT( "SymbolChooserFrame" )
69#define PL_EDITOR_FRAME_NAME wxT( "PlEditorFrame" )
70#define FOOTPRINT_WIZARD_FRAME_NAME wxT( "FootprintWizard" )
71#define FOOTPRINT_CHOOSER_FRAME_NAME wxT( "FootprintChooserFrame" )
72#define FOOTPRINT_EDIT_FRAME_NAME wxT( "ModEditFrame" )
73#define FOOTPRINT_VIEWER_FRAME_NAME wxT( "ModViewFrame" )
74#define PCB_EDIT_FRAME_NAME wxT( "PcbFrame" )
87 const wxPoint& aPos,
const wxSize& aSize,
long aStyle,
88 const wxString& aFrameName,
const EDA_IU_SCALE& aIuScale );
100 bool LockFile(
const wxString& aFileName );
195 bool LibraryFileBrowser(
bool doOpen, wxFileName& aFilename,
const wxString& wildcard,
196 const wxString& ext,
bool isDirectory =
false,
bool aIsGlobal =
false,
197 const wxString& aGlobalPath = wxEmptyString );
287 virtual void OnSize( wxSizeEvent& event )
override;
289 void OnMove( wxMoveEvent& aEvent )
override;
328 const std::map<wxString, wxString>* aProperties,
double aMils2Iu,
329 const wxString& aFilename,
const wxString& aSheetLayer = wxEmptyString );
374 void AppendMsgPanel(
const wxString& aTextUpper,
const wxString& aTextLower,
int aPadding = 6 );
386 void SetMsgPanel(
const std::vector< MSG_PANEL_ITEM >& aList );
396 void SetMsgPanel(
const wxString& aTextUpper,
const wxString& aTextLower,
int aPadding = 6 );
516 DECLARE_EVENT_TABLE()
APP_SETTINGS_BASE is a settings class that should be derived for each standalone KiCad application.
Handles how to draw a screen (a board, a schematic ...)
Color settings are a bit different than most of the settings objects in that there can be more than o...
The base class for create windows for drawing purpose.
virtual const BOX2I GetDocumentExtents(bool aIncludeAllVisible=true) const
Returns bbox of document with option to not include some items.
wxArrayString m_replaceStringHistoryList
virtual void ClearMsgPanel()
Clear all messages from the message panel.
virtual void ReCreateVToolbar()
virtual void UpdateToolbarControlSizes()
Update the sizes of any controls in the toolbars of the frame.
HOTKEY_CYCLE_POPUP * GetHotkeyPopup()
EDA_DRAW_PANEL_GAL * m_canvas
This the frame's interface to setting GAL display options.
virtual void ActivateGalCanvas()
Use to start up the GAL drawing canvas.
virtual void SetTitleBlock(const TITLE_BLOCK &aTitleBlock)=0
void SaveSettings(APP_SETTINGS_BASE *aCfg) override
Save common frame parameters to a configuration data file.
GAL_DISPLAY_OPTIONS_IMPL m_galDisplayOptions
virtual const TITLE_BLOCK & GetTitleBlock() const =0
virtual void PrintPage(const RENDER_SETTINGS *aSettings)
Print the page pointed by current screen, set by the calling print function.
void onActivate(wxActivateEvent &aEvent)
COLOR_SETTINGS * m_colorSettings
wxChoice * m_gridSelectBox
void AddStandardSubMenus(TOOL_MENU &aMenu)
Construct a "basic" menu for a tool, containing only items that apply to all tools (e....
void ReleaseFile()
Release the current file marked in use.
void OnToolbarSizeChanged()
Update toolbars if desired toolbar icon changed.
int m_lastToolbarIconSize
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 ScriptingConsoleEnableDisable()
Toggles the scripting console visibility.
virtual wxString GetFullScreenDesc() const
void OnSelectGrid(wxCommandEvent &event)
Command event handler for selecting grid sizes.
void DisplayToolMsg(const wxString &msg) override
std::unique_ptr< LOCKFILE > m_file_checker
bool IsScriptingConsoleVisible()
Gets the current visibility of the scripting console window.
void OnUpdateSelectZoom(wxUpdateUIEvent &aEvent)
Update the checked item in the zoom wxchoice.
virtual const PAGE_INFO & GetPageSettings() const =0
virtual void FocusLibraryTreeInput()
void DisplayUnitsMsg()
Display current unit pane in the status bar.
void setupUnits(APP_SETTINGS_BASE *aCfg)
virtual void ToggleLibraryTree()
void SetMsgPanel(const std::vector< MSG_PANEL_ITEM > &aList)
Clear the message panel and populates it with the contents of aList.
void RefreshCanvas() override
virtual COLOR4D GetGridColor()
ACTION_TOOLBAR * m_optionsToolBar
void UpdateGridSelectBox()
Rebuild the grid combobox to respond to any changes in the GUI (units, user grid changes,...
virtual const VECTOR2I GetPageSizeIU() const =0
Works off of GetPageSettings() to return the size of the paper page in the internal units of this par...
bool LockFile(const wxString &aFileName)
Mark a schematic file as being in use.
virtual void HardRedraw()
Rebuild the GAL and redraws the screen.
virtual void SetGridOrigin(const VECTOR2I &aPosition)=0
bool LibraryFileBrowser(bool doOpen, wxFileName &aFilename, const wxString &wildcard, const wxString &ext, bool isDirectory=false, bool aIsGlobal=false, const wxString &aGlobalPath=wxEmptyString)
virtual bool IsLibraryTreeShown() const
bool IsGridOverridden() const
void LoadSettings(APP_SETTINGS_BASE *aCfg) override
Load common frame parameters from a configuration file.
bool SaveCanvasImageToFile(const wxString &aFileName, BITMAP_TYPE aBitmapType)
Save the current view as an image file.
void UpdateZoomSelectBox()
Rebuild the grid combobox to respond to any changes in the GUI (units, user grid changes,...
virtual void SetPageSettings(const PAGE_INFO &aPageSettings)=0
virtual void SwitchCanvas(EDA_DRAW_PANEL_GAL::GAL_TYPE aCanvasType)
Changes the current rendering backend.
virtual void OnSize(wxSizeEvent &event) override
Recalculate the size of toolbars and display panel when the frame size changes.
EDA_DRAW_PANEL_GAL::GAL_TYPE loadCanvasTypeSetting(APP_SETTINGS_BASE *aCfg=nullptr)
Returns the canvas type stored in the application settings.
const wxString GetZoomLevelIndicator() const
Return a human readable value for display in dialogs.
virtual void OnSelectZoom(wxCommandEvent &event)
Set the zoom factor when selected by the zoom list box in the main tool bar.
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.
static bool m_openGLFailureOccured
Has any failure occured when switching to OpenGL in any EDA_DRAW_FRAME?
virtual LIB_TREE * GetLibTree() const
BASE_SCREEN * m_currentScreen
current used SCREEN
virtual wxString GetScreenDesc() const
VECTOR2I GetNearestGridPosition(const VECTOR2I &aPosition) const
Return the nearest aGridSize location to aPosition.
static const wxString PropertiesPaneName()
EDA_MSG_PANEL * m_messagePanel
void SetCanvas(EDA_DRAW_PANEL_GAL *aPanel)
virtual const VECTOR2I & GetGridOrigin() const =0
Return the absolute coordinates of the origin of the snap grid.
virtual void ReCreateAuxiliaryToolbar()
void SetShowPolarCoords(bool aShow)
void FocusOnLocation(const VECTOR2I &aPos)
Useful to focus on a particular location, in find functions.
virtual void SetScreen(BASE_SCREEN *aScreen)
virtual void ReCreateHToolbar()
void RecreateToolbars()
Rebuild all toolbars, and update the checked state of check tools.
bool saveCanvasTypeSetting(EDA_DRAW_PANEL_GAL::GAL_TYPE aCanvasType)
Stores the canvas type in the application settings.
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.
NET_INSPECTOR_PANEL * m_netInspectorPanel
virtual void SetGridVisibility(bool aVisible)
virtual void handleActivateEvent(wxActivateEvent &aEvent)
Handle a window activation event.
virtual void ReCreateOptToolbar()
virtual void OnApiPluginInvoke(wxCommandEvent &aEvent)
Handler for activating an API plugin (via toolbar or menu)
virtual void SetDrawBgColor(const COLOR4D &aColor)
virtual void UpdateMsgPanel()
Redraw the message panel.
virtual COLOR_SETTINGS * GetColorSettings(bool aForceRefresh=false) const
Returns a pointer to the active color theme settings.
void ToggleUserUnits() override
static const wxString NetInspectorPanelName()
virtual void CreateHotkeyPopup()
void UpdateStatusBar() override
Update the status bar information.
void GetUnitPair(EDA_UNITS &aPrimaryUnit, EDA_UNITS &aSecondaryUnits) override
Get the pair or units in current use.
wxArrayString & GetFindHistoryList()
void ShowChangedLanguage() override
Redraw the menus and what not in current language.
virtual EDA_ITEM * GetItem(const KIID &aId) const
Fetch an item by KIID.
void updateStatusBarWidths()
void PrintDrawingSheet(const RENDER_SETTINGS *aSettings, BASE_SCREEN *aScreen, const std::map< wxString, wxString > *aProperties, double aMils2Iu, const wxString &aFilename, const wxString &aSheetLayer=wxEmptyString)
Prints the drawing-sheet (frame and title block).
virtual EDA_DRAW_PANEL_GAL * GetCanvas() const
Return a pointer to GAL-based canvas of given EDA draw frame.
virtual void OnPageSettingsChange()
Called when modifying the page settings.
wxSocketServer * m_socketServer
Prevents opening same file multiple times.
ACTION_TOOLBAR * m_drawToolBar
SEARCH_PANE * m_searchPane
EDA_SEARCH_DATA & GetFindReplaceData()
virtual COLOR4D GetDrawBgColor() const
void unitsChangeRefresh() override
Called when when the units setting has changed to allow for any derived classes to handle refreshing ...
void OnMove(wxMoveEvent &aEvent) override
void CommonSettingsChanged(bool aEnvVarsChanged, bool aTextVarsChanged) override
Notification event that some of the common (suite-wide) settings have changed.
bool IsGridVisible() const
std::vector< wxWindow * > findDialogs()
virtual void DisplayGridMsg()
Display current grid size in the status bar.
virtual void SetGridColor(const COLOR4D &aColor)
wxArrayString m_findStringHistoryList
virtual LIB_ID GetTargetLibId() const
wxChoice * m_zoomSelectBox
PROPERTIES_PANEL * GetPropertiesPanel()
static const wxString DesignBlocksPaneName()
wxWindow * GetToolCanvas() const override
Canvas access.
virtual std::unique_ptr< GRID_HELPER > MakeGridHelper()
virtual PLUGIN_ACTION_SCOPE PluginActionScope() const
std::unique_ptr< EDA_SEARCH_DATA > m_findReplaceData
void DisplayConstraintsMsg(const wxString &msg)
void AppendMsgPanel(const wxString &aTextUpper, const wxString &aTextLower, int aPadding=6)
Append a message to the message panel.
virtual void SetGridOverrides(bool aOverride)
PROPERTIES_PANEL * m_propertiesPanel
virtual void addApiPluginTools()
Append actions from API plugins to the main toolbar.
bool m_showBorderAndTitleBlock
VECTOR2I GetNearestHalfGridPosition(const VECTOR2I &aPosition) const
Return the nearest aGridSize / 2 location to aPosition.
HOTKEY_CYCLE_POPUP * m_hotkeyPopup
The current canvas type.
void OnUpdateSelectGrid(wxUpdateUIEvent &aEvent)
Update the checked item in the grid wxchoice.
virtual void ToggleProperties()
ACTION_TOOLBAR * m_auxiliaryToolBar
bool GetShowPolarCoords() const
For those frames that support polar coordinates.
virtual void Refresh(bool aEraseBackground=true, const wxRect *aRect=nullptr) override
A base class for most all the KiCad significant classes used in schematics and boards.
A panel to display various information messages.
A color representation with 4 components: red, green, blue, alpha.
Container for all the knowledge about how graphical objects are drawn on any output surface/device.
A wxFrame capable of the OpenProjectFiles function, meaning it can load a portion of a KiCad project.
A minimalistic software bus for communications between various DLLs/DSOs (DSOs) within the same KiCad...
A logical library item identifier and consists of various portions much like a URI.
Widget displaying a tree of symbols with optional search text control and description panel....
A base class used to implement docking net inspector panels.
Describe the page size and margins of a paper page on which to eventually print or plot.
Hold the information shown in the lower right corner of a plot, printout, or editing view.
Base window classes and related definitions.
FRAME_T
The set of EDA_BASE_FRAME derivatives, typically stored in EDA_BASE_FRAME::m_Ident.
The Cairo implementation of the graphics abstraction layer.