Copyright | (c) Marcel Moosbrugger 2017 |
---|---|
License | MIT |
Safe Haskell | None |
Language | Haskell2010 |
Provides various functions for building the user interface of the sudoku application.
- data BuilderCastException = UnknownIdException String
- data SudokuUI
- window :: SudokuUI -> Window
- menu :: SudokuUI -> GameMenu
- gameButtons :: SudokuUI -> [Button]
- cells :: SudokuUI -> Cells
- popover :: SudokuUI -> Popover
- numberButtons :: SudokuUI -> [Button]
- inputClear :: SudokuUI -> Button
- inputSolve :: SudokuUI -> Button
- solveButton :: SudokuUI -> Button
- checkButton :: SudokuUI -> Button
- menuButton :: SudokuUI -> Button
- buildSudokuUI :: IO SudokuUI
- writePopoverRelativeCell :: Popover -> Char -> IO ()
- solveAll :: Cells -> IO ()
- solvePopoverRelativeCell :: Popover -> IO ()
- checkAll :: Cells -> IO ()
- cellsBindHandlers :: Cells -> Popover -> IO ()
- numbersBindHandlers :: [Button] -> Popover -> IO ()
- gameButtonsBindHandlers :: [Button] -> Cells -> Widget -> IO ()
- showMenu :: GameMenu -> Popover -> IO ()
Documentation
data BuilderCastException Source #
Thrown when castB
fails get an object.
gameButtons :: SudokuUI -> [Button] Source #
numberButtons :: SudokuUI -> [Button] Source #
inputClear :: SudokuUI -> Button Source #
inputSolve :: SudokuUI -> Button Source #
solveButton :: SudokuUI -> Button Source #
checkButton :: SudokuUI -> Button Source #
menuButton :: SudokuUI -> Button Source #
buildSudokuUI :: IO SudokuUI Source #
Builds the sudoku-ui from a gui-file for which the path is given.
writePopoverRelativeCell :: Popover -> Char -> IO () Source #
Writes a charachter into a cell which is associated to a given popover The popover gets closed afterwards.
solvePopoverRelativeCell :: Popover -> IO () Source #
Solves the cell currently relative to the popover.
checkAll :: Cells -> IO () Source #
Checks if all given cells contain the correct value. Visually marks the correct or incorrect cells.
cellsBindHandlers :: Cells -> Popover -> IO () Source #
Binds the signal handlers to buttons.
numbersBindHandlers :: [Button] -> Popover -> IO () Source #
Binds the signal handlers to a list of number buttons.
gameButtonsBindHandlers :: [Button] -> Cells -> Widget -> IO () Source #
Binds the signal handlers to the game buttons in the menu.