Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
The Misc
widget is an abstract widget which is not useful itself, but
is used to derive subclasses which have alignment and padding attributes.
The horizontal and vertical padding attributes allows extra space to be added around the widget.
The horizontal and vertical alignment attributes enable the widget to be positioned within its allocated area. Note that if the widget is added to a container in such a way that it expands automatically to fill its allocated area, the alignment settings will not alter the widget's position.
Note that the desired effect can in most cases be achieved by using the
Widget:halign, Widget:valign and Widget:margin properties
on the child widget, so GtkMisc should not be used in new code. To reflect
this fact, all Misc
API has been deprecated.
Synopsis
- newtype Misc = Misc (ManagedPtr Misc)
- class (GObject o, IsDescendantOf Misc o) => IsMisc o
- toMisc :: (MonadIO m, IsMisc o) => o -> m Misc
- miscGetAlignment :: (HasCallStack, MonadIO m, IsMisc a) => a -> m (Float, Float)
- miscGetPadding :: (HasCallStack, MonadIO m, IsMisc a) => a -> m (Int32, Int32)
- miscSetAlignment :: (HasCallStack, MonadIO m, IsMisc a) => a -> Float -> Float -> m ()
- miscSetPadding :: (HasCallStack, MonadIO m, IsMisc a) => a -> Int32 -> Int32 -> m ()
- constructMiscXalign :: (IsMisc o, MonadIO m) => Float -> m (GValueConstruct o)
- getMiscXalign :: (MonadIO m, IsMisc o) => o -> m Float
- setMiscXalign :: (MonadIO m, IsMisc o) => o -> Float -> m ()
- constructMiscXpad :: (IsMisc o, MonadIO m) => Int32 -> m (GValueConstruct o)
- getMiscXpad :: (MonadIO m, IsMisc o) => o -> m Int32
- setMiscXpad :: (MonadIO m, IsMisc o) => o -> Int32 -> m ()
- constructMiscYalign :: (IsMisc o, MonadIO m) => Float -> m (GValueConstruct o)
- getMiscYalign :: (MonadIO m, IsMisc o) => o -> m Float
- setMiscYalign :: (MonadIO m, IsMisc o) => o -> Float -> m ()
- constructMiscYpad :: (IsMisc o, MonadIO m) => Int32 -> m (GValueConstruct o)
- getMiscYpad :: (MonadIO m, IsMisc o) => o -> m Int32
- setMiscYpad :: (MonadIO m, IsMisc o) => o -> Int32 -> m ()
Exported types
Memory-managed wrapper type.
Instances
Eq Misc Source # | |
GObject Misc Source # | |
Defined in GI.Gtk.Objects.Misc | |
ManagedPtrNewtype Misc Source # | |
Defined in GI.Gtk.Objects.Misc toManagedPtr :: Misc -> ManagedPtr Misc | |
TypedObject Misc Source # | |
Defined in GI.Gtk.Objects.Misc | |
HasParentTypes Misc Source # | |
Defined in GI.Gtk.Objects.Misc | |
IsGValue (Maybe Misc) Source # | Convert |
Defined in GI.Gtk.Objects.Misc gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe Misc -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe Misc) | |
type ParentTypes Misc Source # | |
Defined in GI.Gtk.Objects.Misc |
class (GObject o, IsDescendantOf Misc o) => IsMisc o Source #
Instances
(GObject o, IsDescendantOf Misc o) => IsMisc o Source # | |
Defined in GI.Gtk.Objects.Misc |
Methods
Click to display all available methods, including inherited ones
Methods
activate, addAccelerator, addChild, addDeviceEvents, addEvents, addMnemonicLabel, addTickCallback, bindProperty, bindPropertyFull, canActivateAccel, childFocus, childNotify, classPath, computeExpand, constructChild, createPangoContext, createPangoLayout, customFinished, customTagEnd, customTagStart, destroy, destroyed, deviceIsShadowed, dragBegin, dragBeginWithCoordinates, dragCheckThreshold, dragDestAddImageTargets, dragDestAddTextTargets, dragDestAddUriTargets, dragDestFindTarget, dragDestGetTargetList, dragDestGetTrackMotion, dragDestSet, dragDestSetProxy, dragDestSetTargetList, dragDestSetTrackMotion, dragDestUnset, dragGetData, dragHighlight, dragSourceAddImageTargets, dragSourceAddTextTargets, dragSourceAddUriTargets, dragSourceGetTargetList, dragSourceSet, dragSourceSetIconGicon, dragSourceSetIconName, dragSourceSetIconPixbuf, dragSourceSetIconStock, dragSourceSetTargetList, dragSourceUnset, dragUnhighlight, draw, ensureStyle, errorBell, event, forceFloating, freezeChildNotify, freezeNotify, getv, grabAdd, grabDefault, grabFocus, grabRemove, hasDefault, hasFocus, hasGrab, hasRcStyle, hasScreen, hasVisibleFocus, hide, hideOnDelete, inDestruction, initTemplate, inputShapeCombineRegion, insertActionGroup, intersect, isAncestor, isComposited, isDrawable, isFloating, isFocus, isSensitive, isToplevel, isVisible, keynavFailed, listAccelClosures, listActionPrefixes, listMnemonicLabels, map, mnemonicActivate, modifyBase, modifyBg, modifyCursor, modifyFg, modifyFont, modifyStyle, modifyText, notify, notifyByPspec, overrideBackgroundColor, overrideColor, overrideCursor, overrideFont, overrideSymbolicColor, parserFinished, path, queueAllocate, queueComputeExpand, queueDraw, queueDrawArea, queueDrawRegion, queueResize, queueResizeNoRedraw, realize, ref, refSink, regionIntersect, registerWindow, removeAccelerator, removeMnemonicLabel, removeTickCallback, renderIcon, renderIconPixbuf, reparent, resetRcStyles, resetStyle, runDispose, sendExpose, sendFocusChange, shapeCombineRegion, show, showAll, showNow, sizeAllocate, sizeAllocateWithBaseline, sizeRequest, stealData, stealQdata, styleAttach, styleGetProperty, thawChildNotify, thawNotify, translateCoordinates, triggerTooltipQuery, unmap, unparent, unrealize, unref, unregisterWindow, unsetStateFlags, watchClosure.
Getters
getAccessible, getActionGroup, getAlignment, getAllocatedBaseline, getAllocatedHeight, getAllocatedSize, getAllocatedWidth, getAllocation, getAncestor, getAppPaintable, getCanDefault, getCanFocus, getChildRequisition, getChildVisible, getClip, getClipboard, getCompositeName, getData, getDeviceEnabled, getDeviceEvents, getDirection, getDisplay, getDoubleBuffered, getEvents, getFocusOnClick, getFontMap, getFontOptions, getFrameClock, getHalign, getHasTooltip, getHasWindow, getHexpand, getHexpandSet, getInternalChild, getMapped, getMarginBottom, getMarginEnd, getMarginLeft, getMarginRight, getMarginStart, getMarginTop, getModifierMask, getModifierStyle, getName, getNoShowAll, getOpacity, getPadding, getPangoContext, getParent, getParentWindow, getPath, getPointer, getPreferredHeight, getPreferredHeightAndBaselineForWidth, getPreferredHeightForWidth, getPreferredSize, getPreferredWidth, getPreferredWidthForHeight, getProperty, getQdata, getRealized, getReceivesDefault, getRequestMode, getRequisition, getRootWindow, getScaleFactor, getScreen, getSensitive, getSettings, getSizeRequest, getState, getStateFlags, getStyle, getStyleContext, getSupportMultidevice, getTemplateChild, getTooltipMarkup, getTooltipText, getTooltipWindow, getToplevel, getValign, getValignWithBaseline, getVexpand, getVexpandSet, getVisible, getVisual, getWindow.
Setters
setAccelPath, setAlignment, setAllocation, setAppPaintable, setBuildableProperty, setCanDefault, setCanFocus, setChildVisible, setClip, setCompositeName, setData, setDataFull, setDeviceEnabled, setDeviceEvents, setDirection, setDoubleBuffered, setEvents, setFocusOnClick, setFontMap, setFontOptions, setHalign, setHasTooltip, setHasWindow, setHexpand, setHexpandSet, setMapped, setMarginBottom, setMarginEnd, setMarginLeft, setMarginRight, setMarginStart, setMarginTop, setName, setNoShowAll, setOpacity, setPadding, setParent, setParentWindow, setProperty, setRealized, setReceivesDefault, setRedrawOnAllocate, setSensitive, setSizeRequest, setState, setStateFlags, setStyle, setSupportMultidevice, setTooltipMarkup, setTooltipText, setTooltipWindow, setValign, setVexpand, setVexpandSet, setVisible, setVisual, setWindow.
getAlignment
Deprecated: (Since version 3.14)Use Widget
alignment and margin properties.
Gets the X and Y alignment of the widget within its allocation.
See miscSetAlignment
.
getPadding
Deprecated: (Since version 3.14)Use Widget
alignment and margin properties.
Gets the padding in the X and Y directions of the widget.
See miscSetPadding
.
setAlignment
:: (HasCallStack, MonadIO m, IsMisc a) | |
=> a |
|
-> Float |
|
-> Float |
|
-> m () |
Deprecated: (Since version 3.14)Use Widget
's alignment (Widget:halign and Widget:valign) and margin properties or Label
's Label:xalign and Label:yalign properties.
Sets the alignment of the widget.
setPadding
:: (HasCallStack, MonadIO m, IsMisc a) | |
=> a |
|
-> Int32 |
|
-> Int32 |
|
-> m () |
Deprecated: (Since version 3.14)Use Widget
alignment and margin properties.
Sets the amount of space to add around the widget.
Properties
xalign
The horizontal alignment. A value of 0.0 means left alignment (or right on RTL locales); a value of 1.0 means right alignment (or left on RTL locales).
constructMiscXalign :: (IsMisc o, MonadIO m) => Float -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “xalign
” property. This is rarely needed directly, but it is used by new
.
getMiscXalign :: (MonadIO m, IsMisc o) => o -> m Float Source #
Get the value of the “xalign
” property.
When overloading is enabled, this is equivalent to
get
misc #xalign
setMiscXalign :: (MonadIO m, IsMisc o) => o -> Float -> m () Source #
Set the value of the “xalign
” property.
When overloading is enabled, this is equivalent to
set
misc [ #xalign:=
value ]
xpad
The amount of space to add on the left and right of the widget, in pixels.
constructMiscXpad :: (IsMisc o, MonadIO m) => Int32 -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “xpad
” property. This is rarely needed directly, but it is used by new
.
getMiscXpad :: (MonadIO m, IsMisc o) => o -> m Int32 Source #
Get the value of the “xpad
” property.
When overloading is enabled, this is equivalent to
get
misc #xpad
setMiscXpad :: (MonadIO m, IsMisc o) => o -> Int32 -> m () Source #
Set the value of the “xpad
” property.
When overloading is enabled, this is equivalent to
set
misc [ #xpad:=
value ]
yalign
The vertical alignment. A value of 0.0 means top alignment; a value of 1.0 means bottom alignment.
constructMiscYalign :: (IsMisc o, MonadIO m) => Float -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “yalign
” property. This is rarely needed directly, but it is used by new
.
getMiscYalign :: (MonadIO m, IsMisc o) => o -> m Float Source #
Get the value of the “yalign
” property.
When overloading is enabled, this is equivalent to
get
misc #yalign
setMiscYalign :: (MonadIO m, IsMisc o) => o -> Float -> m () Source #
Set the value of the “yalign
” property.
When overloading is enabled, this is equivalent to
set
misc [ #yalign:=
value ]
ypad
The amount of space to add on the top and bottom of the widget, in pixels.
constructMiscYpad :: (IsMisc o, MonadIO m) => Int32 -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “ypad
” property. This is rarely needed directly, but it is used by new
.
getMiscYpad :: (MonadIO m, IsMisc o) => o -> m Int32 Source #
Get the value of the “ypad
” property.
When overloading is enabled, this is equivalent to
get
misc #ypad
setMiscYpad :: (MonadIO m, IsMisc o) => o -> Int32 -> m () Source #
Set the value of the “ypad
” property.
When overloading is enabled, this is equivalent to
set
misc [ #ypad:=
value ]