GwySelectionRange: Gwyddion Library Reference Manual

## GwySelectionRange GwySelectionRange — Interval selection |

## Functions

GwySelection * | gwy_selection_range_new ()
void | gwy_selection_range_set_orientation ()
GwyOrientation | gwy_selection_range_get_orientation ()

## Properties

GwyOrientation | orientation | Read / Write

## Types and Values

struct | GwySelectionRange
struct | GwySelectionRangeClass

## Object Hierarchy

        GObject
        ╰── GwySelection
            ╰── GwySelectionRange

## Implemented Interfaces

GwySelectionRange implements GwySerializable.

## Includes

    #include <libgwyddion/gwyddion.h>

## Description

GwySelectionRange is used to represent horizontal or vertical intervals. Selection data consists of coordinate pairs (from, to).

If you obtain the selection from a graph widget it has the "orientation" property set for information. The orientation has to kept intact in this case. The graph keeps two distinct range selection objects, one horizontal and one vertical.

## Functions

### gwy_selection_range_new()

    GwySelection *
    gwy_selection_range_new (void);

Creates a new range-wise selection.

#### Returns

A new selection object.

### gwy_selection_range_set_orientation()

    void
    gwy_selection_range_set_orientation (GwySelectionRange *selection,
                                         GwyOrientation orientation);

Sets the orientation of a range selection.

Horizontal orientation means intervals along the X-axis. Vertical orientation means intervals along the Y-axis.

#### Parameters

selection | A range selection. |
orientation | New orientation. |

#### Returns

A new selection object.

### gwy_selection_range_get_orientation()

    GwyOrientation
    gwy_selection_range_get_orientation (GwySelectionRange *selection);

Obtains the orientation of a range selection.

Horizontal orientation means intervals along the X-axis. Vertical orientation means intervals along the Y-axis.

#### Parameters

selection | A range selection. |

#### Returns

The orientation.

## Types and Values

### struct GwySelectionRange

    struct GwySelectionRange;

### struct GwySelectionRangeClass

    struct GwySelectionRangeClass {
        GwySelectionClass parent_class;
    };

## Property Details

### The `“orientation”` property

      “orientation”              GwyOrientation

The :orientation property represents the orientation of the selected area.

The orientation is `GWY_ORIENTATION_HORIZONTAL` for selections of ranges along the `x` -axis, and `GWY_ORIENTATION_VERTICAL` for selections along the `y` -axis.

Owner: GwySelectionRange

Flags: Read / Write

Default value: GWY_ORIENTATION_HORIZONTAL