KiCad PCB EDA Suite
Loading...
Searching...
No Matches
eda_draw_frame.h
Go to the documentation of this file.
1/*
2 * This program source code file is part of KiCad, a free EDA CAD application.
3 *
4 * Copyright (C) 2009 Jean-Pierre Charras, [email protected]
5 * Copyright (C) 2011 Wayne Stambaugh <[email protected]>
6 * Copyright The KiCad Developers, see AUTHORS.txt for contributors.
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 2
11 * of the License, or (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see <https://www.gnu.org/licenses/>.
20 */
21
22#ifndef DRAW_FRAME_H_
23#define DRAW_FRAME_H_
24
26#include <eda_base_frame.h>
27#include <kiway_player.h>
30#include <gal/color4d.h>
32#include <kiid.h>
33#include <hotkeys_basic.h>
34#include <lib_id.h>
35#include <tool/arc_draw_mode.h>
36
37#include <set>
38
39struct EDA_SEARCH_DATA;
40struct PLUGIN_ACTION;
41class LIB_TREE;
42class EDA_ITEM;
43class ACTION_TOOLBAR;
44class GRID_HELPER;
45class COLOR_SETTINGS;
46class LOCKFILE;
47class TOOL_MENU;
49class wxFindReplaceData;
50class SEARCH_PANE;
54class GIT_COMMIT_PANE;
55enum class BITMAP_TYPE;
57
58namespace KIGFX
59{
61 class RENDER_SETTINGS;
62}
63
64using KIGFX::COLOR4D;
66
67#define LIB_EDIT_FRAME_NAME wxT( "LibeditFrame" )
68#define LIB_VIEW_FRAME_NAME wxT( "ViewlibFrame" )
69#define SCH_EDIT_FRAME_NAME wxT( "SchematicFrame" )
70#define SYMBOL_CHOOSER_FRAME_NAME wxT( "SymbolChooserFrame" )
71#define PL_EDITOR_FRAME_NAME wxT( "PlEditorFrame" )
72#define FOOTPRINT_WIZARD_FRAME_NAME wxT( "FootprintWizard" )
73#define FOOTPRINT_CHOOSER_FRAME_NAME wxT( "FootprintChooserFrame" )
74#define FOOTPRINT_EDIT_FRAME_NAME wxT( "ModEditFrame" )
75#define FOOTPRINT_VIEWER_FRAME_NAME wxT( "ModViewFrame" )
76#define PCB_EDIT_FRAME_NAME wxT( "PcbFrame" )
77
78
86{
87public:
88 EDA_DRAW_FRAME( KIWAY* aKiway, wxWindow* aParent, FRAME_T aFrameType, const wxString& aTitle,
89 const wxPoint& aPos, const wxSize& aSize, long aStyle,
90 const wxString& aFrameName, const EDA_IU_SCALE& aIuScale );
91
93
102 bool LockFile( const wxString& aFileName );
103
107 void ReleaseFile();
108
110 wxArrayString& GetFindHistoryList() { return m_findStringHistoryList; }
112
113 virtual void SetPageSettings( const PAGE_INFO& aPageSettings ) = 0;
114 virtual const PAGE_INFO& GetPageSettings() const = 0;
115
120 virtual const VECTOR2I GetPageSizeIU() const = 0;
121
125 bool GetShowPolarCoords() const { return m_polarCoords; }
126 void SetShowPolarCoords( bool aShow ) { m_polarCoords = aShow; }
127
128 void ToggleUserUnits() override;
129
136 void GetUnitPair( EDA_UNITS& aPrimaryUnit, EDA_UNITS& aSecondaryUnits ) override;
137
144 virtual const VECTOR2I& GetGridOrigin() const = 0;
145 virtual void SetGridOrigin( const VECTOR2I& aPosition ) = 0;
146
147 virtual std::unique_ptr<GRID_HELPER> MakeGridHelper();
148
155 VECTOR2I GetNearestGridPosition( const VECTOR2I& aPosition ) const;
156
166 VECTOR2I GetNearestHalfGridPosition( const VECTOR2I& aPosition ) const;
167
168 virtual const TITLE_BLOCK& GetTitleBlock() const = 0;
169 virtual void SetTitleBlock( const TITLE_BLOCK& aTitleBlock ) = 0;
170
171 // the background color of the draw canvas:
172 // Virtual because some frames can have a specific way to get/set the bg color
173 virtual COLOR4D GetDrawBgColor() const { return m_drawBgColor; }
174 virtual void SetDrawBgColor( const COLOR4D& aColor) { m_drawBgColor= aColor ; }
175
177 virtual COLOR_SETTINGS* GetColorSettings( bool aForceRefresh = false ) const;
178
190 bool LibraryFileBrowser( const wxString& aTitle, bool doOpen, wxFileName& aFilename,
191 const wxString& wildcard, const wxString& ext, bool isDirectory,
192 FILEDLG_HOOK_NEW_LIBRARY* aFileDlgHook = nullptr );
193
194 void CommonSettingsChanged( int aFlags ) override;
195
196 virtual wxString GetScreenDesc() const;
197 virtual wxString GetFullScreenDesc() const;
198
204 virtual BASE_SCREEN* GetScreen() const { return m_currentScreen; }
205
206 void EraseMsgBox();
207
208 // Toolbar-related functions
209 virtual void ReCreateHToolbar() { };
210 virtual void ReCreateVToolbar() { };
211 virtual void ReCreateLeftToolbar() { };
212 virtual void ReCreateAuxiliaryToolbar() { }
213
214 /*
215 * These 4 functions provide a basic way to show/hide grid and /get/set grid color.
216 *
217 * These parameters are saved in KiCad config for each main frame.
218 */
219 bool IsGridVisible();
220 virtual void SetGridVisibility( bool aVisible );
221
222 bool IsGridOverridden();
223 virtual void SetGridOverrides( bool aOverride );
224
225 virtual COLOR4D GetGridColor() { return m_gridColor; }
226 virtual void SetGridColor( const COLOR4D& aColor ) { m_gridColor = aColor; }
227
237 void OnSelectGrid( wxCommandEvent& event );
238
243 void UpdateGridSelectBox();
244
248 void OnUpdateSelectGrid( wxUpdateUIEvent& aEvent );
249
253 void OnUpdateSelectZoom( wxUpdateUIEvent& aEvent );
254
258 void SyncZoomSelectBox();
259
264 void UpdateZoomSelectBox();
265
269 const wxString GetZoomLevelIndicator() const;
270
278 virtual void OnSelectZoom( wxCommandEvent& event );
279
283 virtual void OnSize( wxSizeEvent& event ) override;
284
285 void OnMove( wxMoveEvent& aEvent ) override;
286
290 virtual void HardRedraw();
291
296 virtual void Zoom_Automatique( bool aWarpPointer );
297
307 void FocusOnLocation( const VECTOR2I& aPos, bool aAllowScroll = true );
308
315 virtual void FocusOnItem( EDA_ITEM* aItem, bool aAllowScroll = true ) {}
316
317 virtual void ClearFocus() { FocusOnItem( nullptr ); }
318
323 void AddStandardSubMenus( TOOL_MENU& aMenu );
324
335 void PrintDrawingSheet( const RENDER_SETTINGS* aSettings, BASE_SCREEN* aScreen,
336 const std::map<wxString, wxString>* aProperties, double aMils2Iu,
337 const wxString& aFilename,
338 const wxString& aSheetLayer = wxEmptyString );
339
340 void DisplayToolMsg( const wxString& msg ) override;
341
342 void DisplayConstraintsMsg( const wxString& msg );
343
350 virtual void OnPageSettingsChange() {}
351
356 wxStatusBar* OnCreateStatusBar( int number, long style, wxWindowID id,
357 const wxString& name ) override;
358
366 void UpdateStatusBar() override;
367
371 void DisplayUnitsMsg();
372
376 virtual void DisplayGridMsg();
377
378 bool GetOverrideLocks() const;
379
380 void LoadSettings( APP_SETTINGS_BASE* aCfg ) override;
381 void SaveSettings( APP_SETTINGS_BASE* aCfg ) override;
382
393 void AppendMsgPanel( const wxString& aTextUpper, const wxString& aTextLower, int aPadding = 6 );
394
398 virtual void ClearMsgPanel();
399
405 void SetMsgPanel( const std::vector< MSG_PANEL_ITEM >& aList );
406 void SetMsgPanel( EDA_ITEM* aItem );
407
415 void SetMsgPanel( const wxString& aTextUpper, const wxString& aTextLower, int aPadding = 6 );
416
420 virtual void UpdateMsgPanel();
421
422 virtual LIB_TREE* GetLibTree() const { return nullptr; }
423 virtual LIB_ID GetTargetLibId() const { return LIB_ID(); }
424
425 virtual bool IsLibraryTreeShown() const { return false; }
426 virtual void ToggleLibraryTree() {};
427 virtual void FocusLibraryTreeInput() {};
428
430
431 virtual void UpdateProperties();
432
433 virtual void ToggleProperties() {}
434
435 static const wxString PropertiesPaneName() { return wxS( "PropertiesManager" ); }
436
437 static const wxString NetInspectorPanelName() { return wxS( "NetInspector" ); }
438
439
440 void ToggleGitCommitPane();
441
446
448
449 static const wxString DesignBlocksPaneName() { return wxS( "DesignBlocks" ); }
450
451 static const wxString RemoteSymbolPaneName() { return wxS( "RemoteSymbol" ); }
452
453 static const wxString AppearancePanelName() { return wxS( "LayersManager" ); }
454
458 virtual EDA_ITEM* ResolveItem( const KIID& aId, bool aAllowNullptrReturn = false ) const
459 {
460 return nullptr;
461 }
462
466 virtual void ActivateGalCanvas();
467
471 virtual void SwitchCanvas( EDA_DRAW_PANEL_GAL::GAL_TYPE aCanvasType );
472
476 static void SetCanvasFailed( EDA_DRAW_PANEL_GAL::GAL_TYPE aCanvas ) { m_failedCanvases.insert( aCanvas ); }
477
478 static bool CanvasFailed( EDA_DRAW_PANEL_GAL::GAL_TYPE aCanvas ) { return m_failedCanvases.contains( aCanvas ); }
479
485 virtual EDA_DRAW_PANEL_GAL* GetCanvas() const { return m_canvas; }
486 void SetCanvas( EDA_DRAW_PANEL_GAL* aPanel ) { m_canvas = aPanel; }
487
488 wxWindow* GetToolCanvas() const override { return GetCanvas(); }
489
490 void ClearToolbarControl( int aId ) override;
491
496
497 void RefreshCanvas() override
498 {
499 GetCanvas()->Refresh();
500 }
501
514 virtual const BOX2I GetDocumentExtents( bool aIncludeAllVisible = true ) const;
515
519 void ShowChangedLanguage() override;
520
522
523 virtual void CreateHotkeyPopup();
524
525
533 bool SaveCanvasImageToFile( const wxString& aFileName, BITMAP_TYPE aBitmapType );
534
538 virtual void OnApiPluginInvoke( wxCommandEvent& aEvent );
539
541
542 static bool IsPluginActionButtonVisible( const PLUGIN_ACTION& aAction,
543 APP_SETTINGS_BASE* aCfg );
544
554 static std::vector<const PLUGIN_ACTION*> GetOrderedPluginActions( PLUGIN_ACTION_SCOPE aScope,
555 APP_SETTINGS_BASE* aCfg );
556
563 size_t AddApiPluginMenuItems( ACTION_MENU* aMenu );
564
570 virtual void AddApiPluginTools( ACTION_TOOLBAR* aToolbar );
571
572 DECLARE_EVENT_TABLE()
573
574protected:
575 void configureToolbars() override;
576
577 virtual void SetScreen( BASE_SCREEN* aScreen ) { m_currentScreen = aScreen; }
578
579 void unitsChangeRefresh() override;
580
581 void setupUIConditions() override;
582
584 virtual const TOOL_ACTION* drawArcAction( ARC_DRAW_MODE aMode ) const { return nullptr; }
585
592 void setArcModeConditions( const TOOL_ACTION& aDrawArc, const std::function<bool( const SELECTION& )>& aEnable );
593
594 void syncToolbarSelections() override;
595
596 void setupUnits( APP_SETTINGS_BASE* aCfg );
597
599
600 std::vector<wxWindow*> findDialogs();
601
605 virtual void resolveCanvasType();
606
611
616
620 virtual void handleActivateEvent( wxActivateEvent& aEvent );
621 void onActivate( wxActivateEvent& aEvent );
622
623 wxSocketServer* m_socketServer;
624
626 std::unique_ptr<LOCKFILE> m_file_checker;
627
628 COLOR4D m_gridColor; // Grid color
629 COLOR4D m_drawBgColor; // The background color of the draw canvas; BLACK for
630 // Pcbnew, BLACK or WHITE for Eeschema
631 int m_undoRedoCountMax; // Default Undo/Redo command Max depth, to be handed
632 // to screens
633 bool m_polarCoords; // For those frames that support polar coordinates
634
635 // Show the drawing sheet (border & title block).
637
640 int m_zoomCustomEntry; // index of the non-preset zoom entry, or wxNOT_FOUND
641 wxCheckBox* m_overrideLocksCb;
642
643 std::unique_ptr<EDA_SEARCH_DATA> m_findReplaceData;
646
649
655
657
660
662 static std::set<EDA_DRAW_PANEL_GAL::GAL_TYPE> m_failedCanvases;
663
664private:
667
670
672};
673
674#endif // DRAW_FRAME_H_
const char * name
ARC_DRAW_MODE
Construction sequence used when interactively drawing a circular arc.
BITMAP_TYPE
BOX2< VECTOR2I > BOX2I
Definition box2.h:914
Define the structure of a menu based on ACTIONs.
Definition action_menu.h:43
Define the structure of a toolbar with buttons that invoke ACTIONs.
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 ...)
Definition base_screen.h:37
Color settings are a bit different than most of the settings objects in that there can be more than o...
virtual const BOX2I GetDocumentExtents(bool aIncludeAllVisible=true) const
Return bounding box of document with option to not include some items.
wxCheckBox * m_overrideLocksCb
wxArrayString m_replaceStringHistoryList
virtual void ClearMsgPanel()
Clear all messages from the message panel.
static std::vector< const PLUGIN_ACTION * > GetOrderedPluginActions(PLUGIN_ACTION_SCOPE aScope, APP_SETTINGS_BASE *aCfg)
Return ordered list of plugin actions for display in the toolbar.
virtual void ReCreateVToolbar()
void configureToolbars() override
HOTKEY_CYCLE_POPUP * GetHotkeyPopup()
EDA_DRAW_PANEL_GAL * m_canvas
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.
static bool CanvasFailed(EDA_DRAW_PANEL_GAL::GAL_TYPE aCanvas)
GIT_COMMIT_PANE * m_gitCommitPane
GAL_DISPLAY_OPTIONS_IMPL m_galDisplayOptions
This the frame's interface to setting GAL display options.
virtual const TITLE_BLOCK & GetTitleBlock() const =0
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.
static const wxString AppearancePanelName()
EDA_DRAW_PANEL_GAL::GAL_TYPE m_canvasType
The current canvas type.
virtual BASE_SCREEN * GetScreen() const
Return a pointer to a BASE_SCREEN or one of its derivatives.
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
Prevents opening same file multiple times.
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()
void setArcModeConditions(const TOOL_ACTION &aDrawArc, const std::function< bool(const SELECTION &)> &aEnable)
Check each arc mode's tool action while the arc tool runs in that mode.
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
virtual bool IsLibraryTreeShown() 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)
Change the current rendering backend.
virtual EDA_ITEM * ResolveItem(const KIID &aId, bool aAllowNullptrReturn=false) const
Fetch an item by KIID.
virtual void OnSize(wxSizeEvent &event) override
Recalculate the size of toolbars and display panel when the frame size changes.
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.
wxArrayString & GetReplaceHistoryList()
virtual void resolveCanvasType()
Determine the canvas type to load (with prompt if required) and initializes m_canvasType.
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()
void SyncZoomSelectBox()
Show the current zoom in the zoom wxchoice, as a preset or as its own entry.
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)
virtual void SetScreen(BASE_SCREEN *aScreen)
void RefreshGitCommitPane()
Attach the git session if needed and refresh the version-control pane, when it is shown.
virtual void ReCreateHToolbar()
bool saveCanvasTypeSetting(EDA_DRAW_PANEL_GAL::GAL_TYPE aCanvasType)
Store the canvas type in the application settings.
virtual const TOOL_ACTION * drawArcAction(ARC_DRAW_MODE aMode) const
The action that starts the arc tool in aMode, or nullptr in a frame without an arc tool.
EDA_DRAW_FRAME(KIWAY *aKiway, wxWindow *aParent, FRAME_T aFrameType, const wxString &aTitle, const wxPoint &aPos, const wxSize &aSize, long aStyle, const wxString &aFrameName, const EDA_IU_SCALE &aIuScale)
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
bool LibraryFileBrowser(const wxString &aTitle, bool doOpen, wxFileName &aFilename, const wxString &wildcard, const wxString &ext, bool isDirectory, FILEDLG_HOOK_NEW_LIBRARY *aFileDlgHook=nullptr)
virtual void SetGridVisibility(bool aVisible)
virtual void handleActivateEvent(wxActivateEvent &aEvent)
Handle a window activation event.
virtual void AddApiPluginTools(ACTION_TOOLBAR *aToolbar)
Append actions from API plugins to the given toolbar.
static const wxString RemoteSymbolPaneName()
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.
wxStatusBar * OnCreateStatusBar(int number, long style, wxWindowID id, const wxString &name) override
Create the status line (like a wxStatusBar).
virtual COLOR_SETTINGS * GetColorSettings(bool aForceRefresh=false) const
Returns a pointer to the active color theme settings.
void ToggleUserUnits() override
void FocusOnLocation(const VECTOR2I &aPos, bool aAllowScroll=true)
Useful to focus on a particular location, in find functions.
virtual void ReCreateLeftToolbar()
static const wxString NetInspectorPanelName()
virtual void CreateHotkeyPopup()
void UpdateStatusBar() override
Update the status bar information.
void syncToolbarSelections() override
Called after the toolbars are rebuilt so a frame can select the group entries that reflect its saved ...
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.
static void SetCanvasFailed(EDA_DRAW_PANEL_GAL::GAL_TYPE aCanvas)
Keep every frame off a canvas for this session without changing the saved preference.
void PrintDrawingSheet(const RENDER_SETTINGS *aSettings, BASE_SCREEN *aScreen, const std::map< wxString, wxString > *aProperties, double aMils2Iu, const wxString &aFilename, const wxString &aSheetLayer=wxEmptyString)
Print 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.
virtual void ClearFocus()
wxSocketServer * m_socketServer
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
std::vector< wxWindow * > findDialogs()
virtual void DisplayGridMsg()
Display current grid size in the status bar.
EDA_DRAW_PANEL_GAL::GAL_TYPE loadCanvasTypeSetting()
Return the canvas type stored in the application settings.
void setupUIConditions() override
Setup the UI conditions for the various actions and their controls in this frame.
virtual void SetGridColor(const COLOR4D &aColor)
wxArrayString m_findStringHistoryList
virtual void FocusOnItem(EDA_ITEM *aItem, bool aAllowScroll=true)
Focus on a particular canvas item.
static std::set< EDA_DRAW_PANEL_GAL::GAL_TYPE > m_failedCanvases
The canvases that have failed in any EDA_DRAW_FRAME this session.
virtual LIB_ID GetTargetLibId() const
wxChoice * m_zoomSelectBox
PROPERTIES_PANEL * GetPropertiesPanel()
static const wxString DesignBlocksPaneName()
size_t AddApiPluginMenuItems(ACTION_MENU *aMenu)
Append actions from API plugins to the given menu.
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 CommonSettingsChanged(int aFlags) override
Notification event that some of the common (suite-wide) settings have changed.
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
bool m_showBorderAndTitleBlock
VECTOR2I GetNearestHalfGridPosition(const VECTOR2I &aPosition) const
Return the nearest aGridSize / 2 location to aPosition.
void ClearToolbarControl(int aId) override
bool GetOverrideLocks() const
HOTKEY_CYCLE_POPUP * m_hotkeyPopup
virtual void UpdateProperties()
void OnUpdateSelectGrid(wxUpdateUIEvent &aEvent)
Update the checked item in the grid wxchoice.
virtual void ToggleProperties()
bool GetShowPolarCoords() const
For those frames that support polar coordinates.
static bool IsPluginActionButtonVisible(const PLUGIN_ACTION &aAction, APP_SETTINGS_BASE *aCfg)
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.
Definition eda_item.h:98
A panel to display various information messages.
Definition msgpanel.h:97
Docked panel for committing: the branch to commit to, a summary and description, the commit options,...
Similar to EDA_VIEW_SWITCHER, this dialog is a popup that shows feedback when using a hotkey to cycle...
A color representation with 4 components: red, green, blue, alpha.
Definition color4d.h:101
Container for all the knowledge about how graphical objects are drawn on any output surface/device.
Definition kiid.h:46
KIWAY_PLAYER(KIWAY *aKiway, wxWindow *aParent, FRAME_T aFrameType, const wxString &aTitle, const wxPoint &aPos, const wxSize &aSize, long aStyle, const wxString &aFrameName, const EDA_IU_SCALE &aIuScale)
A minimalistic software bus for communications between various DLLs/DSOs (DSOs) within the same KiCad...
Definition kiway.h:348
A logical library item identifier and consists of various portions much like a URI.
Definition lib_id.h:45
Widget displaying a tree of symbols with optional search text control and description panel.
Definition lib_tree.h:44
Advisory lock over a file, taken by writing a sibling lock file and holding an exclusive lock on it f...
Definition lockfile.h:54
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.
Definition page_info.h:75
Hold the information shown in the lower right corner of a plot, printout, or editing view.
Definition title_block.h:38
Represent a single user action.
Manage a CONDITIONAL_MENU and some number of CONTEXT_MENUs as sub-menus.
Definition tool_menu.h:39
Base window classes and related definitions.
EDA_UNITS
Definition eda_units.h:44
FRAME_T
The set of EDA_BASE_FRAME derivatives, typically stored in EDA_BASE_FRAME::m_Ident.
Definition frame_type.h:29
The Cairo implementation of the graphics abstraction layer.
Definition eda_group.h:30
PLUGIN_ACTION_SCOPE
An action performed by a plugin via the IPC API.
Definition api_plugin.h:74
VECTOR2< int32_t > VECTOR2I
Definition vector2d.h:708