ltk-0.15.0.5: Leksah tool kit

Safe HaskellNone
LanguageHaskell98

Graphics.UI.Editor.Basics

Contents

Description

Module for the basiscs of composing GUIs from editors

Synopsis

Types

type Getter alpha beta = alpha -> beta #

A type for getting a field of a record

type Setter alpha beta = beta -> alpha -> alpha #

A type for setting the field of a record

type Injector beta = beta -> IO () #

A type for injecting a value into an editor

type Extractor beta = IO (Maybe beta) #

A type for extracting a value from an editor

type Applicator beta gamma = beta -> gamma () #

A type for the application of a value to be reflected in the GUI

type Editor alpha = Parameters -> Notifier -> IO (Widget, Injector alpha, Extractor alpha) #

A type to describe an editor. alpha is the type of the individual field of the record

data GUIEvent #

A type for an event in the GUI

Constructors

GUIEvent 

Fields

data GUIEventSelector #

Constructors

FocusOut

generic, the widget looses the focus

FocusIn

generic, the widget gets the focus

ButtonPressed

generic, a mouse key has been pressed and released, while the widget has the focus

KeyPressed

generic, a keyboard key has been pressed and released, while the widget has the focus

Clicked

button specific, the button has been pressed

MayHaveChanged

generic, no gui event, the contents of the widget may have changed

ValidationError

validation of a contents has failed

Instances

Bounded GUIEventSelector # 
Enum GUIEventSelector # 
Eq GUIEventSelector # 
Ord GUIEventSelector # 
Show GUIEventSelector # 
EventSelector GUIEventSelector # 
Event GUIEvent GUIEventSelector # 
EventSource Notifier GUIEvent IO GUIEventSelector # 

type GtkRegFunc = forall o. GObjectClass o => o -> GtkHandler -> IO Connection #

A type for a function to register a gtk event |

newtype Notifier #

The event source in the gtk editor context If the second argument is Left Handler the handler gets registered If the second argument is Right Unique the handler will be removed The returned unique value must be used for unregistering an event

data Connection #

Signal handlers for the different pane types

Constructors

GObjectClass alpha => ConnectC (ConnectId alpha) 

activateEvent :: GObjectClass o => o -> Notifier -> Maybe (o -> IO Bool -> IO Connection) -> GUIEventSelector -> IO () #

Activate the event after the event has been declared and the widget has been constructed

propagateEvent :: Notifier -> [Notifier] -> GUIEventSelector -> IO () #

Propagate the event with the selector from notifier to eventSource