gtkmm: Gtk::Scrollable Class Reference

gtkmm 4.22.0

Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Related Symbols | List of all members
Gtk::Scrollable Class Reference

This interface is implemented by widgets with native scrolling ability. More...

`#include <gtkmm/scrollable.h>`

Inheritance diagram for Gtk::Scrollable:
[legend]

## Public Types
enum class | Policy { Policy::MINIMUM , Policy::NATURAL }
| Defines the policy to be used in a scrollable widget when updating the scrolled window adjustments in a given orientation. More...

## Public Member Functions
| Scrollable (Scrollable && src) noexcept
Scrollable & | operator= (Scrollable && src) noexcept
| ~Scrollable () noexcept override
GtkScrollable * | gobj ()
| Provides access to the underlying C GObject.
const GtkScrollable * | gobj () const
| Provides access to the underlying C GObject.
Glib::RefPtr< Adjustment > | get_hadjustment ()
| Retrieves the Gtk::Adjustment used for horizontal scrolling.
Glib::RefPtr< const Adjustment > | get_hadjustment () const
| Retrieves the Gtk::Adjustment used for horizontal scrolling.
void | set_hadjustment (const Glib::RefPtr< Adjustment > & hadjustment)
| Sets the horizontal adjustment of the Gtk::Scrollable.
void | unset_hadjustment ()
| This method removes the hadjustment.
Glib::RefPtr< Adjustment > | get_vadjustment ()
| Retrieves the Gtk::Adjustment used for vertical scrolling.
Glib::RefPtr< const Adjustment > | get_vadjustment () const
| Retrieves the Gtk::Adjustment used for vertical scrolling.
void | set_vadjustment (const Glib::RefPtr< Adjustment > & vadjustment)
| Sets the vertical adjustment of the Gtk::Scrollable.
void | unset_vadjustment ()
| This method removes the vadjustment.
Policy | get_hscroll_policy () const
| Gets the horizontal Gtk::Scrollable::Policy.
void | set_hscroll_policy (Policy policy)
| Sets the Gtk::Scrollable::Policy.
Policy | get_vscroll_policy () const
| Gets the vertical Gtk::Scrollable::Policy.
void | set_vscroll_policy (Policy policy)
| Sets the Gtk::Scrollable::Policy.
bool | get_border (Border & border) const
| Returns the size of a non-scrolling border around the outside of the scrollable.
Glib::PropertyProxy< Glib::RefPtr< Adjustment > > | property_hadjustment ()
| Horizontal Gtk::Adjustment of the scrollable widget.
Glib::PropertyProxy_ReadOnly< Glib::RefPtr< Adjustment > > | property_hadjustment () const
| Horizontal Gtk::Adjustment of the scrollable widget.
Glib::PropertyProxy< Glib::RefPtr< Adjustment > > | property_vadjustment ()
| Vertical Gtk::Adjustment of the scrollable widget.
Glib::PropertyProxy_ReadOnly< Glib::RefPtr< Adjustment > > | property_vadjustment () const
| Vertical Gtk::Adjustment of the scrollable widget.
Glib::PropertyProxy< Policy > | property_hscroll_policy ()
| Determines when horizontal scrolling should start.
Glib::PropertyProxy_ReadOnly< Policy > | property_hscroll_policy () const
| Determines when horizontal scrolling should start.
Glib::PropertyProxy< Policy > | property_vscroll_policy ()
| Determines when vertical scrolling should start.
Glib::PropertyProxy_ReadOnly< Policy > | property_vscroll_policy () const
| Determines when vertical scrolling should start.
Public Member Functions inherited from Glib::Interface
| Interface ()
| Interface (Interface &&src) noexcept
Interface & | operator= (Interface &&src) noexcept
| Interface (const Glib::Interface_Class &interface_class)
| Interface (GObject *castitem)
| ~Interface () noexcept override
| Interface (const Interface &)=delete
Interface & | operator= (const Interface &)=delete
GObject * | gobj ()
const GObject * | gobj () const
Public Member Functions inherited from Glib::ObjectBase
| ObjectBase (const ObjectBase &)=delete
ObjectBase & | operator= (const ObjectBase &)=delete
void | set_property_value (const Glib::ustring &property_name, const Glib::ValueBase &value)
void | get_property_value (const Glib::ustring &property_name, Glib::ValueBase &value) const
void | set_property (const Glib::ustring &property_name, const PropertyType &value)
void | get_property (const Glib::ustring &property_name, PropertyType &value) const
PropertyType | get_property (const Glib::ustring &property_name) const
sigc::connection | connect_property_changed (const Glib::ustring &property_name, const sigc::slot< void()> &slot)
sigc::connection | connect_property_changed (const Glib::ustring &property_name, sigc::slot< void()> &&slot)
void | freeze_notify ()
void | thaw_notify ()
virtual void | reference () const
virtual void | unreference () const
GObject * | gobj ()
const GObject * | gobj () const
GObject * | gobj_copy () const

