wtk-gtk-0.2: GTK tools within Wojcik Tool Kit

Safe HaskellNone

Graphics.UI.Gtk.WtkGui

Description

Data types being standard interface between any GUI and underlying application. Heavy usage of lenses, which has disadvantage of huge amount of API documentation without proper comments.

Synopsis

Documentation

data InputFieldType Source

Abstract input types. Denote UI fields.

Constructors

Fl

Float value

Fields

flValue_ :: Maybe Double

parsed value

In

Integer value

Fields

inValue_ :: Maybe Int
 
Str

String value

Fields

stValue_ :: String
 
Da

Date value

Fields

daValue_ :: Maybe Day
 
Selection

Selection list (no syntax validation)

Fields

selValue_ :: Maybe Int

selected item

selString_ :: [String]

list of avaliable values

CheckBox

Check Box (no syntax validation)

Fields

cbValue_ :: Bool
 
Action

Very general action.

Fields

action_ :: IO ()
 
NoDataJustAttributes

In case no data needed for a widget.

Instances

action :: forall b m. MonadState InputFieldType m => StateT (IO ()) m b -> m bSource

cbValue :: forall b m. MonadState InputFieldType m => StateT Bool m b -> m bSource

selString :: forall b m. MonadState InputFieldType m => StateT [String] m b -> m bSource

selValue :: forall b m. MonadState InputFieldType m => StateT (Maybe Int) m b -> m bSource

daValue :: forall b m. MonadState InputFieldType m => StateT (Maybe Day) m b -> m bSource

stValue :: forall b m. MonadState InputFieldType m => StateT String m b -> m bSource

inValue :: forall b m. MonadState InputFieldType m => StateT (Maybe Int) m b -> m bSource

flValue :: forall b m. MonadState InputFieldType m => StateT (Maybe Double) m b -> m bSource

data Attributes Source

Attributes of an abstract widget

Constructors

Attributes 

Fields

rawValue_ :: String

raw value

validated_ :: Bool

value has been validated

visible_ :: Bool

visibility

editable_ :: Bool

value editable

isError_ :: Bool

True when value is not correct

errMssg_ :: String

error message

errMssg :: forall b m. MonadState Attributes m => StateT String m b -> m bSource

isError :: forall b m. MonadState Attributes m => StateT Bool m b -> m bSource

editable :: forall b m. MonadState Attributes m => StateT Bool m b -> m bSource

visible :: forall b m. MonadState Attributes m => StateT Bool m b -> m bSource

validated :: forall b m. MonadState Attributes m => StateT Bool m b -> m bSource

rawValue :: forall b m. MonadState Attributes m => StateT String m b -> m bSource

data InputField Source

Abstraction of widget. It consists of id, value with type and attributes. This is main data type to use as widget field. It consist of all what needed: its ID, its value of one of allowed types and attributes.

Constructors

InputField 

Instances

att :: forall b m. MonadState InputField m => StateT Attributes m b -> m bSource

val :: forall b m. MonadState InputField m => StateT InputFieldType m b -> m bSource

idOf :: forall b m. MonadState InputField m => StateT Int m b -> m bSource

val_flValue :: MonadState InputField m => StateT (Maybe Double) (StateT InputFieldType m) b -> m bSource

Boilerplating not provided by Lenses.Template