33#include <wx/windowid.h>
55 const wxPoint& aPosition,
const wxSize& aSize,
69 cs = frame->GetColorSettings();
74 m_painter->GetSettings()->LoadColors( cs );
95 SetEvtHandlerEnabled(
true );
127 for(
int i = 0; (unsigned) i <
sizeof(
SCH_LAYER_ORDER ) /
sizeof( int ); ++i )
195 catch(
const std::runtime_error& e )
Color settings are a bit different than most of the settings objects in that there can be more than o...
static constexpr GAL_TYPE GAL_FALLBACK
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))
@ GAL_TYPE_OPENGL
OpenGL implementation.
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.)
virtual bool SwitchBackend(GAL_TYPE aGalType)
Switch method of rendering graphics.
void StartDrawing()
Begin drawing if it was stopped previously.
GAL_TYPE m_backend
Currently used GAL.
EDA_DRAW_FRAME * GetParentEDAFrame() const
Returns parent EDA_DRAW_FRAME, if available or NULL otherwise.
void SetWorldUnitLength(double aWorldUnitLength)
Set the unit length.
void SetClearColor(const COLOR4D &aColor)
virtual bool IsInitialized() const
Return the initialization status for the canvas.
virtual bool IsVisible() const
Return true if the GAL canvas is visible on the screen.
Contains methods for drawing schematic-specific items.
void DisplaySymbol(LIB_SYMBOL *aSymbol)
void DisplaySheet(const SCH_SCREEN *aScreen)
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.
void Clear()
Remove all items from the view.
static constexpr int VIEW_MAX_LAYERS
Rendering order modifier for layers that are marked as top layers.
void UpdateItems()
Iterate through the list of items that asked for updating and updates them.
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.
Define a library symbol object.
virtual SETTINGS_MANAGER & GetSettingsManager() const
A shim class between EDA_DRAW_FRAME and several derived classes: SYMBOL_EDIT_FRAME,...
void ActivateGalCanvas() override
Use to start up the GAL drawing canvas.
KIGFX::SCH_VIEW * GetView() const override
Return a pointer to the #VIEW instance used in the panel.
bool SwitchBackend(GAL_TYPE aGalType) override
Switch method of rendering graphics.
void DisplaySymbol(LIB_SYMBOL *aSymbol)
void OnShow() override
Called when the window is shown for the first time.
void DisplaySheet(SCH_SCREEN *aScreen)
void setDefaultLayerOrder()
Reassign layer order to the initial settings.
SCH_DRAW_PANEL(wxWindow *aParentWindow, wxWindowID aWindowId, const wxPoint &aPosition, const wxSize &aSize, KIGFX::GAL_DISPLAY_OPTIONS &aOptions, GAL_TYPE aGalType=GAL_TYPE_OPENGL)
void setDefaultLayerDeps()
Set rendering targets & dependencies for layers.
virtual void onPaint(wxPaintEvent &WXUNUSED(aEvent)) override
Called when the window is shown for the first time.
COLOR_SETTINGS * GetColorSettings(const wxString &aName="user")
Retrieves a color settings object that applications can read colors from.
void DisplayInfoMessage(wxWindow *aParent, const wxString &aMessage, const wxString &aExtraInfo)
Display an informational message box with aMessage.
This file is part of the common library.
@ LAYER_DRAWINGSHEET
drawingsheet frame and titleblock
@ LAYER_DRAW_BITMAPS
to handle and draw images bitmaps
@ LAYER_GP_OVERLAY
general purpose overlay
@ LAYER_SELECT_OVERLAY
currently selected items overlay
@ LAYER_SELECTION_SHADOWS
@ TARGET_NONCACHED
Auxiliary rendering target (noncached)
@ TARGET_CACHED
Main rendering target (cached)
@ TARGET_OVERLAY
Items that may change while the view stays the same (noncached)
void Refresh()
Update the board display after modifying it by a python script (note: it is automatically called by a...
PGM_BASE & Pgm()
The global Program "get" accessor.
constexpr double SCH_WORLD_UNIT(1e-7/0.0254)
static const int SCH_LAYER_ORDER[]
WX_VIEW_CONTROLS class definition.
#define ZOOM_MIN_LIMIT_EESCHEMA
#define ZOOM_MAX_LIMIT_EESCHEMA