hsudoku-0.1.1.0: Sudoku game with a GTK3 interface

Copyright(c) Marcel Moosbrugger 2017
LicenseMIT
Safe HaskellNone
LanguageHaskell2010

UserInterface

Description

Provides various functions for building the user interface of the sudoku application.

Synopsis

Documentation

data SudokuUI Source #

A type containing all handles of widgets necessary for the user interface.

window :: SudokuUI -> Window Source #

menu :: SudokuUI -> GameMenu Source #

gameButtons :: SudokuUI -> [Button] Source #

cells :: SudokuUI -> Cells Source #

popover :: SudokuUI -> Popover 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.

solveAll :: Cells -> IO () Source #

Solves all given cells.

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.

showMenu :: GameMenu -> Popover -> IO () Source #

Shows the menu and ensures that the popover is hidden.