## GtkConstraintGuide GtkConstraintGuide — An invisible constraint target |

## Functions

GtkConstraintGuide * | gtk_constraint_guide_new ()
void | gtk_constraint_guide_set_name ()
const char * | gtk_constraint_guide_get_name ()
void | gtk_constraint_guide_set_strength ()
GtkConstraintStrength | gtk_constraint_guide_get_strength ()
void | gtk_constraint_guide_set_min_size ()
void | gtk_constraint_guide_get_min_size ()
void | gtk_constraint_guide_set_nat_size ()
void | gtk_constraint_guide_get_nat_size ()
void | gtk_constraint_guide_set_max_size ()
void | gtk_constraint_guide_get_max_size ()

## Properties

gint | max-height | Read / Write
gint | max-width | Read / Write
gint | min-height | Read / Write
gint | min-width | Read / Write
gchar * | name | Read / Write
gint | nat-height | Read / Write
gint | nat-width | Read / Write
GtkConstraintStrength | strength | Read / Write

## Types and Values

| GtkConstraintGuide

## Object Hierarchy

        GObject
        ╰── GtkConstraintGuide

## Implemented Interfaces

GtkConstraintGuide implements GtkConstraintTarget.

## Includes

    #include <gtk/gtk.h>

## Description

A GtkConstraintGuide is an invisible layout element that can be used by widgets inside a GtkConstraintLayout as a source or a target of a GtkConstraint. Guides can be used like guidelines or as flexible space.

Unlike a GtkWidget, a GtkConstraintGuide will not be drawn.

## Functions

### gtk_constraint_guide_new ()

    GtkConstraintGuide *
    gtk_constraint_guide_new (void);

Creates a new GtkConstraintGuide object.

Return: a new GtkConstraintGuide object.

### gtk_constraint_guide_set_name ()

    void
    gtk_constraint_guide_set_name (GtkConstraintGuide *guide,
                                   const char *name);

Sets a name for the given GtkConstraintGuide.

The name is useful for debugging purposes.

#### Parameters

guide | a GtkConstraintGuide |
name | a name for the `guide` . | [nullable]

### gtk_constraint_guide_get_name ()

    const char *
    gtk_constraint_guide_get_name (GtkConstraintGuide *guide);

Retrieves the name set using `gtk_constraint_guide_set_name()`.

#### Parameters

guide | a GtkConstraintGuide |

#### Returns

the name of the guide.

[transfer none][nullable]

### gtk_constraint_guide_set_strength ()

    void
    gtk_constraint_guide_set_strength (GtkConstraintGuide *guide,
                                       GtkConstraintStrength strength);

Sets the strength of the constraint on the natural size of the given GtkConstraintGuide.

#### Parameters

guide | a GtkConstraintGuide |
strength | the strength of the constraint |

### gtk_constraint_guide_get_strength ()

    GtkConstraintStrength
    gtk_constraint_guide_get_strength (GtkConstraintGuide *guide);

Retrieves the strength set using `gtk_constraint_guide_set_strength()`.

#### Parameters

guide | a GtkConstraintGuide |

#### Returns

the strength of the constraint on the natural size

### gtk_constraint_guide_set_min_size ()

    void
    gtk_constraint_guide_set_min_size (GtkConstraintGuide *guide,
                                       int width,
                                       int height);

Sets the minimum size of `guide` .

If `guide` is attached to a GtkConstraintLayout, the constraints will be updated to reflect the new size.

#### Parameters

guide | a GtkConstraintGuide object |
width | the new minimum width, or -1 to not change it |
height | the new minimum height, or -1 to not change it |

### gtk_constraint_guide_get_min_size ()

    void
    gtk_constraint_guide_get_min_size (GtkConstraintGuide *guide,
                                       int *width,
                                       int *height);

Gets the minimum size of `guide` .

#### Parameters

guide | a GtkConstraintGuide object |
width | return location for the minimum width, or `NULL`. | [allow-none]
height | return location for the minimum height, or `NULL`. | [allow-none]

### gtk_constraint_guide_set_nat_size ()

    void
    gtk_constraint_guide_set_nat_size (GtkConstraintGuide *guide,
                                       int width,
                                       int height);

Sets the natural size of `guide` .

If `guide` is attached to a GtkConstraintLayout, the constraints will be updated to reflect the new size.

#### Parameters

guide | a GtkConstraintGuide object |
width | the new natural width, or -1 to not change it |
height | the new natural height, or -1 to not change it |

### gtk_constraint_guide_get_nat_size ()

    void
    gtk_constraint_guide_get_nat_size (GtkConstraintGuide *guide,
                                       int *width,
                                       int *height);

Gets the natural size of `guide` .

#### Parameters

guide | a GtkConstraintGuide object |
width | return location for the natural width, or `NULL`. | [allow-none]
height | return location for the natural height, or `NULL`. | [allow-none]

### gtk_constraint_guide_set_max_size ()

    void
    gtk_constraint_guide_set_max_size (GtkConstraintGuide *guide,
                                       int width,
                                       int height);

Sets the maximum size of `guide` .

If `guide` is attached to a GtkConstraintLayout, the constraints will be updated to reflect the new size.

#### Parameters

guide | a GtkConstraintGuide object |
width | the new maximum width, or -1 to not change it |
height | the new maximum height, or -1 to not change it |

### gtk_constraint_guide_get_max_size ()

    void
    gtk_constraint_guide_get_max_size (GtkConstraintGuide *guide,
                                       int *width,
                                       int *height);

Gets the maximum size of `guide` .

#### Parameters

guide | a GtkConstraintGuide object |
width | return location for the maximum width, or `NULL`. | [allow-none]
height | return location for the maximum height, or `NULL`. | [allow-none]

## Types and Values

### GtkConstraintGuide

    typedef struct _GtkConstraintGuide GtkConstraintGuide;

An object that can be added to a GtkConstraintLayout and be used in constraints like a widget, without being drawn.

Guides have a minimum, maximum and natural size. Depending on the constraints that are applied, they can act like a guideline that widgets can be aligned to, or like 'flexible space'.

## Property Details

### The `“max-height”` property

      “max-height”               gint

The maximum height of the guide.

Owner: GtkConstraintGuide

Flags: Read / Write

Allowed values: >= 0

Default value: 2147483647

### The `“max-width”` property

      “max-width”                gint

The maximum width of the guide.

Owner: GtkConstraintGuide

Flags: Read / Write

Allowed values: >= 0

Default value: 2147483647

### The `“min-height”` property

      “min-height”               gint

The minimum height of the guide.

Owner: GtkConstraintGuide

Flags: Read / Write

Allowed values: >= 0

Default value: 0

### The `“min-width”` property

      “min-width”                gint

The minimum width of the guide.

Owner: GtkConstraintGuide

Flags: Read / Write

Allowed values: >= 0

Default value: 0

### The `“name”` property

      “name”                     gchar *

A name that identifies the GtkConstraintGuide, for debugging.

Owner: GtkConstraintGuide

Flags: Read / Write

Default value: NULL

### The `“nat-height”` property

      “nat-height”               gint

The preferred, or natural, height of the guide.

Owner: GtkConstraintGuide

Flags: Read / Write

Allowed values: >= 0

Default value: 0

### The `“nat-width”` property

      “nat-width”                gint

The preferred, or natural, width of the guide.

Owner: GtkConstraintGuide

Flags: Read / Write

Allowed values: >= 0

Default value: 0

### The `“strength”` property

      “strength”                 GtkConstraintStrength

The GtkConstraintStrength to be used for the constraint on the natural size of the guide.

Owner: GtkConstraintGuide

Flags: Read / Write

Default value: GTK_CONSTRAINT_STRENGTH_MEDIUM