43using namespace std::placeholders;
46 const wxPoint& aPosition,
const wxSize& aSize,
66 m_view->SetMirror(
false,
false );
77 m_gal->SetCursorEnabled(
false );
80 SetEvtHandlerEnabled(
true );
107 for(
int i = 0; (unsigned) i <
sizeof(
SCH_LAYER_ORDER ) /
sizeof( int ); ++i )
112 m_view->SetLayerOrder( layer, i );
124 m_view->SetLayerTarget( i, target );
151 if( IsShownOnScreen() )
constexpr EDA_IU_SCALE schIUScale
std::unique_ptr< KIGFX::PAINTER > m_painter
Contains information about how to draw items using GAL.
KIGFX::GAL * m_gal
Interface for drawing objects on a 2D-surface.
EDA_DRAW_PANEL_GAL(wxWindow *aParentWindow, wxWindowID aWindowId, const wxPoint &aPosition, const wxSize &aSize, KIGFX::GAL_DISPLAY_OPTIONS &aOptions, GAL_TYPE aGalType=GAL_TYPE_OPENGL)
Create a drawing panel that is contained inside aParentWindow.
virtual void onPaint(wxPaintEvent &WXUNUSED(aEvent))
virtual void Refresh(bool aEraseBackground=true, const wxRect *aRect=nullptr) override
KIGFX::VIEW * m_view
Stores view settings (scale, center, etc.) and items to be drawn.
KIGFX::WX_VIEW_CONTROLS * m_viewControls
Control for VIEW (moving, zooming, etc.)
void StartDrawing()
Begin drawing if it was stopped previously.
Contains methods for drawing schematic-specific items.
void UpdateAllLayersOrder()
Do everything that is needed to apply the rendering order of layers.
static constexpr int VIEW_MAX_LAYERS
Maximum number of layers that may be shown.
An implementation of class VIEW_CONTROLS for wxWidgets library.
void setDefaultLayerOrder()
Set rendering targets & dependencies for layers.
void setDefaultLayerDeps()
void OnShow() override
Called when the window is shown for the first time.
KIGFX::SCH_VIEW * view() const
Reassign layer order to the initial settings.
void Refresh(bool aEraseBackground, const wxRect *aRect) override
SCH_PREVIEW_PANEL(wxWindow *aParentWindow, wxWindowID aWindowId, const wxPoint &aPosition, const wxSize &aSize, KIGFX::GAL_DISPLAY_OPTIONS &aOptions, GAL_TYPE aGalType=GAL_TYPE_OPENGL)
~SCH_PREVIEW_PANEL() override
Called when the window is shown for the first time.
void onPaint(wxPaintEvent &WXUNUSED(aEvent)) override
SCH_RENDER_SETTINGS * GetRenderSettings() const
bool m_ShowPinsElectricalType
void LoadColors(const COLOR_SETTINGS *aSettings) override
@ LAYER_DRAWINGSHEET
Sheet frame and title block.
@ LAYER_GP_OVERLAY
General purpose overlay.
@ LAYER_SELECT_OVERLAY
Selected items overlay.
@ TARGET_NONCACHED
Auxiliary rendering target (noncached)
@ TARGET_OVERLAY
Items that may change while the view stays the same (noncached)
constexpr double SCH_WORLD_UNIT(1e-7/0.0254)
static const int SCH_LAYER_ORDER[]
COLOR_SETTINGS * GetColorSettings(const wxString &aName)
VECTOR2< double > VECTOR2D
WX_VIEW_CONTROLS class definition.
#define ZOOM_MAX_LIMIT_EESCHEMA_PREVIEW
#define ZOOM_MIN_LIMIT_EESCHEMA_PREVIEW