Graphics.UI.Gtk.Misc.EventBox

gtk-0.12.4: Binding to the Gtk+ graphical user interface library.

Portability | portable (depends on GHC)
Stability | provisional
Maintainer | gtk2hs-users@lists.sourceforge.net
Safe Haskell | None

Graphics.UI.Gtk.Misc.EventBox

Contents

- Detail
- Class Hierarchy
- Types
- Constructors
- Methods
- Attributes

Description

A widget used to catch events for widgets which do not have their own window

Synopsis

- data EventBox
- class BinClass o => EventBoxClass o
- castToEventBox :: GObjectClass obj => obj -> EventBox
- gTypeEventBox :: GType
- toEventBox :: EventBoxClass o => o -> EventBox
- eventBoxNew :: IO EventBox
- eventBoxSetVisibleWindow :: EventBox -> Bool -> IO ()
- eventBoxGetVisibleWindow :: EventBox -> IO Bool
- eventBoxSetAboveChild :: EventBox -> Bool -> IO ()
- eventBoxGetAboveChild :: EventBox -> IO Bool
- eventBoxVisibleWindow :: Attr EventBox Bool
- eventBoxAboveChild :: Attr EventBox Bool

# Detail

The `EventBox` widget is a subclass of `Bin` which also has its own window. It is useful since it allows you to catch events for widgets which do not have their own window.

# Class Hierarchy

     | GObject
     | +----Object
     | +----Widget
     | +----Container
     | +----Bin
     | +----EventBox

# Types

data EventBox

Instances

Eq EventBox |
Ord EventBox |
GObjectClass EventBox |
EventBoxClass EventBox |
BinClass EventBox |
ContainerClass EventBox |
WidgetClass EventBox |
ObjectClass EventBox |

class BinClass o => EventBoxClass o

Instances

EventBoxClass EventBox |

castToEventBox :: GObjectClass obj => obj -> EventBox

gTypeEventBox :: GType

toEventBox :: EventBoxClass o => o -> EventBox

# Constructors

eventBoxNew :: IO EventBox

Creates a new `EventBox`.

# Methods

eventBoxSetVisibleWindow :: EventBox -> Bool -> IO ()

Set whether the event box uses a visible or invisible child window. The default is to use visible windows.

In an invisible window event box, the window that that the event box creates is a "input only" window, which means that it is invisible and only serves to receive events.

A visible window event box creates a visible ("input output") window that acts as the parent window for all the widgets contained in the event box.

You should generally make your event box invisible if you just want to trap events. Creating a visible window may cause artifacts that are visible to the user, especially if the user is using a theme with gradients or pixmaps.

The main reason to create a non input-only event box is if you want to set the background to a different color or draw on it.

- Available since Gtk+ version 2.4

eventBoxGetVisibleWindow :: EventBox -> IO Bool

Returns whether the event box has a visible window. See `eventBoxSetVisibleWindow` for details.

- Available since Gtk+ version 2.4

eventBoxSetAboveChild :: EventBox -> Bool -> IO ()

Set whether the event box window is positioned above the windows of its child, as opposed to below it. If the window is above, all events inside the event box will go to the event box. If the window is below, events in windows of child widgets will first got to that widget, and then to its parents.

The default is to keep the window below the child.

- Available since Gtk+ version 2.4

eventBoxGetAboveChild :: EventBox -> IO Bool

Returns whether the event box window is above or below the windows of its child. See `eventBoxSetAboveChild` for details.

- Available since Gtk+ version 2.4

# Attributes

eventBoxVisibleWindow :: Attr EventBox Bool

Whether the event box is visible, as opposed to invisible and only used to trap events.

Default value: `True`

eventBoxAboveChild :: Attr EventBox Bool

Whether the event-trapping window of the eventbox is above the window of the child widget as opposed to below it.

Default value: `False`