PopupLayout.this

Create a popup layout description.

Used together with [method@Gdk.Popup.present] to describe how a popup surface should be placed and behave on-screen.

@anchor_rect is relative to the top-left corner of the surface's parent. @rect_anchor and @surface_anchor determine anchor points on @anchor_rect and surface to pin together.

The position of @anchor_rect's anchor point can optionally be offset using [method@Gdk.PopupLayout.set_offset], which is equivalent to offsetting the position of surface.

  1. this(GdkPopupLayout* gdkPopupLayout, bool ownedRef)
  2. this(GdkRectangle* anchorRect, GdkGravity rectAnchor, GdkGravity surfaceAnchor)

Parameters

anchorRect GdkRectangle*

the anchor GdkRectangle to align @surface with

rectAnchor GdkGravity

the point on @anchor_rect to align with @surface's anchor point

surfaceAnchor GdkGravity

the point on @surface to align with @rect's anchor point

Return Value

newly created instance of GdkPopupLayout

Throws

ConstructionException GTK+ fails to create the object.

Meta