## AmtkTreeViewScrolledWindowSizing AmtkTreeViewScrolledWindowSizing — Custom GtkScrolledWindow sizing when it contains a GtkTreeView |

## Functions

AmtkTreeViewScrolledWindowSizing * | amtk_tree_view_scrolled_window_sizing_new ()
GtkTreeView * | amtk_tree_view_scrolled_window_sizing_get_tree_view ()
gboolean | amtk_tree_view_scrolled_window_sizing_get_monitor_limit ()
void | amtk_tree_view_scrolled_window_sizing_set_monitor_limit ()

## Properties

gboolean | monitor-limit-enabled | Read / Write / Construct

## Types and Values

struct | AmtkTreeViewScrolledWindowSizing

## Object Hierarchy

        GObject
        ╰── GInitiallyUnowned
            ╰── GtkWidget
                ╰── GtkContainer
                    ╰── GtkBin
                        ╰── GtkScrolledWindow
                            ╰── AmtkTreeViewScrolledWindowSizing

## Implemented Interfaces

AmtkTreeViewScrolledWindowSizing implements AtkImplementorIface and GtkBuildable.

## Includes

    #include <amtk/amtk.h>

## Description

AmtkTreeViewScrolledWindowSizing is a subclass of GtkScrolledWindow to provide custom sizing when it contains a GtkTreeView.

If the GtkTreeView is small enough, its natural size is taken. If it exceeds a certain size, a smaller size is applied with the height at a row boundary.

To configure the size limits, you can use the following properties:

- “max-content-width”

- “max-content-height”

- “monitor-limit-enabled”

One use-case is to show a GtkTreeView in a popup GtkWindow.

### Limitations

The current AmtkTreeViewScrolledWindowSizing implementation has several limitations, so there is room for improvement in future versions.

The restrictions:

- The “headers-visible” property should be `FALSE`.

- The GtkTreeView should contain a list, not a tree.

- All rows of the GtkTreeView should have the same height, see the “fixed-height-mode” property.

## Functions

### amtk_tree_view_scrolled_window_sizing_new ()

    AmtkTreeViewScrolledWindowSizing *
    amtk_tree_view_scrolled_window_sizing_new
                                   (void);

#### Returns

a new AmtkTreeViewScrolledWindowSizing.

[transfer floating]

Since: 5.10

### amtk_tree_view_scrolled_window_sizing_get_tree_view ()

    GtkTreeView *
    amtk_tree_view_scrolled_window_sizing_get_tree_view
                                   (AmtkTreeViewScrolledWindowSizing *self);

#### Parameters

self | an AmtkTreeViewScrolledWindowSizing. |

#### Returns

the GtkTreeView, if the child widget is a GtkTreeView. Otherwise `NULL` is returned.

[transfer none][nullable]

Since: 5.10

### amtk_tree_view_scrolled_window_sizing_get_monitor_limit ()

    gboolean
    amtk_tree_view_scrolled_window_sizing_get_monitor_limit
                                   (AmtkTreeViewScrolledWindowSizing *self);

#### Parameters

self | an AmtkTreeViewScrolledWindowSizing. |

#### Returns

the current value of the “monitor-limit-enabled” property.

Since: 5.10

### amtk_tree_view_scrolled_window_sizing_set_monitor_limit ()

    void
    amtk_tree_view_scrolled_window_sizing_set_monitor_limit
                                   (AmtkTreeViewScrolledWindowSizing *self,
                                    gboolean monitor_limit);

Sets the “monitor-limit-enabled” property.

#### Parameters

self | an AmtkTreeViewScrolledWindowSizing. |
monitor_limit | the new value. |

Since: 5.10

## Types and Values

### struct AmtkTreeViewScrolledWindowSizing

    struct AmtkTreeViewScrolledWindowSizing;

## Property Details

### The `“monitor-limit-enabled”` property

      “monitor-limit-enabled”    gboolean

Whether to take the GdkMonitor size into account as a maximum width and height to apply.

Owner: AmtkTreeViewScrolledWindowSizing

Flags: Read / Write / Construct

Default value: TRUE

Since: 5.10