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
Expand all
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
This diff is collapsed.
Click to expand it.
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