ViewInsets Class

  • 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.h>
    Since: Esri::ArcGISRuntime 100.1
    Inherits: Esri::ArcGISRuntime::Object

    This class was introduced in Esri::ArcGISRuntime 100.1.

    Properties

    • right : const double
    • top : const double

    Public Functions

    ViewInsets(double left, double right, double top, double bottom, QObject *parent = nullptr)
    virtual ~ViewInsets() override
    double bottom() const
    bool isEmpty() const
    double left() const
    double right() const
    double top() const

    Signals

    Detailed Description

    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 Esri::ArcGISRuntime::Geometry& boundingGeometry, double paddingInDIPS) 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.

    [signal] void ViewInsets::viewInsetsChanged()

    Signal emitted when any edge value of the insets changes.

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

    [override virtual] 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.

    Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.