Trait gdk4::prelude::PopupExt [−][src]
pub trait PopupExt: 'static {
fn is_autohide(&self) -> bool;
fn parent(&self) -> Option<Surface>;
fn position_x(&self) -> i32;
fn position_y(&self) -> i32;
fn rect_anchor(&self) -> Gravity;
fn surface_anchor(&self) -> Gravity;
fn present(&self, width: i32, height: i32, layout: &PopupLayout) -> bool;
}
Expand description
Required methods
fn is_autohide(&self) -> bool
fn is_autohide(&self) -> bool
fn position_x(&self) -> i32
fn position_x(&self) -> i32
fn position_y(&self) -> i32
fn position_y(&self) -> i32
fn rect_anchor(&self) -> Gravity
fn rect_anchor(&self) -> Gravity
fn surface_anchor(&self) -> Gravity
fn surface_anchor(&self) -> Gravity
Present self
after having processed the PopupLayout
rules.
If the popup was previously now showing, it will be showed,
otherwise it will change position according to layout
.
After calling this function, the result should be handled in response
to the signal::GdkSurface::layout
signal being emitted. The resulting
popup position can be queried using position_x()
,
position_y()
, and the resulting size will be sent as
parameters in the layout signal. Use rect_anchor()
and surface_anchor()
to get the resulting anchors.
Presenting may fail, for example if the self
is set to autohide
and is immediately hidden upon being presented. If presenting failed,
the signal::Surface::layout
signal will not me emitted.
width
the unconstrained popup width to layout
height
the unconstrained popup height to layout
layout
the PopupLayout
object used to layout