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 HandleBox
widget allows a portion of a window to be "torn
off". It is a bin widget which displays its child and a handle that
the user can drag to tear off a separate window (the “float
window”) containing the child widget. A thin
“ghost” is drawn in the original location of the
handlebox. By dragging the separate window back to its original
location, it can be reattached.
When reattaching, the ghost and float window, must be aligned along one of the edges, the “snap edge”. This either can be specified by the application programmer explicitly, or GTK+ will pick a reasonable default based on the handle position.
To make detaching and reattaching the handlebox as minimally confusing
as possible to the user, it is important to set the snap edge so that
the snap edge does not move when the handlebox is deattached. For
instance, if the handlebox is packed at the bottom of a VBox, then
when the handlebox is detached, the bottom edge of the handlebox's
allocation will remain fixed as the height of the handlebox shrinks,
so the snap edge should be set to PositionTypeBottom
.
'GI.Gtk.Objects.HandleBox.HandleBox' has been deprecated. It is very specialized, lacks features to make it useful and most importantly does not fit well into modern application design. Do not use it. There is no replacement.
- newtype HandleBox = HandleBox (ManagedPtr HandleBox)
- class GObject o => IsHandleBox o
- toHandleBox :: IsHandleBox o => o -> IO HandleBox
- noHandleBox :: Maybe HandleBox
- data HandleBoxGetChildDetachedMethodInfo
- handleBoxGetChildDetached :: (HasCallStack, MonadIO m, IsHandleBox a) => a -> m Bool
- data HandleBoxGetHandlePositionMethodInfo
- handleBoxGetHandlePosition :: (HasCallStack, MonadIO m, IsHandleBox a) => a -> m PositionType
- data HandleBoxGetShadowTypeMethodInfo
- handleBoxGetShadowType :: (HasCallStack, MonadIO m, IsHandleBox a) => a -> m ShadowType
- data HandleBoxGetSnapEdgeMethodInfo
- handleBoxGetSnapEdge :: (HasCallStack, MonadIO m, IsHandleBox a) => a -> m PositionType
- handleBoxNew :: (HasCallStack, MonadIO m) => m HandleBox
- data HandleBoxSetHandlePositionMethodInfo
- handleBoxSetHandlePosition :: (HasCallStack, MonadIO m, IsHandleBox a) => a -> PositionType -> m ()
- data HandleBoxSetShadowTypeMethodInfo
- handleBoxSetShadowType :: (HasCallStack, MonadIO m, IsHandleBox a) => a -> ShadowType -> m ()
- data HandleBoxSetSnapEdgeMethodInfo
- handleBoxSetSnapEdge :: (HasCallStack, MonadIO m, IsHandleBox a) => a -> PositionType -> m ()
- data HandleBoxChildDetachedPropertyInfo
- getHandleBoxChildDetached :: (MonadIO m, IsHandleBox o) => o -> m Bool
- handleBoxChildDetached :: AttrLabelProxy "childDetached"
- data HandleBoxHandlePositionPropertyInfo
- constructHandleBoxHandlePosition :: IsHandleBox o => PositionType -> IO (GValueConstruct o)
- getHandleBoxHandlePosition :: (MonadIO m, IsHandleBox o) => o -> m PositionType
- handleBoxHandlePosition :: AttrLabelProxy "handlePosition"
- setHandleBoxHandlePosition :: (MonadIO m, IsHandleBox o) => o -> PositionType -> m ()
- data HandleBoxShadowTypePropertyInfo
- constructHandleBoxShadowType :: IsHandleBox o => ShadowType -> IO (GValueConstruct o)
- getHandleBoxShadowType :: (MonadIO m, IsHandleBox o) => o -> m ShadowType
- handleBoxShadowType :: AttrLabelProxy "shadowType"
- setHandleBoxShadowType :: (MonadIO m, IsHandleBox o) => o -> ShadowType -> m ()
- data HandleBoxSnapEdgePropertyInfo
- constructHandleBoxSnapEdge :: IsHandleBox o => PositionType -> IO (GValueConstruct o)
- getHandleBoxSnapEdge :: (MonadIO m, IsHandleBox o) => o -> m PositionType
- handleBoxSnapEdge :: AttrLabelProxy "snapEdge"
- setHandleBoxSnapEdge :: (MonadIO m, IsHandleBox o) => o -> PositionType -> m ()
- data HandleBoxSnapEdgeSetPropertyInfo
- constructHandleBoxSnapEdgeSet :: IsHandleBox o => Bool -> IO (GValueConstruct o)
- getHandleBoxSnapEdgeSet :: (MonadIO m, IsHandleBox o) => o -> m Bool
- handleBoxSnapEdgeSet :: AttrLabelProxy "snapEdgeSet"
- setHandleBoxSnapEdgeSet :: (MonadIO m, IsHandleBox o) => o -> Bool -> m ()
- type C_HandleBoxChildAttachedCallback = Ptr () -> Ptr Widget -> Ptr () -> IO ()
- type HandleBoxChildAttachedCallback = Widget -> IO ()
- data HandleBoxChildAttachedSignalInfo
- afterHandleBoxChildAttached :: (GObject a, MonadIO m) => a -> HandleBoxChildAttachedCallback -> m SignalHandlerId
- genClosure_HandleBoxChildAttached :: HandleBoxChildAttachedCallback -> IO Closure
- mk_HandleBoxChildAttachedCallback :: C_HandleBoxChildAttachedCallback -> IO (FunPtr C_HandleBoxChildAttachedCallback)
- noHandleBoxChildAttachedCallback :: Maybe HandleBoxChildAttachedCallback
- onHandleBoxChildAttached :: (GObject a, MonadIO m) => a -> HandleBoxChildAttachedCallback -> m SignalHandlerId
- wrap_HandleBoxChildAttachedCallback :: HandleBoxChildAttachedCallback -> Ptr () -> Ptr Widget -> Ptr () -> IO ()
- type C_HandleBoxChildDetachedCallback = Ptr () -> Ptr Widget -> Ptr () -> IO ()
- type HandleBoxChildDetachedCallback = Widget -> IO ()
- data HandleBoxChildDetachedSignalInfo
- afterHandleBoxChildDetached :: (GObject a, MonadIO m) => a -> HandleBoxChildDetachedCallback -> m SignalHandlerId
- genClosure_HandleBoxChildDetached :: HandleBoxChildDetachedCallback -> IO Closure
- mk_HandleBoxChildDetachedCallback :: C_HandleBoxChildDetachedCallback -> IO (FunPtr C_HandleBoxChildDetachedCallback)
- noHandleBoxChildDetachedCallback :: Maybe HandleBoxChildDetachedCallback
- onHandleBoxChildDetached :: (GObject a, MonadIO m) => a -> HandleBoxChildDetachedCallback -> m SignalHandlerId
- wrap_HandleBoxChildDetachedCallback :: HandleBoxChildDetachedCallback -> Ptr () -> Ptr Widget -> Ptr () -> IO ()
Exported types
GObject HandleBox Source # | |
IsImplementorIface HandleBox Source # | |
IsObject HandleBox Source # | |
IsWidget HandleBox Source # | |
IsContainer HandleBox Source # | |
IsBin HandleBox Source # | |
IsBuildable HandleBox Source # | |
IsHandleBox HandleBox Source # | |
((~) * info (ResolveHandleBoxMethod t HandleBox), MethodInfo * info HandleBox p) => IsLabel t (HandleBox -> p) Source # | |
((~) * info (ResolveHandleBoxMethod t HandleBox), MethodInfo * info HandleBox p) => IsLabelProxy t (HandleBox -> p) Source # | |
HasAttributeList * HandleBox Source # | |
type AttributeList HandleBox Source # | |
type SignalList HandleBox Source # | |
class GObject o => IsHandleBox o Source #
toHandleBox :: IsHandleBox o => o -> IO HandleBox Source #
Methods
getChildDetached
data HandleBoxGetChildDetachedMethodInfo Source #
((~) * signature (m Bool), MonadIO m, IsHandleBox a) => MethodInfo * HandleBoxGetChildDetachedMethodInfo a signature Source # | |
handleBoxGetChildDetached Source #
:: (HasCallStack, MonadIO m, IsHandleBox a) | |
=> a |
|
-> m Bool | Returns: |
Deprecated: (Since version 3.4)HandleBox
has been deprecated.
Whether the handlebox’s child is currently detached.
Since: 2.14
getHandlePosition
data HandleBoxGetHandlePositionMethodInfo Source #
((~) * signature (m PositionType), MonadIO m, IsHandleBox a) => MethodInfo * HandleBoxGetHandlePositionMethodInfo a signature Source # | |
handleBoxGetHandlePosition Source #
:: (HasCallStack, MonadIO m, IsHandleBox a) | |
=> a |
|
-> m PositionType | Returns: the current handle position. |
Deprecated: (Since version 3.4)HandleBox
has been deprecated.
Gets the handle position of the handle box. See
handleBoxSetHandlePosition
.
getShadowType
data HandleBoxGetShadowTypeMethodInfo Source #
((~) * signature (m ShadowType), MonadIO m, IsHandleBox a) => MethodInfo * HandleBoxGetShadowTypeMethodInfo a signature Source # | |
handleBoxGetShadowType Source #
:: (HasCallStack, MonadIO m, IsHandleBox a) | |
=> a |
|
-> m ShadowType | Returns: the type of shadow currently drawn around the handle box. |
Deprecated: (Since version 3.4)HandleBox
has been deprecated.
Gets the type of shadow drawn around the handle box. See
handleBoxSetShadowType
.
getSnapEdge
data HandleBoxGetSnapEdgeMethodInfo Source #
((~) * signature (m PositionType), MonadIO m, IsHandleBox a) => MethodInfo * HandleBoxGetSnapEdgeMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsHandleBox a) | |
=> a |
|
-> m PositionType | Returns: the edge used for determining reattachment, or (GtkPositionType)-1 if this is determined (as per default) from the handle position. |
Deprecated: (Since version 3.4)HandleBox
has been deprecated.
Gets the edge used for determining reattachment of the handle box.
See handleBoxSetSnapEdge
.
new
:: (HasCallStack, MonadIO m) | |
=> m HandleBox | Returns: a new |
Deprecated: (Since version 3.4)HandleBox
has been deprecated.
Create a new handle box.
setHandlePosition
data HandleBoxSetHandlePositionMethodInfo Source #
((~) * signature (PositionType -> m ()), MonadIO m, IsHandleBox a) => MethodInfo * HandleBoxSetHandlePositionMethodInfo a signature Source # | |
handleBoxSetHandlePosition Source #
:: (HasCallStack, MonadIO m, IsHandleBox a) | |
=> a |
|
-> PositionType |
|
-> m () |
Deprecated: (Since version 3.4)HandleBox
has been deprecated.
Sets the side of the handlebox where the handle is drawn.
setShadowType
data HandleBoxSetShadowTypeMethodInfo Source #
((~) * signature (ShadowType -> m ()), MonadIO m, IsHandleBox a) => MethodInfo * HandleBoxSetShadowTypeMethodInfo a signature Source # | |
handleBoxSetShadowType Source #
:: (HasCallStack, MonadIO m, IsHandleBox a) | |
=> a |
|
-> ShadowType |
|
-> m () |
Deprecated: (Since version 3.4)HandleBox
has been deprecated.
Sets the type of shadow to be drawn around the border of the handle box.
setSnapEdge
data HandleBoxSetSnapEdgeMethodInfo Source #
((~) * signature (PositionType -> m ()), MonadIO m, IsHandleBox a) => MethodInfo * HandleBoxSetSnapEdgeMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsHandleBox a) | |
=> a |
|
-> PositionType |
|
-> m () |
Deprecated: (Since version 3.4)HandleBox
has been deprecated.
Sets the snap edge of a handlebox. The snap edge is the edge of the detached child that must be aligned with the corresponding edge of the “ghost” left behind when the child was detached to reattach the torn-off window. Usually, the snap edge should be chosen so that it stays in the same place on the screen when the handlebox is torn off.
If the snap edge is not set, then an appropriate value
will be guessed from the handle position. If the
handle position is PositionTypeRight
or PositionTypeLeft
,
then the snap edge will be PositionTypeTop
, otherwise
it will be PositionTypeLeft
.
Properties
childDetached
data HandleBoxChildDetachedPropertyInfo Source #
getHandleBoxChildDetached :: (MonadIO m, IsHandleBox o) => o -> m Bool Source #
handleBoxChildDetached :: AttrLabelProxy "childDetached" Source #
handlePosition
data HandleBoxHandlePositionPropertyInfo Source #
constructHandleBoxHandlePosition :: IsHandleBox o => PositionType -> IO (GValueConstruct o) Source #
getHandleBoxHandlePosition :: (MonadIO m, IsHandleBox o) => o -> m PositionType Source #
handleBoxHandlePosition :: AttrLabelProxy "handlePosition" Source #
setHandleBoxHandlePosition :: (MonadIO m, IsHandleBox o) => o -> PositionType -> m () Source #
shadowType
data HandleBoxShadowTypePropertyInfo Source #
constructHandleBoxShadowType :: IsHandleBox o => ShadowType -> IO (GValueConstruct o) Source #
getHandleBoxShadowType :: (MonadIO m, IsHandleBox o) => o -> m ShadowType Source #
handleBoxShadowType :: AttrLabelProxy "shadowType" Source #
setHandleBoxShadowType :: (MonadIO m, IsHandleBox o) => o -> ShadowType -> m () Source #
snapEdge
data HandleBoxSnapEdgePropertyInfo Source #
constructHandleBoxSnapEdge :: IsHandleBox o => PositionType -> IO (GValueConstruct o) Source #
getHandleBoxSnapEdge :: (MonadIO m, IsHandleBox o) => o -> m PositionType Source #
handleBoxSnapEdge :: AttrLabelProxy "snapEdge" Source #
setHandleBoxSnapEdge :: (MonadIO m, IsHandleBox o) => o -> PositionType -> m () Source #
snapEdgeSet
data HandleBoxSnapEdgeSetPropertyInfo Source #
constructHandleBoxSnapEdgeSet :: IsHandleBox o => Bool -> IO (GValueConstruct o) Source #
getHandleBoxSnapEdgeSet :: (MonadIO m, IsHandleBox o) => o -> m Bool Source #
handleBoxSnapEdgeSet :: AttrLabelProxy "snapEdgeSet" Source #
setHandleBoxSnapEdgeSet :: (MonadIO m, IsHandleBox o) => o -> Bool -> m () Source #
Signals
childAttached
type HandleBoxChildAttachedCallback = Widget -> IO () Source #
Deprecated: (Since version 3.4)HandleBox
has been deprecated.
afterHandleBoxChildAttached :: (GObject a, MonadIO m) => a -> HandleBoxChildAttachedCallback -> m SignalHandlerId Source #
mk_HandleBoxChildAttachedCallback :: C_HandleBoxChildAttachedCallback -> IO (FunPtr C_HandleBoxChildAttachedCallback) Source #
onHandleBoxChildAttached :: (GObject a, MonadIO m) => a -> HandleBoxChildAttachedCallback -> m SignalHandlerId Source #
wrap_HandleBoxChildAttachedCallback :: HandleBoxChildAttachedCallback -> Ptr () -> Ptr Widget -> Ptr () -> IO () Source #
childDetached
type HandleBoxChildDetachedCallback = Widget -> IO () Source #
Deprecated: (Since version 3.4)HandleBox
has been deprecated.
afterHandleBoxChildDetached :: (GObject a, MonadIO m) => a -> HandleBoxChildDetachedCallback -> m SignalHandlerId Source #
mk_HandleBoxChildDetachedCallback :: C_HandleBoxChildDetachedCallback -> IO (FunPtr C_HandleBoxChildDetachedCallback) Source #
onHandleBoxChildDetached :: (GObject a, MonadIO m) => a -> HandleBoxChildDetachedCallback -> m SignalHandlerId Source #
wrap_HandleBoxChildDetachedCallback :: HandleBoxChildDetachedCallback -> Ptr () -> Ptr Widget -> Ptr () -> IO () Source #