### Class

# AdwBreakpoint

since: 1.4

#### Description [src]

    final class Adw.Breakpoint : GObject.Object
      implements Gtk.Buildable {
      /* No available fields */
    }

Describes a breakpoint for `AdwWindow`.

Breakpoints are used to create adaptive UI, allowing to change the layout depending on available size.

Breakpoint is a size threshold, specified by its condition, as well as one or more setters.

Each setter has a target object, a property and a value. When a breakpoint is applied, each setter sets the target property on their target object to the specified value, and reset it back to the original value when it’s unapplied.

For more complicated scenarios, `AdwBreakpoint::apply` and `AdwBreakpoint::unapply` can be used instead.

Breakpoints can be used within `AdwWindow`, `AdwApplicationWindow` or `AdwBreakpointBin`.

## `AdwBreakpoint` as `GtkBuildable`:

`AdwBreakpoint` supports specifying its condition via the `<condition>` element. The contents of the element must be a string in a format accepted by `adw_breakpoint_condition_parse()`.

It also supports adding setters via the `<setter>` element. Each `<setter>` element must have the `object` attribute specifying the target object, and the `property` attribute specifying the property name. The contents of the element are used as the setter value.

For `G_TYPE_OBJECT` and `G_TYPE_BOXED` derived properties, empty contents are treated as `NULL`.

Setter values can be translated with the usual `translatable`, `context` and `comments` attributes.

Example of an `AdwBreakpoint` UI definition:

    <object class="AdwBreakpoint">
      <condition>max-width: 400px</condition>
      <setter object="button" property="visible">True</setter>
      <setter object="box" property="orientation">vertical</setter>
      <setter object="page" property="title" translatable="yes">Example</setter>
    </object>

Available since: 1.4

#### Hierarchy

#### Ancestors

- GObject

#### Implements

- GtkBuildable

#### Constructors

###### adw_breakpoint_new

Creates a new `AdwBreakpoint` with `condition`.

since: 1.4

#### Instance methods

###### adw_breakpoint_add_setter

Adds a setter to `self`.

since: 1.4

###### adw_breakpoint_add_setters

Adds multiple setters to `self`.

since: 1.4

###### adw_breakpoint_add_setters_valist

Adds multiple setters to `self`.

since: 1.4

###### adw_breakpoint_add_settersv

Adds `n_setters` setters to `self`.

since: 1.4

###### adw_breakpoint_get_condition

Gets the condition for `self`.

since: 1.4

###### adw_breakpoint_set_condition

Sets the condition for `self`.

since: 1.4

##### Methods inherited from GObject (43)

Please see GObject for a full list of methods.

##### Methods inherited from GtkBuildable (1)

###### gtk_buildable_get_buildable_id

Gets the ID of the `buildable` object.

#### Properties

###### Adw.Breakpoint:condition

The breakpoint’s condition.

since: 1.4

#### Signals

###### Adw.Breakpoint::apply

Emitted when the breakpoint is applied.

since: 1.4

###### Adw.Breakpoint::unapply

Emitted when the breakpoint is unapplied.

since: 1.4

##### Signals inherited from GObject (1)

###### GObject::notify

The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

#### Class structure

    struct AdwBreakpointClass {
      GObjectClass parent_class;

    }

No description available.

###### Class members

`parent_class: GObjectClass`

  No description available.