CustomLayout

GtkCustomLayout uses closures for size negotiation.

A GtkCustomLayout uses closures matching to the old GtkWidget virtual functions for size negotiation, as a convenience API to ease the porting towards the corresponding `GtkLayoutManager virtual functions.

Constructors

this
this(GtkCustomLayout* gtkCustomLayout, bool ownedRef)

Sets our main struct and passes it to the parent class.

this
this(GtkCustomRequestModeFunc requestMode, GtkCustomMeasureFunc measure, GtkCustomAllocateFunc allocate)

Creates a new legacy layout manager.

Members

Functions

getCustomLayoutStruct
GtkCustomLayout* getCustomLayoutStruct(bool transferOwnership)

Get the main Gtk struct

getStruct
void* getStruct()

the main Gtk struct as a void*

Static functions

getType
GType getType()

Variables

gtkCustomLayout
GtkCustomLayout* gtkCustomLayout;

the main Gtk struct

Inherited Members

From LayoutManager

gtkLayoutManager
GtkLayoutManager* gtkLayoutManager;

the main Gtk struct

getLayoutManagerStruct
GtkLayoutManager* getLayoutManagerStruct(bool transferOwnership)

Get the main Gtk struct

getStruct
void* getStruct()

the main Gtk struct as a void*

getType
GType getType()
allocate
void allocate(Widget widget, int width, int height, int baseline)

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.

getLayoutChild
LayoutChild getLayoutChild(Widget child)

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

getRequestMode
GtkSizeRequestMode getRequestMode()

Retrieves the request mode of @manager.

getWidget
Widget getWidget()

Retrieves the GtkWidget using the given GtkLayoutManager.

layoutChanged
void layoutChanged()

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

measure
void measure(Widget widget, GtkOrientation orientation, int forSize, int minimum, int natural, int minimumBaseline, int naturalBaseline)

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

Meta