Gtk2HsContentsIndex
Graphics.UI.Gtk.Abstract.Widget
Description

Widget is the base class of all widgets. It provides the methods to attach and detach signals.

  • This modules reexports everything a normal widget needs from GObject and Object.

TODO

  • unimplemented methods that seem to be useful in user programs: widgetSizeRequest, widgetAddAccelerator, widgetRemoveAccelerator, widgetAcceleratorSignal, widgetIntersect, widgetGrabDefault, widgetGetPointer, widgetPath, widgetClassPath, getCompositeName, widgetSetCompositeName, widgetModifyStyle, widgetGetModifierStyle, widgetModifyFg, widgetModifyBG, widgetModifyText, widgetModifyBase, widgetModifyFont, widgetPango*, widgetSetAdjustments
  • implement the following methods in GtkWindow object: widget_set_uposition, widget_set_usize
  • implement the following methods in GtkDrawingArea object: widgetQueueDrawArea, widgetSetDoubleBufferd, widgetRegionIntersect
Synopsis
data Widget
class ObjectClass o => WidgetClass o
castToWidget :: GObjectClass obj => obj -> Widget
type Allocation = Rectangle
data Requisition = Requisition Int Int
data Rectangle = Rectangle Int Int Int Int
widgetGetState :: WidgetClass w => w -> IO StateType
widgetGetSavedState :: WidgetClass w => w -> IO StateType
widgetShow :: WidgetClass w => w -> IO ()
widgetShowNow :: WidgetClass w => w -> IO ()
widgetHide :: WidgetClass w => w -> IO ()
widgetShowAll :: WidgetClass w => w -> IO ()
widgetHideAll :: WidgetClass w => w -> IO ()
widgetDestroy :: WidgetClass obj => obj -> IO ()
widgetCreateLayout :: WidgetClass obj => obj -> String -> IO PangoLayout
widgetQueueDraw :: WidgetClass w => w -> IO ()
widgetHasIntersection :: WidgetClass w => w -> Rectangle -> IO Bool
widgetActivate :: WidgetClass w => w -> IO Bool
widgetSetSensitivity :: WidgetClass w => w -> Bool -> IO ()
widgetSetSizeRequest :: WidgetClass w => w -> Int -> Int -> IO ()
widgetIsFocus :: WidgetClass w => w -> IO Bool
widgetGrabFocus :: WidgetClass w => w -> IO ()
widgetSetAppPaintable :: WidgetClass w => w -> Bool -> IO ()
widgetSetName :: WidgetClass w => w -> String -> IO ()
widgetGetName :: WidgetClass w => w -> IO String
widgetGetToplevel :: WidgetClass w => w -> IO Widget
widgetIsAncestor :: (WidgetClass w, WidgetClass anc) => anc -> w -> IO Bool
widgetReparent :: (WidgetClass w, WidgetClass par) => w -> par -> IO ()
data TextDirection
= TextDirNone
| TextDirLtr
| TextDirRtl
widgetSetDirection :: WidgetClass w => w -> TextDirection -> IO ()
widgetGetDirection :: WidgetClass w => w -> IO TextDirection
data Event
= Event {
sent :: Bool
}
| Expose {
sent :: Bool
area :: Rectangle
count :: Int
}
| Motion {
sent :: Bool
time :: Integer
x, y :: Double
modif :: Modifier
isHint :: Bool
xRoot, yRoot :: Double
}
| Button {
sent :: Bool
click :: Click
time :: Integer
x, y :: Double
modif :: Modifier
button :: Button
xRoot, yRoot :: Double
}
| Key {
release :: Bool
sent :: Bool
time :: Integer
modif :: Modifier
keyval :: Integer
len :: Int
str :: String
}
| Crossing {
sent :: Bool
time :: Integer
x, y :: Double
xRoot, yRoot :: Double
cMode :: CrossingMode
nType :: NotifyType
modif :: Modifier
}
| Focus {
sent :: Bool
inFocus :: Bool
}
| Configure {
sent :: Bool
xPar :: Int
yPar :: Int
width :: Int
height :: Int
}
| Property {
sent :: Bool
time :: Integer
}
| Visibility {
sent :: Bool
visible :: VisibilityState
}
| Scroll {
sent :: Bool
time :: Integer
x, y :: Double
direc :: ScrollDirection
xRoot, yRoot :: Double
}
| WindowState {
sent :: Bool
wMask :: WindowState
wState :: WindowState
}
onButtonPress :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)
afterButtonPress :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)
onButtonRelease :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)
afterButtonRelease :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)
onClient :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)
afterClient :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)
onConfigure :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)
afterConfigure :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)
onDelete :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)
afterDelete :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)
onDestroyEvent :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)
afterDestroyEvent :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)
onDirectionChanged :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)
afterDirectionChanged :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)
onEnterNotify :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)
afterEnterNotify :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)
onLeaveNotify :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)
afterLeaveNotify :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)
onExpose :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)
afterExpose :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)
onFocusIn :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)
afterFocusIn :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)
onFocusOut :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)
afterFocusOut :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)
onGrabFocus :: WidgetClass w => w -> IO () -> IO (ConnectId w)
afterGrabFocus :: WidgetClass w => w -> IO () -> IO (ConnectId w)
onDestroy :: WidgetClass w => w -> IO () -> IO (ConnectId w)
afterDestroy :: WidgetClass w => w -> IO () -> IO (ConnectId w)
onHide :: WidgetClass w => w -> IO () -> IO (ConnectId w)
afterHide :: WidgetClass w => w -> IO () -> IO (ConnectId w)
onHierarchyChanged :: WidgetClass w => w -> IO () -> IO (ConnectId w)
afterHierarchyChanged :: WidgetClass w => w -> IO () -> IO (ConnectId w)
onKeyPress :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)
afterKeyPress :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)
onKeyRelease :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)
afterKeyRelease :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)
onMnemonicActivate :: WidgetClass w => w -> (Bool -> IO Bool) -> IO (ConnectId w)
afterMnemonicActivate :: WidgetClass w => w -> (Bool -> IO Bool) -> IO (ConnectId w)
onMotionNotify :: WidgetClass w => w -> Bool -> (Event -> IO Bool) -> IO (ConnectId w)
afterMotionNotify :: WidgetClass w => w -> Bool -> (Event -> IO Bool) -> IO (ConnectId w)
onParentSet :: (WidgetClass w, WidgetClass old) => w -> (old -> IO ()) -> IO (ConnectId w)
afterParentSet :: (WidgetClass w, WidgetClass old) => w -> (old -> IO ()) -> IO (ConnectId w)
onPopupMenu :: WidgetClass w => w -> IO () -> IO (ConnectId w)
afterPopupMenu :: WidgetClass w => w -> IO () -> IO (ConnectId w)
onProximityIn :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)
afterProximityIn :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)
onProximityOut :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)
afterProximityOut :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)
onRealize :: WidgetClass w => w -> IO () -> IO (ConnectId w)
afterRealize :: WidgetClass w => w -> IO () -> IO (ConnectId w)
onScroll :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)
afterScroll :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)
onShow :: WidgetClass w => w -> IO () -> IO (ConnectId w)
afterShow :: WidgetClass w => w -> IO () -> IO (ConnectId w)
onSizeAllocate :: WidgetClass w => w -> (Allocation -> IO ()) -> IO (ConnectId w)
afterSizeAllocate :: WidgetClass w => w -> (Allocation -> IO ()) -> IO (ConnectId w)
onSizeRequest :: WidgetClass w => w -> IO Requisition -> IO (ConnectId w)
afterSizeRequest :: WidgetClass w => w -> IO Requisition -> IO (ConnectId w)
data StateType
= StateNormal
| StateActive
| StatePrelight
| StateSelected
| StateInsensitive
onStateChanged :: WidgetClass w => w -> (StateType -> IO ()) -> IO (ConnectId w)
afterStateChanged :: WidgetClass w => w -> (StateType -> IO ()) -> IO (ConnectId w)
onUnmap :: WidgetClass w => w -> IO () -> IO (ConnectId w)
afterUnmap :: WidgetClass w => w -> IO () -> IO (ConnectId w)
onUnrealize :: WidgetClass w => w -> IO () -> IO (ConnectId w)
afterUnrealize :: WidgetClass w => w -> IO () -> IO (ConnectId w)
onVisibilityNotify :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)
afterVisibilityNotify :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)
onWindowState :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)
afterWindowState :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)
Documentation
data Widget
Instances
WidgetClass Widget
ObjectClass Widget
GObjectClass Widget
class ObjectClass o => WidgetClass o
Instances
WidgetClass MozEmbed
WidgetClass SourceView
WidgetClass Widget
WidgetClass Misc
WidgetClass Label
WidgetClass AccelLabel
WidgetClass TipsQuery
WidgetClass Arrow
WidgetClass Image
WidgetClass Container
WidgetClass Bin
WidgetClass Alignment
WidgetClass Frame
WidgetClass AspectFrame
WidgetClass Button
WidgetClass ToggleButton
WidgetClass CheckButton
WidgetClass RadioButton
WidgetClass OptionMenu
WidgetClass Item
WidgetClass MenuItem
WidgetClass CheckMenuItem
WidgetClass RadioMenuItem
WidgetClass TearoffMenuItem
WidgetClass ImageMenuItem
WidgetClass ListItem
WidgetClass Window
WidgetClass Dialog
WidgetClass ColorSelectionDialog
WidgetClass FileSelection
WidgetClass FileChooserDialog
WidgetClass FontSelectionDialog
WidgetClass InputDialog
WidgetClass MessageDialog
WidgetClass Plug
WidgetClass EventBox
WidgetClass HandleBox
WidgetClass ScrolledWindow
WidgetClass Viewport
WidgetClass Expander
WidgetClass ComboBox
WidgetClass ComboBoxEntry
WidgetClass ToolItem
WidgetClass ToolButton
WidgetClass ToggleToolButton
WidgetClass RadioToolButton
WidgetClass SeparatorToolItem
WidgetClass Box
WidgetClass ButtonBox
WidgetClass HButtonBox
WidgetClass VButtonBox
WidgetClass VBox
WidgetClass ColorSelection
WidgetClass FontSelection
WidgetClass GammaCurve
WidgetClass FileChooserWidget
WidgetClass HBox
WidgetClass Combo
WidgetClass Statusbar
WidgetClass CList
WidgetClass CTree
WidgetClass Fixed
WidgetClass Paned
WidgetClass HPaned
WidgetClass VPaned
WidgetClass Layout
WidgetClass List
WidgetClass MenuShell
WidgetClass Menu
WidgetClass MenuBar
WidgetClass Notebook
WidgetClass Socket
WidgetClass Table
WidgetClass TextView
WidgetClass Toolbar
WidgetClass TreeView
WidgetClass Calendar
WidgetClass DrawingArea
WidgetClass Curve
WidgetClass Entry
WidgetClass SpinButton
WidgetClass Ruler
WidgetClass HRuler
WidgetClass VRuler
WidgetClass Range
WidgetClass Scale
WidgetClass HScale
WidgetClass VScale
WidgetClass Scrollbar
WidgetClass HScrollbar
WidgetClass VScrollbar
WidgetClass Separator
WidgetClass HSeparator
WidgetClass VSeparator
WidgetClass Invisible
WidgetClass Preview
WidgetClass ProgressBar
castToWidget :: GObjectClass obj => obj -> Widget
type Allocation = Rectangle

Allocation

  • for Widget's size_allocate signal
data Requisition

Requisition

  • for Widget's size_request
Constructors
Requisition Int Int
Instances
Storable Requisition
data Rectangle

Rectangle

  • for Events
  • Specifies x, y, width and height
Constructors
Rectangle Int Int Int Int
Instances
Storable Rectangle
widgetGetState :: WidgetClass w => w -> IO StateType

Retrieve the current state of the widget.

  • The state refers to different modes of user interaction, see StateType for more information.
widgetGetSavedState :: WidgetClass w => w -> IO StateType

Retrieve the current state of the widget.

  • If a widget is turned insensitive, the previous state is stored in a specific location. This function retrieves this previous state.
widgetShow :: WidgetClass w => w -> IO ()

Queue a show request.

  • Flags a widget to be displayed. Any widget that isn't shown will not appear on the screen. If you want to show all the widgets in a container, it's easier to call widgetShowAll on the container, instead of individually showing the widgets. Note that you have to show the containers containing a widget, in addition to the widget itself, before it will appear onscreen. When a toplevel container is shown, it is immediately realized and mapped; other shown widgets are realized and mapped when their toplevel container is realized and mapped.
widgetShowNow :: WidgetClass w => w -> IO ()

Queue a show event and wait for it to be executed.

  • If the widget is an unmapped toplevel widget (i.e. a Window that has not yet been shown), enter the main loop and wait for the window to actually be mapped. Be careful; because the main loop is running, anything can happen during this function.
widgetHide :: WidgetClass w => w -> IO ()

Queue a hide request.

  • Reverses the effects of widgetShow, causing the widget to be hidden (make invisible to the user).
widgetShowAll :: WidgetClass w => w -> IO ()
Show this and all child widgets.
widgetHideAll :: WidgetClass w => w -> IO ()
Hide this and all child widgets.
widgetDestroy :: WidgetClass obj => obj -> IO ()

Destroy a widget.

  • The widgetDestroy function is used to shutdown an object, i.e. a widget will be removed from the screen and unrealized. Resources will be freed when all references are released.
widgetCreateLayout :: WidgetClass obj => obj -> String -> IO PangoLayout

Prepare text for display.

  • The Layout represents the rendered text. It can be shown on screen by calling drawLayout.
  • The returned Layout shares the same font information (Context) as this widget. If this information changes, the Layout should change. The following code ensures that the displayed text always reflects the widget's settings:
 l <- widgetCreateLayout w "My Text."
 let update = do
                layoutContextChanged l
 		    <update the Drawables which show this layout>
 w `onDirectionChanged` update
 w `onStyleChanged` update
widgetQueueDraw :: WidgetClass w => w -> IO ()
Send a redraw request to a widget.
widgetHasIntersection :: WidgetClass w => w -> Rectangle -> IO Bool
Check if the widget intersects with a given area.
widgetActivate :: WidgetClass w => w -> IO Bool
Activate the widget (e.g. clicking a button).
widgetSetSensitivity :: WidgetClass w => w -> Bool -> IO ()
Set the widgets sensitivity (Grayed or Usable).
widgetSetSizeRequest :: WidgetClass w => w -> Int -> Int -> IO ()
Sets the minimum size of a widget.
widgetIsFocus :: WidgetClass w => w -> IO Bool
Set and query the input focus of a widget.
widgetGrabFocus :: WidgetClass w => w -> IO ()
widgetSetAppPaintable :: WidgetClass w => w -> Bool -> IO ()
Sets some weired flag in the widget.
widgetSetName :: WidgetClass w => w -> String -> IO ()
Set the name of a widget.
widgetGetName :: WidgetClass w => w -> IO String
Get the name of a widget.
widgetGetToplevel :: WidgetClass w => w -> IO Widget
Retrieves the topmost widget in this tree.
widgetIsAncestor :: (WidgetClass w, WidgetClass anc) => anc -> w -> IO Bool
Return True if the second widget is (possibly indirectly) held by the first.
widgetReparent :: (WidgetClass w, WidgetClass par) => w -> par -> IO ()
Move a widget to a new parent.
data TextDirection
Is the text written from left to right or the awkward way?
Constructors
TextDirNone
TextDirLtr
TextDirRtl
Instances
Enum TextDirection
widgetSetDirection :: WidgetClass w => w -> TextDirection -> IO ()
Setting packaging and writing direction.
widgetGetDirection :: WidgetClass w => w -> IO TextDirection
Retrieve the default direction of text writing.
data Event
Constructors
Event
sent :: Bool
Expose
sent :: Bool
area :: Rectangle
count :: Int
Motion
sent :: Bool
time :: Integer
x, y :: Double
modif :: Modifier
isHint :: Bool
xRoot, yRoot :: Double
Button
sent :: Bool
click :: Click
time :: Integer
x, y :: Double
modif :: Modifier
button :: Button
xRoot, yRoot :: Double
Key
release :: Bool
sent :: Bool
time :: Integer
modif :: Modifier
keyval :: Integer
len :: Int
str :: String
Crossing
sent :: Bool
time :: Integer
x, y :: Double
xRoot, yRoot :: Double
cMode :: CrossingMode
nType :: NotifyType
modif :: Modifier
Focus
sent :: Bool
inFocus :: Bool
Configure
sent :: Bool
xPar :: Int
yPar :: Int
width :: Int
height :: Int
Property
sent :: Bool
time :: Integer
Visibility
sent :: Bool
visible :: VisibilityState
Scroll
sent :: Bool
time :: Integer
x, y :: Double
direc :: ScrollDirection
xRoot, yRoot :: Double
WindowState
sent :: Bool
wMask :: WindowState
wState :: WindowState
onButtonPress :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)

A Button was pressed.

  • This widget is part of a button which was just pressed. The event passed to the user function is a Button event.
afterButtonPress :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)
onButtonRelease :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)
A Button was released.
afterButtonRelease :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)
onClient :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)
afterClient :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)
onConfigure :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)
The widget's status has changed.
afterConfigure :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)
onDelete :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)
This signal is emitted when the close icon on the surrounding window is pressed. The default action is to emit the "destroy" signal.
afterDelete :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)
onDestroyEvent :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)

The widget will be destroyed.

  • The widget received a destroy event from the window manager.
afterDestroyEvent :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)
onDirectionChanged :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)
The default text direction was changed.
afterDirectionChanged :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)
onEnterNotify :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)
Mouse cursor entered widget.
afterEnterNotify :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)
onLeaveNotify :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)
Mouse cursor leaves widget.
afterLeaveNotify :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)
onExpose :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)
Instructs the widget to redraw.
afterExpose :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)
onFocusIn :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)
Widget gains input focus.
afterFocusIn :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)
onFocusOut :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)
Widget looses input focus.
afterFocusOut :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)
onGrabFocus :: WidgetClass w => w -> IO () -> IO (ConnectId w)

The widget is about to receive all events.

  • It is possible to redirect all input events to one widget to force the user to use only this widget. Such a situation is initiated by addGrab.
afterGrabFocus :: WidgetClass w => w -> IO () -> IO (ConnectId w)
onDestroy :: WidgetClass w => w -> IO () -> IO (ConnectId w)

The widget will be destroyed.

  • This is the last signal this widget will receive.
afterDestroy :: WidgetClass w => w -> IO () -> IO (ConnectId w)
onHide :: WidgetClass w => w -> IO () -> IO (ConnectId w)

The widget was asked to hide itself.

  • This signal is emitted each time widgetHide is called. Use connectToUnmap when your application needs to be informed when the widget is actually removed from screen.
afterHide :: WidgetClass w => w -> IO () -> IO (ConnectId w)
onHierarchyChanged :: WidgetClass w => w -> IO () -> IO (ConnectId w)

The toplevel window changed.

  • When a subtree of widgets is removed or added from a tree with a toplevel window this signal is emitted. It is emitted on each widget in the detached or attached subtree.
afterHierarchyChanged :: WidgetClass w => w -> IO () -> IO (ConnectId w)
onKeyPress :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)
A key was pressed.
afterKeyPress :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)
onKeyRelease :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)
A key was released.
afterKeyRelease :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)
onMnemonicActivate :: WidgetClass w => w -> (Bool -> IO Bool) -> IO (ConnectId w)
afterMnemonicActivate :: WidgetClass w => w -> (Bool -> IO Bool) -> IO (ConnectId w)
onMotionNotify :: WidgetClass w => w -> Bool -> (Event -> IO Bool) -> IO (ConnectId w)

