KiCad PCB EDA Suite
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, jaen-pierre.charras@gipsa-lab.inpg.com
5  * Copyright (C) 2011 Wayne Stambaugh <stambaughw@gmail.com>
6  * Copyright (C) 1992-2017 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, you may find one here:
20  * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
21  * or you may search the http://www.gnu.org website for the version 2 license,
22  * or you may write to the Free Software Foundation, Inc.,
23  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
24  */
25 
26 #ifndef DRAW_FRAME_H_
27 #define DRAW_FRAME_H_
28 
29 #include <eda_base_frame.h>
30 #include <kiway_player.h>
31 #include <climits>
33 #include <gal/color4d.h>
34 #include <class_draw_panel_gal.h>
35 #include "hotkeys_basic.h"
36 
37 class wxSingleInstanceChecker;
38 class EDA_HOTKEY;
39 
40 using KIGFX::COLOR4D;
41 
42 namespace KIGFX
43 {
44  class GAL_DISPLAY_OPTIONS;
45 }
46 
47 #define DEFAULT_MAX_UNDO_ITEMS 0
48 #define ABS_MAX_UNDO_ITEMS (INT_MAX / 2)
49 
56 {
59  friend class EDA_DRAW_PANEL;
60 
62  int m_toolId;
63 
65 
66  bool m_snapToGrid;
68 
70 
72  std::unique_ptr<KIGFX::GAL_DISPLAY_OPTIONS> m_galDisplayOptions;
73 
74 protected:
75 
76  wxSocketServer* m_socketServer;
77  std::vector<wxSocketBase*> m_sockets;
78 
79  std::unique_ptr<wxSingleInstanceChecker> m_file_checker;
80 
82 
83  int m_LastGridSizeId; // the command id offset (>= 0) of the last selected grid
84  // 0 is for the grid corresponding to
85  // a wxCommand ID = ID_POPUP_GRID_LEVEL_1000.
86  bool m_drawGrid; // hide/Show grid
90  double m_zoomLevelCoeff;
92  // to a zoom level value which rougly gives 1.0 when the board/schematic
93  // is at scale = 1
95  // to screens
96 
99 
103 
106 
109 
112 
116 
119 
122 
124  wxChoice* m_gridSelectBox;
125 
127  wxChoice* m_zoomSelectBox;
128 
131  wxAuiToolBar* m_auxiliaryToolBar;
132 
135  wxAuiToolBar* m_drawToolBar;
136 
138  wxAuiToolBar* m_optionsToolBar;
139 
142 
144 
145 #ifdef USE_WX_OVERLAY
146  // MAC Uses overlay to workaround the wxINVERT and wxXOR miss
147  wxOverlay m_overlay;
148 #endif
149 
152 
155 
158 
159  void SetScreen( BASE_SCREEN* aScreen ) { m_currentScreen = aScreen; }
160 
161  double bestZoom( double sizeX, double sizeY, double scaleFactor, wxPoint centre );
162 
170  virtual void unitsChangeRefresh();
171 
181  bool GeneralControlKeyMovement( int aHotKey, wxPoint *aPos, bool aSnapToGrid );
182 
186  void RefreshCrossHair( const wxPoint &aOldPos, const wxPoint &aEvtPos, wxDC* aDC );
187 
191  bool isBusy() const;
192 
196  EDA_DRAW_PANEL_GAL::GAL_TYPE loadCanvasTypeSetting() const;
197 
201  bool saveCanvasTypeSetting( EDA_DRAW_PANEL_GAL::GAL_TYPE aCanvasType );
202 
204  static const wxChar CANVAS_TYPE_KEY[];
205 
206 public:
207  EDA_DRAW_FRAME( KIWAY* aKiway, wxWindow* aParent,
208  FRAME_T aFrameType,
209  const wxString& aTitle,
210  const wxPoint& aPos, const wxSize& aSize,
211  long aStyle,
212  const wxString& aFrameName );
213 
214  ~EDA_DRAW_FRAME();
215 
222  virtual void OnCharHook( wxKeyEvent& event );
223 
230  bool LockFile( const wxString& aFileName );
231 
236  void ReleaseFile();
237 
238  virtual void SetPageSettings( const PAGE_INFO& aPageSettings ) = 0;
239  virtual const PAGE_INFO& GetPageSettings() const = 0;
240 
246  virtual const wxSize GetPageSizeIU() const = 0;
247 
252  virtual const wxPoint& GetAuxOrigin() const = 0;
253  virtual void SetAuxOrigin( const wxPoint& aPosition ) = 0;
254 
261  virtual const wxPoint& GetGridOrigin() const = 0;
262  virtual void SetGridOrigin( const wxPoint& aPosition ) = 0;
263 
264  //-----<BASE_SCREEN API moved here>------------------------------------------
271  wxPoint GetCrossHairPosition( bool aInvertY = false ) const;
272 
281  void SetCrossHairPosition( const wxPoint& aPosition, bool aSnapToGrid = true );
282 
291  wxPoint GetCursorPosition( bool aOnGrid, wxRealPoint* aGridSize = NULL ) const;
292 
301  wxPoint GetNearestGridPosition( const wxPoint& aPosition, wxRealPoint* aGridSize = NULL ) const;
302 
308  wxPoint GetCrossHairScreenPosition() const;
309 
310  void SetMousePosition( const wxPoint& aPosition );
311 
322  wxPoint RefPos( bool useMouse ) const;
323 
324  const wxPoint& GetScrollCenterPosition() const;
325  void SetScrollCenterPosition( const wxPoint& aPoint );
326 
327  //-----</BASE_SCREEN API moved here>-----------------------------------------
328 
329 
330  virtual const TITLE_BLOCK& GetTitleBlock() const = 0;
331  virtual void SetTitleBlock( const TITLE_BLOCK& aTitleBlock ) = 0;
332 
333  // the background color of the draw canvas:
334  // Virtual because some frames can have a specific way to get/set the bg color
338  virtual COLOR4D GetDrawBgColor() const { return m_drawBgColor; }
339 
343  virtual void SetDrawBgColor( COLOR4D aColor) { m_drawBgColor= aColor ; }
344 
345  bool GetShowBorderAndTitleBlock() const { return m_showBorderAndTitleBlock; }
346 
347  void SetShowBorderAndTitleBlock( bool aShow ) { m_showBorderAndTitleBlock = aShow; }
348  bool ShowPageLimits() const { return m_showPageLimits; }
349  void SetShowPageLimits( bool aShow ) { m_showPageLimits = aShow; }
350 
351  EDA_DRAW_PANEL* GetCanvas() { return m_canvas; }
352 
353  virtual wxString GetScreenDesc() const;
354 
361  virtual BASE_SCREEN* GetScreen() const { return m_currentScreen; }
362 
372  virtual void ExecuteRemoteCommand( const char* cmdline ){}
373 
374  void OnMenuOpen( wxMenuEvent& event );
375  void OnMouseEvent( wxMouseEvent& event );
376 
388  void SkipNextLeftButtonReleaseEvent();
389 
391  int WriteHotkeyConfig( struct EDA_HOTKEY_CONFIG* aDescList, wxString* aFullFileName = NULL ) override;
392 
397  EDA_HOTKEY_CONFIG* GetHotkeyConfig() const { return m_hotkeysDescrList; }
398 
406  virtual EDA_HOTKEY* GetHotKeyDescription( int aCommand ) const = 0;
407 
408  virtual bool OnHotKey( wxDC* aDC, int aHotKey, const wxPoint& aPosition,
409  EDA_ITEM* aItem = NULL );
410 
417  virtual void AddMenuZoomAndGrid( wxMenu* aMasterMenu );
418 
428  virtual const wxString GetZoomLevelIndicator() const;
429 
434  inline double GetZoomLevelCoeff() const { return m_zoomLevelCoeff; }
435 
436  void EraseMsgBox();
437  void Process_PageSettings( wxCommandEvent& event );
438 
439  virtual void ReCreateHToolbar() = 0;
440  virtual void ReCreateVToolbar() = 0;
441  virtual void ReCreateMenuBar() override;
442  virtual void ReCreateAuxiliaryToolbar();
443 
444  // Toolbar accessors
445  wxAuiToolBar* GetMainToolBar() const { return m_mainToolBar; }
446  wxAuiToolBar* GetOptionsToolBar() const { return m_optionsToolBar; }
447  wxAuiToolBar* GetDrawToolBar() const { return m_drawToolBar; }
448  wxAuiToolBar* GetAuxiliaryToolBar() const { return m_auxiliaryToolBar; }
449 
456  bool GetToolToggled( int aToolId );
457 
462  wxAuiToolBarItem* GetToolbarTool( int aToolId );
463 
476  virtual void SetToolID( int aId, int aCursor, const wxString& aToolMsg );
477 
481  virtual void SetNoToolSelected();
482 
488  int GetToolId() const { return m_toolId; }
489 
490  /* These 4 functions provide a basic way to show/hide grid
491  * and /get/set grid color.
492  * These parameters are saved in KiCad config for each main frame
493  */
498  virtual bool IsGridVisible() const
499  {
500  return m_drawGrid;
501  }
502 
508  virtual void SetGridVisibility( bool aVisible )
509  {
510  m_drawGrid = aVisible;
511  }
512 
518  {
519  return m_gridColor;
520  }
521 
526  virtual void SetGridColor( COLOR4D aColor )
527  {
528  m_gridColor = aColor;
529  }
530 
539  wxPoint GetGridPosition( const wxPoint& aPosition ) const;
540 
545  virtual void SetNextGrid();
546 
551  virtual void SetPrevGrid();
552 
558  void SetPresetGrid( int aIndex );
559 
570  virtual void OnSelectGrid( wxCommandEvent& event );
571 
579  virtual void OnSelectZoom( wxCommandEvent& event );
580 
581  // Command event handlers shared by all applications derived from EDA_DRAW_FRAME.
582  void OnToggleGridState( wxCommandEvent& aEvent );
583  void OnSelectUnits( wxCommandEvent& aEvent );
584  void OnToggleCrossHairStyle( wxCommandEvent& aEvent );
585 
586  // Update user interface event handlers shared by all applications derived from
587  // EDA_DRAW_FRAME.
588  void OnUpdateUndo( wxUpdateUIEvent& aEvent );
589  void OnUpdateRedo( wxUpdateUIEvent& aEvent );
590  void OnUpdateGrid( wxUpdateUIEvent& aEvent );
591  void OnUpdateUnits( wxUpdateUIEvent& aEvent );
592  void OnUpdateCrossHairStyle( wxUpdateUIEvent& aEvent );
593 
606  virtual bool GeneralControl( wxDC* aDC, const wxPoint& aPosition, EDA_KEY aHotKey = 0 )
607  {
608  return false;
609  }
610 
615  virtual void OnSize( wxSizeEvent& event );
616 
617  void OnEraseBackground( wxEraseEvent& SizeEvent );
618 
619  virtual void OnZoom( wxCommandEvent& event );
620 
625  void SetNextZoom();
626 
631  void SetPrevZoom();
632 
638  void SetPresetZoom( int aIndex );
639 
647  void RedrawScreen( const wxPoint& aCenterPoint, bool aWarpPointer );
648 
654  void RedrawScreen2( const wxPoint& posBefore );
655 
661  void Zoom_Automatique( bool aWarpPointer );
662 
663  /* Set the zoom level to show the area Rect */
664  void Window_Zoom( EDA_RECT& Rect );
665 
667  virtual double BestZoom() = 0;
668 
673  double GetZoom();
674 
685  void DrawWorkSheet( wxDC* aDC, BASE_SCREEN* aScreen, int aLineWidth,
686  double aScale, const wxString &aFilename,
687  const wxString &aSheetLayer = wxEmptyString );
688 
689  void DisplayToolMsg( const wxString& msg );
690  virtual void RedrawActiveWindow( wxDC* DC, bool EraseBg ) = 0;
691  virtual void OnLeftClick( wxDC* DC, const wxPoint& MousePos ) = 0;
692  virtual void OnLeftDClick( wxDC* DC, const wxPoint& MousePos );
693  virtual bool OnRightClick( const wxPoint& MousePos, wxMenu* PopMenu ) = 0;
694  virtual void ToolOnRightClick( wxCommandEvent& event );
695  void AdjustScrollBars( const wxPoint& aCenterPosition );
696 
703  virtual void OnActivate( wxActivateEvent& event );
704 
718  virtual void UpdateStatusBar();
719 
724  void DisplayUnitsMsg();
725 
726  /* Handlers for block commands */
727  virtual void InitBlockPasteInfos();
728 
738  virtual bool HandleBlockBegin( wxDC* aDC, EDA_KEY aKey, const wxPoint& aPosition,
739  int aExplicitCommand = 0 );
740 
750  virtual int BlockCommand( EDA_KEY aKey );
751 
759  virtual void HandleBlockPlace( wxDC* DC );
760 
771  virtual bool HandleBlockEnd( wxDC* DC );
772 
777  void CopyToClipboard( wxCommandEvent& event );
778 
779  /* interprocess communication */
780  void CreateServer( int service, bool local = true );
781  void OnSockRequest( wxSocketEvent& evt );
782  void OnSockRequestServer( wxSocketEvent& evt );
783 
784  void LoadSettings( wxConfigBase* aCfg ) override;
785 
786  void SaveSettings( wxConfigBase* aCfg ) override;
787 
800  void AppendMsgPanel( const wxString& textUpper, const wxString& textLower,
801  COLOR4D color, int pad = 6 );
802 
806  void ClearMsgPanel( void );
807 
814  void SetMsgPanel( const std::vector< MSG_PANEL_ITEM >& aList );
815 
816  void SetMsgPanel( EDA_ITEM* aItem );
817 
822  virtual void UpdateMsgPanel();
823 
831  void PushPreferences( const EDA_DRAW_PANEL* aParentCanvas );
832 
842  virtual void PrintPage( wxDC* aDC, LSET aPrintMask, bool aPrintMirrorMode, void* aData = NULL );
843 
853  wxString CoordinateToString( int aValue, bool aConvertToMils = false ) const;
854 
864  wxString LengthDoubleToString( double aValue, bool aConvertToMils = false ) const;
865 
872  virtual void UseGalCanvas( bool aEnable );
873 
879  virtual bool SwitchCanvas( EDA_DRAW_PANEL_GAL::GAL_TYPE aCanvasType );
880 
887  bool IsGalCanvasActive() const { return m_galCanvasActive; }
888 
895  EDA_DRAW_PANEL_GAL* GetGalCanvas() const { return m_galCanvas; }
896  void SetGalCanvas( EDA_DRAW_PANEL_GAL* aPanel ) { m_galCanvas = aPanel; }
897 
902  TOOL_MANAGER* GetToolManager() const { return m_toolManager; }
903 
910  virtual void* GetDisplayOptions() { return NULL; }
911 
916  KIGFX::GAL_DISPLAY_OPTIONS& GetGalDisplayOptions() { return *m_galDisplayOptions; }
917 
923  virtual void SyncMenusAndToolbars( wxEvent& aEvent ) {};
924 
925  DECLARE_EVENT_TABLE()
926 };
927 
928 #endif // DRAW_FRAME_H_
bool ShowPageLimits() const
Definition: draw_frame.h:348
TOOL_MANAGER * m_toolManager
Definition: draw_frame.h:100
wxString CoordinateToString(int aValue, bool aConvertToMils)
Function CoordinateToString is a helper to convert the integer coordinate aValue to a string in inche...
Definition: base_units.cpp:118
wxAuiToolBar * GetDrawToolBar() const
Definition: draw_frame.h:447
double GetZoom()
Definition: draw_panel.cpp:282
Class KIWAY_PLAYER is a wxFrame capable of the OpenProjectFiles function, meaning it can load a porti...
Definition: kiway_player.h:111
std::unique_ptr< KIGFX::GAL_DISPLAY_OPTIONS > m_galDisplayOptions
Definition: draw_frame.h:72
Structure EDA_HOTKEY_CONFIG contains the information required to save hot key information to a config...
Definition: hotkeys_basic.h:87
bool m_galCanvasActive
whether to use new GAL engine
Definition: draw_frame.h:67
wxAuiToolBar * GetMainToolBar() const
Definition: draw_frame.h:445
KIGFX::GAL_DISPLAY_OPTIONS & GetGalDisplayOptions()
Function GetGalDisplayOptions Returns a reference to the gal rendering options used by GAL for render...
Definition: draw_frame.h:916
Class CAIRO_GAL is the cairo implementation of the graphics abstraction layer.
Definition: class_module.h:58
bool m_showAxis
True shows the X and Y axis indicators.
Definition: draw_frame.h:108
TOOL_DISPATCHER * m_toolDispatcher
Definition: draw_frame.h:101
EDA_DRAW_PANEL * GetCanvas()
Definition: draw_frame.h:351
FRAME_T
Enum FRAME_T is the set of EDA_BASE_FRAME derivatives, typically stored in EDA_BASE_FRAME::m_Ident.
Definition: frame_type.h:34
EDA_DRAW_PANEL_GAL::GAL_TYPE m_canvasType
The current canvas type.
Definition: draw_frame.h:157
void SetScreen(BASE_SCREEN *aScreen)
Definition: draw_frame.h:159
int color
Definition: DXF_plotter.cpp:62
virtual void SyncMenusAndToolbars(wxEvent &aEvent)
Function SyncMenusAndToolbars Updates the toolbars and menus (mostly settings/check buttons/checkboxe...
Definition: draw_frame.h:923
std::vector< wxSocketBase * > m_sockets
interprocess communication
Definition: draw_frame.h:77
virtual void SetDrawBgColor(COLOR4D aColor)
Definition: draw_frame.h:343
EDA_HOTKEY_CONFIG * GetHotkeyConfig() const
Function GetHotkeyConfig() Returns a structure containing currently used hotkey mapping.
Definition: draw_frame.h:397
bool GetShowBorderAndTitleBlock() const
Definition: draw_frame.h:345
void SetGalCanvas(EDA_DRAW_PANEL_GAL *aPanel)
Definition: draw_frame.h:896
virtual void SetGridColor(COLOR4D aColor)
Function SetGridColor() , virtual.
Definition: draw_frame.h:526
class EDA_MSG_PANEL is a panel to display various information messages.
Definition: msgpanel.h:111
Class EDA_DRAW_FRAME is the base class for create windows for drawing purpose.
Definition: draw_frame.h:55
COLOR4D m_drawBgColor
the background color of the draw canvas BLACK for Pcbnew, BLACK or WHITE for eeschema ...
Definition: draw_frame.h:89
Class TITLE_BLOCK holds the information shown in the lower right corner of a plot, printout, or editing view.
Definition: title_block.h:39
wxChoice * m_gridSelectBox
Choice box to choose the grid size.
Definition: draw_frame.h:124
COLOR4D m_gridColor
Grid color.
Definition: draw_frame.h:88
std::unique_ptr< wxSingleInstanceChecker > m_file_checker
prevents opening same file multiple times.
Definition: draw_frame.h:79
double GetZoomLevelCoeff() const
Function GetZoomLevelCoeff returns the coefficient to convert internal display scale factor to zoom l...
Definition: draw_frame.h:434
void OnMouseEvent(wxMouseEvent &event)
virtual bool IsGridVisible() const
Function IsGridVisible() , virtual.
Definition: draw_frame.h:498
bool m_canvasTypeDirty
Flag indicating that drawing canvas type needs to be saved to config.
Definition: draw_frame.h:154
virtual void ExecuteRemoteCommand(const char *cmdline)
Execute a remote command send via a socket to the application, port KICAD_PCB_PORT_SERVICE_NUMBER (cu...
Definition: draw_frame.h:372
wxAuiToolBar * GetOptionsToolBar() const
Definition: draw_frame.h:446
Class TOOL_MANAGER.
Definition: tool_manager.h:49
bool m_showOriginAxis
True shows the origin axis used to indicate the coordinate offset for drill, gerber, and component position files.
Definition: draw_frame.h:115
wxAuiToolBar * m_auxiliaryToolBar
Auxiliary tool bar typically shown below the main tool bar at the top of the main window...
Definition: draw_frame.h:131
virtual BASE_SCREEN * GetScreen() const
Function GetScreen returns a pointer to a BASE_SCREEN or one of its derivatives.
Definition: draw_frame.h:361
Class LSET is a set of PCB_LAYER_IDs.
wxAuiToolBar * m_optionsToolBar
The options tool bar typcially located on the left edge of the main window.
Definition: draw_frame.h:138
BASE_SCREEN * m_currentScreen
current used SCREEN
Definition: draw_frame.h:64
virtual COLOR4D GetDrawBgColor() const
Definition: draw_frame.h:338
EDA_HOTKEY_CONFIG * m_hotkeysDescrList
Definition: draw_frame.h:81
void OnEraseBackground(wxEraseEvent &event)
EDA_MSG_PANEL * m_messagePanel
Panel used to display information at the bottom of the main window.
Definition: draw_frame.h:141
Class PAGE_INFO describes the page size and margins of a paper page on which to eventually print or p...
Definition: page_info.h:49
bool m_showBorderAndTitleBlock
True shows the drawing border and title block.
Definition: draw_frame.h:118
Class BASE_SCREEN handles how to draw a screen (a board, a schematic ...)
Definition: base_screen.h:76
wxChoice * m_zoomSelectBox
Choice box to choose the zoom value.
Definition: draw_frame.h:127
std::unique_ptr< wxSingleInstanceChecker > LockFile(const wxString &aFileName)
Function LockFile tests to see if aFileName can be locked (is not already locked) and only then retur...
Definition: lockfile.cpp:32
Base window classes and related definitions.
bool m_showGridAxis
True shows the grid axis indicators.
Definition: draw_frame.h:111
Class KIWAY is a minimalistic software bus for communications between various DLLs/DSOs (DSOs) within...
Definition: kiway.h:258
uint32_t EDA_KEY
Definition: common.h:52
wxString LengthDoubleToString(double aValue, bool aConvertToMils)
Function LengthDoubleToString is a helper to convert the double length aValue to a string in inches...
Definition: base_units.cpp:123
bool IsGalCanvasActive() const
Function IsGalCanvasActive is used to check which canvas (GAL-based or standard) is currently in use...
Definition: draw_frame.h:887
wxAuiToolBar * GetAuxiliaryToolBar() const
Definition: draw_frame.h:448
int m_UndoRedoCountMax
default Undo/Redo command Max depth, to be handed
Definition: draw_frame.h:94
int m_LastGridSizeId
Definition: draw_frame.h:83
virtual COLOR4D GetGridColor()
Function GetGridColor() , virtual.
Definition: draw_frame.h:517
wxAuiToolBar * m_drawToolBar
The tool bar that contains the buttons for quick access to the application draw tools.
Definition: draw_frame.h:135
Class TOOL_DISPATCHER.
EDA_DRAW_PANEL_GAL * m_galCanvas
GAL display options - this is the frame&#39;s interface to setting GAL display options.
Definition: draw_frame.h:69
wxSocketServer * m_socketServer
Definition: draw_frame.h:76
EDA_DRAW_PANEL * m_canvas
The area to draw on.
Definition: draw_frame.h:98
TOOL_MANAGER * GetToolManager() const
Function GetToolManager returns the tool manager instance, if any.
Definition: draw_frame.h:902
class EDA_HOTKEY is a class to handle hot key commands.
Definition: hotkeys_basic.h:57
void OnCharHook(wxKeyEvent &event)
int m_MsgFrameHeight
Definition: draw_frame.h:143
void OnActivate(wxActivateEvent &event)
Function OnActivate handles window activation events.
Definition: draw_panel.cpp:413
int GetToolId() const
Definition: draw_frame.h:488
Class EDA_RECT handles the component boundary box.
Definition: eda_rect.h:44
Class EDA_ITEM is a base class for most all the KiCad significant classes, used in schematics and boa...
Definition: base_struct.h:162
bool m_showPageLimits
true to display the page limits
Definition: draw_frame.h:87
bool OnRightClick(wxMouseEvent &event)
Function OnRightClick builds and displays a context menu on a right mouse button click.
Definition: draw_panel.cpp:899
Class ACTIONS.
Definition: actions.h:41
virtual bool GeneralControl(wxDC *aDC, const wxPoint &aPosition, EDA_KEY aHotKey=0)
Function GeneralControl performs application specific control using aDC at aPosition in logical units...
Definition: draw_frame.h:606
EDA_DRAW_PANEL_GAL * GetGalCanvas() const
Function GetGalCanvas returns a pointer to GAL-based canvas of given EDA draw frame.
Definition: draw_frame.h:895
virtual void SetGridVisibility(bool aVisible)
Function SetGridVisibility() , virtual It may be overloaded by derived classes.
Definition: draw_frame.h:508
Some functions to handle hotkeys in KiCad.
void SetShowPageLimits(bool aShow)
Definition: draw_frame.h:349
ACTIONS * m_actions
Definition: draw_frame.h:102
bool m_movingCursorWithKeyboard
One-shot to avoid a recursive mouse event during hotkey movement.
Definition: draw_frame.h:151
int m_lastDrawToolId
Tool ID of previously active draw tool bar button.
Definition: draw_frame.h:105
void SetShowBorderAndTitleBlock(bool aShow)
Definition: draw_frame.h:347
virtual void * GetDisplayOptions()
Function GetDisplayOptions A way to pass info to draw functions.
Definition: draw_frame.h:910
long m_firstRunDialogSetting
Key to control whether first run dialog is shown on startup.
Definition: draw_frame.h:121
bool m_snapToGrid
Indicates if cursor should be snapped to grid.
Definition: draw_frame.h:66
Class COLOR4D is the color representation with 4 components: red, green, blue, alpha.
Definition: color4d.h:39