KiCad PCB EDA Suite
sch_draw_panel.h
Go to the documentation of this file.
1 #ifndef __SCH_DRAW_PANEL_H
2 #define __SCH_DRAW_PANEL_H
3 
4 #include <class_draw_panel_gal.h>
5 #include <base_struct.h>
6 #include <gr_basic.h>
7 #include <eda_rect.h>
8 
10 
11 
12 namespace KIGFX
13 {
14  class SCH_VIEW;
15  namespace PREVIEW
16  {
17  class SELECTION_AREA;
18  };
19 };
20 
21 class SCH_SHEET;
22 class LIB_PART;
23 class BASE_SCREEN;
24 class SCH_SCREEN;
26 class SCH_EDIT_FRAME;
27 
28 
30 {
31 public:
32  SCH_DRAW_PANEL( wxWindow* aParentWindow, wxWindowID aWindowId, const wxPoint& aPosition,
33  const wxSize& aSize, KIGFX::GAL_DISPLAY_OPTIONS& aOptions,
34  GAL_TYPE aGalType = GAL_TYPE_OPENGL );
35 
37 
38  virtual wxWindow* GetWindow() override { return this; }
39 
40  void DisplayComponent( const LIB_PART *aComponent );
41  void DisplaySheet( const SCH_SCREEN *aScreen );
42 
43  bool SwitchBackend( GAL_TYPE aGalType ) override;
44  void OnKeyEvent( wxKeyEvent& event );
45  void OnCharHook( wxKeyEvent& event );
46 
47  void SetEnableMousewheelPan( bool aEnable ) override;
48  void SetEnableZoomNoCenter( bool aEnable ) override;
49  void SetEnableAutoPan( bool aEnable ) override;
50  void SetAutoPanRequest( bool aEnable ) override;
51 
52  BASE_SCREEN* GetScreen() override;
53  virtual EDA_DRAW_FRAME* GetParent() const override;
54 
55  virtual void CrossHairOff( wxDC* DC=nullptr ) override;
56 
57  // Show the cross hair.
58  virtual void CrossHairOn( wxDC* DC=nullptr ) override;
59 
60  virtual void MoveCursorToCrossHair() override;
61 
62  KIGFX::SCH_VIEW* GetView() const { return view(); }
63 
65  void Refresh( bool aEraseBackground = true, const wxRect* aRect = NULL ) override;
66 
67 
68 protected:
69  virtual void onPaint( wxPaintEvent& WXUNUSED( aEvent ) ) override;
70 
71  KIGFX::SCH_VIEW* view() const;
72  wxWindow* m_parent;
73 
74  void setDefaultLayerOrder();
75  void setDefaultLayerDeps();
76 
77  DECLARE_EVENT_TABLE()
78 };
79 
80 #endif
void DisplaySheet(const SCH_SCREEN *aScreen)
wxWindow * m_parent
Class CAIRO_GAL is the cairo implementation of the graphics abstraction layer.
Definition: class_module.h:57
virtual EDA_DRAW_FRAME * GetParent() const override
virtual void MoveCursorToCrossHair() override
Function MoveCursorToCrossHair warps the cursor to the current cross hair position.
Schematic editor (Eeschema) main window.
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...
The base class for create windows for drawing purpose.
Definition: draw_frame.h:82
virtual void CrossHairOff(wxDC *DC=nullptr) override
void OnKeyEvent(wxKeyEvent &event)
Class BASE_SCREEN handles how to draw a screen (a board, a schematic ...)
Definition: base_screen.h:76
void SetEnableAutoPan(bool aEnable) override
KIGFX::SCH_VIEW * view() const
virtual void onPaint(wxPaintEvent &WXUNUSED(aEvent)) override
Define a library symbol object.
virtual wxWindow * GetWindow() override
virtual void CrossHairOn(wxDC *DC=nullptr) override
void setDefaultLayerDeps()
Reassigns layer order to the initial settings.
bool SwitchBackend(GAL_TYPE aGalType) override
Function SwitchBackend Switches method of rendering graphics.
void SetAutoPanRequest(bool aEnable) override
SCH_DRAW_PANEL(wxWindow *aParentWindow, wxWindowID aWindowId, const wxPoint &aPosition, const wxSize &aSize, KIGFX::GAL_DISPLAY_OPTIONS &aOptions, GAL_TYPE aGalType=GAL_TYPE_OPENGL)
KIGFX::SCH_VIEW * GetView() const
Sheet symbol placed in a schematic, and is the entry point for a sub schematic.
Definition: sch_sheet.h:201
void SetEnableZoomNoCenter(bool aEnable) override
void OnCharHook(wxKeyEvent &event)
Class COLORS_DESIGN_SETTINGS is a list of color settings for designs in Pcbnew.
BASE_SCREEN * GetScreen() override
Class SELECTION_AREA.
Basic classes for most KiCad items.
void DisplayComponent(const LIB_PART *aComponent)
void setDefaultLayerOrder()
void SetEnableMousewheelPan(bool aEnable) override