![]() |
KiCad PCB EDA Suite
|
#include <pcb_view.h>
Public Types | |
typedef std::pair< VIEW_ITEM *, int > | LAYER_ITEM_PAIR |
Public Member Functions | |
PCB_VIEW (bool aIsDynamic=true) | |
virtual | ~PCB_VIEW () |
virtual void | Add (VIEW_ITEM *aItem, int aDrawPriority=-1) override |
Add a VIEW_ITEM to the view. More... | |
virtual void | Remove (VIEW_ITEM *aItem) override |
Remove a VIEW_ITEM from the view. More... | |
virtual void | Update (const VIEW_ITEM *aItem, int aUpdateFlags) const override |
For dynamic VIEWs, inform the associated VIEW that the graphical representation of this item has changed. More... | |
virtual void | Update (const VIEW_ITEM *aItem) const override |
For dynamic VIEWs, inform the associated VIEW that the graphical representation of this item has changed. More... | |
void | UpdateDisplayOptions (const PCB_DISPLAY_OPTIONS &aOptions) |
virtual int | Query (const BOX2I &aRect, std::vector< LAYER_ITEM_PAIR > &aResult) const |
Find all visible items that touch or are within the rectangle aRect. More... | |
void | SetVisible (VIEW_ITEM *aItem, bool aIsVisible=true) |
Set the item visibility. More... | |
void | Hide (VIEW_ITEM *aItem, bool aHide=true) |
Temporarily hide the item in the view (e.g. More... | |
bool | IsVisible (const VIEW_ITEM *aItem) const |
Return information if the item is visible (or not). More... | |
void | SetRequired (int aLayerId, int aRequiredId, bool aRequired=true) |
Mark the aRequiredId layer as required for the aLayerId layer. More... | |
void | CopySettings (const VIEW *aOtherView) |
Copy layers and visibility settings from another view. More... | |
void | SetGAL (GAL *aGal) |
Assign a rendering device for the VIEW. More... | |
GAL * | GetGAL () const |
Return the #GAL this view is using to draw graphical primitives. More... | |
void | SetPainter (PAINTER *aPainter) |
Set the painter object used by the view for drawing #VIEW_ITEMS. More... | |
PAINTER * | GetPainter () const |
Return the painter object used by the view for drawing #VIEW_ITEMS. More... | |
void | SetViewport (const BOX2D &aViewport) |
Set the visible area of the VIEW. More... | |
BOX2D | GetViewport () const |
Return the current viewport visible area rectangle. More... | |
void | SetMirror (bool aMirrorX, bool aMirrorY) |
Control the mirroring of the VIEW. More... | |
bool | IsMirroredX () const |
Return true if view is flipped across the X axis. More... | |
bool | IsMirroredY () const |
Return true if view is flipped across the Y axis. More... | |
virtual void | SetScale (double aScale, VECTOR2D aAnchor={ 0, 0 }) |
Set the scaling factor, zooming around a given anchor point. More... | |
double | GetScale () const |
void | SetBoundary (const BOX2D &aBoundary) |
Set limits for view area. More... | |
void | SetBoundary (const BOX2I &aBoundary) |
Set limits for view area. More... | |
const BOX2D & | GetBoundary () const |
void | SetScaleLimits (double aMaximum, double aMinimum) |
Set minimum and maximum values for scale. More... | |
void | SetCenter (const VECTOR2D &aCenter) |
Set the center point of the VIEW (i.e. More... | |
void | SetCenter (VECTOR2D aCenter, const BOX2D &occultingScreenRect) |
Set the center point of the VIEW, attempting to avoid occultingScreenRect (for instance, the screen rect of a modeless dialog in front of the VIEW). More... | |
const VECTOR2D & | GetCenter () const |
Return the center point of this VIEW (in world space coordinates). More... | |
VECTOR2D | ToWorld (const VECTOR2D &aCoord, bool aAbsolute=true) const |
Converts a screen space point/vector to a point/vector in world space coordinates. More... | |
double | ToWorld (double aSize) const |
Converts a screen space one dimensional size to a one dimensional size in world space coordinates. More... | |
VECTOR2D | ToScreen (const VECTOR2D &aCoord, bool aAbsolute=true) const |
Convert a world space point/vector to a point/vector in screen space coordinates. More... | |
double | ToScreen (double aSize) const |
Convert a world space one dimensional size to a one dimensional size in screen space. More... | |
const VECTOR2I & | GetScreenPixelSize () const |
Return the size of the our rendering area in pixels. More... | |
void | Clear () |
Remove all items from the view. More... | |
void | SetLayerVisible (int aLayer, bool aVisible=true) |
Control the visibility of a particular layer. More... | |
bool | IsLayerVisible (int aLayer) const |
Return information about visibility of a particular layer. More... | |
void | SetLayerDisplayOnly (int aLayer, bool aDisplayOnly=true) |
void | SetLayerTarget (int aLayer, RENDER_TARGET aTarget) |
Change the rendering target for a particular layer. More... | |
void | SetLayerOrder (int aLayer, int aRenderingOrder) |
Set rendering order of a particular layer. More... | |
int | GetLayerOrder (int aLayer) const |
Return rendering order of a particular layer. More... | |
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. More... | |
void | ReorderLayerData (std::unordered_map< int, int > aReorderMap) |
Remap the data between layer ids without invalidating that data. More... | |
void | UpdateLayerColor (int aLayer) |
Apply the new coloring scheme held by RENDER_SETTINGS in case that it has changed. More... | |
void | UpdateAllLayersColor () |
Apply the new coloring scheme to all layers. More... | |
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. More... | |
virtual void | EnableTopLayer (bool aEnable) |
Enable or disable display of the top layer. More... | |
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). More... | |
void | UpdateAllLayersOrder () |
Do everything that is needed to apply the rendering order of layers. More... | |
void | ClearTargets () |
Clear targets that are marked as dirty. More... | |
virtual void | Redraw () |
Immediately redraws the whole view. More... | |
void | RecacheAllItems () |
Rebuild GAL display lists. More... | |
bool | IsDynamic () const |
Tell if the VIEW is dynamic (ie. More... | |
bool | IsDirty () const |
Return true if any of the VIEW layers needs to be refreshened. More... | |
bool | IsTargetDirty (int aTarget) const |
Return true if any of layers belonging to the target or the target itself should be redrawn. More... | |
void | MarkTargetDirty (int aTarget) |
Set or clear target 'dirty' flag. More... | |
bool | IsCached (int aLayer) const |
Return true if the layer is cached. More... | |
void | MarkDirty () |
Force redraw of view on the next rendering. More... | |
void | MarkForUpdate (VIEW_ITEM *aItem) |
Add an item to a list of items that are going to be refreshed upon the next frame rendering. More... | |
void | UpdateItems () |
Iterate through the list of items that asked for updating and updates them. More... | |
void | UpdateAllItems (int aUpdateFlags) |
Update all items in the view according to the given flags. More... | |
void | UpdateAllItemsConditionally (int aUpdateFlags, std::function< bool(VIEW_ITEM *)> aCondition) |
Update items in the view according to the given flags and condition. More... | |
bool | IsUsingDrawPriority () const |
void | UseDrawPriority (bool aFlag) |
bool | IsDrawOrderReversed () const |
void | ReverseDrawOrder (bool aFlag) |
Only takes effect if UseDrawPriority is true. More... | |
std::shared_ptr< VIEW_OVERLAY > | MakeOverlay () |
void | InitPreview () |
void | ClearPreview () |
void | AddToPreview (EDA_ITEM *aItem, bool aTakeOwnership=true) |
void | ShowPreview (bool aShow=true) |
std::unique_ptr< VIEW > | DataReference () const |
Return a new VIEW object that shares the same set of VIEW_ITEMs and LAYERs. More... | |
int | GetPrintMode () const |
Get the current print mode. More... | |
void | SetPrintMode (int aPrintMode) |
Set the printing mode. More... | |
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. More... | |
Static Public Attributes | |
static constexpr int | VIEW_MAX_LAYERS = 512 |
maximum number of layers that may be shown More... | |
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. More... | |
void | draw (VIEW_ITEM *aItem, bool aImmediate=false) |
Draw an item on all layers that the item uses. More... | |
void | draw (VIEW_GROUP *aGroup, bool aImmediate=false) |
Draw a group of items on all layers that those items use. More... | |
void | sortLayers () |
Clear cached GAL group numbers (ONLY numbers stored in VIEW_ITEMs, not group objects used by GAL) More... | |
void | clearGroupCache () |
void | invalidateItem (VIEW_ITEM *aItem, int aUpdateFlags) |
Manage dirty flags & redraw queuing when updating an item. More... | |
void | updateItemColor (VIEW_ITEM *aItem, int aLayer) |
Update all information needed to draw an item. More... | |
void | updateItemGeometry (VIEW_ITEM *aItem, int aLayer) |
Update bounding box of an item. More... | |
void | updateBbox (VIEW_ITEM *aItem) |
Update set of layers that an item occupies. More... | |
void | updateLayers (VIEW_ITEM *aItem) |
Determine rendering order of layers. Used in display order sorting function. More... | |
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. More... | |
Protected Attributes | |
std::unique_ptr< KIGFX::VIEW_GROUP > | m_preview |
std::vector< EDA_ITEM * > | m_ownedItems |
Whether to use rendering order modifier or not. More... | |
bool | m_enableOrderModifier |
The set of possible displayed layers and its properties. More... | |
std::vector< VIEW_LAYER > | m_layers |
Sorted list of pointers to members of m_layers. More... | |
std::vector< VIEW_LAYER * > | m_orderedLayers |
Flat list of all items. More... | |
std::shared_ptr< std::vector< VIEW_ITEM * > > | m_allItems |
The set of layers that are displayed on the top. More... | |
std::set< unsigned int > | m_topLayers |
Center point of the VIEW (the point at which we are looking at). More... | |
VECTOR2D | m_center |
Scale of displayed VIEW_ITEMs. More... | |
double | m_scale |
View boundaries. More... | |
BOX2D | m_boundary |
Scale lower limit. More... | |
double | m_minScale |
Scale upper limit. More... | |
double | m_maxScale |
Horizontal flip flag. More... | |
bool | m_mirrorX |
Vertical flip flag. More... | |
bool | m_mirrorY |
PAINTER contains information how do draw items. More... | |
PAINTER * | m_painter |
Interface to #PAINTER that is used to draw items. More... | |
GAL * | m_gal |
Dynamic VIEW (eg. More... | |
bool | m_dynamic |
Flag to mark targets as dirty so they have to be redrawn on the next refresh event. More... | |
bool | m_dirtyTargets [TARGETS_NUMBER] |
Rendering order modifier for layers that are marked as top layers. More... | |
bool | m_useDrawPriority |
The next sequential drawing priority. More... | |
int | m_nextDrawPriority |
Flag to reverse the draw order when using draw priority. More... | |
bool | m_reverseDrawOrder |
A control for printing: m_printMode <= 0 means no printing mode (normal draw mode m_printMode > 0 is a printing mode (currently means "we are in printing mode"). More... | |
int | m_printMode |
Static Protected Attributes | |
static const int | TOP_LAYER_MODIFIER = -VIEW_MAX_LAYERS |
Flag to respect draw priority when drawing items. More... | |
Definition at line 36 of file pcb_view.h.
|
inherited |
KIGFX::PCB_VIEW::PCB_VIEW | ( | bool | aIsDynamic = true | ) |
Definition at line 38 of file pcb_view.cpp.
References KIGFX::VIEW::m_boundary, BOX2< Vec >::SetOrigin(), and BOX2< Vec >::SetSize().
|
virtual |
Definition at line 53 of file pcb_view.cpp.
|
overridevirtual |
Add a VIEW_ITEM to the view.
Set aDrawPriority to -1 to assign sequential priorities.
aItem | item to be added. No ownership is given |
aDrawPriority | priority to draw this item on its layer, lowest first. |
Reimplemented from KIGFX::VIEW.
Definition at line 58 of file pcb_view.cpp.
References KIGFX::VIEW::Add(), PCB_FOOTPRINT_T, FOOTPRINT::RunOnChildren(), and EDA_ITEM::Type().
Referenced by PCB_TOOL_BASE::doInteractiveItemPlacement(), MICROWAVE_TOOL::drawMicrowaveInductor(), PCB_VIEWER_TOOLS::MeasureTool(), PCB_POINT_EDITOR::OnSelectionChange(), BOARD_EDITOR_CONTROL::PlaceTarget(), FOOTPRINT_PREVIEW_PANEL::renderFootprint(), PCB_SELECTION_TOOL::Reset(), DIALOG_FOOTPRINT_CHECKER::runChecks(), PCB_SELECTION_TOOL::selectMultiple(), and PCB_SELECTION_TOOL::zoomFitSelection().
|
inherited |
Definition at line 1547 of file view.cpp.
References KIGFX::VIEW::Hide(), KIGFX::VIEW::m_ownedItems, KIGFX::VIEW::m_preview, KIGFX::VIEW::SetVisible(), and KIGFX::VIEW::Update().
Referenced by SCH_LINE_WIRE_BUS_TOOL::doDrawSegments(), SYMBOL_EDITOR_DRAWING_TOOLS::DrawShape(), SCH_DRAWING_TOOLS::DrawSheet(), ROUTER_TOOL::InlineDrag(), DRAWING_TOOL::InteractivePlaceWithPreview(), SCH_DRAWING_TOOLS::PlaceImage(), SCH_DRAWING_TOOLS::SingleClickPlace(), SYMBOL_EDITOR_DRAWING_TOOLS::TwoClickPlace(), and SCH_DRAWING_TOOLS::TwoClickPlace().
|
protectedinherited |
Definition at line 1362 of file view.cpp.
References KIGFX::VIEW::m_layers.
Referenced by KIGFX::VIEW::redrawRect().
|
inherited |
Remove all items from the view.
Definition at line 1091 of file view.cpp.
References KIGFX::GAL::ClearCache(), KIGFX::VIEW::m_allItems, KIGFX::VIEW::m_gal, KIGFX::VIEW::m_layers, KIGFX::VIEW::m_nextDrawPriority, and BOX2< Vec >::SetMaximum().
Referenced by KIGFX::SCH_VIEW::Cleanup(), GERBVIEW_FRAME::Clear_DrawLayers(), PCB_DRAW_PANEL_GAL::DisplayBoard(), SCH_DRAW_PANEL::DisplayComponent(), KIGFX::SCH_VIEW::DisplayComponent(), SCH_DRAW_PANEL::DisplaySheet(), PL_DRAW_PANEL_GAL::DisplayWorksheet(), GERBVIEW_FRAME::doCloseWindow(), DISPLAY_FOOTPRINTS_FRAME::InitDisplay(), FOOTPRINT_PREVIEW_PANEL::renderFootprint(), DS_PROXY_UNDO_ITEM::Restore(), PCB_BASE_EDIT_FRAME::SetBoard(), SYMBOL_EDIT_FRAME::SetCurPart(), GERBVIEW_DRAW_PANEL_GAL::SwitchBackend(), DISPLAY_FOOTPRINTS_FRAME::~DISPLAY_FOOTPRINTS_FRAME(), FOOTPRINT_PREVIEW_PANEL::~FOOTPRINT_PREVIEW_PANEL(), FOOTPRINT_VIEWER_FRAME::~FOOTPRINT_VIEWER_FRAME(), GERBVIEW_FRAME::~GERBVIEW_FRAME(), and PCB_BASE_EDIT_FRAME::~PCB_BASE_EDIT_FRAME().
|
protectedinherited |
Definition at line 1181 of file view.cpp.
References KIGFX::VIEW::m_layers, and BOX2< Vec >::SetMaximum().
Referenced by KIGFX::VIEW::SetGAL().
|
inherited |
Definition at line 1525 of file view.cpp.
References KIGFX::VIEW::m_ownedItems, KIGFX::VIEW::m_preview, and KIGFX::VIEW::Update().
Referenced by SCH_EDIT_FRAME::AddJunction(), SCH_LINE_WIRE_BUS_TOOL::doDrawSegments(), SYMBOL_EDITOR_DRAWING_TOOLS::DrawShape(), SCH_DRAWING_TOOLS::DrawSheet(), SCH_LINE_WIRE_BUS_TOOL::finishSegments(), ROUTER_TOOL::InlineDrag(), DRAWING_TOOL::InteractivePlaceWithPreview(), SCH_DRAWING_TOOLS::PlaceImage(), SCH_DRAWING_TOOLS::SingleClickPlace(), SYMBOL_EDITOR_DRAWING_TOOLS::TwoClickPlace(), and SCH_DRAWING_TOOLS::TwoClickPlace().
|
inherited |
Clear targets that are marked as dirty.
Definition at line 1106 of file view.cpp.
References KIGFX::GAL::ClearTarget(), KIGFX::VIEW::IsTargetDirty(), KIGFX::VIEW::m_gal, KIGFX::VIEW::MarkDirty(), KIGFX::TARGET_CACHED, KIGFX::TARGET_NONCACHED, and KIGFX::TARGET_OVERLAY.
Referenced by EDA_DRAW_PANEL_GAL::DoRePaint().
|
inherited |
Remove all layers from the on-the-top set (they are no longer displayed over the rest of layers).
Definition at line 889 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 GERBVIEW_DRAW_PANEL_GAL::SetTopLayer(), PL_DRAW_PANEL_GAL::SetTopLayer(), PCB_DRAW_PANEL_GAL::SetTopLayer(), and EDA_DRAW_PANEL_GAL::SetTopLayer().
|
inlinestaticprotectedinherited |
Check if every layer required by the aLayerId layer is enabled.
Definition at line 787 of file view.h.
References KIGFX::VIEW::VIEW_LAYER::renderingOrder.
Referenced by KIGFX::VIEW::sortLayers().
|
inherited |
|
inherited |
Return a new VIEW object that shares the same set of VIEW_ITEMs and LAYERs.
GAL, PAINTER and other properties are left uninitialized.
Definition at line 1439 of file view.cpp.
References KIGFX::VIEW::m_allItems, and KIGFX::VIEW::m_layers.
Referenced by BOARD_PRINTOUT::DrawPage().
|
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.
aItem | is the item to be drawn. |
aLayer | is the layer which should be drawn. |
aImmediate | dictates the way of drawing - it allows one to force immediate drawing mode for cached items. |
Definition at line 1007 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()().
|
protectedinherited |
Draw an item on all layers that the item uses.
aItem | is the item to be drawn. |
aImmediate | dictates the way of drawing - it allows one to force immediate drawing mode for cached items. |
Definition at line 1033 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().
|
protectedinherited |
Draw a group of items on all layers that those items use.
aGroup | is the group to be drawn. |
aImmediate | dictates 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 1050 of file view.cpp.
References KIGFX::VIEW::draw(), KIGFX::VIEW_GROUP::GetItem(), and KIGFX::VIEW_GROUP::GetSize().
|
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.
aEnable | whether to enable or disable display of the top layer. |
Definition at line 864 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().
|
inlineinherited |
Definition at line 292 of file view.h.
References KIGFX::VIEW::m_boundary.
Referenced by KIGFX::WX_VIEW_CONTROLS::onScroll(), and KIGFX::WX_VIEW_CONTROLS::UpdateScrollbars().
|
inlineinherited |
Return the center point of this VIEW (in world space coordinates).
Definition at line 333 of file view.h.
References KIGFX::VIEW::m_center.
Referenced by EDA_DRAW_PANEL_GAL::DoRePaint(), KIGFX::WX_VIEW_CONTROLS::onButton(), KIGFX::WX_VIEW_CONTROLS::onScroll(), KIGFX::WX_VIEW_CONTROLS::onTimer(), KIGFX::WX_VIEW_CONTROLS::onWheel(), and SYMBOL_EDITOR_DRAWING_TOOLS::PlaceAnchor().
|
inlineinherited |
Return the #GAL this view is using to draw graphical primitives.
Definition at line 189 of file view.h.
References KIGFX::VIEW::m_gal.
Referenced by PCB_GRID_HELPER::BestDragOrigin(), EE_GRID_HELPER::BestDragOrigin(), PCB_GRID_HELPER::BestSnapAnchor(), GRID_HELPER::canUseGrid(), KIGFX::WX_VIEW_CONTROLS::CenterOnCursor(), COMMON_TOOLS::CursorControl(), PCB_CONTROL::DoSetGridOrigin(), COMMON_TOOLS::doZoomInOut(), drawBacksideTicks(), KIGFX::PREVIEW::CENTRELINE_RECT_ITEM::drawPreviewShape(), KIGFX::PREVIEW::POLYGON_ITEM::drawPreviewShape(), 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(), EE_SELECTION_TOOL::GetNode(), GRID_HELPER::GetOrigin(), KIGFX::WX_VIEW_CONTROLS::GetRawCursorPosition(), ROUTER_TOOL::handleCommonEvents(), ROUTER_TOOL::InlineBreakTrack(), ROUTER_TOOL::InlineDrag(), PCB_VIEWER_TOOLS::MeasureTool(), COMMON_TOOLS::OnGridChanged(), PCB_POINT_EDITOR::OnSelectionChange(), COMMON_TOOLS::PanControl(), DIALOG_PAD_PROPERTIES::prepareCanvas(), KIGFX::WX_VIEW_CONTROLS::SetCrossHairCursorPosition(), KIGFX::VIEW_CONTROLS::ShowCursor(), PNS::TOOL_BASE::updateEndItem(), PNS::TOOL_BASE::updateStartItem(), RATSNEST_VIEW_ITEM::ViewDraw(), KIGFX::PREVIEW::RULER_ITEM::ViewDraw(), KIGFX::PREVIEW::ARC_ASSISTANT::ViewDraw(), KIGFX::ORIGIN_VIEWITEM::ViewDraw(), KIGFX::PREVIEW::TWO_POINT_ASSISTANT::ViewDraw(), KIGFX::PREVIEW::SIMPLE_OVERLAY_ITEM::ViewDraw(), MY_DRAWING::ViewDraw(), KIGFX::PREVIEW::SELECTION_AREA::ViewDraw(), KIGFX::VIEW_GROUP::ViewDraw(), ROUTER_PREVIEW_ITEM::ViewDraw(), DS_PROXY_VIEW_ITEM::ViewDraw(), EDIT_POINTS::ViewDraw(), and KIGFX::WX_VIEW_CONTROLS::WarpCursor().
|
inherited |
Return rendering order of a particular layer.
Lower values are rendered first.
aLayer | is the layer. |
Definition at line 648 of file view.cpp.
References KIGFX::VIEW::m_layers.
Referenced by PCB_DRAW_PANEL_GAL::SetTopLayer(), and KIGFX::VIEW::SortLayers().
|
inlineinherited |
Return the painter object used by the view for drawing #VIEW_ITEMS.
Definition at line 207 of file view.h.
References KIGFX::VIEW::m_painter.
Referenced by PCB_BASE_FRAME::ActivateGalCanvas(), DS_PROXY_VIEW_ITEM::buildDrawList(), DIALOG_NET_INSPECTOR::buildNetsList(), BOARD_INSPECTION_TOOL::ClearHighlight(), PL_EDITOR_FRAME::CommonSettingsChanged(), PCB_BASE_FRAME::CommonSettingsChanged(), PCB_GRID_HELPER::computeAnchors(), SYMBOL_PREVIEW_WIDGET::DisplayPart(), SYMBOL_PREVIEW_WIDGET::DisplaySymbol(), PL_DRAW_PANEL_GAL::DisplayWorksheet(), BOARD_INSPECTION_TOOL::doHideNet(), KIGFX::PREVIEW::POLYGON_ITEM::drawPreviewShape(), KIGFX::PREVIEW::DrawTextNextToCursor(), PCB_EDIT_FRAME::ExecuteRemoteCommand(), GERBVIEW_DRAW_PANEL_GAL::GERBVIEW_DRAW_PANEL_GAL(), FOOTPRINT_PREVIEW_PANEL::GetBackgroundColor(), FOOTPRINT_PREVIEW_PANEL::GetForegroundColor(), ROUTER_PREVIEW_ITEM::getLayerColor(), SCH_BASE_FRAME::GetRenderSettings(), PNS::TOOL_BASE::highlightNet(), BOARD_INSPECTION_TOOL::HighlightNet(), BOARD_INSPECTION_TOOL::highlightNet(), PNS_KICAD_IFACE::IsItemVisible(), PCB_BASE_FRAME::LoadSettings(), DIALOG_PAD_PROPERTIES::onChangePadMode(), ZONE_CREATE_HELPER::OnFirstPoint(), APPEARANCE_CONTROLS::OnLayerAlphaChanged(), GERBER_LAYER_WIDGET::OnLayerColorChange(), GERBER_LAYER_WIDGET::OnLayerSelect(), APPEARANCE_CONTROLS::onNetclassColorChanged(), APPEARANCE_CONTROLS::onNetclassContextMenu(), DIALOG_NET_INSPECTOR::onSelChanged(), GERBVIEW_DRAW_PANEL_GAL::OnShow(), PCB_DRAW_PANEL_GAL::OnShow(), DIALOG_NET_INSPECTOR::onSortingChanged(), PCB_GRID_HELPER::PCB_GRID_HELPER(), DIALOG_PAD_PROPERTIES::prepareCanvas(), PCB_GRID_HELPER::queryVisible(), NET_GRID_TABLE::Rebuild(), APPEARANCE_CONTROLS::rebuildNets(), DIALOG_PAD_PROPERTIES::redraw(), FOOTPRINT_PREVIEW_PANEL::renderFootprint(), GERBVIEW_SELECTION_TOOL::Reset(), EE_SELECTION_TOOL::Reset(), PCB_SELECTION_TOOL::Reset(), PCB_SELECTION_TOOL::Selectable(), GERBVIEW_DRAW_PANEL_GAL::SetHighContrastLayer(), PCB_DRAW_PANEL_GAL::SetHighContrastLayer(), EDA_DRAW_PANEL_GAL::SetHighContrastLayer(), PCBNEW_PRINTOUT::setupViewLayers(), SYMBOL_PREVIEW_WIDGET::SYMBOL_PREVIEW_WIDGET(), PANEL_DISPLAY_OPTIONS::TransferDataFromWindow(), PANEL_PL_EDITOR_COLOR_SETTINGS::TransferDataFromWindow(), PANEL_EDIT_OPTIONS::TransferDataFromWindow(), PANEL_SYM_COLOR_SETTINGS::TransferDataFromWindow(), PANEL_EESCHEMA_COLOR_SETTINGS::TransferDataFromWindow(), PCB_DRAW_PANEL_GAL::UpdateColors(), UpdateDisplayOptions(), NET_GRID_TABLE::updateNetColor(), PANEL_PCBNEW_COLOR_SETTINGS::updatePreview(), PANEL_EESCHEMA_COLOR_SETTINGS::updatePreview(), RATSNEST_VIEW_ITEM::ViewDraw(), KIGFX::PREVIEW::RULER_ITEM::ViewDraw(), KIGFX::PREVIEW::SELECTION_AREA::ViewDraw(), KIGFX::VIEW_GROUP::ViewDraw(), DS_PROXY_VIEW_ITEM::ViewDraw(), EDIT_POINTS::ViewDraw(), TRACK::ViewGetLOD(), VIA::ViewGetLOD(), and PAD::ViewGetLOD().
|
inlineinherited |
Get the current print mode.
Return values less than or equal to zero indicate the current mode is the draw mode. Return values greater than zero indicate print mode.
Definition at line 690 of file view.h.
References KIGFX::VIEW::m_printMode.
Referenced by KIGFX::VIEW::IsLayerVisible(), VIA::ViewGetLOD(), and PAD::ViewGetLOD().
|
inlineinherited |
Definition at line 263 of file view.h.
References KIGFX::VIEW::m_scale.
Referenced by PCB_GRID_HELPER::computeAnchors(), COMMON_TOOLS::doZoomFit(), SCH_EDITOR_CONTROL::EnterSheet(), PCB_EDIT_FRAME::ExecuteRemoteCommand(), PNS_KICAD_IFACE::IsItemVisible(), SCH_EDITOR_CONTROL::LeaveSheet(), KIGFX::WX_VIEW_CONTROLS::onButton(), SCH_EDIT_FRAME::OnPageSettingsChange(), HIERARCHY_NAVIG_DLG::onSelectSheetPath(), KIGFX::WX_VIEW_CONTROLS::onWheel(), EE_GRID_HELPER::queryVisible(), PCB_GRID_HELPER::queryVisible(), DISPLAY_FOOTPRINTS_FRAME::SaveSettings(), FOOTPRINT_VIEWER_FRAME::SaveSettings(), PCB_SELECTION_TOOL::Selectable(), ZOOM_TOOL::selectRegion(), KIGFX::VIEW::SetViewport(), PANEL_PCBNEW_COLOR_SETTINGS::zoomFitPreview(), and PCB_SELECTION_TOOL::zoomFitSelection().
|
inherited |
Return the size of the our rendering area in pixels.
Definition at line 1157 of file view.cpp.
References KIGFX::GAL::GetScreenPixelSize(), and KIGFX::VIEW::m_gal.
Referenced by KIGFX::WX_VIEW_CONTROLS::handleAutoPanning(), KIGFX::WX_VIEW_CONTROLS::onScroll(), KIGFX::WX_VIEW_CONTROLS::onTimer(), and KIGFX::WX_VIEW_CONTROLS::onWheel().
|
virtualinherited |
Definition at line 828 of file view.cpp.
References KIGFX::VIEW::m_topLayers.
Referenced by ROUTER_TOOL::getStartLayer(), PCB_SELECTION_TOOL::GuessSelectionCandidates(), PNS::TOOL_BASE::pickSingleItem(), and PNS::TOOL_BASE::updateStartItem().
|
inherited |
Return the current viewport visible area rectangle.
Definition at line 514 of file view.cpp.
References KIGFX::GAL::GetScreenPixelSize(), KIGFX::VIEW::m_gal, BOX2< Vec >::Normalize(), BOX2< Vec >::SetEnd(), BOX2< Vec >::SetOrigin(), and KIGFX::VIEW::ToWorld().
Referenced by drawBacksideTicks(), drawTicksAlongLine(), SCH_EDITOR_CONTROL::FindComponentAndItem(), EDA_DRAW_FRAME::FocusOnLocation(), PCB_SELECTION_TOOL::hitTestDistance(), and KIGFX::WX_VIEW_CONTROLS::UpdateScrollbars().
|
inherited |
Temporarily hide the item in the view (e.g.
for overlaying).
aItem | the item to modify. |
aHide | whether the item is hidden (on all layers), or not. |
Definition at line 1470 of file view.cpp.
References KIGFX::APPEARANCE, KIGFX::HIDDEN, KIGFX::VIEW_ITEM_DATA::m_flags, KIGFX::VIEW::Update(), KIGFX::VIEW_ITEM::viewPrivData(), and KIGFX::VISIBLE.
Referenced by KIGFX::VIEW::AddToPreview(), KIGFX::SCH_VIEW::ClearHiddenFlags(), GERBVIEW_SELECTION_TOOL::disambiguationMenu(), PCB_SELECTION_TOOL::highlightInternal(), ROUTER_TOOL::InlineDrag(), SCH_MOVE_TOOL::moveItem(), SCH_EDITOR_CONTROL::Paste(), GERBVIEW_SELECTION_TOOL::selectVisually(), PCB_SELECTION_TOOL::unhighlightInternal(), and GERBVIEW_SELECTION_TOOL::unselectVisually().
|
inherited |
Definition at line 1540 of file view.cpp.
References KIGFX::VIEW::Add(), and KIGFX::VIEW::m_preview.
Referenced by KIGFX::SCH_VIEW::DisplayComponent(), KIGFX::SCH_VIEW::DisplaySheet(), ROUTER_TOOL::InlineDrag(), DRAWING_TOOL::InteractivePlaceWithPreview(), and PCB_BASE_EDIT_FRAME::SetBoard().
|
protectedinherited |
Manage dirty flags & redraw queuing when updating an item.
aItem | is the item to be updated. |
aUpdateFlags | determines the way an item is refreshed.Update colors that are used for an item to be drawn |
Definition at line 1193 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().
|
inlineinherited |
Return true if the layer is cached.
Definition at line 581 of file view.h.
References KIGFX::VIEW::m_layers, and KIGFX::TARGET_CACHED.
Referenced by KIGFX::VIEW::draw(), KIGFX::VIEW::invalidateItem(), KIGFX::VIEW::RecacheAllItems(), KIGFX::VIEW::updateItemColor(), KIGFX::VIEW::updateItemGeometry(), KIGFX::VIEW::UpdateLayerColor(), and KIGFX::VIEW::updateLayers().
|
inlineinherited |
Return true if any of the VIEW layers needs to be refreshened.
Definition at line 546 of file view.h.
References KIGFX::VIEW::IsTargetDirty(), and KIGFX::TARGETS_NUMBER.
Referenced by EDA_DRAW_PANEL_GAL::DoRePaint(), and TOOL_MANAGER::ProcessEvent().
|
inlineinherited |
Definition at line 651 of file view.h.
References KIGFX::VIEW::m_reverseDrawOrder.
|
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 536 of file view.h.
References KIGFX::VIEW::m_dynamic.
|
inlineinherited |
Return information about visibility of a particular layer.
aLayer | true if the layer is visible, false otherwise. |
Definition at line 404 of file view.h.
References KIGFX::VIEW::GetPrintMode(), and KIGFX::VIEW::m_layers.
Referenced by DRAWING_TOOL::drawArc(), DRAWING_TOOL::DrawDimension(), DRAWING_TOOL::drawSegment(), DRAWING_TOOL::DrawZone(), GERBVIEW_DRAW_PANEL_GAL::GetDefaultViewBBox(), PCB_DRAW_PANEL_GAL::GetDefaultViewBBox(), GERBVIEW_FRAME::GetVisibleLayers(), APPEARANCE_CONTROLS::getVisibleLayers(), APPEARANCE_CONTROLS::getVisibleObjects(), SCH_EDIT_TOOL::Init(), EDIT_TOOL::Init(), PNS_KICAD_IFACE::IsAnyLayerVisible(), DRAWING_TOOL::PlaceText(), SCH_EDIT_TOOL::Properties(), EDIT_TOOL::Properties(), GERBER_LAYER_WIDGET::ReFill(), PCB_SELECTION_TOOL::Selectable(), RATSNEST_VIEW_ITEM::ViewDraw(), KIGFX::VIEW_GROUP::ViewDraw(), FP_SHAPE::ViewGetLOD(), PCB_GROUP::ViewGetLOD(), ZONE::ViewGetLOD(), TRACK::ViewGetLOD(), FP_TEXT::ViewGetLOD(), VIA::ViewGetLOD(), FOOTPRINT::ViewGetLOD(), PAD::ViewGetLOD(), and FP_ZONE::ViewGetLOD().
|
inlineinherited |
Return true if view is flipped across the X axis.
Definition at line 237 of file view.h.
References KIGFX::VIEW::m_mirrorX.
Referenced by APPEARANCE_CONTROLS::APPEARANCE_CONTROLS(), COMMON_TOOLS::CursorControl(), drawTicksAlongLine(), KIGFX::WX_VIEW_CONTROLS::onScroll(), EE_SELECTION_TOOL::selectMultiple(), PCB_SELECTION_TOOL::selectMultiple(), FOOTPRINT_EDIT_FRAME::setupUIConditions(), APPEARANCE_CONTROLS::UpdateDisplayOptions(), KIGFX::WX_VIEW_CONTROLS::UpdateScrollbars(), and KIGFX::PREVIEW::SELECTION_AREA::ViewDraw().
|
inlineinherited |
Return true if view is flipped across the Y axis.
Definition at line 245 of file view.h.
References KIGFX::VIEW::m_mirrorY.
|
inlineinherited |
Return true if any of layers belonging to the target or the target itself should be redrawn.
Definition at line 563 of file view.h.
References KIGFX::VIEW::m_dirtyTargets, and KIGFX::TARGETS_NUMBER.
Referenced by KIGFX::VIEW::ClearTargets(), EDA_DRAW_PANEL_GAL::DoRePaint(), KIGFX::VIEW::IsDirty(), and KIGFX::VIEW::redrawRect().
|
inlineinherited |
Definition at line 635 of file view.h.
References KIGFX::VIEW::m_useDrawPriority.
|
inherited |
Return information if the item is visible (or not).
aItem | the item to test. |
Definition at line 1489 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::BestSnapAnchor(), PCB_GRID_HELPER::computeAnchors(), PNS_KICAD_IFACE::HideItem(), PNS_KICAD_IFACE::IsItemVisible(), EE_GRID_HELPER::queryVisible(), PCB_GRID_HELPER::queryVisible(), and PCB_SELECTION_TOOL::Selectable().
|
inherited |
Definition at line 1516 of file view.cpp.
References KIGFX::VIEW::Add(), and overlay.
Referenced by AUTOPLACE_TOOL::autoplace().
|
inlineinherited |
Force redraw of view on the next rendering.
Definition at line 598 of file view.h.
References KIGFX::VIEW::m_dirtyTargets, and KIGFX::TARGETS_NUMBER.
Referenced by KIGFX::VIEW::ClearTargets(), EDA_DRAW_PANEL_GAL::DoRePaint(), BOARD_EDITOR_CONTROL::DoSetDrillOrigin(), PCB_CONTROL::DoSetGridOrigin(), EDA_DRAW_FRAME::OnMove(), refreshCallback(), KIGFX::VIEW::SetCenter(), KIGFX::VIEW::SetGAL(), KIGFX::VIEW::SetMirror(), KIGFX::VIEW::SetScale(), KIGFX::VIEW::sortLayers(), PANEL_EESCHEMA_DISPLAY_OPTIONS::TransferDataFromWindow(), PANEL_SETUP_FORMATTING::TransferDataFromWindow(), KIGFX::VIEW::UpdateAllLayersColor(), KIGFX::VIEW::UpdateAllLayersOrder(), and KIGFX::VIEW::VIEW().
|
inherited |
Add an item to a list of items that are going to be refreshed upon the next frame rendering.
aItem | is the item to be refreshed. |
|
inlineprotectedinherited |
Definition at line 722 of file view.h.
References KIGFX::VIEW::m_dirtyTargets, and KIGFX::TARGETS_NUMBER.
Referenced by KIGFX::VIEW::Redraw().
|
inlineinherited |
Set or clear target 'dirty' flag.
aTarget | is the target to set. |
Definition at line 574 of file view.h.
References KIGFX::VIEW::m_dirtyTargets, and KIGFX::TARGETS_NUMBER.
Referenced by KIGFX::VIEW::Add(), GERBVIEW_FRAME::applyDisplaySettingsToGAL(), GERBVIEW_SELECTION_TOOL::disambiguationMenu(), PCB_SELECTION_TOOL::highlight(), KIGFX::VIEW::invalidateItem(), BOARD_INSPECTION_TOOL::LocalRatsnestTool(), COMMON_TOOLS::OnGridChanged(), APPEARANCE_CONTROLS::onObjectVisibilityChanged(), GERBER_LAYER_WIDGET::OnRenderEnable(), EDA_DRAW_PANEL_GAL::onSize(), KIGFX::VIEW::Remove(), EDA_DRAW_FRAME::SetGridVisibility(), KIGFX::VIEW::SetLayerVisible(), PANEL_DISPLAY_OPTIONS::TransferDataFromWindow(), PANEL_GAL_DISPLAY_OPTIONS::TransferDataFromWindow(), PANEL_EDIT_OPTIONS::TransferDataFromWindow(), PANEL_GERBVIEW_DISPLAY_OPTIONS::TransferDataFromWindow(), PCB_SELECTION_TOOL::unhighlight(), KIGFX::VIEW::updateBbox(), KIGFX::VIEW::UpdateLayerColor(), and KIGFX::VIEW::updateLayers().
|
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 248 of file view.cpp.
References KIGFX::VIEW_ITEM::ClearViewPrivData(), KIGFX::VIEW_ITEM_DATA::m_view, and KIGFX::VIEW_ITEM::viewPrivData().
Referenced by KIGFX::VIEW_ITEM::~VIEW_ITEM().
|
virtualinherited |
Find all visible items that touch or are within the rectangle aRect.
aRect | area to search for items |
aResult | result 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). |
Definition at line 428 of file view.cpp.
References KIGFX::VIEW::m_orderedLayers.
Referenced by DRAWING_TOOL::DrawVia(), EE_GRID_HELPER::queryVisible(), PCB_GRID_HELPER::queryVisible(), PCB_SELECTION_TOOL::SelectAll(), EE_SELECTION_TOOL::SelectAll(), EE_SELECTION_TOOL::selectMultiple(), and PCB_SELECTION_TOOL::selectMultiple().
|
inherited |
Rebuild GAL display lists.
Definition at line 1380 of file view.cpp.
References KIGFX::VIEW::IsCached(), KIGFX::VIEW::m_gal, KIGFX::VIEW::m_layers, and BOX2< Vec >::SetMaximum().
Referenced by GERBVIEW_FRAME::ActivateGalCanvas(), PCB_BASE_FRAME::ActivateGalCanvas(), PCB_CONTROL::FlipPcbView(), SCH_EDIT_TOOL::Mirror(), GERBVIEW_DRAW_PANEL_GAL::OnShow(), SYMBOL_EDITOR_DRAWING_TOOLS::PlaceAnchor(), SCH_DRAWING_TOOLS::PlaceImage(), SCH_EDIT_TOOL::Properties(), SCH_EDIT_FRAME::PutDataInPreviousState(), SCH_EDIT_TOOL::Rotate(), and PANEL_GAL_DISPLAY_OPTIONS::TransferDataFromWindow().
|
virtualinherited |
Immediately redraws the whole view.
Definition at line 1125 of file view.cpp.
References BOX2< Vec >::GetHeight(), BOX2< Vec >::GetPosition(), KIGFX::GAL::GetScreenPixelSize(), BOX2< Vec >::GetSize(), BOX2< Vec >::GetWidth(), KIGFX::VIEW::m_gal, KIGFX::VIEW::markTargetClean(), PROF_COUNTER::msecs(), BOX2< Vec >::Normalize(), KIGFX::VIEW::redrawRect(), BOX2< Vec >::SetMaximum(), PROF_COUNTER::Stop(), KIGFX::TARGET_CACHED, KIGFX::TARGET_NONCACHED, KIGFX::TARGET_OVERLAY, KIGFX::VIEW::ToWorld(), and traceGalProfile.
Referenced by EDA_DRAW_PANEL_GAL::DoRePaint().
|
protectedinherited |
Definition at line 988 of file view.cpp.
References KIGFX::VIEW::areRequiredLayersEnabled(), KIGFX::VIEW::DRAW_ITEM_VISITOR::deferredDraw(), KIGFX::VIEW::IsTargetDirty(), KIGFX::VIEW::m_gal, KIGFX::VIEW::m_orderedLayers, KIGFX::VIEW::m_reverseDrawOrder, KIGFX::VIEW::m_useDrawPriority, KIGFX::GAL::SetLayerDepth(), and KIGFX::GAL::SetTarget().
Referenced by KIGFX::VIEW::Redraw().
|
overridevirtual |
Remove a VIEW_ITEM from the view.
aItem | item to be removed. Caller must dispose the removed item if necessary |
Reimplemented from KIGFX::VIEW.
Definition at line 75 of file pcb_view.cpp.
References PCB_FOOTPRINT_T, KIGFX::VIEW::Remove(), FOOTPRINT::RunOnChildren(), and EDA_ITEM::Type().
Referenced by PCB_TOOL_BASE::doInteractiveItemPlacement(), MICROWAVE_TOOL::drawMicrowaveInductor(), PCB_VIEWER_TOOLS::MeasureTool(), DIALOG_DRC::OnDRCItemRClick(), PCB_POINT_EDITOR::OnSelectionChange(), BOARD_EDITOR_CONTROL::PlaceTarget(), FOOTPRINT_PREVIEW_PANEL::renderFootprint(), PCB_SELECTION_TOOL::Reset(), PCB_SELECTION_TOOL::selectMultiple(), and FOOTPRINT_PREVIEW_PANEL::~FOOTPRINT_PREVIEW_PANEL().
|
inherited |
Remap the data between layer ids without invalidating that data.
Used by GerbView for the "Sort by X2" functionality.
aReorderMap | is a mapping of old to new layer ids. |
Definition at line 682 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::SortLayersByX2Attributes().
|
inlineinherited |
Only takes effect if UseDrawPriority is true.
aFlag | is true if draw order should be reversed |
Definition at line 661 of file view.h.
References KIGFX::VIEW::m_reverseDrawOrder.
Referenced by EDA_DRAW_PANEL_GAL::SwitchBackend().
|
inlineinherited |
Set limits for view area.
aBoundary | is the box that limits view area. |
Definition at line 273 of file view.h.
References KIGFX::VIEW::m_boundary.
Referenced by PL_DRAW_PANEL_GAL::DisplayWorksheet(), DIALOG_PAD_PROPERTIES::redraw(), and SYMBOL_VIEWER_FRAME::SYMBOL_VIEWER_FRAME().
|
inlineinherited |
Set limits for view area.
aBoundary | is the box that limits view area. |
Definition at line 283 of file view.h.
References BOX2< Vec >::GetEnd(), BOX2< Vec >::GetOrigin(), KIGFX::VIEW::m_boundary, BOX2< Vec >::SetEnd(), and BOX2< Vec >::SetOrigin().
|
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).
aCenter | the new center point, in world space coordinates. |
Definition at line 580 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 COMMON_TOOLS::CenterContents(), KIGFX::WX_VIEW_CONTROLS::CenterOnCursor(), SCH_BASE_FRAME::CenterScreen(), COMMON_TOOLS::doZoomFit(), PCB_EDIT_FRAME::ExecuteRemoteCommand(), SYMBOL_PREVIEW_WIDGET::fitOnDrawArea(), EDA_DRAW_FRAME::FocusOnLocation(), KIGFX::WX_VIEW_CONTROLS::onMotion(), KIGFX::WX_VIEW_CONTROLS::onScroll(), EDA_DRAW_PANEL_GAL::onSize(), KIGFX::WX_VIEW_CONTROLS::onTimer(), KIGFX::WX_VIEW_CONTROLS::onWheel(), SYMBOL_EDITOR_DRAWING_TOOLS::PlaceAnchor(), SCH_BASE_FRAME::RedrawScreen(), ZOOM_TOOL::selectRegion(), KIGFX::VIEW::SetCenter(), KIGFX::WX_VIEW_CONTROLS::SetCrossHairCursorPosition(), KIGFX::VIEW::SetGAL(), KIGFX::VIEW::SetScale(), KIGFX::VIEW::SetViewport(), KIGFX::WX_VIEW_CONTROLS::WarpCursor(), PANEL_PCBNEW_COLOR_SETTINGS::zoomFitPreview(), and PCB_SELECTION_TOOL::zoomFitSelection().
Set the center point of the VIEW, attempting to avoid occultingScreenRect (for instance, the screen rect of a modeless dialog in front of the VIEW).
aCenter | the new center point, in world space coordinates. |
occultingScreenRect | the occulting rect, in screen space coordinates. |
Definition at line 605 of file view.cpp.
References BOX2< Vec >::GetBottom(), BOX2< Vec >::GetLeft(), BOX2< Vec >::GetRight(), KIGFX::GAL::GetScreenPixelSize(), BOX2< Vec >::GetTop(), BOX2< Vec >::Intersect(), KIGFX::VIEW::m_gal, KIGFX::VIEW::SetCenter(), KIGFX::VIEW::ToWorld(), VECTOR2< T >::x, and VECTOR2< T >::y.
|
inherited |
Assign a rendering device for the VIEW.
aGal | pointer to the GAL output device. |
Definition at line 495 of file view.cpp.
References KIGFX::VIEW::clearGroupCache(), KIGFX::VIEW::m_center, KIGFX::VIEW::m_gal, KIGFX::VIEW::m_mirrorX, KIGFX::VIEW::m_mirrorY, KIGFX::VIEW::m_scale, KIGFX::VIEW::MarkDirty(), KIGFX::VIEW::SetCenter(), KIGFX::VIEW::SetMirror(), and KIGFX::VIEW::SetScale().
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(), SCH_PREVIEW_PANEL::SCH_PREVIEW_PANEL(), and EDA_DRAW_PANEL_GAL::SwitchBackend().
|
inlineinherited |
Definition at line 414 of file view.h.
References KIGFX::VIEW::m_layers.
Referenced by PL_DRAW_PANEL_GAL::setDefaultLayerDeps(), SCH_DRAW_PANEL::setDefaultLayerDeps(), SCH_PREVIEW_PANEL::setDefaultLayerDeps(), GERBVIEW_DRAW_PANEL_GAL::setDefaultLayerDeps(), and PCB_DRAW_PANEL_GAL::setDefaultLayerDeps().
|
inherited |
Set rendering order of a particular layer.
Lower values are rendered first.
aLayer | is the layer. |
aRenderingOrder | is an arbitrary number denoting the rendering order. |
Definition at line 640 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().
|
inlineinherited |
Change the rendering target for a particular layer.
aLayer | is the layer. |
aTarget | is the rendering target. |
Definition at line 426 of file view.h.
References KIGFX::VIEW::m_layers.
Referenced by PL_DRAW_PANEL_GAL::setDefaultLayerDeps(), SCH_DRAW_PANEL::setDefaultLayerDeps(), SCH_PREVIEW_PANEL::setDefaultLayerDeps(), GERBVIEW_DRAW_PANEL_GAL::setDefaultLayerDeps(), PCB_DRAW_PANEL_GAL::setDefaultLayerDeps(), and BOARD_PRINTOUT::setupViewLayers().
|
inlineinherited |
Control the visibility of a particular layer.
aLayer | is the layer to show/hide. |
aVisible | is the layer visibility state. |
Definition at line 387 of file view.h.
References KIGFX::VIEW::m_layers, and KIGFX::VIEW::MarkTargetDirty().
Referenced by APPEARANCE_CONTROLS::onLayerVisibilityChanged(), APPEARANCE_CONTROLS::onObjectVisibilityChanged(), GERBER_LAYER_WIDGET::OnRenderEnable(), PL_EDITOR_FRAME::OnSelectPage(), PL_DRAW_PANEL_GAL::PL_DRAW_PANEL_GAL(), GERBVIEW_FRAME::SetElementVisibility(), APPEARANCE_CONTROLS::SetLayerVisible(), APPEARANCE_CONTROLS::SetObjectVisible(), GERBVIEW_PRINTOUT::setupViewLayers(), PCBNEW_PRINTOUT::setupViewLayers(), BOARD_PRINTOUT::setupViewLayers(), GERBVIEW_FRAME::SetVisibleLayers(), APPEARANCE_CONTROLS::setVisibleLayers(), APPEARANCE_CONTROLS::setVisibleObjects(), PCB_DRAW_PANEL_GAL::SyncLayersVisibility(), and PCB_EDIT_FRAME::UpdateUserInterface().
|
inherited |
Control the mirroring of the VIEW.
aMirrorX | when true, the X axis is mirrored. |
aMirrorY | when true, the Y axis is mirrored. |
Definition at line 541 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(), PCB_CONTROL::FlipPcbView(), SCH_DRAW_PANEL::SCH_DRAW_PANEL(), SCH_PREVIEW_PANEL::SCH_PREVIEW_PANEL(), and KIGFX::VIEW::SetGAL().
|
inlineinherited |
Set the painter object used by the view for drawing #VIEW_ITEMS.
Definition at line 197 of file view.h.
References KIGFX::VIEW::m_painter.
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().
|
inlineinherited |
Set the printing mode.
aPrintMode | is the printing mode. If 0, the current mode is not a printing mode, just the draw mode |
Definition at line 698 of file view.h.
References KIGFX::VIEW::m_printMode.
Referenced by KIGFX::VIEW::VIEW().
|
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.
aLayerId | is the id of the layer for which we enable/disable the required layer. |
aRequiredId | is the id of the required layer. |
aRequired | tells if the required layer should be added or removed from the list. |
Definition at line 392 of file view.cpp.
References KIGFX::VIEW::m_layers.
Referenced by PCB_DRAW_PANEL_GAL::setDefaultLayerDeps().
|
virtualinherited |
Set the scaling factor, zooming around a given anchor point.
(depending on correct GAL unit length & DPI settings).
aAnchor | is the zooming anchor point. |
aScale | is the scale factor. |
Reimplemented in KIGFX::SCH_VIEW.
Definition at line 554 of file view.cpp.
References KIGFX::GAL::ComputeWorldScreenMatrix(), KIGFX::VIEW::m_center, KIGFX::VIEW::m_gal, KIGFX::VIEW::m_maxScale, KIGFX::VIEW::m_minScale, KIGFX::VIEW::m_scale, KIGFX::VIEW::MarkDirty(), KIGFX::VIEW::SetCenter(), KIGFX::GAL::SetZoomFactor(), KIGFX::VIEW::ToScreen(), and KIGFX::VIEW::ToWorld().
Referenced by COMMON_TOOLS::doZoomFit(), COMMON_TOOLS::doZoomToPreset(), PCB_EDIT_FRAME::ExecuteRemoteCommand(), SCH_EDITOR_CONTROL::FindComponentAndItem(), SYMBOL_PREVIEW_WIDGET::fitOnDrawArea(), FOOTPRINT_VIEWER_FRAME::FOOTPRINT_VIEWER_FRAME(), KIGFX::WX_VIEW_CONTROLS::onMotion(), KIGFX::WX_VIEW_CONTROLS::onWheel(), FOOTPRINT_PREVIEW_PANEL::renderFootprint(), ZOOM_TOOL::selectRegion(), KIGFX::VIEW::SetGAL(), KIGFX::SCH_VIEW::SetScale(), KIGFX::VIEW::SetViewport(), PANEL_PCBNEW_COLOR_SETTINGS::zoomFitPreview(), PANEL_EESCHEMA_COLOR_SETTINGS::zoomFitPreview(), and PCB_SELECTION_TOOL::zoomFitSelection().
|
inlineinherited |
Set minimum and maximum values for scale.
aMaximum | is the maximum value for scale. |
aMinimum | is the minimum value for scale. |
Definition at line 303 of file view.h.
References KIGFX::VIEW::m_maxScale, and KIGFX::VIEW::m_minScale.
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().
|
virtualinherited |
Set given layer to be displayed on the top or sets back the default order of layers.
aEnabled | = true to display aLayer on the top. |
aLayer | is the layer or -1 in case when no particular layer should be displayed on the top. |
Definition at line 837 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(), GERBVIEW_DRAW_PANEL_GAL::SetTopLayer(), PL_DRAW_PANEL_GAL::SetTopLayer(), PCB_DRAW_PANEL_GAL::SetTopLayer(), EDA_DRAW_PANEL_GAL::SetTopLayer(), PCBNEW_PRINTOUT::setupViewLayers(), and BOARD_PRINTOUT::setupViewLayers().
|
inherited |
Set the visible area of the VIEW.
aViewport | desired visible area, in world space coordinates. |
Definition at line 526 of file view.cpp.
References BOX2< Vec >::Centre(), KIGFX::VIEW::GetScale(), KIGFX::GAL::GetScreenPixelSize(), BOX2< Vec >::GetSize(), KIGFX::VIEW::m_gal, KIGFX::VIEW::SetCenter(), KIGFX::VIEW::SetScale(), KIGFX::VIEW::ToWorld(), VECTOR2< T >::x, VECTOR2< T >::y, and zoom.
Referenced by DIALOG_PAD_PROPERTIES::redraw(), and FOOTPRINT_PREVIEW_PANEL::renderFootprint().
|
inherited |
Set the item visibility.
aItem | the item to modify. |
aIsVisible | whether the item is visible (on all layers), or not. |
Definition at line 1449 of file view.cpp.
References KIGFX::APPEARANCE, KIGFX::COLOR, KIGFX::VIEW_ITEM_DATA::m_flags, KIGFX::VIEW::Update(), KIGFX::VIEW_ITEM::viewPrivData(), and KIGFX::VISIBLE.
Referenced by KIGFX::VIEW::Add(), KIGFX::VIEW::AddToPreview(), EE_GRID_HELPER::BestSnapAnchor(), PCB_GRID_HELPER::BestSnapAnchor(), MICROWAVE_TOOL::drawMicrowaveInductor(), EE_GRID_HELPER::EE_GRID_HELPER(), PNS_KICAD_IFACE::EraseView(), PNS_KICAD_IFACE::HideItem(), GERBVIEW_INSPECTION_TOOL::MeasureTool(), PCB_VIEWER_TOOLS::MeasureTool(), ZONE_CREATE_HELPER::OnComplete(), ZONE_CREATE_HELPER::OnFirstPoint(), PCB_GRID_HELPER::PCB_GRID_HELPER(), FOOTPRINT_PREVIEW_PANEL::renderFootprint(), PL_SELECTION_TOOL::selectMultiple(), EE_SELECTION_TOOL::selectMultiple(), PCB_SELECTION_TOOL::selectMultiple(), ZOOM_TOOL::selectRegion(), GRID_HELPER::SetAuxAxes(), KIGFX::VIEW::ShowPreview(), and ZONE_CREATE_HELPER::~ZONE_CREATE_HELPER().
|
inherited |
Definition at line 1561 of file view.cpp.
References KIGFX::VIEW::m_preview, and KIGFX::VIEW::SetVisible().
Referenced by SCH_EDIT_FRAME::AddJunction(), SCH_LINE_WIRE_BUS_TOOL::doDrawSegments(), SCH_LINE_WIRE_BUS_TOOL::finishSegments(), ROUTER_TOOL::InlineDrag(), and DRAWING_TOOL::InteractivePlaceWithPreview().
|
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).
aLayers | stores id of layers to be sorted. |
aCount | stores the number of layers. |
Definition at line 654 of file view.cpp.
References KIGFX::VIEW::GetLayerOrder().
Referenced by KIGFX::VIEW::draw(), and KIGFX::VIEW_GROUP::ViewDraw().
|
protectedinherited |
Clear cached GAL group numbers (ONLY numbers stored in VIEW_ITEMs, not group objects used by GAL)
Definition at line 1239 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().
Convert a world space point/vector to a point/vector in screen space coordinates.
aCoord | is the point/vector to be converted. |
aAbsolute | when true aCoord is treated as a point, otherwise as a direction (vector). |
Definition at line 470 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(), ROUTER_TOOL::handleLayerSwitch(), TOOL_DISPATCHER::handleMouseButton(), KIGFX::WX_VIEW_CONTROLS::SetCrossHairCursorPosition(), KIGFX::VIEW::SetScale(), and KIGFX::WX_VIEW_CONTROLS::WarpCursor().
|
inherited |
Convert a world space one dimensional size to a one dimensional size in screen space.
aSize | the size to be transformed. |
Definition at line 481 of file view.cpp.
References MATRIX3x3< T >::GetScale(), KIGFX::GAL::GetWorldScreenMatrix(), KIGFX::VIEW::m_gal, and VECTOR2< T >::x.
Converts a screen space point/vector to a point/vector in world space coordinates.
aCoord | is the point/vector to be converted. |
aAbsolute | when true aCoord is treated as a point, otherwise as a direction (vector). |
Definition at line 451 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(), COMMON_TOOLS::CenterContents(), COMMON_TOOLS::doZoomFit(), KIGFX::PREVIEW::POLYGON_ITEM::drawPreviewShape(), PCB_EDIT_FRAME::ExecuteRemoteCommand(), EDIT_POINTS::FindPoint(), SYMBOL_PREVIEW_WIDGET::fitOnDrawArea(), GENERAL_COLLECTORS_GUIDE::GENERAL_COLLECTORS_GUIDE(), KIGFX::WX_VIEW_CONTROLS::GetMousePosition(), KIGFX::VIEW::GetViewport(), DS_PROXY_VIEW_ITEM::HitTestDrawingSheetItems(), KIGFX::WX_VIEW_CONTROLS::onMotion(), KIGFX::WX_VIEW_CONTROLS::onScroll(), EDA_DRAW_PANEL_GAL::onSize(), KIGFX::WX_VIEW_CONTROLS::onTimer(), KIGFX::WX_VIEW_CONTROLS::onWheel(), KIGFX::VIEW::Redraw(), KIGFX::WX_VIEW_CONTROLS::refreshMouse(), PL_SELECTION_TOOL::selectionContains(), EE_SELECTION_TOOL::selectionContains(), ZOOM_TOOL::selectRegion(), KIGFX::VIEW::SetCenter(), KIGFX::VIEW::SetScale(), KIGFX::VIEW::SetViewport(), KIGFX::ORIGIN_VIEWITEM::ViewDraw(), EDIT_POINTS::ViewDraw(), PANEL_PCBNEW_COLOR_SETTINGS::zoomFitPreview(), and PCB_SELECTION_TOOL::zoomFitSelection().
|
inherited |
Converts a screen space one dimensional size to a one dimensional size in world space coordinates.
aSize | is the size to be converted. |
Definition at line 462 of file view.cpp.
References MATRIX3x3< T >::GetScale(), KIGFX::GAL::GetScreenWorldMatrix(), KIGFX::VIEW::m_gal, and VECTOR2< T >::x.
|
overridevirtual |
For dynamic VIEWs, inform the associated VIEW that the graphical representation of this item has changed.
For static views calling has no effect.
aItem | the item to update. |
aUpdateFlags | how much the object has changed. |
Reimplemented from KIGFX::VIEW.
Definition at line 92 of file pcb_view.cpp.
References group, PCB_FOOTPRINT_T, PCB_GROUP_T, FOOTPRINT::RunOnChildren(), EDA_ITEM::Type(), and KIGFX::VIEW::Update().
Referenced by PCB_SELECTION_TOOL::ClearSelection(), PCB_TOOL_BASE::doInteractiveItemPlacement(), MICROWAVE_TOOL::drawMicrowaveInductor(), PCB_EDIT_FRAME::Edit_Zone_Params(), PAD_TOOL::EnumeratePads(), DIALOG_DRC::ExcludeMarker(), PCB_BASE_FRAME::FocusOnItem(), PCB_VIEWER_TOOLS::GraphicOutlines(), PCB_SELECTION_TOOL::highlight(), PCB_VIEWER_TOOLS::MeasureTool(), DIALOG_DRC::OnDRCItemRClick(), PCB_VIEWER_TOOLS::PadDisplayMode(), BOARD_EDITOR_CONTROL::PlaceTarget(), DIALOG_BOARD_REANNOTATE::ReannotateBoard(), refreshCallback(), FOOTPRINT_PREVIEW_PANEL::renderFootprint(), FOOTPRINT_EDITOR_CONTROL::Save(), FOOTPRINT_EDITOR_CONTROL::SaveAs(), PCB_SELECTION_TOOL::selectMultiple(), PCB_VIEWER_TOOLS::ShowPadNumbers(), GLOBAL_EDIT_TOOL::swapBoardItem(), GLOBAL_EDIT_TOOL::SwapLayers(), PCB_VIEWER_TOOLS::TextOutlines(), PCB_CONTROL::TrackDisplayMode(), DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS::TransferDataFromWindow(), PCB_SELECTION_TOOL::unhighlight(), Update(), PCB_CONTROL::ViaDisplayMode(), and PCB_CONTROL::ZoneDisplayMode().
|
overridevirtual |
For dynamic VIEWs, inform the associated VIEW that the graphical representation of this item has changed.
For static views calling has no effect.
aItem | the item to update. |
aUpdateFlags | how much the object has changed. |
Reimplemented from KIGFX::VIEW.
Definition at line 119 of file pcb_view.cpp.
References KIGFX::ALL, and Update().
|
inherited |
Update all items in the view according to the given flags.
aUpdateFlags | is is according to KIGFX::VIEW_UPDATE_FLAGS |
Definition at line 1415 of file view.cpp.
References KIGFX::VIEW::m_allItems.
Referenced by PL_EDITOR_FRAME::CommonSettingsChanged(), SCH_BASE_FRAME::CommonSettingsChanged(), PCB_BASE_FRAME::CommonSettingsChanged(), SCH_BASE_FRAME::HardRedraw(), GERBVIEW_CONTROL::HighlightControl(), SCH_EDIT_FRAME::KiwayMailIn(), GERBER_LAYER_WIDGET::OnLayerSelect(), DIALOG_NET_INSPECTOR::onRenameNet(), GERBVIEW_FRAME::OnSelectActiveDCode(), GERBVIEW_FRAME::OnSelectActiveLayer(), SYMBOL_EDITOR_CONTROL::ShowElectricalTypes(), SCH_BASE_FRAME::SyncView(), SCH_EDITOR_CONTROL::ToggleHiddenFields(), SCH_EDITOR_CONTROL::ToggleHiddenPins(), PANEL_SETUP_FORMATTING::TransferDataFromWindow(), PANEL_EESCHEMA_DISPLAY_OPTIONS::TransferDataFromWindow(), PANEL_PCBNEW_COLOR_SETTINGS::updatePreview(), and PANEL_EESCHEMA_COLOR_SETTINGS::updatePreview().
|
inherited |
Update items in the view according to the given flags and condition.
aUpdateFlags | is is according to KIGFX::VIEW_UPDATE_FLAGS. |
aCondition | is a function returning true if the item should be updated. |
Definition at line 1425 of file view.cpp.
References KIGFX::VIEW::m_allItems.
Referenced by DIALOG_NET_INSPECTOR::onDeleteNet(), SCH_EDIT_FRAME::OnModify(), PCB_BASE_FRAME::SetDisplayOptions(), GERBVIEW_FRAME::SetElementVisibility(), PANEL_DISPLAY_OPTIONS::TransferDataFromWindow(), PANEL_EDIT_OPTIONS::TransferDataFromWindow(), and GERBVIEW_FRAME::UpdateDisplayOptions().
|
inherited |
Apply the new coloring scheme to all layers.
The used scheme is held by #RENDER_SETTINGS.
Definition at line 773 of file view.cpp.
References KIGFX::GAL::ChangeGroupColor(), color, KIGFX::RENDER_SETTINGS::GetColor(), KIGFX::VIEW_ITEM_DATA::getGroup(), KIGFX::VIEW_ITEM_DATA::getLayers(), KIGFX::PAINTER::GetSettings(), group, KIGFX::GAL::IsVisible(), KIGFX::VIEW::m_allItems, KIGFX::VIEW::m_gal, KIGFX::VIEW::m_painter, KIGFX::VIEW::MarkDirty(), and KIGFX::VIEW::VIEW_MAX_LAYERS.
Referenced by DIALOG_NET_INSPECTOR::buildNetsList(), BOARD_INSPECTION_TOOL::ClearHighlight(), FOOTPRINT_EDIT_FRAME::CommonSettingsChanged(), KIGFX::VIEW::EnableTopLayer(), PCB_EDIT_FRAME::ExecuteRemoteCommand(), PNS::TOOL_BASE::highlightNet(), BOARD_INSPECTION_TOOL::HighlightNet(), BOARD_INSPECTION_TOOL::highlightNet(), APPEARANCE_CONTROLS::onNetclassColorChanged(), APPEARANCE_CONTROLS::onNetclassContextMenu(), APPEARANCE_CONTROLS::onNetColorModeChanged(), DIALOG_NET_INSPECTOR::onSelChanged(), DIALOG_NET_INSPECTOR::onSortingChanged(), GERBVIEW_DRAW_PANEL_GAL::SetHighContrastLayer(), PCB_DRAW_PANEL_GAL::SetHighContrastLayer(), EDA_DRAW_PANEL_GAL::SetHighContrastLayer(), and NET_GRID_TABLE::updateNetColor().
|
inherited |
Do everything that is needed to apply the rendering order of layers.
It has to be called after modification of renderingOrder field of LAYER.
Definition at line 904 of file view.cpp.
References KIGFX::GAL::ChangeGroupDepth(), KIGFX::VIEW_ITEM_DATA::getGroup(), KIGFX::VIEW_ITEM_DATA::getLayers(), group, KIGFX::GAL::IsVisible(), KIGFX::VIEW::m_allItems, KIGFX::VIEW::m_gal, KIGFX::VIEW::m_layers, KIGFX::VIEW::MarkDirty(), KIGFX::VIEW::sortLayers(), and KIGFX::VIEW::VIEW_MAX_LAYERS.
Referenced by KIGFX::VIEW::EnableTopLayer(), SCH_DRAW_PANEL::SCH_DRAW_PANEL(), SCH_PREVIEW_PANEL::SCH_PREVIEW_PANEL(), PL_DRAW_PANEL_GAL::SetTopLayer(), GERBVIEW_DRAW_PANEL_GAL::SetTopLayer(), PCB_DRAW_PANEL_GAL::SetTopLayer(), and EDA_DRAW_PANEL_GAL::SetTopLayer().
|
protectedinherited |
Update set of layers that an item occupies.
Definition at line 1303 of file view.cpp.
References KIGFX::VIEW::VIEW_LAYER::items, KIGFX::VIEW::m_layers, KIGFX::VIEW::MarkTargetDirty(), KIGFX::VIEW::VIEW_LAYER::target, KIGFX::VIEW::VIEW_MAX_LAYERS, and KIGFX::VIEW_ITEM::ViewGetLayers().
Referenced by KIGFX::VIEW::invalidateItem().
void KIGFX::PCB_VIEW::UpdateDisplayOptions | ( | const PCB_DISPLAY_OPTIONS & | aOptions | ) |
Definition at line 125 of file pcb_view.cpp.
References KIGFX::VIEW::GetPainter().
Referenced by PCB_DRAW_PANEL_GAL::PCB_DRAW_PANEL_GAL(), and PCB_BASE_FRAME::SetDisplayOptions().
|
protectedinherited |
Update all information needed to draw an item.
Definition at line 1254 of file view.cpp.
References KIGFX::GAL::ChangeGroupColor(), color, KIGFX::RENDER_SETTINGS::GetColor(), KIGFX::VIEW_ITEM_DATA::getGroup(), KIGFX::PAINTER::GetSettings(), group, KIGFX::VIEW::IsCached(), KIGFX::VIEW::m_gal, KIGFX::VIEW::m_layers, KIGFX::VIEW::m_painter, and KIGFX::VIEW_ITEM::viewPrivData().
Referenced by KIGFX::VIEW::invalidateItem().
|
protectedinherited |
Update bounding box of an item.
Definition at line 1273 of file view.cpp.
References KIGFX::GAL::BeginGroup(), KIGFX::GAL::DeleteGroup(), KIGFX::PAINTER::Draw(), KIGFX::GAL::EndGroup(), KIGFX::VIEW_ITEM_DATA::getGroup(), group, KIGFX::VIEW::IsCached(), KIGFX::VIEW::m_gal, KIGFX::VIEW::m_layers, KIGFX::VIEW::m_painter, KIGFX::VIEW::VIEW_LAYER::renderingOrder, KIGFX::VIEW_ITEM_DATA::setGroup(), KIGFX::GAL::SetLayerDepth(), KIGFX::GAL::SetTarget(), KIGFX::VIEW::VIEW_LAYER::target, KIGFX::VIEW_ITEM::ViewDraw(), and KIGFX::VIEW_ITEM::viewPrivData().
Referenced by KIGFX::VIEW::invalidateItem().
|
inherited |
Iterate through the list of items that asked for updating and updates them.
Definition at line 1397 of file view.cpp.
References KIGFX::VIEW::invalidateItem(), KIGFX::GAL::IsVisible(), KIGFX::VIEW::m_allItems, KIGFX::VIEW::m_gal, and KIGFX::NONE.
Referenced by EDA_DRAW_PANEL_GAL::DoRePaint(), PL_SELECTION_TOOL::doSelectionMenu(), EE_SELECTION_TOOL::doSelectionMenu(), SCH_DRAW_PANEL::OnShow(), PCB_DRAW_PANEL_GAL::OnShow(), KIGFX::VIEW::ReorderLayerData(), and SCH_EDITOR_CONTROL::UpdateFind().
|
inherited |
Apply the new coloring scheme held by RENDER_SETTINGS in case that it has changed.
aLayer | is a number of the layer to be updated. |
Definition at line 752 of file view.cpp.
References KIGFX::VIEW::IsCached(), KIGFX::GAL::IsVisible(), KIGFX::VIEW::m_gal, KIGFX::VIEW::m_layers, KIGFX::VIEW::m_painter, KIGFX::VIEW::MarkTargetDirty(), and BOX2< Vec >::SetMaximum().
Referenced by PCB_CONTROL::LayerAlphaDec(), PCB_CONTROL::LayerAlphaInc(), APPEARANCE_CONTROLS::OnColorSwatchChanged(), and GERBER_LAYER_WIDGET::OnLayerColorChange().
|
protectedinherited |
Determine rendering order of layers. Used in display order sorting function.
Definition at line 1319 of file view.cpp.
References KIGFX::GAL::DeleteGroup(), KIGFX::VIEW_ITEM_DATA::getGroup(), KIGFX::VIEW_ITEM_DATA::getLayers(), KIGFX::VIEW::VIEW_LAYER::id, KIGFX::VIEW::IsCached(), KIGFX::VIEW::VIEW_LAYER::items, KIGFX::VIEW::m_gal, KIGFX::VIEW::m_layers, KIGFX::VIEW::MarkTargetDirty(), KIGFX::VIEW_ITEM_DATA::saveLayers(), KIGFX::VIEW_ITEM_DATA::setGroup(), KIGFX::VIEW::VIEW_LAYER::target, KIGFX::VIEW::VIEW_MAX_LAYERS, KIGFX::VIEW_ITEM::ViewGetLayers(), and KIGFX::VIEW_ITEM::viewPrivData().
Referenced by KIGFX::VIEW::invalidateItem().
|
inlineinherited |
aFlag | is true if draw priority should be respected while redrawing. |
Definition at line 643 of file view.h.
References KIGFX::VIEW::m_useDrawPriority.
|
protectedinherited |
The set of layers that are displayed on the top.
Definition at line 815 of file view.h.
Referenced by KIGFX::VIEW::Add(), KIGFX::VIEW::Clear(), KIGFX::SCH_VIEW::ClearHiddenFlags(), KIGFX::VIEW::DataReference(), KIGFX::VIEW::Remove(), KIGFX::VIEW::ReorderLayerData(), KIGFX::VIEW::UpdateAllItems(), KIGFX::VIEW::UpdateAllItemsConditionally(), KIGFX::VIEW::UpdateAllLayersColor(), KIGFX::VIEW::UpdateAllLayersOrder(), KIGFX::VIEW::UpdateItems(), and KIGFX::VIEW::VIEW().
|
protectedinherited |
Scale lower limit.
Definition at line 827 of file view.h.
Referenced by KIGFX::VIEW::GetBoundary(), PCB_VIEW(), KIGFX::SCH_VIEW::ResizeSheetWorkingArea(), KIGFX::SCH_VIEW::SCH_VIEW(), KIGFX::VIEW::SetBoundary(), KIGFX::VIEW::SetCenter(), and KIGFX::VIEW::VIEW().
|
protectedinherited |
Scale of displayed VIEW_ITEMs.
Definition at line 821 of file view.h.
Referenced by KIGFX::VIEW::GetCenter(), KIGFX::VIEW::SetCenter(), KIGFX::VIEW::SetGAL(), and KIGFX::VIEW::SetScale().
|
protectedinherited |
Rendering order modifier for layers that are marked as top layers.
Definition at line 852 of file view.h.
Referenced by KIGFX::VIEW::IsTargetDirty(), KIGFX::VIEW::MarkDirty(), KIGFX::VIEW::markTargetClean(), and KIGFX::VIEW::MarkTargetDirty().
|
protectedinherited |
Flag to mark targets as dirty so they have to be redrawn on the next refresh event.
Definition at line 849 of file view.h.
Referenced by KIGFX::VIEW::IsDynamic().
|
protectedinherited |
The set of possible displayed layers and its properties.
Definition at line 806 of file view.h.
Referenced by KIGFX::VIEW::ClearTopLayers(), KIGFX::VIEW::EnableTopLayer(), and KIGFX::VIEW::SetTopLayer().
|
protectedinherited |
Dynamic VIEW (eg.
display PCB in window) allows changes once it is built, static (eg. image/PDF) - does not.
Definition at line 845 of file view.h.
Referenced by KIGFX::VIEW::Clear(), KIGFX::VIEW::ClearTargets(), KIGFX::VIEW::draw(), KIGFX::VIEW::GetGAL(), KIGFX::VIEW::GetScreenPixelSize(), KIGFX::VIEW::GetViewport(), KIGFX::VIEW::RecacheAllItems(), KIGFX::VIEW::Redraw(), KIGFX::VIEW::redrawRect(), KIGFX::VIEW::Remove(), KIGFX::VIEW::SetCenter(), KIGFX::VIEW::SetGAL(), KIGFX::VIEW::SetMirror(), KIGFX::VIEW::SetScale(), KIGFX::VIEW::SetViewport(), KIGFX::VIEW::ToScreen(), KIGFX::VIEW::ToWorld(), KIGFX::VIEW::UpdateAllLayersColor(), KIGFX::VIEW::UpdateAllLayersOrder(), KIGFX::VIEW::updateItemColor(), KIGFX::VIEW::updateItemGeometry(), KIGFX::VIEW::UpdateItems(), KIGFX::VIEW::UpdateLayerColor(), and KIGFX::VIEW::updateLayers().
|
protectedinherited |
Sorted list of pointers to members of m_layers.
Definition at line 809 of file view.h.
Referenced by KIGFX::VIEW::Add(), KIGFX::VIEW::areRequiredLayersEnabled(), KIGFX::VIEW::Clear(), KIGFX::VIEW::clearGroupCache(), KIGFX::VIEW::ClearTopLayers(), KIGFX::VIEW::DataReference(), KIGFX::VIEW::draw(), KIGFX::VIEW::EnableTopLayer(), KIGFX::VIEW::GetLayerOrder(), KIGFX::VIEW::invalidateItem(), KIGFX::VIEW::IsCached(), KIGFX::VIEW::IsLayerVisible(), KIGFX::VIEW::RecacheAllItems(), KIGFX::VIEW::Remove(), KIGFX::VIEW::ReorderLayerData(), KIGFX::VIEW::SetLayerDisplayOnly(), KIGFX::VIEW::SetLayerOrder(), KIGFX::VIEW::SetLayerTarget(), KIGFX::VIEW::SetLayerVisible(), KIGFX::VIEW::SetRequired(), KIGFX::VIEW::SetTopLayer(), KIGFX::VIEW::sortLayers(), KIGFX::VIEW::UpdateAllLayersOrder(), KIGFX::VIEW::updateBbox(), KIGFX::VIEW::updateItemColor(), KIGFX::VIEW::updateItemGeometry(), KIGFX::VIEW::UpdateLayerColor(), KIGFX::VIEW::updateLayers(), and KIGFX::VIEW::VIEW().
|
protectedinherited |
Horizontal flip flag.
Definition at line 833 of file view.h.
Referenced by KIGFX::VIEW::SetScale(), and KIGFX::VIEW::SetScaleLimits().
|
protectedinherited |
Scale upper limit.
Definition at line 830 of file view.h.
Referenced by KIGFX::VIEW::SetScale(), and KIGFX::VIEW::SetScaleLimits().
|
protectedinherited |
Vertical flip flag.
Definition at line 836 of file view.h.
Referenced by KIGFX::VIEW::IsMirroredX(), KIGFX::VIEW::SetGAL(), and KIGFX::VIEW::SetMirror().
|
protectedinherited |
PAINTER contains information how do draw items.
Definition at line 839 of file view.h.
Referenced by KIGFX::VIEW::IsMirroredY(), KIGFX::VIEW::SetGAL(), and KIGFX::VIEW::SetMirror().
|
protectedinherited |
Flag to reverse the draw order when using draw priority.
Definition at line 861 of file view.h.
Referenced by KIGFX::VIEW::Add(), and KIGFX::VIEW::Clear().
|
protectedinherited |
Flat list of all items.
Definition at line 812 of file view.h.
Referenced by KIGFX::VIEW::Query(), KIGFX::VIEW::redrawRect(), and KIGFX::VIEW::sortLayers().
|
protectedinherited |
Whether to use rendering order modifier or not.
Definition at line 803 of file view.h.
Referenced by KIGFX::VIEW::AddToPreview(), and KIGFX::VIEW::ClearPreview().
|
protectedinherited |
Interface to #PAINTER that is used to draw items.
Definition at line 842 of file view.h.
Referenced by KIGFX::VIEW::draw(), KIGFX::VIEW::GetPainter(), KIGFX::VIEW::SetPainter(), KIGFX::VIEW::UpdateAllLayersColor(), KIGFX::VIEW::updateItemColor(), KIGFX::VIEW::updateItemGeometry(), and KIGFX::VIEW::UpdateLayerColor().
|
protectedinherited |
Definition at line 800 of file view.h.
Referenced by KIGFX::VIEW::AddToPreview(), KIGFX::SCH_VIEW::Cleanup(), KIGFX::VIEW::ClearPreview(), KIGFX::VIEW::InitPreview(), KIGFX::VIEW::ShowPreview(), KIGFX::VIEW::VIEW(), and KIGFX::VIEW::~VIEW().
|
protectedinherited |
Definition at line 868 of file view.h.
Referenced by KIGFX::VIEW::GetPrintMode(), and KIGFX::VIEW::SetPrintMode().
|
protectedinherited |
A control for printing: m_printMode <= 0 means no printing mode (normal draw mode m_printMode > 0 is a printing mode (currently means "we are in printing mode").
Definition at line 864 of file view.h.
Referenced by KIGFX::VIEW::IsDrawOrderReversed(), KIGFX::VIEW::redrawRect(), and KIGFX::VIEW::ReverseDrawOrder().
|
protectedinherited |
View boundaries.
Definition at line 824 of file view.h.
Referenced by KIGFX::VIEW::GetScale(), KIGFX::VIEW::DRAW_ITEM_VISITOR::operator()(), KIGFX::VIEW::SetGAL(), and KIGFX::VIEW::SetScale().
|
protectedinherited |
Center point of the VIEW (the point at which we are looking at).
Definition at line 818 of file view.h.
Referenced by KIGFX::VIEW::ClearTopLayers(), KIGFX::VIEW::EnableTopLayer(), KIGFX::VIEW::GetTopLayer(), and KIGFX::VIEW::SetTopLayer().
|
protectedinherited |
The next sequential drawing priority.
Definition at line 858 of file view.h.
Referenced by KIGFX::VIEW::IsUsingDrawPriority(), KIGFX::VIEW::redrawRect(), and KIGFX::VIEW::UseDrawPriority().
|
staticprotectedinherited |
Flag to respect draw priority when drawing items.
Definition at line 855 of file view.h.
Referenced by KIGFX::VIEW::ClearTopLayers(), KIGFX::VIEW::EnableTopLayer(), and KIGFX::VIEW::SetTopLayer().
|
staticinherited |
maximum number of layers that may be shown
Definition at line 700 of file view.h.
Referenced by KIGFX::VIEW::Add(), KIGFX::SCH_PAINTER::draw(), KIGFX::VIEW::draw(), FOOTPRINT::GetAllDrawingLayers(), KIGFX::VIEW::invalidateItem(), KIGFX::VIEW::Remove(), KIGFX::VIEW::ReorderLayerData(), KIGFX::VIEW_ITEM_DATA::saveLayers(), PL_DRAW_PANEL_GAL::setDefaultLayerDeps(), SCH_DRAW_PANEL::setDefaultLayerDeps(), SCH_PREVIEW_PANEL::setDefaultLayerDeps(), GERBVIEW_DRAW_PANEL_GAL::setDefaultLayerDeps(), PCB_DRAW_PANEL_GAL::setDefaultLayerDeps(), SCH_DRAW_PANEL::setDefaultLayerOrder(), SCH_PREVIEW_PANEL::setDefaultLayerOrder(), PCB_DRAW_PANEL_GAL::setDefaultLayerOrder(), BOARD_PRINTOUT::setupViewLayers(), KIGFX::VIEW::UpdateAllLayersColor(), KIGFX::VIEW::UpdateAllLayersOrder(), KIGFX::VIEW::updateBbox(), KIGFX::VIEW::updateLayers(), KIGFX::VIEW::VIEW(), and KIGFX::VIEW_GROUP::ViewDraw().