Class: Gtk::LayoutManager

Inherits:
Object
  • Object
show all
Defined in:
(unknown)

Overview

The GtkLayoutManagerClass structure contains only private data, and
should only be accessed through the provided API, or when subclassing
GtkLayoutManager.

Instance Method Summary collapse

Instance Method Details

#allocate(widget, width, height, baseline) ⇒ nil

Assigns the given width, height, and baseline to
a widget, and computes the position and sizes of the children of
the widget using the layout management policy of manager.

Parameters:

  • widget (Gtk::Widget)

    the GtkWidget using manager

  • width (Integer)

    the new width of the widget

  • height (Integer)

    the new height of the widget

  • baseline (Integer)

    the baseline position of the widget, or -1

Returns:

  • (nil)

#get_layout_child(child) ⇒ Gtk::LayoutChild

Retrieves a GtkLayoutChild instance for the GtkLayoutManager,
creating one if necessary.

The child widget must be a child of the widget using manager.

The GtkLayoutChild instance is owned by the GtkLayoutManager,
and is guaranteed to exist as long as child is a child of the
GtkWidget using the given GtkLayoutManager.

Parameters:

Returns:

#layout_changednil

Queues a resize on the GtkWidget using manager, if any.

This function should be called by subclasses of GtkLayoutManager
in response to changes to their layout management policies.

Returns:

  • (nil)

#measure(widget, orientation, for_size, minimum, natural, minimum_baseline, natural_baseline) ⇒ nil

Measures the size of the widget using manager, for the
given orientation and size.

See the [classGtk.Widget] documentation on layout management for
more details.

Parameters:

  • widget (Gtk::Widget)

    the GtkWidget using manager

  • orientation (Gtk::Orientation)

    the orientation to measure

  • for_size (Integer)

    Size for the opposite of orientation; for instance, if
    the orientation is %GTK_ORIENTATION_HORIZONTAL, this is the height
    of the widget; if the orientation is %GTK_ORIENTATION_VERTICAL, this
    is the width of the widget. This allows to measure the height for the
    given width, and the width for the given height. Use -1 if the size
    is not known

  • minimum (Integer)

    the minimum size for the given size and
    orientation

  • natural (Integer)

    the natural, or preferred size for the
    given size and orientation

  • minimum_baseline (Integer)

    the baseline position for the
    minimum size

  • natural_baseline (Integer)

    the baseline position for the
    natural size

Returns:

  • (nil)

#request_modeGtk::SizeRequestMode

Retrieves the request mode of manager.

Returns:

#widgetGtk::Widget

Retrieves the GtkWidget using the given GtkLayoutManager.

Returns: