KiCad PCB EDA Suite
Loading...
Searching...
No Matches
SCH_PREVIEW_PANEL Class Reference

#include <sch_preview_panel.h>

Inheritance diagram for SCH_PREVIEW_PANEL:
EDA_DRAW_PANEL_GAL

Public Types

enum  GAL_TYPE {
  GAL_TYPE_UNKNOWN = -1 , GAL_TYPE_NONE = 0 , GAL_TYPE_OPENGL , GAL_TYPE_CAIRO ,
  GAL_TYPE_LAST
}
 

Public Member Functions

 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 OnShow () override
 Called when the window is shown for the first time.
 
void Refresh (bool aEraseBackground, const wxRect *aRect) override
 
SCH_RENDER_SETTINGSGetRenderSettings () const
 
void SetFocus () override
 
bool StatusPopupHasFocus ()
 
void SetStatusPopup (wxWindow *aPopup)
 
virtual bool SwitchBackend (GAL_TYPE aGalType)
 Switch method of rendering graphics.
 
GAL_TYPE GetBackend () const
 Return the type of backend currently used by GAL canvas.
 
KIGFX::GALGetGAL () const
 Return a pointer to the GAL instance used in the panel.
 
virtual KIGFX::VIEWGetView () const
 Return a pointer to the #VIEW instance used in the panel.
 
KIGFX::VIEW_CONTROLSGetViewControls () const
 Return a pointer to the #VIEW_CONTROLS instance used in the panel.
 
void ForceRefresh ()
 Force a redraw.
 
void RequestRefresh ()
 Make sure a refresh gets done on the next idle event if it hasn't already.
 
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_FRAMEGetParentEDAFrame () const
 Returns parent EDA_DRAW_FRAME, if available or NULL otherwise.
 
bool IsDialogPreview () const
 
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 OnEvent (wxEvent &aEvent)
 Used to forward events to the canvas from popups, etc.
 
bool DoRePaint ()
 Repaint the canvas, and fix scrollbar cursors.
 
std::shared_ptr< KIGFX::VIEW_OVERLAYDebugOverlay ()
 Create an overlay for rendering debug graphics.
 
void ClearDebugOverlay ()
 Clear the contents of the debug overlay and removes it from the VIEW.
 

Static Public Member Functions

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_COUNTERm_PaintEventCounter
 

Static Public Attributes

static constexpr GAL_TYPE GAL_FALLBACK = GAL_TYPE_CAIRO
 

Protected Member Functions

void onPaint (wxPaintEvent &WXUNUSED(aEvent)) override
 
KIGFX::SCH_VIEWview () const
 Reassign layer order to the initial settings.
 
void setDefaultLayerOrder ()
 Set rendering targets & dependencies for layers.
 
void setDefaultLayerDeps ()
 
void onSize (wxSizeEvent &aEvent)
 
void onEnter (wxMouseEvent &aEvent)
 
void onLostFocus (wxFocusEvent &aEvent)
 
void onIdle (wxIdleEvent &aEvent)
 
void onRefreshTimer (wxTimerEvent &aEvent)
 
void onShowTimer (wxTimerEvent &aEvent)
 

Protected Attributes

wxWindow * m_parent
 Pointer to the parent window.
 
EDA_DRAW_FRAMEm_edaFrame
 Parent EDA_DRAW_FRAME (if available)
 
wxLongLong m_lastRepaintStart
 Timestamp of the last repaint start.
 
wxLongLong 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.
 
wxTimer m_onShowTimer
 Timer used to execute OnShow() when the window finally appears on the screen.
 
KIGFX::GALm_gal
 Interface for drawing objects on a 2D-surface.
 
KIGFX::VIEWm_view
 Stores view settings (scale, center, etc.) and items to be drawn.
 
std::unique_ptr< KIGFX::PAINTERm_painter
 Contains information about how to draw items using GAL.
 
KIGFX::WX_VIEW_CONTROLSm_viewControls
 Control for VIEW (moving, zooming, etc.)
 
GAL_TYPE m_backend
 Currently used GAL.
 
KIGFX::GAL_DISPLAY_OPTIONSm_options
 
TOOL_DISPATCHERm_eventDispatcher
 Processes and forwards events to tools.
 
bool m_lostFocus
 Flag to indicate that focus should be regained on the next mouse event.
 
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::VIEW_OVERLAYm_debugOverlay
 Optional overlay for drawing transient debug objects.
 

Detailed Description

Definition at line 41 of file sch_preview_panel.h.

Member Enumeration Documentation

◆ GAL_TYPE

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_LAST 

Sentinel, do not use as a parameter.

Definition at line 63 of file class_draw_panel_gal.h.

Constructor & Destructor Documentation

◆ SCH_PREVIEW_PANEL()

◆ ~SCH_PREVIEW_PANEL()

SCH_PREVIEW_PANEL::~SCH_PREVIEW_PANEL ( )
override

Called when the window is shown for the first time.

Definition at line 88 of file sch_preview_panel.cpp.

Member Function Documentation

◆ ClearDebugOverlay()

void EDA_DRAW_PANEL_GAL::ClearDebugOverlay ( )
inherited

Clear the contents of the debug overlay and removes it from the VIEW.

Definition at line 692 of file draw_panel_gal.cpp.

References EDA_DRAW_PANEL_GAL::m_debugOverlay, EDA_DRAW_PANEL_GAL::m_view, and KIGFX::VIEW::Remove().

◆ DebugOverlay()

std::shared_ptr< KIGFX::VIEW_OVERLAY > EDA_DRAW_PANEL_GAL::DebugOverlay ( )
inherited

Create an overlay for rendering debug graphics.

Definition at line 680 of file draw_panel_gal.cpp.

References KIGFX::VIEW::Add(), EDA_DRAW_PANEL_GAL::m_debugOverlay, and EDA_DRAW_PANEL_GAL::m_view.

◆ DoRePaint()

bool EDA_DRAW_PANEL_GAL::DoRePaint ( )
inherited

Repaint the canvas, and fix scrollbar cursors.

Usually called by a OnPaint event.

Because it does not use a wxPaintDC, it can be called outside a wxPaintEvent.

Returns
true if the repaint attempt was successful.

Definition at line 197 of file draw_panel_gal.cpp.

References _, KIGFX::GAL::ClearScreen(), KIGFX::VIEW::ClearTargets(), DisplayErrorMessage(), DisplayInfoMessage(), KIGFX::GAL::DrawCursor(), KIGFX::GAL::DrawGrid(), EDA_DRAW_PANEL_GAL::GAL_FALLBACK, EDA_DRAW_PANEL_GAL::GAL_TYPE_OPENGL, KIGFX::RENDER_SETTINGS::GetBackgroundColor(), KIGFX::VIEW::GetCenter(), KIGFX::RENDER_SETTINGS::GetCursorColor(), KIGFX::WX_VIEW_CONTROLS::GetCursorPosition(), KIGFX::RENDER_SETTINGS::GetGridColor(), EDA_DRAW_PANEL_GAL::GetParentEDAFrame(), EDA_DRAW_FRAME::GetScreen(), EDA_DRAW_PANEL_GAL::GetView(), KIGFX::GAL::HasTarget(), KIGFX::GAL::IsContextLocked(), EDA_DRAW_PANEL_GAL::IsDialogPreview(), KIGFX::VIEW::IsDirty(), KIGFX::GAL::IsInitialized(), KIGFX::VIEW::IsTargetDirty(), KIGFX::GAL::IsVisible(), KI_TRACE, EDA_DRAW_PANEL_GAL::m_backend, EDA_DRAW_PANEL_GAL::m_drawing, EDA_DRAW_PANEL_GAL::m_drawingEnabled, EDA_DRAW_PANEL_GAL::m_gal, EDA_DRAW_PANEL_GAL::m_lastRepaintEnd, EDA_DRAW_PANEL_GAL::m_lastRepaintStart, EDA_DRAW_PANEL_GAL::m_painter, EDA_DRAW_PANEL_GAL::m_parent, EDA_DRAW_PANEL_GAL::m_refreshMutex, BASE_SCREEN::m_ScrollCenter, EDA_DRAW_PANEL_GAL::m_view, EDA_DRAW_PANEL_GAL::m_viewControls, KIGFX::VIEW::MarkDirty(), Pgm(), KIGFX::VIEW::Redraw(), KIGFX::GAL::SetClearColor(), KIGFX::GAL::SetCursorColor(), KIGFX::GAL::SetGridColor(), PROF_TIMER::Start(), EDA_DRAW_PANEL_GAL::StartDrawing(), PROF_TIMER::Stop(), EDA_DRAW_PANEL_GAL::StopDrawing(), EDA_DRAW_PANEL_GAL::SwitchBackend(), KIGFX::TARGET_NONCACHED, KIGFX::TARGET_OVERLAY, PROF_TIMER::to_string(), traceDrawPanel, traceGalProfile, KIGFX::VIEW::UpdateItems(), and KIGFX::WX_VIEW_CONTROLS::UpdateScrollbars().

Referenced by EDA_DRAW_PANEL_GAL::ForceRefresh(), EDA_DRAW_PANEL_GAL::onPaint(), and EDA_DRAW_PANEL_GAL::Refresh().

◆ ForceRefresh()

void EDA_DRAW_PANEL_GAL::ForceRefresh ( )
inherited

Force a redraw.

Definition at line 403 of file draw_panel_gal.cpp.

References EDA_DRAW_PANEL_GAL::DoRePaint(), KIGFX::GAL::IsInitialized(), EDA_DRAW_PANEL_GAL::m_drawingEnabled, EDA_DRAW_PANEL_GAL::m_gal, EDA_DRAW_PANEL_GAL::m_refreshTimer, EDA_DRAW_PANEL_GAL::onIdle(), and EDA_DRAW_PANEL_GAL::onPaint().

Referenced by SCH_EDITOR_CONTROL::AssignNetclass(), BOARD_EDITOR_CONTROL::AssignNetclass(), SCH_EDIT_FRAME::CommonSettingsChanged(), SYMBOL_EDIT_FRAME::CommonSettingsChanged(), SYMBOL_VIEWER_FRAME::CommonSettingsChanged(), GERBVIEW_FRAME::CommonSettingsChanged(), PL_EDITOR_FRAME::CommonSettingsChanged(), FOOTPRINT_EDIT_FRAME::CommonSettingsChanged(), FOOTPRINT_VIEWER_FRAME::CommonSettingsChanged(), PCB_EDIT_FRAME::CommonSettingsChanged(), DESIGN_BLOCK_PREVIEW_WIDGET::DisplayDesignBlock(), FOOTPRINT_PREVIEW_PANEL::DisplayFootprint(), SYMBOL_PREVIEW_WIDGET::DisplayPart(), SYMBOL_PREVIEW_WIDGET::DisplaySymbol(), PCB_SELECTION_TOOL::doSyncSelection(), PAD_TOOL::ExitPadEditMode(), PCB_SELECTION_TOOL::FindItem(), COMMON_TOOLS::GridOrigin(), SCH_BASE_FRAME::HardRedraw(), SCH_EDIT_FRAME::HardRedraw(), FOOTPRINT_EDIT_FRAME::HardRedraw(), GERBVIEW_SELECTION_TOOL::Main(), PL_SELECTION_TOOL::Main(), PCB_SELECTION_TOOL::Main(), EDA_DRAW_PANEL_GAL::onRefreshTimer(), DESIGN_BLOCK_PREVIEW_WIDGET::onSize(), SYMBOL_PREVIEW_WIDGET::onSize(), SYMBOL_DIFF_WIDGET::onSlider(), POSITION_RELATIVE_TOOL::PositionRelativeInteractively(), FOOTPRINT_PREVIEW_PANEL::RefreshAll(), PCB_SELECTION_TOOL::RequestSelection(), FOOTPRINT_EDITOR_CONTROL::Save(), FOOTPRINT_EDITOR_CONTROL::SaveAs(), PCB_SELECTION_TOOL::SelectAll(), PCB_SELECTION_TOOL::selectAllConnectedTracks(), NL_SCHEMATIC_PLUGIN_IMPL::SetTransaction(), NL_GERBVIEW_PLUGIN_IMPL::SetTransaction(), NL_PL_EDITOR_PLUGIN_IMPL::SetTransaction(), NL_PCBNEW_PLUGIN_IMPL::SetTransaction(), COMMON_TOOLS::ToggleBoundingBoxes(), DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS::TransferDataFromWindow(), PCB_SELECTION_TOOL::UnselectAll(), PANEL_EESCHEMA_COLOR_SETTINGS::zoomFitPreview(), PANEL_PCBNEW_COLOR_SETTINGS::zoomFitPreview(), and PCB_SELECTION_TOOL::zoomFitSelection().

◆ GetBackend()

◆ GetDefaultViewBBox()

virtual BOX2I EDA_DRAW_PANEL_GAL::GetDefaultViewBBox ( ) const
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

Returns
the default bounding box for the panel.

Reimplemented in GERBVIEW_DRAW_PANEL_GAL, and PCB_DRAW_PANEL_GAL.

Definition at line 220 of file class_draw_panel_gal.h.

Referenced by COMMON_TOOLS::doCenter(), and COMMON_TOOLS::doZoomFit().

◆ GetGAL()

KIGFX::GAL * EDA_DRAW_PANEL_GAL::GetGAL ( ) const
inlineinherited

Return a pointer to the GAL instance used in the panel.

Returns
The instance of GAL.

Definition at line 121 of file class_draw_panel_gal.h.

References EDA_DRAW_PANEL_GAL::m_gal.

Referenced by GERBVIEW_FRAME::ActivateGalCanvas(), FOOTPRINT_EDIT_FRAME::ActivateGalCanvas(), SCH_BASE_FRAME::CommonSettingsChanged(), SYMBOL_VIEWER_FRAME::CommonSettingsChanged(), PANEL_EESCHEMA_COLOR_SETTINGS::createSwatches(), PANEL_PCBNEW_COLOR_SETTINGS::createSwatches(), DESIGN_BLOCK_PREVIEW_WIDGET::DESIGN_BLOCK_PREVIEW_WIDGET(), DIALOG_BOARD_REANNOTATE::DIALOG_BOARD_REANNOTATE(), GERBVIEW_FRAME::DisplayGridMsg(), GERBVIEW_DRAW_PANEL_GAL::GERBVIEW_DRAW_PANEL_GAL(), NL_SCHEMATIC_PLUGIN_IMPL::GetModelExtents(), NL_GERBVIEW_PLUGIN_IMPL::GetModelExtents(), NL_PL_EDITOR_PLUGIN_IMPL::GetModelExtents(), NL_PCBNEW_PLUGIN_IMPL::GetModelExtents(), EDA_DRAW_FRAME::GetNearestGridPosition(), EDA_DRAW_FRAME::GetNearestHalfGridPosition(), NL_SCHEMATIC_PLUGIN_IMPL::GetViewExtents(), NL_GERBVIEW_PLUGIN_IMPL::GetViewExtents(), NL_PL_EDITOR_PLUGIN_IMPL::GetViewExtents(), NL_PCBNEW_PLUGIN_IMPL::GetViewExtents(), EDA_DRAW_FRAME::GetZoomLevelIndicator(), EDA_DRAW_FRAME::OnMove(), GERBER_LAYER_WIDGET::OnRenderEnable(), EDA_DRAW_FRAME::OnUpdateSelectZoom(), PL_DRAW_PANEL_GAL::PL_DRAW_PANEL_GAL(), PCB_EDIT_FRAME::RebuildAndRefresh(), 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(), SYMBOL_EDIT_FRAME::SwitchCanvas(), FOOTPRINT_EDIT_FRAME::SwitchCanvas(), SYMBOL_DIFF_FRAME::SYMBOL_DIFF_FRAME(), SYMBOL_PREVIEW_WIDGET::SYMBOL_PREVIEW_WIDGET(), ZOOM_MENU::update(), PANEL_EESCHEMA_COLOR_SETTINGS::updatePreview(), PANEL_PCBNEW_COLOR_SETTINGS::updatePreview(), and EDA_DRAW_FRAME::UpdateZoomSelectBox().

◆ GetMsgPanelInfo()

virtual void EDA_DRAW_PANEL_GAL::GetMsgPanelInfo ( EDA_DRAW_FRAME aFrame,
std::vector< MSG_PANEL_ITEM > &  aList 
)
inlinevirtualinherited

Reimplemented in GERBVIEW_DRAW_PANEL_GAL, PL_DRAW_PANEL_GAL, and PCB_DRAW_PANEL_GAL.

Definition at line 184 of file class_draw_panel_gal.h.

◆ GetParentEDAFrame()

◆ GetRenderSettings()

SCH_RENDER_SETTINGS * SCH_PREVIEW_PANEL::GetRenderSettings ( ) const

◆ GetVcSettings()

KIGFX::VC_SETTINGS EDA_DRAW_PANEL_GAL::GetVcSettings ( )
staticinherited

Gets a populated View Controls settings object dervived from our program settings.

Definition at line 702 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_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, 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(), and EDA_DRAW_PANEL_GAL::SwitchBackend().

◆ GetView()

virtual KIGFX::VIEW * EDA_DRAW_PANEL_GAL::GetView ( ) const
inlinevirtualinherited

Return a pointer to the #VIEW instance used in the panel.

Returns
The instance of #VIEW.

Reimplemented in SCH_DRAW_PANEL, and PCB_DRAW_PANEL_GAL.

Definition at line 128 of file class_draw_panel_gal.h.

References EDA_DRAW_PANEL_GAL::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(), PANEL_EESCHEMA_COLOR_SETTINGS::createPreviewItems(), DIALOG_PRINT_GERBVIEW::createPrintout(), DESIGN_BLOCK_PREVIEW_WIDGET::DESIGN_BLOCK_PREVIEW_WIDGET(), GERBVIEW_CONTROL::DisplayControl(), DESIGN_BLOCK_PREVIEW_WIDGET::DisplayDesignBlock(), SYMBOL_DIFF_WIDGET::DisplayDiff(), SYMBOL_PREVIEW_WIDGET::DisplayPart(), SYMBOL_PREVIEW_WIDGET::DisplaySymbol(), GERBVIEW_FRAME::doCloseWindow(), EDA_DRAW_PANEL_GAL::DoRePaint(), DESIGN_BLOCK_PREVIEW_WIDGET::fitOnDrawArea(), SYMBOL_PREVIEW_WIDGET::fitOnDrawArea(), EDA_DRAW_FRAME::FocusOnLocation(), GERBVIEW_FRAME::GetVisibleLayers(), GERBVIEW_CONTROL::HighlightControl(), PROPERTIES_FRAME::OnAcceptPrms(), GERBER_LAYER_WIDGET::OnLayerColorChange(), GERBER_LAYER_WIDGET::OnLayerSelect(), EDA_DRAW_FRAME::OnMove(), GERBER_LAYER_WIDGET::OnRenderColorChange(), GERBER_LAYER_WIDGET::OnRenderEnable(), GERBVIEW_FRAME::OnSelectActiveDCode(), GERBVIEW_FRAME::OnSelectActiveLayer(), PL_EDITOR_FRAME::OnSelectPage(), SYMBOL_DIFF_WIDGET::onSlider(), GERBVIEW_FRAME::Read_EXCELLON_File(), GERBVIEW_FRAME::Read_GERBER_File(), GERBER_LAYER_WIDGET::ReFill(), GERBVIEW_FRAME::RemapLayers(), PL_EDITOR_FRAME::RollbackFromUndo(), NL_SCHEMATIC_PLUGIN_IMPL::SetCanvas(), NL_GERBVIEW_PLUGIN_IMPL::SetCanvas(), NL_PL_EDITOR_PLUGIN_IMPL::SetCanvas(), PCB_BASE_FRAME::SetDisplayOptions(), GERBVIEW_FRAME::SetElementVisibility(), EDA_DRAW_FRAME::SetGridVisibility(), GERBVIEW_FRAME::SetLayerDrawPrms(), GERBVIEW_FRAME::SetVisibleLayers(), SYMBOL_PREVIEW_WIDGET::SYMBOL_PREVIEW_WIDGET(), COMMON_TOOLS::ToggleBoundingBoxes(), GERBVIEW_FRAME::unarchiveFiles(), PANEL_EESCHEMA_COLOR_SETTINGS::updatePreview(), GERBVIEW_FRAME::UpdateXORLayers(), PANEL_EESCHEMA_COLOR_SETTINGS::zoomFitPreview(), GERBVIEW_FRAME::~GERBVIEW_FRAME(), and SYMBOL_PREVIEW_WIDGET::~SYMBOL_PREVIEW_WIDGET().

◆ GetViewControls()

◆ IsDialogPreview()

bool EDA_DRAW_PANEL_GAL::IsDialogPreview ( ) const
inlineinherited

◆ onEnter()

◆ OnEvent()

◆ onIdle()

void EDA_DRAW_PANEL_GAL::onIdle ( wxIdleEvent &  aEvent)
protectedinherited

◆ onLostFocus()

void EDA_DRAW_PANEL_GAL::onLostFocus ( wxFocusEvent &  aEvent)
protectedinherited

◆ onPaint()

void SCH_PREVIEW_PANEL::onPaint ( wxPaintEvent &  WXUNUSEDaEvent)
overrideprotectedvirtual

Reimplemented from EDA_DRAW_PANEL_GAL.

Definition at line 149 of file sch_preview_panel.cpp.

References EDA_DRAW_PANEL_GAL::onPaint().

◆ onRefreshTimer()

void EDA_DRAW_PANEL_GAL::onRefreshTimer ( wxTimerEvent &  aEvent)
protectedinherited

◆ OnShow()

void SCH_PREVIEW_PANEL::OnShow ( )
overridevirtual

Called when the window is shown for the first time.

Reimplemented from EDA_DRAW_PANEL_GAL.

Definition at line 99 of file sch_preview_panel.cpp.

◆ onShowTimer()

void EDA_DRAW_PANEL_GAL::onShowTimer ( wxTimerEvent &  aEvent)
protectedinherited

◆ onSize()

◆ Refresh()

void SCH_PREVIEW_PANEL::Refresh ( bool  aEraseBackground,
const wxRect *  aRect 
)
overridevirtual

Reimplemented from EDA_DRAW_PANEL_GAL.

Definition at line 143 of file sch_preview_panel.cpp.

References EDA_DRAW_PANEL_GAL::Refresh().

Referenced by PANEL_EESCHEMA_COLOR_SETTINGS::updatePreview().

◆ RequestRefresh()

void EDA_DRAW_PANEL_GAL::RequestRefresh ( )
inherited

Make sure a refresh gets done on the next idle event if it hasn't already.

Definition at line 390 of file draw_panel_gal.cpp.

References EDA_DRAW_PANEL_GAL::m_needIdleRefresh.

Referenced by EDA_DRAW_PANEL_GAL::OnEvent(), and EDA_DRAW_PANEL_GAL::Refresh().

◆ SetCurrentCursor()

void EDA_DRAW_PANEL_GAL::SetCurrentCursor ( KICURSOR  aCursor)
inherited

Set the current cursor shape for this panel.

Definition at line 660 of file draw_panel_gal.cpp.

References DPI_SCALING_COMMON::GetContentScaleFactor(), EDA_DRAW_PANEL_GAL::m_gal, EDA_DRAW_PANEL_GAL::m_parent, and KIGFX::GAL::SetNativeCursorStyle().

Referenced by SCH_LINE_WIRE_BUS_TOOL::doDrawSegments(), SYMBOL_EDITOR_DRAWING_TOOLS::doDrawShape(), EDIT_TOOL::doMoveSelection(), SYMBOL_EDITOR_MOVE_TOOL::doMoveSelection(), SCH_MOVE_TOOL::doMoveSelection(), DRAWING_TOOL::drawArc(), DRAWING_TOOL::DrawDimension(), DRAWING_TOOL::drawOneBezier(), SCH_DRAWING_TOOLS::DrawRuleArea(), SCH_DRAWING_TOOLS::DrawShape(), PL_DRAWING_TOOLS::DrawShape(), DRAWING_TOOL::drawShape(), SCH_DRAWING_TOOLS::DrawSheet(), SCH_DRAWING_TOOLS::DrawTable(), DRAWING_TOOL::DrawTable(), DRAWING_TOOL::DrawZone(), PAD_TOOL::EnumeratePads(), SCH_DRAWING_TOOLS::ImportGraphics(), SYMBOL_EDITOR_DRAWING_TOOLS::ImportGraphics(), SCH_DRAWING_TOOLS::ImportSheet(), PCB_CONTROL::InteractiveDelete(), DRAWING_TOOL::InteractivePlaceWithPreview(), CVPCB_FOOTPRINT_VIEWER_SELECTION_TOOL::Main(), EE_SELECTION_TOOL::Main(), GERBVIEW_SELECTION_TOOL::Main(), PICKER_TOOL::Main(), ZOOM_TOOL::Main(), PL_EDIT_TOOL::Main(), PL_SELECTION_TOOL::Main(), GERBVIEW_INSPECTION_TOOL::MeasureTool(), PCB_VIEWER_TOOLS::MeasureTool(), EE_SELECTION_TOOL::OnIdle(), PCB_SELECTION_TOOL::OnIdle(), SYMBOL_EDITOR_DRAWING_TOOLS::PlaceAnchor(), BOARD_EDITOR_CONTROL::PlaceFootprint(), SCH_DRAWING_TOOLS::PlaceImage(), DRAWING_TOOL::PlaceImportedGraphics(), PL_DRAWING_TOOLS::PlaceItem(), DRAWING_TOOL::PlaceReferenceImage(), SCH_DRAWING_TOOLS::PlaceSymbol(), DRAWING_TOOL::PlaceText(), DRAWING_TOOL::PlaceTuningPattern(), EE_SELECTION_TOOL::selectMultiple(), PL_SELECTION_TOOL::selectMultiple(), PCB_SELECTION_TOOL::selectMultiple(), DRAWING_TOOL::SetAnchor(), EE_POINT_EDITOR::setEditedPoint(), PL_POINT_EDITOR::setEditedPoint(), SCH_DRAWING_TOOLS::SingleClickPlace(), EDA_DRAW_PANEL_GAL::SwitchBackend(), SCH_DRAWING_TOOLS::TwoClickPlace(), and SYMBOL_EDITOR_DRAWING_TOOLS::TwoClickPlace().

◆ setDefaultLayerDeps()

◆ setDefaultLayerOrder()

void SCH_PREVIEW_PANEL::setDefaultLayerOrder ( )
protected

Set rendering targets & dependencies for layers.

Definition at line 105 of file sch_preview_panel.cpp.

References EDA_DRAW_PANEL_GAL::m_view, SCH_LAYER_ORDER, KIGFX::VIEW::SetLayerOrder(), and KIGFX::VIEW::VIEW_MAX_LAYERS.

Referenced by SCH_PREVIEW_PANEL().

◆ SetEventDispatcher()

void EDA_DRAW_PANEL_GAL::SetEventDispatcher ( TOOL_DISPATCHER aEventDispatcher)
inherited

Set a dispatcher that processes events and forwards them to tools.

#DRAW_PANEL_GAL does not take over the ownership. Passing NULL disconnects all event handlers from the #DRAW_PANEL_GAL and parent frame.

Parameters
aEventDispatcheris the object that will be used for dispatching events.

Definition at line 428 of file draw_panel_gal.cpp.

References EDA_DRAW_PANEL_GAL::m_eventDispatcher.

Referenced by GERBVIEW_FRAME::ActivateGalCanvas(), PCB_BASE_FRAME::ActivateGalCanvas(), SCH_EDIT_FRAME::doCloseWindow(), FOOTPRINT_EDIT_FRAME::doCloseWindow(), EVT_GRID_CMD_CELL_CHANGED(), SCH_EDIT_FRAME::setupTools(), SYMBOL_EDIT_FRAME::setupTools(), SYMBOL_VIEWER_FRAME::setupTools(), PL_EDITOR_FRAME::setupTools(), and FOOTPRINT_EDIT_FRAME::setupTools().

◆ SetFocus()

◆ SetHighContrastLayer()

void EDA_DRAW_PANEL_GAL::SetHighContrastLayer ( int  aLayer)
virtualinherited

◆ SetStatusPopup()

◆ SetStealsFocus()

void EDA_DRAW_PANEL_GAL::SetStealsFocus ( bool  aStealsFocus)
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 207 of file class_draw_panel_gal.h.

References EDA_DRAW_PANEL_GAL::m_stealsFocus.

Referenced by SYMBOL_VIEWER_FRAME::ClickOnSymbolList(), PANEL_EESCHEMA_COLOR_SETTINGS::createSwatches(), DESIGN_BLOCK_PREVIEW_WIDGET::DESIGN_BLOCK_PREVIEW_WIDGET(), FOOTPRINT_PREVIEW_PANEL::FOOTPRINT_PREVIEW_PANEL(), DIALOG_PAD_PROPERTIES::prepareCanvas(), SYMBOL_VIEWER_FRAME::SetSelectedLibrary(), and SYMBOL_PREVIEW_WIDGET::SYMBOL_PREVIEW_WIDGET().

◆ SetTopLayer()

void EDA_DRAW_PANEL_GAL::SetTopLayer ( int  aLayer)
virtualinherited

Move the selected layer to the top, so it is displayed above all others.

Reimplemented in GERBVIEW_DRAW_PANEL_GAL, PL_DRAW_PANEL_GAL, and PCB_DRAW_PANEL_GAL.

Definition at line 466 of file draw_panel_gal.cpp.

References KIGFX::VIEW::ClearTopLayers(), EDA_DRAW_PANEL_GAL::m_view, KIGFX::VIEW::SetTopLayer(), and KIGFX::VIEW::UpdateAllLayersOrder().

Referenced by EDA_DRAW_PANEL_GAL::SetHighContrastLayer().

◆ StartDrawing()

◆ StatusPopupHasFocus()

bool EDA_DRAW_PANEL_GAL::StatusPopupHasFocus ( )
inlineinherited

◆ StopDrawing()

◆ SwitchBackend()

◆ view()

KIGFX::SCH_VIEW * SCH_PREVIEW_PANEL::view ( ) const
protected

Reassign layer order to the initial settings.

Definition at line 137 of file sch_preview_panel.cpp.

References EDA_DRAW_PANEL_GAL::m_view.

Referenced by SCH_PREVIEW_PANEL().

Member Data Documentation

◆ GAL_FALLBACK

◆ m_backend

◆ m_debugOverlay

std::shared_ptr<KIGFX::VIEW_OVERLAY> EDA_DRAW_PANEL_GAL::m_debugOverlay
protectedinherited

Optional overlay for drawing transient debug objects.

Definition at line 324 of file class_draw_panel_gal.h.

Referenced by EDA_DRAW_PANEL_GAL::ClearDebugOverlay(), and EDA_DRAW_PANEL_GAL::DebugOverlay().

◆ m_drawing

bool EDA_DRAW_PANEL_GAL::m_drawing
protectedinherited

True if GAL is currently redrawing the view.

Definition at line 283 of file class_draw_panel_gal.h.

Referenced by EDA_DRAW_PANEL_GAL::DoRePaint(), and EDA_DRAW_PANEL_GAL::~EDA_DRAW_PANEL_GAL().

◆ m_drawingEnabled

bool EDA_DRAW_PANEL_GAL::m_drawingEnabled
protectedinherited

Flag that determines if VIEW may use GAL for redrawing the screen.

Definition at line 286 of file class_draw_panel_gal.h.

Referenced by EDA_DRAW_PANEL_GAL::DoRePaint(), EDA_DRAW_PANEL_GAL::ForceRefresh(), and EDA_DRAW_PANEL_GAL::StopDrawing().

◆ m_edaFrame

◆ m_eventDispatcher

TOOL_DISPATCHER* EDA_DRAW_PANEL_GAL::m_eventDispatcher
protectedinherited

Processes and forwards events to tools.

Definition at line 311 of file class_draw_panel_gal.h.

Referenced by EDA_DRAW_PANEL_GAL::EDA_DRAW_PANEL_GAL(), EDA_DRAW_PANEL_GAL::OnEvent(), and EDA_DRAW_PANEL_GAL::SetEventDispatcher().

◆ m_gal

◆ m_lastRepaintEnd

wxLongLong EDA_DRAW_PANEL_GAL::m_lastRepaintEnd
protectedinherited

Timestamp of the last repaint end.

Definition at line 277 of file class_draw_panel_gal.h.

Referenced by EDA_DRAW_PANEL_GAL::DoRePaint(), and EDA_DRAW_PANEL_GAL::OnEvent().

◆ m_lastRepaintStart

wxLongLong EDA_DRAW_PANEL_GAL::m_lastRepaintStart
protectedinherited

Timestamp of the last repaint start.

Definition at line 276 of file class_draw_panel_gal.h.

Referenced by EDA_DRAW_PANEL_GAL::DoRePaint(), and EDA_DRAW_PANEL_GAL::OnEvent().

◆ m_lostFocus

bool EDA_DRAW_PANEL_GAL::m_lostFocus
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 315 of file class_draw_panel_gal.h.

Referenced by EDA_DRAW_PANEL_GAL::OnEvent(), EDA_DRAW_PANEL_GAL::onLostFocus(), and EDA_DRAW_PANEL_GAL::SetFocus().

◆ m_MouseCapturedLost

bool EDA_DRAW_PANEL_GAL::m_MouseCapturedLost
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 260 of file class_draw_panel_gal.h.

Referenced by KIGFX::WX_VIEW_CONTROLS::CaptureCursor(), and KIGFX::WX_VIEW_CONTROLS::onCaptureLost().

◆ m_needIdleRefresh

bool EDA_DRAW_PANEL_GAL::m_needIdleRefresh
protectedinherited

True when canvas needs to be refreshed from idle handler.

Definition at line 289 of file class_draw_panel_gal.h.

Referenced by EDA_DRAW_PANEL_GAL::onIdle(), and EDA_DRAW_PANEL_GAL::RequestRefresh().

◆ m_onShowTimer

wxTimer EDA_DRAW_PANEL_GAL::m_onShowTimer
protectedinherited

Timer used to execute OnShow() when the window finally appears on the screen.

Definition at line 292 of file class_draw_panel_gal.h.

Referenced by EDA_DRAW_PANEL_GAL::EDA_DRAW_PANEL_GAL(), and EDA_DRAW_PANEL_GAL::onShowTimer().

◆ m_options

KIGFX::GAL_DISPLAY_OPTIONS& EDA_DRAW_PANEL_GAL::m_options
protectedinherited

Definition at line 308 of file class_draw_panel_gal.h.

Referenced by EDA_DRAW_PANEL_GAL::SwitchBackend().

◆ m_painter

◆ m_PaintEventCounter

std::unique_ptr<PROF_COUNTER> EDA_DRAW_PANEL_GAL::m_PaintEventCounter
inherited

Definition at line 262 of file class_draw_panel_gal.h.

Referenced by EDA_DRAW_PANEL_GAL::EDA_DRAW_PANEL_GAL().

◆ m_parent

wxWindow* EDA_DRAW_PANEL_GAL::m_parent
protectedinherited

◆ m_refreshMutex

std::mutex EDA_DRAW_PANEL_GAL::m_refreshMutex
protectedinherited

Blocks multiple calls to the draw.

Definition at line 280 of file class_draw_panel_gal.h.

Referenced by EDA_DRAW_PANEL_GAL::DoRePaint().

◆ m_refreshTimer

wxTimer EDA_DRAW_PANEL_GAL::m_refreshTimer
protectedinherited

◆ m_statusPopup

wxWindow* EDA_DRAW_PANEL_GAL::m_statusPopup
protectedinherited

◆ m_stealsFocus

bool EDA_DRAW_PANEL_GAL::m_stealsFocus
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 319 of file class_draw_panel_gal.h.

Referenced by EDA_DRAW_PANEL_GAL::onEnter(), EDA_DRAW_PANEL_GAL::OnEvent(), and EDA_DRAW_PANEL_GAL::SetStealsFocus().

◆ m_view

KIGFX::VIEW* EDA_DRAW_PANEL_GAL::m_view
protectedinherited

Stores view settings (scale, center, etc.) and items to be drawn.

Definition at line 298 of file class_draw_panel_gal.h.

Referenced by PANEL_ZONE_GAL::ActivateSelectedZone(), EDA_DRAW_PANEL_GAL::ClearDebugOverlay(), EDA_DRAW_PANEL_GAL::DebugOverlay(), PCB_DRAW_PANEL_GAL::DisplayBoard(), PL_DRAW_PANEL_GAL::DisplayDrawingSheet(), EDA_DRAW_PANEL_GAL::DoRePaint(), GERBVIEW_DRAW_PANEL_GAL::GERBVIEW_DRAW_PANEL_GAL(), GERBVIEW_DRAW_PANEL_GAL::GetDefaultViewBBox(), PCB_DRAW_PANEL_GAL::GetDefaultViewBBox(), EDA_DRAW_PANEL_GAL::GetView(), SCH_DRAW_PANEL::GetView(), PCB_DRAW_PANEL_GAL::GetView(), PANEL_ZONE_GAL::OnLayerSelected(), SCH_DRAW_PANEL::OnShow(), GERBVIEW_DRAW_PANEL_GAL::OnShow(), PCB_DRAW_PANEL_GAL::OnShow(), EDA_DRAW_PANEL_GAL::onSize(), PANEL_ZONE_GAL::PANEL_ZONE_GAL(), PCB_DRAW_PANEL_GAL::PCB_DRAW_PANEL_GAL(), PL_DRAW_PANEL_GAL::PL_DRAW_PANEL_GAL(), PCB_DRAW_PANEL_GAL::RedrawRatsnest(), SCH_DRAW_PANEL::SCH_DRAW_PANEL(), SCH_PREVIEW_PANEL(), SCH_DRAW_PANEL::setDefaultLayerDeps(), setDefaultLayerDeps(), GERBVIEW_DRAW_PANEL_GAL::setDefaultLayerDeps(), PL_DRAW_PANEL_GAL::setDefaultLayerDeps(), PCB_DRAW_PANEL_GAL::setDefaultLayerDeps(), SCH_DRAW_PANEL::setDefaultLayerOrder(), setDefaultLayerOrder(), PCB_DRAW_PANEL_GAL::setDefaultLayerOrder(), GERBVIEW_DRAW_PANEL_GAL::SetDrawingSheet(), PCB_DRAW_PANEL_GAL::SetDrawingSheet(), EDA_DRAW_PANEL_GAL::SetHighContrastLayer(), GERBVIEW_DRAW_PANEL_GAL::SetHighContrastLayer(), PCB_DRAW_PANEL_GAL::SetHighContrastLayer(), EDA_DRAW_PANEL_GAL::SetTopLayer(), GERBVIEW_DRAW_PANEL_GAL::SetTopLayer(), PL_DRAW_PANEL_GAL::SetTopLayer(), PCB_DRAW_PANEL_GAL::SetTopLayer(), EDA_DRAW_PANEL_GAL::SwitchBackend(), GERBVIEW_DRAW_PANEL_GAL::SwitchBackend(), PCB_DRAW_PANEL_GAL::SyncLayersVisibility(), PCB_DRAW_PANEL_GAL::UpdateColors(), view(), PANEL_ZONE_GAL::ZoomFitScreen(), and EDA_DRAW_PANEL_GAL::~EDA_DRAW_PANEL_GAL().

◆ m_viewControls


The documentation for this class was generated from the following files: