## GtkScrolledSyncWindow GtkScrolledSyncWindow — Adds scrolling to its child widget |

## Functions

GtkWidget * | gtk_scrolled_sync_window_new ()
void | gtk_scrolled_sync_window_set_hadjustment ()
void | gtk_scrolled_sync_window_set_vadjustment ()
GtkAdjustment * | gtk_scrolled_sync_window_get_hadjustment ()
GtkAdjustment * | gtk_scrolled_sync_window_get_vadjustment ()
void | gtk_scrolled_sync_window_add_with_viewport ()
void | gtk_scrolled_sync_window_set_kinetic_scrolling ()
gboolean | gtk_scrolled_sync_window_get_kinetic_scrolling ()
void | gtk_scrolled_sync_window_set_capture_button_press ()
gboolean | gtk_scrolled_sync_window_get_capture_button_press ()

## Properties

GtkAdjustment * | hadjustment | Read / Write / Construct
gboolean | kinetic-scrolling | Read / Write
GtkAdjustment * | vadjustment | Read / Write / Construct

## Signals

void | move-focus-out | Action
gboolean | scroll-child | Action

## Types and Values

struct | GtkScrolledSyncWindow

## Object Hierarchy

        GObject
        ╰── GInitiallyUnowned
            ╰── GtkWidget
                ╰── GtkContainer
                    ╰── GtkBin
                        ╰── GtkScrolledSyncWindow

## Implemented Interfaces

GtkScrolledSyncWindow implements AtkImplementorIface and GtkBuildable.

## Includes

    #include "bt-edit.h"

## Description

GtkScrolledSyncWindow is a copy of GtkScrolledWindow that can be used as a companion widget. For this one will share some or all of the adjustments of the master widget with this widget. The GtkScrolledSyncWindow will never show scrollbars, instead it will follow the scrollbars of the master widget.

## Functions

### gtk_scrolled_sync_window_new ()

    GtkWidget *
    gtk_scrolled_sync_window_new (GtkAdjustment *hadjustment,
                                  GtkAdjustment *vadjustment);

Creates a new synced scrolled window.

The two arguments are the scrolled window's adjustments; these will be shared with the scrollbars and the child widget to keep the bars in sync with the child. Usually you want to pass `NULL` for the adjustments, which will cause the scrolled window to create them for you.

#### Parameters

hadjustment | horizontal adjustment. | [allow-none]
vadjustment | vertical adjustment. | [allow-none]

#### Returns

a new synced scrolled window

### gtk_scrolled_sync_window_set_hadjustment ()

    void
    gtk_scrolled_sync_window_set_hadjustment
                                   (GtkScrolledSyncWindow *self,
                                    GtkAdjustment *hadjustment);

Sets the GtkAdjustment for the horizontal scrollbar.

#### Parameters

self | a GtkScrolledSyncWindow |
hadjustment | horizontal scroll adjustment |

### gtk_scrolled_sync_window_set_vadjustment ()

    void
    gtk_scrolled_sync_window_set_vadjustment
                                   (GtkScrolledSyncWindow *self,
                                    GtkAdjustment *vadjustment);

Sets the GtkAdjustment for the vertical scrollbar.

#### Parameters

self | a GtkScrolledSyncWindow |
vadjustment | vertical scroll adjustment |

### gtk_scrolled_sync_window_get_hadjustment ()

    GtkAdjustment *
    gtk_scrolled_sync_window_get_hadjustment
                                   (GtkScrolledSyncWindow *self);

Returns the horizontal adjustment.

#### Parameters

self | a GtkScrolledSyncWindow |

#### Returns

the horizontal GtkAdjustment.

[transfer none]

### gtk_scrolled_sync_window_get_vadjustment ()

    GtkAdjustment *
    gtk_scrolled_sync_window_get_vadjustment
                                   (GtkScrolledSyncWindow *self);

Returns the vertical adjustment.

#### Parameters

self | a GtkScrolledSyncWindow |

#### Returns

the vertical GtkAdjustment.

[transfer none]

### gtk_scrolled_sync_window_add_with_viewport ()

    void
    gtk_scrolled_sync_window_add_with_viewport
                                   (GtkScrolledSyncWindow *self,
                                    GtkWidget *child);

`gtk_scrolled_sync_window_add_with_viewport` has been deprecated since version 3.8 and should not be used in newly-written code.

gtk_container_add() will now automatically add a GtkViewport if the child doesn't implement GtkScrollable.

Used to add children without native scrolling capabilities. This is simply a convenience function; it is equivalent to adding the unscrollable child to a viewport, then adding the viewport to the scrolled window. If a child has native scrolling, use `gtk_container_add()` instead of this function.

The viewport scrolls the child by moving its GdkWindow, and takes the size of the child to be the size of its toplevel GdkWindow. This will be very wrong for most widgets that support native scrolling; for example, if you add a widget such as GtkTreeView with a viewport, the whole widget will scroll, including the column headings. Thus, widgets with native scrolling support should not be used with the GtkViewport proxy.

A widget supports scrolling natively if it implements the GtkScrollable interface.

#### Parameters

self | a GtkScrolledSyncWindow |
child | the widget you want to scroll |

### gtk_scrolled_sync_window_set_kinetic_scrolling ()

    void
    gtk_scrolled_sync_window_set_kinetic_scrolling
                                   (GtkScrolledSyncWindow *self,
                                    gboolean kinetic_scrolling);

Turns kinetic scrolling on or off. Kinetic scrolling only applies to devices with source `GDK_SOURCE_TOUCHSCREEN`.

#### Parameters

self | a GtkScrolledSyncWindow |
kinetic_scrolling | `TRUE` to enable kinetic scrolling |

### gtk_scrolled_sync_window_get_kinetic_scrolling ()

    gboolean
    gtk_scrolled_sync_window_get_kinetic_scrolling
                                   (GtkScrolledSyncWindow *self);

Returns the specified kinetic scrolling behavior.

#### Parameters

self | a GtkScrolledSyncWindow |

#### Returns

the scrolling behavior flags.

### gtk_scrolled_sync_window_set_capture_button_press ()

    void
    gtk_scrolled_sync_window_set_capture_button_press
                                   (GtkScrolledSyncWindow *self,
                                    gboolean capture_button_press);

Changes the behaviour of `self` wrt. to the initial event that possibly starts kinetic scrolling. When `capture_button_press` is set to `TRUE`, the event is captured by the scrolled window, and then later replayed if it is meant to go to the child widget.

This should be enabled if any child widgets perform non-reversible actions on “button-press-event”. If they don't, and handle additionally handle “grab-broken-event”, it might be better to set `capture_button_press` to `FALSE`.

This setting only has an effect if kinetic scrolling is enabled.

#### Parameters

self | a GtkScrolledSyncWindow |
capture_button_press | `TRUE` to capture button presses |

### gtk_scrolled_sync_window_get_capture_button_press ()

    gboolean
    gtk_scrolled_sync_window_get_capture_button_press
                                   (GtkScrolledSyncWindow *self);

Return whether button presses are captured during kinetic scrolling. See `gtk_scrolled_sync_window_set_capture_button_press()`.

#### Parameters

self | a GtkScrolledSyncWindow |

#### Returns

`TRUE` if button presses are captured during kinetic scrolling

## Types and Values

### struct GtkScrolledSyncWindow

    struct GtkScrolledSyncWindow;

a scrolling container widget

## Property Details

### The `“hadjustment”` property

      “hadjustment”              GtkAdjustment *

The GtkAdjustment for the horizontal position.

Flags: Read / Write / Construct

### The `“kinetic-scrolling”` property

      “kinetic-scrolling”        gboolean

The kinetic scrolling behavior flags. Kinetic scrolling only applies to devices with source `GDK_SOURCE_TOUCHSCREEN`

Flags: Read / Write

Default value: TRUE

### The `“vadjustment”` property

      “vadjustment”              GtkAdjustment *

The GtkAdjustment for the vertical position.

Flags: Read / Write / Construct

## Signal Details

### The `“move-focus-out”` signal

    void
    user_function (GtkScrolledSyncWindow *scrolled_sync_window,
                   GtkDirectionType       direction_type,
                   gpointer               user_data)

The ::move-focus-out signal is a

keybinding signal

which gets emitted when focus is moved away from the scrolled window by a keybinding. The “move-focus” signal is emitted with `direction_type` on this scrolled windows toplevel parent in the container hierarchy. The default bindings for this signal are

Tab+Ctrl

and

Tab+Ctrl+Shift.

#### Parameters

scrolled_sync_window | a GtkScrolledSyncWindow |
direction_type | either `GTK_DIR_TAB_FORWARD` or `GTK_DIR_TAB_BACKWARD` |
user_data | user data set when the signal handler was connected. |

Flags: Action

### The `“scroll-child”` signal

    gboolean
    user_function (GtkScrolledSyncWindow *scrolled_sync_window,
                   GtkScrollType          scroll,
                   gboolean               horizontal,
                   gpointer               user_data)

The ::scroll-child signal is a

keybinding signal

which gets emitted when a keybinding that scrolls is pressed. The horizontal or vertical adjustment is updated which triggers a signal that the scrolled windows child may listen to and scroll itself.

#### Parameters

scrolled_sync_window | a GtkScrolledSyncWindow |
scroll | a GtkScrollType describing how much to scroll |
horizontal | whether the keybinding scrolls the child horizontally or not |
user_data | user data set when the signal handler was connected. |

Flags: Action

## See Also

GtkScrollable, GtkViewport, GtkAdjustment