ParentContentsIndex
Graphics.UI.ObjectIO.StdWindow
Portability portable
Stability provisional
Maintainer ka2_mail@yahoo.com
Contents
Opening windows
Closing windows
Active window
Active control
Windows and dialogs stacking
Layout attributes
Default
Current
Enable/Disable windows
Mouse and keyboard event filters
Drawing
Positioning & resizing
Scroll functions
Window title
Window mouse cursor
"Ok" and "Cancel" buttons
Carret pos
Visible module
Description
StdWindow defines functions on windows.
Synopsis
class Windows wdef where
openWindow :: ls -> wdef ls ps -> ps -> GUI ps ps
class Dialogs ddef where
openModalDialog :: ls -> ddef ls ps -> ps -> GUI ps (ps, Maybe ls)
openDialog :: ls -> ddef ls ps -> ps -> GUI ps ps
closeWindow :: Id -> ps -> GUI ps ps
closeActiveWindow :: ps -> GUI ps ps
setActiveWindow :: Id -> GUI ps ()
getActiveWindow :: GUI ps (Maybe Id)
setActiveControl :: Id -> GUI ps ()
getActiveControl :: GUI ps (Maybe Id)
stackWindow :: Id -> Id -> GUI ps ()
getWindowStack :: GUI ps [(Id, WindowKind)]
getWindowsStack :: GUI ps [Id]
getDialogsStack :: GUI ps [Id]
getDefaultHMargin :: Bool -> GUI ps Int
getDefaultVMargin :: Bool -> GUI ps Int
getDefaultItemSpace :: GUI ps (Int, Int)
getWindowHMargin :: Id -> GUI ps (Maybe (Int, Int))
getWindowVMargin :: Id -> GUI ps (Maybe (Int, Int))
getWindowItemSpace :: Id -> GUI ps (Maybe (Int, Int))
enableWindow :: Id -> GUI ps ()
disableWindow :: Id -> GUI ps ()
enableWindowMouse :: Id -> GUI ps ()
disableWindowMouse :: Id -> GUI ps ()
setWindowMouseSelectState :: SelectState -> Id -> GUI ps ()
enableWindowKeyboard :: Id -> GUI ps ()
disableWindowKeyboard :: Id -> GUI ps ()
setWindowKeyboardSelectState :: SelectState -> Id -> GUI ps ()
getWindowSelectState :: Id -> GUI ps (Maybe SelectState)
getWindowMouseSelectState :: Id -> GUI ps (Maybe SelectState)
getWindowKeyboardSelectState :: Id -> GUI ps (Maybe SelectState)
getWindowMouseStateFilter :: Id -> GUI ps (Maybe MouseStateFilter)
getWindowKeyboardStateFilter :: Id -> GUI ps (Maybe KeyboardStateFilter)
setWindowMouseStateFilter :: Id -> MouseStateFilter -> GUI ps ()
setWindowKeyboardStateFilter :: Id -> KeyboardStateFilter -> GUI ps ()
drawInWindow :: Id -> Draw x -> GUI ps (Maybe x)
updateWindow :: Id -> Maybe ViewFrame -> GUI ps ()
setWindowLook :: Id -> Bool -> (Bool, Look) -> GUI ps ()
getWindowLook :: Id -> GUI ps (Maybe (Bool, Look))
setWindowPos :: Id -> ItemPos -> GUI ps ()
getWindowPos :: Id -> GUI ps (Maybe Vector2)
moveWindowViewFrame :: Id -> Vector2 -> GUI ps ()
getWindowViewFrame :: Id -> GUI ps ViewFrame
setWindowViewSize :: Id -> Size -> ps -> GUI ps ps
getWindowViewSize :: Id -> GUI ps Size
setWindowOuterSize :: Id -> Size -> ps -> GUI ps ps
getWindowOuterSize :: Id -> GUI ps Size
setWindowViewDomain :: Id -> ViewDomain -> GUI ps ()
getWindowViewDomain :: Id -> GUI ps (Maybe ViewDomain)
setWindowScrollFunction :: Id -> Direction -> ScrollFunction -> GUI ps ()
getWindowScrollFunction :: Id -> Direction -> GUI ps (Maybe ScrollFunction)
setWindowTitle :: Id -> Title -> GUI ps ()
getWindowTitle :: Id -> GUI ps (Maybe Title)
setWindowCursor :: Id -> CursorShape -> GUI ps ()
getWindowCursor :: Id -> GUI ps (Maybe CursorShape)
getWindowOk :: Id -> GUI ps (Maybe Id)
getWindowCancel :: Id -> GUI ps (Maybe Id)
setWindowCaretPos :: Id -> Point2 -> GUI ps ()
getWindowCaretPos :: Id -> GUI ps (Maybe Point2)
module Graphics.UI.ObjectIO.StdWindowDef
Opening windows
class Windows wdef where
Methods
openWindow :: ls -> wdef ls ps -> ps -> GUI ps ps
Instances
(Controls c) => Windows (Window c)
class Dialogs ddef where
Methods
openModalDialog :: ls -> ddef ls ps -> ps -> GUI ps (ps, Maybe ls)
openDialog :: ls -> ddef ls ps -> ps -> GUI ps ps
Instances
(Controls c) => Dialogs (Dialog c)
Closing windows
closeWindow :: Id -> ps -> GUI ps ps
closeWindow closes the indicated window.
closeActiveWindow :: ps -> GUI ps ps
closeActiveWindow closes the current active window.
Active window
setActiveWindow :: Id -> GUI ps ()
Call this function to activate and restore the window so that it is visible and available to the user.
getActiveWindow :: GUI ps (Maybe Id)
Call this function to obtain an Id of the active window.
Active control
setActiveControl :: Id -> GUI ps ()
Claims the input focus. The input focus directs all subsequent keyboard input to this window. Any window that previously had the input focus loses it. setActiveControl makes the indicated control active only if its parent window is already active.
getActiveControl :: GUI ps (Maybe Id)
Retrieves an Id of the control that currently has the input focus.
Windows and dialogs stacking
stackWindow :: Id -> Id -> GUI ps ()
stackWindow changes the stacking order of the current windows.
getWindowStack :: GUI ps [(Id, WindowKind)]
returns list of window and dialog ids in stacking order.
getWindowsStack :: GUI ps [Id]
returns list of window ids in stacking order.
getDialogsStack :: GUI ps [Id]
returns list of dialog ids in stacking order.
Layout attributes
Default
getDefaultHMargin :: Bool -> GUI ps Int
getDefaultVMargin :: Bool -> GUI ps Int
getDefaultItemSpace :: GUI ps (Int, Int)
Current
getWindowHMargin :: Id -> GUI ps (Maybe (Int, Int))
getWindowVMargin :: Id -> GUI ps (Maybe (Int, Int))
getWindowItemSpace :: Id -> GUI ps (Maybe (Int, Int))
Enable/Disable windows
enableWindow :: Id -> GUI ps ()
disableWindow :: Id -> GUI ps ()
enableWindowMouse :: Id -> GUI ps ()
disableWindowMouse :: Id -> GUI ps ()
setWindowMouseSelectState :: SelectState -> Id -> GUI ps ()
enableWindowKeyboard :: Id -> GUI ps ()
disableWindowKeyboard :: Id -> GUI ps ()
setWindowKeyboardSelectState :: SelectState -> Id -> GUI ps ()
getWindowSelectState :: Id -> GUI ps (Maybe SelectState)
getWindowMouseSelectState :: Id -> GUI ps (Maybe SelectState)
getWindowKeyboardSelectState :: Id -> GUI ps (Maybe SelectState)
Mouse and keyboard event filters
getWindowMouseStateFilter :: Id -> GUI ps (Maybe MouseStateFilter)
returns the current mouse event filter
getWindowKeyboardStateFilter :: Id -> GUI ps (Maybe KeyboardStateFilter)
returns the current keyboard filter
setWindowMouseStateFilter :: Id -> MouseStateFilter -> GUI ps ()
Receiving mouse event can be additionally disabled with state filter
setWindowKeyboardStateFilter :: Id -> KeyboardStateFilter -> GUI ps ()
Receiving keyboard event can be additionally disabled with state filter
Drawing
drawInWindow :: Id -> Draw x -> GUI ps (Maybe x)
updateWindow :: Id -> Maybe ViewFrame -> GUI ps ()
setWindowLook :: Id -> Bool -> (Bool, Look) -> GUI ps ()
getWindowLook :: Id -> GUI ps (Maybe (Bool, Look))
Positioning & resizing
setWindowPos :: Id -> ItemPos -> GUI ps ()
The setWindowPos function changes the position the specified window. The position is relative to the upper-left corner of the screen.
getWindowPos :: Id -> GUI ps (Maybe Vector2)
The getWindowPos function retrieves the position of specified window.
moveWindowViewFrame :: Id -> Vector2 -> GUI ps ()
The function moves view frame through the specified vector.
getWindowViewFrame :: Id -> GUI ps ViewFrame
ViewFrame is the current visible Rectangle of the window. When there are horizontal and vertical scroll bars, then the changing of the scroller thumb changes the ViewFrame. getWindowViewFrame returns the current ViewFrame
setWindowViewSize :: Id -> Size -> ps -> GUI ps ps
ViewSize is the current inner size of the window (It doesn't include the title bar and the scrollers' area).
getWindowViewSize :: Id -> GUI ps Size
ViewSize is the current inner size of the window (It doesn't include the title bar and the scrollers' area).
setWindowOuterSize :: Id -> Size -> ps -> GUI ps ps
The setWindowOuterSize function changes the dimensions of the specified window.
getWindowOuterSize :: Id -> GUI ps Size
The getWindowOuterSize function retrieves the dimensions of the bounding rectangle of the specified window.
setWindowViewDomain :: Id -> ViewDomain -> GUI ps ()
getWindowViewDomain :: Id -> GUI ps (Maybe ViewDomain)
Scroll functions
setWindowScrollFunction :: Id -> Direction -> ScrollFunction -> GUI ps ()
getWindowScrollFunction :: Id -> Direction -> GUI ps (Maybe ScrollFunction)
Window title
setWindowTitle :: Id -> Title -> GUI ps ()
The setWindowTitle function changes the text of the specified window's title bar.
getWindowTitle :: Id -> GUI ps (Maybe Title)
The getWindowTitle function returns the text of the specified window's title bar.
Window mouse cursor
setWindowCursor :: Id -> CursorShape -> GUI ps ()
getWindowCursor :: Id -> GUI ps (Maybe CursorShape)
"Ok" and "Cancel" buttons
getWindowOk :: Id -> GUI ps (Maybe Id)
getWindowCancel :: Id -> GUI ps (Maybe Id)
Carret pos
setWindowCaretPos :: Id -> Point2 -> GUI ps ()
The setWindowCaretPos function moves the caret to the specified coordinates.
getWindowCaretPos :: Id -> GUI ps (Maybe Point2)
If the window has WindowCaret attribute then the getWindowCaretPos function returns the caret's position, otherwise it returns Nothing
Visible module
module Graphics.UI.ObjectIO.StdWindowDef
Produced by Haddock version 0.3