Gtk2HsContentsIndex
Graphics.UI.Gtk.Windows.Window
Description

TODO

  • missing but possibly useful methods are commented out
Synopsis
data Window
class BinClass o => WindowClass o
castToWindow :: GObjectClass obj => obj -> Window
windowNew :: IO Window
windowSetTitle :: WindowClass w => w -> String -> IO ()
windowSetResizable :: WindowClass w => w -> Bool -> IO ()
windowGetResizable :: WindowClass w => w -> IO Bool
windowActivateFocus :: WindowClass w => w -> IO Bool
windowActivateDefault :: WindowClass w => w -> IO Bool
windowSetModal :: WindowClass w => w -> Bool -> IO ()
windowSetDefaultSize :: WindowClass w => w -> Int -> Int -> IO ()
windowSetPolicy :: WindowClass w => w -> Bool -> Bool -> Bool -> IO ()
windowSetPosition :: WindowClass w => w -> WindowPosition -> IO ()
data WindowPosition
= WinPosNone
| WinPosCenter
| WinPosMouse
| WinPosCenterAlways
| WinPosCenterOnParent
windowSetTransientFor :: (WindowClass win, WindowClass parent) => win -> parent -> IO ()
windowSetDestroyWithParent :: WindowClass w => w -> Bool -> IO ()
windowDeiconify :: WindowClass w => w -> IO ()
windowIconify :: WindowClass w => w -> IO ()
windowMaximize :: WindowClass w => w -> IO ()
windowUnmaximize :: WindowClass w => w -> IO ()
windowSetDecorated :: WindowClass w => w -> Bool -> IO ()
windowSetFrameDimensions :: WindowClass w => w -> Int -> Int -> Int -> Int -> IO ()
windowSetRole :: WindowClass w => w -> String -> IO ()
windowStick :: WindowClass w => w -> IO ()
windowUnstick :: WindowClass w => w -> IO ()
onFrameEvent :: WindowClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)
afterFrameEvent :: WindowClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)
onSetFocus :: (WindowClass w, WidgetClass foc) => w -> (foc -> IO ()) -> IO (ConnectId w)
afterSetFocus :: (WindowClass w, WidgetClass foc) => w -> (foc -> IO ()) -> IO (ConnectId w)
Documentation
data Window
Instances
WindowClass Window
BinClass Window
ContainerClass Window
WidgetClass Window
ObjectClass Window
GObjectClass Window
class BinClass o => WindowClass o
Instances
WindowClass Window
WindowClass Dialog
WindowClass ColorSelectionDialog
WindowClass FileSelection
WindowClass FileChooserDialog
WindowClass FontSelectionDialog
WindowClass InputDialog
WindowClass MessageDialog
WindowClass Plug
castToWindow :: GObjectClass obj => obj -> Window
windowNew :: IO Window
Create a new window of the given type.
windowSetTitle :: WindowClass w => w -> String -> IO ()
set the title string of the given window
windowSetResizable :: WindowClass w => w -> Bool -> IO ()

Sets whether the user can resize a window.

  • Windows are user resizable by default.
windowGetResizable :: WindowClass w => w -> IO Bool
Retrieve the value set by windowSetResizable.
windowActivateFocus :: WindowClass w => w -> IO Bool
dunno
windowActivateDefault :: WindowClass w => w -> IO Bool
dunno
windowSetModal :: WindowClass w => w -> Bool -> IO ()
make a window application modal
windowSetDefaultSize :: WindowClass w => w -> Int -> Int -> IO ()

set window default size

  • Sets the default size of a window. If the window's "natural" size (its size request) is larger than the default, the default will be ignored. More generally, if the default size does not obey the geometry hints for the window (windowSetGeometryHints can be used to set these explicitly), the default size will be clamped to the nearest permitted size.
  • Unlike widgetSetSizeRequest, which sets a size request for a widget and thus would keep users from shrinking the window, this function only sets the initial size, just as if the user had resized the window themselves. Users can still shrink the window again as they normally would. Setting a default size of -1 means to use the "natural" default size (the size request of the window).
  • For more control over a window's initial size and how resizing works, investigate windowSetGeometryHints.
  • For some uses, windowResize is a more appropriate function. windowResize changes the current size of the window, rather than the size to be used on initial display. windowResize always affects the window itself, not the geometry widget.The default size of a window only affects the first time a window is shown; if a window is hidden and re-shown, it will remember the size it had prior to hiding, rather than using the default size. Windows can't actually be 0x0 in size, they must be at least 1x1, but passing 0 for width and height is OK, resulting in a 1x1 default size.
windowSetPolicy :: WindowClass w => w -> Bool -> Bool -> Bool -> IO ()
windowSetPosition :: WindowClass w => w -> WindowPosition -> IO ()
set the window position policy
data WindowPosition
Window position types
Constructors
WinPosNone
WinPosCenter
WinPosMouse
WinPosCenterAlways
WinPosCenterOnParent
Instances
Enum WindowPosition
windowSetTransientFor :: (WindowClass win, WindowClass parent) => win -> parent -> IO ()
set transient window
windowSetDestroyWithParent :: WindowClass w => w -> Bool -> IO ()
destory transient window with parent
windowDeiconify :: WindowClass w => w -> IO ()
restore the window
windowIconify :: WindowClass w => w -> IO ()
minimize the window
windowMaximize :: WindowClass w => w -> IO ()
maximize the window
windowUnmaximize :: WindowClass w => w -> IO ()
unmaximize the window
windowSetDecorated :: WindowClass w => w -> Bool -> IO ()
remove the border
windowSetFrameDimensions :: WindowClass w => w -> Int -> Int -> Int -> Int -> IO ()
set border widths
windowSetRole :: WindowClass w => w -> String -> IO ()
set role (additional window name for the WM)
windowStick :: WindowClass w => w -> IO ()
show the window on every workspace
windowUnstick :: WindowClass w => w -> IO ()
do not show the window on every workspace
onFrameEvent :: WindowClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)
afterFrameEvent :: WindowClass w => w -> (Event -> IO Bool) -> IO (ConnectId w)
onSetFocus :: (WindowClass w, WidgetClass foc) => w -> (foc -> IO ()) -> IO (ConnectId w)
afterSetFocus :: (WindowClass w, WidgetClass foc) => w -> (foc -> IO ()) -> IO (ConnectId w)
Produced by Haddock version 0.6