SourceEnum PopupAnchor
from egui import PopupAnchorPopupAnchor.Pointer
PopupAnchor.PointerFixedWhat should we anchor the popup to?
The final position for the popup will be calculated based on RectAlign
and can be customized with Popup.align and Popup.align_alternatives.
PopupAnchor is the parent rect of RectAlign.
For PopupAnchor.Pointer, PopupAnchor.PointerFixed and PopupAnchor.Position,
the rect will be derived via Rect.from_pos (so a zero-sized rect at the given position).
The rect should be in global coordinates. PopupAnchor.from(&response) will automatically
do this conversion.
Variants§
PopupAnchor.Pointer Enum value§
PopupAnchor.PointerFixed Enum value§
Methods§
@staticmethod
def ParentRect(rect: Rect) -> PopupAnchor§
@staticmethod
def Position(pos: Pos2) -> PopupAnchor§
Sourcedef rect(self, /, popup_id: Id, ctx: Context) -> Rect |None§
Get the rect the popup should be shown relative to.
Returns Rect.from_pos for PopupAnchor.Pointer, PopupAnchor.PointerFixed
and PopupAnchor.Position (so the rect will be zero-sized).