move_to_rect


Description:

[ Version ( since = "3.24" ) ]
public void move_to_rect (Rectangle rect, Gravity rect_anchor, Gravity window_anchor, AnchorHints anchor_hints, int rect_anchor_dx, int rect_anchor_dy)

Moves this to rect, aligning their anchor points.

rect is relative to the top-left corner of the window that this is transient for. rect_anchor and window_anchor determine anchor points on rect and this to pin together. rect's anchor point can optionally be offset by rect_anchor_dx and rect_anchor_dy, which is equivalent to offsetting the position of this.

anchor_hints determines how this will be moved if the anchor points cause it to move off-screen. For example, gdk_anchor_flip_x will replace gdk_gravity_north_west with gdk_gravity_north_east and vice versa if this extends beyond the left or right edges of the monitor.

Connect to the moved_to_rect signal to find out how it was actually positioned.

Parameters:

this

the Window to move

rect

the destination Rectangle to align this with

rect_anchor

the point on rect to align with this's anchor point

window_anchor

the point on this to align with rect's anchor point

anchor_hints

positioning hints to use when limited on space

rect_anchor_dx

horizontal offset to shift this, i.e. rect's anchor point

rect_anchor_dy

vertical offset to shift this, i.e. rect's anchor point