Track mouse movements.

  • If hint is False, a callback for every movement of the mouse is generated. To avoid a backlog of mouse messages, it is usually sufficient to sent hint to True, generating only one event. The application now has to state that it is ready for the next message by calling drawWindowGetPointer.
afterMotionNotify :: WidgetClass w => w -> Bool -> (Event -> IO Bool) -> IO (ConnectId w)
onParentSet :: (WidgetClass w, WidgetClass old) => w -> (old -> IO ()) -> IO (ConnectId w)
afterParentSet :: (WidgetClass w, WidgetClass old) => w -> (old -> IO ()) -> IO (ConnectId w)
onPopupMenu :: WidgetClass w => w -> IO () -> IO (ConnectId w)
afterPopupMenu :: WidgetClass w => w -> IO () -> IO (ConnectId w)
onProximityIn :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)

The input device became active.

  • This event indicates that a pen of a graphics tablet or similar device is now touching the tablet.
afterProximityIn :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)
onProximityOut :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)

The input device became inactive.

  • The pen was removed from the graphics tablet's surface.
afterProximityOut :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)
onRealize :: WidgetClass w => w -> IO () -> IO (ConnectId w)
This widget's drawing area is about to be destroyed.
afterRealize :: WidgetClass w => w -> IO () -> IO (ConnectId w)
onScroll :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)

The mouse wheel has turned.

afterScroll :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)
onShow :: WidgetClass w => w -> IO () -> IO (ConnectId w)

The widget was asked to show itself.

  • This signal is emitted each time widgetShow is called. Use connectToMap when your application needs to be informed when the widget is actually shown.
afterShow :: WidgetClass w => w -> IO () -> IO (ConnectId w)
onSizeAllocate :: WidgetClass w => w -> (Allocation -> IO ()) -> IO (ConnectId w)

Inform widget about the size it has.

  • After querying a widget for the size it wants to have (through emitting the "sizeRequest" signal) a container will emit this signal to inform the widget about the real size it should occupy.
afterSizeAllocate :: WidgetClass w => w -> (Allocation -> IO ()) -> IO (ConnectId w)
onSizeRequest :: WidgetClass w => w -> IO Requisition -> IO (ConnectId w)

Query the widget for the size it likes to have.

  • A parent container emits this signal to its child to query the needed height and width of the child. There is not guarantee that the widget will actually get this area.
afterSizeRequest :: WidgetClass w => w -> IO Requisition -> IO (ConnectId w)
data StateType
Widget states
Constructors
StateNormal
StateActive
StatePrelight
StateSelected
StateInsensitive
Instances
Enum StateType
onStateChanged :: WidgetClass w => w -> (StateType -> IO ()) -> IO (ConnectId w)
afterStateChanged :: WidgetClass w => w -> (StateType -> IO ()) -> IO (ConnectId w)
onUnmap :: WidgetClass w => w -> IO () -> IO (ConnectId w)
The widget was removed from screen.
afterUnmap :: WidgetClass w => w -> IO () -> IO (ConnectId w)
onUnrealize :: WidgetClass w => w -> IO () -> IO (ConnectId w)
This widget's drawing area is about to be destroyed.
afterUnrealize :: WidgetClass w => w -> IO () -> IO (ConnectId w)
onVisibilityNotify :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)
afterVisibilityNotify :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)
onWindowState :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)
afterWindowState :: WidgetClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)
Produced by Haddock version 0.6