Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
gargantext-ihaskell
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gargantext
gargantext-ihaskell
Commits
43b0f387
Commit
43b0f387
authored
Mar 06, 2017
by
Andrei Barbu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update widgets for the latest ipywidgets. Most widgets work
parent
0b889810
Changes
34
Hide whitespace changes
Inline
Side-by-side
Showing
34 changed files
with
85 additions
and
207 deletions
+85
-207
Widgets.hs
...-display/ihaskell-widgets/src/IHaskell/Display/Widgets.hs
+1
-3
CheckBox.hs
...ell-widgets/src/IHaskell/Display/Widgets/Bool/CheckBox.hs
+1
-1
ToggleButton.hs
...widgets/src/IHaskell/Display/Widgets/Bool/ToggleButton.hs
+1
-1
Valid.hs
...askell-widgets/src/IHaskell/Display/Widgets/Bool/Valid.hs
+1
-1
Box.hs
.../ihaskell-widgets/src/IHaskell/Display/Widgets/Box/Box.hs
+1
-1
FlexBox.hs
...skell-widgets/src/IHaskell/Display/Widgets/Box/FlexBox.hs
+1
-1
PlaceProxy.hs
...ll-widgets/src/IHaskell/Display/Widgets/Box/PlaceProxy.hs
+0
-57
Proxy.hs
...haskell-widgets/src/IHaskell/Display/Widgets/Box/Proxy.hs
+0
-57
Accordion.hs
...skell/Display/Widgets/Box/SelectionContainer/Accordion.hs
+1
-1
Tab.hs
...rc/IHaskell/Display/Widgets/Box/SelectionContainer/Tab.hs
+1
-1
Button.hs
...y/ihaskell-widgets/src/IHaskell/Display/Widgets/Button.hs
+1
-1
BoundedFloatText.hs
...ll/Display/Widgets/Float/BoundedFloat/BoundedFloatText.hs
+1
-1
FloatProgress.hs
...skell/Display/Widgets/Float/BoundedFloat/FloatProgress.hs
+1
-1
FloatSlider.hs
...Haskell/Display/Widgets/Float/BoundedFloat/FloatSlider.hs
+1
-1
FloatRangeSlider.hs
...splay/Widgets/Float/BoundedFloatRange/FloatRangeSlider.hs
+1
-1
FloatText.hs
...l-widgets/src/IHaskell/Display/Widgets/Float/FloatText.hs
+1
-1
Image.hs
...ay/ihaskell-widgets/src/IHaskell/Display/Widgets/Image.hs
+1
-1
BoundedIntText.hs
...IHaskell/Display/Widgets/Int/BoundedInt/BoundedIntText.hs
+1
-1
IntProgress.hs
...rc/IHaskell/Display/Widgets/Int/BoundedInt/IntProgress.hs
+1
-1
IntSlider.hs
.../src/IHaskell/Display/Widgets/Int/BoundedInt/IntSlider.hs
+1
-1
IntRangeSlider.hs
...ell/Display/Widgets/Int/BoundedIntRange/IntRangeSlider.hs
+1
-1
IntText.hs
...skell-widgets/src/IHaskell/Display/Widgets/Int/IntText.hs
+1
-1
Interactive.hs
...skell-widgets/src/IHaskell/Display/Widgets/Interactive.hs
+1
-0
Output.hs
...y/ihaskell-widgets/src/IHaskell/Display/Widgets/Output.hs
+1
-1
Dropdown.hs
...idgets/src/IHaskell/Display/Widgets/Selection/Dropdown.hs
+1
-1
RadioButtons.hs
...ts/src/IHaskell/Display/Widgets/Selection/RadioButtons.hs
+1
-1
Select.hs
...-widgets/src/IHaskell/Display/Widgets/Selection/Select.hs
+1
-1
SelectMultiple.hs
.../src/IHaskell/Display/Widgets/Selection/SelectMultiple.hs
+1
-1
ToggleButtons.hs
...s/src/IHaskell/Display/Widgets/Selection/ToggleButtons.hs
+1
-1
HTML.hs
...skell-widgets/src/IHaskell/Display/Widgets/String/HTML.hs
+1
-1
Label.hs
...kell-widgets/src/IHaskell/Display/Widgets/String/Label.hs
+12
-12
Text.hs
...skell-widgets/src/IHaskell/Display/Widgets/String/Text.hs
+1
-1
TextArea.hs
...l-widgets/src/IHaskell/Display/Widgets/String/TextArea.hs
+1
-1
Types.hs
...ay/ihaskell-widgets/src/IHaskell/Display/Widgets/Types.hs
+43
-50
No files found.
ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets.hs
View file @
43b0f387
...
@@ -3,8 +3,6 @@ module IHaskell.Display.Widgets (module X) where
...
@@ -3,8 +3,6 @@ module IHaskell.Display.Widgets (module X) where
import
IHaskell.Display.Widgets.Button
as
X
import
IHaskell.Display.Widgets.Button
as
X
import
IHaskell.Display.Widgets.Box.Box
as
X
import
IHaskell.Display.Widgets.Box.Box
as
X
import
IHaskell.Display.Widgets.Box.Proxy
as
X
import
IHaskell.Display.Widgets.Box.PlaceProxy
as
X
import
IHaskell.Display.Widgets.Box.FlexBox
as
X
import
IHaskell.Display.Widgets.Box.FlexBox
as
X
import
IHaskell.Display.Widgets.Box.SelectionContainer.Accordion
as
X
import
IHaskell.Display.Widgets.Box.SelectionContainer.Accordion
as
X
import
IHaskell.Display.Widgets.Box.SelectionContainer.Tab
as
X
import
IHaskell.Display.Widgets.Box.SelectionContainer.Tab
as
X
...
@@ -36,7 +34,7 @@ import IHaskell.Display.Widgets.Selection.ToggleButtons as X
...
@@ -36,7 +34,7 @@ import IHaskell.Display.Widgets.Selection.ToggleButtons as X
import
IHaskell.Display.Widgets.Selection.SelectMultiple
as
X
import
IHaskell.Display.Widgets.Selection.SelectMultiple
as
X
import
IHaskell.Display.Widgets.String.HTML
as
X
import
IHaskell.Display.Widgets.String.HTML
as
X
import
IHaskell.Display.Widgets.String.La
tex
as
X
import
IHaskell.Display.Widgets.String.La
bel
as
X
import
IHaskell.Display.Widgets.String.Text
as
X
import
IHaskell.Display.Widgets.String.Text
as
X
import
IHaskell.Display.Widgets.String.TextArea
as
X
import
IHaskell.Display.Widgets.String.TextArea
as
X
...
...
ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/Bool/CheckBox.hs
View file @
43b0f387
...
@@ -33,7 +33,7 @@ mkCheckBox = do
...
@@ -33,7 +33,7 @@ mkCheckBox = do
-- Default properties, with a random uuid
-- Default properties, with a random uuid
uuid
<-
U
.
random
uuid
<-
U
.
random
let
widgetState
=
WidgetState
$
defaultBoolWidget
"CheckboxView"
let
widgetState
=
WidgetState
$
defaultBoolWidget
"CheckboxView"
"CheckboxModel"
stateIO
<-
newIORef
widgetState
stateIO
<-
newIORef
widgetState
...
...
ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/Bool/ToggleButton.hs
View file @
43b0f387
...
@@ -34,7 +34,7 @@ mkToggleButton = do
...
@@ -34,7 +34,7 @@ mkToggleButton = do
-- Default properties, with a random uuid
-- Default properties, with a random uuid
uuid
<-
U
.
random
uuid
<-
U
.
random
let
boolState
=
defaultBoolWidget
"ToggleButtonView"
let
boolState
=
defaultBoolWidget
"ToggleButtonView"
"ToggleButtonModel"
toggleState
=
(
Tooltip
=::
""
)
toggleState
=
(
Tooltip
=::
""
)
:&
(
Icon
=::
""
)
:&
(
Icon
=::
""
)
:&
(
ButtonStyle
=::
DefaultButton
)
:&
(
ButtonStyle
=::
DefaultButton
)
...
...
ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/Bool/Valid.hs
View file @
43b0f387
...
@@ -32,7 +32,7 @@ mkValidWidget = do
...
@@ -32,7 +32,7 @@ mkValidWidget = do
-- Default properties, with a random uuid
-- Default properties, with a random uuid
uuid
<-
U
.
random
uuid
<-
U
.
random
let
boolState
=
defaultBoolWidget
"ValidView"
let
boolState
=
defaultBoolWidget
"ValidView"
"ValidModel"
validState
=
(
ReadOutMsg
=::
""
)
:&
RNil
validState
=
(
ReadOutMsg
=::
""
)
:&
RNil
widgetState
=
WidgetState
$
boolState
<+>
validState
widgetState
=
WidgetState
$
boolState
<+>
validState
...
...
ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/Box/Box.hs
View file @
43b0f387
...
@@ -30,7 +30,7 @@ mkBox = do
...
@@ -30,7 +30,7 @@ mkBox = do
-- Default properties, with a random uuid
-- Default properties, with a random uuid
uuid
<-
U
.
random
uuid
<-
U
.
random
let
widgetState
=
WidgetState
$
defaultBoxWidget
"BoxView"
let
widgetState
=
WidgetState
$
defaultBoxWidget
"BoxView"
"BoxModel"
stateIO
<-
newIORef
widgetState
stateIO
<-
newIORef
widgetState
...
...
ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/Box/FlexBox.hs
View file @
43b0f387
...
@@ -32,7 +32,7 @@ mkFlexBox = do
...
@@ -32,7 +32,7 @@ mkFlexBox = do
-- Default properties, with a random uuid
-- Default properties, with a random uuid
uuid
<-
U
.
random
uuid
<-
U
.
random
let
boxAttrs
=
defaultBoxWidget
"FlexBoxView"
let
boxAttrs
=
defaultBoxWidget
"FlexBoxView"
"FlexBoxModel"
flxAttrs
=
(
Orientation
=::
HorizontalOrientation
)
flxAttrs
=
(
Orientation
=::
HorizontalOrientation
)
:&
(
Flex
=::
0
)
:&
(
Flex
=::
0
)
:&
(
Pack
=::
StartLocation
)
:&
(
Pack
=::
StartLocation
)
...
...
ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/Box/PlaceProxy.hs
deleted
100644 → 0
View file @
0b889810
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE TypeSynonymInstances #-}
module
IHaskell.Display.Widgets.Box.PlaceProxy
(
-- * The PlaceProxy widget
PlaceProxy
,
-- * Constructor
mkPlaceProxy
)
where
-- To keep `cabal repl` happy when running from the ihaskell repo
import
Prelude
import
Data.Aeson
import
Data.IORef
(
newIORef
)
import
Data.Vinyl
(
Rec
(
..
),
(
<+>
))
import
Data.Vinyl.Lens
(
rput
)
import
IHaskell.Display
import
IHaskell.Eval.Widgets
import
IHaskell.IPython.Message.UUID
as
U
import
IHaskell.Display.Widgets.Types
import
IHaskell.Display.Widgets.Common
-- | A 'Box' represents a Box widget from IPython.html.widgets.
type
PlaceProxy
=
IPythonWidget
PlaceProxyType
-- | Create a new box
mkPlaceProxy
::
IO
PlaceProxy
mkPlaceProxy
=
do
-- Default properties, with a random uuid
uuid
<-
U
.
random
let
widgetClassState
=
defaultWidget
"PlaceProxyView"
baseState
=
rput
(
ModelName
=::
"ProxyModel"
)
widgetClassState
proxyState
=
(
Child
=::
Nothing
)
:&
(
Selector
=::
""
)
:&
RNil
widgetState
=
WidgetState
$
baseState
<+>
proxyState
stateIO
<-
newIORef
widgetState
let
widget
=
IPythonWidget
uuid
stateIO
-- Open a comm for this widget, and store it in the kernel state
widgetSendOpen
widget
$
toJSON
widgetState
-- Return the widget
return
widget
instance
IHaskellDisplay
PlaceProxy
where
display
b
=
do
widgetSendView
b
return
$
Display
[]
instance
IHaskellWidget
PlaceProxy
where
getCommUUID
=
uuid
ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/Box/Proxy.hs
deleted
100644 → 0
View file @
0b889810
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE TypeSynonymInstances #-}
module
IHaskell.Display.Widgets.Box.Proxy
(
-- * The Proxy widget
ProxyWidget
,
-- * Constructor
mkProxyWidget
)
where
-- To keep `cabal repl` happy when running from the ihaskell repo
import
Prelude
import
Data.Aeson
import
Data.IORef
(
newIORef
)
import
Data.Vinyl
(
Rec
(
..
),
(
<+>
))
import
Data.Vinyl.Lens
(
rput
)
import
IHaskell.Display
import
IHaskell.Eval.Widgets
import
IHaskell.IPython.Message.UUID
as
U
import
IHaskell.Display.Widgets.Types
import
IHaskell.Display.Widgets.Common
-- | A 'Box' represents a Box widget from IPython.html.widgets.
type
ProxyWidget
=
IPythonWidget
ProxyType
-- | Create a new box
mkProxyWidget
::
IO
ProxyWidget
mkProxyWidget
=
do
-- Default properties, with a random uuid
uuid
<-
U
.
random
let
widgetClassState
=
defaultWidget
"ProxyView"
baseState
=
rput
(
ModelName
=::
"ProxyModel"
)
widgetClassState
proxyState
=
(
Child
=::
Nothing
)
:&
RNil
widgetState
=
WidgetState
$
baseState
<+>
proxyState
stateIO
<-
newIORef
widgetState
let
proxy
=
IPythonWidget
uuid
stateIO
-- Open a comm for this widget, and store it in the kernel state
widgetSendOpen
proxy
$
toJSON
widgetState
-- Return the widget
return
proxy
instance
IHaskellDisplay
ProxyWidget
where
display
b
=
do
widgetSendView
b
return
$
Display
[]
instance
IHaskellWidget
ProxyWidget
where
getCommUUID
=
uuid
ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/Box/SelectionContainer/Accordion.hs
View file @
43b0f387
...
@@ -34,7 +34,7 @@ mkAccordion = do
...
@@ -34,7 +34,7 @@ mkAccordion = do
-- Default properties, with a random uuid
-- Default properties, with a random uuid
uuid
<-
U
.
random
uuid
<-
U
.
random
let
widgetState
=
WidgetState
$
defaultSelectionContainerWidget
"AccordionView"
let
widgetState
=
WidgetState
$
defaultSelectionContainerWidget
"AccordionView"
"AccordionModel"
stateIO
<-
newIORef
widgetState
stateIO
<-
newIORef
widgetState
...
...
ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/Box/SelectionContainer/Tab.hs
View file @
43b0f387
...
@@ -34,7 +34,7 @@ mkTabWidget = do
...
@@ -34,7 +34,7 @@ mkTabWidget = do
-- Default properties, with a random uuid
-- Default properties, with a random uuid
uuid
<-
U
.
random
uuid
<-
U
.
random
let
widgetState
=
WidgetState
$
defaultSelectionContainerWidget
"TabView"
let
widgetState
=
WidgetState
$
defaultSelectionContainerWidget
"TabView"
"TabModel"
stateIO
<-
newIORef
widgetState
stateIO
<-
newIORef
widgetState
...
...
ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/Button.hs
View file @
43b0f387
...
@@ -35,7 +35,7 @@ mkButton = do
...
@@ -35,7 +35,7 @@ mkButton = do
-- Default properties, with a random uuid
-- Default properties, with a random uuid
uuid
<-
U
.
random
uuid
<-
U
.
random
let
dom
=
defaultDOMWidget
"ButtonView"
let
dom
=
defaultDOMWidget
"ButtonView"
"ButtonModel"
but
=
(
Description
=::
""
)
but
=
(
Description
=::
""
)
:&
(
Tooltip
=::
""
)
:&
(
Tooltip
=::
""
)
:&
(
Disabled
=::
False
)
:&
(
Disabled
=::
False
)
...
...
ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/Float/BoundedFloat/BoundedFloatText.hs
View file @
43b0f387
...
@@ -35,7 +35,7 @@ mkBoundedFloatText = do
...
@@ -35,7 +35,7 @@ mkBoundedFloatText = do
-- Default properties, with a random uuid
-- Default properties, with a random uuid
uuid
<-
U
.
random
uuid
<-
U
.
random
let
widgetState
=
WidgetState
$
defaultBoundedFloatWidget
"FloatTextView"
let
widgetState
=
WidgetState
$
defaultBoundedFloatWidget
"FloatTextView"
"FloatTextModel"
stateIO
<-
newIORef
widgetState
stateIO
<-
newIORef
widgetState
...
...
ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/Float/BoundedFloat/FloatProgress.hs
View file @
43b0f387
...
@@ -32,7 +32,7 @@ mkFloatProgress = do
...
@@ -32,7 +32,7 @@ mkFloatProgress = do
-- Default properties, with a random uuid
-- Default properties, with a random uuid
uuid
<-
U
.
random
uuid
<-
U
.
random
let
boundedFloatAttrs
=
defaultBoundedFloatWidget
"ProgressView"
let
boundedFloatAttrs
=
defaultBoundedFloatWidget
"ProgressView"
"ProgressModel"
progressAttrs
=
(
Orientation
=::
HorizontalOrientation
)
progressAttrs
=
(
Orientation
=::
HorizontalOrientation
)
:&
(
BarStyle
=::
DefaultBar
)
:&
(
BarStyle
=::
DefaultBar
)
:&
RNil
:&
RNil
...
...
ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/Float/BoundedFloat/FloatSlider.hs
View file @
43b0f387
...
@@ -35,7 +35,7 @@ mkFloatSlider = do
...
@@ -35,7 +35,7 @@ mkFloatSlider = do
-- Default properties, with a random uuid
-- Default properties, with a random uuid
uuid
<-
U
.
random
uuid
<-
U
.
random
let
boundedFloatAttrs
=
defaultBoundedFloatWidget
"FloatSliderView"
let
boundedFloatAttrs
=
defaultBoundedFloatWidget
"FloatSliderView"
"FloatSliderModel"
sliderAttrs
=
(
Orientation
=::
HorizontalOrientation
)
sliderAttrs
=
(
Orientation
=::
HorizontalOrientation
)
:&
(
ShowRange
=::
False
)
:&
(
ShowRange
=::
False
)
:&
(
ReadOut
=::
True
)
:&
(
ReadOut
=::
True
)
...
...
ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/Float/BoundedFloatRange/FloatRangeSlider.hs
View file @
43b0f387
...
@@ -37,7 +37,7 @@ mkFloatRangeSlider = do
...
@@ -37,7 +37,7 @@ mkFloatRangeSlider = do
-- Default properties, with a random uuid
-- Default properties, with a random uuid
uuid
<-
U
.
random
uuid
<-
U
.
random
let
boundedFloatAttrs
=
defaultBoundedFloatRangeWidget
"FloatSliderView"
let
boundedFloatAttrs
=
defaultBoundedFloatRangeWidget
"FloatSliderView"
"FloatSliderModel"
sliderAttrs
=
(
Orientation
=::
HorizontalOrientation
)
sliderAttrs
=
(
Orientation
=::
HorizontalOrientation
)
:&
(
ShowRange
=::
True
)
:&
(
ShowRange
=::
True
)
:&
(
ReadOut
=::
True
)
:&
(
ReadOut
=::
True
)
...
...
ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/Float/FloatText.hs
View file @
43b0f387
...
@@ -34,7 +34,7 @@ mkFloatText = do
...
@@ -34,7 +34,7 @@ mkFloatText = do
-- Default properties, with a random uuid
-- Default properties, with a random uuid
uuid
<-
U
.
random
uuid
<-
U
.
random
let
widgetState
=
WidgetState
$
defaultFloatWidget
"FloatTextView"
let
widgetState
=
WidgetState
$
defaultFloatWidget
"FloatTextView"
"FloatTextModel"
stateIO
<-
newIORef
widgetState
stateIO
<-
newIORef
widgetState
...
...
ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/Image.hs
View file @
43b0f387
...
@@ -33,7 +33,7 @@ mkImageWidget = do
...
@@ -33,7 +33,7 @@ mkImageWidget = do
-- Default properties, with a random uuid
-- Default properties, with a random uuid
uuid
<-
U
.
random
uuid
<-
U
.
random
let
dom
=
defaultDOMWidget
"ImageView"
let
dom
=
defaultDOMWidget
"ImageView"
"ImageModel"
img
=
(
ImageFormat
=::
PNG
)
img
=
(
ImageFormat
=::
PNG
)
:&
(
Width
=:+
0
)
:&
(
Width
=:+
0
)
:&
(
Height
=:+
0
)
:&
(
Height
=:+
0
)
...
...
ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/Int/BoundedInt/BoundedIntText.hs
View file @
43b0f387
...
@@ -34,7 +34,7 @@ mkBoundedIntText = do
...
@@ -34,7 +34,7 @@ mkBoundedIntText = do
-- Default properties, with a random uuid
-- Default properties, with a random uuid
uuid
<-
U
.
random
uuid
<-
U
.
random
let
widgetState
=
WidgetState
$
defaultBoundedIntWidget
"IntTextView"
let
widgetState
=
WidgetState
$
defaultBoundedIntWidget
"IntTextView"
"IntTextModel"
stateIO
<-
newIORef
widgetState
stateIO
<-
newIORef
widgetState
...
...
ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/Int/BoundedInt/IntProgress.hs
View file @
43b0f387
...
@@ -32,7 +32,7 @@ mkIntProgress = do
...
@@ -32,7 +32,7 @@ mkIntProgress = do
-- Default properties, with a random uuid
-- Default properties, with a random uuid
uuid
<-
U
.
random
uuid
<-
U
.
random
let
boundedIntAttrs
=
defaultBoundedIntWidget
"ProgressView"
let
boundedIntAttrs
=
defaultBoundedIntWidget
"ProgressView"
"ProgressModel"
progressAttrs
=
(
Orientation
=::
HorizontalOrientation
)
progressAttrs
=
(
Orientation
=::
HorizontalOrientation
)
:&
(
BarStyle
=::
DefaultBar
)
:&
(
BarStyle
=::
DefaultBar
)
:&
RNil
:&
RNil
...
...
ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/Int/BoundedInt/IntSlider.hs
View file @
43b0f387
...
@@ -35,7 +35,7 @@ mkIntSlider = do
...
@@ -35,7 +35,7 @@ mkIntSlider = do
-- Default properties, with a random uuid
-- Default properties, with a random uuid
uuid
<-
U
.
random
uuid
<-
U
.
random
let
boundedIntAttrs
=
defaultBoundedIntWidget
"IntSliderView"
let
boundedIntAttrs
=
defaultBoundedIntWidget
"IntSliderView"
"IntSliderModel"
sliderAttrs
=
(
Orientation
=::
HorizontalOrientation
)
sliderAttrs
=
(
Orientation
=::
HorizontalOrientation
)
:&
(
ShowRange
=::
False
)
:&
(
ShowRange
=::
False
)
:&
(
ReadOut
=::
True
)
:&
(
ReadOut
=::
True
)
...
...
ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/Int/BoundedIntRange/IntRangeSlider.hs
View file @
43b0f387
...
@@ -36,7 +36,7 @@ mkIntRangeSlider = do
...
@@ -36,7 +36,7 @@ mkIntRangeSlider = do
-- Default properties, with a random uuid
-- Default properties, with a random uuid
uuid
<-
U
.
random
uuid
<-
U
.
random
let
boundedIntAttrs
=
defaultBoundedIntRangeWidget
"IntSliderView"
let
boundedIntAttrs
=
defaultBoundedIntRangeWidget
"IntSliderView"
"IntSliderModel"
sliderAttrs
=
(
Orientation
=::
HorizontalOrientation
)
sliderAttrs
=
(
Orientation
=::
HorizontalOrientation
)
:&
(
ShowRange
=::
True
)
:&
(
ShowRange
=::
True
)
:&
(
ReadOut
=::
True
)
:&
(
ReadOut
=::
True
)
...
...
ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/Int/IntText.hs
View file @
43b0f387
...
@@ -34,7 +34,7 @@ mkIntText = do
...
@@ -34,7 +34,7 @@ mkIntText = do
-- Default properties, with a random uuid
-- Default properties, with a random uuid
uuid
<-
U
.
random
uuid
<-
U
.
random
let
widgetState
=
WidgetState
$
defaultIntWidget
"IntTextView"
let
widgetState
=
WidgetState
$
defaultIntWidget
"IntTextView"
"IntTextModel"
stateIO
<-
newIORef
widgetState
stateIO
<-
newIORef
widgetState
...
...
ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/Interactive.hs
View file @
43b0f387
...
@@ -5,6 +5,7 @@
...
@@ -5,6 +5,7 @@
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE UndecidableSuperClasses #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE PolyKinds #-}
module
IHaskell.Display.Widgets.Interactive
(
interactive
,
uncurryHList
,
Rec
(
..
),
Argument
(
..
))
where
module
IHaskell.Display.Widgets.Interactive
(
interactive
,
uncurryHList
,
Rec
(
..
),
Argument
(
..
))
where
...
...
ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/Output.hs
View file @
43b0f387
...
@@ -36,7 +36,7 @@ mkOutputWidget = do
...
@@ -36,7 +36,7 @@ mkOutputWidget = do
-- Default properties, with a random uuid
-- Default properties, with a random uuid
uuid
<-
U
.
random
uuid
<-
U
.
random
let
widgetState
=
WidgetState
$
defaultDOMWidget
"OutputView"
let
widgetState
=
WidgetState
$
defaultDOMWidget
"OutputView"
"OutputModel"
stateIO
<-
newIORef
widgetState
stateIO
<-
newIORef
widgetState
...
...
ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/Selection/Dropdown.hs
View file @
43b0f387
...
@@ -34,7 +34,7 @@ mkDropdown :: IO Dropdown
...
@@ -34,7 +34,7 @@ mkDropdown :: IO Dropdown
mkDropdown
=
do
mkDropdown
=
do
-- Default properties, with a random uuid
-- Default properties, with a random uuid
uuid
<-
U
.
random
uuid
<-
U
.
random
let
selectionAttrs
=
defaultSelectionWidget
"DropdownView"
let
selectionAttrs
=
defaultSelectionWidget
"DropdownView"
"DropdownModel"
dropdownAttrs
=
(
ButtonStyle
=::
DefaultButton
)
:&
RNil
dropdownAttrs
=
(
ButtonStyle
=::
DefaultButton
)
:&
RNil
widgetState
=
WidgetState
$
selectionAttrs
<+>
dropdownAttrs
widgetState
=
WidgetState
$
selectionAttrs
<+>
dropdownAttrs
...
...
ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/Selection/RadioButtons.hs
View file @
43b0f387
...
@@ -33,7 +33,7 @@ mkRadioButtons :: IO RadioButtons
...
@@ -33,7 +33,7 @@ mkRadioButtons :: IO RadioButtons
mkRadioButtons
=
do
mkRadioButtons
=
do
-- Default properties, with a random uuid
-- Default properties, with a random uuid
uuid
<-
U
.
random
uuid
<-
U
.
random
let
widgetState
=
WidgetState
$
defaultSelectionWidget
"RadioButtonsView"
let
widgetState
=
WidgetState
$
defaultSelectionWidget
"RadioButtonsView"
"RadioButtonsModel"
stateIO
<-
newIORef
widgetState
stateIO
<-
newIORef
widgetState
...
...
ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/Selection/Select.hs
View file @
43b0f387
...
@@ -34,7 +34,7 @@ mkSelect :: IO Select
...
@@ -34,7 +34,7 @@ mkSelect :: IO Select
mkSelect
=
do
mkSelect
=
do
-- Default properties, with a random uuid
-- Default properties, with a random uuid
uuid
<-
U
.
random
uuid
<-
U
.
random
let
widgetState
=
WidgetState
$
defaultSelectionWidget
"SelectView"
let
widgetState
=
WidgetState
$
defaultSelectionWidget
"SelectView"
"SelectModel"
stateIO
<-
newIORef
widgetState
stateIO
<-
newIORef
widgetState
...
...
ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/Selection/SelectMultiple.hs
View file @
43b0f387
...
@@ -34,7 +34,7 @@ mkSelectMultiple :: IO SelectMultiple
...
@@ -34,7 +34,7 @@ mkSelectMultiple :: IO SelectMultiple
mkSelectMultiple
=
do
mkSelectMultiple
=
do
-- Default properties, with a random uuid
-- Default properties, with a random uuid
uuid
<-
U
.
random
uuid
<-
U
.
random
let
widgetState
=
WidgetState
$
defaultMultipleSelectionWidget
"SelectMultipleView"
let
widgetState
=
WidgetState
$
defaultMultipleSelectionWidget
"SelectMultipleView"
"SelectMultipleModel"
stateIO
<-
newIORef
widgetState
stateIO
<-
newIORef
widgetState
...
...
ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/Selection/ToggleButtons.hs
View file @
43b0f387
...
@@ -34,7 +34,7 @@ mkToggleButtons :: IO ToggleButtons
...
@@ -34,7 +34,7 @@ mkToggleButtons :: IO ToggleButtons
mkToggleButtons
=
do
mkToggleButtons
=
do
-- Default properties, with a random uuid
-- Default properties, with a random uuid
uuid
<-
U
.
random
uuid
<-
U
.
random
let
selectionAttrs
=
defaultSelectionWidget
"ToggleButtonsView"
let
selectionAttrs
=
defaultSelectionWidget
"ToggleButtonsView"
"ToggleButtonsModel"
toggleButtonsAttrs
=
(
Tooltips
=::
[]
)
toggleButtonsAttrs
=
(
Tooltips
=::
[]
)
:&
(
Icons
=::
[]
)
:&
(
Icons
=::
[]
)
:&
(
ButtonStyle
=::
DefaultButton
)
:&
(
ButtonStyle
=::
DefaultButton
)
...
...
ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/String/HTML.hs
View file @
43b0f387
...
@@ -29,7 +29,7 @@ mkHTMLWidget :: IO HTMLWidget
...
@@ -29,7 +29,7 @@ mkHTMLWidget :: IO HTMLWidget
mkHTMLWidget
=
do
mkHTMLWidget
=
do
-- Default properties, with a random uuid
-- Default properties, with a random uuid
uuid
<-
U
.
random
uuid
<-
U
.
random
let
widgetState
=
WidgetState
$
defaultStringWidget
"HTMLView"
let
widgetState
=
WidgetState
$
defaultStringWidget
"HTMLView"
"HTMLModel"
stateIO
<-
newIORef
widgetState
stateIO
<-
newIORef
widgetState
...
...
ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/String/La
tex
.hs
→
ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/String/La
bel
.hs
View file @
43b0f387
...
@@ -3,11 +3,11 @@
...
@@ -3,11 +3,11 @@
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE TypeSynonymInstances #-}
module
IHaskell.Display.Widgets.String.La
tex
(
module
IHaskell.Display.Widgets.String.La
bel
(
-- * The La
tex
Widget
-- * The La
bel
Widget
La
tex
Widget
,
La
bel
Widget
,
-- * Constructor
-- * Constructor
mkLa
tex
Widget
)
where
mkLa
bel
Widget
)
where
-- To keep `cabal repl` happy when running from the ihaskell repo
-- To keep `cabal repl` happy when running from the ihaskell repo
import
Prelude
import
Prelude
...
@@ -21,15 +21,15 @@ import IHaskell.IPython.Message.UUID as U
...
@@ -21,15 +21,15 @@ import IHaskell.IPython.Message.UUID as U
import
IHaskell.Display.Widgets.Types
import
IHaskell.Display.Widgets.Types
-- | A 'La
texWidget' represents a Latex
widget from IPython.html.widgets.
-- | A 'La
belWidget' represents a Label
widget from IPython.html.widgets.
type
La
texWidget
=
IPythonWidget
Latex
Type
type
La
belWidget
=
IPythonWidget
Label
Type
-- | Create a new La
tex
widget
-- | Create a new La
bel
widget
mkLa
texWidget
::
IO
Latex
Widget
mkLa
belWidget
::
IO
Label
Widget
mkLa
tex
Widget
=
do
mkLa
bel
Widget
=
do
-- Default properties, with a random uuid
-- Default properties, with a random uuid
uuid
<-
U
.
random
uuid
<-
U
.
random
let
widgetState
=
WidgetState
$
defaultStringWidget
"La
texView
"
let
widgetState
=
WidgetState
$
defaultStringWidget
"La
belView"
"LabelModel
"
stateIO
<-
newIORef
widgetState
stateIO
<-
newIORef
widgetState
...
@@ -41,10 +41,10 @@ mkLatexWidget = do
...
@@ -41,10 +41,10 @@ mkLatexWidget = do
-- Return the widget
-- Return the widget
return
widget
return
widget
instance
IHaskellDisplay
La
tex
Widget
where
instance
IHaskellDisplay
La
bel
Widget
where
display
b
=
do
display
b
=
do
widgetSendView
b
widgetSendView
b
return
$
Display
[]
return
$
Display
[]
instance
IHaskellWidget
La
tex
Widget
where
instance
IHaskellWidget
La
bel
Widget
where
getCommUUID
=
uuid
getCommUUID
=
uuid
ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/String/Text.hs
View file @
43b0f387
...
@@ -33,7 +33,7 @@ mkTextWidget :: IO TextWidget
...
@@ -33,7 +33,7 @@ mkTextWidget :: IO TextWidget
mkTextWidget
=
do
mkTextWidget
=
do
-- Default properties, with a random uuid
-- Default properties, with a random uuid
uuid
<-
U
.
random
uuid
<-
U
.
random
let
strWidget
=
defaultStringWidget
"TextView"
let
strWidget
=
defaultStringWidget
"TextView"
"TextModel"
txtWidget
=
(
SubmitHandler
=::
return
()
)
:&
(
ChangeHandler
=::
return
()
)
:&
RNil
txtWidget
=
(
SubmitHandler
=::
return
()
)
:&
(
ChangeHandler
=::
return
()
)
:&
RNil
widgetState
=
WidgetState
$
strWidget
<+>
txtWidget
widgetState
=
WidgetState
$
strWidget
<+>
txtWidget
...
...
ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/String/TextArea.hs
View file @
43b0f387
...
@@ -33,7 +33,7 @@ mkTextArea :: IO TextArea
...
@@ -33,7 +33,7 @@ mkTextArea :: IO TextArea
mkTextArea
=
do
mkTextArea
=
do
-- Default properties, with a random uuid
-- Default properties, with a random uuid
uuid
<-
U
.
random
uuid
<-
U
.
random
let
strAttrs
=
defaultStringWidget
"TextareaView"
let
strAttrs
=
defaultStringWidget
"TextareaView"
"TextareaModel"
wgtAttrs
=
(
ChangeHandler
=::
return
()
)
:&
RNil
wgtAttrs
=
(
ChangeHandler
=::
return
()
)
:&
RNil
widgetState
=
WidgetState
$
strAttrs
<+>
wgtAttrs
widgetState
=
WidgetState
$
strAttrs
<+>
wgtAttrs
...
...
ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/Types.hs
View file @
43b0f387
...
@@ -241,7 +241,7 @@ data WidgetType = ButtonType
...
@@ -241,7 +241,7 @@ data WidgetType = ButtonType
|
ImageType
|
ImageType
|
OutputType
|
OutputType
|
HTMLType
|
HTMLType
|
La
tex
Type
|
La
bel
Type
|
TextType
|
TextType
|
TextAreaType
|
TextAreaType
|
CheckBoxType
|
CheckBoxType
...
@@ -263,8 +263,6 @@ data WidgetType = ButtonType
...
@@ -263,8 +263,6 @@ data WidgetType = ButtonType
|
FloatProgressType
|
FloatProgressType
|
FloatRangeSliderType
|
FloatRangeSliderType
|
BoxType
|
BoxType
|
ProxyType
|
PlaceProxyType
|
FlexBoxType
|
FlexBoxType
|
AccordionType
|
AccordionType
|
TabType
|
TabType
...
@@ -280,7 +278,7 @@ type family WidgetFields (w :: WidgetType) :: [Field] where
...
@@ -280,7 +278,7 @@ type family WidgetFields (w :: WidgetType) :: [Field] where
DOMWidgetClass
:++
'[
S
.
ImageFormat
,
S
.
Width
,
S
.
Height
,
S
.
B64Value
]
DOMWidgetClass
:++
'[
S
.
ImageFormat
,
S
.
Width
,
S
.
Height
,
S
.
B64Value
]
WidgetFields
OutputType
=
DOMWidgetClass
WidgetFields
OutputType
=
DOMWidgetClass
WidgetFields
HTMLType
=
StringClass
WidgetFields
HTMLType
=
StringClass
WidgetFields
La
tex
Type
=
StringClass
WidgetFields
La
bel
Type
=
StringClass
WidgetFields
TextType
=
WidgetFields
TextType
=
StringClass
:++
'[
S
.
SubmitHandler
,
S
.
ChangeHandler
]
StringClass
:++
'[
S
.
SubmitHandler
,
S
.
ChangeHandler
]
WidgetFields
TextAreaType
=
StringClass
:++
'[
S
.
ChangeHandler
]
WidgetFields
TextAreaType
=
StringClass
:++
'[
S
.
ChangeHandler
]
...
@@ -315,9 +313,6 @@ type family WidgetFields (w :: WidgetType) :: [Field] where
...
@@ -315,9 +313,6 @@ type family WidgetFields (w :: WidgetType) :: [Field] where
BoundedFloatRangeClass
:++
BoundedFloatRangeClass
:++
'[
S
.
Orientation
,
S
.
ShowRange
,
S
.
ReadOut
,
S
.
SliderColor
]
'[
S
.
Orientation
,
S
.
ShowRange
,
S
.
ReadOut
,
S
.
SliderColor
]
WidgetFields
BoxType
=
BoxClass
WidgetFields
BoxType
=
BoxClass
WidgetFields
ProxyType
=
WidgetClass
:++
'[
S
.
Child
]
WidgetFields
PlaceProxyType
=
WidgetFields
ProxyType
:++
'[
S
.
Selector
]
WidgetFields
FlexBoxType
=
WidgetFields
FlexBoxType
=
BoxClass
:++
'[
S
.
Orientation
,
S
.
Flex
,
S
.
Pack
,
S
.
Align
]
BoxClass
:++
'[
S
.
Orientation
,
S
.
Flex
,
S
.
Pack
,
S
.
Align
]
WidgetFields
AccordionType
=
SelectionContainerClass
WidgetFields
AccordionType
=
SelectionContainerClass
...
@@ -619,23 +614,23 @@ s =:+ val = Attr
...
@@ -619,23 +614,23 @@ s =:+ val = Attr
(
reflect
s
)
(
reflect
s
)
-- | Get a field from a singleton Adapted from: http://stackoverflow.com/a/28033250/2388535
-- | Get a field from a singleton Adapted from: http://stackoverflow.com/a/28033250/2388535
reflect
::
forall
(
f
::
Field
)
.
(
SingI
f
,
SingKind
(
'K
P
roxy
::
KProxy
Field
)
)
=>
Sing
f
->
Field
reflect
::
forall
(
f
::
Field
)
.
(
SingI
f
)
=>
Sing
f
->
Field
reflect
=
fromSing
reflect
=
fromSing
-- | A record representing an object of the Widget class from IPython
-- | A record representing an object of the Widget class from IPython
defaultWidget
::
FieldType
S
.
ViewName
->
Rec
Attr
WidgetClass
defaultWidget
::
FieldType
S
.
ViewName
->
FieldType
S
.
ModelName
->
Rec
Attr
WidgetClass
defaultWidget
viewName
=
(
ViewModule
=::
"
"
)
defaultWidget
viewName
modelName
=
(
ViewModule
=::
"jupyter-js-widgets
"
)
:&
(
ViewName
=::
viewName
)
:&
(
ViewName
=::
viewName
)
:&
(
ModelModule
=::
"
"
)
:&
(
ModelModule
=::
"jupyter-js-widgets
"
)
:&
(
ModelName
=::
"WidgetModel"
)
:&
(
ModelName
=::
modelName
)
:&
(
MsgThrottle
=:+
3
)
:&
(
MsgThrottle
=:+
3
)
:&
(
Version
=::
0
)
:&
(
Version
=::
0
)
:&
(
DisplayHandler
=::
return
()
)
:&
(
DisplayHandler
=::
return
()
)
:&
RNil
:&
RNil
-- | A record representing an object of the DOMWidget class from IPython
-- | A record representing an object of the DOMWidget class from IPython
defaultDOMWidget
::
FieldType
S
.
ViewName
->
Rec
Attr
DOMWidgetClass
defaultDOMWidget
::
FieldType
S
.
ViewName
->
FieldType
S
.
ModelName
->
Rec
Attr
DOMWidgetClass
defaultDOMWidget
viewName
=
defaultWidget
view
Name
<+>
domAttrs
defaultDOMWidget
viewName
modelName
=
defaultWidget
viewName
model
Name
<+>
domAttrs
where
where
domAttrs
=
(
Visible
=::
True
)
domAttrs
=
(
Visible
=::
True
)
:&
(
CSS
=::
[]
)
:&
(
CSS
=::
[]
)
...
@@ -657,8 +652,8 @@ defaultDOMWidget viewName = defaultWidget viewName <+> domAttrs
...
@@ -657,8 +652,8 @@ defaultDOMWidget viewName = defaultWidget viewName <+> domAttrs
:&
RNil
:&
RNil
-- | A record representing a widget of the _String class from IPython
-- | A record representing a widget of the _String class from IPython
defaultStringWidget
::
FieldType
S
.
ViewName
->
Rec
Attr
StringClass
defaultStringWidget
::
FieldType
S
.
ViewName
->
FieldType
S
.
ModelName
->
Rec
Attr
StringClass
defaultStringWidget
viewName
=
defaultDOMWidget
view
Name
<+>
strAttrs
defaultStringWidget
viewName
modelName
=
defaultDOMWidget
viewName
model
Name
<+>
strAttrs
where
where
strAttrs
=
(
StringValue
=::
""
)
strAttrs
=
(
StringValue
=::
""
)
:&
(
Disabled
=::
False
)
:&
(
Disabled
=::
False
)
...
@@ -667,8 +662,8 @@ defaultStringWidget viewName = defaultDOMWidget viewName <+> strAttrs
...
@@ -667,8 +662,8 @@ defaultStringWidget viewName = defaultDOMWidget viewName <+> strAttrs
:&
RNil
:&
RNil
-- | A record representing a widget of the _Bool class from IPython
-- | A record representing a widget of the _Bool class from IPython
defaultBoolWidget
::
FieldType
S
.
ViewName
->
Rec
Attr
BoolClass
defaultBoolWidget
::
FieldType
S
.
ViewName
->
FieldType
S
.
ModelName
->
Rec
Attr
BoolClass
defaultBoolWidget
viewName
=
defaultDOMWidget
view
Name
<+>
boolAttrs
defaultBoolWidget
viewName
modelName
=
defaultDOMWidget
viewName
model
Name
<+>
boolAttrs
where
where
boolAttrs
=
(
BoolValue
=::
False
)
boolAttrs
=
(
BoolValue
=::
False
)
:&
(
Disabled
=::
False
)
:&
(
Disabled
=::
False
)
...
@@ -677,8 +672,8 @@ defaultBoolWidget viewName = defaultDOMWidget viewName <+> boolAttrs
...
@@ -677,8 +672,8 @@ defaultBoolWidget viewName = defaultDOMWidget viewName <+> boolAttrs
:&
RNil
:&
RNil
-- | A record representing a widget of the _Selection class from IPython
-- | A record representing a widget of the _Selection class from IPython
defaultSelectionWidget
::
FieldType
S
.
ViewName
->
Rec
Attr
SelectionClass
defaultSelectionWidget
::
FieldType
S
.
ViewName
->
FieldType
S
.
ModelName
->
Rec
Attr
SelectionClass
defaultSelectionWidget
viewName
=
defaultDOMWidget
view
Name
<+>
selectionAttrs
defaultSelectionWidget
viewName
modelName
=
defaultDOMWidget
viewName
model
Name
<+>
selectionAttrs
where
where
selectionAttrs
=
(
Options
=::
OptionLabels
[]
)
selectionAttrs
=
(
Options
=::
OptionLabels
[]
)
:&
(
SelectedValue
=::
""
)
:&
(
SelectedValue
=::
""
)
...
@@ -689,8 +684,8 @@ defaultSelectionWidget viewName = defaultDOMWidget viewName <+> selectionAttrs
...
@@ -689,8 +684,8 @@ defaultSelectionWidget viewName = defaultDOMWidget viewName <+> selectionAttrs
:&
RNil
:&
RNil
-- | A record representing a widget of the _MultipleSelection class from IPython
-- | A record representing a widget of the _MultipleSelection class from IPython
defaultMultipleSelectionWidget
::
FieldType
S
.
ViewName
->
Rec
Attr
MultipleSelectionClass
defaultMultipleSelectionWidget
::
FieldType
S
.
ViewName
->
FieldType
S
.
ModelName
->
Rec
Attr
MultipleSelectionClass
defaultMultipleSelectionWidget
viewName
=
defaultDOMWidget
view
Name
<+>
mulSelAttrs
defaultMultipleSelectionWidget
viewName
modelName
=
defaultDOMWidget
viewName
model
Name
<+>
mulSelAttrs
where
where
mulSelAttrs
=
(
Options
=::
OptionLabels
[]
)
mulSelAttrs
=
(
Options
=::
OptionLabels
[]
)
:&
(
SelectedValues
=::
[]
)
:&
(
SelectedValues
=::
[]
)
...
@@ -701,8 +696,8 @@ defaultMultipleSelectionWidget viewName = defaultDOMWidget viewName <+> mulSelAt
...
@@ -701,8 +696,8 @@ defaultMultipleSelectionWidget viewName = defaultDOMWidget viewName <+> mulSelAt
:&
RNil
:&
RNil
-- | A record representing a widget of the _Int class from IPython
-- | A record representing a widget of the _Int class from IPython
defaultIntWidget
::
FieldType
S
.
ViewName
->
Rec
Attr
IntClass
defaultIntWidget
::
FieldType
S
.
ViewName
->
FieldType
S
.
ModelName
->
Rec
Attr
IntClass
defaultIntWidget
viewName
=
defaultDOMWidget
view
Name
<+>
intAttrs
defaultIntWidget
viewName
modelName
=
defaultDOMWidget
viewName
model
Name
<+>
intAttrs
where
where
intAttrs
=
(
IntValue
=::
0
)
intAttrs
=
(
IntValue
=::
0
)
:&
(
Disabled
=::
False
)
:&
(
Disabled
=::
False
)
...
@@ -711,8 +706,8 @@ defaultIntWidget viewName = defaultDOMWidget viewName <+> intAttrs
...
@@ -711,8 +706,8 @@ defaultIntWidget viewName = defaultDOMWidget viewName <+> intAttrs
:&
RNil
:&
RNil
-- | A record representing a widget of the _BoundedInt class from IPython
-- | A record representing a widget of the _BoundedInt class from IPython
defaultBoundedIntWidget
::
FieldType
S
.
ViewName
->
Rec
Attr
BoundedIntClass
defaultBoundedIntWidget
::
FieldType
S
.
ViewName
->
FieldType
S
.
ModelName
->
Rec
Attr
BoundedIntClass
defaultBoundedIntWidget
viewName
=
defaultIntWidget
view
Name
<+>
boundedIntAttrs
defaultBoundedIntWidget
viewName
modelName
=
defaultIntWidget
viewName
model
Name
<+>
boundedIntAttrs
where
where
boundedIntAttrs
=
(
StepInt
=::
1
)
boundedIntAttrs
=
(
StepInt
=::
1
)
:&
(
MinInt
=::
0
)
:&
(
MinInt
=::
0
)
...
@@ -720,8 +715,8 @@ defaultBoundedIntWidget viewName = defaultIntWidget viewName <+> boundedIntAttrs
...
@@ -720,8 +715,8 @@ defaultBoundedIntWidget viewName = defaultIntWidget viewName <+> boundedIntAttrs
:&
RNil
:&
RNil
-- | A record representing a widget of the _BoundedInt class from IPython
-- | A record representing a widget of the _BoundedInt class from IPython
defaultIntRangeWidget
::
FieldType
S
.
ViewName
->
Rec
Attr
IntRangeClass
defaultIntRangeWidget
::
FieldType
S
.
ViewName
->
FieldType
S
.
ModelName
->
Rec
Attr
IntRangeClass
defaultIntRangeWidget
viewName
=
defaultIntWidget
view
Name
<+>
rangeAttrs
defaultIntRangeWidget
viewName
modelName
=
defaultIntWidget
viewName
model
Name
<+>
rangeAttrs
where
where
rangeAttrs
=
(
IntPairValue
=::
(
25
,
75
))
rangeAttrs
=
(
IntPairValue
=::
(
25
,
75
))
:&
(
LowerInt
=::
0
)
:&
(
LowerInt
=::
0
)
...
@@ -729,8 +724,8 @@ defaultIntRangeWidget viewName = defaultIntWidget viewName <+> rangeAttrs
...
@@ -729,8 +724,8 @@ defaultIntRangeWidget viewName = defaultIntWidget viewName <+> rangeAttrs
:&
RNil
:&
RNil
-- | A record representing a widget of the _BoundedIntRange class from IPython
-- | A record representing a widget of the _BoundedIntRange class from IPython
defaultBoundedIntRangeWidget
::
FieldType
S
.
ViewName
->
Rec
Attr
BoundedIntRangeClass
defaultBoundedIntRangeWidget
::
FieldType
S
.
ViewName
->
FieldType
S
.
ModelName
->
Rec
Attr
BoundedIntRangeClass
defaultBoundedIntRangeWidget
viewName
=
defaultIntRangeWidget
view
Name
<+>
boundedIntRangeAttrs
defaultBoundedIntRangeWidget
viewName
modelName
=
defaultIntRangeWidget
viewName
model
Name
<+>
boundedIntRangeAttrs
where
where
boundedIntRangeAttrs
=
(
StepInt
=:+
1
)
boundedIntRangeAttrs
=
(
StepInt
=:+
1
)
:&
(
MinInt
=::
0
)
:&
(
MinInt
=::
0
)
...
@@ -738,8 +733,8 @@ defaultBoundedIntRangeWidget viewName = defaultIntRangeWidget viewName <+> bound
...
@@ -738,8 +733,8 @@ defaultBoundedIntRangeWidget viewName = defaultIntRangeWidget viewName <+> bound
:&
RNil
:&
RNil
-- | A record representing a widget of the _Float class from IPython
-- | A record representing a widget of the _Float class from IPython
defaultFloatWidget
::
FieldType
S
.
ViewName
->
Rec
Attr
FloatClass
defaultFloatWidget
::
FieldType
S
.
ViewName
->
FieldType
S
.
ModelName
->
Rec
Attr
FloatClass
defaultFloatWidget
viewName
=
defaultDOMWidget
view
Name
<+>
intAttrs
defaultFloatWidget
viewName
modelName
=
defaultDOMWidget
viewName
model
Name
<+>
intAttrs
where
where
intAttrs
=
(
FloatValue
=::
0
)
intAttrs
=
(
FloatValue
=::
0
)
:&
(
Disabled
=::
False
)
:&
(
Disabled
=::
False
)
...
@@ -748,8 +743,8 @@ defaultFloatWidget viewName = defaultDOMWidget viewName <+> intAttrs
...
@@ -748,8 +743,8 @@ defaultFloatWidget viewName = defaultDOMWidget viewName <+> intAttrs
:&
RNil
:&
RNil
-- | A record representing a widget of the _BoundedFloat class from IPython
-- | A record representing a widget of the _BoundedFloat class from IPython
defaultBoundedFloatWidget
::
FieldType
S
.
ViewName
->
Rec
Attr
BoundedFloatClass
defaultBoundedFloatWidget
::
FieldType
S
.
ViewName
->
FieldType
S
.
ModelName
->
Rec
Attr
BoundedFloatClass
defaultBoundedFloatWidget
viewName
=
defaultFloatWidget
view
Name
<+>
boundedFloatAttrs
defaultBoundedFloatWidget
viewName
modelName
=
defaultFloatWidget
viewName
model
Name
<+>
boundedFloatAttrs
where
where
boundedFloatAttrs
=
(
StepFloat
=:+
1
)
boundedFloatAttrs
=
(
StepFloat
=:+
1
)
:&
(
MinFloat
=::
0
)
:&
(
MinFloat
=::
0
)
...
@@ -757,8 +752,8 @@ defaultBoundedFloatWidget viewName = defaultFloatWidget viewName <+> boundedFloa
...
@@ -757,8 +752,8 @@ defaultBoundedFloatWidget viewName = defaultFloatWidget viewName <+> boundedFloa
:&
RNil
:&
RNil
-- | A record representing a widget of the _BoundedFloat class from IPython
-- | A record representing a widget of the _BoundedFloat class from IPython
defaultFloatRangeWidget
::
FieldType
S
.
ViewName
->
Rec
Attr
FloatRangeClass
defaultFloatRangeWidget
::
FieldType
S
.
ViewName
->
FieldType
S
.
ModelName
->
Rec
Attr
FloatRangeClass
defaultFloatRangeWidget
viewName
=
defaultFloatWidget
view
Name
<+>
rangeAttrs
defaultFloatRangeWidget
viewName
modelName
=
defaultFloatWidget
viewName
model
Name
<+>
rangeAttrs
where
where
rangeAttrs
=
(
FloatPairValue
=::
(
25
,
75
))
rangeAttrs
=
(
FloatPairValue
=::
(
25
,
75
))
:&
(
LowerFloat
=::
0
)
:&
(
LowerFloat
=::
0
)
...
@@ -766,8 +761,8 @@ defaultFloatRangeWidget viewName = defaultFloatWidget viewName <+> rangeAttrs
...
@@ -766,8 +761,8 @@ defaultFloatRangeWidget viewName = defaultFloatWidget viewName <+> rangeAttrs
:&
RNil
:&
RNil
-- | A record representing a widget of the _BoundedFloatRange class from IPython
-- | A record representing a widget of the _BoundedFloatRange class from IPython
defaultBoundedFloatRangeWidget
::
FieldType
S
.
ViewName
->
Rec
Attr
BoundedFloatRangeClass
defaultBoundedFloatRangeWidget
::
FieldType
S
.
ViewName
->
FieldType
S
.
ModelName
->
Rec
Attr
BoundedFloatRangeClass
defaultBoundedFloatRangeWidget
viewName
=
defaultFloatRangeWidget
view
Name
<+>
boundedFloatRangeAttrs
defaultBoundedFloatRangeWidget
viewName
modelName
=
defaultFloatRangeWidget
viewName
model
Name
<+>
boundedFloatRangeAttrs
where
where
boundedFloatRangeAttrs
=
(
StepFloat
=:+
1
)
boundedFloatRangeAttrs
=
(
StepFloat
=:+
1
)
:&
(
MinFloat
=::
0
)
:&
(
MinFloat
=::
0
)
...
@@ -775,20 +770,18 @@ defaultBoundedFloatRangeWidget viewName = defaultFloatRangeWidget viewName <+> b
...
@@ -775,20 +770,18 @@ defaultBoundedFloatRangeWidget viewName = defaultFloatRangeWidget viewName <+> b
:&
RNil
:&
RNil
-- | A record representing a widget of the _Box class from IPython
-- | A record representing a widget of the _Box class from IPython
defaultBoxWidget
::
FieldType
S
.
ViewName
->
Rec
Attr
BoxClass
defaultBoxWidget
::
FieldType
S
.
ViewName
->
FieldType
S
.
ModelName
->
Rec
Attr
BoxClass
defaultBoxWidget
viewName
=
domAttrs
<+>
box
Attrs
defaultBoxWidget
viewName
modelName
=
defaultDOMWidget
viewName
modelName
<+>
int
Attrs
where
where
defaultDOM
=
defaultDOMWidget
viewName
intAttrs
=
(
Children
=::
[]
)
domAttrs
=
rput
(
ModelName
=::
"BoxModel"
)
defaultDOM
boxAttrs
=
(
Children
=::
[]
)
:&
(
OverflowX
=::
DefaultOverflow
)
:&
(
OverflowX
=::
DefaultOverflow
)
:&
(
OverflowY
=::
DefaultOverflow
)
:&
(
OverflowY
=::
DefaultOverflow
)
:&
(
BoxStyle
=::
DefaultBox
)
:&
(
BoxStyle
=::
DefaultBox
)
:&
RNil
:&
RNil
-- | A record representing a widget of the _SelectionContainer class from IPython
-- | A record representing a widget of the _SelectionContainer class from IPython
defaultSelectionContainerWidget
::
FieldType
S
.
ViewName
->
Rec
Attr
SelectionContainerClass
defaultSelectionContainerWidget
::
FieldType
S
.
ViewName
->
FieldType
S
.
ModelName
->
Rec
Attr
SelectionContainerClass
defaultSelectionContainerWidget
viewName
=
defaultBoxWidget
view
Name
<+>
selAttrs
defaultSelectionContainerWidget
viewName
modelName
=
defaultBoxWidget
viewName
model
Name
<+>
selAttrs
where
where
selAttrs
=
(
Titles
=::
[]
)
selAttrs
=
(
Titles
=::
[]
)
:&
(
SelectedIndex
=::
0
)
:&
(
SelectedIndex
=::
0
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment