KiCad PCB EDA Suite
Loading...
Searching...
No Matches
KIGFX::SCH_VIEW Class Reference

#include <sch_view.h>

Inheritance diagram for KIGFX::SCH_VIEW:
KIGFX::VIEW

Public Types

typedef std::pair< VIEW_ITEM *, int > LAYER_ITEM_PAIR
 

Public Member Functions

 SCH_VIEW (bool aIsDynamic, SCH_BASE_FRAME *aFrame)
 
 ~SCH_VIEW ()
 
void Cleanup ()
 
void DisplaySheet (const SCH_SCREEN *aScreen)
 
void DisplaySymbol (LIB_SYMBOL *aSymbol)
 
void ResizeSheetWorkingArea (const SCH_SCREEN *aScreen)
 
void SetScale (double aScale, VECTOR2D aAnchor={ 0, 0 }) override
 Set the scaling factor, zooming around a given anchor point.
 
void ClearHiddenFlags ()
 Clear the hide flag of all items in the view.
 
void HideDrawingSheet ()
 
DS_PROXY_VIEW_ITEMGetDrawingSheet () const
 
virtual void Add (VIEW_ITEM *aItem, int aDrawPriority=-1)
 Add a VIEW_ITEM to the view.
 
virtual void Remove (VIEW_ITEM *aItem)
 Remove a VIEW_ITEM from the view.
 
int Query (const BOX2I &aRect, std::vector< LAYER_ITEM_PAIR > &aResult) const
 Find all visible items that touch or are within the rectangle aRect.
 
void Query (const BOX2I &aRect, const std::function< bool(VIEW_ITEM *)> &aFunc) const
 Run a function on all visible items that touch or are within the rectangle aRect.
 
void SetVisible (VIEW_ITEM *aItem, bool aIsVisible=true)
 Set the item visibility.
 
void Hide (VIEW_ITEM *aItem, bool aHide=true, bool aHideOverlay=false)
 Temporarily hide the item in the view (e.g.
 
bool IsVisible (const VIEW_ITEM *aItem) const
 Return information if the item is visible (or not).
 
bool IsHiddenOnOverlay (const VIEW_ITEM *aItem) const
 
bool HasItem (const VIEW_ITEM *aItem) const
 Indicates whether or not the given item has been added to the view.
 
virtual void Update (const VIEW_ITEM *aItem, int aUpdateFlags) const
 For dynamic VIEWs, inform the associated VIEW that the graphical representation of this item has changed.
 
virtual void Update (const VIEW_ITEM *aItem) const
 
void SetRequired (int aLayerId, int aRequiredId, bool aRequired=true)
 Mark the aRequiredId layer as required for the aLayerId layer.
 
void CopySettings (const VIEW *aOtherView)
 Copy layers and visibility settings from another view.
 
void SetGAL (GAL *aGal)
 Assign a rendering device for the VIEW.
 
GALGetGAL () const
 Return the #GAL this view is using to draw graphical primitives.
 
void SetPainter (PAINTER *aPainter)
 Set the painter object used by the view for drawing #VIEW_ITEMS.
 
PAINTERGetPainter () const
 Return the painter object used by the view for drawing #VIEW_ITEMS.
 
void SetViewport (const BOX2D &aViewport)
 Set the visible area of the VIEW.
 
BOX2D GetViewport () const
 Return the current viewport visible area rectangle.
 
void SetMirror (bool aMirrorX, bool aMirrorY)
 Control the mirroring of the VIEW.
 
bool IsMirroredX () const
 Return true if view is flipped across the X axis.
 
bool IsMirroredY () const
 Return true if view is flipped across the Y axis.
 
double GetScale () const
 
void SetBoundary (const BOX2D &aBoundary)
 Set limits for view area.
 
void SetBoundary (const BOX2I &aBoundary)
 Set limits for view area.
 
const BOX2DGetBoundary () const
 
void SetScaleLimits (double aMaximum, double aMinimum)
 Set minimum and maximum values for scale.
 
void SetCenter (const VECTOR2D &aCenter)
 Set the center point of the VIEW (i.e.
 
void SetCenter (const VECTOR2D &aCenter, const std::vector< BOX2D > &obscuringScreenRects)
 Set the center point of the VIEW, attempting to avoid obscuringScreenRects (for instance, the screen rect of a modeless dialog in front of the VIEW).
 
const VECTOR2DGetCenter () const
 Return the center point of this VIEW (in world space coordinates).
 
VECTOR2D ToWorld (const VECTOR2D &aCoord, bool aAbsolute=true) const
 Converts a screen space point/vector to a point/vector in world space coordinates.
 
double ToWorld (double aSize) const
 Converts a screen space one dimensional size to a one dimensional size in world space coordinates.
 
VECTOR2D ToScreen (const VECTOR2D &aCoord, bool aAbsolute=true) const
 Convert a world space point/vector to a point/vector in screen space coordinates.
 
double ToScreen (double aSize) const
 Convert a world space one dimensional size to a one dimensional size in screen space.
 
const VECTOR2IGetScreenPixelSize () const
 Return the size of the our rendering area in pixels.
 
void Clear ()
 Remove all items from the view.
 
void SetLayerVisible (int aLayer, bool aVisible=true)
 Control the visibility of a particular layer.
 
bool IsLayerVisible (int aLayer) const
 Return information about visibility of a particular layer.
 
void SetLayerDiff (int aLayer, bool aDiff=true)
 Set the whether the layer should drawn differentially.
 
void SetLayerHasNegatives (int aLayer, bool aNegatives=true)
 Set the status of negatives presense in a particular layer.
 
void SetLayerDisplayOnly (int aLayer, bool aDisplayOnly=true)
 Set a layer display-only (ie: to be rendered but not returned by hit test queries).
 
void SetLayerTarget (int aLayer, RENDER_TARGET aTarget)
 Change the rendering target for a particular layer.
 
void SetLayerOrder (int aLayer, int aRenderingOrder)
 Set rendering order of a particular layer.
 
int GetLayerOrder (int aLayer) const
 Return rendering order of a particular layer.
 
void SortLayers (int aLayers[], int &aCount) const
 Change the order of given layer ids, so after sorting the order corresponds to layers rendering order (descending, ie.
 
void ReorderLayerData (std::unordered_map< int, int > aReorderMap)
 Remap the data between layer ids without invalidating that data.
 
void UpdateLayerColor (int aLayer)
 Apply the new coloring scheme held by RENDER_SETTINGS in case that it has changed.
 
void UpdateAllLayersColor ()
 Apply the new coloring scheme to all layers.
 
virtual void SetTopLayer (int aLayer, bool aEnabled=true)
 Set given layer to be displayed on the top or sets back the default order of layers.
 
virtual void EnableTopLayer (bool aEnable)
 Enable or disable display of the top layer.
 
virtual int GetTopLayer () const
 
void ClearTopLayers ()
 Remove all layers from the on-the-top set (they are no longer displayed over the rest of layers).
 
void UpdateAllLayersOrder ()
 Do everything that is needed to apply the rendering order of layers.
 
void ClearTargets ()
 Clear targets that are marked as dirty.
 
virtual void Redraw ()
 Immediately redraws the whole view.
 
void RecacheAllItems ()
 Rebuild GAL display lists.
 
bool IsDynamic () const
 Tell if the VIEW is dynamic (ie.
 
bool IsDirty () const
 Return true if any of the VIEW layers needs to be refreshened.
 
bool IsTargetDirty (int aTarget) const
 Return true if any of layers belonging to the target or the target itself should be redrawn.
 
void MarkTargetDirty (int aTarget)
 Set or clear target 'dirty' flag.
 
bool IsCached (int aLayer) const
 Return true if the layer is cached.
 
void MarkDirty ()
 Force redraw of view on the next rendering.
 
void MarkClean ()
 Force redraw of view on the next rendering.
 
void UpdateItems ()
 Iterate through the list of items that asked for updating and updates them.
 
void UpdateAllItems (int aUpdateFlags)
 Update all items in the view according to the given flags.
 
void UpdateAllItemsConditionally (int aUpdateFlags, std::function< bool(VIEW_ITEM *)> aCondition)
 Update items in the view according to the given flags and condition.
 
void UpdateAllItemsConditionally (std::function< int(VIEW_ITEM *)> aItemFlagsProvider)
 Update items in the view according to the flags returned by the callback.
 
bool IsUsingDrawPriority () const
 
void UseDrawPriority (bool aFlag)
 
void ReverseDrawOrder (bool aFlag)
 Only takes effect if UseDrawPriority is true.
 
std::shared_ptr< VIEW_OVERLAYMakeOverlay ()
 
void InitPreview ()
 
void ClearPreview ()
 
void AddToPreview (VIEW_ITEM *aItem, bool aTakeOwnership=true)
 
void ShowPreview (bool aShow=true)
 
std::unique_ptr< VIEWDataReference () const
 Return a new VIEW object that shares the same set of VIEW_ITEMs and LAYERs.
 

Static Public Member Functions

static void OnDestroy (VIEW_ITEM *aItem)
 Nasty hack, invoked by the destructor of VIEW_ITEM to auto-remove the item from the owning VIEW if there is any.
 

Static Public Attributes

static constexpr int VIEW_MAX_LAYERS = 512
 Rendering order modifier for layers that are marked as top layers.
 
static constexpr int TOP_LAYER_MODIFIER = -VIEW_MAX_LAYERS
 

Protected Member Functions

void redrawRect (const BOX2I &aRect)
 
void markTargetClean (int aTarget)
 
void draw (VIEW_ITEM *aItem, int aLayer, bool aImmediate=false)
 Draw an item, but on a specified layers.
 
void draw (VIEW_ITEM *aItem, bool aImmediate=false)
 Draw an item on all layers that the item uses.
 
void draw (VIEW_GROUP *aGroup, bool aImmediate=false)
 Draw a group of items on all layers that those items use.
 
void sortLayers ()
 Clear cached GAL group numbers (ONLY numbers stored in VIEW_ITEMs, not group objects used by GAL)
 
void clearGroupCache ()
 
void invalidateItem (VIEW_ITEM *aItem, int aUpdateFlags)
 Manage dirty flags & redraw queuing when updating an item.
 
void updateItemColor (VIEW_ITEM *aItem, int aLayer)
 Update all information needed to draw an item.
 
void updateItemGeometry (VIEW_ITEM *aItem, int aLayer)
 Update bounding box of an item.
 
void updateBbox (VIEW_ITEM *aItem)
 Update set of layers that an item occupies.
 
void updateLayers (VIEW_ITEM *aItem)
 Determine rendering order of layers. Used in display order sorting function.
 
bool areRequiredLayersEnabled (int aLayerId) const
 

Static Protected Member Functions

static bool compareRenderingOrder (VIEW_LAYER *aI, VIEW_LAYER *aJ)
 Check if every layer required by the aLayerId layer is enabled.
 

Protected Attributes

std::unique_ptr< KIGFX::VIEW_GROUPm_preview
 
std::vector< VIEW_ITEM * > m_ownedItems
 Whether to use rendering order modifier or not.
 
bool m_enableOrderModifier
 The set of possible displayed layers and its properties.
 
std::vector< VIEW_LAYERm_layers
 Sorted list of pointers to members of m_layers.
 
std::vector< VIEW_LAYER * > m_orderedLayers
 Flat list of all items.
 
std::shared_ptr< std::vector< VIEW_ITEM * > > m_allItems
 The set of layers that are displayed on the top.
 
std::set< unsigned int > m_topLayers
 Center point of the VIEW (the point at which we are looking at).
 
VECTOR2D m_center
 
double m_scale
 
BOX2D m_boundary
 
double m_minScale
 
double m_maxScale
 
bool m_mirrorX
 
bool m_mirrorY
 PAINTER contains information how do draw items.
 
PAINTERm_painter
 Interface to #PAINTER that is used to draw items.
 
GALm_gal
 Dynamic VIEW (eg.
 
bool m_dynamic
 Flag to mark targets as dirty so they have to be redrawn on the next refresh event.
 
bool m_dirtyTargets [TARGETS_NUMBER]
 Flag to respect draw priority when drawing items.
 
bool m_useDrawPriority
 The next sequential drawing priority.
 
int m_nextDrawPriority
 Flag to reverse the draw order when using draw priority.
 
bool m_reverseDrawOrder
 

Private Attributes

SCH_BASE_FRAMEm_frame
 
std::unique_ptr< DS_PROXY_VIEW_ITEMm_drawingSheet
 

Detailed Description

Definition at line 78 of file sch_view.h.

Member Typedef Documentation

◆ LAYER_ITEM_PAIR

typedef std::pair<VIEW_ITEM*, int> KIGFX::VIEW::LAYER_ITEM_PAIR
inherited

Definition at line 72 of file view.h.

Constructor & Destructor Documentation

◆ SCH_VIEW()

KIGFX::SCH_VIEW::SCH_VIEW ( bool  aIsDynamic,
SCH_BASE_FRAME aFrame 
)

◆ ~SCH_VIEW()

KIGFX::SCH_VIEW::~SCH_VIEW ( )

Definition at line 62 of file sch_view.cpp.

Member Function Documentation

◆ Add()

void KIGFX::VIEW::Add ( VIEW_ITEM aItem,
int  aDrawPriority = -1 
)
virtualinherited

Add a VIEW_ITEM to the view.

Set aDrawPriority to -1 to assign sequential priorities.

Parameters
aItemitem to be added. No ownership is given
aDrawPrioritypriority to draw this item on its layer, lowest first.

Reimplemented in KIGFX::PCB_VIEW.

Definition at line 317 of file view.cpp.

References KIGFX::INITIAL_ADD, KIGFX::VIEW::VIEW_LAYER::items, KIGFX::VIEW::m_allItems, KIGFX::VIEW_ITEM_DATA::m_bbox, KIGFX::VIEW_ITEM_DATA::m_cachedIndex, KIGFX::VIEW_ITEM_DATA::m_drawPriority, KIGFX::VIEW::m_layers, KIGFX::VIEW::m_nextDrawPriority, KIGFX::VIEW_ITEM_DATA::m_view, KIGFX::VIEW_ITEM::m_viewPrivData, KIGFX::VIEW::MarkTargetDirty(), KIGFX::VIEW_ITEM_DATA::saveLayers(), KIGFX::VIEW::SetVisible(), KIGFX::VIEW::VIEW_LAYER::target, KIGFX::VIEW::Update(), KIGFX::VIEW::VIEW_MAX_LAYERS, KIGFX::VIEW_ITEM::ViewBBox(), KIGFX::VIEW_ITEM::ViewGetLayers(), and KIGFX::VIEW_ITEM::viewPrivData().

Referenced by PANEL_ZONE_GAL::ActivateSelectedZone(), KIGFX::PCB_VIEW::Add(), SCH_BASE_FRAME::AddToScreen(), PANEL_EESCHEMA_COLOR_SETTINGS::createPreviewItems(), EDA_DRAW_PANEL_GAL::DebugOverlay(), PCB_DRAW_PANEL_GAL::DisplayBoard(), DESIGN_BLOCK_PREVIEW_WIDGET::DisplayDesignBlock(), SYMBOL_DIFF_WIDGET::DisplayDiff(), PL_DRAW_PANEL_GAL::DisplayDrawingSheet(), SYMBOL_PREVIEW_WIDGET::DisplayPart(), DisplaySheet(), SYMBOL_PREVIEW_WIDGET::DisplaySymbol(), DisplaySymbol(), SELECTION_TOOL::doSelectionMenu(), EDIT_TOOL::DragArcTrack(), DRAWING_TOOL::drawArc(), DRAWING_TOOL::DrawDimension(), DRAWING_TOOL::drawOneBezier(), DRAWING_TOOL::drawShape(), EE_GRID_HELPER::EE_GRID_HELPER(), GRID_HELPER::enableAndGetAnchorDebug(), GRID_HELPER::GRID_HELPER(), SCH_DRAWING_TOOLS::ImportGraphics(), SYMBOL_EDITOR_DRAWING_TOOLS::ImportGraphics(), KIGFX::VIEW::InitPreview(), EE_POINT_EDITOR::Main(), PL_POINT_EDITOR::Main(), KIGFX::VIEW::MakeOverlay(), GERBVIEW_INSPECTION_TOOL::MeasureTool(), PCB_POINT_EDITOR::OnSelectionChange(), PANEL_ZONE_GAL::PANEL_ZONE_GAL(), SYMBOL_EDITOR_EDIT_TOOL::Paste(), PCB_GRID_HELPER::PCB_GRID_HELPER(), DRAWING_TOOL::PlaceImportedGraphics(), DRAWING_TOOL::PlaceTuningPattern(), DIALOG_PAD_PROPERTIES::prepareCanvas(), BOARD_COMMIT::Push(), SCH_COMMIT::pushSchEdit(), GERBVIEW_FRAME::Read_EXCELLON_File(), GERBVIEW_FRAME::Read_GERBER_File(), EE_SELECTION_TOOL::Reset(), GERBVIEW_SELECTION_TOOL::Reset(), BOARD_EDITOR_CONTROL::Reset(), PCB_CONTROL::Reset(), SCH_COMMIT::Revert(), BOARD_COMMIT::Revert(), RULE_AREA_CREATE_HELPER::RULE_AREA_CREATE_HELPER(), GERBVIEW_SELECTION_TOOL::select(), EE_SELECTION_TOOL::selectMultiple(), PL_SELECTION_TOOL::selectMultiple(), ZOOM_TOOL::selectRegion(), GERBVIEW_DRAW_PANEL_GAL::SetDrawingSheet(), PCB_DRAW_PANEL_GAL::SetDrawingSheet(), PNS_PCBNEW_DEBUG_DECORATOR::SetView(), PNS_KICAD_IFACE::SetView(), GERBVIEW_DRAW_PANEL_GAL::SwitchBackend(), DS_DATA_ITEM::SyncDrawItems(), DS_DATA_ITEM_POLYGONS::SyncDrawItems(), DS_DATA_ITEM_TEXT::SyncDrawItems(), DS_DATA_ITEM_BITMAP::SyncDrawItems(), DIALOG_ERC::testErc(), SYMBOL_VIEWER_FRAME::updatePreviewSymbol(), KIGFX::VIEW::VIEW(), and ZONE_CREATE_HELPER::ZONE_CREATE_HELPER().

◆ AddToPreview()

◆ areRequiredLayersEnabled()

bool KIGFX::VIEW::areRequiredLayersEnabled ( int  aLayerId) const
protectedinherited

◆ Cleanup()

void KIGFX::SCH_VIEW::Cleanup ( )

Definition at line 67 of file sch_view.cpp.

References KIGFX::VIEW::Clear(), m_drawingSheet, and KIGFX::VIEW::m_preview.

Referenced by SCH_DRAW_PANEL::DisplaySheet().

◆ Clear()

◆ clearGroupCache()

void KIGFX::VIEW::clearGroupCache ( )
protectedinherited

Definition at line 1251 of file view.cpp.

References KIGFX::VIEW::m_layers, and BOX2< Vec >::SetMaximum().

Referenced by KIGFX::VIEW::SetGAL().

◆ ClearHiddenFlags()

void KIGFX::SCH_VIEW::ClearHiddenFlags ( )

Clear the hide flag of all items in the view.

Definition at line 179 of file sch_view.cpp.

References KIGFX::VIEW::Hide(), and KIGFX::VIEW::m_allItems.

Referenced by SCH_EDIT_FRAME::PutDataInPreviousState(), SYMBOL_EDIT_FRAME::RebuildView(), and SYMBOL_EDIT_FRAME::SetCurSymbol().

◆ ClearPreview()

◆ ClearTargets()

void KIGFX::VIEW::ClearTargets ( )
inherited

◆ ClearTopLayers()

void KIGFX::VIEW::ClearTopLayers ( )
inherited

◆ compareRenderingOrder()

static bool KIGFX::VIEW::compareRenderingOrder ( VIEW_LAYER aI,
VIEW_LAYER aJ 
)
inlinestaticprotectedinherited

Check if every layer required by the aLayerId layer is enabled.

Definition at line 827 of file view.h.

References KIGFX::VIEW::VIEW_LAYER::renderingOrder.

Referenced by KIGFX::VIEW::sortLayers().

◆ CopySettings()

void KIGFX::VIEW::CopySettings ( const VIEW aOtherView)
inherited

Copy layers and visibility settings from another view.

Parameters
aOtherViewview from which settings will be copied.

Definition at line 522 of file view.cpp.

◆ DataReference()

std::unique_ptr< VIEW > KIGFX::VIEW::DataReference ( ) const
inherited

Return a new VIEW object that shares the same set of VIEW_ITEMs and LAYERs.

GAL, PAINTER and other properties are left uninitialized. Maximum number of layers that may be shown

Definition at line 1604 of file view.cpp.

References KIGFX::VIEW::m_allItems, and KIGFX::VIEW::m_layers.

Referenced by BOARD_PRINTOUT::DrawPage(), and SCH_PRINTOUT::PrintPage().

◆ DisplaySheet()

◆ DisplaySymbol()

◆ draw() [1/3]

void KIGFX::VIEW::draw ( VIEW_GROUP aGroup,
bool  aImmediate = false 
)
protectedinherited

Draw a group of items on all layers that those items use.

Parameters
aGroupis the group to be drawn.
aImmediatedictates the way of drawing - it allows one to force immediate drawing mode for cached items. Sort m_orderedLayers when layer rendering order has changed

Definition at line 1127 of file view.cpp.

References KIGFX::VIEW::draw(), KIGFX::VIEW_GROUP::GetItem(), and KIGFX::VIEW_GROUP::GetSize().

◆ draw() [2/3]

void KIGFX::VIEW::draw ( VIEW_ITEM aItem,
bool  aImmediate = false 
)
protectedinherited

Draw an item on all layers that the item uses.

Parameters
aItemis the item to be drawn.
aImmediatedictates the way of drawing - it allows one to force immediate drawing mode for cached items.

Definition at line 1110 of file view.cpp.

References KIGFX::VIEW::draw(), KIGFX::VIEW::m_gal, KIGFX::VIEW::m_layers, KIGFX::GAL::SetLayerDepth(), KIGFX::VIEW::SortLayers(), KIGFX::VIEW::VIEW_MAX_LAYERS, and KIGFX::VIEW_ITEM::ViewGetLayers().

◆ draw() [3/3]

void KIGFX::VIEW::draw ( VIEW_ITEM aItem,
int  aLayer,
bool  aImmediate = false 
)
protectedinherited

Draw an item, but on a specified layers.

It has to be marked that some of drawing settings are based on the layer on which an item is drawn.

Parameters
aItemis the item to be drawn.
aLayeris the layer which should be drawn.
aImmediatedictates the way of drawing - it allows one to force immediate drawing mode for cached items.

Definition at line 1084 of file view.cpp.

References KIGFX::PAINTER::Draw(), KIGFX::GAL::DrawGroup(), KIGFX::VIEW_ITEM_DATA::getGroup(), group, KIGFX::VIEW::IsCached(), KIGFX::VIEW::m_gal, KIGFX::VIEW::m_painter, KIGFX::VIEW::Update(), KIGFX::VIEW_ITEM::ViewDraw(), and KIGFX::VIEW_ITEM::viewPrivData().

Referenced by KIGFX::VIEW::DRAW_ITEM_VISITOR::deferredDraw(), KIGFX::VIEW::draw(), and KIGFX::VIEW::DRAW_ITEM_VISITOR::operator()().

◆ EnableTopLayer()

void KIGFX::VIEW::EnableTopLayer ( bool  aEnable)
virtualinherited

Enable or disable display of the top layer.

When disabled, layers are rendered as usual with no influence from SetTopLayer function. Otherwise on the top there is displayed the layer set previously with SetTopLayer function.

Parameters
aEnablewhether to enable or disable display of the top layer.

Definition at line 898 of file view.cpp.

References KIGFX::VIEW::m_enableOrderModifier, KIGFX::VIEW::m_layers, KIGFX::VIEW::m_topLayers, KIGFX::VIEW::TOP_LAYER_MODIFIER, KIGFX::VIEW::UpdateAllLayersColor(), and KIGFX::VIEW::UpdateAllLayersOrder().

Referenced by PCB_DRAW_PANEL_GAL::SetTopLayer().

◆ GetBoundary()

◆ GetCenter()

◆ GetDrawingSheet()

DS_PROXY_VIEW_ITEM * KIGFX::SCH_VIEW::GetDrawingSheet ( ) const
inline

◆ GetGAL()

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

Return the #GAL this view is using to draw graphical primitives.

Returns
Pointer to the currently used GAL instance.

Definition at line 203 of file view.h.

Referenced by EE_GRID_HELPER::BestDragOrigin(), GRID_HELPER::canUseGrid(), KIGFX::WX_VIEW_CONTROLS::CenterOnCursor(), PNS_PCBNEW_DEBUG_DECORATOR::Clear(), COMMON_TOOLS::CursorControl(), PCB_CONTROL::DoSetGridOrigin(), COMMON_TOOLS::doZoomInOut(), drawBacksideTicks(), KIGFX::PREVIEW::CENTRELINE_RECT_ITEM::drawPreviewShape(), KIGFX::PREVIEW::POLYGON_ITEM::drawPreviewShape(), SCH_LINE_WIRE_BUS_TOOL::DrawSegments(), KIGFX::PREVIEW::DrawTextNextToCursor(), drawTicksAlongLine(), KIGFX::VIEW_OVERLAY::COMMAND_LINE::Execute(), KIGFX::VIEW_OVERLAY::COMMAND_RECTANGLE::Execute(), KIGFX::VIEW_OVERLAY::COMMAND_CIRCLE::Execute(), KIGFX::VIEW_OVERLAY::COMMAND_ARC::Execute(), KIGFX::VIEW_OVERLAY::COMMAND_POLYGON::Execute(), KIGFX::VIEW_OVERLAY::COMMAND_POLY_POLYGON::Execute(), KIGFX::VIEW_OVERLAY::COMMAND_POINT_POLYGON::Execute(), KIGFX::VIEW_OVERLAY::COMMAND_SET_STROKE::Execute(), KIGFX::VIEW_OVERLAY::COMMAND_SET_FILL::Execute(), KIGFX::VIEW_OVERLAY::COMMAND_SET_COLOR::Execute(), KIGFX::VIEW_OVERLAY::COMMAND_SET_WIDTH::Execute(), KIGFX::VIEW_OVERLAY::COMMAND_GLYPH_SIZE::Execute(), KIGFX::VIEW_OVERLAY::COMMAND_BITMAP_TEXT::Execute(), GRID_HELPER::GetGrid(), GRID_HELPER::GetGridSize(), EE_GRID_HELPER::GetGridSize(), PCB_GRID_HELPER::GetGridSize(), GRID_HELPER::GetOrigin(), KIGFX::WX_VIEW_CONTROLS::GetRawCursorPosition(), GRID_HELPER::GetVisibleGrid(), ROUTER_TOOL::handleCommonEvents(), ROUTER_TOOL::InlineBreakTrack(), ROUTER_TOOL::InlineDrag(), PCB_VIEWER_TOOLS::MeasureTool(), PNS_PCBNEW_DEBUG_DECORATOR::nextDepth(), COMMON_TOOLS::OnGridChanged(), COMMON_TOOLS::PanControl(), POSITION_RELATIVE_TOOL::PositionRelativeInteractively(), DIALOG_PAD_PROPERTIES::prepareCanvas(), SCH_BASE_FRAME::RefreshZoomDependentItems(), KIGFX::WX_VIEW_CONTROLS::SetCrossHairCursorPosition(), PNS_PCBNEW_DEBUG_DECORATOR::SetView(), KIGFX::VIEW_CONTROLS::ShowCursor(), PNS::TOOL_BASE::updateEndItem(), PNS::TOOL_BASE::updateStartItem(), DS_PROXY_VIEW_ITEM::ViewDraw(), KIGFX::PREVIEW::SIMPLE_OVERLAY_ITEM::ViewDraw(), EDIT_POINTS::ViewDraw(), TUNING_STATUS_VIEW_ITEM::ViewDraw(), RATSNEST_VIEW_ITEM::ViewDraw(), ROUTER_PREVIEW_ITEM::ViewDraw(), ROUTER_STATUS_VIEW_ITEM::ViewDraw(), MY_DRAWING::ViewDraw(), KIGFX::PREVIEW::ARC_ASSISTANT::ViewDraw(), KIGFX::PREVIEW::BEZIER_ASSISTANT::ViewDraw(), KIGFX::PREVIEW::RULER_ITEM::ViewDraw(), KIGFX::PREVIEW::SELECTION_AREA::ViewDraw(), KIGFX::PREVIEW::TWO_POINT_ASSISTANT::ViewDraw(), KIGFX::ORIGIN_VIEWITEM::ViewDraw(), KIGFX::ANCHOR_DEBUG::ViewDraw(), KIGFX::CONSTRUCTION_GEOM::ViewDraw(), KIGFX::SNAP_INDICATOR::ViewDraw(), KIGFX::VIEW_GROUP::ViewDraw(), KIGFX::VIEW_OVERLAY::ViewDraw(), and KIGFX::WX_VIEW_CONTROLS::WarpMouseCursor().

◆ GetLayerOrder()

int KIGFX::VIEW::GetLayerOrder ( int  aLayer) const
inherited

Return rendering order of a particular layer.

Lower values are rendered first.

Parameters
aLayeris the layer.
Returns
Rendering order of a particular layer.

Definition at line 681 of file view.cpp.

References KIGFX::VIEW::m_layers.

Referenced by ROUTER_PREVIEW_ITEM::ROUTER_PREVIEW_ITEM(), PCB_DRAW_PANEL_GAL::SetTopLayer(), and KIGFX::VIEW::SortLayers().

◆ GetPainter()

PAINTER * KIGFX::VIEW::GetPainter ( ) const
inlineinherited

Return the painter object used by the view for drawing #VIEW_ITEMS.

Returns
Pointer to the currently used Painter instance.

Definition at line 221 of file view.h.

Referenced by PCB_BASE_FRAME::ActivateGalCanvas(), GERBVIEW_FRAME::ApplyDisplaySettingsToGAL(), EDITOR_CONDITIONS::bboxesFunc(), DS_PROXY_VIEW_ITEM::buildDrawList(), GERBVIEW_CONTROL::ClearAllLayers(), BOARD_INSPECTION_TOOL::ClearHighlight(), SCH_BASE_FRAME::CommonSettingsChanged(), PCB_BASE_FRAME::CommonSettingsChanged(), PL_EDITOR_FRAME::CommonSettingsChanged(), PCB_GRID_HELPER::computeAnchors(), DESIGN_BLOCK_PREVIEW_WIDGET::DESIGN_BLOCK_PREVIEW_WIDGET(), SYMBOL_DIFF_WIDGET::DisplayDiff(), SYMBOL_PREVIEW_WIDGET::DisplayPart(), PNS_KICAD_IFACE::DisplayRatline(), SYMBOL_PREVIEW_WIDGET::DisplaySymbol(), BOARD_INSPECTION_TOOL::doHideRatsnestNet(), KIGFX::PREVIEW::POLYGON_ITEM::drawPreviewShape(), KIGFX::PREVIEW::DrawTextNextToCursor(), PAD_TOOL::EditPad(), PAD_TOOL::EnumeratePads(), PCB_EDIT_FRAME::ExecuteRemoteCommand(), PAD_TOOL::ExitPadEditMode(), PCB_SELECTION_TOOL::FilterCollectorForFootprints(), FOOTPRINT_PREVIEW_PANEL::GetBackgroundColor(), FOOTPRINT_PREVIEW_PANEL::GetForegroundColor(), ROUTER_PREVIEW_ITEM::getLayerColor(), GRID_HELPER::GRID_HELPER(), PCB_SELECTION_TOOL::GuessSelectionCandidates(), GERBVIEW_CONTROL::HighlightControl(), BOARD_INSPECTION_TOOL::HighlightNet(), BOARD_INSPECTION_TOOL::highlightNet(), PNS::TOOL_BASE::highlightNets(), PCB_NET_INSPECTOR_PANEL::highlightSelectedNets(), ROUTER_TOOL::Init(), DRAWING_TOOL::Init(), PCB_SELECTION_TOOL::Init(), PNS_KICAD_IFACE::IsItemVisible(), PCB_EDIT_FRAME::LoadProjectSettings(), PCB_BASE_FRAME::LoadSettings(), DIALOG_PAD_PROPERTIES::onChangePadMode(), PCB_NET_INSPECTOR_PANEL::onClearHighlighting(), ZONE_CREATE_HELPER::OnFirstPoint(), GERBER_LAYER_WIDGET::OnLayerColorChange(), GERBER_LAYER_WIDGET::OnLayerSelect(), APPEARANCE_CONTROLS::onNetclassContextMenu(), PCB_NET_INSPECTOR_PANEL::OnNetsListContextMenu(), GERBVIEW_FRAME::OnSelectActiveDCode(), GERBVIEW_FRAME::OnSelectActiveLayer(), PCB_DRAW_PANEL_GAL::OnShow(), PAD_TOOL::OnUndoRedo(), PCB_GRID_HELPER::PCB_GRID_HELPER(), POSITION_RELATIVE_TOOL::PositionRelativeInteractively(), DIALOG_PAD_PROPERTIES::prepareCanvas(), PCB_SELECTION_TOOL::pruneObscuredSelectionCandidates(), PCB_GRID_HELPER::queryVisible(), NET_GRID_TABLE::Rebuild(), DIALOG_PAD_PROPERTIES::redraw(), FOOTPRINT_PREVIEW_PANEL::renderFootprint(), EE_SELECTION_TOOL::Reset(), GERBVIEW_SELECTION_TOOL::Reset(), PCB_SELECTION_TOOL::Reset(), PCB_EDIT_FRAME::SaveProjectLocalSettings(), PCB_EDIT_FRAME::saveProjectSettings(), SCH_EDIT_FRAME::SCH_EDIT_FRAME(), PCB_SELECTION_TOOL::Selectable(), NETS_SEARCH_HANDLER::SelectItems(), RATSNEST_SEARCH_HANDLER::SelectItems(), PCB_BASE_FRAME::SetBoard(), EDA_DRAW_PANEL_GAL::SetHighContrastLayer(), GERBVIEW_DRAW_PANEL_GAL::SetHighContrastLayer(), PCB_DRAW_PANEL_GAL::SetHighContrastLayer(), PCB_EDIT_FRAME::setupUIConditions(), PCBNEW_PRINTOUT::setupViewLayers(), SYMBOL_PREVIEW_WIDGET::SYMBOL_PREVIEW_WIDGET(), COMMON_TOOLS::ToggleBoundingBoxes(), PCB_DRAW_PANEL_GAL::UpdateColors(), KIGFX::PCB_VIEW::UpdateDisplayOptions(), NET_GRID_TABLE::updateNetColor(), PANEL_EESCHEMA_COLOR_SETTINGS::updatePreview(), PANEL_PCBNEW_COLOR_SETTINGS::updatePreview(), DS_PROXY_VIEW_ITEM::ViewDraw(), EDIT_POINTS::ViewDraw(), RATSNEST_VIEW_ITEM::ViewDraw(), KIGFX::PREVIEW::RULER_ITEM::ViewDraw(), KIGFX::PREVIEW::SELECTION_AREA::ViewDraw(), KIGFX::ANCHOR_DEBUG::ViewDraw(), KIGFX::VIEW_GROUP::ViewDraw(), PAD::ViewGetLOD(), PCB_FIELD::ViewGetLOD(), PCB_REFERENCE_IMAGE::ViewGetLOD(), PCB_SHAPE::ViewGetLOD(), PCB_TEXT::ViewGetLOD(), PCB_TEXTBOX::ViewGetLOD(), PCB_TRACK::ViewGetLOD(), and PCB_VIA::ViewGetLOD().

◆ GetScale()

◆ GetScreenPixelSize()

const VECTOR2I & KIGFX::VIEW::GetScreenPixelSize ( ) const
inherited

◆ GetTopLayer()

int KIGFX::VIEW::GetTopLayer ( ) const
virtualinherited

◆ GetViewport()

◆ HasItem()

bool KIGFX::VIEW::HasItem ( const VIEW_ITEM aItem) const
inherited

Indicates whether or not the given item has been added to the view.

Definition at line 1673 of file view.cpp.

References KIGFX::VIEW_ITEM_DATA::m_view, and KIGFX::VIEW_ITEM::viewPrivData().

Referenced by PCB_BASE_FRAME::HideSolderMask(), and PCB_BASE_FRAME::ShowSolderMask().

◆ Hide()

◆ HideDrawingSheet()

void KIGFX::SCH_VIEW::HideDrawingSheet ( )

◆ InitPreview()

◆ invalidateItem()

void KIGFX::VIEW::invalidateItem ( VIEW_ITEM aItem,
int  aUpdateFlags 
)
protectedinherited

Manage dirty flags & redraw queuing when updating an item.

Parameters
aItemis the item to be updated.
aUpdateFlagsdetermines the way an item is refreshed. Update colors that are used for an item to be drawn

Definition at line 1263 of file view.cpp.

References KIGFX::ALL, KIGFX::VIEW_ITEM_DATA::clearUpdateFlags(), KIGFX::COLOR, KIGFX::GEOMETRY, KIGFX::INITIAL_ADD, KIGFX::VIEW::IsCached(), KIGFX::LAYERS, KIGFX::VIEW::m_layers, KIGFX::VIEW::MarkTargetDirty(), KIGFX::REPAINT, KIGFX::VIEW::updateBbox(), KIGFX::VIEW::updateItemColor(), KIGFX::VIEW::updateItemGeometry(), KIGFX::VIEW::updateLayers(), KIGFX::VIEW::VIEW_MAX_LAYERS, KIGFX::VIEW_ITEM::ViewGetLayers(), and KIGFX::VIEW_ITEM::viewPrivData().

Referenced by KIGFX::VIEW::UpdateItems().

◆ IsCached()

bool KIGFX::VIEW::IsCached ( int  aLayer) const
inlineinherited

◆ IsDirty()

bool KIGFX::VIEW::IsDirty ( ) const
inlineinherited

Return true if any of the VIEW layers needs to be refreshened.

Returns
True in case if any of layers is marked as dirty.

Definition at line 597 of file view.h.

References KIGFX::TARGETS_NUMBER.

Referenced by EDA_DRAW_PANEL_GAL::DoRePaint(), and TOOL_MANAGER::ProcessEvent().

◆ IsDynamic()

bool KIGFX::VIEW::IsDynamic ( ) const
inlineinherited

Tell if the VIEW is dynamic (ie.

can be changed, for example displaying PCBs in a window) or static (that cannot be modified, eg. displaying image/PDF).

Definition at line 587 of file view.h.

◆ IsHiddenOnOverlay()

bool KIGFX::VIEW::IsHiddenOnOverlay ( const VIEW_ITEM aItem) const
inherited

◆ IsLayerVisible()

◆ IsMirroredX()

◆ IsMirroredY()

bool KIGFX::VIEW::IsMirroredY ( ) const
inlineinherited

◆ IsTargetDirty()

bool KIGFX::VIEW::IsTargetDirty ( int  aTarget) const
inlineinherited

Return true if any of layers belonging to the target or the target itself should be redrawn.

Returns
True if the above condition is fulfilled.

Definition at line 614 of file view.h.

References KIGFX::TARGETS_NUMBER.

Referenced by KIGFX::VIEW::ClearTargets(), EDA_DRAW_PANEL_GAL::DoRePaint(), and KIGFX::VIEW::redrawRect().

◆ IsUsingDrawPriority()

bool KIGFX::VIEW::IsUsingDrawPriority ( ) const
inlineinherited
Returns
true if draw priority is being respected while redrawing.

Definition at line 695 of file view.h.

◆ IsVisible()

bool KIGFX::VIEW::IsVisible ( const VIEW_ITEM aItem) const
inherited

Return information if the item is visible (or not).

Parameters
aItemthe item to test.
Returns
when true, the item is visible (i.e. to be displayed, not visible in the current viewport)

Definition at line 1657 of file view.cpp.

References KIGFX::VIEW_ITEM_DATA::m_flags, KIGFX::VIEW_ITEM::viewPrivData(), and KIGFX::VISIBLE.

Referenced by EE_GRID_HELPER::BestSnapAnchor(), PCB_GRID_HELPER::computeAnchors(), PAD_TOOL::EnumeratePads(), EE_GRID_HELPER::GetGrid(), PNS_KICAD_IFACE::HideItem(), PNS_KICAD_IFACE::IsItemVisible(), EE_GRID_HELPER::queryVisible(), PCB_GRID_HELPER::queryVisible(), PCB_SELECTION_TOOL::Selectable(), and GRID_HELPER::updateSnapPoint().

◆ MakeOverlay()

std::shared_ptr< VIEW_OVERLAY > KIGFX::VIEW::MakeOverlay ( )
inherited

Definition at line 1700 of file view.cpp.

References KIGFX::VIEW::Add(), and overlay.

Referenced by AUTOPLACE_TOOL::autoplace().

◆ MarkClean()

void KIGFX::VIEW::MarkClean ( )
inlineinherited

Force redraw of view on the next rendering.

Definition at line 658 of file view.h.

References KIGFX::TARGETS_NUMBER.

Referenced by KIGFX::VIEW::Redraw().

◆ MarkDirty()

◆ markTargetClean()

void KIGFX::VIEW::markTargetClean ( int  aTarget)
inlineprotectedinherited

Definition at line 762 of file view.h.

References KIGFX::TARGETS_NUMBER.

◆ MarkTargetDirty()

◆ OnDestroy()

void KIGFX::VIEW::OnDestroy ( VIEW_ITEM aItem)
staticinherited

Nasty hack, invoked by the destructor of VIEW_ITEM to auto-remove the item from the owning VIEW if there is any.

KiCad relies too much on this mechanism. This is the only linking dependency now between EDA_ITEM and VIEW class. In near future I'll replace it with observers.

Definition at line 244 of file view.cpp.

References KIGFX::VIEW_ITEM_DATA::m_view, and KIGFX::VIEW_ITEM::m_viewPrivData.

Referenced by KIGFX::VIEW_ITEM::~VIEW_ITEM().

◆ Query() [1/2]

void KIGFX::VIEW::Query ( const BOX2I aRect,
const std::function< bool(VIEW_ITEM *)> &  aFunc 
) const
inherited

Run a function on all visible items that touch or are within the rectangle aRect.

Parameters
aFuncthe function to be executed; return true to continue, false to end query.

Definition at line 468 of file view.cpp.

References KIGFX::VIEW::m_orderedLayers.

◆ Query() [2/2]

int KIGFX::VIEW::Query ( const BOX2I aRect,
std::vector< LAYER_ITEM_PAIR > &  aResult 
) const
inherited

Find all visible items that touch or are within the rectangle aRect.

Parameters
aResultresult of the search, containing VIEW_ITEMs associated with their layers. Sorted according to the rendering order (items that are on top of the rendering stack as first).
Returns
Number of found items.

Definition at line 437 of file view.cpp.

References KIGFX::VIEW::m_orderedLayers, and UNDEFINED_LAYER.

Referenced by DRAWING_TOOL::DrawVia(), EE_GRID_HELPER::queryVisible(), PCB_GRID_HELPER::queryVisible(), EE_SELECTION_TOOL::SelectAll(), PCB_SELECTION_TOOL::SelectAll(), EE_SELECTION_TOOL::selectMultiple(), PCB_SELECTION_TOOL::selectMultiple(), EE_SELECTION_TOOL::UnselectAll(), and PCB_SELECTION_TOOL::UnselectAll().

◆ RecacheAllItems()

◆ Redraw()

◆ redrawRect()

◆ Remove()

void KIGFX::VIEW::Remove ( VIEW_ITEM aItem)
virtualinherited

Remove a VIEW_ITEM from the view.

Parameters
aItemitem to be removed. Caller must dispose the removed item if necessary

Reimplemented in KIGFX::PCB_VIEW.

Definition at line 357 of file view.cpp.

References KIGFX::VIEW_ITEM_DATA::clearUpdateFlags(), alg::delete_if(), KIGFX::GAL::DeleteGroup(), KIGFX::VIEW_ITEM_DATA::deleteGroups(), KIGFX::VIEW_ITEM_DATA::getGroup(), KIGFX::VIEW_ITEM_DATA::getLayers(), KIGFX::VIEW::VIEW_LAYER::items, KIGFX::VIEW::m_allItems, KIGFX::VIEW_ITEM_DATA::m_bbox, KIGFX::VIEW_ITEM_DATA::m_cachedIndex, KIGFX::VIEW::m_gal, KIGFX::VIEW::m_layers, KIGFX::VIEW_ITEM_DATA::m_view, KIGFX::VIEW_ITEM::m_viewPrivData, KIGFX::VIEW::MarkTargetDirty(), KIGFX::VIEW::VIEW_LAYER::target, and KIGFX::VIEW::VIEW_MAX_LAYERS.

Referenced by PANEL_ZONE_GAL::ActivateSelectedZone(), PCB_GRID_HELPER::Align(), EDA_DRAW_PANEL_GAL::ClearDebugOverlay(), EDIT_TOOL::DeleteItems(), SYMBOL_DIFF_WIDGET::DisplayDiff(), SYMBOL_PREVIEW_WIDGET::DisplayPart(), SYMBOL_PREVIEW_WIDGET::DisplaySymbol(), PL_EDIT_TOOL::DoDelete(), SELECTION_TOOL::doSelectionMenu(), EDIT_TOOL::DragArcTrack(), DRAWING_TOOL::drawArc(), DRAWING_TOOL::DrawDimension(), DRAWING_TOOL::drawOneBezier(), DRAWING_TOOL::drawShape(), SCH_DRAWING_TOOLS::ImportGraphics(), SYMBOL_EDITOR_DRAWING_TOOLS::ImportGraphics(), EE_POINT_EDITOR::Main(), PL_POINT_EDITOR::Main(), GERBVIEW_INSPECTION_TOOL::MeasureTool(), PCB_POINT_EDITOR::OnSelectionChange(), DRAWING_TOOL::PlaceImportedGraphics(), DRAWING_TOOL::PlaceTuningPattern(), BOARD_COMMIT::Push(), SCH_COMMIT::pushSchEdit(), KIGFX::PCB_VIEW::Remove(), SCH_BASE_FRAME::RemoveFromScreen(), EE_SELECTION_TOOL::Reset(), GERBVIEW_SELECTION_TOOL::Reset(), BOARD_EDITOR_CONTROL::Reset(), PCB_CONTROL::Reset(), SCH_COMMIT::Revert(), BOARD_COMMIT::Revert(), EE_SELECTION_TOOL::selectMultiple(), PL_SELECTION_TOOL::selectMultiple(), ZOOM_TOOL::selectRegion(), DS_DATA_ITEM::SyncDrawItems(), DS_DATA_ITEM_POLYGONS::SyncDrawItems(), DS_DATA_ITEM_TEXT::SyncDrawItems(), DS_DATA_ITEM_BITMAP::SyncDrawItems(), DIALOG_ERC::testErc(), GERBVIEW_SELECTION_TOOL::unselect(), SYMBOL_VIEWER_FRAME::updatePreviewSymbol(), EE_GRID_HELPER::~EE_GRID_HELPER(), EE_SELECTION_TOOL::~EE_SELECTION_TOOL(), GERBVIEW_SELECTION_TOOL::~GERBVIEW_SELECTION_TOOL(), PCB_GRID_HELPER::~PCB_GRID_HELPER(), PCB_SELECTION_TOOL::~PCB_SELECTION_TOOL(), RULE_AREA_CREATE_HELPER::~RULE_AREA_CREATE_HELPER(), SYMBOL_DIFF_FRAME::~SYMBOL_DIFF_FRAME(), SYMBOL_PREVIEW_WIDGET::~SYMBOL_PREVIEW_WIDGET(), SYMBOL_VIEWER_FRAME::~SYMBOL_VIEWER_FRAME(), KIGFX::VIEW::~VIEW(), and ZONE_CREATE_HELPER::~ZONE_CREATE_HELPER().

◆ ReorderLayerData()

void KIGFX::VIEW::ReorderLayerData ( std::unordered_map< int, int >  aReorderMap)
inherited

Remap the data between layer ids without invalidating that data.

Used by GerbView for the "Sort by X2" functionality.

Parameters
aReorderMapis a mapping of old to new layer ids.

Definition at line 715 of file view.cpp.

References KIGFX::COLOR, KIGFX::VIEW::m_allItems, KIGFX::VIEW::m_layers, KIGFX::VIEW_ITEM_DATA::m_requiredUpdate, KIGFX::VIEW_ITEM_DATA::reorderGroups(), KIGFX::VIEW_ITEM_DATA::saveLayers(), KIGFX::VIEW::UpdateItems(), and KIGFX::VIEW::VIEW_MAX_LAYERS.

Referenced by GERBVIEW_FRAME::RemapLayers().

◆ ResizeSheetWorkingArea()

◆ ReverseDrawOrder()

void KIGFX::VIEW::ReverseDrawOrder ( bool  aFlag)
inlineinherited

Only takes effect if UseDrawPriority is true.

Parameters
aFlagis true if draw order should be reversed

Definition at line 713 of file view.h.

Referenced by EDA_DRAW_PANEL_GAL::SwitchBackend().

◆ SetBoundary() [1/2]

void KIGFX::VIEW::SetBoundary ( const BOX2D aBoundary)
inlineinherited

Set limits for view area.

Parameters
aBoundaryis the box that limits view area.

Definition at line 287 of file view.h.

Referenced by PL_DRAW_PANEL_GAL::DisplayDrawingSheet(), DIALOG_PAD_PROPERTIES::redraw(), and SYMBOL_DIFF_FRAME::SYMBOL_DIFF_FRAME().

◆ SetBoundary() [2/2]

void KIGFX::VIEW::SetBoundary ( const BOX2I aBoundary)
inlineinherited

Set limits for view area.

Parameters
aBoundaryis the box that limits view area.

Definition at line 297 of file view.h.

References BOX2< Vec >::GetEnd(), and BOX2< Vec >::GetOrigin().

◆ SetCenter() [1/2]

void KIGFX::VIEW::SetCenter ( const VECTOR2D aCenter)
inherited

Set the center point of the VIEW (i.e.

the point in world space that will be drawn in the middle of the screen).

Parameters
aCenterthe new center point, in world space coordinates.

Definition at line 613 of file view.cpp.

References KIGFX::GAL::ComputeWorldScreenMatrix(), BOX2< Vec >::Contains(), BOX2< Vec >::GetBottom(), BOX2< Vec >::GetLeft(), BOX2< Vec >::GetRight(), BOX2< Vec >::GetTop(), KIGFX::VIEW::m_boundary, KIGFX::VIEW::m_center, KIGFX::VIEW::m_gal, KIGFX::VIEW::MarkDirty(), KIGFX::GAL::SetLookAtPoint(), VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by KIGFX::WX_VIEW_CONTROLS::CenterOnCursor(), SCH_EDIT_FRAME::DisplayCurrentSheet(), COMMON_TOOLS::doCenter(), COMMON_TOOLS::doZoomFit(), DESIGN_BLOCK_PREVIEW_WIDGET::fitOnDrawArea(), SYMBOL_PREVIEW_WIDGET::fitOnDrawArea(), EDA_DRAW_FRAME::FocusOnLocation(), KIGFX::WX_VIEW_CONTROLS::onMotion(), KIGFX::WX_VIEW_CONTROLS::onPanGesture(), KIGFX::WX_VIEW_CONTROLS::onScroll(), EDA_DRAW_PANEL_GAL::onSize(), KIGFX::WX_VIEW_CONTROLS::onTimer(), KIGFX::WX_VIEW_CONTROLS::onWheel(), KIGFX::WX_VIEW_CONTROLS::onZoomGesture(), SYMBOL_EDITOR_DRAWING_TOOLS::PlaceAnchor(), SCH_BASE_FRAME::RedrawScreen(), ZOOM_TOOL::selectRegion(), NL_SCHEMATIC_PLUGIN_IMPL::SetCameraMatrix(), NL_GERBVIEW_PLUGIN_IMPL::SetCameraMatrix(), NL_PL_EDITOR_PLUGIN_IMPL::SetCameraMatrix(), NL_PCBNEW_PLUGIN_IMPL::SetCameraMatrix(), KIGFX::VIEW::SetCenter(), KIGFX::WX_VIEW_CONTROLS::SetCrossHairCursorPosition(), KIGFX::VIEW::SetGAL(), KIGFX::VIEW::SetScale(), KIGFX::VIEW::SetViewport(), KIGFX::WX_VIEW_CONTROLS::WarpMouseCursor(), PANEL_EESCHEMA_COLOR_SETTINGS::zoomFitPreview(), PANEL_PCBNEW_COLOR_SETTINGS::zoomFitPreview(), PANEL_ZONE_GAL::ZoomFitScreen(), and PCB_SELECTION_TOOL::zoomFitSelection().

◆ SetCenter() [2/2]

void KIGFX::VIEW::SetCenter ( const VECTOR2D aCenter,
const std::vector< BOX2D > &  obscuringScreenRects 
)
inherited

Set the center point of the VIEW, attempting to avoid obscuringScreenRects (for instance, the screen rect of a modeless dialog in front of the VIEW).

Parameters
aCenterthe new center point, in world space coordinates.
obscuringScreenRectsthe obscuring rects, in screen space coordinates.

Definition at line 638 of file view.cpp.

References ARC_LOW_DEF, SHAPE_POLY_SET::BBox(), SHAPE_POLY_SET::BooleanSubtract(), BOX2< Vec >::Centre(), SHAPE_POLY_SET::Deflate(), BOX2< Vec >::GetHeight(), KIGFX::GAL::GetScreenPixelSize(), BOX2< Vec >::GetWidth(), SHAPE_POLY_SET::IsEmpty(), KIGFX::VIEW::m_gal, SHAPE_POLY_SET::PM_FAST, KIGFX::VIEW::SetCenter(), and KIGFX::VIEW::ToWorld().

◆ SetGAL()

◆ SetLayerDiff()

void KIGFX::VIEW::SetLayerDiff ( int  aLayer,
bool  aDiff = true 
)
inlineinherited

Set the whether the layer should drawn differentially.

Parameters
aLayeris the layer to set to be draw differentially
aDiffis the layer diff'ing state.

Definition at line 432 of file view.h.

Referenced by GERBVIEW_FRAME::UpdateXORLayers().

◆ SetLayerDisplayOnly()

void KIGFX::VIEW::SetLayerDisplayOnly ( int  aLayer,
bool  aDisplayOnly = true 
)
inlineinherited

Set a layer display-only (ie: to be rendered but not returned by hit test queries).

Definition at line 465 of file view.h.

Referenced by SCH_DRAW_PANEL::setDefaultLayerDeps(), SCH_PREVIEW_PANEL::setDefaultLayerDeps(), GERBVIEW_DRAW_PANEL_GAL::setDefaultLayerDeps(), PL_DRAW_PANEL_GAL::setDefaultLayerDeps(), and PCB_DRAW_PANEL_GAL::setDefaultLayerDeps().

◆ SetLayerHasNegatives()

void KIGFX::VIEW::SetLayerHasNegatives ( int  aLayer,
bool  aNegatives = true 
)
inlineinherited

Set the status of negatives presense in a particular layer.

Parameters
aLayeris the layer to set as containing negatives (or not).
aNegativesis the layer negatives state.

Definition at line 450 of file view.h.

Referenced by GERBVIEW_FRAME::unarchiveFiles().

◆ SetLayerOrder()

void KIGFX::VIEW::SetLayerOrder ( int  aLayer,
int  aRenderingOrder 
)
inherited

Set rendering order of a particular layer.

Lower values are rendered first.

Parameters
aLayeris the layer.
aRenderingOrderis an arbitrary number denoting the rendering order.

Definition at line 673 of file view.cpp.

References KIGFX::VIEW::m_layers, and KIGFX::VIEW::sortLayers().

Referenced by SCH_DRAW_PANEL::setDefaultLayerOrder(), SCH_PREVIEW_PANEL::setDefaultLayerOrder(), PCB_DRAW_PANEL_GAL::setDefaultLayerOrder(), GERBVIEW_DRAW_PANEL_GAL::SetTopLayer(), and PCB_DRAW_PANEL_GAL::SetTopLayer().

◆ SetLayerTarget()

void KIGFX::VIEW::SetLayerTarget ( int  aLayer,
RENDER_TARGET  aTarget 
)
inlineinherited

◆ SetLayerVisible()

◆ SetMirror()

void KIGFX::VIEW::SetMirror ( bool  aMirrorX,
bool  aMirrorY 
)
inherited

Control the mirroring of the VIEW.

Parameters
aMirrorXwhen true, the X axis is mirrored.
aMirrorYwhen true, the Y axis is mirrored.

Definition at line 574 of file view.cpp.

References _, KIGFX::VIEW::m_gal, KIGFX::VIEW::m_mirrorX, KIGFX::VIEW::m_mirrorY, KIGFX::VIEW::MarkDirty(), and KIGFX::GAL::SetFlip().

Referenced by GERBVIEW_CONTROL::DisplayControl(), APPEARANCE_CONTROLS::doApplyLayerPreset(), PCB_CONTROL::FlipPcbView(), SCH_DRAW_PANEL::SCH_DRAW_PANEL(), SCH_PREVIEW_PANEL::SCH_PREVIEW_PANEL(), and KIGFX::VIEW::SetGAL().

◆ SetPainter()

void KIGFX::VIEW::SetPainter ( PAINTER aPainter)
inlineinherited

◆ SetRequired()

void KIGFX::VIEW::SetRequired ( int  aLayerId,
int  aRequiredId,
bool  aRequired = true 
)
inherited

Mark the aRequiredId layer as required for the aLayerId layer.

In order to display the layer, all of its required layers have to be enabled.

Parameters
aLayerIdis the id of the layer for which we enable/disable the required layer.
aRequiredIdis the id of the required layer.
aRequiredtells if the required layer should be added or removed from the list.

Definition at line 425 of file view.cpp.

References KIGFX::VIEW::m_layers.

Referenced by PCB_DRAW_PANEL_GAL::setDefaultLayerDeps().

◆ SetScale()

void KIGFX::SCH_VIEW::SetScale ( double  aScale,
VECTOR2D  aAnchor = { 0, 0 } 
)
overridevirtual

Set the scaling factor, zooming around a given anchor point.

(depending on correct GAL unit length & DPI settings).

Parameters
aAnchoris the zooming anchor point.
aScaleis the scale factor.

Reimplemented from KIGFX::VIEW.

Definition at line 75 of file sch_view.cpp.

References m_frame, SCH_BASE_FRAME::RefreshZoomDependentItems(), and KIGFX::VIEW::SetScale().

Referenced by SCH_EDIT_FRAME::DisplayCurrentSheet(), and NL_SCHEMATIC_PLUGIN_IMPL::SetViewExtents().

◆ SetScaleLimits()

void KIGFX::VIEW::SetScaleLimits ( double  aMaximum,
double  aMinimum 
)
inlineinherited

Set minimum and maximum values for scale.

Parameters
aMaximumis the maximum value for scale.
aMinimumis the minimum value for scale.

Definition at line 317 of file view.h.

Referenced by GERBVIEW_DRAW_PANEL_GAL::GERBVIEW_DRAW_PANEL_GAL(), PCB_DRAW_PANEL_GAL::PCB_DRAW_PANEL_GAL(), PL_DRAW_PANEL_GAL::PL_DRAW_PANEL_GAL(), SCH_DRAW_PANEL::SCH_DRAW_PANEL(), and SCH_PREVIEW_PANEL::SCH_PREVIEW_PANEL().

◆ SetTopLayer()

void KIGFX::VIEW::SetTopLayer ( int  aLayer,
bool  aEnabled = true 
)
virtualinherited

Set given layer to be displayed on the top or sets back the default order of layers.

Parameters
aEnabled= true to display aLayer on the top.
aLayeris the layer or -1 in case when no particular layer should be displayed on the top.

Definition at line 871 of file view.cpp.

References KIGFX::VIEW::m_enableOrderModifier, KIGFX::VIEW::m_layers, KIGFX::VIEW::m_topLayers, and KIGFX::VIEW::TOP_LAYER_MODIFIER.

Referenced by DIALOG_PAD_PROPERTIES::redraw(), EDA_DRAW_PANEL_GAL::SetTopLayer(), GERBVIEW_DRAW_PANEL_GAL::SetTopLayer(), PL_DRAW_PANEL_GAL::SetTopLayer(), PCB_DRAW_PANEL_GAL::SetTopLayer(), BOARD_PRINTOUT::setupViewLayers(), and PCBNEW_PRINTOUT::setupViewLayers().

◆ SetViewport()

void KIGFX::VIEW::SetViewport ( const BOX2D aViewport)
inherited

◆ SetVisible()

void KIGFX::VIEW::SetVisible ( VIEW_ITEM aItem,
bool  aIsVisible = true 
)
inherited

◆ ShowPreview()

◆ sortLayers()

void KIGFX::VIEW::sortLayers ( )
protectedinherited

Clear cached GAL group numbers (ONLY numbers stored in VIEW_ITEMs, not group objects used by GAL)

Definition at line 1305 of file view.cpp.

References KIGFX::VIEW::compareRenderingOrder(), KIGFX::VIEW::m_layers, KIGFX::VIEW::m_orderedLayers, and KIGFX::VIEW::MarkDirty().

Referenced by KIGFX::VIEW::SetLayerOrder(), KIGFX::VIEW::UpdateAllLayersOrder(), and KIGFX::VIEW::VIEW().

◆ SortLayers()

void KIGFX::VIEW::SortLayers ( int  aLayers[],
int &  aCount 
) const
inherited

Change the order of given layer ids, so after sorting the order corresponds to layers rendering order (descending, ie.

order in which layers should be drawn - from the bottom to the top).

Parameters
aLayersstores id of layers to be sorted.
aCountstores the number of layers.

Definition at line 687 of file view.cpp.

References KIGFX::VIEW::GetLayerOrder().

Referenced by KIGFX::VIEW::draw(), and KIGFX::VIEW_GROUP::ViewDraw().

◆ ToScreen() [1/2]

VECTOR2D KIGFX::VIEW::ToScreen ( const VECTOR2D aCoord,
bool  aAbsolute = true 
) const
inherited

Convert a world space point/vector to a point/vector in screen space coordinates.

Parameters
aCoordis the point/vector to be converted.
aAbsolutewhen true aCoord is treated as a point, otherwise as a direction (vector).

Definition at line 503 of file view.cpp.

References MATRIX3x3< T >::GetScale(), KIGFX::GAL::GetWorldScreenMatrix(), KIGFX::VIEW::m_gal, VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by KIGFX::WX_VIEW_CONTROLS::handleAutoPanning(), KIGFX::WX_VIEW_CONTROLS::SetCrossHairCursorPosition(), KIGFX::VIEW::SetScale(), and KIGFX::WX_VIEW_CONTROLS::WarpMouseCursor().

◆ ToScreen() [2/2]

double KIGFX::VIEW::ToScreen ( double  aSize) const
inherited

Convert a world space one dimensional size to a one dimensional size in screen space.

Parameters
aSizethe size to be transformed.

Definition at line 514 of file view.cpp.

References MATRIX3x3< T >::GetScale(), KIGFX::GAL::GetWorldScreenMatrix(), KIGFX::VIEW::m_gal, and VECTOR2< T >::x.

◆ ToWorld() [1/2]

VECTOR2D KIGFX::VIEW::ToWorld ( const VECTOR2D aCoord,
bool  aAbsolute = true 
) const
inherited

Converts a screen space point/vector to a point/vector in world space coordinates.

Parameters
aCoordis the point/vector to be converted.
aAbsolutewhen true aCoord is treated as a point, otherwise as a direction (vector).

Definition at line 484 of file view.cpp.

References MATRIX3x3< T >::GetScale(), KIGFX::GAL::GetScreenWorldMatrix(), KIGFX::VIEW::m_gal, VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by EE_POINT_EDITOR::addCornerCondition(), PCB_GRID_HELPER::BestDragOrigin(), PCB_GRID_HELPER::BestSnapAnchor(), COMMON_TOOLS::doCenter(), COMMON_TOOLS::doZoomFit(), KIGFX::PREVIEW::POLYGON_ITEM::drawPreviewShape(), EDIT_POINTS::FindPoint(), DESIGN_BLOCK_PREVIEW_WIDGET::fitOnDrawArea(), SYMBOL_PREVIEW_WIDGET::fitOnDrawArea(), PCB_BASE_FRAME::FocusOnItems(), GENERAL_COLLECTORS_GUIDE::GENERAL_COLLECTORS_GUIDE(), KIGFX::WX_VIEW_CONTROLS::GetMousePosition(), KIGFX::VIEW::GetViewport(), DS_PROXY_VIEW_ITEM::HitTestDrawingSheetItems(), KIGFX::WX_VIEW_CONTROLS::onMagnify(), KIGFX::WX_VIEW_CONTROLS::onMotion(), KIGFX::WX_VIEW_CONTROLS::onPanGesture(), KIGFX::WX_VIEW_CONTROLS::onScroll(), EDA_DRAW_PANEL_GAL::onSize(), KIGFX::WX_VIEW_CONTROLS::onTimer(), KIGFX::WX_VIEW_CONTROLS::onWheel(), KIGFX::WX_VIEW_CONTROLS::onZoomGesture(), KIGFX::WX_VIEW_CONTROLS::PinCursorInsideNonAutoscrollArea(), KIGFX::VIEW::Redraw(), KIGFX::WX_VIEW_CONTROLS::refreshMouse(), PL_SELECTION_TOOL::selectionContains(), ZOOM_TOOL::selectRegion(), KIGFX::VIEW::SetCenter(), KIGFX::VIEW::SetScale(), KIGFX::VIEW::SetViewport(), EDIT_POINTS::ViewDraw(), KIGFX::PREVIEW::BEZIER_ASSISTANT::ViewDraw(), PCB_TUNING_PATTERN::ViewDraw(), KIGFX::ORIGIN_VIEWITEM::ViewDraw(), KIGFX::ANCHOR_DEBUG::ViewDraw(), KIGFX::CONSTRUCTION_GEOM::ViewDraw(), KIGFX::SNAP_INDICATOR::ViewDraw(), PCB_SELECTION_TOOL::ZoomFitCrossProbeBBox(), PANEL_EESCHEMA_COLOR_SETTINGS::zoomFitPreview(), PANEL_PCBNEW_COLOR_SETTINGS::zoomFitPreview(), PANEL_ZONE_GAL::ZoomFitScreen(), and PCB_SELECTION_TOOL::zoomFitSelection().

◆ ToWorld() [2/2]

double KIGFX::VIEW::ToWorld ( double  aSize) const
inherited

Converts a screen space one dimensional size to a one dimensional size in world space coordinates.

Parameters
aSizeis the size to be converted.

Definition at line 495 of file view.cpp.

References MATRIX3x3< T >::GetScale(), KIGFX::GAL::GetScreenWorldMatrix(), KIGFX::VIEW::m_gal, and VECTOR2< T >::x.

◆ Update() [1/2]

void KIGFX::VIEW::Update ( const VIEW_ITEM aItem) const
virtualinherited

Reimplemented in KIGFX::PCB_VIEW.

Definition at line 1681 of file view.cpp.

References KIGFX::ALL, and KIGFX::VIEW::Update().

◆ Update() [2/2]

void KIGFX::VIEW::Update ( const VIEW_ITEM aItem,
int  aUpdateFlags 
) const
virtualinherited

For dynamic VIEWs, inform the associated VIEW that the graphical representation of this item has changed.

For static views calling has no effect.

Parameters
aItemthe item to update.
aUpdateFlagshow much the object has changed.

Reimplemented in KIGFX::PCB_VIEW.

Definition at line 1687 of file view.cpp.

References KIGFX::VIEW_ITEM_DATA::m_requiredUpdate, KIGFX::NONE, and KIGFX::VIEW_ITEM::viewPrivData().

Referenced by KIGFX::VIEW::Add(), SCH_RULE_AREA::addDirective(), PNS_PCBNEW_DEBUG_DECORATOR::AddItem(), PNS_PCBNEW_DEBUG_DECORATOR::AddShape(), KIGFX::VIEW::AddToPreview(), PCB_GRID_HELPER::BestSnapAnchor(), EE_GRID_HELPER::BestSnapAnchor(), PNS_PCBNEW_DEBUG_DECORATOR::Clear(), DRC_INTERACTIVE_COURTYARD_CLEARANCE::ClearConflicts(), SCH_RULE_AREA::clearDirectives(), KIGFX::VIEW::ClearPreview(), PL_SELECTION_TOOL::ClearSelection(), EE_SELECTION_TOOL::ClearSelection(), EDIT_TOOL::DeleteItems(), PNS_KICAD_IFACE::DisplayItem(), PNS_KICAD_IFACE::DisplayPathLine(), PNS_KICAD_IFACE::DisplayRatline(), EDIT_TOOL::DragArcTrack(), KIGFX::VIEW::draw(), DRAWING_TOOL::drawArc(), DRAWING_TOOL::DrawDimension(), DRAWING_TOOL::drawOneBezier(), PL_DRAWING_TOOLS::DrawShape(), DRAWING_TOOL::drawShape(), DRAWING_TOOL::DrawTable(), PAD_TOOL::EnumeratePads(), PNS_KICAD_IFACE::EraseView(), EE_INSPECTION_TOOL::ExcludeMarker(), DIALOG_ERC::ExcludeMarker(), EE_GRID_HELPER::GetGrid(), KIGFX::VIEW::Hide(), PNS_KICAD_IFACE::HideItem(), PL_SELECTION_TOOL::highlight(), EE_SELECTION_TOOL::highlight(), SCH_DRAWING_TOOLS::ImportGraphics(), SYMBOL_EDITOR_DRAWING_TOOLS::ImportGraphics(), EE_SELECTION_TOOL::Main(), GERBVIEW_INSPECTION_TOOL::MeasureTool(), EDIT_TOOL::MoveExact(), PL_EDIT_TOOL::moveItem(), PROPERTIES_FRAME::OnAcceptPrms(), DIALOG_ERC::OnERCItemRClick(), RULE_AREA_CREATE_HELPER::OnGeometryChange(), ZONE_CREATE_HELPER::OnGeometryChange(), PCB_POINT_EDITOR::OnSelectionChange(), SYMBOL_DIFF_WIDGET::onSlider(), KIGFX::VIEW::RECACHE_ITEM_VISITOR::operator()(), BOARD_EDITOR_CONTROL::PlaceFootprint(), DRAWING_TOOL::PlaceImportedGraphics(), PL_DRAWING_TOOLS::PlaceItem(), DRAWING_TOOL::PlaceText(), DRAWING_TOOL::PlaceTuningPattern(), DIALOG_CHANGE_SYMBOLS::processSymbols(), BOARD_COMMIT::Push(), SCH_COMMIT::pushLibEdit(), SCH_EDIT_FRAME::RecalculateConnections(), DIALOG_PAD_PROPERTIES::redraw(), PCB_EDIT_FRAME::redrawNetnames(), PCB_DRAW_PANEL_GAL::RedrawRatsnest(), SCH_EDIT_FRAME::RefreshOperatingPointDisplay(), SCH_BASE_FRAME::RefreshZoomDependentItems(), SCH_RULE_AREA::ResetDirectivesAndItems(), SCH_EDIT_FRAME::SaveSymbolToSchematic(), EE_SELECTION_TOOL::selectMultiple(), PL_SELECTION_TOOL::selectMultiple(), EE_SELECTION_TOOL::selectPoint(), ZOOM_TOOL::selectRegion(), GERBVIEW_SELECTION_TOOL::selectVisually(), KIGFX::VIEW::SetVisible(), SCH_EDIT_FRAME::TestDanglingEnds(), DIALOG_JUNCTION_PROPS::TransferDataFromWindow(), SCH_MOVE_TOOL::trimDanglingLines(), PL_SELECTION_TOOL::unhighlight(), EE_SELECTION_TOOL::unhighlight(), GERBVIEW_SELECTION_TOOL::unselectVisually(), KIGFX::VIEW::Update(), KIGFX::PCB_VIEW::Update(), DRC_INTERACTIVE_COURTYARD_CLEARANCE::UpdateConflicts(), PL_POINT_EDITOR::updateItem(), PCB_POINT_EDITOR::updateItem(), EE_TOOL_BASE< T >::updateItem(), SCH_BASE_FRAME::UpdateItem(), SCH_EDITOR_CONTROL::UpdateNetHighlighting(), EE_POINT_EDITOR::updatePoints(), PL_POINT_EDITOR::updatePoints(), PCB_POINT_EDITOR::updatePoints(), PCB_SELECTION_TOOL::updateSelection(), GRID_HELPER::updateSnapPoint(), and BOARD::UpdateUserUnits().

◆ UpdateAllItems()

void KIGFX::VIEW::UpdateAllItems ( int  aUpdateFlags)
inherited

Update all items in the view according to the given flags.

Parameters
aUpdateFlagsis is according to KIGFX::VIEW_UPDATE_FLAGS

Definition at line 1563 of file view.cpp.

References KIGFX::VIEW::m_allItems.

Referenced by SCH_BASE_FRAME::CommonSettingsChanged(), SYMBOL_EDIT_FRAME::CommonSettingsChanged(), GERBVIEW_FRAME::CommonSettingsChanged(), PCB_BASE_FRAME::CommonSettingsChanged(), PL_EDITOR_FRAME::CommonSettingsChanged(), GERBVIEW_CONTROL::DisplayControl(), SCH_BASE_FRAME::HardRedraw(), GERBVIEW_CONTROL::HighlightControl(), SCH_EDIT_FRAME::KiwayMailIn(), SYMBOL_VIEWER_FRAME::KiwayMailIn(), SYMBOL_EDIT_FRAME::LoadOneLibrarySymbolAux(), SYMBOL_EDIT_FRAME::LoadSymbolFromSchematic(), PCB_EDIT_FRAME::onBoardLoaded(), GERBER_LAYER_WIDGET::OnLayerSelect(), PCB_NET_INSPECTOR_PANEL::onRenameSelectedNet(), GERBVIEW_FRAME::OnSelectActiveDCode(), GERBVIEW_FRAME::OnSelectActiveLayer(), SCH_EDITOR_CONTROL::PageSetup(), SYMBOL_EDIT_FRAME::RebuildView(), FOOTPRINT_PREVIEW_PANEL::RefreshAll(), GERBVIEW_FRAME::RemapLayers(), GERBVIEW_FRAME::SetLayerDrawPrms(), SYMBOL_EDIT_FRAME::ShowChangedLanguage(), SYMBOL_EDITOR_CONTROL::ShowElectricalTypes(), SYMBOL_EDITOR_CONTROL::ShowPinNumbers(), SCH_EDIT_FRAME::ShowSchematicSetupDialog(), SCH_BASE_FRAME::SyncView(), COMMON_TOOLS::ToggleBoundingBoxes(), SCH_EDITOR_CONTROL::ToggleDirectiveLabels(), SCH_EDITOR_CONTROL::ToggleHiddenFields(), SYMBOL_EDITOR_CONTROL::ToggleHiddenFields(), SCH_EDITOR_CONTROL::ToggleHiddenPins(), SYMBOL_EDITOR_CONTROL::ToggleHiddenPins(), SCH_EDITOR_CONTROL::TogglePinAltIcons(), SYMBOL_EDITOR_CONTROL::TogglePinAltIcons(), PANEL_EESCHEMA_COLOR_SETTINGS::updatePreview(), PANEL_PCBNEW_COLOR_SETTINGS::updatePreview(), and GERBVIEW_FRAME::UpdateXORLayers().

◆ UpdateAllItemsConditionally() [1/2]

◆ UpdateAllItemsConditionally() [2/2]

void KIGFX::VIEW::UpdateAllItemsConditionally ( std::function< int(VIEW_ITEM *)>  aItemFlagsProvider)
inherited

Update items in the view according to the flags returned by the callback.

Parameters
aItemFlagsProvideris a function returning any KIGFX::VIEW_UPDATE_FLAGS that should be set on the VIEW_ITEM.

Definition at line 1590 of file view.cpp.

References KIGFX::VIEW::m_allItems.

◆ UpdateAllLayersColor()

◆ UpdateAllLayersOrder()

◆ updateBbox()

◆ updateItemColor()

void KIGFX::VIEW::updateItemColor ( VIEW_ITEM aItem,
int  aLayer 
)
protectedinherited

◆ updateItemGeometry()

◆ UpdateItems()

◆ UpdateLayerColor()

void KIGFX::VIEW::UpdateLayerColor ( int  aLayer)
inherited

◆ updateLayers()

◆ UseDrawPriority()

void KIGFX::VIEW::UseDrawPriority ( bool  aFlag)
inlineinherited
Parameters
aFlagis true if draw priority should be respected while redrawing.

Definition at line 703 of file view.h.

Referenced by PANEL_ZONE_GAL::PANEL_ZONE_GAL().

Member Data Documentation

◆ m_allItems

◆ m_boundary

BOX2D KIGFX::VIEW::m_boundary
protectedinherited

◆ m_center

VECTOR2D KIGFX::VIEW::m_center
protectedinherited

Definition at line 861 of file view.h.

Referenced by KIGFX::VIEW::SetCenter(), KIGFX::VIEW::SetGAL(), and KIGFX::VIEW::SetScale().

◆ m_dirtyTargets

bool KIGFX::VIEW::m_dirtyTargets[TARGETS_NUMBER]
protectedinherited

Flag to respect draw priority when drawing items.

Definition at line 882 of file view.h.

◆ m_drawingSheet

std::unique_ptr<DS_PROXY_VIEW_ITEM> KIGFX::SCH_VIEW::m_drawingSheet
private

Definition at line 109 of file sch_view.h.

Referenced by Cleanup(), DisplaySheet(), and GetDrawingSheet().

◆ m_dynamic

bool KIGFX::VIEW::m_dynamic
protectedinherited

Flag to mark targets as dirty so they have to be redrawn on the next refresh event.

Definition at line 879 of file view.h.

◆ m_enableOrderModifier

bool KIGFX::VIEW::m_enableOrderModifier
protectedinherited

The set of possible displayed layers and its properties.

Definition at line 846 of file view.h.

Referenced by KIGFX::VIEW::ClearTopLayers(), KIGFX::VIEW::EnableTopLayer(), and KIGFX::VIEW::SetTopLayer().

◆ m_frame

SCH_BASE_FRAME* KIGFX::SCH_VIEW::m_frame
private

Definition at line 106 of file sch_view.h.

Referenced by DisplaySheet(), SCH_VIEW(), and SetScale().

◆ m_gal

◆ m_layers

◆ m_maxScale

double KIGFX::VIEW::m_maxScale
protectedinherited

Definition at line 866 of file view.h.

Referenced by KIGFX::VIEW::SetScale().

◆ m_minScale

double KIGFX::VIEW::m_minScale
protectedinherited

Definition at line 865 of file view.h.

Referenced by KIGFX::VIEW::SetScale().

◆ m_mirrorX

bool KIGFX::VIEW::m_mirrorX
protectedinherited

Definition at line 868 of file view.h.

Referenced by KIGFX::VIEW::SetGAL(), and KIGFX::VIEW::SetMirror().

◆ m_mirrorY

bool KIGFX::VIEW::m_mirrorY
protectedinherited

PAINTER contains information how do draw items.

Definition at line 869 of file view.h.

Referenced by KIGFX::VIEW::SetGAL(), and KIGFX::VIEW::SetMirror().

◆ m_nextDrawPriority

int KIGFX::VIEW::m_nextDrawPriority
protectedinherited

Flag to reverse the draw order when using draw priority.

Definition at line 888 of file view.h.

Referenced by KIGFX::VIEW::Add(), and KIGFX::VIEW::Clear().

◆ m_orderedLayers

std::vector<VIEW_LAYER*> KIGFX::VIEW::m_orderedLayers
protectedinherited

Flat list of all items.

Definition at line 852 of file view.h.

Referenced by KIGFX::VIEW::Query(), KIGFX::VIEW::redrawRect(), and KIGFX::VIEW::sortLayers().

◆ m_ownedItems

std::vector<VIEW_ITEM *> KIGFX::VIEW::m_ownedItems
protectedinherited

Whether to use rendering order modifier or not.

Definition at line 843 of file view.h.

Referenced by KIGFX::VIEW::AddToPreview(), and KIGFX::VIEW::ClearPreview().

◆ m_painter

PAINTER* KIGFX::VIEW::m_painter
protectedinherited

Interface to #PAINTER that is used to draw items.

Definition at line 872 of file view.h.

Referenced by KIGFX::VIEW::draw(), KIGFX::VIEW::UpdateAllLayersColor(), KIGFX::VIEW::updateItemColor(), KIGFX::VIEW::updateItemGeometry(), and KIGFX::VIEW::UpdateLayerColor().

◆ m_preview

std::unique_ptr<KIGFX::VIEW_GROUP> KIGFX::VIEW::m_preview
protectedinherited

◆ m_reverseDrawOrder

bool KIGFX::VIEW::m_reverseDrawOrder
protectedinherited

Definition at line 891 of file view.h.

Referenced by KIGFX::VIEW::redrawRect().

◆ m_scale

double KIGFX::VIEW::m_scale
protectedinherited

◆ m_topLayers

std::set<unsigned int> KIGFX::VIEW::m_topLayers
protectedinherited

Center point of the VIEW (the point at which we are looking at).

Definition at line 858 of file view.h.

Referenced by KIGFX::VIEW::ClearTopLayers(), KIGFX::VIEW::EnableTopLayer(), KIGFX::VIEW::GetTopLayer(), and KIGFX::VIEW::SetTopLayer().

◆ m_useDrawPriority

bool KIGFX::VIEW::m_useDrawPriority
protectedinherited

The next sequential drawing priority.

Definition at line 885 of file view.h.

Referenced by KIGFX::VIEW::redrawRect().

◆ TOP_LAYER_MODIFIER

constexpr int KIGFX::VIEW::TOP_LAYER_MODIFIER = -VIEW_MAX_LAYERS
staticconstexprinherited

◆ VIEW_MAX_LAYERS


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