Source codeContentsIndex
Window
Description
Basic types and classes concerning toplevel window resources.
Synopsis
class (GUIObject w) => Window w where
iconify :: w -> IO ()
deiconify :: w -> IO ()
withdraw :: w -> IO ()
putWinOnTop :: w -> IO ()
putWinAtBottom :: w -> IO ()
screen :: Display -> Config w
getScreen :: w -> IO Display
getClassName :: w -> IO String
getWindowState :: w -> IO WindowState
aspectRatio :: AspectRatio -> Config w
getAspectRatio :: w -> IO AspectRatio
positionFrom :: Whom -> Config w
getPositionFrom :: w -> IO Whom
sizeFrom :: Whom -> Config w
getSizeFrom :: w -> IO Whom
type Display = String
class (HasSize w, HasPosition w) => HasGeometry w where
geometry :: Geometry -> Config w
getGeometry :: w -> IO Geometry
class (GUIObject w) => HasSize w where
width :: Distance -> Config w
getWidth :: w -> IO Distance
height :: Distance -> Config w
getHeight :: w -> IO Distance
size :: Size -> Config w
getSize :: w -> IO Size
class (GUIObject w) => HasPosition w where
position :: Position -> Config w
getPosition :: w -> IO Position
class (GUIObject w, GUIValue v) => HasText w v where
text :: v -> Config w
getText :: w -> IO v
maxSize :: (Window w) => Size -> Config w
getMaxSize :: (Window w) => w -> IO Size
minSize :: (Window w) => Size -> Config w
getMinSize :: (Window w) => w -> IO Size
raiseWin :: (Window w1, Window w2) => w1 -> w2 -> IO ()
lowerWin :: (Window w1, Window w2) => w1 -> w2 -> IO ()
data WindowState
= Deiconified
| Iconified
| Withdrawn
data AspectRatio
data Whom
isWMConfig :: ConfigID -> Bool
Documentation
class (GUIObject w) => Window w where
Toplevel windows instantiate the class Window.
Methods
iconify :: w -> IO ()
Iconifies the window.
deiconify :: w -> IO ()
Deiconifies the window.
withdraw :: w -> IO ()
Withdraws the window.
putWinOnTop :: w -> IO ()
Puts the window on top.
putWinAtBottom :: w -> IO ()
Puts the window at bottom.
screen :: Display -> Config w
Sets the screen for this window.
getScreen :: w -> IO Display
Gets the screen from this window.
getClassName :: w -> IO String
Returns the resource class of the given window.
getWindowState :: w -> IO WindowState
Gets the current window state.
aspectRatio :: AspectRatio -> Config w
Sets the aspect ratio for the given window.
getAspectRatio :: w -> IO AspectRatio
Gets the aspect ratio of the given window.
positionFrom :: Whom -> Config w
Set 'Whom' to be Program or User.
getPositionFrom :: w -> IO Whom
Gets the current setting.
sizeFrom :: Whom -> Config w
Set 'Whom' to be Program or
getSizeFrom :: w -> IO Whom
Gets the current setting.
Instances
(CItem c) => Window (GenGUI c)
Window HTk
Window Toplevel
type Display = String
class (HasSize w, HasPosition w) => HasGeometry w where
Objects with a configureable size and position instantiate the class HasGeometry.
Methods
geometry :: Geometry -> Config w
Sets the object's geometry.
getGeometry :: w -> IO Geometry
Gets the object's geometry.
Instances
HasGeometry Arc
HasGeometry Oval
HasGeometry Rectangle
(Window w) => HasGeometry w
class (GUIObject w) => HasSize w where
Objects with a configureable size instantiate the class HasSize.
Methods
width :: Distance -> Config w
Sets the object's width.
getWidth :: w -> IO Distance
Gets the object's width.
height :: Distance -> Config w
Sets the object's height.
getHeight :: w -> IO Distance
Gets the object's height.
size :: Size -> Config w
Sets the object's width and height.
getSize :: w -> IO Size
Gets the object's width and height.
Instances
HasSize Arc
HasSize BitMap
HasSize Box
HasSize Button
HasSize Canvas
HasSize (CheckButton a)
HasSize (ComboBox a)
HasSize Editor
HasSize EmbeddedCanvasWin
HasSize (Entry a)
HasSize Frame
(HasInsertionCursor w, Widget w) => HasSize (ICursor w)
HasSize IconBar
HasSize Image
HasSize (InputForm a)
HasSize (EntryField a b)
HasSize (TextField a b)
HasSize (EnumField a b)
HasSize (RecordField a b)
HasSize Label
HasSize LabelFrame
HasSize Line
HasSize (ListBox a)
HasSize MenuButton
HasSize MenuCascade
HasSize MenuCheckButton
HasSize MenuCommand
HasSize MenuRadioButton
HasSize MenuSeparator
HasSize Message
HasSize NoteBook
HasSize (Notepad a)
HasSize (OptionMenu a)
HasSize Oval
HasSize PanedWindow
HasSize (RadioButton a)
HasSize Rectangle
HasSize (Scale a)
HasSize (Slider (Scale a))
HasSize ScrollBar
HasSize (ScrollBox a)
HasSize SelectBox
HasSize Separator
HasSize SpinButton
HasSize TextItem
(CItem c) => HasSize (TreeList c)
(Window w) => HasSize w
class (GUIObject w) => HasPosition w where
Objects with a configureable positon (e.g. canvas items) instantiate the class HasPosition.
Methods
position :: Position -> Config w
Gets the object's position.
getPosition :: w -> IO Position
Sets the object's position.
Instances
HasPosition Arc
HasPosition BitMapItem
HasPosition EmbeddedCanvasWin
(Window w) => HasPosition (Icon w)
HasPosition ImageItem
HasPosition (NotepadItem a)
HasPosition Oval
HasPosition Rectangle
HasPosition TextItem
(Window w) => HasPosition w
class (GUIObject w, GUIValue v) => HasText w v where
Objects containing text instantiate the class HasText.
Methods
text :: v -> Config w
Sets the object's text.
getText :: w -> IO v
Gets the object's text.
Instances
(GUIValue v) => HasText Button v
(GUIValue v) => HasText (CheckButton a) v
(GUIValue v) => HasText (Dialog a) v
(Window w, GUIValue v) => HasText (Icon w) v
(GUIValue b, GUIValue c) => HasText (EntryField a b) c
(GUIValue b, GUIValue c) => HasText (TextField a b) c
(GUIValue c) => HasText (EnumField a b) c
(GUIValue c) => HasText (RecordField a b) c
(GUIValue b) => HasText Label b
(GUIValue v) => HasText LabelFrame v
(GUIValue v) => HasText MenuButton v
(GUIValue v) => HasText MenuCascade v
(GUIValue v) => HasText MenuCheckButton v
(GUIValue v) => HasText MenuCommand v
(GUIValue v) => HasText MenuRadioButton v
(GUIValue b) => HasText Message b
(GUIValue a) => HasText NoteBookPage a
(GUIValue a, GUIValue b) => HasText (Prompt a) b
(GUIValue v) => HasText (RadioButton a) v
(GUIValue v) => HasText (Scale a) v
(GUIValue b) => HasText TextItem b
(Window w, GUIValue v) => HasText w v
maxSize :: (Window w) => Size -> Config w
getMaxSize :: (Window w) => w -> IO Size
Gets the maximum size of the window.
minSize :: (Window w) => Size -> Config w
Constraints the minimum size of the window.
getMinSize :: (Window w) => w -> IO Size
Gets the minimum size of the window.
raiseWin
:: (Window w1, Window w2)
=> w1 the first window.
-> w2 the second window.
-> IO () None.
Puts the first given window just above the second given window in the stacking order.
lowerWin
:: (Window w1, Window w2)
=> w1 the first window.
-> w2 the second window.
-> IO () None.
Puts the first given window just below the second given window in the stacking order.
data WindowState
The WindowState datatype.
Constructors
Deiconified
Iconified
Withdrawn
Instances
GUIValue WindowState
Read WindowState
Show WindowState
data AspectRatio
data Whom
isWMConfig :: ConfigID -> Bool
Produced by Haddock version 0.3