37 class wxSingleInstanceChecker;
42 class wxFindReplaceData;
46 class GAL_DISPLAY_OPTIONS;
53 #define LIB_EDIT_FRAME_NAME wxT( "LibeditFrame" ) 54 #define SCH_EDIT_FRAME_NAME wxT( "SchematicFrame" ) 55 #define PL_EDITOR_FRAME_NAME wxT( "PlEditorFrame" ) 56 #define FOOTPRINT_WIZARD_FRAME_NAME wxT( "FootprintWizard" ) 57 #define FOOTPRINT_EDIT_FRAME_NAME wxT( "ModEditFrame" ) 58 #define FOOTPRINT_VIEWER_FRAME_NAME wxT( "ModViewFrame" ) 59 #define FOOTPRINT_VIEWER_FRAME_NAME_MODAL wxT( "ModViewFrameModal" ) 60 #define PCB_EDIT_FRAME_NAME wxT( "PcbFrame" ) 73 const wxPoint& aPos,
const wxSize& aSize,
long aStyle,
74 const wxString& aFrameName );
86 bool LockFile(
const wxString& aFileName );
179 bool LibraryFileBrowser(
bool doOpen, wxFileName& aFilename,
const wxString& wildcard,
180 const wxString& ext,
bool isDirectory =
false,
bool aIsGlobal =
false,
181 const wxString& aGlobalPath = wxEmptyString );
273 virtual void OnSize( wxSizeEvent& event );
275 void OnMove( wxMoveEvent& aEvent )
override;
313 double aMils2Iu,
const wxString& aFilename,
314 const wxString& aSheetLayer = wxEmptyString );
362 void AppendMsgPanel(
const wxString& aTextUpper,
const wxString& aTextLower,
int aPadding = 6 );
374 void SetMsgPanel(
const std::vector< MSG_PANEL_ITEM >& aList );
384 void SetMsgPanel(
const wxString& aTextUpper,
const wxString& aTextLower,
int aPadding = 6 );
453 DECLARE_EVENT_TABLE()
525 #endif // DRAW_FRAME_H_ void ReCreateMenuBar() override
Recreates the menu bar.
virtual void SetPageSettings(const PAGE_INFO &aPageSettings)=0
virtual void ReCreateVToolbar()=0
void AddStandardSubMenus(TOOL_MENU &aMenu)
Construct a "basic" menu for a tool, containing only items that apply to all tools (e....
virtual EDA_ITEM * GetItem(const KIID &aId)
Fetch an item by KIID.
A wxFrame capable of the OpenProjectFiles function, meaning it can load a portion of a KiCad project.
virtual const TITLE_BLOCK & GetTitleBlock() const =0
KIGFX::GAL_DISPLAY_OPTIONS & GetGalDisplayOptions()
Return a reference to the gal rendering options used by GAL for rendering.
The Cairo implementation of the graphics abstraction layer.
Container for all the knowledge about how graphical objects are drawn on any output surface/device.
ACTION_TOOLBAR * m_auxiliaryToolBar
virtual void SetTitleBlock(const TITLE_BLOCK &aTitleBlock)=0
ACTION_TOOLBAR * m_optionsToolBar
void OnSockRequestServer(wxSocketEvent &evt)
virtual void SetScreen(BASE_SCREEN *aScreen)
FRAME_T
The set of EDA_BASE_FRAME derivatives, typically stored in EDA_BASE_FRAME::m_Ident.
EDA_DRAW_PANEL_GAL::GAL_TYPE m_canvasType
void SetShowPolarCoords(bool aShow)
bool LibraryFileBrowser(bool doOpen, wxFileName &aFilename, const wxString &wildcard, const wxString &ext, bool isDirectory=false, bool aIsGlobal=false, const wxString &aGlobalPath=wxEmptyString)
virtual EDA_DRAW_PANEL_GAL * GetCanvas() const
Return a pointer to GAL-based canvas of given EDA draw frame.
std::vector< wxSocketBase * > m_sockets
interprocess communication
virtual void SetDrawBgColor(COLOR4D aColor)
void OnMove(wxMoveEvent &aEvent) override
void RecreateToolbars()
Rebuild all toolbars, and update the checked state of check tools.
wxArrayString m_findStringHistoryList
void resolveCanvasType()
Determines the Canvas type to load (with prompt if required) and initializes m_canvasType.
void ReleaseFile()
Release the current file marked in use.
void RefreshCanvas() override
virtual ORIGIN_TRANSFORMS & GetOriginTransforms()
Return a reference to the default ORIGIN_TRANSFORMS object.
wxPoint GetNearestHalfGridPosition(const wxPoint &aPosition) const
Return the nearest aGridSize / 2 location to aPosition.
void UpdateZoomSelectBox()
Rebuild the grid combobox to respond to any changes in the GUI (units, user grid changes,...
ACTION_TOOLBAR * m_mainToolBar
virtual void SetGridColor(COLOR4D aColor)
wxPoint GetNearestGridPosition(const wxPoint &aPosition) const
Return the nearest aGridSize location to aPosition.
EDA_MSG_PANEL is a panel to display various information messages.
The base class for create windows for drawing purpose.
Hold the information shown in the lower right corner of a plot, printout, or editing view.
wxChoice * m_gridSelectBox
std::unique_ptr< wxSingleInstanceChecker > m_file_checker
virtual const wxSize GetPageSizeIU() const =0
Works off of GetPageSettings() to return the size of the paper page in the internal units of this par...
wxFindReplaceData & GetFindReplaceData()
bool ShowPageLimits() const
virtual void ExecuteRemoteCommand(const char *cmdline)
Execute a remote command sent via socket (to port KICAD_PCB_PORT_SERVICE_NUMBER, currently 4242).
void DisplayUnitsMsg()
Display current unit pane in the status bar.
EDA_DRAW_FRAME(KIWAY *aKiway, wxWindow *aParent, FRAME_T aFrameType, const wxString &aTitle, const wxPoint &aPos, const wxSize &aSize, long aStyle, const wxString &aFrameName)
EDA_DRAW_PANEL_GAL * m_canvas
This the frame's interface to setting GAL display options.
void UpdateGridSelectBox()
Rebuild the grid combobox to respond to any changes in the GUI (units, user grid changes,...
void unitsChangeRefresh() override
Called when when the units setting has changed to allow for any derived classes to handle refreshing ...
virtual const PAGE_INFO & GetPageSettings() const =0
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.
void CommonSettingsChanged(bool aEnvVarsChanged, bool aTextVarsChanged) override
Notification event that some of the common (suite-wide) settings have changed.
void SaveSettings(APP_SETTINGS_BASE *aCfg) override
Save common frame parameters to a configuration data file.
BASE_SCREEN * m_currentScreen
current used SCREEN
APP_SETTINGS_BASE is a settings class that should be derived for each standalone KiCad application.
wxArrayString m_replaceStringHistoryList
void SetMsgPanel(const std::vector< MSG_PANEL_ITEM > &aList)
Clear the message panel and populates it with the contents of aList.
bool IsGridVisible() const
EDA_MSG_PANEL * m_messagePanel
void OnUpdateSelectGrid(wxUpdateUIEvent &aEvent)
Update the checked item in the grid combobox.
Describe the page size and margins of a paper page on which to eventually print or plot.
bool m_showBorderAndTitleBlock
Handles how to draw a screen (a board, a schematic ...)
wxChoice * m_zoomSelectBox
virtual void PrintPage(const RENDER_SETTINGS *aSettings)
Print the page pointed by current screen, set by the calling print function.
Base window classes and related definitions.
A minimalistic software bus for communications between various DLLs/DSOs (DSOs) within the same KiCad...
virtual void OnSize(wxSizeEvent &event)
Recalculate the size of toolbars and display panel when the frame size changes.
virtual const BOX2I GetDocumentExtents(bool aIncludeAllVisible=true) const
Returns bbox of document with option to not include some items.
virtual void ActivateGalCanvas()
Use to start up the GAL drawing canvas.
void PrintDrawingSheet(const RENDER_SETTINGS *aSettings, BASE_SCREEN *aScreen, double aMils2Iu, const wxString &aFilename, const wxString &aSheetLayer=wxEmptyString)
Prints the drawing-sheet (frame and title block).
virtual const wxPoint & GetGridOrigin() const =0
Return the absolute coordinates of the origin of the snap grid.
virtual COLOR4D GetGridColor()
virtual void ClearMsgPanel()
Clear all messages from the message panel.
virtual void ReCreateOptToolbar()=0
virtual void HardRedraw()
Rebuild the GAL and redraws the screen.
virtual void Refresh(bool aEraseBackground=true, const wxRect *aRect=NULL) override
Update the board display after modifying it by a python script (note: it is automatically called by a...
COLOR_SETTINGS * m_colorSettings
The current canvas type.
const wxString GetZoomLevelIndicator() const
Return a human readable value for display in dialogs.
wxSocketServer * m_socketServer
void SetCanvas(EDA_DRAW_PANEL_GAL *aPanel)
EDA_DRAW_PANEL_GAL::GAL_TYPE loadCanvasTypeSetting()
Returns the canvas type stored in the application settings.
void OnSockRequest(wxSocketEvent &evt)
virtual void OnPageSettingsChange()
Called when modifying the page settings.
virtual void ReCreateHToolbar()=0
void OnSelectGrid(wxCommandEvent &event)
Command event handler for selecting grid sizes.
bool GetShowPolarCoords() const
For those frames that support polar coordinates.
virtual void SwitchCanvas(EDA_DRAW_PANEL_GAL::GAL_TYPE aCanvasType)
Changes the current rendering backend.
KIGFX::GAL_DISPLAY_OPTIONS m_galDisplayOptions
Default display origin transforms object.
void setupUnits(APP_SETTINGS_BASE *aCfg)
wxArrayString & GetFindHistoryList()
A base class for most all the KiCad significant classes used in schematics and boards.
virtual void ReCreateAuxiliaryToolbar()
wxFindReplaceData * m_findReplaceData
ORIGIN_TRANSFORMS m_originTransforms
Color settings are a bit different than most of the settings objects in that there can be more than o...
virtual COLOR4D GetDrawBgColor() const
void OnGridSettings(wxCommandEvent &event)
void UpdateStatusBar() override
Update the status bar information.
void CreateServer(int service, bool local=true)
virtual COLOR_SETTINGS * GetColorSettings() const
Returns a pointer to the active color theme settings.
void SetShowPageLimits(bool aShow)
void OnUpdateSelectZoom(wxUpdateUIEvent &aEvent)
Update the checked item in the zoom combobox.
bool saveCanvasTypeSetting(EDA_DRAW_PANEL_GAL::GAL_TYPE aCanvasType)
Stores the canvas type in the application settings.
void LoadSettings(APP_SETTINGS_BASE *aCfg) override
Load common frame parameters from a configuration file.
virtual void SetGridOrigin(const wxPoint &aPosition)=0
virtual void DisplayGridMsg()
Display current grid size in the status bar.
void FocusOnLocation(const wxPoint &aPos)
Useful to focus on a particular location, in find functions.
void ToggleUserUnits() override
virtual BASE_SCREEN * GetScreen() const
Return a pointer to a BASE_SCREEN or one of its derivatives.
virtual void SetGridVisibility(bool aVisible)
void GetUnitPair(EDA_UNITS &aPrimaryUnit, EDA_UNITS &aSecondaryUnits)
Get the pair or units in current use.
long m_firstRunDialogSetting
wxWindow * GetToolCanvas() const override
Canvas access.
virtual void OnSelectZoom(wxCommandEvent &event)
Set the zoom factor when selected by the zoom list box in the main tool bar.
bool LockFile(const wxString &aFileName)
Mark a schematic file as being in use.
void DisplayToolMsg(const wxString &msg) override
virtual void UpdateMsgPanel()
Redraw the message panel.
void AppendMsgPanel(const wxString &aTextUpper, const wxString &aTextLower, int aPadding=6)
Append a message to the message panel.
virtual wxString GetScreenDesc() const
A color representation with 4 components: red, green, blue, alpha.
ACTION_TOOLBAR * m_drawToolBar