31 #include <wx/gdicmn.h> 32 #include <wx/window.h> 33 #include <wx/windowid.h> 55 const wxPoint& aPosition,
const wxSize& aSize,
70 cs = frame->GetColorSettings();
72 cs =
Pgm().GetSettingsManager().GetColorSettings();
75 m_painter->GetSettings()->LoadColors( cs );
96 SetEvtHandlerEnabled(
true );
179 return static_cast<KIGFX::SCH_VIEW*>(
m_view );
192 catch(
const std::runtime_error& e )
void SetScaleLimits(double aMaximum, double aMinimum)
Set minimum and maximum values for scale.
KIGFX::GAL * m_gal
Interface for drawing objects on a 2D-surface.
KIGFX::SCH_VIEW * GetView() const override
Return a pointer to the #VIEW instance used in the panel.
void SetClearColor(const COLOR4D &aColor)
void DisplayComponent(LIB_PART *aComponent)
KIGFX::WX_VIEW_CONTROLS * m_viewControls
Control for VIEW (moving, zooming, etc.)
void DisplayComponent(LIB_PART *aPart)
void SetLayerOrder(int aLayer, int aRenderingOrder)
Set rendering order of a particular layer.
GAL_TYPE m_backend
Currently used GAL.
This file is part of the common library.
void OnShow() override
Called when the window is shown for the first time.
to handle and draw images bitmaps
An implementation of class VIEW_CONTROLS for wxWidgets library.
virtual bool SwitchBackend(GAL_TYPE aGalType)
Switch method of rendering graphics.
static constexpr GAL_TYPE GAL_FALLBACK
void UpdateAllLayersOrder()
Do everything that is needed to apply the rendering order of layers.
void SetMirror(bool aMirrorX, bool aMirrorY)
Control the mirroring of the VIEW.
KIWAY Kiway & Pgm(), KFCTL_STANDALONE
The global Program "get" accessor.
WX_VIEW_CONTROLS class definition.
static constexpr int VIEW_MAX_LAYERS
maximum number of layers that may be shown
Auxiliary rendering target (noncached)
static const LAYER_NUM SCH_LAYER_ORDER[]
void SetLayerTarget(int aLayer, RENDER_TARGET aTarget)
Change the rendering target for a particular layer.
virtual void onPaint(wxPaintEvent &WXUNUSED(aEvent))
void DisplaySheet(SCH_SCREEN *aScreen)
void DisplaySheet(const SCH_SCREEN *aScreen)
void Clear()
Remove all items from the view.
#define ZOOM_MAX_LIMIT_EESCHEMA
std::unique_ptr< KIGFX::PAINTER > m_painter
Contains information about how to draw items using GAL.
void SetLayerDisplayOnly(int aLayer, bool aDisplayOnly=true)
SCH_PAINTER Contains methods for drawing schematic-specific items.
virtual void onPaint(wxPaintEvent &WXUNUSED(aEvent)) override
Called when the window is shown for the first time.
Define a library symbol object.
Items that may change while the view stays the same (noncached)
virtual void SetFocus() override
void UpdateItems()
Iterate through the list of items that asked for updating and updates them.
void setDefaultLayerDeps()
Set rendering targets & dependencies for layers.
virtual void ActivateGalCanvas()
Use to start up the GAL drawing canvas.
void StartDrawing()
Begin drawing if it was stopped previously.
void SetWorldUnitLength(double aWorldUnitLength)
Set the unit length.
bool SwitchBackend(GAL_TYPE aGalType) override
Switch method of rendering graphics.
virtual 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...
#define ZOOM_MIN_LIMIT_EESCHEMA
SCH_DRAW_PANEL(wxWindow *aParentWindow, wxWindowID aWindowId, const wxPoint &aPosition, const wxSize &aSize, KIGFX::GAL_DISPLAY_OPTIONS &aOptions, GAL_TYPE aGalType=GAL_TYPE_OPENGL)
int LAYER_NUM
This can be replaced with int and removed.
Board layer functions and definitions.
Main rendering target (cached)
constexpr double SCH_WORLD_UNIT(1e-7/0.0254)
KIGFX::VIEW * m_view
Stores view settings (scale, center, etc.) and items to be drawn.
EDA_DRAW_FRAME * GetParentEDAFrame() const
Returns parent EDA_DRAW_FRAME, if available or NULL otherwise.
virtual bool IsVisible() const
Return true if the GAL canvas is visible on the screen.
currently selected items overlay
void SetPainter(PAINTER *aPainter)
Set the painter object used by the view for drawing #VIEW_ITEMS.
Color settings are a bit different than most of the settings objects in that there can be more than o...
drawingsheet frame and titleblock
wxCursor m_currentCursor
Current mouse cursor shape id.
void SetGAL(GAL *aGal)
Assign a rendering device for the VIEW.
void DisplayInfoMessage(wxWindow *aParent, const wxString &aMessage, const wxString &aExtraInfo)
Display an informational message box with aMessage.
A shim class between EDA_DRAW_FRAME and several derived classes: SYMBOL_EDIT_FRAME,...
void setDefaultLayerOrder()
Reassign layer order to the initial settings.
virtual bool IsInitialized() const
Return the initialization status for the canvas.