Skip To Content ArcGIS for Developers Sign In Dashboard

ViewInsets Class

(Esri::ArcGISRuntime::ViewInsets)

Defines areas along the edges of a GeoView that may be obscured by some other UI elements. More...

Header: #include <ViewInsets>
Since: Esri::ArcGISRuntime 100.1
Inherits: Object

Properties

  • right : const double
  • top : const double
  • 1 property inherited from QObject

Public Functions

ViewInsets(double left, double right, double top, double bottom, QObject *parent = nullptr)
~ViewInsets()
double bottom() const
bool isEmpty() const
double left() const
double right() const
double top() const
  • 31 public functions inherited from QObject

Signals

Additional Inherited Members

  • 1 public slot inherited from QObject
  • 1 public variable inherited from QObject
  • 10 static public members inherited from QObject
  • 9 protected functions inherited from QObject
  • 2 protected variables inherited from QObject

Detailed Description

Defines areas along the edges of a GeoView that may be obscured by some other UI elements.

View insets reduce the size of the area where it is safe to display callouts, attribution text, location display, and other visual elements on the GeoView when some of the GeoView is obscured by overlaid UI elements such as slide-in panels. The anchoring of the GeoView's visual elements is adjusted to account for the overlaid UI elements.

Units for left, right, top, and bottom are specified in device-independent pixels (DIPs).

Ex:

mapView->setViewInsets(new ViewInsets(sidePanel.width, 0, 0, 0, this));

If you just want to zoom to a geometry and leave a bit of padding around it, use the MapView::setViewpointGeometry(const Geometry&, double) method instead.

See also GeoView.

Property Documentation

bottom : const double

This property holds the inset from the bottom edge, in device independent pixels (DIPs).

Access functions:

double bottom() const

Notifier signal:

empty : const bool

This property holds whether the insets are set to default values (read-only).

The view insets are empty if the inset of all four edges are 0.

Access functions:

bool isEmpty() const

Notifier signal:

left : const double

This property holds the inset from the left edge, in device independent pixels (DIPs).

Access functions:

double left() const

Notifier signal:

right : const double

This property holds the inset from the right edge, in device independent pixels (DIPs).

Access functions:

double right() const

Notifier signal:

top : const double

This property holds the inset from the top edge, in device independent pixels (DIPs).

Access functions:

double top() const

Notifier signal:

Member Function Documentation

ViewInsets::ViewInsets(double left, double right, double top, double bottom, QObject *parent = nullptr)

Constructor specifying left, right, top, and bottom inset values with an optional parent.

ViewInsets::~ViewInsets()

Destructor.

double ViewInsets::bottom() const

Returns the inset from the bottom edge, in device independent pixels (DIPs).

Note: Getter function for property bottom.

bool ViewInsets::isEmpty() const

Returns whether the insets are set to default values.

The view insets are empty if the inset of all four edges are 0.

Note: Getter function for property empty.

double ViewInsets::left() const

Returns the inset from the left edge, in device independent pixels (DIPs).

Note: Getter function for property left.

Returns the inset from the right edge, in device independent pixels (DIPs).

Note: Getter function for property right.

double ViewInsets::top() const

Returns the inset from the top edge, in device independent pixels (DIPs).

Note: Getter function for property top.

[signal] void ViewInsets::viewInsetsChanged()

Signal emitted when any edge value of the insets changes.

Note: Notifier signal for property left. Notifier signal for property top. Notifier signal for property right. Notifier signal for property bottom. Notifier signal for property empty.


Feedback on this topic?