Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | None |
Language | Haskell2010 |
A Popup
is a surface that is attached to another surface,
and is positioned relative to it.
Synopsis
- newtype Popup = Popup (ManagedPtr Popup)
- class (GObject o, IsDescendantOf Popup o) => IsPopup o
- toPopup :: (MonadIO m, IsPopup o) => o -> m Popup
- popupGetAutohide :: (HasCallStack, MonadIO m, IsPopup a) => a -> m Bool
- popupGetParent :: (HasCallStack, MonadIO m, IsPopup a) => a -> m Surface
- popupGetPositionX :: (HasCallStack, MonadIO m, IsPopup a) => a -> m Int32
- popupGetPositionY :: (HasCallStack, MonadIO m, IsPopup a) => a -> m Int32
- popupGetRectAnchor :: (HasCallStack, MonadIO m, IsPopup a) => a -> m Gravity
- popupGetSurfaceAnchor :: (HasCallStack, MonadIO m, IsPopup a) => a -> m Gravity
- popupPresent :: (HasCallStack, MonadIO m, IsPopup a) => a -> Int32 -> Int32 -> PopupLayout -> m Bool
- constructPopupAutohide :: (IsPopup o, MonadIO m) => Bool -> m (GValueConstruct o)
- getPopupAutohide :: (MonadIO m, IsPopup o) => o -> m Bool
- constructPopupParent :: (IsPopup o, MonadIO m, IsSurface a) => a -> m (GValueConstruct o)
- getPopupParent :: (MonadIO m, IsPopup o) => o -> m Surface
Exported types
Memory-managed wrapper type.
Instances
Eq Popup Source # | |
IsGValue Popup Source # | Convert |
ManagedPtrNewtype Popup Source # | |
Defined in GI.Gdk.Interfaces.Popup toManagedPtr :: Popup -> ManagedPtr Popup # | |
TypedObject Popup Source # | |
Defined in GI.Gdk.Interfaces.Popup | |
GObject Popup Source # | |
Defined in GI.Gdk.Interfaces.Popup | |
HasParentTypes Popup Source # | |
Defined in GI.Gdk.Interfaces.Popup | |
type ParentTypes Popup Source # | |
Defined in GI.Gdk.Interfaces.Popup |
class (GObject o, IsDescendantOf Popup o) => IsPopup o Source #
Instances
(GObject o, IsDescendantOf Popup o) => IsPopup o Source # | |
Defined in GI.Gdk.Interfaces.Popup |
Methods
Overloaded methods
getAutohide
:: (HasCallStack, MonadIO m, IsPopup a) | |
=> a |
|
-> m Bool | Returns: |
Returns whether this popup is set to hide on outside clicks.
getParent
:: (HasCallStack, MonadIO m, IsPopup a) | |
=> a |
|
-> m Surface | Returns: the parent surface |
Returns the parent surface of a popup.
getPositionX
:: (HasCallStack, MonadIO m, IsPopup a) | |
=> a |
|
-> m Int32 | Returns: the X coordinate of |
Obtains the position of the popup relative to its parent.
getPositionY
:: (HasCallStack, MonadIO m, IsPopup a) | |
=> a |
|
-> m Int32 | Returns: the Y coordinate of |
Obtains the position of the popup relative to its parent.
getRectAnchor
:: (HasCallStack, MonadIO m, IsPopup a) | |
=> a |
|
-> m Gravity | Returns: the current rectangle anchor value of |
Gets the current popup rectangle anchor.
The value returned may change after calling popupPresent
,
or after the "popup-layout-changed" is emitted.
getSurfaceAnchor
popupGetSurfaceAnchor Source #
:: (HasCallStack, MonadIO m, IsPopup a) | |
=> a |
|
-> m Gravity | Returns: the current surface anchor value of |
Gets the current popup surface anchor.
The value returned may change after calling popupPresent
,
or after the "popup-layout-changed" is emitted.
present
:: (HasCallStack, MonadIO m, IsPopup a) | |
=> a |
|
-> Int32 |
|
-> Int32 |
|
-> PopupLayout |
|
-> m Bool | Returns: |
Present popup
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 of the layout can be queried
using popupGetPositionX
, popupGetPositionY
,
surfaceGetWidth
, surfaceGetHeight
,
popupGetRectAnchor
and popupGetSurfaceAnchor
.
Presenting may have fail, for example if it was immediately
hidden if the popup
was set to autohide.
Properties
autohide
No description available in the introspection data.
constructPopupAutohide :: (IsPopup o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “autohide
” property. This is rarely needed directly, but it is used by new
.
getPopupAutohide :: (MonadIO m, IsPopup o) => o -> m Bool Source #
Get the value of the “autohide
” property.
When overloading is enabled, this is equivalent to
get
popup #autohide
parent
No description available in the introspection data.
constructPopupParent :: (IsPopup o, MonadIO m, IsSurface a) => a -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “parent
” property. This is rarely needed directly, but it is used by new
.
getPopupParent :: (MonadIO m, IsPopup o) => o -> m Surface Source #
Get the value of the “parent
” property.
When overloading is enabled, this is equivalent to
get
popup #parent