gtkmm  4.4.0
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Related Functions | 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:
Inheritance graph
[legend]

Public Types

enum  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
 
Scrollableoperator= (Scrollable&& src) noexcept
 
 ~Scrollable () noexcept override
 
GtkScrollable* gobj ()
 Provides access to the underlying C GObject. More...
 
const GtkScrollable* gobj () const
 Provides access to the underlying C GObject. More...
 
Glib::RefPtr< Adjustmentget_hadjustment ()
 Retrieves the GtkAdjustment used for horizontal scrolling. More...
 
Glib::RefPtr< const Adjustmentget_hadjustment () const
 Retrieves the GtkAdjustment used for horizontal scrolling. More...
 
void set_hadjustment (const Glib::RefPtr< Adjustment >& hadjustment)
 Sets the horizontal adjustment of the GtkScrollable. More...
 
void unset_hadjustment ()
 This method removes the hadjustment. More...
 
Glib::RefPtr< Adjustmentget_vadjustment ()
 Retrieves the GtkAdjustment used for vertical scrolling. More...
 
Glib::RefPtr< const Adjustmentget_vadjustment () const
 Retrieves the GtkAdjustment used for vertical scrolling. More...
 
void set_vadjustment (const Glib::RefPtr< Adjustment >& vadjustment)
 Sets the vertical adjustment of the GtkScrollable. More...
 
void unset_vadjustment ()
 This method removes the vadjustment. More...
 
Policy get_hscroll_policy () const
 Gets the horizontal GtkScrollablePolicy. More...
 
void set_hscroll_policy (Policy policy)
 Sets the GtkScrollablePolicy. More...
 
Policy get_vscroll_policy () const
 Gets the vertical GtkScrollablePolicy. More...
 
void set_vscroll_policy (Policy policy)
 Sets the GtkScrollablePolicy. More...
 
bool get_border (Border& border) const
 Returns the size of a non-scrolling border around the outside of the scrollable. More...
 
Glib::PropertyProxy< Glib::RefPtr< Adjustment > > property_hadjustment ()
 Horizontal GtkAdjustment of the scrollable widget. More...
 
Glib::PropertyProxy_ReadOnly< Glib::RefPtr< Adjustment > > property_hadjustment () const
 Horizontal GtkAdjustment of the scrollable widget. More...
 
Glib::PropertyProxy< Glib::RefPtr< Adjustment > > property_vadjustment ()
 Vertical GtkAdjustment of the scrollable widget. More...
 
Glib::PropertyProxy_ReadOnly< Glib::RefPtr< Adjustment > > property_vadjustment () const
 Vertical GtkAdjustment of the scrollable widget. More...
 
Glib::PropertyProxy< Policyproperty_hscroll_policy ()
 Determines when horizontal scrolling should start. More...
 
Glib::PropertyProxy_ReadOnly< Policyproperty_hscroll_policy () const
 Determines when horizontal scrolling should start. More...
 
Glib::PropertyProxy< Policyproperty_vscroll_policy ()
 Determines when vertical scrolling should start. More...
 
Glib::PropertyProxy_ReadOnly< Policyproperty_vscroll_policy () const
 Determines when vertical scrolling should start. More...
 

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. More...
 

Protected Member Functions

 Scrollable ()
 You should derive from this class to use it. More...
 
virtual bool get_border_vfunc (Border& border) const
 

Related Functions

(Note that these are not member functions.)

Glib::RefPtr< Gtk::Scrollablewrap (GtkScrollable* object, bool take_copy=false)
 A Glib::wrap() method for this object. More...
 

Detailed Description

This interface is implemented by widgets with native scrolling ability.

Since gtkmm 3.0:

Constructor & Destructor Documentation

Gtk::Scrollable::Scrollable ( )
protected

You should derive from this class to use it.

Gtk::Scrollable::Scrollable ( Scrollable&&  src)
noexcept
Gtk::Scrollable::~Scrollable ( )
overridenoexcept

Member Function Documentation

static void Gtk::Scrollable::add_interface ( GType  gtype_implementer)
static
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
borderReturn location for the results.
Returns
true if border has been set.
virtual bool Gtk::Scrollable::get_border_vfunc ( Border border) const
protectedvirtual
Glib::RefPtr<Adjustment> Gtk::Scrollable::get_hadjustment ( )

Retrieves the GtkAdjustment used for horizontal scrolling.

Returns
Horizontal GtkAdjustment.
Glib::RefPtr<const Adjustment> Gtk::Scrollable::get_hadjustment ( ) const

Retrieves the GtkAdjustment used for horizontal scrolling.

Returns
Horizontal GtkAdjustment.
Policy Gtk::Scrollable::get_hscroll_policy ( ) const

Gets the horizontal GtkScrollablePolicy.

Returns
The horizontal GtkScrollablePolicy.
static GType Gtk::Scrollable::get_type ( )
static

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

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

Retrieves the GtkAdjustment used for vertical scrolling.

Returns
Vertical GtkAdjustment.
Glib::RefPtr<const Adjustment> Gtk::Scrollable::get_vadjustment ( ) const

Retrieves the GtkAdjustment used for vertical scrolling.

Returns
Vertical GtkAdjustment.
Policy Gtk::Scrollable::get_vscroll_policy ( ) const

Gets the vertical GtkScrollablePolicy.

Returns
The vertical GtkScrollablePolicy.
GtkScrollable* Gtk::Scrollable::gobj ( )
inline

Provides access to the underlying C GObject.

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

Provides access to the underlying C GObject.

Scrollable& Gtk::Scrollable::operator= ( Scrollable&&  src)
noexcept
Glib::PropertyProxy< Glib::RefPtr<Adjustment> > Gtk::Scrollable::property_hadjustment ( )

Horizontal GtkAdjustment 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.
Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Adjustment> > Gtk::Scrollable::property_hadjustment ( ) const

Horizontal GtkAdjustment 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.
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.
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.
Glib::PropertyProxy< Glib::RefPtr<Adjustment> > Gtk::Scrollable::property_vadjustment ( )

Vertical GtkAdjustment 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.
Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Adjustment> > Gtk::Scrollable::property_vadjustment ( ) const

Vertical GtkAdjustment 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.
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.
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.
void Gtk::Scrollable::set_hadjustment ( const Glib::RefPtr< Adjustment >&  hadjustment)

Sets the horizontal adjustment of the GtkScrollable.

Parameters
hadjustmentA GtkAdjustment.
void Gtk::Scrollable::set_hscroll_policy ( Policy  policy)

Sets the GtkScrollablePolicy.

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

Parameters
policyThe horizontal GtkScrollablePolicy.
void Gtk::Scrollable::set_vadjustment ( const Glib::RefPtr< Adjustment >&  vadjustment)

Sets the vertical adjustment of the GtkScrollable.

Parameters
vadjustmentA GtkAdjustment.
void Gtk::Scrollable::set_vscroll_policy ( Policy  policy)

Sets the GtkScrollablePolicy.

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

Parameters
policyThe vertical GtkScrollablePolicy.
void Gtk::Scrollable::unset_hadjustment ( )

This method removes the hadjustment.

See also
set_hadjustment().
void Gtk::Scrollable::unset_vadjustment ( )

This method removes the vadjustment.

See also
set_vadjustment().

Friends And Related Function Documentation

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

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

Parameters
objectThe C instance.
take_copyFalse 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.