## Static Public Member Functions
static void | add_interface (GType gtype_implementer)
static GType | get_type ()
| Get the GType for this class, for use with the underlying GObject type system.

## Protected Member Functions
| Scrollable ()
| You should derive from this class to use it.
virtual bool | get_border_vfunc (Border & border) const
Protected Member Functions inherited from Glib::ObjectBase
| ObjectBase ()
| ObjectBase (const char *custom_type_name)
| ObjectBase (const std::type_info &custom_type_info)
| ObjectBase (ObjectBase &&src) noexcept
ObjectBase & | operator= (ObjectBase &&src) noexcept
virtual | ~ObjectBase () noexcept=0
void | initialize (GObject *castitem)
void | initialize_move (GObject *castitem, Glib::ObjectBase *previous_wrapper)

## Related Symbols
(Note that these are not member symbols.)
Glib::RefPtr< Gtk::Scrollable > | wrap (GtkScrollable * object, bool take_copy=false)
| A Glib::wrap() method for this object.

## Detailed Description

This interface is implemented by widgets with native scrolling ability.

Since gtkmm 3.0

## Constructor & Destructor Documentation

## ◆ Scrollable() [1/2]

Gtk::Scrollable::Scrollable | ( |  | ) |
| protected

You should derive from this class to use it.

## ◆ Scrollable() [2/2]

Gtk::Scrollable::Scrollable | ( | Scrollable && | src | ) |
| noexcept

## ◆ ~Scrollable()

Gtk::Scrollable::~Scrollable | ( |  | ) |
| overridenoexcept

## Member Function Documentation

## ◆ add_interface()

void Gtk::Scrollable::add_interface | ( | GType | gtype_implementer | ) |
| static

## ◆ get_border()

bool Gtk::Scrollable::get_border | ( | Border & | border | ) | const

Returns the size of a non-scrolling border around the outside of the scrollable.

An example for this would be treeview headers. GTK can use this information to display overlaid graphics, like the overshoot indication, at the right position.

Parameters

  border | Return location for the results.

Returns
  true if border has been set.

## ◆ get_border_vfunc()

virtual bool Gtk::Scrollable::get_border_vfunc | ( | Border & | border | ) | const
| protectedvirtual

## ◆ get_hadjustment() [1/2]

Glib::RefPtr< Adjustment > Gtk::Scrollable::get_hadjustment | ( |  | ) |

Retrieves the Gtk::Adjustment used for horizontal scrolling.

Returns
  Horizontal Gtk::Adjustment.

## ◆ get_hadjustment() [2/2]

Glib::RefPtr< const Adjustment > Gtk::Scrollable::get_hadjustment | ( |  | ) | const

Retrieves the Gtk::Adjustment used for horizontal scrolling.

Returns
  Horizontal Gtk::Adjustment.

## ◆ get_hscroll_policy()

Policy Gtk::Scrollable::get_hscroll_policy | ( |  | ) | const

Gets the horizontal Gtk::Scrollable::Policy.

Returns
  The horizontal Gtk::Scrollable::Policy.

## ◆ get_type()

GType Gtk::Scrollable::get_type | ( |  | ) |
| static

Get the GType for this class, for use with the underlying GObject type system.

## ◆ get_vadjustment() [1/2]

Glib::RefPtr< Adjustment > Gtk::Scrollable::get_vadjustment | ( |  | ) |

Retrieves the Gtk::Adjustment used for vertical scrolling.

Returns
  Vertical Gtk::Adjustment.

## ◆ get_vadjustment() [2/2]

Glib::RefPtr< const Adjustment > Gtk::Scrollable::get_vadjustment | ( |  | ) | const

Retrieves the Gtk::Adjustment used for vertical scrolling.

Returns
  Vertical Gtk::Adjustment.

## ◆ get_vscroll_policy()

Policy Gtk::Scrollable::get_vscroll_policy | ( |  | ) | const

Gets the vertical Gtk::Scrollable::Policy.

Returns
  The vertical Gtk::Scrollable::Policy.

## ◆ gobj() [1/2]

GtkScrollable * Gtk::Scrollable::gobj | ( |  | ) |
| inline

Provides access to the underlying C GObject.

## ◆ gobj() [2/2]

const GtkScrollable * Gtk::Scrollable::gobj | ( |  | ) | const
| inline

Provides access to the underlying C GObject.

## ◆ operator=()

Scrollable & Gtk::Scrollable::operator= | ( | Scrollable && | src | ) |
| noexcept

## ◆ property_hadjustment() [1/2]

Glib::PropertyProxy< Glib::RefPtr< Adjustment > > Gtk::Scrollable::property_hadjustment | ( |  | ) |

Horizontal Gtk::Adjustment of the scrollable widget.

This adjustment is shared between the scrollable widget and its parent.

Returns
  A PropertyProxy that allows you to get or set the value of the property, or receive notification when the value of the property changes.

## ◆ property_hadjustment() [2/2]

Glib::PropertyProxy_ReadOnly< Glib::RefPtr< Adjustment > > Gtk::Scrollable::property_hadjustment | ( |  | ) | const

Horizontal Gtk::Adjustment of the scrollable widget.

This adjustment is shared between the scrollable widget and its parent.

Returns
  A PropertyProxy_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.

## ◆ property_hscroll_policy() [1/2]

Glib::PropertyProxy< Policy > Gtk::Scrollable::property_hscroll_policy | ( |  | ) |

Determines when horizontal scrolling should start.

Default value: Gtk::Scrollabel::Policy::MINIMUM

Returns
  A PropertyProxy that allows you to get or set the value of the property, or receive notification when the value of the property changes.

## ◆ property_hscroll_policy() [2/2]

Glib::PropertyProxy_ReadOnly< Policy > Gtk::Scrollable::property_hscroll_policy | ( |  | ) | const

Determines when horizontal scrolling should start.

Default value: Gtk::Scrollabel::Policy::MINIMUM

Returns
  A PropertyProxy_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.

## ◆ property_vadjustment() [1/2]

Glib::PropertyProxy< Glib::RefPtr< Adjustment > > Gtk::Scrollable::property_vadjustment | ( |  | ) |

Vertical Gtk::Adjustment of the scrollable widget.

This adjustment is shared between the scrollable widget and its parent.

Returns
  A PropertyProxy that allows you to get or set the value of the property, or receive notification when the value of the property changes.

## ◆ property_vadjustment() [2/2]

Glib::PropertyProxy_ReadOnly< Glib::RefPtr< Adjustment > > Gtk::Scrollable::property_vadjustment | ( |  | ) | const

Vertical Gtk::Adjustment of the scrollable widget.

This adjustment is shared between the scrollable widget and its parent.

Returns
  A PropertyProxy_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.

## ◆ property_vscroll_policy() [1/2]

Glib::PropertyProxy< Policy > Gtk::Scrollable::property_vscroll_policy | ( |  | ) |

Determines when vertical scrolling should start.

Default value: Gtk::Scrollabel::Policy::MINIMUM

Returns
  A PropertyProxy that allows you to get or set the value of the property, or receive notification when the value of the property changes.

## ◆ property_vscroll_policy() [2/2]

Glib::PropertyProxy_ReadOnly< Policy > Gtk::Scrollable::property_vscroll_policy | ( |  | ) | const

Determines when vertical scrolling should start.

Default value: Gtk::Scrollabel::Policy::MINIMUM

Returns
  A PropertyProxy_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.

## ◆ set_hadjustment()

void Gtk::Scrollable::set_hadjustment | ( | const Glib::RefPtr< Adjustment > & | hadjustment | ) |

Sets the horizontal adjustment of the Gtk::Scrollable.

Parameters

  hadjustment | A Gtk::Adjustment.

## ◆ set_hscroll_policy()

void Gtk::Scrollable::set_hscroll_policy | ( | Policy | policy | ) |

Sets the Gtk::Scrollable::Policy.

The policy determines whether horizontal scrolling should start below the minimum width or below the natural width.

Parameters

  policy | The horizontal Gtk::Scrollable::Policy.

## ◆ set_vadjustment()

void Gtk::Scrollable::set_vadjustment | ( | const Glib::RefPtr< Adjustment > & | vadjustment | ) |

Sets the vertical adjustment of the Gtk::Scrollable.

Parameters

  vadjustment | A Gtk::Adjustment.

## ◆ set_vscroll_policy()

void Gtk::Scrollable::set_vscroll_policy | ( | Policy | policy | ) |

Sets the Gtk::Scrollable::Policy.

The policy determines whether vertical scrolling should start below the minimum height or below the natural height.

Parameters

  policy | The vertical Gtk::Scrollable::Policy.

## ◆ unset_hadjustment()

void Gtk::Scrollable::unset_hadjustment | ( |  | ) |

This method removes the hadjustment.

See also
  set_hadjustment().

## ◆ unset_vadjustment()

void Gtk::Scrollable::unset_vadjustment | ( |  | ) |

This method removes the vadjustment.

See also
  set_vadjustment().

## Friends And Related Symbol Documentation

## ◆ wrap()

Glib::RefPtr< Gtk::Scrollable > wrap | ( | GtkScrollable * | object,
|  | bool | take_copy = false )
| related

A Glib::wrap() method for this object.

Parameters

  object | The C instance.
  take_copy | False if the result should take ownership of the C instance. True if it should take a new copy or ref.

Returns
  A C++ instance that wraps this C instance.