|
KiCad PCB EDA Suite
|
GAL-backed canvas for visualizing a KICAD_DIFF::DIFF_SCENE. More...
#include <widget_diff_canvas.h>
Classes | |
| struct | HIGHLIGHT_BOX_ITEM |
Public Types | |
| using | ITEM_ID_GETTER = std::function<KIID( const EDA_ITEM& )> |
| Override context item identity when a differ uses IDs other than the item UUID. | |
| using | DIMMER = std::function<void( KIGFX::VIEW_ITEM*, bool aDim )> |
| Kiface-supplied callback that dims/undims a context item. | |
| using | PICK_HANDLER = std::function<void( const std::optional<KIID_PATH>& )> |
| Register a callback to fire when the user left-clicks the canvas. | |
| using | ITEM_HANDLER = std::function<void( KIGFX::VIEW_ITEM* )> |
| enum | GAL_TYPE { GAL_TYPE_UNKNOWN = -1 , GAL_TYPE_NONE = 0 , GAL_TYPE_OPENGL = 1 , GAL_TYPE_CAIRO = 2 , GAL_TYPE_MODERN = 3 , GAL_TYPE_LAST } |
Public Member Functions | |
| WIDGET_DIFF_CANVAS (wxWindow *aParent, GAL_TYPE aBackend=GAL_FALLBACK, wxWindowID aId=wxID_ANY) | |
| ~WIDGET_DIFF_CANVAS () override | |
| void | SetScene (KICAD_DIFF::DIFF_SCENE aScene) |
| Replace the displayed scene. Pass an empty scene to clear the canvas. | |
| void | SetWorldUnitLength (double aWorldUnitLength) |
| void | SetContextPainter (std::unique_ptr< KIGFX::PAINTER > aPainter) |
| Install the native painter used for drawing source document context. | |
| void | SetContextItems (const std::vector< KIGFX::VIEW_ITEM * > &aItems) |
| Replace source document context items. | |
| void | SetItemCategories (std::map< KIGFX::VIEW_ITEM *, KICAD_DIFF::CATEGORY > aMap) |
| Tag context items by change category so SetCategoryVisible can hide / show them in lockstep with the diff-category checkboxes. | |
| void | SetItemIdGetter (const ITEM_ID_GETTER &aGetter) |
| void | SetItemDimmer (DIMMER aDimmer) |
| void | HighlightChange (std::optional< KIID_PATH > aChangeId) |
| Outline shape(s) whose SCENE_SHAPE::changeId matches the given path. | |
| void | SetCategoryVisible (KICAD_DIFF::CATEGORY aCategory, bool aVisible) |
| Toggle whether shapes of a given change category render. | |
| bool | IsCategoryVisible (KICAD_DIFF::CATEGORY aCategory) const |
| void | SetHiddenChanges (std::set< KIID_PATH > aHidden) |
| Replace the set of muted changes. | |
| bool | IsChangeHidden (const KIID_PATH &aChangeId) const |
| void | SetLayerVisible (PCB_LAYER_ID aLayer, bool aVisible) |
| Toggle whether board-context geometry on a given PCB layer renders. | |
| bool | IsLayerVisible (PCB_LAYER_ID aLayer) const |
| void | BeginUpdate () |
| Hold overlay rebuilds/zoom until EndUpdate, so a batch of changes (e.g. | |
| void | EndUpdate () |
| void | ZoomToFit () |
| Center the view on the scene's document bbox. | |
| void | ZoomToBBox (const BOX2I &aBBox) |
| Zoom and center on a specific document-space bbox with a small margin. | |
| void | CenterOnHighlight () |
| Pan so the currently highlighted change is at the center of the canvas. | |
| void | SetPickHandler (PICK_HANDLER aHandler) |
| void | SetDoubleClickHandler (ITEM_HANDLER aHandler) |
| void | SetLeftDragPans (bool aPan) |
| Let a left drag pan the view, for a canvas with nothing to select by dragging. | |
| void | SetFocusBox (std::optional< BOX2I > aBox) |
| Make ZoomToFit frame this box instead of the whole document, or everything again when cleared. | |
| void | SetFocus () override |
| bool | StatusPopupHasFocus () |
| void | SetStatusPopup (wxWindow *aPopup) |
| virtual bool | SwitchBackend (GAL_TYPE aGalType) |
| Switch method of rendering graphics. | |
| void | UpdateTouchpadGestureHandler () |
| Apply the current native touchpad gesture preference to the active backend window. | |
| GAL_TYPE | GetBackend () const |
| Return the type of backend currently used by GAL canvas. | |
| KIGFX::GAL * | GetGAL () const |
| Return a pointer to the GAL instance used in the panel. | |
| virtual KIGFX::VIEW * | GetView () const |
| Return a pointer to the KIGFX::VIEW instance used in the panel. | |
| KIGFX::VIEW_CONTROLS * | GetViewControls () const |
| Return a pointer to the KIGFX::VIEW_CONTROLS instance used in the panel. | |
| bool | GetScreenshot (wxImage &aDstImage) |
| Capture the current canvas contents into aDstImage. | |
| virtual void | Refresh (bool aEraseBackground=true, const wxRect *aRect=nullptr) override |
| void | ForceRefresh () |
| Force a redraw. | |
| void | RequestRefresh () |
| Make sure a refresh gets done on the next idle event if it hasn't already. | |
| void | UpdateOverlayExclusions () |
| Tell the backend which areas of this panel are covered by an overlaid infobar. | |
| void | ResizeGal (bool aForce=false) |
| Resize the GAL to the current client size of this panel. | |
| void | SetEventDispatcher (TOOL_DISPATCHER *aEventDispatcher) |
| Set a dispatcher that processes events and forwards them to tools. | |
| void | StartDrawing () |
| Begin drawing if it was stopped previously. | |
| void | StopDrawing () |
| Prevent the GAL canvas from further drawing until it is recreated or StartDrawing() is called. | |
| virtual void | SetHighContrastLayer (int aLayer) |
| Take care of display settings for the given layer to be displayed in high contrast mode. | |
| virtual void | SetTopLayer (int aLayer) |
| Move the selected layer to the top, so it is displayed above all others. | |
| virtual void | GetMsgPanelInfo (EDA_DRAW_FRAME *aFrame, std::vector< MSG_PANEL_ITEM > &aList) |
| EDA_DRAW_FRAME * | GetParentEDAFrame () const |
| Returns parent EDA_DRAW_FRAME, if available or NULL otherwise. | |
| bool | IsDialogPreview () const |
| virtual void | OnShow () |
| Called when the window is shown for the first time. | |
| void | SetStealsFocus (bool aStealsFocus) |
| Set whether focus is taken on certain events (mouseover, keys, etc). | |
| void | SetCurrentCursor (KICURSOR aCursor) |
| Set the current cursor shape for this panel. | |
| virtual BOX2I | GetDefaultViewBBox () const |
| Return the bounding box of the view that should be used if model is not valid. | |
| void | ZoomToFit (const BOX2I &aBox, std::optional< double > aMarginScale=std::nullopt) |
| Scale and centre the view on aBox, and fit it again whenever the canvas changes size until something else zooms or pans. | |
| void | OnEvent (wxEvent &aEvent) |
| Used to forward events to the canvas from popups, etc. | |
| bool | DoRePaint (bool aAllowSkip=true) |
| Repaint the canvas, and fix scrollbar cursors. | |
| std::shared_ptr< KIGFX::VIEW_OVERLAY > | DebugOverlay () |
| Create an overlay for rendering debug graphics. | |
| void | ClearDebugOverlay () |
| Clear the contents of the debug overlay and removes it from the VIEW. | |
| virtual void | prepareGridSources () |
| Hook for subclasses to push per-frame grid sources onto the GAL. | |
| virtual void | beforeRedraw () |
| Hook for subclasses to update view items whose inputs nothing else tracks. | |
Static Public Member Functions | |
| static GAL_TYPE | ResolveStoredCanvasType (int aStoredCanvasType) |
| Convert a stored canvas type setting into a backend that can actually be used. | |
| static GAL_TYPE | CanvasAfterFailure (GAL_TYPE aFailedCanvasType) |
| Return the canvas that takes over from one that could not be used. | |
| static bool | IsAccelerated (GAL_TYPE aCanvasType) |
| True for a canvas drawn on the GPU, which keeps cached layers between frames. | |
| static int | ScreenSizePad (GAL_TYPE aBackend) |
| Return how many pixels larger than the client area a backend's GAL is made. | |
| static void | NoteInput () |
| Count an input so the frame that answers it is never held back by the display-rate limit. | |
| static KIGFX::VC_SETTINGS | GetVcSettings () |
| Gets a populated View Controls settings object dervived from our program settings. | |
Public Attributes | |
| bool | m_MouseCapturedLost |
| used on wxMSW: true after a wxEVT_MOUSE_CAPTURE_LOST was received false after the mouse is recaptured. | |
| std::unique_ptr< PROF_COUNTER > | m_PaintEventCounter |
Static Public Attributes | |
| static constexpr GAL_TYPE | GAL_FALLBACK = GAL_TYPE_CAIRO |
| static constexpr bool | GAL_FALLBACK_AVAILABLE = GAL_FALLBACK != GAL_TYPE_OPENGL |
Protected Member Functions | |
| virtual void | onPaint (wxPaintEvent &WXUNUSED(aEvent)) |
| void | onEnter (wxMouseEvent &aEvent) |
| void | onLostFocus (wxFocusEvent &aEvent) |
| void | onIdle (wxIdleEvent &aEvent) |
| void | onRefreshTimer (wxTimerEvent &aEvent) |
| void | onShowEvent (wxShowEvent &aEvent) |
| bool | recoverFromGalError (const std::exception &aErr) |
| float | displayRefreshRate () |
| Refresh rate in Hz of the display showing the canvas, or 0 when unknown. | |
| bool | handleContextLoss () |
| Replace a GAL whose context was destroyed by a GPU reset. | |
| void | showMessageLater (const wxString &aTitle, const wxString &aDetail, bool aError) |
| Show a recovery message once the current event finishes. | |
| bool | abandonRhiCanvas (const wxString &aDetail) |
| Leave the RHI canvas for GAL_FALLBACK after its device could not be created or restored. | |
| void | teardownModernRenderInfra () |
| Stop the RHI render thread and release its swapchain, mailbox and buffers. | |
| const RHI_NATIVE_WINDOW_HANDLE & | getCachedNativeWindowHandle () |
| Return the native window handle for RHI surface creation, or an invalid handle until the window is realized. | |
| void | releaseCachedNativeWindowHandle () |
| void | presentFrame () |
| Present the most recently submitted frame packet. | |
| wxSize | backendScreenSize () const |
| The padded size of the backend window, which sits below the top overlay inset. | |
| void | submitCachedScene () |
| Submit the last full scene again with the current camera and cursor, keeping all targets. | |
Protected Attributes | |
| wxWindow * | m_parent |
| Pointer to the parent window. | |
| EDA_DRAW_FRAME * | m_edaFrame |
| Parent EDA_DRAW_FRAME (if available) | |
| std::chrono::steady_clock::time_point | m_lastRepaintStart |
| Timestamp of the last repaint start. | |
| std::chrono::steady_clock::time_point | m_lastRepaintEnd |
| Timestamp of the last repaint end. | |
| wxTimer | m_refreshTimer |
| Timer to prevent too-frequent refreshing. | |
| std::mutex | m_refreshMutex |
| Blocks multiple calls to the draw. | |
| bool | m_drawing |
| True if GAL is currently redrawing the view. | |
| bool | m_drawingEnabled |
| Flag that determines if VIEW may use GAL for redrawing the screen. | |
| bool | m_needIdleRefresh |
| True when canvas needs to be refreshed from idle handler. | |
| bool | m_refreshDeferred = false |
| The refresh timer was armed by Refresh() for a repaint it postponed. | |
| VECTOR2D | m_lastCursorPosition |
| Last cursor position sent to GAL for drawing. | |
| KIGFX::GAL * | m_gal |
| Interface for drawing objects on a 2D-surface. | |
| KIGFX::VIEW * | m_view |
| Stores view settings (scale, center, etc.) and items to be drawn. | |
| std::unique_ptr< KIGFX::PAINTER > | m_painter |
| Contains information about how to draw items using GAL. | |
| KIGFX::WX_VIEW_CONTROLS * | m_viewControls |
| Control for VIEW (moving, zooming, etc.) | |
| GAL_TYPE | m_backend |
| Currently used GAL. | |
| KIGFX::GAL_DISPLAY_OPTIONS & | m_options |
| TOOL_DISPATCHER * | m_eventDispatcher |
| Processes and forwards events to tools. | |
| bool | m_lostFocus |
| Flag to indicate that focus should be regained on the next mouse event. | |
| KIGFX::AUTOMATIC_FIT | m_automaticFit |
| What the last ZoomToFit() left, refitted on a resize until the view is zoomed or panned. | |
| bool | m_recoveryAttempted |
| Set after a GPU recovery attempt to prevent infinite retry loops. | |
| int | m_contextBindFailures |
| Consecutive frames dropped because the GL context could not be made current. | |
| bool | m_rebuiltAfterReset |
| The GAL was rebuilt after a GPU reset and has not completed a frame yet. | |
| bool | m_pendingResize |
| Set when a size change could not be applied because the GL context was unavailable. | |
| int | m_overlayInsetTop = 0 |
| Rows at the top of the panel left to the infobars where the backend window would hide them. | |
| bool | m_stealsFocus |
| Flag to indicate whether the panel should take focus at certain times (when moused over, and on various mouse/key events) | |
| wxWindow * | m_statusPopup |
| std::shared_ptr< KIGFX::RENDER_THREAD > | m_renderThread |
| The render thread that owns the RHI device, shared by every canvas, see GAL_MODERN::AcquireRenderThread() | |
| std::unique_ptr< KIGFX::RHI_DEVICE_PROXY > | m_deviceProxy |
| The UI thread's access to the device. | |
| std::unique_ptr< KIGFX::SWAPCHAIN_CONTROLLER > | m_swapchainCtrl |
| std::unique_ptr< KIGFX::FRAME_MAILBOX > | m_frameMailbox |
| Delivers frame packets to the render thread. | |
| uint32_t | m_windowId = 0 |
| Routes this window's work on the render thread. | |
| bool | m_needsExternalRenderingSetup = false |
| True until the first paint completes the deferred GTK drawing suppression. | |
| RHI_NATIVE_WINDOW_HANDLE | m_cachedNativeHandle |
| Fetching the handle forces a display-server flush, so it is cached between realizations and fetched again only when m_nativeHandleValid is cleared on swapchain recreation. | |
| bool | m_nativeHandleValid = false |
| float | m_refreshRate = 0.0f |
| What displayRefreshRate() last asked the window system. | |
| std::chrono::steady_clock::time_point | m_refreshRateAsked |
| KIGFX::FRAME_DRAW_DESC | m_lastFullStaticDesc |
| Draw descriptors of the last full redraw, reused by frames that need no new geometry. | |
| KIGFX::FRAME_DRAW_DESC | m_lastFullDynamicDesc |
| bool | m_hasLastFullDrawDesc = false |
| uint64_t | m_staticEpoch = 1 |
| Content generations of the static and dynamic pools last submitted, see FRAME_PACKET. | |
| uint64_t | m_dynamicEpoch = 1 |
| KIGFX::RHI_LINE_PIPELINE_KIND | m_linePipelineKind = KIGFX::RHI_LINE_PIPELINE_KIND::PCB_TRACKS |
| Fixed in the constructor from the parent frame's editor. | |
| std::shared_ptr< KIGFX::VIEW_OVERLAY > | m_debugOverlay |
| Optional overlay for drawing transient debug objects. | |
| std::unique_ptr< KIPLATFORM::UI::TOUCHPAD_GESTURE_HANDLER > | m_touchpadGestureHandler |
Private Member Functions | |
| WIDGET_DIFF_CANVAS (wxWindow *aParent, GAL_TYPE aBackend, wxWindowID aId, std::unique_ptr< KIGFX::GAL_DISPLAY_OPTIONS > aGalOptions) | |
| Delegating ctor target — keeps the GAL options unique_ptr alive across the base-class initialization that needs to deref it. | |
| void | rebuildOverlay (bool aOverlayOnly=false) |
| Rebuild the overlay from the render scene + current highlight state. | |
| void | buildRenderScene () |
| Recompute the cached render scene (layer-filtered geometry, cleared in native-context mode). | |
| void | refreshItemDimming () |
| Dim context items that are hidden, or unfocused while a highlight is active. | |
| KIID | getItemId (const EDA_ITEM &aItem) const |
| const KICAD_DIFF::SCENE_SHAPE * | shapeAt (const wxPoint &aScreenPoint) const |
| Hit test in screen coordinates → topmost SCENE_SHAPE under the cursor. | |
| std::optional< BOX2I > | highlightedBBox () const |
| Union bbox of all shapes whose changeId matches the current highlight, honoring per-category visibility. | |
| void | onLeftDown (wxMouseEvent &aEvent) |
| void | onLeftUp (wxMouseEvent &aEvent) |
| void | onDoubleClick (wxMouseEvent &aEvent) |
| void | onMotion (wxMouseEvent &aEvent) |
| void | onLeave (wxMouseEvent &aEvent) |
| void | onChar (wxKeyEvent &aEvent) |
| void | onSize (wxSizeEvent &aEvent) |
GAL-backed canvas for visualizing a KICAD_DIFF::DIFF_SCENE.
This is the hardware-accelerated counterpart to DIFF_THUMBNAIL.
The canvas owns a KIGFX::VIEW, a VIEW_OVERLAY, and an optional non-owning VIEW_GROUP for source document items. Module callers can install a native painter/context group so unchanged document context is drawn as real items, while the overlay still holds selectable diff change shapes.
Pan and zoom come from WX_VIEW_CONTROLS (mouse middle-drag, wheel) for free. Pick handling and home/F-zoom are wired explicitly so the public API matches DIFF_THUMBNAIL's contract; dialogs can swap one for the other without further changes.
Definition at line 70 of file widget_diff_canvas.h.
| using WIDGET_DIFF_CANVAS::DIMMER = std::function<void( KIGFX::VIEW_ITEM*, bool aDim )> |
Kiface-supplied callback that dims/undims a context item.
Definition at line 108 of file widget_diff_canvas.h.
| using WIDGET_DIFF_CANVAS::ITEM_HANDLER = std::function<void( KIGFX::VIEW_ITEM* )> |
Definition at line 160 of file widget_diff_canvas.h.
| using WIDGET_DIFF_CANVAS::ITEM_ID_GETTER = std::function<KIID( const EDA_ITEM& )> |
Override context item identity when a differ uses IDs other than the item UUID.
Definition at line 104 of file widget_diff_canvas.h.
| using WIDGET_DIFF_CANVAS::PICK_HANDLER = std::function<void( const std::optional<KIID_PATH>& )> |
Register a callback to fire when the user left-clicks the canvas.
The optional holds the picked change id when a shape was hit, or std::nullopt when the click landed on empty space (deselect).
Definition at line 156 of file widget_diff_canvas.h.
|
inherited |
| Enumerator | |
|---|---|
| GAL_TYPE_UNKNOWN | not specified: a GAL engine must be set by the client |
| GAL_TYPE_NONE | GAL not used (the legacy wxDC engine is used) |
| GAL_TYPE_OPENGL | OpenGL implementation. |
| GAL_TYPE_CAIRO | Cairo implementation. |
| GAL_TYPE_MODERN | RHI implementation, Vulkan or Metal on macOS. |
| GAL_TYPE_LAST | Sentinel, do not use as a parameter. |
Definition at line 78 of file class_draw_panel_gal.h.
| WIDGET_DIFF_CANVAS::WIDGET_DIFF_CANVAS | ( | wxWindow * | aParent, |
| GAL_TYPE | aBackend = GAL_FALLBACK, | ||
| wxWindowID | aId = wxID_ANY ) |
Definition at line 50 of file widget_diff_canvas.cpp.
References WIDGET_DIFF_CANVAS().
Referenced by WIDGET_DIFF_CANVAS().
|
override |
Definition at line 120 of file widget_diff_canvas.cpp.
References m_contextGroup, m_contextGroupItems, EDA_DRAW_PANEL_GAL::m_view, and EDA_DRAW_PANEL_GAL::StopDrawing().
|
private |
Delegating ctor target — keeps the GAL options unique_ptr alive across the base-class initialization that needs to deref it.
Definition at line 56 of file widget_diff_canvas.cpp.
References EDA_DRAW_PANEL_GAL::EDA_DRAW_PANEL_GAL(), EDA_DRAW_PANEL_GAL::IsAccelerated(), LAYER_GP_OVERLAY, EDA_DRAW_PANEL_GAL::m_backend, m_contextGroup, EDA_DRAW_PANEL_GAL::m_gal, m_galOptions, m_highlightBox, m_hoverBox, m_layerVisible, m_overlay, EDA_DRAW_PANEL_GAL::m_painter, EDA_DRAW_PANEL_GAL::m_view, EDA_DRAW_PANEL_GAL::m_viewControls, move, onChar(), onDoubleClick(), onLeave(), onLeftDown(), onLeftUp(), onMotion(), onSize(), EDA_DRAW_PANEL_GAL::StartDrawing(), KIGFX::TARGET_CACHED, KIGFX::TARGET_NONCACHED, KIGFX::TARGET_OVERLAY, KIGFX::VIEW::VIEW_MAX_LAYERS, ZOOM_MAX_LIMIT_DIFF, and ZOOM_MIN_LIMIT_DIFF.
|
protectedinherited |
Leave the RHI canvas for GAL_FALLBACK after its device could not be created or restored.
The user is told the first time it happens in a session.
Definition at line 371 of file draw_panel_gal.cpp.
References _, EDA_DRAW_FRAME::CanvasFailed(), GAL_FALLBACK, GAL_TYPE_MODERN, EDA_DRAW_FRAME::SetCanvasFailed(), showMessageLater(), SwitchBackend(), and traceRhi.
Referenced by DoRePaint(), recoverFromGalError(), and SwitchBackend().
|
protectedinherited |
The padded size of the backend window, which sits below the top overlay inset.
Definition at line 1103 of file draw_panel_gal.cpp.
References m_backend, m_overlayInsetTop, pad, and ScreenSizePad().
Referenced by presentFrame(), and ResizeGal().
|
inlinevirtualinherited |
Hook for subclasses to update view items whose inputs nothing else tracks.
Called from DoRePaint before the pending item updates are applied.
Reimplemented in PCB_DRAW_PANEL_GAL.
Definition at line 382 of file class_draw_panel_gal.h.
Referenced by DoRePaint().
| void WIDGET_DIFF_CANVAS::BeginUpdate | ( | ) |
Hold overlay rebuilds/zoom until EndUpdate, so a batch of changes (e.g.
a reload that re-sets context and scene) renders once instead of flashing an intermediate state.
Definition at line 376 of file widget_diff_canvas.cpp.
References m_holdRebuild.
|
private |
Recompute the cached render scene (layer-filtered geometry, cleared in native-context mode).
Only depends on the scene, layer visibility, and context mode, so it runs when those change, not on every interaction.
Definition at line 475 of file widget_diff_canvas.cpp.
References KICAD_DIFF::FilterGeometryByVisibleLayers(), m_hasNativeContext, m_layerVisible, m_renderScene, and m_scene.
Referenced by SetContextItems(), SetLayerVisible(), and SetScene().
|
staticinherited |
Return the canvas that takes over from one that could not be used.
A failed accelerated canvas goes straight to GAL_FALLBACK.
Definition at line 362 of file draw_panel_gal.cpp.
References GAL_FALLBACK, GAL_TYPE_NONE, and IsAccelerated().
Referenced by recoverFromGalError().
| void WIDGET_DIFF_CANVAS::CenterOnHighlight | ( | ) |
Pan so the currently highlighted change is at the center of the canvas.
No-op when nothing is highlighted.
Definition at line 461 of file widget_diff_canvas.cpp.
References center, highlightedBBox(), EDA_DRAW_PANEL_GAL::m_view, and EDA_DRAW_PANEL_GAL::Refresh().
|
inherited |
Clear the contents of the debug overlay and removes it from the VIEW.
Definition at line 1838 of file draw_panel_gal.cpp.
References m_debugOverlay, and m_view.
|
inherited |
Create an overlay for rendering debug graphics.
Definition at line 1826 of file draw_panel_gal.cpp.
References m_debugOverlay, and m_view.
|
protectedinherited |
Refresh rate in Hz of the display showing the canvas, or 0 when unknown.
Definition at line 1218 of file draw_panel_gal.cpp.
References KIPLATFORM::UI::GetDisplayRefreshRate(), m_refreshRate, and m_refreshRateAsked.
Referenced by presentFrame(), and Refresh().
|
inherited |
Repaint the canvas, and fix scrollbar cursors.
Usually called by a OnPaint event.
Does not use a wxPaintDC, so it can be called outside a wxPaintEvent.
Definition at line 606 of file draw_panel_gal.cpp.
References _, abandonRhiCanvas(), ApplyAntialiasingMode(), beforeRedraw(), GAL_TYPE_MODERN, GAL_TYPE_NONE, GAL_TYPE_OPENGL, KIGFX::RENDER_SETTINGS::GetBackgroundColor(), KIGFX::VIEW::GetCenter(), KIGFX::RENDER_SETTINGS::GetCursorColor(), KIGFX::RENDER_SETTINGS::GetGridColor(), GetParentEDAFrame(), EDA_DRAW_FRAME::GetScreen(), GetView(), handleContextLoss(), IsAccelerated(), IsDialogPreview(), KIGFX::GAL_DRAWING_CONTEXT::IsDrawing(), KIGFX::FRAME_DRAW_DESC::linePipelineKind, m_backend, m_contextBindFailures, m_drawing, m_drawingEnabled, m_dynamicEpoch, m_frameMailbox, m_gal, m_hasLastFullDrawDesc, m_lastCursorPosition, m_lastFullDynamicDesc, m_lastFullStaticDesc, m_lastRepaintEnd, m_lastRepaintStart, m_linePipelineKind, m_options, m_painter, m_pendingResize, m_rebuiltAfterReset, m_recoveryAttempted, m_refreshMutex, m_renderThread, BASE_SCREEN::m_ScrollCenter, m_staticEpoch, m_swapchainCtrl, m_view, m_viewControls, m_windowId, MAX_CONTEXT_BIND_RETRIES, Pgm(), prepareGridSources(), presentFrame(), recoverFromGalError(), RequestRefresh(), ResizeGal(), s_inputSerial, showMessageLater(), PROF_TIMER::Start(), StartDrawing(), PROF_TIMER::Stop(), StopDrawing(), submitCachedScene(), KIGFX::FRAME_DRAW_DESC::supersampleFactor, SwitchBackend(), KIGFX::TARGET_NONCACHED, KIGFX::TARGET_OVERLAY, PROF_TIMER::to_string(), traceDrawPanel, traceGalProfile, and traceRhi.
Referenced by ForceRefresh(), GetScreenshot(), onPaint(), onRefreshTimer(), and Refresh().
| void WIDGET_DIFF_CANVAS::EndUpdate | ( | ) |
Definition at line 382 of file widget_diff_canvas.cpp.
References m_holdRebuild, m_zoomToFitPending, rebuildOverlay(), and ZoomToFit().
|
inherited |
Force a redraw.
Definition at line 1271 of file draw_panel_gal.cpp.
References DoRePaint(), m_drawingEnabled, m_gal, m_refreshTimer, m_windowId, onIdle(), onPaint(), and traceRhi.
Referenced by BOARD_EDITOR_CONTROL::AssignNetclass(), FOOTPRINT_EDIT_FRAME::CommonSettingsChanged(), FOOTPRINT_VIEWER_FRAME::CommonSettingsChanged(), GERBVIEW_FRAME::CommonSettingsChanged(), PCB_EDIT_FRAME::CommonSettingsChanged(), PL_EDITOR_FRAME::CommonSettingsChanged(), SCH_EDIT_FRAME::CommonSettingsChanged(), SYMBOL_EDIT_FRAME::CommonSettingsChanged(), SYMBOL_VIEWER_FRAME::CommonSettingsChanged(), FOOTPRINT_PREVIEW_PANEL::DisplayFootprint(), PAD_TOOL::ExitPadEditMode(), FOOTPRINT_EDIT_FRAME::HardRedraw(), SCH_BASE_FRAME::HardRedraw(), SCH_EDIT_FRAME::HardRedraw(), FOOTPRINT_EDIT_FRAME::installFootprintTabBoard(), POSITION_RELATIVE_TOOL::InteractiveOffset(), DIALOG_FP_EDIT_PAD_TABLE::OnAddRow(), PCB_EDIT_FRAME::OnCrossProbeFlashTimer(), SCH_EDIT_FRAME::OnCrossProbeFlashTimer(), DIALOG_FP_EDIT_PAD_TABLE::OnDeleteRow(), DIALOG_FP_EDIT_PAD_TABLE::OnImportButtonClick(), onRefreshTimer(), DIALOG_FP_EDIT_PAD_TABLE::OnSelectCell(), FOOTPRINT_PREVIEW_PANEL::RefreshAll(), FOOTPRINT_EDIT_FRAME::RefreshLibraryFootprintTab(), DIALOG_FP_EDIT_PAD_TABLE::RestoreOriginalPadState(), FOOTPRINT_EDITOR_CONTROL::Save(), FOOTPRINT_EDITOR_CONTROL::SaveAs(), COMMON_TOOLS::ToggleBoundingBoxes(), FOOTPRINT_EDIT_FRAME::updateInfoBar(), and SYMBOL_EDIT_FRAME::updateInfoBar().
|
inlineinherited |
Return the type of backend currently used by GAL canvas.
Definition at line 171 of file class_draw_panel_gal.h.
References m_backend.
Referenced by DIALOG_SYMBOL_REMAP::OnRemapSymbols(), EDA_DRAW_FRAME::resolveCanvasType(), EDA_DRAW_FRAME::SwitchCanvas(), GERBVIEW_FRAME::UpdateXORLayers(), GERBVIEW_FRAME::~GERBVIEW_FRAME(), PCB_BASE_FRAME::~PCB_BASE_FRAME(), PL_EDITOR_FRAME::~PL_EDITOR_FRAME(), and SCH_EDIT_FRAME::~SCH_EDIT_FRAME().
|
protectedinherited |
Return the native window handle for RHI surface creation, or an invalid handle until the window is realized.
It is fetched again only after swapchain recreation.
Definition at line 130 of file draw_panel_gal.cpp.
References COCOA, GetNativeWindowHandle(), RHI_METAL_HOST_VIEW::layer, m_cachedNativeHandle, m_nativeHandleValid, RhiMetalAttachHostView(), and RHI_METAL_HOST_VIEW::view.
Referenced by presentFrame().
|
inlinevirtualinherited |
Return the bounding box of the view that should be used if model is not valid.
For example, the drawing sheet bounding box for an empty PCB
Reimplemented in GERBVIEW_DRAW_PANEL_GAL, and PCB_DRAW_PANEL_GAL.
Definition at line 313 of file class_draw_panel_gal.h.
Referenced by COMMON_TOOLS::doCenter(), and ZoomToFit().
|
inlineinherited |
Return a pointer to the GAL instance used in the panel.
Definition at line 178 of file class_draw_panel_gal.h.
References m_gal.
Referenced by FOOTPRINT_EDIT_FRAME::ActivateGalCanvas(), GERBVIEW_FRAME::ActivateGalCanvas(), SCH_BASE_FRAME::CommonSettingsChanged(), SYMBOL_VIEWER_FRAME::CommonSettingsChanged(), KICAD_DIFF::ConfigurePcbDiffCanvasContext(), KICAD_DIFF::ConfigureSchDiffCanvasContext(), KICAD_DIFF::ConfigureSymDiffCanvasContext(), GERBVIEW_FRAME::DisplayGridMsg(), GERBVIEW_DRAW_PANEL_GAL::GERBVIEW_DRAW_PANEL_GAL(), EDA_DRAW_FRAME::GetNearestGridPosition(), EDA_DRAW_FRAME::GetNearestHalfGridPosition(), FOOTPRINT_PREVIEW_PANEL::New(), DIALOG_FP_EDIT_PAD_TABLE::OnAddRow(), PL_DRAW_PANEL_GAL::PL_DRAW_PANEL_GAL(), PCB_BASE_EDIT_FRAME::SetBoard(), GERBVIEW_FRAME::SetGridColor(), PCB_EDIT_FRAME::SetGridColor(), EDA_DRAW_FRAME::SetGridVisibility(), FP_TREE_SYNCHRONIZING_ADAPTER::ShowPreview(), GERBVIEW_DRAW_PANEL_GAL::SwitchBackend(), PL_DRAW_PANEL_GAL::SwitchBackend(), FOOTPRINT_EDIT_FRAME::SwitchCanvas(), SYMBOL_EDIT_FRAME::SwitchCanvas(), and EDA_DRAW_FRAME::SyncZoomSelectBox().
Definition at line 349 of file widget_diff_canvas.cpp.
References m_itemIdGetter, and EDA_ITEM::m_Uuid.
Referenced by HighlightChange(), and refreshItemDimming().
|
inlinevirtualinherited |
Reimplemented in GERBVIEW_DRAW_PANEL_GAL, PCB_DRAW_PANEL_GAL, and PL_DRAW_PANEL_GAL.
Definition at line 276 of file class_draw_panel_gal.h.
|
inlineinherited |
Returns parent EDA_DRAW_FRAME, if available or NULL otherwise.
Definition at line 284 of file class_draw_panel_gal.h.
References m_edaFrame.
Referenced by DoRePaint(), GERBVIEW_DRAW_PANEL_GAL::GERBVIEW_DRAW_PANEL_GAL(), PCB_DRAW_PANEL_GAL::GetMsgPanelInfo(), GERBVIEW_DRAW_PANEL_GAL::OnShow(), PCB_DRAW_PANEL_GAL::OnShow(), PCB_DRAW_PANEL_GAL::PCB_DRAW_PANEL_GAL(), PCB_DRAW_PANEL_GAL::prepareGridSources(), SCH_DRAW_PANEL::SCH_DRAW_PANEL(), GERBVIEW_DRAW_PANEL_GAL::SwitchBackend(), SCH_DRAW_PANEL::SwitchBackend(), PCB_DRAW_PANEL_GAL::SyncLayersVisibility(), and PCB_DRAW_PANEL_GAL::UpdateColors().
|
inherited |
Capture the current canvas contents into aDstImage.
Definition at line 1299 of file draw_panel_gal.cpp.
References DoRePaint(), GAL_TYPE_MODERN, GAL_TYPE_OPENGL, GetScreenshot(), m_backend, m_gal, m_renderThread, and m_windowId.
Referenced by GetScreenshot().
|
staticinherited |
Gets a populated View Controls settings object dervived from our program settings.
Definition at line 1848 of file draw_panel_gal.cpp.
References COMMON_SETTINGS::INPUT::auto_pan, COMMON_SETTINGS::INPUT::auto_pan_acceleration, COMMON_SETTINGS::INPUT::center_on_zoom, COMMON_SETTINGS::INPUT::drag_left, COMMON_SETTINGS::INPUT::drag_middle, COMMON_SETTINGS::INPUT::drag_right, COMMON_SETTINGS::INPUT::focus_follow_sch_pcb, PGM_BASE::GetCommonSettings(), COMMON_SETTINGS::INPUT::horizontal_pan, KIGFX::VC_SETTINGS::m_autoPanAcceleration, KIGFX::VC_SETTINGS::m_autoPanSettingEnabled, KIGFX::VC_SETTINGS::m_dragLeft, KIGFX::VC_SETTINGS::m_dragMiddle, KIGFX::VC_SETTINGS::m_dragRight, KIGFX::VC_SETTINGS::m_focusFollowSchPcb, KIGFX::VC_SETTINGS::m_horizontalPan, COMMON_SETTINGS::m_Input, KIGFX::VC_SETTINGS::m_motionPanModifier, KIGFX::VC_SETTINGS::m_scrollModifierPanH, KIGFX::VC_SETTINGS::m_scrollModifierPanV, KIGFX::VC_SETTINGS::m_scrollModifierZoom, KIGFX::VC_SETTINGS::m_scrollReversePanH, KIGFX::VC_SETTINGS::m_scrollReverseZoom, KIGFX::VC_SETTINGS::m_warpCursor, KIGFX::VC_SETTINGS::m_zoomAcceleration, KIGFX::VC_SETTINGS::m_zoomSpeed, KIGFX::VC_SETTINGS::m_zoomSpeedAuto, COMMON_SETTINGS::INPUT::motion_pan_modifier, Pgm(), COMMON_SETTINGS::INPUT::reverse_scroll_pan_h, COMMON_SETTINGS::INPUT::reverse_scroll_zoom, COMMON_SETTINGS::INPUT::scroll_modifier_pan_h, COMMON_SETTINGS::INPUT::scroll_modifier_pan_v, COMMON_SETTINGS::INPUT::scroll_modifier_zoom, COMMON_SETTINGS::INPUT::zoom_acceleration, COMMON_SETTINGS::INPUT::zoom_speed, and COMMON_SETTINGS::INPUT::zoom_speed_auto.
Referenced by EDA_3D_VIEWER_FRAME::applySettings(), EDA_3D_VIEWER_FRAME::configureCanvas(), and SwitchBackend().
|
inlinevirtualinherited |
Return a pointer to the KIGFX::VIEW instance used in the panel.
Reimplemented in PCB_DRAW_PANEL_GAL, and SCH_DRAW_PANEL.
Definition at line 185 of file class_draw_panel_gal.h.
References m_view.
Referenced by GERBVIEW_FRAME::ActivateGalCanvas(), PCB_BASE_FRAME::ActivateGalCanvas(), GERBVIEW_FRAME::ApplyDisplaySettingsToGAL(), EDITOR_CONDITIONS::bboxesFunc(), GERBVIEW_FRAME::Clear_DrawLayers(), GERBVIEW_FRAME::CommonSettingsChanged(), PL_EDITOR_FRAME::CommonSettingsChanged(), KICAD_DIFF::ConfigurePcbDiffCanvasContext(), DoRePaint(), EDA_DRAW_FRAME::FocusOnLocation(), GIT_FILE_DIFF_AREA::followCanvas(), GERBVIEW_FRAME::GetVisibleLayers(), GERBVIEW_CONTROL::HighlightControl(), GERBVIEW_FRAME::OnSelectActiveDCode(), GERBVIEW_FRAME::OnSelectActiveLayer(), PL_EDITOR_FRAME::OnSelectPage(), GERBVIEW_FRAME::Read_EXCELLON_File(), GERBVIEW_FRAME::Read_GERBER_File(), GERBVIEW_FRAME::RemapLayers(), SPNAV_2D_PLUGIN::SetCanvas(), PCB_BASE_FRAME::SetDisplayOptions(), GERBVIEW_FRAME::SetElementVisibility(), EDA_DRAW_FRAME::SetGridVisibility(), GERBVIEW_FRAME::SetLayerDrawPrms(), GERBVIEW_FRAME::SetVisibleLayers(), SPNAV_2D_PLUGIN::SPNAV_2D_PLUGIN(), COMMON_TOOLS::ToggleBoundingBoxes(), GERBVIEW_FRAME::unarchiveFiles(), GERBVIEW_FRAME::UpdateXORLayers(), and GERBVIEW_FRAME::~GERBVIEW_FRAME().
|
inlineinherited |
Return a pointer to the KIGFX::VIEW_CONTROLS instance used in the panel.
Definition at line 192 of file class_draw_panel_gal.h.
References m_viewControls.
Referenced by PCB_BASE_FRAME::ActivateGalCanvas(), FOOTPRINT_VIEWER_FRAME::AddFootprintToPCB(), EDA_DRAW_FRAME::CommonSettingsChanged(), FOOTPRINT_EDITOR_CONTROL::CreateFootprintFromWizard(), DISPLAY_FOOTPRINTS_FRAME::DISPLAY_FOOTPRINTS_FRAME(), EDA_DRAW_FRAME::FocusOnLocation(), FOOTPRINT_WIZARD_FRAME::FOOTPRINT_WIZARD_FRAME(), FOOTPRINT_EDIT_FRAME::LoadFootprintFromLibrary(), FOOTPRINT_EDITOR_CONTROL::NewFootprint(), FOOTPRINT_EDIT_FRAME::OpenProjectFiles(), SCH_BASE_FRAME::RedrawScreen(), FOOTPRINT_EDIT_FRAME::SaveFootprintToBoard(), GERBVIEW_FRAME::UpdateStatusBar(), PCB_BASE_FRAME::UpdateStatusBar(), PL_EDITOR_FRAME::UpdateStatusBar(), and SCH_BASE_FRAME::UpdateStatusBar().
|
protectedinherited |
Replace a GAL whose context was destroyed by a GPU reset.
Definition at line 503 of file draw_panel_gal.cpp.
References _, GAL_FALLBACK, GAL_FALLBACK_AVAILABLE, GAL_TYPE_NONE, GAL_TYPE_OPENGL, m_backend, m_gal, m_rebuiltAfterReset, m_refreshTimer, KIGFX::NONE, KIGFX::RECOVERABLE, KIGFX::REPEATED, EDA_DRAW_FRAME::SetCanvasFailed(), showMessageLater(), StartDrawing(), SwitchBackend(), and traceGalContext.
Referenced by DoRePaint(), and recoverFromGalError().
| void WIDGET_DIFF_CANVAS::HighlightChange | ( | std::optional< KIID_PATH > | aChangeId | ) |
Outline shape(s) whose SCENE_SHAPE::changeId matches the given path.
Multiple shapes can share a changeId — DUPLICATE_UUID changes for example — and all matching shapes get the highlight treatment. Pass std::nullopt to clear.
Definition at line 196 of file widget_diff_canvas.cpp.
References KIGFX::COLOR4D::a, BOX2< Vec >::GetHeight(), getItemId(), BOX2< Vec >::GetWidth(), m_contextGroupItems, m_highlight, m_highlightBox, m_hover, m_hoverBox, m_itemCategories, KICAD_DIFF::DIFF_COLOR_THEME::modified, rebuildOverlay(), and KICAD_DIFF::ThemeColorFor().
|
private |
Union bbox of all shapes whose changeId matches the current highlight, honoring per-category visibility.
std::nullopt when nothing matches.
Definition at line 732 of file widget_diff_canvas.cpp.
References KICAD_DIFF::HighlightedBBox(), m_categoryVisible, m_highlight, and m_scene.
Referenced by CenterOnHighlight(), and onChar().
|
inlinestaticinherited |
True for a canvas drawn on the GPU, which keeps cached layers between frames.
Definition at line 151 of file class_draw_panel_gal.h.
References GAL_TYPE_MODERN, and GAL_TYPE_OPENGL.
Referenced by CanvasAfterFailure(), DoRePaint(), GERBVIEW_DRAW_PANEL_GAL::setDefaultLayerDeps(), PCB_DRAW_PANEL_GAL::setDefaultLayerDeps(), SCH_DRAW_PANEL::setDefaultLayerDeps(), GERBVIEW_DRAW_PANEL_GAL::SwitchBackend(), GERBVIEW_FRAME::UpdateXORLayers(), and WIDGET_DIFF_CANVAS::WIDGET_DIFF_CANVAS().
| bool WIDGET_DIFF_CANVAS::IsCategoryVisible | ( | KICAD_DIFF::CATEGORY | aCategory | ) | const |
Definition at line 294 of file widget_diff_canvas.cpp.
References m_categoryVisible.
Referenced by shapeAt().
| bool WIDGET_DIFF_CANVAS::IsChangeHidden | ( | const KIID_PATH & | aChangeId | ) | const |
Definition at line 315 of file widget_diff_canvas.cpp.
References m_hiddenChanges.
|
inlineinherited |
Definition at line 286 of file class_draw_panel_gal.h.
References m_edaFrame, and m_parent.
Referenced by DoRePaint(), PCB_DRAW_PANEL_GAL::OnShow(), and PCB_DRAW_PANEL_GAL::PCB_DRAW_PANEL_GAL().
| bool WIDGET_DIFF_CANVAS::IsLayerVisible | ( | PCB_LAYER_ID | aLayer | ) | const |
Definition at line 370 of file widget_diff_canvas.cpp.
References m_layerVisible.
|
staticinherited |
Count an input so the frame that answers it is never held back by the display-rate limit.
Call before the input is acted on.
Definition at line 1690 of file draw_panel_gal.cpp.
References s_inputSerial.
Referenced by OnEvent(), KIGFX::WX_VIEW_CONTROLS::onMotion(), and KIGFX::WX_VIEW_CONTROLS::onWheel().
|
private |
Definition at line 683 of file widget_diff_canvas.cpp.
References highlightedBBox(), m_highlight, m_pickHandler, m_scene, ZoomToBBox(), and ZoomToFit().
Referenced by WIDGET_DIFF_CANVAS().
|
private |
Definition at line 584 of file widget_diff_canvas.cpp.
References BOX2< Vec >::Contains(), BOX2< Vec >::GetArea(), BOX2< Vec >::GetHeight(), BOX2< Vec >::GetWidth(), KiROUND(), m_contextGroupItems, m_dclickHandler, EDA_DRAW_PANEL_GAL::m_view, KIGFX::VIEW_ITEM::ViewBBox(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by WIDGET_DIFF_CANVAS().
|
protectedinherited |
Definition at line 1718 of file draw_panel_gal.cpp.
References KIUI::IsInputControlFocused(), KIUI::IsModalDialogFocused(), KIPLATFORM::UI::IsWindowActive(), m_edaFrame, m_stealsFocus, and SetFocus().
Referenced by EDA_DRAW_PANEL_GAL().
|
inherited |
Used to forward events to the canvas from popups, etc.
Definition at line 1696 of file draw_panel_gal.cpp.
References KIGFX::WX_VIEW_CONTROLS::EVT_REFRESH_MOUSE, KIUI::IsInputControlFocused(), KIUI::IsModalDialogFocused(), KIPLATFORM::UI::IsWindowActive(), m_edaFrame, m_eventDispatcher, m_lostFocus, m_stealsFocus, NoteInput(), Refresh(), and SetFocus().
Referenced by EDA_DRAW_PANEL_GAL(), and STATUS_POPUP::onCharHook().
|
protectedinherited |
Definition at line 1749 of file draw_panel_gal.cpp.
References m_needIdleRefresh, m_windowId, Refresh(), and traceRhi.
Referenced by ForceRefresh(), and StopDrawing().
|
private |
Definition at line 669 of file widget_diff_canvas.cpp.
References m_hover, m_hoverBox, m_leftPanning, and rebuildOverlay().
Referenced by WIDGET_DIFF_CANVAS().
|
private |
Definition at line 556 of file widget_diff_canvas.cpp.
References m_leftDragPans, m_leftPanLast, m_leftPanning, m_pickHandler, EDA_DRAW_PANEL_GAL::SetFocus(), and shapeAt().
Referenced by WIDGET_DIFF_CANVAS().
|
private |
Definition at line 577 of file widget_diff_canvas.cpp.
References m_leftPanning.
Referenced by WIDGET_DIFF_CANVAS().
|
protectedinherited |
Definition at line 1733 of file draw_panel_gal.cpp.
References m_eventDispatcher, m_lostFocus, and m_viewControls.
Referenced by EDA_DRAW_PANEL_GAL().
|
private |
Definition at line 626 of file widget_diff_canvas.cpp.
References KIGFX::COLOR4D::a, KICAD_DIFF::SCENE_SHAPE::bbox, KICAD_DIFF::SCENE_SHAPE::changeId, KICAD_DIFF::SCENE_SHAPE::color, delta, m_highlight, m_hover, m_hoverBox, m_leftPanLast, m_leftPanning, EDA_DRAW_PANEL_GAL::m_view, rebuildOverlay(), EDA_DRAW_PANEL_GAL::Refresh(), and shapeAt().
Referenced by WIDGET_DIFF_CANVAS().
|
protectedvirtualinherited |
Reimplemented in SCH_DRAW_PANEL, and SCH_PREVIEW_PANEL.
Definition at line 349 of file draw_panel_gal.cpp.
References DoRePaint(), GAL_TYPE_MODERN, and m_backend.
Referenced by ForceRefresh(), SCH_DRAW_PANEL::onPaint(), SCH_PREVIEW_PANEL::onPaint(), and StopDrawing().
|
protectedinherited |
Definition at line 1765 of file draw_panel_gal.cpp.
References DoRePaint(), ForceRefresh(), GAL_TYPE_MODERN, m_backend, m_drawingEnabled, m_refreshDeferred, and RequestRefresh().
Referenced by EDA_DRAW_PANEL_GAL().
|
virtualinherited |
Called when the window is shown for the first time.
Updating the view's items tells whether the canvas can draw, and it falls back to another canvas when it cannot.
Reimplemented in GERBVIEW_DRAW_PANEL_GAL, PCB_DRAW_PANEL_GAL, and SCH_PREVIEW_PANEL.
Definition at line 1667 of file draw_panel_gal.cpp.
References m_edaFrame, m_view, recoverFromGalError(), and StopDrawing().
Referenced by PCB_DRAW_PANEL_GAL::OnShow(), and onShowEvent().
|
protectedinherited |
Definition at line 1784 of file draw_panel_gal.cpp.
References m_gal, m_windowId, OnShow(), and traceRhi.
Referenced by EDA_DRAW_PANEL_GAL(), and ~EDA_DRAW_PANEL_GAL().
|
private |
Definition at line 723 of file widget_diff_canvas.cpp.
References m_zoomToFitPending, and ZoomToFit().
Referenced by WIDGET_DIFF_CANVAS().
|
inlinevirtualinherited |
Hook for subclasses to push per-frame grid sources onto the GAL.
Called from DoRePaint just before GAL::DrawGrid.
Reimplemented in PCB_DRAW_PANEL_GAL.
Definition at line 376 of file class_draw_panel_gal.h.
Referenced by DoRePaint().
|
protectedinherited |
Present the most recently submitted frame packet.
An unmapped surface arms the refresh timer instead.
Definition at line 166 of file draw_panel_gal.cpp.
References backendScreenSize(), displayRefreshRate(), getCachedNativeWindowHandle(), RHI_NATIVE_WINDOW_HANDLE::IsValid(), m_needsExternalRenderingSetup, m_refreshTimer, m_swapchainCtrl, m_windowId, KIPLATFORM::UI::PrepareForExternalRendering(), and traceRhi.
Referenced by DoRePaint().
|
private |
Rebuild the overlay from the render scene + current highlight state.
aOverlayOnly marks only the overlay target dirty (for hover/highlight changes that leave the cached board untouched).
Definition at line 494 of file widget_diff_canvas.cpp.
References m_categoryVisible, m_hiddenChanges, m_highlight, m_highlightBox, m_holdRebuild, m_hoverBox, m_overlay, m_renderScene, EDA_DRAW_PANEL_GAL::m_view, EDA_DRAW_PANEL_GAL::Refresh(), KICAD_DIFF::RenderSceneToOverlay(), and KIGFX::TARGET_OVERLAY.
Referenced by EndUpdate(), HighlightChange(), onLeave(), onMotion(), SetCategoryVisible(), SetContextItems(), SetHiddenChanges(), SetLayerVisible(), and SetScene().
|
protectedinherited |
Definition at line 424 of file draw_panel_gal.cpp.
References _, abandonRhiCanvas(), CanvasAfterFailure(), GAL_FALLBACK, GAL_TYPE_MODERN, GAL_TYPE_NONE, GAL_TYPE_OPENGL, handleContextLoss(), m_backend, m_gal, m_rebuiltAfterReset, m_recoveryAttempted, EDA_DRAW_FRAME::SetCanvasFailed(), showMessageLater(), StartDrawing(), and SwitchBackend().
Referenced by DoRePaint(), and OnShow().
|
overridevirtualinherited |
Reimplemented in SCH_PREVIEW_PANEL.
Definition at line 1236 of file draw_panel_gal.cpp.
References delta, displayRefreshRate(), DoRePaint(), KiROUND(), m_gal, m_lastRepaintStart, m_refreshDeferred, m_refreshTimer, and RequestRefresh().
Referenced by PCB_EDIT_FRAME::ActivateGalCanvas(), SYMBOL_EDIT_FRAME::activateSymbolTab(), SCH_EDIT_FRAME::AnnotateSymbols(), WIDGET_DIFF_CANVAS::CenterOnHighlight(), GERBVIEW_CONTROL::ClearAllLayers(), MULTICHANNEL_TOOL::clearRepeatPreview(), SYMBOL_EDIT_FRAME::CommonSettingsChanged(), PCB_BASE_EDIT_FRAME::configureToolbars(), FOOTPRINT_EDITOR_CONTROL::CreateFootprintFromWizard(), COMMON_TOOLS::doCenter(), SCH_EDIT_FRAME::EditVariantDescription(), GERBVIEW_FRAME::Erase_Current_DrawLayer(), PCB_EDIT_FRAME::ExecuteRemoteCommand(), FOOTPRINT_PREVIEW_PANEL::fitToCurrentFootprint(), PCB_BASE_FRAME::FocusOnItems(), GIT_FILE_DIFF_AREA::followCanvas(), PL_EDITOR_FRAME::GetLayoutFromRedoList(), PL_EDITOR_FRAME::GetLayoutFromUndoList(), PCB_VIEWER_TOOLS::GraphicOutlines(), API_HANDLER_SCH::handleDeleteVariant(), PCB_EDIT_FRAME::HandleRemoteNetHighlight(), API_HANDLER_PCB::handleSetBoardEditorAppearanceSettings(), PL_EDITOR_FRAME::HardRedraw(), GERBVIEW_CONTROL::HighlightControl(), MULTICHANNEL_TOOL::HighlightRepeatAreas(), DISPLAY_FOOTPRINTS_FRAME::InitDisplay(), POSITION_RELATIVE_TOOL::InteractiveOffset(), PCB_EDIT_FRAME::KiwayMailIn(), SCH_EDIT_FRAME::KiwayMailIn(), FOOTPRINT_EDIT_FRAME::LoadFootprintFromBoard(), FOOTPRINT_EDIT_FRAME::LoadFootprintFromLibrary(), GERBVIEW_FRAME::LoadListOfGerberAndDrillFiles(), SYMBOL_EDIT_FRAME::LoadSymbolFromSchematic(), GERBVIEW_CONTROL::LoadZipfile(), PCB_VIEWER_TOOLS::MeasureTool(), FOOTPRINT_EDIT_FRAME::OnEditItemRequest(), OnEvent(), PANEL_COMPONENT_CLASS_ASSIGNMENT::OnHighlightItemsClick(), onIdle(), SCH_EDIT_FRAME::OnModify(), WIDGET_DIFF_CANVAS::onMotion(), PCB_EDIT_FRAME::OnNetlistChanged(), SCH_EDIT_FRAME::onNetNavigatorSelection(), DIALOG_SYMBOL_REMAP::OnRemapSymbols(), GERBVIEW_FRAME::OnSelectActiveDCode(), GERBVIEW_FRAME::OnSelectActiveLayer(), PL_EDITOR_FRAME::OnSelectCoordOriginCorner(), PL_EDITOR_FRAME::OnSelectPage(), GERBVIEW_CONTROL::OpenJobFile(), FOOTPRINT_EDIT_FRAME::OpenProjectFiles(), GERBVIEW_CONTROL::OpenZipFile(), PCB_VIEWER_TOOLS::PadDisplayMode(), ROUTER_TOOL::performRouting(), ROUTER_TOOL::prepareInteractive(), PCB_CONTROL::RatsnestModeCycle(), WIDGET_DIFF_CANVAS::rebuildOverlay(), SYMBOL_EDIT_FRAME::RebuildView(), FOOTPRINT_VIEWER_FRAME::ReCreateLibraryList(), FOOTPRINT_WIZARD_FRAME::ReCreateParameterList(), SYMBOL_VIEWER_FRAME::ReCreateSymbolList(), PCB_EDIT_FRAME::redrawNetnames(), SCH_BASE_FRAME::RedrawScreen(), SCH_PREVIEW_PANEL::Refresh(), ZONE_FILLER_TOOL::refresh(), EDA_DRAW_FRAME::RefreshCanvas(), PCB_EDIT_FRAME::RefreshDrillSymbols(), SCH_EDIT_FRAME::RefreshErcMarkers(), FOOTPRINT_WIZARD_FRAME::RegenerateFootprint(), POSITION_RELATIVE_TOOL::RelativeItemSelectionMove(), GERBVIEW_CONTROL::ReloadAllLayers(), DISPLAY_FOOTPRINTS_FRAME::ReloadFootprint(), GERBVIEW_FRAME::RemapLayers(), SCH_EDIT_FRAME::RemoveVariant(), SCH_EDITOR_CONTROL::ReplaceTerminalPin(), ResizeGal(), PCB_BASE_EDIT_FRAME::RestoreCopyFromRedoList(), PCB_BASE_EDIT_FRAME::RestoreCopyFromUndoList(), FOOTPRINT_EDIT_FRAME::RevertFootprint(), PCB_BASE_EDIT_FRAME::RollbackFromUndo(), PL_EDITOR_FRAME::RollbackFromUndo(), SCH_EDIT_FRAME::RollbackSchematicFromUndo(), SCH_EDIT_FRAME::SaveProject(), FOOTPRINT_VIEWER_FRAME::SelectAndViewFootprint(), FOOTPRINT_EDIT_FRAME::SetActiveLayer(), GERBVIEW_FRAME::SetActiveLayer(), PCB_EDIT_FRAME::SetActiveLayer(), WIDGET_DIFF_CANVAS::SetContextPainter(), PCB_EDIT_FRAME::SetCurrentVariant(), SYMBOL_EDIT_FRAME::SetCurSymbol(), PCB_BASE_FRAME::SetDisplayOptions(), EDA_DRAW_FRAME::SetGridVisibility(), GERBVIEW_FRAME::SetLayerDrawPrms(), PCB_BASE_FRAME::SetPlotSettings(), SYMBOL_VIEWER_FRAME::SetSelectedLibrary(), PCB_EDIT_FRAME::ShowBoardSetupDialog(), SYMBOL_EDIT_FRAME::ShowChangedLanguage(), PCB_EDIT_FRAME::ShowFootprintPropertiesDialog(), PCB_VIEWER_TOOLS::ShowPadNumbers(), SCH_EDIT_FRAME::ShowSchematicSetupDialog(), SCH_EDIT_FRAME::subscribeConnectivity(), SwitchBackend(), SCH_DRAW_PANEL::SwitchBackend(), PCB_BASE_FRAME::SwitchLayer(), PCB_EDIT_FRAME::SwitchLayer(), PCB_VIEWER_TOOLS::TextOutlines(), PCB_CONTROL::ToggleRatsnest(), PCB_CONTROL::TrackDisplayMode(), UpdateOverlayExclusions(), SYMBOL_VIEWER_FRAME::updatePreviewSymbol(), MULTICHANNEL_TOOL::UpdateRepeatPreview(), PANEL_ASSIGN_COMPONENT_CLASSES::Validate(), PCB_CONTROL::ViaDisplayMode(), PCB_CONTROL::ZoneDisplayMode(), GLOBAL_EDIT_TOOL::ZonesManager(), ZONE_PREVIEW_CANVAS::ZoomFitScreen(), WIDGET_DIFF_CANVAS::ZoomToBBox(), and ZoomToFit().
|
private |
Dim context items that are hidden, or unfocused while a highlight is active.
Definition at line 321 of file widget_diff_canvas.cpp.
References getItemId(), m_contextGroupItems, m_hiddenChanges, m_itemDimmer, EDA_DRAW_PANEL_GAL::m_view, path, and KIGFX::REPAINT.
Referenced by SetHiddenChanges().
|
protectedinherited |
Definition at line 154 of file draw_panel_gal.cpp.
References COCOA, m_cachedNativeHandle, m_nativeHandleValid, and RhiMetalDetachHostView().
Referenced by teardownModernRenderInfra().
|
inherited |
Make sure a refresh gets done on the next idle event if it hasn't already.
Definition at line 1212 of file draw_panel_gal.cpp.
References m_needIdleRefresh.
Referenced by DoRePaint(), ZONE_PREVIEW_CANVAS::LockZoom(), onRefreshTimer(), Refresh(), ResizeGal(), PCB_EDIT_FRAME::SetActiveLayer(), ZONE_PREVIEW_CANVAS::ZONE_PREVIEW_CANVAS(), and ZONE_PREVIEW_CANVAS::ZoomFitScreen().
|
inherited |
Resize the GAL to the current client size of this panel.
This must be used in preference to calling GAL::ResizeScreen() directly: it holds the GL context lock while the compositor buffers are reallocated, clamps degenerate sizes and invalidates the view.
| aForce | reallocates even when the client size is unchanged, which is required after a display scale factor change because the buffers are sized in native pixels rather than client units. |
Definition at line 1115 of file draw_panel_gal.cpp.
References backendScreenSize(), GAL_TYPE_MODERN, m_backend, m_gal, m_overlayInsetTop, m_pendingResize, m_swapchainCtrl, m_view, Refresh(), RequestRefresh(), and ToVECTOR2I().
Referenced by DoRePaint(), EDA_DRAW_FRAME::OnMove(), onSize(), and UpdateOverlayExclusions().
|
staticinherited |
Convert a stored canvas type setting into a backend that can actually be used.
A settings file may have been written by hand or by another version of KiCad, so a value outside the supported range is bad data rather than a programming error. It resolves to the OpenGL canvas, as does the retired wxDC canvas (GAL_TYPE_NONE). Only an explicitly stored GAL_TYPE_MODERN selects the RHI canvas.
| aStoredCanvasType | is the raw COMMON_SETTINGS graphics.canvas_type value. |
Definition at line 1378 of file draw_panel_gal.cpp.
References GAL_TYPE_CAIRO, GAL_TYPE_MODERN, and GAL_TYPE_OPENGL.
Referenced by PANEL_COMMON_SETTINGS::applySettingsToPanel(), PANEL_SYMBOL_CHOOSER::constructRightPanel(), EDA_DRAW_PANEL_GAL(), EDA_DRAW_FRAME::loadCanvasTypeSetting(), FOOTPRINT_PREVIEW_PANEL::New(), and PANEL_EESCHEMA_COLOR_SETTINGS::PANEL_EESCHEMA_COLOR_SETTINGS().
|
staticinherited |
Return how many pixels larger than the client area a backend's GAL is made.
Definition at line 1086 of file draw_panel_gal.cpp.
References GAL_TYPE_MODERN, and GAL_TYPE_OPENGL.
Referenced by backendScreenSize(), and SwitchBackend().
| void WIDGET_DIFF_CANVAS::SetCategoryVisible | ( | KICAD_DIFF::CATEGORY | aCategory, |
| bool | aVisible ) |
Toggle whether shapes of a given change category render.
Defaults to all visible.
Definition at line 253 of file widget_diff_canvas.cpp.
References m_categoryVisible, m_itemCategories, EDA_DRAW_PANEL_GAL::m_view, rebuildOverlay(), and KIGFX::REPAINT.
| void WIDGET_DIFF_CANVAS::SetContextItems | ( | const std::vector< KIGFX::VIEW_ITEM * > & | aItems | ) |
Replace source document context items.
Items are not owned by the widget; callers must keep the source documents alive while the dialog is open.
Definition at line 166 of file widget_diff_canvas.cpp.
References buildRenderScene(), m_contextGroup, m_contextGroupItems, m_hasNativeContext, m_itemCategories, EDA_DRAW_PANEL_GAL::m_view, and rebuildOverlay().
Referenced by KICAD_DIFF::ConfigurePcbDiffCanvasContext(), KICAD_DIFF::ConfigureSchDiffCanvasContext(), and KICAD_DIFF::ConfigureSymDiffCanvasContext().
| void WIDGET_DIFF_CANVAS::SetContextPainter | ( | std::unique_ptr< KIGFX::PAINTER > | aPainter | ) |
Install the native painter used for drawing source document context.
pcbnew/eeschema provide module-specific painters configured with a forced neutral color. The diff overlay remains owned by this widget.
Definition at line 154 of file widget_diff_canvas.cpp.
References EDA_DRAW_PANEL_GAL::m_painter, EDA_DRAW_PANEL_GAL::m_view, and EDA_DRAW_PANEL_GAL::Refresh().
Referenced by KICAD_DIFF::ConfigurePcbDiffCanvasContext(), KICAD_DIFF::ConfigureSchDiffCanvasContext(), and KICAD_DIFF::ConfigureSymDiffCanvasContext().
|
inherited |
Set the current cursor shape for this panel.
Definition at line 1799 of file draw_panel_gal.cpp.
References DPI_SCALING_COMMON::GetContentScaleFactor(), CURSOR_STORE::GetCursor(), m_gal, and m_parent.
Referenced by EDIT_TOOL::doMoveSelection(), PAD_TOOL::EnumeratePads(), PCB_VIEWER_TOOLS::MeasureTool(), and SwitchBackend().
|
inline |
Definition at line 161 of file widget_diff_canvas.h.
References m_dclickHandler.
|
inherited |
Set a dispatcher that processes events and forwards them to tools.
EDA_DRAW_PANEL_GAL does not take over the ownership. Passing NULL disconnects all event handlers from the EDA_DRAW_PANEL_GAL and parent frame.
| aEventDispatcher | is the object that will be used for dispatching events. |
Definition at line 1331 of file draw_panel_gal.cpp.
References m_eventDispatcher.
Referenced by GERBVIEW_FRAME::ActivateGalCanvas(), PCB_BASE_FRAME::ActivateGalCanvas(), DISPLAY_FOOTPRINTS_FRAME::DISPLAY_FOOTPRINTS_FRAME(), FOOTPRINT_EDIT_FRAME::doCloseWindow(), FOOTPRINT_CHOOSER_FRAME::FOOTPRINT_CHOOSER_FRAME(), FOOTPRINT_WIZARD_FRAME::FOOTPRINT_WIZARD_FRAME(), FOOTPRINT_EDIT_FRAME::setupTools(), PL_EDITOR_FRAME::setupTools(), SCH_EDIT_FRAME::setupTools(), SYMBOL_EDIT_FRAME::setupTools(), and SYMBOL_VIEWER_FRAME::setupTools().
|
overrideinherited |
Definition at line 341 of file draw_panel_gal.cpp.
References KIPLATFORM::UI::ImeNotifyCancelComposition(), and m_lostFocus.
Referenced by ZONE_CREATE_HELPER::createNewZone(), onEnter(), OnEvent(), WIDGET_DIFF_CANVAS::onLeftDown(), PCB_EDIT_FRAME::OpenProjectFiles(), SCH_DRAW_PANEL::SCH_DRAW_PANEL(), SCH_PREVIEW_PANEL::SCH_PREVIEW_PANEL(), PCB_EDIT_FRAME::SelectViaStack_Event(), FOOTPRINT_EDIT_FRAME::SetActiveLayer(), GERBVIEW_FRAME::SetActiveLayer(), PCB_EDIT_FRAME::SetActiveLayer(), PCB_EDIT_FRAME::ShowBoardSetupDialog(), ZONE_FILLER_TOOL::singleShotRefocus(), PCB_EDIT_FRAME::ToggleSearch(), and PCB_EDIT_FRAME::Tracks_and_Vias_Size_Event().
|
inline |
Make ZoomToFit frame this box instead of the whole document, or everything again when cleared.
Set it before SetScene, which fits as soon as the canvas has a size.
Definition at line 168 of file widget_diff_canvas.h.
References m_focusBox.
| void WIDGET_DIFF_CANVAS::SetHiddenChanges | ( | std::set< KIID_PATH > | aHidden | ) |
Replace the set of muted changes.
Hidden changes render muted grey and stop grabbing clicks.
Definition at line 304 of file widget_diff_canvas.cpp.
References m_hiddenChanges, rebuildOverlay(), and refreshItemDimming().
|
virtualinherited |
Take care of display settings for the given layer to be displayed in high contrast mode.
Reimplemented in GERBVIEW_DRAW_PANEL_GAL, and PCB_DRAW_PANEL_GAL.
Definition at line 1356 of file draw_panel_gal.cpp.
References KIGFX::RENDER_SETTINGS::ClearHighContrastLayers(), m_view, KIGFX::RENDER_SETTINGS::SetLayerIsHighContrast(), and SetTopLayer().
Referenced by GERBVIEW_FRAME::SetActiveLayer(), and PCB_BASE_FRAME::SetDisplayOptions().
| void WIDGET_DIFF_CANVAS::SetItemCategories | ( | std::map< KIGFX::VIEW_ITEM *, KICAD_DIFF::CATEGORY > | aMap | ) |
Tag context items by change category so SetCategoryVisible can hide / show them in lockstep with the diff-category checkboxes.
Definition at line 280 of file widget_diff_canvas.cpp.
References m_categoryVisible, m_itemCategories, and EDA_DRAW_PANEL_GAL::m_view.
Referenced by KICAD_DIFF::ConfigurePcbDiffCanvasContext(), and KICAD_DIFF::ConfigureSchDiffCanvasContext().
|
inline |
Definition at line 109 of file widget_diff_canvas.h.
References m_itemDimmer.
Referenced by KICAD_DIFF::ConfigurePcbDiffCanvasContext(), and KICAD_DIFF::ConfigureSchDiffCanvasContext().
|
inline |
Definition at line 105 of file widget_diff_canvas.h.
References m_itemIdGetter.
Referenced by KICAD_DIFF::ConfigurePcbDiffCanvasContext().
| void WIDGET_DIFF_CANVAS::SetLayerVisible | ( | PCB_LAYER_ID | aLayer, |
| bool | aVisible ) |
Toggle whether board-context geometry on a given PCB layer renders.
Layerless geometry remains visible regardless of this filter.
Definition at line 355 of file widget_diff_canvas.cpp.
References buildRenderScene(), m_layerVisible, EDA_DRAW_PANEL_GAL::m_view, PCB_LAYER_ID_COUNT, and rebuildOverlay().
|
inline |
Let a left drag pan the view, for a canvas with nothing to select by dragging.
Definition at line 164 of file widget_diff_canvas.h.
References m_leftDragPans.
|
inline |
Definition at line 158 of file widget_diff_canvas.h.
References m_pickHandler.
| void WIDGET_DIFF_CANVAS::SetScene | ( | KICAD_DIFF::DIFF_SCENE | aScene | ) |
Replace the displayed scene. Pass an empty scene to clear the canvas.
Definition at line 135 of file widget_diff_canvas.cpp.
References buildRenderScene(), m_highlight, m_scene, rebuildOverlay(), and ZoomToFit().
|
inlineinherited |
Definition at line 121 of file class_draw_panel_gal.h.
References m_statusPopup.
Referenced by PAD_TOOL::EnumeratePads(), POSITION_RELATIVE_TOOL::InteractiveOffset(), MATCH_PROPERTIES_TOOL::runInteractive(), PCB_PICKER_TOOL::SelectItemInteractively(), and PCB_PICKER_TOOL::SelectPointInteractively().
|
inlineinherited |
Set whether focus is taken on certain events (mouseover, keys, etc).
This should be true (and is by default) for any primary canvas, but can be false to make well behaved preview panes and the like.
Definition at line 300 of file class_draw_panel_gal.h.
References m_stealsFocus.
Referenced by SYMBOL_VIEWER_FRAME::ClickOnSymbolList(), FOOTPRINT_PREVIEW_PANEL::FOOTPRINT_PREVIEW_PANEL(), and SYMBOL_VIEWER_FRAME::SetSelectedLibrary().
|
virtualinherited |
Move the selected layer to the top, so it is displayed above all others.
Reimplemented in GERBVIEW_DRAW_PANEL_GAL, PCB_DRAW_PANEL_GAL, and PL_DRAW_PANEL_GAL.
Definition at line 1370 of file draw_panel_gal.cpp.
References m_view.
Referenced by SetHighContrastLayer().
| void WIDGET_DIFF_CANVAS::SetWorldUnitLength | ( | double | aWorldUnitLength | ) |
Definition at line 146 of file widget_diff_canvas.cpp.
References EDA_DRAW_PANEL_GAL::m_gal, and ZoomToFit().
Referenced by KICAD_DIFF::ConfigureSymDiffCanvasContext().
|
private |
Hit test in screen coordinates → topmost SCENE_SHAPE under the cursor.
Definition at line 524 of file widget_diff_canvas.cpp.
References IsCategoryVisible(), KiROUND(), m_hiddenChanges, m_scene, EDA_DRAW_PANEL_GAL::m_view, KICAD_DIFF::PAINT_ORDER, KICAD_DIFF::ShapesFor(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by onLeftDown(), and onMotion().
|
protectedinherited |
Show a recovery message once the current event finishes.
Recovery runs inside a repaint, where a modal dialog would stop every canvas from painting until it was closed.
Definition at line 562 of file draw_panel_gal.cpp.
References DisplayErrorMessage(), DisplayInfoMessage(), and m_parent.
Referenced by abandonRhiCanvas(), DoRePaint(), handleContextLoss(), recoverFromGalError(), and SwitchBackend().
|
inherited |
Begin drawing if it was stopped previously.
Definition at line 1337 of file draw_panel_gal.cpp.
References m_refreshTimer, m_windowId, and traceRhi.
Referenced by EDA_DRAW_FRAME::ActivateGalCanvas(), GERBVIEW_FRAME::ActivateGalCanvas(), PCB_BASE_FRAME::ActivateGalCanvas(), DoRePaint(), FOOTPRINT_PREVIEW_PANEL::FOOTPRINT_PREVIEW_PANEL(), handleContextLoss(), recoverFromGalError(), SCH_DRAW_PANEL::SCH_DRAW_PANEL(), SCH_PREVIEW_PANEL::SCH_PREVIEW_PANEL(), WIDGET_DIFF_CANVAS::WIDGET_DIFF_CANVAS(), and ZONE_PREVIEW_CANVAS::ZONE_PREVIEW_CANVAS().
|
inlineinherited |
Definition at line 116 of file class_draw_panel_gal.h.
References m_statusPopup.
|
inherited |
Prevent the GAL canvas from further drawing until it is recreated or StartDrawing() is called.
Definition at line 1346 of file draw_panel_gal.cpp.
References m_drawingEnabled, m_refreshTimer, onIdle(), and onPaint().
Referenced by FOOTPRINT_EDIT_FRAME::doCloseWindow(), FOOTPRINT_VIEWER_FRAME::doCloseWindow(), GERBVIEW_FRAME::doCloseWindow(), PCB_EDIT_FRAME::doCloseWindow(), SCH_BASE_FRAME::doCloseWindow(), DoRePaint(), OnShow(), SwitchBackend(), DISPLAY_FOOTPRINTS_FRAME::~DISPLAY_FOOTPRINTS_FRAME(), ~EDA_DRAW_PANEL_GAL(), FOOTPRINT_VIEWER_FRAME::~FOOTPRINT_VIEWER_FRAME(), FOOTPRINT_WIZARD_FRAME::~FOOTPRINT_WIZARD_FRAME(), SCH_EDIT_FRAME::~SCH_EDIT_FRAME(), and WIDGET_DIFF_CANVAS::~WIDGET_DIFF_CANVAS().
|
protectedinherited |
Submit the last full scene again with the current camera and cursor, keeping all targets.
Definition at line 581 of file draw_panel_gal.cpp.
References m_dynamicEpoch, m_frameMailbox, m_gal, m_lastFullDynamicDesc, m_lastFullStaticDesc, m_staticEpoch, and s_inputSerial.
Referenced by DoRePaint().
|
virtualinherited |
Switch method of rendering graphics.
| aGalType | is a type of rendering engine that you want to use. |
Reimplemented in GERBVIEW_DRAW_PANEL_GAL, PCB_DRAW_PANEL_GAL, PL_DRAW_PANEL_GAL, and SCH_DRAW_PANEL.
Definition at line 1389 of file draw_panel_gal.cpp.
References _, abandonRhiCanvas(), KIGFX::GAL_MODERN::AcquireRenderThread(), KIGFX::ALL, KIGFX::GAL_MODERN::AllocateWindowId(), ARROW, EDA_DRAW_FRAME::CanvasFailed(), KIGFX::OPENGL_GAL::CheckFeatures(), GAL_FALLBACK, GAL_FALLBACK_AVAILABLE, GAL_TYPE_CAIRO, GAL_TYPE_MODERN, GAL_TYPE_NONE, GAL_TYPE_OPENGL, ADVANCED_CFG::GetCfg(), GetVcSettings(), KI_FALLTHROUGH, m_backend, m_contextBindFailures, m_deviceProxy, m_frameMailbox, m_gal, m_linePipelineKind, m_nativeHandleValid, m_needsExternalRenderingSetup, m_options, m_painter, m_pendingResize, m_renderThread, m_swapchainCtrl, m_touchpadGestureHandler, m_view, m_windowId, pad, KIGFX::PCB_TRACKS, KIPLATFORM::UI::PrepareForExternalRendering(), Refresh(), result, ScreenSizePad(), EDA_DRAW_FRAME::SetCanvasFailed(), KIGFX::GAL_MODERN::SetCentringPad(), SetCurrentCursor(), KIGFX::GAL_MODERN::SetDpiScale(), KIGFX::GAL_MODERN::SetRenderThread(), showMessageLater(), StopDrawing(), teardownModernRenderInfra(), traceRhi, UpdateOverlayExclusions(), UpdateTouchpadGestureHandler(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by abandonRhiCanvas(), DoRePaint(), EDA_DRAW_PANEL_GAL(), handleContextLoss(), recoverFromGalError(), GERBVIEW_DRAW_PANEL_GAL::SwitchBackend(), PCB_DRAW_PANEL_GAL::SwitchBackend(), PL_DRAW_PANEL_GAL::SwitchBackend(), SCH_DRAW_PANEL::SwitchBackend(), and EDA_DRAW_FRAME::SwitchCanvas().
|
protectedinherited |
Stop the RHI render thread and release its swapchain, mailbox and buffers.
Must run before the GAL_MODERN is destroyed, since in-flight uploads point at its geometry.
Definition at line 390 of file draw_panel_gal.cpp.
References m_deviceProxy, m_frameMailbox, m_gal, m_hasLastFullDrawDesc, m_renderThread, m_swapchainCtrl, and releaseCachedNativeWindowHandle().
Referenced by SwitchBackend(), and ~EDA_DRAW_PANEL_GAL().
|
inherited |
Tell the backend which areas of this panel are covered by an overlaid infobar.
Must be called whenever an infobar is shown, hidden or moved.
Definition at line 1176 of file draw_panel_gal.cpp.
References GAL_TYPE_OPENGL, m_backend, m_gal, m_overlayInsetTop, Refresh(), and ResizeGal().
Referenced by SwitchBackend().
|
inherited |
Apply the current native touchpad gesture preference to the active backend window.
Definition at line 1639 of file draw_panel_gal.cpp.
References KIPLATFORM::UI::CreateTouchpadGestureHandler(), GAL_TYPE_MODERN, m_backend, m_gal, m_touchpadGestureHandler, m_viewControls, NATIVE_GESTURES, KIPLATFORM::UI::TOUCHPAD_GESTURE::panX, KIPLATFORM::UI::TOUCHPAD_GESTURE::panY, Pgm(), KIPLATFORM::UI::TOUCHPAD_GESTURE::zoomAnchor, and KIPLATFORM::UI::TOUCHPAD_GESTURE::zoomFactor.
Referenced by EDA_DRAW_FRAME::CommonSettingsChanged(), and SwitchBackend().
| void WIDGET_DIFF_CANVAS::ZoomToBBox | ( | const BOX2I & | aBBox | ) |
Zoom and center on a specific document-space bbox with a small margin.
Definition at line 446 of file widget_diff_canvas.cpp.
References BOX2< Vec >::GetHeight(), BOX2< Vec >::GetLeft(), BOX2< Vec >::GetTop(), BOX2< Vec >::GetWidth(), BOX2< Vec >::Inflate(), EDA_DRAW_PANEL_GAL::m_view, and EDA_DRAW_PANEL_GAL::Refresh().
Referenced by onChar(), and ZoomToFit().
|
inherited |
Scale and centre the view on aBox, and fit it again whenever the canvas changes size until something else zooms or pans.
| aMarginScale | is how much larger than the box the view is. By default a little more on a short canvas, where the infobar covers a larger share. |
Definition at line 1046 of file draw_panel_gal.cpp.
References BOX2< Vec >::Centre(), KIGFX::VIEW::GetCenter(), GetDefaultViewBBox(), BOX2< Vec >::GetHeight(), KIGFX::VIEW::GetScale(), BOX2< Vec >::GetSize(), BOX2< Vec >::GetWidth(), m_automaticFit, m_gal, m_view, Refresh(), scale, KIGFX::VIEW::SetCenter(), KIGFX::VIEW::SetScale(), ToVECTOR2I(), KIGFX::VIEW::ToWorld(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by onSize().
| void WIDGET_DIFF_CANVAS::ZoomToFit | ( | ) |
Center the view on the scene's document bbox.
Safe to call before the canvas has been sized — the request will be deferred to the next wxEVT_SIZE.
Definition at line 392 of file widget_diff_canvas.cpp.
References BOX2< Vec >::GetHeight(), BOX2< Vec >::GetWidth(), m_contextGroupItems, m_focusBox, m_holdRebuild, m_scene, m_zoomToFitPending, BOX2< Vec >::Merge(), and ZoomToBBox().
Referenced by KICAD_DIFF::ConfigureSymDiffCanvasContext(), EndUpdate(), onChar(), onSize(), SetScene(), and SetWorldUnitLength().
|
staticconstexprinherited |
Definition at line 91 of file class_draw_panel_gal.h.
Referenced by abandonRhiCanvas(), CanvasAfterFailure(), DIALOG_BARCODE_PROPERTIES_BASE::DIALOG_BARCODE_PROPERTIES_BASE(), DIALOG_KICAD_DIFF::DIALOG_KICAD_DIFF(), EDA_DRAW_PANEL_GAL(), GIT_FILE_DIFF_AREA::ensureCanvases(), handleContextLoss(), recoverFromGalError(), EDA_DRAW_FRAME::resolveCanvasType(), SCH_DESIGN_BLOCK_PREVIEW_WIDGET::SCH_DESIGN_BLOCK_PREVIEW_WIDGET(), SwitchBackend(), and SYMBOL_PREVIEW_WIDGET::SYMBOL_PREVIEW_WIDGET().
|
staticconstexprinherited |
Definition at line 93 of file class_draw_panel_gal.h.
Referenced by handleContextLoss(), and SwitchBackend().
|
protectedinherited |
What the last ZoomToFit() left, refitted on a resize until the view is zoomed or panned.
Definition at line 498 of file class_draw_panel_gal.h.
Referenced by onSize(), and ZoomToFit().
|
protectedinherited |
Currently used GAL.
Definition at line 487 of file class_draw_panel_gal.h.
Referenced by backendScreenSize(), DoRePaint(), EDA_DRAW_PANEL_GAL(), GetBackend(), GetScreenshot(), handleContextLoss(), onPaint(), onRefreshTimer(), recoverFromGalError(), ResizeGal(), GERBVIEW_DRAW_PANEL_GAL::setDefaultLayerDeps(), PCB_DRAW_PANEL_GAL::setDefaultLayerDeps(), SCH_DRAW_PANEL::setDefaultLayerDeps(), SwitchBackend(), GERBVIEW_DRAW_PANEL_GAL::SwitchBackend(), UpdateOverlayExclusions(), UpdateTouchpadGestureHandler(), WIDGET_DIFF_CANVAS::WIDGET_DIFF_CANVAS(), and ~EDA_DRAW_PANEL_GAL().
|
protectedinherited |
Fetching the handle forces a display-server flush, so it is cached between realizations and fetched again only when m_nativeHandleValid is cleared on swapchain recreation.
Definition at line 542 of file class_draw_panel_gal.h.
Referenced by getCachedNativeWindowHandle(), and releaseCachedNativeWindowHandle().
|
private |
Definition at line 214 of file widget_diff_canvas.h.
Referenced by highlightedBBox(), IsCategoryVisible(), rebuildOverlay(), SetCategoryVisible(), and SetItemCategories().
|
protectedinherited |
Consecutive frames dropped because the GL context could not be made current.
Definition at line 504 of file class_draw_panel_gal.h.
Referenced by DoRePaint(), EDA_DRAW_PANEL_GAL(), and SwitchBackend().
|
private |
Definition at line 224 of file widget_diff_canvas.h.
Referenced by SetContextItems(), WIDGET_DIFF_CANVAS(), and ~WIDGET_DIFF_CANVAS().
|
private |
Definition at line 225 of file widget_diff_canvas.h.
Referenced by HighlightChange(), onDoubleClick(), refreshItemDimming(), SetContextItems(), ZoomToFit(), and ~WIDGET_DIFF_CANVAS().
|
private |
Definition at line 208 of file widget_diff_canvas.h.
Referenced by onDoubleClick(), and SetDoubleClickHandler().
|
protectedinherited |
Optional overlay for drawing transient debug objects.
Definition at line 562 of file class_draw_panel_gal.h.
Referenced by ClearDebugOverlay(), and DebugOverlay().
|
protectedinherited |
The UI thread's access to the device.
Must be destroyed before m_renderThread.
Definition at line 525 of file class_draw_panel_gal.h.
Referenced by SwitchBackend(), and teardownModernRenderInfra().
|
protectedinherited |
True if GAL is currently redrawing the view.
Definition at line 460 of file class_draw_panel_gal.h.
Referenced by DoRePaint(), EDA_DRAW_PANEL_GAL(), and ~EDA_DRAW_PANEL_GAL().
|
protectedinherited |
Flag that determines if VIEW may use GAL for redrawing the screen.
Definition at line 463 of file class_draw_panel_gal.h.
Referenced by DoRePaint(), EDA_DRAW_PANEL_GAL(), ForceRefresh(), onRefreshTimer(), and StopDrawing().
|
protectedinherited |
Definition at line 556 of file class_draw_panel_gal.h.
Referenced by DoRePaint(), and submitCachedScene().
|
protectedinherited |
Parent EDA_DRAW_FRAME (if available)
Definition at line 451 of file class_draw_panel_gal.h.
Referenced by PL_DRAW_PANEL_GAL::DisplayDrawingSheet(), EDA_DRAW_PANEL_GAL(), GetParentEDAFrame(), IsDialogPreview(), onEnter(), OnEvent(), and OnShow().
|
protectedinherited |
Processes and forwards events to tools.
Definition at line 491 of file class_draw_panel_gal.h.
Referenced by EDA_DRAW_PANEL_GAL(), OnEvent(), onLostFocus(), and SetEventDispatcher().
|
private |
Definition at line 241 of file widget_diff_canvas.h.
Referenced by SetFocusBox(), and ZoomToFit().
|
protectedinherited |
Delivers frame packets to the render thread.
Definition at line 530 of file class_draw_panel_gal.h.
Referenced by DoRePaint(), submitCachedScene(), SwitchBackend(), and teardownModernRenderInfra().
|
protectedinherited |
Interface for drawing objects on a 2D-surface.
Definition at line 475 of file class_draw_panel_gal.h.
Referenced by PCB_DRAW_PANEL_GAL::addRatsnest(), DoRePaint(), EDA_DRAW_PANEL_GAL(), ForceRefresh(), GERBVIEW_DRAW_PANEL_GAL::GERBVIEW_DRAW_PANEL_GAL(), GetGAL(), GetScreenshot(), handleContextLoss(), SCH_DRAW_PANEL::onPaint(), onShowEvent(), PCB_DRAW_PANEL_GAL::PCB_DRAW_PANEL_GAL(), PL_DRAW_PANEL_GAL::PL_DRAW_PANEL_GAL(), PCB_DRAW_PANEL_GAL::prepareGridSources(), recoverFromGalError(), Refresh(), ResizeGal(), SCH_DRAW_PANEL::SCH_DRAW_PANEL(), SCH_PREVIEW_PANEL::SCH_PREVIEW_PANEL(), SetCurrentCursor(), PCB_DRAW_PANEL_GAL::setDefaultLayerDeps(), SCH_DRAW_PANEL::setDefaultLayerDeps(), WIDGET_DIFF_CANVAS::SetWorldUnitLength(), submitCachedScene(), SwitchBackend(), PCB_DRAW_PANEL_GAL::SwitchBackend(), SCH_DRAW_PANEL::SwitchBackend(), teardownModernRenderInfra(), PCB_DRAW_PANEL_GAL::updateCanvasFadedLayers(), PCB_DRAW_PANEL_GAL::UpdateColors(), UpdateOverlayExclusions(), UpdateTouchpadGestureHandler(), WIDGET_DIFF_CANVAS::WIDGET_DIFF_CANVAS(), ZONE_PREVIEW_CANVAS::ZONE_PREVIEW_CANVAS(), ZoomToFit(), and ~EDA_DRAW_PANEL_GAL().
|
private |
EDA_DRAW_PANEL_GAL keeps a reference to the options struct, so it must outlive the panel.
Per-instance so siblings can vary if needed.
Definition at line 231 of file widget_diff_canvas.h.
Referenced by WIDGET_DIFF_CANVAS().
|
protectedinherited |
Definition at line 552 of file class_draw_panel_gal.h.
Referenced by DoRePaint(), and teardownModernRenderInfra().
|
private |
Definition at line 223 of file widget_diff_canvas.h.
Referenced by buildRenderScene(), and SetContextItems().
|
private |
Definition at line 216 of file widget_diff_canvas.h.
Referenced by IsChangeHidden(), rebuildOverlay(), refreshItemDimming(), SetHiddenChanges(), and shapeAt().
|
private |
Definition at line 205 of file widget_diff_canvas.h.
Referenced by HighlightChange(), highlightedBBox(), onChar(), onMotion(), rebuildOverlay(), and SetScene().
|
private |
Definition at line 211 of file widget_diff_canvas.h.
Referenced by HighlightChange(), rebuildOverlay(), and WIDGET_DIFF_CANVAS().
|
private |
While true, rebuildOverlay()/ZoomToFit() are held so a batch renders once.
Definition at line 219 of file widget_diff_canvas.h.
Referenced by BeginUpdate(), EndUpdate(), rebuildOverlay(), and ZoomToFit().
|
private |
Definition at line 206 of file widget_diff_canvas.h.
Referenced by HighlightChange(), onLeave(), and onMotion().
|
private |
Definition at line 212 of file widget_diff_canvas.h.
Referenced by HighlightChange(), onLeave(), onMotion(), rebuildOverlay(), and WIDGET_DIFF_CANVAS().
|
private |
Definition at line 226 of file widget_diff_canvas.h.
Referenced by HighlightChange(), SetCategoryVisible(), SetContextItems(), and SetItemCategories().
|
private |
Definition at line 209 of file widget_diff_canvas.h.
Referenced by refreshItemDimming(), and SetItemDimmer().
|
private |
Definition at line 210 of file widget_diff_canvas.h.
Referenced by getItemId(), and SetItemIdGetter().
|
protectedinherited |
Last cursor position sent to GAL for drawing.
Definition at line 472 of file class_draw_panel_gal.h.
Referenced by DoRePaint().
|
protectedinherited |
Definition at line 551 of file class_draw_panel_gal.h.
Referenced by DoRePaint(), and submitCachedScene().
|
protectedinherited |
Draw descriptors of the last full redraw, reused by frames that need no new geometry.
Definition at line 550 of file class_draw_panel_gal.h.
Referenced by DoRePaint(), and submitCachedScene().
|
protectedinherited |
Timestamp of the last repaint end.
Definition at line 454 of file class_draw_panel_gal.h.
Referenced by DoRePaint().
|
protectedinherited |
Timestamp of the last repaint start.
Definition at line 453 of file class_draw_panel_gal.h.
Referenced by DoRePaint(), and Refresh().
|
private |
Definition at line 221 of file widget_diff_canvas.h.
Referenced by buildRenderScene(), IsLayerVisible(), SetLayerVisible(), and WIDGET_DIFF_CANVAS().
|
private |
Definition at line 237 of file widget_diff_canvas.h.
Referenced by onLeftDown(), and SetLeftDragPans().
|
private |
Definition at line 239 of file widget_diff_canvas.h.
Referenced by onLeftDown(), and onMotion().
|
private |
Definition at line 238 of file widget_diff_canvas.h.
Referenced by onLeave(), onLeftDown(), onLeftUp(), and onMotion().
|
protectedinherited |
Fixed in the constructor from the parent frame's editor.
Definition at line 559 of file class_draw_panel_gal.h.
Referenced by DoRePaint(), EDA_DRAW_PANEL_GAL(), and SwitchBackend().
|
protectedinherited |
Flag to indicate that focus should be regained on the next mouse event.
It is a workaround for cases when the panel loses keyboard focus, so it does not react to hotkeys anymore.
Definition at line 495 of file class_draw_panel_gal.h.
Referenced by EDA_DRAW_PANEL_GAL(), OnEvent(), onLostFocus(), and SetFocus().
|
inherited |
used on wxMSW: true after a wxEVT_MOUSE_CAPTURE_LOST was received false after the mouse is recaptured.
Used to avoid calling twice a CaptureMouse(), not accepted by wxMSW
Definition at line 368 of file class_draw_panel_gal.h.
Referenced by EDA_DRAW_PANEL_GAL().
|
protectedinherited |
Definition at line 543 of file class_draw_panel_gal.h.
Referenced by getCachedNativeWindowHandle(), releaseCachedNativeWindowHandle(), and SwitchBackend().
|
protectedinherited |
True when canvas needs to be refreshed from idle handler.
Definition at line 466 of file class_draw_panel_gal.h.
Referenced by EDA_DRAW_PANEL_GAL(), onIdle(), and RequestRefresh().
|
protectedinherited |
True until the first paint completes the deferred GTK drawing suppression.
Definition at line 536 of file class_draw_panel_gal.h.
Referenced by presentFrame(), and SwitchBackend().
|
protectedinherited |
Definition at line 488 of file class_draw_panel_gal.h.
Referenced by DoRePaint(), EDA_DRAW_PANEL_GAL(), and SwitchBackend().
|
private |
Definition at line 227 of file widget_diff_canvas.h.
Referenced by rebuildOverlay(), and WIDGET_DIFF_CANVAS().
|
protectedinherited |
Rows at the top of the panel left to the infobars where the backend window would hide them.
Definition at line 513 of file class_draw_panel_gal.h.
Referenced by backendScreenSize(), ResizeGal(), and UpdateOverlayExclusions().
|
protectedinherited |
Contains information about how to draw items using GAL.
Definition at line 481 of file class_draw_panel_gal.h.
Referenced by DoRePaint(), EDA_DRAW_PANEL_GAL(), GERBVIEW_DRAW_PANEL_GAL::GERBVIEW_DRAW_PANEL_GAL(), SCH_PREVIEW_PANEL::GetRenderSettings(), PCB_DRAW_PANEL_GAL::PCB_DRAW_PANEL_GAL(), PL_DRAW_PANEL_GAL::PL_DRAW_PANEL_GAL(), SCH_DRAW_PANEL::SCH_DRAW_PANEL(), SCH_PREVIEW_PANEL::SCH_PREVIEW_PANEL(), WIDGET_DIFF_CANVAS::SetContextPainter(), SwitchBackend(), WIDGET_DIFF_CANVAS::WIDGET_DIFF_CANVAS(), and ZONE_PREVIEW_CANVAS::ZONE_PREVIEW_CANVAS().
|
inherited |
Definition at line 370 of file class_draw_panel_gal.h.
Referenced by EDA_DRAW_PANEL_GAL().
|
protectedinherited |
Pointer to the parent window.
Definition at line 450 of file class_draw_panel_gal.h.
Referenced by EDA_DRAW_PANEL_GAL(), IsDialogPreview(), SetCurrentCursor(), and showMessageLater().
|
protectedinherited |
Set when a size change could not be applied because the GL context was unavailable.
Definition at line 510 of file class_draw_panel_gal.h.
Referenced by DoRePaint(), EDA_DRAW_PANEL_GAL(), ResizeGal(), and SwitchBackend().
|
private |
Definition at line 207 of file widget_diff_canvas.h.
Referenced by onChar(), onLeftDown(), and SetPickHandler().
|
protectedinherited |
The GAL was rebuilt after a GPU reset and has not completed a frame yet.
Definition at line 507 of file class_draw_panel_gal.h.
Referenced by DoRePaint(), EDA_DRAW_PANEL_GAL(), handleContextLoss(), and recoverFromGalError().
|
protectedinherited |
Set after a GPU recovery attempt to prevent infinite retry loops.
Definition at line 501 of file class_draw_panel_gal.h.
Referenced by DoRePaint(), EDA_DRAW_PANEL_GAL(), and recoverFromGalError().
|
protectedinherited |
The refresh timer was armed by Refresh() for a repaint it postponed.
Definition at line 469 of file class_draw_panel_gal.h.
Referenced by onRefreshTimer(), and Refresh().
|
protectedinherited |
Blocks multiple calls to the draw.
Definition at line 457 of file class_draw_panel_gal.h.
Referenced by DoRePaint().
|
protectedinherited |
What displayRefreshRate() last asked the window system.
Definition at line 546 of file class_draw_panel_gal.h.
Referenced by displayRefreshRate().
|
protectedinherited |
Definition at line 547 of file class_draw_panel_gal.h.
Referenced by displayRefreshRate().
|
protectedinherited |
Timer to prevent too-frequent refreshing.
Definition at line 455 of file class_draw_panel_gal.h.
Referenced by EDA_DRAW_PANEL_GAL(), ForceRefresh(), handleContextLoss(), presentFrame(), Refresh(), StartDrawing(), and StopDrawing().
|
private |
Definition at line 204 of file widget_diff_canvas.h.
Referenced by buildRenderScene(), and rebuildOverlay().
|
protectedinherited |
The render thread that owns the RHI device, shared by every canvas, see GAL_MODERN::AcquireRenderThread()
Definition at line 522 of file class_draw_panel_gal.h.
Referenced by DoRePaint(), GetScreenshot(), SwitchBackend(), and teardownModernRenderInfra().
|
private |
Definition at line 203 of file widget_diff_canvas.h.
Referenced by buildRenderScene(), highlightedBBox(), onChar(), SetScene(), shapeAt(), and ZoomToFit().
|
protectedinherited |
Content generations of the static and dynamic pools last submitted, see FRAME_PACKET.
Definition at line 555 of file class_draw_panel_gal.h.
Referenced by DoRePaint(), and submitCachedScene().
|
protectedinherited |
Definition at line 519 of file class_draw_panel_gal.h.
Referenced by EDA_DRAW_PANEL_GAL(), SetStatusPopup(), and StatusPopupHasFocus().
|
protectedinherited |
Flag to indicate whether the panel should take focus at certain times (when moused over, and on various mouse/key events)
Definition at line 517 of file class_draw_panel_gal.h.
Referenced by EDA_DRAW_PANEL_GAL(), onEnter(), OnEvent(), and SetStealsFocus().
|
protectedinherited |
Definition at line 527 of file class_draw_panel_gal.h.
Referenced by DoRePaint(), presentFrame(), ResizeGal(), SwitchBackend(), and teardownModernRenderInfra().
|
protectedinherited |
Definition at line 564 of file class_draw_panel_gal.h.
Referenced by SwitchBackend(), UpdateTouchpadGestureHandler(), and ~EDA_DRAW_PANEL_GAL().
|
protectedinherited |
Stores view settings (scale, center, etc.) and items to be drawn.
Definition at line 478 of file class_draw_panel_gal.h.
Referenced by PCB_DRAW_PANEL_GAL::addRatsnest(), PCB_DRAW_PANEL_GAL::applyHighContrastLayer(), PCB_DRAW_PANEL_GAL::beforeRedraw(), WIDGET_DIFF_CANVAS::CenterOnHighlight(), ClearDebugOverlay(), DebugOverlay(), PCB_DRAW_PANEL_GAL::DisplayBoard(), PL_DRAW_PANEL_GAL::DisplayDrawingSheet(), DoRePaint(), EDA_DRAW_PANEL_GAL(), GERBVIEW_DRAW_PANEL_GAL::GERBVIEW_DRAW_PANEL_GAL(), GERBVIEW_DRAW_PANEL_GAL::GetDefaultViewBBox(), PCB_DRAW_PANEL_GAL::GetDefaultViewBBox(), GetView(), PCB_DRAW_PANEL_GAL::GetView(), SCH_DRAW_PANEL::GetView(), ZONE_PREVIEW_CANVAS::LockZoom(), WIDGET_DIFF_CANVAS::onDoubleClick(), WIDGET_DIFF_CANVAS::onMotion(), OnShow(), GERBVIEW_DRAW_PANEL_GAL::OnShow(), PCB_DRAW_PANEL_GAL::OnShow(), onSize(), PCB_DRAW_PANEL_GAL::PCB_DRAW_PANEL_GAL(), PL_DRAW_PANEL_GAL::PL_DRAW_PANEL_GAL(), WIDGET_DIFF_CANVAS::rebuildOverlay(), PCB_DRAW_PANEL_GAL::RedrawRatsnest(), WIDGET_DIFF_CANVAS::refreshItemDimming(), ResizeGal(), SCH_DRAW_PANEL::SCH_DRAW_PANEL(), SCH_PREVIEW_PANEL::SCH_PREVIEW_PANEL(), WIDGET_DIFF_CANVAS::SetCategoryVisible(), WIDGET_DIFF_CANVAS::SetContextItems(), WIDGET_DIFF_CANVAS::SetContextPainter(), GERBVIEW_DRAW_PANEL_GAL::setDefaultLayerDeps(), PCB_DRAW_PANEL_GAL::setDefaultLayerDeps(), PL_DRAW_PANEL_GAL::setDefaultLayerDeps(), SCH_DRAW_PANEL::setDefaultLayerDeps(), SCH_PREVIEW_PANEL::setDefaultLayerDeps(), PCB_DRAW_PANEL_GAL::setDefaultLayerOrder(), SCH_DRAW_PANEL::setDefaultLayerOrder(), SCH_PREVIEW_PANEL::setDefaultLayerOrder(), GERBVIEW_DRAW_PANEL_GAL::SetDrawingSheet(), PCB_DRAW_PANEL_GAL::SetDrawingSheet(), SetHighContrastLayer(), GERBVIEW_DRAW_PANEL_GAL::SetHighContrastLayer(), WIDGET_DIFF_CANVAS::SetItemCategories(), WIDGET_DIFF_CANVAS::SetLayerVisible(), SetTopLayer(), GERBVIEW_DRAW_PANEL_GAL::SetTopLayer(), PCB_DRAW_PANEL_GAL::SetTopLayer(), PL_DRAW_PANEL_GAL::SetTopLayer(), WIDGET_DIFF_CANVAS::shapeAt(), SwitchBackend(), GERBVIEW_DRAW_PANEL_GAL::SwitchBackend(), PCB_DRAW_PANEL_GAL::SwitchBackend(), PCB_DRAW_PANEL_GAL::SyncLayersVisibility(), PCB_DRAW_PANEL_GAL::updateCanvasFadedLayers(), PCB_DRAW_PANEL_GAL::UpdateColors(), SCH_PREVIEW_PANEL::view(), WIDGET_DIFF_CANVAS::WIDGET_DIFF_CANVAS(), ZONE_PREVIEW_CANVAS::ZONE_PREVIEW_CANVAS(), ZONE_PREVIEW_CANVAS::ZoomFitScreen(), WIDGET_DIFF_CANVAS::ZoomToBBox(), ZoomToFit(), ~EDA_DRAW_PANEL_GAL(), and WIDGET_DIFF_CANVAS::~WIDGET_DIFF_CANVAS().
|
protectedinherited |
Control for VIEW (moving, zooming, etc.)
Definition at line 484 of file class_draw_panel_gal.h.
Referenced by DoRePaint(), EDA_DRAW_PANEL_GAL(), GERBVIEW_DRAW_PANEL_GAL::GERBVIEW_DRAW_PANEL_GAL(), GetViewControls(), onLostFocus(), PCB_DRAW_PANEL_GAL::PCB_DRAW_PANEL_GAL(), PL_DRAW_PANEL_GAL::PL_DRAW_PANEL_GAL(), SCH_DRAW_PANEL::SCH_DRAW_PANEL(), SCH_PREVIEW_PANEL::SCH_PREVIEW_PANEL(), UpdateTouchpadGestureHandler(), WIDGET_DIFF_CANVAS::WIDGET_DIFF_CANVAS(), and ~EDA_DRAW_PANEL_GAL().
|
protectedinherited |
Routes this window's work on the render thread.
Definition at line 533 of file class_draw_panel_gal.h.
Referenced by DoRePaint(), ForceRefresh(), GetScreenshot(), onIdle(), onShowEvent(), presentFrame(), StartDrawing(), SwitchBackend(), and ~EDA_DRAW_PANEL_GAL().
|
private |
True when a ZoomToFit was requested before the canvas had a real size — the next onSize will retry the fit and clear this.
Definition at line 235 of file widget_diff_canvas.h.
Referenced by EndUpdate(), onSize(), and ZoomToFit().