Commit 1ccbd831 authored by Bas Lijnse's avatar Bas Lijnse

Renamed UI Editor modules to be divided among Controls, Containers and Modifiers

parent 363a5662
......@@ -10,7 +10,6 @@ import iTasks.Extensions.Currency
import iTasks.Extensions.Contact
import iTasks.Extensions.DateTime
import iTasks.Extensions.Clock
import iTasks.UI.Definition, iTasks.UI.Editor.Builtin
import Text, Text.HTML, StdArray
import iTasks.Internal.Tonic
//import ligrettoTOP
......
......@@ -28,9 +28,9 @@ import
, iTasks.WF.Combinators.Common
// Custom task GUI's
, iTasks.UI.Editor.Builtin
, iTasks.UI.Editor.Controls
, iTasks.UI.Editor.Containers
, iTasks.UI.Editor.Combinators
, iTasks.UI.Editor.Modifiers
// Miscellaneous machinery
, Text.JSON // JSON is used for serializing/deserializing strings
......
......@@ -8,7 +8,7 @@ import iTasks.Internal.Store
from StdFunc import seq
import qualified Data.Map as DM
import Data.List, Data.Tuple
import iTasks.UI.Definition, iTasks.UI.Editor, iTasks.UI.Editor.Builtin, iTasks.UI.Editor.Common, iTasks.UI.Layout.Default, iTasks.UI.Layout.Common
import iTasks.UI.Definition, iTasks.UI.Editor, iTasks.UI.Editor.Controls, iTasks.UI.Editor.Common, iTasks.UI.Layout.Default, iTasks.UI.Layout.Common
import iTasks.Extensions.DateTime
// SPECIALIZATIONS
derive class iTask Workflow
......
implementation module iTasks.Extensions.Currency
import iTasks
import iTasks.UI.Editor.Builtin, iTasks.UI.Editor.Combinators
import iTasks.UI.Editor.Controls, iTasks.UI.Editor.Modifiers
import Text
import qualified Data.Map as DM
......
......@@ -11,8 +11,8 @@ import iTasks.SDS.Sources.System
import iTasks.UI.Definition
import iTasks.UI.Prompt
import iTasks.UI.Editor
import iTasks.UI.Editor.Builtin
import iTasks.UI.Editor.Combinators
import iTasks.UI.Editor.Controls
import iTasks.UI.Editor.Modifiers
import StdBool, StdArray, StdEnum, StdList
......
definition module iTasks.Extensions.Development.Codebase
import iTasks
import iTasks.UI.Editor.Builtin
import iTasks.UI.Editor.Controls
import System.FilePath
:: CodeBase :== [SourceTree]
......
implementation module iTasks.Extensions.Development.Codebase
import iTasks
import iTasks.UI.Editor.Builtin
import iTasks.UI.Editor.Controls
import StdArray, System.FilePath, System.File, System.Directory, Text, StdFile, Data.List, Data.Tree, Data.Error
derive class iTask SourceTree, SourceTreeSelection, ModuleType, Extension
......
implementation module iTasks.Extensions.Document
import iTasks.WF.Definition
import iTasks.UI.Editor.Builtin, iTasks.UI.Editor.Combinators
import iTasks.UI.Editor.Controls, iTasks.UI.Editor.Modifiers
import iTasks.Internal.Task, iTasks.Internal.IWorld, iTasks.Internal.TaskStore
import StdBool, StdString, StdFile, StdArray
......
implementation module iTasks.Extensions.Editors.Ace
import iTasks
import iTasks.UI.Editor, iTasks.UI.Editor.Combinators, iTasks.UI.Definition
import iTasks.UI.Editor, iTasks.UI.Editor.Modifiers, iTasks.UI.Definition
import iTasks.UI.JS.Interface
import qualified Data.Map as DM
import Text
......
implementation module iTasks.Extensions.Form.Pikaday
import iTasks
import iTasks.UI.Definition, iTasks.UI.Editor, iTasks.UI.JS.Interface
import iTasks.UI.Editor.Combinators, iTasks.UI.Editor.Builtin
import iTasks.UI.Editor.Modifiers, iTasks.UI.Editor.Controls
import iTasks.Extensions.DateTime
import qualified Data.Map as DM
......
implementation module iTasks.Extensions.Image
import iTasks
import iTasks.UI.Definition, iTasks.UI.Editor.Builtin, iTasks.UI.Editor.Combinators
import iTasks.UI.Definition, iTasks.UI.Editor.Controls, iTasks.UI.Editor.Modifiers
import Text.HTML
gEditor{|WebImage|} = liftEditor (\{WebImage|src,alt,width,height} -> ImgTag [SrcAttr src,AltAttr alt,WidthAttr (toString width), HeightAttr (toString height)])
......
......@@ -4,8 +4,8 @@ import iTasks.WF.Definition
import iTasks.WF.Tasks.Interaction
import iTasks.UI.Definition
import iTasks.UI.Prompt
import iTasks.UI.Editor.Builtin
import iTasks.UI.Editor.Combinators
import iTasks.UI.Editor.Controls
import iTasks.UI.Editor.Modifiers
import iTasks.Internal.Task
import iTasks.Internal.TaskEval
import iTasks.Internal.TaskState
......
......@@ -3,7 +3,7 @@ import iTasks
import Text
import Data.Functor, Data.Either
import qualified Data.Map as DM
import iTasks.UI.Definition, iTasks.UI.Editor, iTasks.UI.Editor.Builtin, iTasks.UI.Editor.Combinators
import iTasks.UI.Definition, iTasks.UI.Editor, iTasks.UI.Editor.Controls, iTasks.UI.Editor.Modifiers
import iTasks.UI.Layout.Default
from iTasks.WF.Definition import :: InstanceProgress(..)
......
implementation module iTasks.Extensions.Web
import iTasks
import iTasks.UI.Editor.Builtin, iTasks.UI.Editor.Combinators
import iTasks.UI.Editor.Controls, iTasks.UI.Editor.Modifiers
import Internet.HTTP, Text, Text.HTML, Text.URI, Text.Encodings.MIME, Text.Encodings.UrlEncoding, StdArray, Data.Either
import System.Time, System.FilePath
......
implementation module iTasks.Internal.Test.Definition
import iTasks, StdFile, StdMisc
import iTasks.Extensions.Image
import iTasks.UI.Editor, iTasks.UI.Editor.Builtin, iTasks.UI.Editor.Common, iTasks.UI.Definition
import iTasks.UI.Editor, iTasks.UI.Editor.Controls, iTasks.UI.Editor.Common, iTasks.UI.Definition
import iTasks.Extensions.Editors.Ace
import iTasks.Internal.Serialization
import Text, Text.HTML, System.CommandLine
......
definition module iTasks.UI.Editor.Containers
/**
* Editor combinators for the builtin containers
* This module provides a set of editors for builtin controls
* of the client-side UI framework.
*
* To keep everything well-typed there are lots of boiler-plate versions to create the containers
*/
......@@ -45,3 +46,57 @@ window3 :: UIAttributes (Editor a) (Editor b) (Editor c) -> Editor (a,b,c)
window4 :: UIAttributes (Editor a) (Editor b) (Editor c) (Editor d) -> Editor (a,b,c,d)
window5 :: UIAttributes (Editor a) (Editor b) (Editor c) (Editor d) (Editor e) -> Editor (a,b,c,d,e)
//# UIMenu
menu :: UIAttributes -> Editor ()
menul :: UIAttributes (Editor a) -> Editor [a]
menu1 :: UIAttributes (Editor a) -> Editor a
menu2 :: UIAttributes (Editor a) (Editor b) -> Editor (a,b)
menu3 :: UIAttributes (Editor a) (Editor b) (Editor c) -> Editor (a,b,c)
menu4 :: UIAttributes (Editor a) (Editor b) (Editor c) (Editor d) -> Editor (a,b,c,d)
menu5 :: UIAttributes (Editor a) (Editor b) (Editor c) (Editor d) (Editor e) -> Editor (a,b,c,d,e)
//# UIToolBar
toolbar :: UIAttributes -> Editor ()
toolbarl :: UIAttributes (Editor a) -> Editor [a]
toolbar1 :: UIAttributes (Editor a) -> Editor a
toolbar2 :: UIAttributes (Editor a) (Editor b) -> Editor (a,b)
toolbar3 :: UIAttributes (Editor a) (Editor b) (Editor c) -> Editor (a,b,c)
toolbar4 :: UIAttributes (Editor a) (Editor b) (Editor c) (Editor d) -> Editor (a,b,c,d)
toolbar5 :: UIAttributes (Editor a) (Editor b) (Editor c) (Editor d) (Editor e) -> Editor (a,b,c,d,e)
//# UIButtonBar
buttonbar :: UIAttributes -> Editor ()
buttonbarl :: UIAttributes (Editor a) -> Editor [a]
buttonbar1 :: UIAttributes (Editor a) -> Editor a
buttonbar2 :: UIAttributes (Editor a) (Editor b) -> Editor (a,b)
buttonbar3 :: UIAttributes (Editor a) (Editor b) (Editor c) -> Editor (a,b,c)
buttonbar4 :: UIAttributes (Editor a) (Editor b) (Editor c) (Editor d) -> Editor (a,b,c,d)
buttonbar5 :: UIAttributes (Editor a) (Editor b) (Editor c) (Editor d) (Editor e) -> Editor (a,b,c,d,e)
//# UIList
list :: UIAttributes -> Editor ()
listl :: UIAttributes (Editor a) -> Editor [a]
list1 :: UIAttributes (Editor a) -> Editor a
list2 :: UIAttributes (Editor a) (Editor b) -> Editor (a,b)
list3 :: UIAttributes (Editor a) (Editor b) (Editor c) -> Editor (a,b,c)
list4 :: UIAttributes (Editor a) (Editor b) (Editor c) (Editor d) -> Editor (a,b,c,d)
list5 :: UIAttributes (Editor a) (Editor b) (Editor c) (Editor d) (Editor e) -> Editor (a,b,c,d,e)
//# UIListItem
listitem :: UIAttributes -> Editor ()
listiteml :: UIAttributes (Editor a) -> Editor [a]
listitem1 :: UIAttributes (Editor a) -> Editor a
listitem2 :: UIAttributes (Editor a) (Editor b) -> Editor (a,b)
listitem3 :: UIAttributes (Editor a) (Editor b) (Editor c) -> Editor (a,b,c)
listitem4 :: UIAttributes (Editor a) (Editor b) (Editor c) (Editor d) -> Editor (a,b,c,d)
listitem5 :: UIAttributes (Editor a) (Editor b) (Editor c) (Editor d) (Editor e) -> Editor (a,b,c,d,e)
//# UIDebug
debug :: UIAttributes -> Editor ()
debugl :: UIAttributes (Editor a) -> Editor [a]
debug1 :: UIAttributes (Editor a) -> Editor a
debug2 :: UIAttributes (Editor a) (Editor b) -> Editor (a,b)
debug3 :: UIAttributes (Editor a) (Editor b) (Editor c) -> Editor (a,b,c)
debug4 :: UIAttributes (Editor a) (Editor b) (Editor c) (Editor d) -> Editor (a,b,c,d)
debug5 :: UIAttributes (Editor a) (Editor b) (Editor c) (Editor d) (Editor e) -> Editor (a,b,c,d,e)
......@@ -358,3 +358,135 @@ window4 a e1 e2 e3 e4 = group4 UIWindow a e1 e2 e3 e4
window5 :: UIAttributes (Editor a) (Editor b) (Editor c) (Editor d) (Editor e) -> Editor (a,b,c,d,e)
window5 a e1 e2 e3 e4 e5 = group5 UIWindow a e1 e2 e3 e4 e5
//# UIMenu
menu :: UIAttributes -> Editor ()
menu a = group UIMenu a
menul :: UIAttributes (Editor a) -> Editor [a]
menul a e = groupl UIMenu a e
menu1 :: UIAttributes (Editor a) -> Editor a
menu1 a e1 = group1 UIMenu a e1
menu2 :: UIAttributes (Editor a) (Editor b) -> Editor (a,b)
menu2 a e1 e2 = group2 UIMenu a e1 e2
menu3 :: UIAttributes (Editor a) (Editor b) (Editor c) -> Editor (a,b,c)
menu3 a e1 e2 e3 = group3 UIMenu a e1 e2 e3
menu4 :: UIAttributes (Editor a) (Editor b) (Editor c) (Editor d) -> Editor (a,b,c,d)
menu4 a e1 e2 e3 e4 = group4 UIMenu a e1 e2 e3 e4
menu5 :: UIAttributes (Editor a) (Editor b) (Editor c) (Editor d) (Editor e) -> Editor (a,b,c,d,e)
menu5 a e1 e2 e3 e4 e5 = group5 UIMenu a e1 e2 e3 e4 e5
//# UIToolBar
toolbar :: UIAttributes -> Editor ()
toolbar a = group UIToolBar a
toolbarl :: UIAttributes (Editor a) -> Editor [a]
toolbarl a e = groupl UIToolBar a e
toolbar1 :: UIAttributes (Editor a) -> Editor a
toolbar1 a e1 = group1 UIToolBar a e1
toolbar2 :: UIAttributes (Editor a) (Editor b) -> Editor (a,b)
toolbar2 a e1 e2 = group2 UIToolBar a e1 e2
toolbar3 :: UIAttributes (Editor a) (Editor b) (Editor c) -> Editor (a,b,c)
toolbar3 a e1 e2 e3 = group3 UIToolBar a e1 e2 e3
toolbar4 :: UIAttributes (Editor a) (Editor b) (Editor c) (Editor d) -> Editor (a,b,c,d)
toolbar4 a e1 e2 e3 e4 = group4 UIToolBar a e1 e2 e3 e4
toolbar5 :: UIAttributes (Editor a) (Editor b) (Editor c) (Editor d) (Editor e) -> Editor (a,b,c,d,e)
toolbar5 a e1 e2 e3 e4 e5 = group5 UIToolBar a e1 e2 e3 e4 e5
//# UIButtonBar
buttonbar :: UIAttributes -> Editor ()
buttonbar a = group UIButtonBar a
buttonbarl :: UIAttributes (Editor a) -> Editor [a]
buttonbarl a e = groupl UIButtonBar a e
buttonbar1 :: UIAttributes (Editor a) -> Editor a
buttonbar1 a e1 = group1 UIButtonBar a e1
buttonbar2 :: UIAttributes (Editor a) (Editor b) -> Editor (a,b)
buttonbar2 a e1 e2 = group2 UIButtonBar a e1 e2
buttonbar3 :: UIAttributes (Editor a) (Editor b) (Editor c) -> Editor (a,b,c)
buttonbar3 a e1 e2 e3 = group3 UIButtonBar a e1 e2 e3
buttonbar4 :: UIAttributes (Editor a) (Editor b) (Editor c) (Editor d) -> Editor (a,b,c,d)
buttonbar4 a e1 e2 e3 e4 = group4 UIButtonBar a e1 e2 e3 e4
buttonbar5 :: UIAttributes (Editor a) (Editor b) (Editor c) (Editor d) (Editor e) -> Editor (a,b,c,d,e)
buttonbar5 a e1 e2 e3 e4 e5 = group5 UIButtonBar a e1 e2 e3 e4 e5
//# UIList
list :: UIAttributes -> Editor ()
list a = group UIList a
listl :: UIAttributes (Editor a) -> Editor [a]
listl a e = groupl UIList a e
list1 :: UIAttributes (Editor a) -> Editor a
list1 a e1 = group1 UIList a e1
list2 :: UIAttributes (Editor a) (Editor b) -> Editor (a,b)
list2 a e1 e2 = group2 UIList a e1 e2
list3 :: UIAttributes (Editor a) (Editor b) (Editor c) -> Editor (a,b,c)
list3 a e1 e2 e3 = group3 UIList a e1 e2 e3
list4 :: UIAttributes (Editor a) (Editor b) (Editor c) (Editor d) -> Editor (a,b,c,d)
list4 a e1 e2 e3 e4 = group4 UIList a e1 e2 e3 e4
list5 :: UIAttributes (Editor a) (Editor b) (Editor c) (Editor d) (Editor e) -> Editor (a,b,c,d,e)
list5 a e1 e2 e3 e4 e5 = group5 UIList a e1 e2 e3 e4 e5
//# UIListItem
listitem :: UIAttributes -> Editor ()
listitem a = group UIListItem a
listiteml :: UIAttributes (Editor a) -> Editor [a]
listiteml a e = groupl UIListItem a e
listitem1 :: UIAttributes (Editor a) -> Editor a
listitem1 a e1 = group1 UIListItem a e1
listitem2 :: UIAttributes (Editor a) (Editor b) -> Editor (a,b)
listitem2 a e1 e2 = group2 UIListItem a e1 e2
listitem3 :: UIAttributes (Editor a) (Editor b) (Editor c) -> Editor (a,b,c)
listitem3 a e1 e2 e3 = group3 UIListItem a e1 e2 e3
listitem4 :: UIAttributes (Editor a) (Editor b) (Editor c) (Editor d) -> Editor (a,b,c,d)
listitem4 a e1 e2 e3 e4 = group4 UIListItem a e1 e2 e3 e4
listitem5 :: UIAttributes (Editor a) (Editor b) (Editor c) (Editor d) (Editor e) -> Editor (a,b,c,d,e)
listitem5 a e1 e2 e3 e4 e5 = group5 UIListItem a e1 e2 e3 e4 e5
//# UIDebug
debug :: UIAttributes -> Editor ()
debug a = group UIDebug a
debugl :: UIAttributes (Editor a) -> Editor [a]
debugl a e = groupl UIDebug a e
debug1 :: UIAttributes (Editor a) -> Editor a
debug1 a e1 = group1 UIDebug a e1
debug2 :: UIAttributes (Editor a) (Editor b) -> Editor (a,b)
debug2 a e1 e2 = group2 UIDebug a e1 e2
debug3 :: UIAttributes (Editor a) (Editor b) (Editor c) -> Editor (a,b,c)
debug3 a e1 e2 e3 = group3 UIDebug a e1 e2 e3
debug4 :: UIAttributes (Editor a) (Editor b) (Editor c) (Editor d) -> Editor (a,b,c,d)
debug4 a e1 e2 e3 e4 = group4 UIDebug a e1 e2 e3 e4
debug5 :: UIAttributes (Editor a) (Editor b) (Editor c) (Editor d) (Editor e) -> Editor (a,b,c,d,e)
debug5 a e1 e2 e3 e4 e5 = group5 UIDebug a e1 e2 e3 e4 e5
definition module iTasks.UI.Editor.Builtin
definition module iTasks.UI.Editor.Controls
/**
* This module provides a set of editors that are standard available
* in the client-side UI framework.
* This module provides a set of editors for builtin controls
* of the client-side UI framework.
*/
from iTasks.UI.Editor import :: Editor
from iTasks.UI.Definition import :: UIAttributes
......
implementation module iTasks.UI.Editor.Builtin
implementation module iTasks.UI.Editor.Controls
import iTasks.UI.Definition, iTasks.UI.Editor
import StdFunc, StdBool, GenEq
......
......@@ -2,8 +2,8 @@ implementation module iTasks.UI.Editor.Generic
import iTasks.UI.Definition
import iTasks.UI.Editor
import iTasks.UI.Editor.Builtin
import iTasks.UI.Editor.Combinators
import iTasks.UI.Editor.Controls
import iTasks.UI.Editor.Modifiers
import iTasks.UI.Editor.Common
import iTasks.SDS.Definition
......
definition module iTasks.UI.Editor.Combinators
definition module iTasks.UI.Editor.Modifiers
/**
* This module provides combinator functions for combining editors
*/
......
implementation module iTasks.UI.Editor.Combinators
implementation module iTasks.UI.Editor.Modifiers
import StdBool
import iTasks.UI.Editor, iTasks.UI.Definition
......
......@@ -3,7 +3,7 @@ definition module iTasks.WF.Tasks.Interaction
import iTasks.WF.Definition
from iTasks.WF.Combinators.Core import :: Action
from iTasks.UI.Prompt import class toPrompt
from iTasks.UI.Editor.Builtin import :: ChoiceText, :: ChoiceGrid, :: ChoiceNode
from iTasks.UI.Editor.Controls import :: ChoiceText, :: ChoiceGrid, :: ChoiceNode
from iTasks.SDS.Definition import :: Shared, :: SDS, :: RWShared, :: ReadWriteShared
from Data.Functor import class Functor
......
......@@ -15,7 +15,7 @@ import iTasks.SDS.Sources.Core
import iTasks.SDS.Sources.System
import iTasks.SDS.Combinators.Common
import iTasks.Internal.Util
import iTasks.UI.Layout, iTasks.UI.Definition, iTasks.UI.Editor, iTasks.UI.Prompt, iTasks.UI.Editor.Builtin
import iTasks.UI.Layout, iTasks.UI.Definition, iTasks.UI.Editor, iTasks.UI.Prompt, iTasks.UI.Editor.Controls
import Text.HTML
derive class iTask ChoiceText, ChoiceGrid, ChoiceRow, ChoiceNode
......
......@@ -3,7 +3,7 @@ implementation module Tests.Interactive.BuiltinContainers
* Tests for the builtin containers in the client library
*/
import iTasks, iTasks.Internal.Test.Definition
import iTasks.UI.Definition, iTasks.UI.Layout, iTasks.UI.Editor.Builtin, iTasks.UI.Editor.Combinators
import iTasks.UI.Definition, iTasks.UI.Layout, iTasks.UI.Editor.Controls, iTasks.UI.Editor.Modifiers
import Data.List
import qualified Data.Map as DM
......
implementation module Tests.Interactive.BuiltinEditors
import iTasks, iTasks.Internal.Test.Definition
import iTasks.UI.Editor.Builtin, iTasks.UI.Editor.Common, iTasks.UI.Definition
import iTasks.UI.Editor.Controls, iTasks.UI.Editor.Common, iTasks.UI.Definition
import qualified Data.Map as DM
import Text.HTML
......
implementation module Tests.Interactive.CustomEditors
import iTasks, iTasks.Internal.Test.Definition
import iTasks.UI.Definition, iTasks.UI.Editor.Builtin, iTasks.UI.Editor.Combinators
import iTasks.UI.Definition, iTasks.UI.Editor.Controls, iTasks.UI.Editor.Modifiers
import iTasks.Extensions.DateTime
import qualified Data.Map as DM
......
......@@ -2,7 +2,7 @@ implementation module Tests.Interactive.TaskPatterns
import iTasks.Internal.Test.Definition
import Data.Maybe, Text
import qualified Data.Map as DM
import iTasks.UI.Editor.Builtin
import iTasks.UI.Editor.Controls
testTaskPatternsI :: TestSuite
testTaskPatternsI = testsuite "Task patterns" "Tests for common task patterns"
......
......@@ -11,7 +11,7 @@ import qualified Data.Map as DM
import iTasks
import iTasks.Internal.Test.Definition
import iTasks.UI.Definition
import iTasks.UI.Editor, iTasks.UI.Editor.Builtin, iTasks.UI.Editor.Common
import iTasks.UI.Editor, iTasks.UI.Editor.Controls, iTasks.UI.Editor.Modifiers
import iTasks.Extensions.Editors.Ace
import iTasks.Extensions.Development.Codebase
import iTasks.Extensions.Development.Testing
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment