43using namespace std::placeholders;
46 const wxPoint& aPosition,
const wxSize& aSize,
80 SetEvtHandlerEnabled(
true );
107 for(
int i = 0; (unsigned) i <
sizeof(
SCH_LAYER_ORDER ) /
sizeof( int ); ++i )
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.
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.
void SetGridColor(const COLOR4D &aGridColor)
Set the grid color.
void SetCursorEnabled(bool aCursorEnabled)
Enable/disable cursor.
void SetGridSize(const VECTOR2D &aGridSize)
Set the grid size.
void SetWorldUnitLength(double aWorldUnitLength)
Set the unit length.
Contains methods for drawing schematic-specific items.
void SetMirror(bool aMirrorX, bool aMirrorY)
Control the mirroring of the VIEW.
void UpdateAllLayersOrder()
Do everything that is needed to apply the rendering order of layers.
void SetLayerDisplayOnly(int aLayer, bool aDisplayOnly=true)
Set a layer display-only (ie: to be rendered but not returned by hit test queries).
void SetPainter(PAINTER *aPainter)
Set the painter object used by the view for drawing #VIEW_ITEMS.
void SetGAL(GAL *aGal)
Assign a rendering device for the VIEW.
void SetLayerTarget(int aLayer, RENDER_TARGET aTarget)
Change the rendering target for a particular layer.
static constexpr int VIEW_MAX_LAYERS
Rendering order modifier for layers that are marked as top layers.
void SetScaleLimits(double aMaximum, double aMinimum)
Set minimum and maximum values for scale.
void SetLayerOrder(int aLayer, int aRenderingOrder)
Set rendering order of a particular layer.
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
drawingsheet frame and titleblock
@ LAYER_GP_OVERLAY
general purpose overlay
@ LAYER_SELECT_OVERLAY
currently selected items overlay
@ TARGET_NONCACHED
Auxiliary rendering target (noncached)
@ TARGET_OVERLAY
Items that may change while the view stays the same (noncached)
SETTINGS_MANAGER * GetSettingsManager()
PGM_BASE & Pgm()
The global Program "get" accessor.
constexpr double SCH_WORLD_UNIT(1e-7/0.0254)
static const int SCH_LAYER_ORDER[]
constexpr int MilsToIU(int mils) const
VECTOR2< double > VECTOR2D
WX_VIEW_CONTROLS class definition.
#define ZOOM_MAX_LIMIT_EESCHEMA_PREVIEW
#define ZOOM_MIN_LIMIT_EESCHEMA_PREVIEW