Copyright | Will Thompson, Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria (garetxe@gmail.com) |
Safe Haskell | None |
Language | Haskell2010 |
The AspectFrame
is useful when you want
pack a widget so that it can resize but always retains
the same aspect ratio. For instance, one might be
drawing a small preview of a larger image. AspectFrame
derives from Frame
, so it can draw a label and
a frame around the child. The frame will be
“shrink-wrapped” to the size of the child.
CSS nodes
GtkAspectFrame uses a CSS node with name frame.
- newtype AspectFrame = AspectFrame (ManagedPtr AspectFrame)
- class GObject o => IsAspectFrame o
- toAspectFrame :: IsAspectFrame o => o -> IO AspectFrame
- noAspectFrame :: Maybe AspectFrame
- aspectFrameNew :: (HasCallStack, MonadIO m) => Maybe Text -> Float -> Float -> Float -> Bool -> m AspectFrame
- data AspectFrameSetMethodInfo
- aspectFrameSet :: (HasCallStack, MonadIO m, IsAspectFrame a) => a -> Float -> Float -> Float -> Bool -> m ()
- data AspectFrameObeyChildPropertyInfo
- aspectFrameObeyChild :: AttrLabelProxy "obeyChild"
- constructAspectFrameObeyChild :: IsAspectFrame o => Bool -> IO (GValueConstruct o)
- getAspectFrameObeyChild :: (MonadIO m, IsAspectFrame o) => o -> m Bool
- setAspectFrameObeyChild :: (MonadIO m, IsAspectFrame o) => o -> Bool -> m ()
- data AspectFrameRatioPropertyInfo
- aspectFrameRatio :: AttrLabelProxy "ratio"
- constructAspectFrameRatio :: IsAspectFrame o => Float -> IO (GValueConstruct o)
- getAspectFrameRatio :: (MonadIO m, IsAspectFrame o) => o -> m Float
- setAspectFrameRatio :: (MonadIO m, IsAspectFrame o) => o -> Float -> m ()
- data AspectFrameXalignPropertyInfo
- aspectFrameXalign :: AttrLabelProxy "xalign"
- constructAspectFrameXalign :: IsAspectFrame o => Float -> IO (GValueConstruct o)
- getAspectFrameXalign :: (MonadIO m, IsAspectFrame o) => o -> m Float
- setAspectFrameXalign :: (MonadIO m, IsAspectFrame o) => o -> Float -> m ()
- data AspectFrameYalignPropertyInfo
- aspectFrameYalign :: AttrLabelProxy "yalign"
- constructAspectFrameYalign :: IsAspectFrame o => Float -> IO (GValueConstruct o)
- getAspectFrameYalign :: (MonadIO m, IsAspectFrame o) => o -> m Float
- setAspectFrameYalign :: (MonadIO m, IsAspectFrame o) => o -> Float -> m ()
Exported types
newtype AspectFrame Source #
GObject AspectFrame Source # | |
IsImplementorIface AspectFrame Source # | |
IsObject AspectFrame Source # | |
IsWidget AspectFrame Source # | |
IsFrame AspectFrame Source # | |
IsContainer AspectFrame Source # | |
IsBin AspectFrame Source # | |
IsBuildable AspectFrame Source # | |
IsAspectFrame AspectFrame Source # | |
((~) * info (ResolveAspectFrameMethod t AspectFrame), MethodInfo * info AspectFrame p) => IsLabel t (AspectFrame -> p) Source # | |
((~) * info (ResolveAspectFrameMethod t AspectFrame), MethodInfo * info AspectFrame p) => IsLabelProxy t (AspectFrame -> p) Source # | |
HasAttributeList * AspectFrame Source # | |
type AttributeList AspectFrame Source # | |
type SignalList AspectFrame Source # | |
class GObject o => IsAspectFrame o Source #
toAspectFrame :: IsAspectFrame o => o -> IO AspectFrame Source #
Methods
new
:: (HasCallStack, MonadIO m) | |
=> Maybe Text |
|
-> Float |
|
-> Float |
|
-> Float |
|
-> Bool |
|
-> m AspectFrame | Returns: the new |
Create a new AspectFrame
.
set
data AspectFrameSetMethodInfo Source #
((~) * signature (Float -> Float -> Float -> Bool -> m ()), MonadIO m, IsAspectFrame a) => MethodInfo * AspectFrameSetMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsAspectFrame a) | |
=> a |
|
-> Float |
|
-> Float |
|
-> Float |
|
-> Bool |
|
-> m () |
Set parameters for an existing AspectFrame
.
Properties
obeyChild
data AspectFrameObeyChildPropertyInfo Source #
aspectFrameObeyChild :: AttrLabelProxy "obeyChild" Source #
constructAspectFrameObeyChild :: IsAspectFrame o => Bool -> IO (GValueConstruct o) Source #
getAspectFrameObeyChild :: (MonadIO m, IsAspectFrame o) => o -> m Bool Source #
setAspectFrameObeyChild :: (MonadIO m, IsAspectFrame o) => o -> Bool -> m () Source #
ratio
data AspectFrameRatioPropertyInfo Source #
aspectFrameRatio :: AttrLabelProxy "ratio" Source #
constructAspectFrameRatio :: IsAspectFrame o => Float -> IO (GValueConstruct o) Source #
getAspectFrameRatio :: (MonadIO m, IsAspectFrame o) => o -> m Float Source #
setAspectFrameRatio :: (MonadIO m, IsAspectFrame o) => o -> Float -> m () Source #
xalign
data AspectFrameXalignPropertyInfo Source #
aspectFrameXalign :: AttrLabelProxy "xalign" Source #
constructAspectFrameXalign :: IsAspectFrame o => Float -> IO (GValueConstruct o) Source #
getAspectFrameXalign :: (MonadIO m, IsAspectFrame o) => o -> m Float Source #
setAspectFrameXalign :: (MonadIO m, IsAspectFrame o) => o -> Float -> m () Source #
yalign
data AspectFrameYalignPropertyInfo Source #
aspectFrameYalign :: AttrLabelProxy "yalign" Source #
constructAspectFrameYalign :: IsAspectFrame o => Float -> IO (GValueConstruct o) Source #
getAspectFrameYalign :: (MonadIO m, IsAspectFrame o) => o -> m Float Source #
setAspectFrameYalign :: (MonadIO m, IsAspectFrame o) => o -> Float -> m () Source #