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
abf2a721
Commit
abf2a721
authored
Jul 30, 2021
by
David Davó
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added DesciptionStyle
parent
45fcace9
Changes
39
Hide whitespace changes
Inline
Side-by-side
Showing
39 changed files
with
317 additions
and
100 deletions
+317
-100
ihaskell-widgets.cabal
ihaskell-display/ihaskell-widgets/ihaskell-widgets.cabal
+2
-0
Widgets.hs
...-display/ihaskell-widgets/src/IHaskell/Display/Widgets.hs
+3
-0
CheckBox.hs
...ell-widgets/src/IHaskell/Display/Widgets/Bool/CheckBox.hs
+3
-1
ToggleButton.hs
...widgets/src/IHaskell/Display/Widgets/Bool/ToggleButton.hs
+3
-1
Valid.hs
...askell-widgets/src/IHaskell/Display/Widgets/Bool/Valid.hs
+3
-1
Button.hs
...y/ihaskell-widgets/src/IHaskell/Display/Widgets/Button.hs
+6
-35
ColorPicker.hs
...skell-widgets/src/IHaskell/Display/Widgets/ColorPicker.hs
+3
-1
Common.hs
...y/ihaskell-widgets/src/IHaskell/Display/Widgets/Common.hs
+1
-0
DatePicker.hs
...askell-widgets/src/IHaskell/Display/Widgets/DatePicker.hs
+3
-1
BoundedFloatText.hs
...ll/Display/Widgets/Float/BoundedFloat/BoundedFloatText.hs
+3
-1
FloatLogSlider.hs
...kell/Display/Widgets/Float/BoundedFloat/FloatLogSlider.hs
+3
-1
FloatProgress.hs
...skell/Display/Widgets/Float/BoundedFloat/FloatProgress.hs
+3
-1
FloatSlider.hs
...Haskell/Display/Widgets/Float/BoundedFloat/FloatSlider.hs
+3
-1
FloatRangeSlider.hs
...splay/Widgets/Float/BoundedFloatRange/FloatRangeSlider.hs
+3
-1
FloatText.hs
...l-widgets/src/IHaskell/Display/Widgets/Float/FloatText.hs
+3
-1
BoundedIntText.hs
...IHaskell/Display/Widgets/Int/BoundedInt/BoundedIntText.hs
+3
-1
IntProgress.hs
...rc/IHaskell/Display/Widgets/Int/BoundedInt/IntProgress.hs
+3
-1
IntSlider.hs
.../src/IHaskell/Display/Widgets/Int/BoundedInt/IntSlider.hs
+3
-1
Play.hs
...dgets/src/IHaskell/Display/Widgets/Int/BoundedInt/Play.hs
+3
-1
IntRangeSlider.hs
...ell/Display/Widgets/Int/BoundedIntRange/IntRangeSlider.hs
+3
-1
IntText.hs
...skell-widgets/src/IHaskell/Display/Widgets/Int/IntText.hs
+3
-1
Dropdown.hs
...idgets/src/IHaskell/Display/Widgets/Selection/Dropdown.hs
+3
-1
RadioButtons.hs
...ts/src/IHaskell/Display/Widgets/Selection/RadioButtons.hs
+3
-1
Select.hs
...-widgets/src/IHaskell/Display/Widgets/Selection/Select.hs
+3
-1
SelectMultiple.hs
.../src/IHaskell/Display/Widgets/Selection/SelectMultiple.hs
+3
-1
SelectionRangeSlider.hs
...Haskell/Display/Widgets/Selection/SelectionRangeSlider.hs
+3
-1
SelectionSlider.hs
...src/IHaskell/Display/Widgets/Selection/SelectionSlider.hs
+3
-1
ToggleButtons.hs
...s/src/IHaskell/Display/Widgets/Selection/ToggleButtons.hs
+3
-1
Singletons.hs
...askell-widgets/src/IHaskell/Display/Widgets/Singletons.hs
+1
-0
Combobox.hs
...l-widgets/src/IHaskell/Display/Widgets/String/Combobox.hs
+3
-1
HTML.hs
...skell-widgets/src/IHaskell/Display/Widgets/String/HTML.hs
+3
-1
HTMLMath.hs
...l-widgets/src/IHaskell/Display/Widgets/String/HTMLMath.hs
+3
-1
Label.hs
...kell-widgets/src/IHaskell/Display/Widgets/String/Label.hs
+3
-1
Password.hs
...l-widgets/src/IHaskell/Display/Widgets/String/Password.hs
+3
-1
Text.hs
...skell-widgets/src/IHaskell/Display/Widgets/String/Text.hs
+3
-1
TextArea.hs
...l-widgets/src/IHaskell/Display/Widgets/String/TextArea.hs
+3
-1
ButtonStyle.hs
...widgets/src/IHaskell/Display/Widgets/Style/ButtonStyle.hs
+54
-0
DescriptionStyle.hs
...ts/src/IHaskell/Display/Widgets/Style/DescriptionStyle.hs
+53
-0
Types.hs
...ay/ihaskell-widgets/src/IHaskell/Display/Widgets/Types.hs
+104
-34
No files found.
ihaskell-display/ihaskell-widgets/ihaskell-widgets.cabal
View file @
abf2a721
...
@@ -106,6 +106,8 @@ library
...
@@ -106,6 +106,8 @@ library
IHaskell.Display.Widgets.String.Password
IHaskell.Display.Widgets.String.Password
IHaskell.Display.Widgets.String.Text
IHaskell.Display.Widgets.String.Text
IHaskell.Display.Widgets.String.TextArea
IHaskell.Display.Widgets.String.TextArea
IHaskell.Display.Widgets.Style.ButtonStyle
IHaskell.Display.Widgets.Style.DescriptionStyle
IHaskell.Display.Widgets.Layout.Common
IHaskell.Display.Widgets.Layout.Common
IHaskell.Display.Widgets.Layout.LayoutWidget
IHaskell.Display.Widgets.Layout.LayoutWidget
...
...
ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets.hs
View file @
abf2a721
...
@@ -55,6 +55,9 @@ import IHaskell.Display.Widgets.String.Password as X
...
@@ -55,6 +55,9 @@ import IHaskell.Display.Widgets.String.Password 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
import
IHaskell.Display.Widgets.Style.ButtonStyle
as
X
import
IHaskell.Display.Widgets.Style.DescriptionStyle
as
X
import
IHaskell.Display.Widgets.Common
as
X
import
IHaskell.Display.Widgets.Common
as
X
import
IHaskell.Display.Widgets.Types
as
X
(
setField
,
getField
,
properties
,
triggerDisplay
,
import
IHaskell.Display.Widgets.Types
as
X
(
setField
,
getField
,
properties
,
triggerDisplay
,
triggerChange
,
triggerClick
,
triggerSelection
,
triggerChange
,
triggerClick
,
triggerSelection
,
...
...
ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/Bool/CheckBox.hs
View file @
abf2a721
...
@@ -27,6 +27,7 @@ import IHaskell.IPython.Message.UUID as U
...
@@ -27,6 +27,7 @@ import IHaskell.IPython.Message.UUID as U
import
IHaskell.Display.Widgets.Types
import
IHaskell.Display.Widgets.Types
import
IHaskell.Display.Widgets.Common
import
IHaskell.Display.Widgets.Common
import
IHaskell.Display.Widgets.Layout.LayoutWidget
import
IHaskell.Display.Widgets.Layout.LayoutWidget
import
IHaskell.Display.Widgets.Style.DescriptionStyle
-- | A 'CheckBox' represents a Checkbox widget from IPython.html.widgets.
-- | A 'CheckBox' represents a Checkbox widget from IPython.html.widgets.
type
CheckBox
=
IPythonWidget
'C
h
eckBoxType
type
CheckBox
=
IPythonWidget
'C
h
eckBoxType
...
@@ -37,8 +38,9 @@ mkCheckBox = do
...
@@ -37,8 +38,9 @@ mkCheckBox = do
-- Default properties, with a random uuid
-- Default properties, with a random uuid
wid
<-
U
.
random
wid
<-
U
.
random
layout
<-
mkLayout
layout
<-
mkLayout
dstyle
<-
mkDescriptionStyle
let
boolAttrs
=
defaultBoolWidget
"CheckboxView"
"CheckboxModel"
layout
let
boolAttrs
=
defaultBoolWidget
"CheckboxView"
"CheckboxModel"
layout
dstyle
checkBoxAttrs
=
(
Indent
=::
True
)
checkBoxAttrs
=
(
Indent
=::
True
)
:&
RNil
:&
RNil
widgetState
=
WidgetState
$
boolAttrs
<+>
checkBoxAttrs
widgetState
=
WidgetState
$
boolAttrs
<+>
checkBoxAttrs
...
...
ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/Bool/ToggleButton.hs
View file @
abf2a721
...
@@ -27,6 +27,7 @@ import IHaskell.IPython.Message.UUID as U
...
@@ -27,6 +27,7 @@ import IHaskell.IPython.Message.UUID as U
import
IHaskell.Display.Widgets.Types
import
IHaskell.Display.Widgets.Types
import
IHaskell.Display.Widgets.Common
import
IHaskell.Display.Widgets.Common
import
IHaskell.Display.Widgets.Layout.LayoutWidget
import
IHaskell.Display.Widgets.Layout.LayoutWidget
import
IHaskell.Display.Widgets.Style.DescriptionStyle
-- | A 'ToggleButton' represents a ToggleButton widget from IPython.html.widgets.
-- | A 'ToggleButton' represents a ToggleButton widget from IPython.html.widgets.
type
ToggleButton
=
IPythonWidget
'T
o
ggleButtonType
type
ToggleButton
=
IPythonWidget
'T
o
ggleButtonType
...
@@ -37,8 +38,9 @@ mkToggleButton = do
...
@@ -37,8 +38,9 @@ mkToggleButton = do
-- Default properties, with a random uuid
-- Default properties, with a random uuid
wid
<-
U
.
random
wid
<-
U
.
random
layout
<-
mkLayout
layout
<-
mkLayout
dstyle
<-
mkDescriptionStyle
let
boolState
=
defaultBoolWidget
"ToggleButtonView"
"ToggleButtonModel"
layout
let
boolState
=
defaultBoolWidget
"ToggleButtonView"
"ToggleButtonModel"
layout
dstyle
toggleState
=
(
Icon
=::
""
)
toggleState
=
(
Icon
=::
""
)
:&
(
ButtonStyle
=::
DefaultButton
)
:&
(
ButtonStyle
=::
DefaultButton
)
:&
RNil
:&
RNil
...
...
ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/Bool/Valid.hs
View file @
abf2a721
...
@@ -26,6 +26,7 @@ import IHaskell.IPython.Message.UUID as U
...
@@ -26,6 +26,7 @@ import IHaskell.IPython.Message.UUID as U
import
IHaskell.Display.Widgets.Types
import
IHaskell.Display.Widgets.Types
import
IHaskell.Display.Widgets.Common
import
IHaskell.Display.Widgets.Common
import
IHaskell.Display.Widgets.Layout.LayoutWidget
import
IHaskell.Display.Widgets.Layout.LayoutWidget
import
IHaskell.Display.Widgets.Style.DescriptionStyle
-- | A 'ValidWidget' represents a Valid widget from IPython.html.widgets.
-- | A 'ValidWidget' represents a Valid widget from IPython.html.widgets.
type
ValidWidget
=
IPythonWidget
'V
a
lidType
type
ValidWidget
=
IPythonWidget
'V
a
lidType
...
@@ -36,8 +37,9 @@ mkValidWidget = do
...
@@ -36,8 +37,9 @@ mkValidWidget = do
-- Default properties, with a random uuid
-- Default properties, with a random uuid
wid
<-
U
.
random
wid
<-
U
.
random
layout
<-
mkLayout
layout
<-
mkLayout
dstyle
<-
mkDescriptionStyle
let
boolState
=
defaultBoolWidget
"ValidView"
"ValidModel"
layout
let
boolState
=
defaultBoolWidget
"ValidView"
"ValidModel"
layout
dstyle
validState
=
(
ReadOutMsg
=::
""
)
:&
RNil
validState
=
(
ReadOutMsg
=::
""
)
:&
RNil
widgetState
=
WidgetState
$
boolState
<+>
validState
widgetState
=
WidgetState
$
boolState
<+>
validState
...
...
ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/Button.hs
View file @
abf2a721
...
@@ -10,10 +10,6 @@ module IHaskell.Display.Widgets.Button
...
@@ -10,10 +10,6 @@ module IHaskell.Display.Widgets.Button
Button
Button
-- * Create a new button
-- * Create a new button
,
mkButton
,
mkButton
-- * Button style
,
ButtonStyle
-- * Create a new button style
,
mkButtonStyle
)
where
)
where
-- To keep `cabal repl` happy when running from the ihaskell repo
-- To keep `cabal repl` happy when running from the ihaskell repo
...
@@ -29,34 +25,9 @@ import IHaskell.IPython.Message.UUID as U
...
@@ -29,34 +25,9 @@ import IHaskell.IPython.Message.UUID as U
import
IHaskell.Display.Widgets.Types
import
IHaskell.Display.Widgets.Types
import
IHaskell.Display.Widgets.Common
import
IHaskell.Display.Widgets.Common
import
IHaskell.Display.Widgets.Style.ButtonStyle
import
IHaskell.Display.Widgets.Layout.LayoutWidget
import
IHaskell.Display.Widgets.Layout.LayoutWidget
import
IHaskell.Display.Widgets.Style.DescriptionStyle
-- | A 'ButtonStyle' represents a Button Style from IPython.html.widgets.
type
ButtonStyle
=
IPythonWidget
'B
u
ttonStyleType
-- | Create a new button style
mkButtonStyle
::
IO
ButtonStyle
mkButtonStyle
=
do
wid
<-
U
.
random
let
stl
=
defaultStyleWidget
"ButtonStyleModel"
but
=
(
ButtonColor
=::
Nothing
)
:&
(
FontWeight
=::
DefaultWeight
)
:&
RNil
btnStlState
=
WidgetState
(
stl
<+>
but
)
stateIO
<-
newIORef
btnStlState
let
style
=
IPythonWidget
wid
stateIO
-- Open a comm for this widget, and store it in the kernel state
widgetSendOpen
style
$
toJSON
btnStlState
-- Return the style widget
return
style
instance
IHaskellWidget
ButtonStyle
where
getCommUUID
=
uuid
-- | A 'Button' represents a Button from IPython.html.widgets.
-- | A 'Button' represents a Button from IPython.html.widgets.
type
Button
=
IPythonWidget
'B
u
ttonType
type
Button
=
IPythonWidget
'B
u
ttonType
...
@@ -67,14 +38,14 @@ mkButton = do
...
@@ -67,14 +38,14 @@ mkButton = do
-- Default properties, with a random uuid
-- Default properties, with a random uuid
wid
<-
U
.
random
wid
<-
U
.
random
layout
<-
mkLayout
layout
<-
mkLayout
dstyle
<-
mkDescriptionStyle
btnstyle
<-
mkButtonStyle
style
<-
mkButtonStyle
let
ddw
=
defaultDescriptionWidget
"ButtonView"
"ButtonModel"
layout
dstyle
let
ddw
=
defaultDescriptionWidget
"ButtonView"
"ButtonModel"
layout
but
=
(
Disabled
=::
False
)
but
=
(
Disabled
=::
False
)
:&
(
Icon
=::
""
)
:&
(
Icon
=::
""
)
:&
(
ButtonStyle
=::
DefaultButton
)
:&
(
ButtonStyle
=::
DefaultButton
)
:&
(
StyleButton
=::
style
)
:&
(
StyleButton
=::
btn
style
)
:&
(
ClickHandler
=::
return
()
)
:&
(
ClickHandler
=::
return
()
)
:&
RNil
:&
RNil
buttonState
=
WidgetState
(
ddw
<+>
but
)
buttonState
=
WidgetState
(
ddw
<+>
but
)
...
...
ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/ColorPicker.hs
View file @
abf2a721
...
@@ -26,6 +26,7 @@ import IHaskell.IPython.Message.UUID as U
...
@@ -26,6 +26,7 @@ import IHaskell.IPython.Message.UUID as U
import
IHaskell.Display.Widgets.Types
import
IHaskell.Display.Widgets.Types
import
IHaskell.Display.Widgets.Common
import
IHaskell.Display.Widgets.Common
import
IHaskell.Display.Widgets.Layout.LayoutWidget
import
IHaskell.Display.Widgets.Layout.LayoutWidget
import
IHaskell.Display.Widgets.Style.DescriptionStyle
-- | A 'ColorPicker' represents a ColorPicker from IPython.html.widgets.
-- | A 'ColorPicker' represents a ColorPicker from IPython.html.widgets.
type
ColorPicker
=
IPythonWidget
'C
o
lorPickerType
type
ColorPicker
=
IPythonWidget
'C
o
lorPickerType
...
@@ -36,8 +37,9 @@ mkColorPicker = do
...
@@ -36,8 +37,9 @@ mkColorPicker = do
-- Default properties, with a random uuid
-- Default properties, with a random uuid
wid
<-
U
.
random
wid
<-
U
.
random
layout
<-
mkLayout
layout
<-
mkLayout
dstyle
<-
mkDescriptionStyle
let
ddw
=
defaultDescriptionWidget
"ColorPickerView"
"ColorPickerModel"
layout
let
ddw
=
defaultDescriptionWidget
"ColorPickerView"
"ColorPickerModel"
layout
dstyle
color
=
(
StringValue
=::
"black"
)
color
=
(
StringValue
=::
"black"
)
:&
(
Concise
=::
False
)
:&
(
Concise
=::
False
)
:&
(
Disabled
=::
False
)
:&
(
Disabled
=::
False
)
...
...
ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/Common.hs
View file @
abf2a721
...
@@ -110,6 +110,7 @@ pattern Buttons = S.SButtons
...
@@ -110,6 +110,7 @@ pattern Buttons = S.SButtons
pattern
Axes
=
S
.
SAxes
pattern
Axes
=
S
.
SAxes
pattern
ButtonColor
=
S
.
SButtonColor
pattern
ButtonColor
=
S
.
SButtonColor
pattern
FontWeight
=
S
.
SFontWeight
pattern
FontWeight
=
S
.
SFontWeight
pattern
DescriptionWidth
=
S
.
SDescriptionWidth
pattern
StyleButton
=
S
.
SStyleButton
pattern
StyleButton
=
S
.
SStyleButton
pattern
StyleDescription
=
S
.
SStyleDescription
pattern
StyleDescription
=
S
.
SStyleDescription
...
...
ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/DatePicker.hs
View file @
abf2a721
...
@@ -28,6 +28,7 @@ import IHaskell.IPython.Message.UUID as U
...
@@ -28,6 +28,7 @@ import IHaskell.IPython.Message.UUID as U
import
IHaskell.Display.Widgets.Types
import
IHaskell.Display.Widgets.Types
import
IHaskell.Display.Widgets.Common
import
IHaskell.Display.Widgets.Common
import
IHaskell.Display.Widgets.Layout.LayoutWidget
import
IHaskell.Display.Widgets.Layout.LayoutWidget
import
IHaskell.Display.Widgets.Style.DescriptionStyle
-- | A 'DatePicker' represents a DatePicker from IPython.html.widgets.
-- | A 'DatePicker' represents a DatePicker from IPython.html.widgets.
type
DatePicker
=
IPythonWidget
'D
a
tePickerType
type
DatePicker
=
IPythonWidget
'D
a
tePickerType
...
@@ -38,8 +39,9 @@ mkDatePicker = do
...
@@ -38,8 +39,9 @@ mkDatePicker = do
-- Default properties, with a random uuid
-- Default properties, with a random uuid
wid
<-
U
.
random
wid
<-
U
.
random
layout
<-
mkLayout
layout
<-
mkLayout
dstyle
<-
mkDescriptionStyle
let
ddw
=
defaultDescriptionWidget
"DatePickerView"
"DatePickerModel"
layout
let
ddw
=
defaultDescriptionWidget
"DatePickerView"
"DatePickerModel"
layout
dstyle
date
=
(
DateValue
=::
defaultDate
)
date
=
(
DateValue
=::
defaultDate
)
:&
(
Disabled
=::
False
)
:&
(
Disabled
=::
False
)
:&
RNil
:&
RNil
...
...
ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/Float/BoundedFloat/BoundedFloatText.hs
View file @
abf2a721
...
@@ -28,6 +28,7 @@ import IHaskell.IPython.Message.UUID as U
...
@@ -28,6 +28,7 @@ import IHaskell.IPython.Message.UUID as U
import
IHaskell.Display.Widgets.Types
import
IHaskell.Display.Widgets.Types
import
IHaskell.Display.Widgets.Common
import
IHaskell.Display.Widgets.Common
import
IHaskell.Display.Widgets.Layout.LayoutWidget
import
IHaskell.Display.Widgets.Layout.LayoutWidget
import
IHaskell.Display.Widgets.Style.DescriptionStyle
-- | 'BoundedFloatText' represents an BoundedFloatText widget from IPython.html.widgets.
-- | 'BoundedFloatText' represents an BoundedFloatText widget from IPython.html.widgets.
type
BoundedFloatText
=
IPythonWidget
'B
o
undedFloatTextType
type
BoundedFloatText
=
IPythonWidget
'B
o
undedFloatTextType
...
@@ -38,8 +39,9 @@ mkBoundedFloatText = do
...
@@ -38,8 +39,9 @@ mkBoundedFloatText = do
-- Default properties, with a random uuid
-- Default properties, with a random uuid
wid
<-
U
.
random
wid
<-
U
.
random
layout
<-
mkLayout
layout
<-
mkLayout
dstyle
<-
mkDescriptionStyle
let
boundedFloatAttrs
=
defaultBoundedFloatWidget
"FloatTextView"
"BoundedFloatTextModel"
layout
let
boundedFloatAttrs
=
defaultBoundedFloatWidget
"FloatTextView"
"BoundedFloatTextModel"
layout
dstyle
textAttrs
=
(
Disabled
=::
False
)
textAttrs
=
(
Disabled
=::
False
)
:&
(
ContinuousUpdate
=::
False
)
:&
(
ContinuousUpdate
=::
False
)
:&
(
StepFloat
=::
Nothing
)
:&
(
StepFloat
=::
Nothing
)
...
...
ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/Float/BoundedFloat/FloatLogSlider.hs
View file @
abf2a721
...
@@ -28,6 +28,7 @@ import IHaskell.IPython.Message.UUID as U
...
@@ -28,6 +28,7 @@ import IHaskell.IPython.Message.UUID as U
import
IHaskell.Display.Widgets.Types
import
IHaskell.Display.Widgets.Types
import
IHaskell.Display.Widgets.Common
import
IHaskell.Display.Widgets.Common
import
IHaskell.Display.Widgets.Layout.LayoutWidget
import
IHaskell.Display.Widgets.Layout.LayoutWidget
import
IHaskell.Display.Widgets.Style.DescriptionStyle
-- | 'FloatLogSlider' represents an FloatLogSlider widget from IPython.html.widgets.
-- | 'FloatLogSlider' represents an FloatLogSlider widget from IPython.html.widgets.
type
FloatLogSlider
=
IPythonWidget
'F
l
oatLogSliderType
type
FloatLogSlider
=
IPythonWidget
'F
l
oatLogSliderType
...
@@ -38,8 +39,9 @@ mkFloatLogSlider = do
...
@@ -38,8 +39,9 @@ mkFloatLogSlider = do
-- Default properties, with a random uuid
-- Default properties, with a random uuid
wid
<-
U
.
random
wid
<-
U
.
random
layout
<-
mkLayout
layout
<-
mkLayout
dstyle
<-
mkDescriptionStyle
let
boundedLogFloatAttrs
=
defaultBoundedLogFloatWidget
"FloatLogSliderView"
"FloatLogSliderModel"
layout
let
boundedLogFloatAttrs
=
defaultBoundedLogFloatWidget
"FloatLogSliderView"
"FloatLogSliderModel"
layout
dstyle
sliderAttrs
=
(
StepFloat
=::
Just
0.1
)
sliderAttrs
=
(
StepFloat
=::
Just
0.1
)
:&
(
Orientation
=::
HorizontalOrientation
)
:&
(
Orientation
=::
HorizontalOrientation
)
:&
(
ReadOut
=::
True
)
:&
(
ReadOut
=::
True
)
...
...
ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/Float/BoundedFloat/FloatProgress.hs
View file @
abf2a721
...
@@ -26,6 +26,7 @@ import IHaskell.IPython.Message.UUID as U
...
@@ -26,6 +26,7 @@ import IHaskell.IPython.Message.UUID as U
import
IHaskell.Display.Widgets.Types
import
IHaskell.Display.Widgets.Types
import
IHaskell.Display.Widgets.Common
import
IHaskell.Display.Widgets.Common
import
IHaskell.Display.Widgets.Layout.LayoutWidget
import
IHaskell.Display.Widgets.Layout.LayoutWidget
import
IHaskell.Display.Widgets.Style.DescriptionStyle
-- | 'FloatProgress' represents an FloatProgress widget from IPython.html.widgets.
-- | 'FloatProgress' represents an FloatProgress widget from IPython.html.widgets.
type
FloatProgress
=
IPythonWidget
'F
l
oatProgressType
type
FloatProgress
=
IPythonWidget
'F
l
oatProgressType
...
@@ -36,8 +37,9 @@ mkFloatProgress = do
...
@@ -36,8 +37,9 @@ mkFloatProgress = do
-- Default properties, with a random uuid
-- Default properties, with a random uuid
wid
<-
U
.
random
wid
<-
U
.
random
layout
<-
mkLayout
layout
<-
mkLayout
dstyle
<-
mkDescriptionStyle
let
boundedFloatAttrs
=
defaultBoundedFloatWidget
"ProgressView"
"FloatProgressModel"
layout
let
boundedFloatAttrs
=
defaultBoundedFloatWidget
"ProgressView"
"FloatProgressModel"
layout
dstyle
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 @
abf2a721
...
@@ -28,6 +28,7 @@ import IHaskell.IPython.Message.UUID as U
...
@@ -28,6 +28,7 @@ import IHaskell.IPython.Message.UUID as U
import
IHaskell.Display.Widgets.Types
import
IHaskell.Display.Widgets.Types
import
IHaskell.Display.Widgets.Common
import
IHaskell.Display.Widgets.Common
import
IHaskell.Display.Widgets.Layout.LayoutWidget
import
IHaskell.Display.Widgets.Layout.LayoutWidget
import
IHaskell.Display.Widgets.Style.DescriptionStyle
-- | 'FloatSlider' represents an FloatSlider widget from IPython.html.widgets.
-- | 'FloatSlider' represents an FloatSlider widget from IPython.html.widgets.
type
FloatSlider
=
IPythonWidget
'F
l
oatSliderType
type
FloatSlider
=
IPythonWidget
'F
l
oatSliderType
...
@@ -38,8 +39,9 @@ mkFloatSlider = do
...
@@ -38,8 +39,9 @@ mkFloatSlider = do
-- Default properties, with a random uuid
-- Default properties, with a random uuid
wid
<-
U
.
random
wid
<-
U
.
random
layout
<-
mkLayout
layout
<-
mkLayout
dstyle
<-
mkDescriptionStyle
let
boundedFloatAttrs
=
defaultBoundedFloatWidget
"FloatSliderView"
"FloatSliderModel"
layout
let
boundedFloatAttrs
=
defaultBoundedFloatWidget
"FloatSliderView"
"FloatSliderModel"
layout
dstyle
sliderAttrs
=
(
StepFloat
=::
Just
0.1
)
sliderAttrs
=
(
StepFloat
=::
Just
0.1
)
:&
(
Orientation
=::
HorizontalOrientation
)
:&
(
Orientation
=::
HorizontalOrientation
)
:&
(
ReadOut
=::
True
)
:&
(
ReadOut
=::
True
)
...
...
ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/Float/BoundedFloatRange/FloatRangeSlider.hs
View file @
abf2a721
...
@@ -29,6 +29,7 @@ import IHaskell.IPython.Message.UUID as U
...
@@ -29,6 +29,7 @@ import IHaskell.IPython.Message.UUID as U
import
IHaskell.Display.Widgets.Types
import
IHaskell.Display.Widgets.Types
import
IHaskell.Display.Widgets.Common
import
IHaskell.Display.Widgets.Common
import
IHaskell.Display.Widgets.Layout.LayoutWidget
import
IHaskell.Display.Widgets.Layout.LayoutWidget
import
IHaskell.Display.Widgets.Style.DescriptionStyle
-- | 'FloatRangeSlider' represents an FloatRangeSlider widget from IPython.html.widgets.
-- | 'FloatRangeSlider' represents an FloatRangeSlider widget from IPython.html.widgets.
type
FloatRangeSlider
=
IPythonWidget
'F
l
oatRangeSliderType
type
FloatRangeSlider
=
IPythonWidget
'F
l
oatRangeSliderType
...
@@ -39,8 +40,9 @@ mkFloatRangeSlider = do
...
@@ -39,8 +40,9 @@ mkFloatRangeSlider = do
-- Default properties, with a random uuid
-- Default properties, with a random uuid
wid
<-
U
.
random
wid
<-
U
.
random
layout
<-
mkLayout
layout
<-
mkLayout
dstyle
<-
mkDescriptionStyle
let
boundedFloatAttrs
=
defaultBoundedFloatRangeWidget
"FloatRangeSliderView"
"FloatRangeSliderModel"
layout
let
boundedFloatAttrs
=
defaultBoundedFloatRangeWidget
"FloatRangeSliderView"
"FloatRangeSliderModel"
layout
dstyle
sliderAttrs
=
(
StepFloat
=::
Just
0.1
)
sliderAttrs
=
(
StepFloat
=::
Just
0.1
)
:&
(
Orientation
=::
HorizontalOrientation
)
:&
(
Orientation
=::
HorizontalOrientation
)
:&
(
ReadOut
=::
True
)
:&
(
ReadOut
=::
True
)
...
...
ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/Float/FloatText.hs
View file @
abf2a721
...
@@ -28,6 +28,7 @@ import IHaskell.IPython.Message.UUID as U
...
@@ -28,6 +28,7 @@ import IHaskell.IPython.Message.UUID as U
import
IHaskell.Display.Widgets.Types
import
IHaskell.Display.Widgets.Types
import
IHaskell.Display.Widgets.Common
import
IHaskell.Display.Widgets.Common
import
IHaskell.Display.Widgets.Layout.LayoutWidget
import
IHaskell.Display.Widgets.Layout.LayoutWidget
import
IHaskell.Display.Widgets.Style.DescriptionStyle
-- | 'FloatText' represents an FloatText widget from IPython.html.widgets.
-- | 'FloatText' represents an FloatText widget from IPython.html.widgets.
type
FloatText
=
IPythonWidget
'F
l
oatTextType
type
FloatText
=
IPythonWidget
'F
l
oatTextType
...
@@ -38,8 +39,9 @@ mkFloatText = do
...
@@ -38,8 +39,9 @@ mkFloatText = do
-- Default properties, with a random uuid
-- Default properties, with a random uuid
wid
<-
U
.
random
wid
<-
U
.
random
layout
<-
mkLayout
layout
<-
mkLayout
dstyle
<-
mkDescriptionStyle
let
floatAttrs
=
defaultFloatWidget
"FloatTextView"
"FloatTextModel"
layout
let
floatAttrs
=
defaultFloatWidget
"FloatTextView"
"FloatTextModel"
layout
dstyle
textAttrs
=
(
Disabled
=::
False
)
textAttrs
=
(
Disabled
=::
False
)
:&
(
ContinuousUpdate
=::
False
)
:&
(
ContinuousUpdate
=::
False
)
:&
(
StepFloat
=::
Nothing
)
:&
(
StepFloat
=::
Nothing
)
...
...
ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/Int/BoundedInt/BoundedIntText.hs
View file @
abf2a721
...
@@ -28,6 +28,7 @@ import IHaskell.IPython.Message.UUID as U
...
@@ -28,6 +28,7 @@ import IHaskell.IPython.Message.UUID as U
import
IHaskell.Display.Widgets.Types
import
IHaskell.Display.Widgets.Types
import
IHaskell.Display.Widgets.Common
import
IHaskell.Display.Widgets.Common
import
IHaskell.Display.Widgets.Layout.LayoutWidget
import
IHaskell.Display.Widgets.Layout.LayoutWidget
import
IHaskell.Display.Widgets.Style.DescriptionStyle
-- | 'BoundedIntText' represents an BoundedIntText widget from IPython.html.widgets.
-- | 'BoundedIntText' represents an BoundedIntText widget from IPython.html.widgets.
type
BoundedIntText
=
IPythonWidget
'B
o
undedIntTextType
type
BoundedIntText
=
IPythonWidget
'B
o
undedIntTextType
...
@@ -38,8 +39,9 @@ mkBoundedIntText = do
...
@@ -38,8 +39,9 @@ mkBoundedIntText = do
-- Default properties, with a random uuid
-- Default properties, with a random uuid
wid
<-
U
.
random
wid
<-
U
.
random
layout
<-
mkLayout
layout
<-
mkLayout
dstyle
<-
mkDescriptionStyle
let
boundedIntAttrs
=
defaultBoundedIntWidget
"IntTextView"
"BoundedIntTextModel"
layout
let
boundedIntAttrs
=
defaultBoundedIntWidget
"IntTextView"
"BoundedIntTextModel"
layout
dstyle
textAttrs
=
(
Disabled
=::
False
)
textAttrs
=
(
Disabled
=::
False
)
:&
(
ContinuousUpdate
=::
False
)
:&
(
ContinuousUpdate
=::
False
)
:&
(
StepInt
=::
Just
1
)
:&
(
StepInt
=::
Just
1
)
...
...
ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/Int/BoundedInt/IntProgress.hs
View file @
abf2a721
...
@@ -26,6 +26,7 @@ import IHaskell.IPython.Message.UUID as U
...
@@ -26,6 +26,7 @@ import IHaskell.IPython.Message.UUID as U
import
IHaskell.Display.Widgets.Types
import
IHaskell.Display.Widgets.Types
import
IHaskell.Display.Widgets.Common
import
IHaskell.Display.Widgets.Common
import
IHaskell.Display.Widgets.Layout.LayoutWidget
import
IHaskell.Display.Widgets.Layout.LayoutWidget
import
IHaskell.Display.Widgets.Style.DescriptionStyle
-- | 'IntProgress' represents an IntProgress widget from IPython.html.widgets.
-- | 'IntProgress' represents an IntProgress widget from IPython.html.widgets.
type
IntProgress
=
IPythonWidget
'I
n
tProgressType
type
IntProgress
=
IPythonWidget
'I
n
tProgressType
...
@@ -36,8 +37,9 @@ mkIntProgress = do
...
@@ -36,8 +37,9 @@ mkIntProgress = do
-- Default properties, with a random uuid
-- Default properties, with a random uuid
wid
<-
U
.
random
wid
<-
U
.
random
layout
<-
mkLayout
layout
<-
mkLayout
dstyle
<-
mkDescriptionStyle
let
boundedIntAttrs
=
defaultBoundedIntWidget
"ProgressView"
"IntProgressModel"
layout
let
boundedIntAttrs
=
defaultBoundedIntWidget
"ProgressView"
"IntProgressModel"
layout
dstyle
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 @
abf2a721
...
@@ -28,6 +28,7 @@ import IHaskell.Display (IHaskellWidget(..))
...
@@ -28,6 +28,7 @@ import IHaskell.Display (IHaskellWidget(..))
import
IHaskell.Display.Widgets.Types
import
IHaskell.Display.Widgets.Types
import
IHaskell.Display.Widgets.Common
import
IHaskell.Display.Widgets.Common
import
IHaskell.Display.Widgets.Layout.LayoutWidget
import
IHaskell.Display.Widgets.Layout.LayoutWidget
import
IHaskell.Display.Widgets.Style.DescriptionStyle
-- | 'IntSlider' represents an IntSlider widget from IPython.html.widgets.
-- | 'IntSlider' represents an IntSlider widget from IPython.html.widgets.
type
IntSlider
=
IPythonWidget
'I
n
tSliderType
type
IntSlider
=
IPythonWidget
'I
n
tSliderType
...
@@ -38,8 +39,9 @@ mkIntSlider = do
...
@@ -38,8 +39,9 @@ mkIntSlider = do
-- Default properties, with a random uuid
-- Default properties, with a random uuid
wid
<-
U
.
random
wid
<-
U
.
random
layout
<-
mkLayout
layout
<-
mkLayout
dstyle
<-
mkDescriptionStyle
let
boundedIntAttrs
=
defaultBoundedIntWidget
"IntSliderView"
"IntSliderModel"
layout
let
boundedIntAttrs
=
defaultBoundedIntWidget
"IntSliderView"
"IntSliderModel"
layout
dstyle
sliderAttrs
=
(
StepInt
=::
Just
1
)
sliderAttrs
=
(
StepInt
=::
Just
1
)
:&
(
Orientation
=::
HorizontalOrientation
)
:&
(
Orientation
=::
HorizontalOrientation
)
:&
(
ReadOut
=::
True
)
:&
(
ReadOut
=::
True
)
...
...
ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/Int/BoundedInt/Play.hs
View file @
abf2a721
...
@@ -28,6 +28,7 @@ import IHaskell.Display (IHaskellWidget(..))
...
@@ -28,6 +28,7 @@ import IHaskell.Display (IHaskellWidget(..))
import
IHaskell.Display.Widgets.Types
import
IHaskell.Display.Widgets.Types
import
IHaskell.Display.Widgets.Common
import
IHaskell.Display.Widgets.Common
import
IHaskell.Display.Widgets.Layout.LayoutWidget
import
IHaskell.Display.Widgets.Layout.LayoutWidget
import
IHaskell.Display.Widgets.Style.DescriptionStyle
-- | 'Play' represents an Play widget from IPython.html.widgets.
-- | 'Play' represents an Play widget from IPython.html.widgets.
type
Play
=
IPythonWidget
'P
l
ayType
type
Play
=
IPythonWidget
'P
l
ayType
...
@@ -38,8 +39,9 @@ mkPlay = do
...
@@ -38,8 +39,9 @@ mkPlay = do
-- Default properties, with a random uuid
-- Default properties, with a random uuid
wid
<-
U
.
random
wid
<-
U
.
random
layout
<-
mkLayout
layout
<-
mkLayout
dstyle
<-
mkDescriptionStyle
let
boundedIntAttrs
=
defaultBoundedIntWidget
"PlayView"
"PlayModel"
layout
let
boundedIntAttrs
=
defaultBoundedIntWidget
"PlayView"
"PlayModel"
layout
dstyle
playAttrs
=
(
Playing
=::
True
)
playAttrs
=
(
Playing
=::
True
)
:&
(
Repeat
=::
True
)
:&
(
Repeat
=::
True
)
:&
(
Interval
=::
100
)
:&
(
Interval
=::
100
)
...
...
ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/Int/BoundedIntRange/IntRangeSlider.hs
View file @
abf2a721
...
@@ -29,6 +29,7 @@ import IHaskell.IPython.Message.UUID as U
...
@@ -29,6 +29,7 @@ import IHaskell.IPython.Message.UUID as U
import
IHaskell.Display.Widgets.Types
import
IHaskell.Display.Widgets.Types
import
IHaskell.Display.Widgets.Common
import
IHaskell.Display.Widgets.Common
import
IHaskell.Display.Widgets.Layout.LayoutWidget
import
IHaskell.Display.Widgets.Layout.LayoutWidget
import
IHaskell.Display.Widgets.Style.DescriptionStyle
-- | 'IntRangeSlider' represents an IntRangeSlider widget from IPython.html.widgets.
-- | 'IntRangeSlider' represents an IntRangeSlider widget from IPython.html.widgets.
type
IntRangeSlider
=
IPythonWidget
'I
n
tRangeSliderType
type
IntRangeSlider
=
IPythonWidget
'I
n
tRangeSliderType
...
@@ -39,8 +40,9 @@ mkIntRangeSlider = do
...
@@ -39,8 +40,9 @@ mkIntRangeSlider = do
-- Default properties, with a random uuid
-- Default properties, with a random uuid
wid
<-
U
.
random
wid
<-
U
.
random
layout
<-
mkLayout
layout
<-
mkLayout
dstyle
<-
mkDescriptionStyle
let
boundedIntAttrs
=
defaultBoundedIntRangeWidget
"IntRangeSliderView"
"IntRangeSliderModel"
layout
let
boundedIntAttrs
=
defaultBoundedIntRangeWidget
"IntRangeSliderView"
"IntRangeSliderModel"
layout
dstyle
sliderAttrs
=
(
StepInt
=::
Just
1
)
sliderAttrs
=
(
StepInt
=::
Just
1
)
:&
(
Orientation
=::
HorizontalOrientation
)
:&
(
Orientation
=::
HorizontalOrientation
)
:&
(
ReadOut
=::
True
)
:&
(
ReadOut
=::
True
)
...
...
ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/Int/IntText.hs
View file @
abf2a721
...
@@ -28,6 +28,7 @@ import IHaskell.IPython.Message.UUID as U
...
@@ -28,6 +28,7 @@ import IHaskell.IPython.Message.UUID as U
import
IHaskell.Display.Widgets.Types
import
IHaskell.Display.Widgets.Types
import
IHaskell.Display.Widgets.Common
import
IHaskell.Display.Widgets.Common
import
IHaskell.Display.Widgets.Layout.LayoutWidget
import
IHaskell.Display.Widgets.Layout.LayoutWidget
import
IHaskell.Display.Widgets.Style.DescriptionStyle
-- | 'IntText' represents an IntText widget from IPython.html.widgets.
-- | 'IntText' represents an IntText widget from IPython.html.widgets.
type
IntText
=
IPythonWidget
'I
n
tTextType
type
IntText
=
IPythonWidget
'I
n
tTextType
...
@@ -38,8 +39,9 @@ mkIntText = do
...
@@ -38,8 +39,9 @@ mkIntText = do
-- Default properties, with a random uuid
-- Default properties, with a random uuid
wid
<-
U
.
random
wid
<-
U
.
random
layout
<-
mkLayout
layout
<-
mkLayout
dstyle
<-
mkDescriptionStyle
let
intAttrs
=
defaultIntWidget
"IntTextView"
"IntTextModel"
layout
let
intAttrs
=
defaultIntWidget
"IntTextView"
"IntTextModel"
layout
dstyle
textAttrs
=
(
Disabled
=::
False
)
textAttrs
=
(
Disabled
=::
False
)
:&
(
ContinuousUpdate
=::
False
)
:&
(
ContinuousUpdate
=::
False
)
:&
(
StepInt
=::
Just
1
)
:&
(
StepInt
=::
Just
1
)
...
...
ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/Selection/Dropdown.hs
View file @
abf2a721
...
@@ -28,6 +28,7 @@ import IHaskell.IPython.Message.UUID as U
...
@@ -28,6 +28,7 @@ import IHaskell.IPython.Message.UUID as U
import
IHaskell.Display.Widgets.Types
import
IHaskell.Display.Widgets.Types
import
IHaskell.Display.Widgets.Common
import
IHaskell.Display.Widgets.Common
import
IHaskell.Display.Widgets.Layout.LayoutWidget
import
IHaskell.Display.Widgets.Layout.LayoutWidget
import
IHaskell.Display.Widgets.Style.DescriptionStyle
-- | A 'Dropdown' represents a Dropdown widget from IPython.html.widgets.
-- | A 'Dropdown' represents a Dropdown widget from IPython.html.widgets.
type
Dropdown
=
IPythonWidget
'D
r
opdownType
type
Dropdown
=
IPythonWidget
'D
r
opdownType
...
@@ -38,8 +39,9 @@ mkDropdown = do
...
@@ -38,8 +39,9 @@ mkDropdown = do
-- Default properties, with a random uuid
-- Default properties, with a random uuid
wid
<-
U
.
random
wid
<-
U
.
random
layout
<-
mkLayout
layout
<-
mkLayout
dstyle
<-
mkDescriptionStyle
let
widgetState
=
WidgetState
$
defaultSelectionWidget
"DropdownView"
"DropdownModel"
layout
let
widgetState
=
WidgetState
$
defaultSelectionWidget
"DropdownView"
"DropdownModel"
layout
dstyle
stateIO
<-
newIORef
widgetState
stateIO
<-
newIORef
widgetState
...
...
ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/Selection/RadioButtons.hs
View file @
abf2a721
...
@@ -27,6 +27,7 @@ import IHaskell.IPython.Message.UUID as U
...
@@ -27,6 +27,7 @@ import IHaskell.IPython.Message.UUID as U
import
IHaskell.Display.Widgets.Types
import
IHaskell.Display.Widgets.Types
import
IHaskell.Display.Widgets.Common
import
IHaskell.Display.Widgets.Common
import
IHaskell.Display.Widgets.Layout.LayoutWidget
import
IHaskell.Display.Widgets.Layout.LayoutWidget
import
IHaskell.Display.Widgets.Style.DescriptionStyle
-- | A 'RadioButtons' represents a RadioButtons widget from IPython.html.widgets.
-- | A 'RadioButtons' represents a RadioButtons widget from IPython.html.widgets.
type
RadioButtons
=
IPythonWidget
'R
a
dioButtonsType
type
RadioButtons
=
IPythonWidget
'R
a
dioButtonsType
...
@@ -37,8 +38,9 @@ mkRadioButtons = do
...
@@ -37,8 +38,9 @@ mkRadioButtons = do
-- Default properties, with a random uuid
-- Default properties, with a random uuid
wid
<-
U
.
random
wid
<-
U
.
random
layout
<-
mkLayout
layout
<-
mkLayout
dstyle
<-
mkDescriptionStyle
let
widgetState
=
WidgetState
$
defaultSelectionWidget
"RadioButtonsView"
"RadioButtonsModel"
layout
let
widgetState
=
WidgetState
$
defaultSelectionWidget
"RadioButtonsView"
"RadioButtonsModel"
layout
dstyle
stateIO
<-
newIORef
widgetState
stateIO
<-
newIORef
widgetState
...
...
ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/Selection/Select.hs
View file @
abf2a721
...
@@ -28,6 +28,7 @@ import IHaskell.IPython.Message.UUID as U
...
@@ -28,6 +28,7 @@ import IHaskell.IPython.Message.UUID as U
import
IHaskell.Display.Widgets.Types
import
IHaskell.Display.Widgets.Types
import
IHaskell.Display.Widgets.Common
import
IHaskell.Display.Widgets.Common
import
IHaskell.Display.Widgets.Layout.LayoutWidget
import
IHaskell.Display.Widgets.Layout.LayoutWidget
import
IHaskell.Display.Widgets.Style.DescriptionStyle
-- | A 'Select' represents a Select widget from IPython.html.widgets.
-- | A 'Select' represents a Select widget from IPython.html.widgets.
type
Select
=
IPythonWidget
'S
e
lectType
type
Select
=
IPythonWidget
'S
e
lectType
...
@@ -38,8 +39,9 @@ mkSelect = do
...
@@ -38,8 +39,9 @@ mkSelect = do
-- Default properties, with a random uuid
-- Default properties, with a random uuid
wid
<-
U
.
random
wid
<-
U
.
random
layout
<-
mkLayout
layout
<-
mkLayout
dstyle
<-
mkDescriptionStyle
let
selectionAttrs
=
defaultSelectionWidget
"SelectView"
"SelectModel"
layout
let
selectionAttrs
=
defaultSelectionWidget
"SelectView"
"SelectModel"
layout
dstyle
selectAttrs
=
(
Rows
=::
Just
5
)
selectAttrs
=
(
Rows
=::
Just
5
)
:&
RNil
:&
RNil
widgetState
=
WidgetState
$
selectionAttrs
<+>
selectAttrs
widgetState
=
WidgetState
$
selectionAttrs
<+>
selectAttrs
...
...
ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/Selection/SelectMultiple.hs
View file @
abf2a721
...
@@ -29,6 +29,7 @@ import IHaskell.IPython.Message.UUID as U
...
@@ -29,6 +29,7 @@ import IHaskell.IPython.Message.UUID as U
import
IHaskell.Display.Widgets.Types
import
IHaskell.Display.Widgets.Types
import
IHaskell.Display.Widgets.Common
import
IHaskell.Display.Widgets.Common
import
IHaskell.Display.Widgets.Layout.LayoutWidget
import
IHaskell.Display.Widgets.Layout.LayoutWidget
import
IHaskell.Display.Widgets.Style.DescriptionStyle
-- | A 'SelectMultiple' represents a SelectMultiple widget from IPython.html.widgets.
-- | A 'SelectMultiple' represents a SelectMultiple widget from IPython.html.widgets.
type
SelectMultiple
=
IPythonWidget
'S
e
lectMultipleType
type
SelectMultiple
=
IPythonWidget
'S
e
lectMultipleType
...
@@ -39,8 +40,9 @@ mkSelectMultiple = do
...
@@ -39,8 +40,9 @@ mkSelectMultiple = do
-- Default properties, with a random uuid
-- Default properties, with a random uuid
wid
<-
U
.
random
wid
<-
U
.
random
layout
<-
mkLayout
layout
<-
mkLayout
dstyle
<-
mkDescriptionStyle
let
multipleSelectionAttrs
=
defaultMultipleSelectionWidget
"SelectMultipleView"
"SelectMultipleModel"
layout
let
multipleSelectionAttrs
=
defaultMultipleSelectionWidget
"SelectMultipleView"
"SelectMultipleModel"
layout
dstyle
selectMultipleAttrs
=
(
Rows
=::
Just
5
)
selectMultipleAttrs
=
(
Rows
=::
Just
5
)
:&
RNil
:&
RNil
widgetState
=
WidgetState
$
multipleSelectionAttrs
<+>
selectMultipleAttrs
widgetState
=
WidgetState
$
multipleSelectionAttrs
<+>
selectMultipleAttrs
...
...
ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/Selection/SelectionRangeSlider.hs
View file @
abf2a721
...
@@ -29,6 +29,7 @@ import IHaskell.IPython.Message.UUID as U
...
@@ -29,6 +29,7 @@ import IHaskell.IPython.Message.UUID as U
import
IHaskell.Display.Widgets.Types
import
IHaskell.Display.Widgets.Types
import
IHaskell.Display.Widgets.Common
import
IHaskell.Display.Widgets.Common
import
IHaskell.Display.Widgets.Layout.LayoutWidget
import
IHaskell.Display.Widgets.Layout.LayoutWidget
import
IHaskell.Display.Widgets.Style.DescriptionStyle
-- | A 'SelectionRangeSlider' represents a SelectionSlider widget from IPyhon.widgets
-- | A 'SelectionRangeSlider' represents a SelectionSlider widget from IPyhon.widgets
type
SelectionRangeSlider
=
IPythonWidget
'S
e
lectionRangeSliderType
type
SelectionRangeSlider
=
IPythonWidget
'S
e
lectionRangeSliderType
...
@@ -38,8 +39,9 @@ mkSelectionRangeSlider :: IO SelectionRangeSlider
...
@@ -38,8 +39,9 @@ mkSelectionRangeSlider :: IO SelectionRangeSlider
mkSelectionRangeSlider
=
do
mkSelectionRangeSlider
=
do
wid
<-
U
.
random
wid
<-
U
.
random
layout
<-
mkLayout
layout
<-
mkLayout
dstyle
<-
mkDescriptionStyle
let
selectionAttrs
=
defaultMultipleSelectionWidget
"SelectionRangeSliderView"
"SelectionRangeSliderModel"
layout
let
selectionAttrs
=
defaultMultipleSelectionWidget
"SelectionRangeSliderView"
"SelectionRangeSliderModel"
layout
dstyle
selectionRangeSliderAttrs
=
(
Orientation
=::
HorizontalOrientation
)
selectionRangeSliderAttrs
=
(
Orientation
=::
HorizontalOrientation
)
:&
(
ReadOut
=::
True
)
:&
(
ReadOut
=::
True
)
:&
(
ContinuousUpdate
=::
True
)
:&
(
ContinuousUpdate
=::
True
)
...
...
ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/Selection/SelectionSlider.hs
View file @
abf2a721
...
@@ -28,6 +28,7 @@ import IHaskell.IPython.Message.UUID as U
...
@@ -28,6 +28,7 @@ import IHaskell.IPython.Message.UUID as U
import
IHaskell.Display.Widgets.Types
import
IHaskell.Display.Widgets.Types
import
IHaskell.Display.Widgets.Common
import
IHaskell.Display.Widgets.Common
import
IHaskell.Display.Widgets.Layout.LayoutWidget
import
IHaskell.Display.Widgets.Layout.LayoutWidget
import
IHaskell.Display.Widgets.Style.DescriptionStyle
-- | A 'SelectionSlider' represents a SelectionSlider widget from IPyhon.widgets
-- | A 'SelectionSlider' represents a SelectionSlider widget from IPyhon.widgets
type
SelectionSlider
=
IPythonWidget
'S
e
lectionSliderType
type
SelectionSlider
=
IPythonWidget
'S
e
lectionSliderType
...
@@ -37,8 +38,9 @@ mkSelectionSlider :: IO SelectionSlider
...
@@ -37,8 +38,9 @@ mkSelectionSlider :: IO SelectionSlider
mkSelectionSlider
=
do
mkSelectionSlider
=
do
wid
<-
U
.
random
wid
<-
U
.
random
layout
<-
mkLayout
layout
<-
mkLayout
dstyle
<-
mkDescriptionStyle
let
selectionAttrs
=
defaultSelectionNonemptyWidget
"SelectionSliderView"
"SelectionSliderModel"
layout
let
selectionAttrs
=
defaultSelectionNonemptyWidget
"SelectionSliderView"
"SelectionSliderModel"
layout
dstyle
selectionSliderAttrs
=
(
Orientation
=::
HorizontalOrientation
)
selectionSliderAttrs
=
(
Orientation
=::
HorizontalOrientation
)
:&
(
ReadOut
=::
True
)
:&
(
ReadOut
=::
True
)
:&
(
ContinuousUpdate
=::
True
)
:&
(
ContinuousUpdate
=::
True
)
...
...
ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/Selection/ToggleButtons.hs
View file @
abf2a721
...
@@ -28,6 +28,7 @@ import IHaskell.IPython.Message.UUID as U
...
@@ -28,6 +28,7 @@ import IHaskell.IPython.Message.UUID as U
import
IHaskell.Display.Widgets.Types
import
IHaskell.Display.Widgets.Types
import
IHaskell.Display.Widgets.Common
import
IHaskell.Display.Widgets.Common
import
IHaskell.Display.Widgets.Layout.LayoutWidget
import
IHaskell.Display.Widgets.Layout.LayoutWidget
import
IHaskell.Display.Widgets.Style.DescriptionStyle
-- | A 'ToggleButtons' represents a ToggleButtons widget from IPython.html.widgets.
-- | A 'ToggleButtons' represents a ToggleButtons widget from IPython.html.widgets.
type
ToggleButtons
=
IPythonWidget
'T
o
ggleButtonsType
type
ToggleButtons
=
IPythonWidget
'T
o
ggleButtonsType
...
@@ -38,8 +39,9 @@ mkToggleButtons = do
...
@@ -38,8 +39,9 @@ mkToggleButtons = do
-- Default properties, with a random uuid
-- Default properties, with a random uuid
wid
<-
U
.
random
wid
<-
U
.
random
layout
<-
mkLayout
layout
<-
mkLayout
dstyle
<-
mkDescriptionStyle
let
selectionAttrs
=
defaultSelectionWidget
"ToggleButtonsView"
"ToggleButtonsModel"
layout
let
selectionAttrs
=
defaultSelectionWidget
"ToggleButtonsView"
"ToggleButtonsModel"
layout
dstyle
toggleButtonsAttrs
=
(
Tooltips
=::
[]
)
toggleButtonsAttrs
=
(
Tooltips
=::
[]
)
:&
(
Icons
=::
[]
)
:&
(
Icons
=::
[]
)
:&
(
ButtonStyle
=::
DefaultButton
)
:&
(
ButtonStyle
=::
DefaultButton
)
...
...
ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/Singletons.hs
View file @
abf2a721
...
@@ -118,6 +118,7 @@ singletons
...
@@ -118,6 +118,7 @@ singletons
| Axes
| Axes
| ButtonColor
| ButtonColor
| FontWeight
| FontWeight
| DescriptionWidth
-- Singletons for child style widgets
-- Singletons for child style widgets
| StyleButton
| StyleButton
| StyleDescription
| StyleDescription
...
...
ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/String/Combobox.hs
View file @
abf2a721
...
@@ -27,6 +27,7 @@ import IHaskell.IPython.Message.UUID as U
...
@@ -27,6 +27,7 @@ import IHaskell.IPython.Message.UUID as U
import
IHaskell.Display.Widgets.Types
import
IHaskell.Display.Widgets.Types
import
IHaskell.Display.Widgets.Common
import
IHaskell.Display.Widgets.Common
import
IHaskell.Display.Widgets.Layout.LayoutWidget
import
IHaskell.Display.Widgets.Layout.LayoutWidget
import
IHaskell.Display.Widgets.Style.DescriptionStyle
-- | A 'ComboboxWidget' represents a Combobox widget from IPython.html.widgets.
-- | A 'ComboboxWidget' represents a Combobox widget from IPython.html.widgets.
type
ComboboxWidget
=
IPythonWidget
'C
o
mboboxType
type
ComboboxWidget
=
IPythonWidget
'C
o
mboboxType
...
@@ -37,8 +38,9 @@ mkComboboxWidget = do
...
@@ -37,8 +38,9 @@ mkComboboxWidget = do
-- Default properties, with a random uuid
-- Default properties, with a random uuid
wid
<-
U
.
random
wid
<-
U
.
random
layout
<-
mkLayout
layout
<-
mkLayout
dstyle
<-
mkDescriptionStyle
let
txtWidget
=
defaultTextWidget
"ComboboxView"
"ComboboxModel"
layout
let
txtWidget
=
defaultTextWidget
"ComboboxView"
"ComboboxModel"
layout
dstyle
boxWidget
=
(
Options
=::
[]
)
boxWidget
=
(
Options
=::
[]
)
:&
(
EnsureOption
=::
False
)
:&
(
EnsureOption
=::
False
)
:&
RNil
:&
RNil
...
...
ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/String/HTML.hs
View file @
abf2a721
...
@@ -24,6 +24,7 @@ import IHaskell.IPython.Message.UUID as U
...
@@ -24,6 +24,7 @@ import IHaskell.IPython.Message.UUID as U
import
IHaskell.Display.Widgets.Types
import
IHaskell.Display.Widgets.Types
import
IHaskell.Display.Widgets.Layout.LayoutWidget
import
IHaskell.Display.Widgets.Layout.LayoutWidget
import
IHaskell.Display.Widgets.Style.DescriptionStyle
-- | A 'HTMLWidget' represents a HTML widget from IPython.html.widgets.
-- | A 'HTMLWidget' represents a HTML widget from IPython.html.widgets.
type
HTMLWidget
=
IPythonWidget
'H
T
MLType
type
HTMLWidget
=
IPythonWidget
'H
T
MLType
...
@@ -34,8 +35,9 @@ mkHTMLWidget = do
...
@@ -34,8 +35,9 @@ mkHTMLWidget = do
-- Default properties, with a random uuid
-- Default properties, with a random uuid
wid
<-
U
.
random
wid
<-
U
.
random
layout
<-
mkLayout
layout
<-
mkLayout
dstyle
<-
mkDescriptionStyle
let
widgetState
=
WidgetState
$
defaultStringWidget
"HTMLView"
"HTMLModel"
layout
let
widgetState
=
WidgetState
$
defaultStringWidget
"HTMLView"
"HTMLModel"
layout
dstyle
stateIO
<-
newIORef
widgetState
stateIO
<-
newIORef
widgetState
...
...
ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/String/HTMLMath.hs
View file @
abf2a721
...
@@ -24,6 +24,7 @@ import IHaskell.IPython.Message.UUID as U
...
@@ -24,6 +24,7 @@ import IHaskell.IPython.Message.UUID as U
import
IHaskell.Display.Widgets.Types
import
IHaskell.Display.Widgets.Types
import
IHaskell.Display.Widgets.Layout.LayoutWidget
import
IHaskell.Display.Widgets.Layout.LayoutWidget
import
IHaskell.Display.Widgets.Style.DescriptionStyle
-- | A 'HTMLMathWidget' represents a HTML Math widget from IPython.html.widgets.
-- | A 'HTMLMathWidget' represents a HTML Math widget from IPython.html.widgets.
type
HTMLMathWidget
=
IPythonWidget
'H
T
MLMathType
type
HTMLMathWidget
=
IPythonWidget
'H
T
MLMathType
...
@@ -34,8 +35,9 @@ mkHTMLMathWidget = do
...
@@ -34,8 +35,9 @@ mkHTMLMathWidget = do
-- Default properties, with a random uuid
-- Default properties, with a random uuid
wid
<-
U
.
random
wid
<-
U
.
random
layout
<-
mkLayout
layout
<-
mkLayout
dstyle
<-
mkDescriptionStyle
let
widgetState
=
WidgetState
$
defaultStringWidget
"HTMLMathView"
"HTMLMathModel"
layout
let
widgetState
=
WidgetState
$
defaultStringWidget
"HTMLMathView"
"HTMLMathModel"
layout
dstyle
stateIO
<-
newIORef
widgetState
stateIO
<-
newIORef
widgetState
...
...
ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/String/Label.hs
View file @
abf2a721
...
@@ -24,6 +24,7 @@ import IHaskell.IPython.Message.UUID as U
...
@@ -24,6 +24,7 @@ import IHaskell.IPython.Message.UUID as U
import
IHaskell.Display.Widgets.Types
import
IHaskell.Display.Widgets.Types
import
IHaskell.Display.Widgets.Layout.LayoutWidget
import
IHaskell.Display.Widgets.Layout.LayoutWidget
import
IHaskell.Display.Widgets.Style.DescriptionStyle
-- | A 'LabelWidget' represents a Label widget from IPython.html.widgets.
-- | A 'LabelWidget' represents a Label widget from IPython.html.widgets.
type
LabelWidget
=
IPythonWidget
'L
a
belType
type
LabelWidget
=
IPythonWidget
'L
a
belType
...
@@ -34,8 +35,9 @@ mkLabelWidget = do
...
@@ -34,8 +35,9 @@ mkLabelWidget = do
-- Default properties, with a random uuid
-- Default properties, with a random uuid
wid
<-
U
.
random
wid
<-
U
.
random
layout
<-
mkLayout
layout
<-
mkLayout
dstyle
<-
mkDescriptionStyle
let
widgetState
=
WidgetState
$
defaultStringWidget
"LabelView"
"LabelModel"
layout
let
widgetState
=
WidgetState
$
defaultStringWidget
"LabelView"
"LabelModel"
layout
dstyle
stateIO
<-
newIORef
widgetState
stateIO
<-
newIORef
widgetState
...
...
ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/String/Password.hs
View file @
abf2a721
...
@@ -27,6 +27,7 @@ import IHaskell.IPython.Message.UUID as U
...
@@ -27,6 +27,7 @@ import IHaskell.IPython.Message.UUID as U
import
IHaskell.Display.Widgets.Types
import
IHaskell.Display.Widgets.Types
import
IHaskell.Display.Widgets.Common
import
IHaskell.Display.Widgets.Common
import
IHaskell.Display.Widgets.Layout.LayoutWidget
import
IHaskell.Display.Widgets.Layout.LayoutWidget
import
IHaskell.Display.Widgets.Style.DescriptionStyle
-- | A 'PasswordWidget' represents a Password widget from IPython.html.widgets.
-- | A 'PasswordWidget' represents a Password widget from IPython.html.widgets.
type
PasswordWidget
=
IPythonWidget
'P
a
sswordType
type
PasswordWidget
=
IPythonWidget
'P
a
sswordType
...
@@ -37,8 +38,9 @@ mkPasswordWidget = do
...
@@ -37,8 +38,9 @@ mkPasswordWidget = do
-- Default properties, with a random uuid
-- Default properties, with a random uuid
wid
<-
U
.
random
wid
<-
U
.
random
layout
<-
mkLayout
layout
<-
mkLayout
dstyle
<-
mkDescriptionStyle
let
widgetState
=
WidgetState
$
defaultTextWidget
"PasswordView"
"PasswordModel"
layout
let
widgetState
=
WidgetState
$
defaultTextWidget
"PasswordView"
"PasswordModel"
layout
dstyle
stateIO
<-
newIORef
widgetState
stateIO
<-
newIORef
widgetState
...
...
ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/String/Text.hs
View file @
abf2a721
...
@@ -27,6 +27,7 @@ import IHaskell.IPython.Message.UUID as U
...
@@ -27,6 +27,7 @@ import IHaskell.IPython.Message.UUID as U
import
IHaskell.Display.Widgets.Types
import
IHaskell.Display.Widgets.Types
import
IHaskell.Display.Widgets.Common
import
IHaskell.Display.Widgets.Common
import
IHaskell.Display.Widgets.Layout.LayoutWidget
import
IHaskell.Display.Widgets.Layout.LayoutWidget
import
IHaskell.Display.Widgets.Style.DescriptionStyle
-- | A 'TextWidget' represents a Text widget from IPython.html.widgets.
-- | A 'TextWidget' represents a Text widget from IPython.html.widgets.
type
TextWidget
=
IPythonWidget
'T
e
xtType
type
TextWidget
=
IPythonWidget
'T
e
xtType
...
@@ -37,8 +38,9 @@ mkTextWidget = do
...
@@ -37,8 +38,9 @@ mkTextWidget = do
-- Default properties, with a random uuid
-- Default properties, with a random uuid
wid
<-
U
.
random
wid
<-
U
.
random
layout
<-
mkLayout
layout
<-
mkLayout
dstyle
<-
mkDescriptionStyle
let
widgetState
=
WidgetState
$
defaultTextWidget
"TextView"
"TextModel"
layout
let
widgetState
=
WidgetState
$
defaultTextWidget
"TextView"
"TextModel"
layout
dstyle
stateIO
<-
newIORef
widgetState
stateIO
<-
newIORef
widgetState
...
...
ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/String/TextArea.hs
View file @
abf2a721
...
@@ -26,6 +26,7 @@ import IHaskell.IPython.Message.UUID as U
...
@@ -26,6 +26,7 @@ import IHaskell.IPython.Message.UUID as U
import
IHaskell.Display.Widgets.Types
import
IHaskell.Display.Widgets.Types
import
IHaskell.Display.Widgets.Common
import
IHaskell.Display.Widgets.Common
import
IHaskell.Display.Widgets.Layout.LayoutWidget
import
IHaskell.Display.Widgets.Layout.LayoutWidget
import
IHaskell.Display.Widgets.Style.DescriptionStyle
-- | A 'TextArea' represents a Textarea widget from IPython.html.widgets.
-- | A 'TextArea' represents a Textarea widget from IPython.html.widgets.
type
TextArea
=
IPythonWidget
'T
e
xtAreaType
type
TextArea
=
IPythonWidget
'T
e
xtAreaType
...
@@ -36,8 +37,9 @@ mkTextArea = do
...
@@ -36,8 +37,9 @@ mkTextArea = do
-- Default properties, with a random uuid
-- Default properties, with a random uuid
wid
<-
U
.
random
wid
<-
U
.
random
layout
<-
mkLayout
layout
<-
mkLayout
dstyle
<-
mkDescriptionStyle
let
strAttrs
=
defaultStringWidget
"TextareaView"
"TextareaModel"
layout
let
strAttrs
=
defaultStringWidget
"TextareaView"
"TextareaModel"
layout
dstyle
wgtAttrs
=
(
Rows
=::
Nothing
)
wgtAttrs
=
(
Rows
=::
Nothing
)
:&
(
Disabled
=::
False
)
:&
(
Disabled
=::
False
)
:&
(
ContinuousUpdate
=::
True
)
:&
(
ContinuousUpdate
=::
True
)
...
...
ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/Style/ButtonStyle.hs
0 → 100644
View file @
abf2a721
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE TypeSynonymInstances #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module
IHaskell.Display.Widgets.Style.ButtonStyle
(
-- * Button style
ButtonStyle
-- * Create a new button style
,
mkButtonStyle
)
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
IHaskell.Display
import
IHaskell.Eval.Widgets
import
IHaskell.IPython.Message.UUID
as
U
import
IHaskell.Display.Widgets.Types
import
IHaskell.Display.Widgets.Common
-- | A 'ButtonStyle' represents a Button Style from IPython.html.widgets.
type
ButtonStyle
=
IPythonWidget
'B
u
ttonStyleType
-- | Create a new button style
mkButtonStyle
::
IO
ButtonStyle
mkButtonStyle
=
do
wid
<-
U
.
random
let
stl
=
defaultStyleWidget
"ButtonStyleModel"
but
=
(
ButtonColor
=::
Nothing
)
:&
(
FontWeight
=::
DefaultWeight
)
:&
RNil
btnStlState
=
WidgetState
(
stl
<+>
but
)
stateIO
<-
newIORef
btnStlState
let
style
=
IPythonWidget
wid
stateIO
-- Open a comm for this widget, and store it in the kernel state
widgetSendOpen
style
$
toJSON
btnStlState
-- Return the style widget
return
style
instance
IHaskellWidget
ButtonStyle
where
getCommUUID
=
uuid
ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/Style/DescriptionStyle.hs
0 → 100644
View file @
abf2a721
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE TypeSynonymInstances #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module
IHaskell.Display.Widgets.Style.DescriptionStyle
(
-- * Description style
DescriptionStyle
-- * Create a new description style
,
mkDescriptionStyle
)
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
IHaskell.Display
import
IHaskell.Eval.Widgets
import
IHaskell.IPython.Message.UUID
as
U
import
IHaskell.Display.Widgets.Types
import
IHaskell.Display.Widgets.Common
-- | A 'DescriptionStyle' represents a Button Style from IPython.html.widgets.
type
DescriptionStyle
=
IPythonWidget
'D
e
scriptionStyleType
-- | Create a new button style
mkDescriptionStyle
::
IO
DescriptionStyle
mkDescriptionStyle
=
do
wid
<-
U
.
random
let
stl
=
defaultStyleWidget
"DescriptionStyleModel"
but
=
(
DescriptionWidth
=::
""
)
:&
RNil
btnStlState
=
WidgetState
(
stl
<+>
but
)
stateIO
<-
newIORef
btnStlState
let
style
=
IPythonWidget
wid
stateIO
-- Open a comm for this widget, and store it in the kernel state
widgetSendOpen
style
$
toJSON
btnStlState
-- Return the style widget
return
style
instance
IHaskellWidget
DescriptionStyle
where
getCommUUID
=
uuid
ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/Types.hs
View file @
abf2a721
...
@@ -131,7 +131,7 @@ type DOMWidgetClass = ['S.ModelName, 'S.ViewName, 'S.DOMClasses, 'S.Tabbable, 'S
...
@@ -131,7 +131,7 @@ type DOMWidgetClass = ['S.ModelName, 'S.ViewName, 'S.DOMClasses, 'S.Tabbable, 'S
type
StyleWidgetClass
=
[
'S
.
ModelName
,
'S
.
ViewName
]
:++
CoreWidgetClass
type
StyleWidgetClass
=
[
'S
.
ModelName
,
'S
.
ViewName
]
:++
CoreWidgetClass
type
DescriptionWidgetClass
=
CoreWidgetClass
:++
DOMWidgetClass
:++
'[
'S
.
Description
]
type
DescriptionWidgetClass
=
CoreWidgetClass
:++
DOMWidgetClass
:++
[
'S
.
Description
,
'S
.
StyleDescription
]
type
StringClass
=
DescriptionWidgetClass
:++
[
'S
.
StringValue
,
'S
.
Placeholder
]
type
StringClass
=
DescriptionWidgetClass
:++
[
'S
.
StringValue
,
'S
.
Placeholder
]
...
@@ -257,6 +257,7 @@ type instance FieldType 'S.Buttons = [IPythonWidget 'ControllerButtonType]
...
@@ -257,6 +257,7 @@ type instance FieldType 'S.Buttons = [IPythonWidget 'ControllerButtonType]
type
instance
FieldType
'S
.
Axes
=
[
IPythonWidget
'C
o
ntrollerAxisType
]
type
instance
FieldType
'S
.
Axes
=
[
IPythonWidget
'C
o
ntrollerAxisType
]
type
instance
FieldType
'S
.
ButtonColor
=
Maybe
String
type
instance
FieldType
'S
.
ButtonColor
=
Maybe
String
type
instance
FieldType
'S
.
FontWeight
=
FontWeightValue
type
instance
FieldType
'S
.
FontWeight
=
FontWeightValue
type
instance
FieldType
'S
.
DescriptionWidth
=
String
type
instance
FieldType
'S
.
StyleButton
=
IPythonWidget
'B
u
ttonStyleType
type
instance
FieldType
'S
.
StyleButton
=
IPythonWidget
'B
u
ttonStyleType
type
instance
FieldType
'S
.
StyleDescription
=
IPythonWidget
'D
e
scriptionStyleType
type
instance
FieldType
'S
.
StyleDescription
=
IPythonWidget
'D
e
scriptionStyleType
type
instance
FieldType
'S
.
StyleProgress
=
IPythonWidget
'P
r
ogressStyleType
type
instance
FieldType
'S
.
StyleProgress
=
IPythonWidget
'P
r
ogressStyleType
...
@@ -431,6 +432,7 @@ type instance WidgetFields 'ControllerAxisType = CoreWidgetClass :++ DOMWidgetCl
...
@@ -431,6 +432,7 @@ type instance WidgetFields 'ControllerAxisType = CoreWidgetClass :++ DOMWidgetCl
type
instance
WidgetFields
'C
o
ntrollerButtonType
=
CoreWidgetClass
:++
DOMWidgetClass
:++
[
'S
.
FloatValue
,
'S
.
Pressed
,
'S
.
ChangeHandler
]
type
instance
WidgetFields
'C
o
ntrollerButtonType
=
CoreWidgetClass
:++
DOMWidgetClass
:++
[
'S
.
FloatValue
,
'S
.
Pressed
,
'S
.
ChangeHandler
]
type
instance
WidgetFields
'B
u
ttonStyleType
=
StyleWidgetClass
:++
[
'S
.
ButtonColor
,
'S
.
FontWeight
]
type
instance
WidgetFields
'B
u
ttonStyleType
=
StyleWidgetClass
:++
[
'S
.
ButtonColor
,
'S
.
FontWeight
]
type
instance
WidgetFields
'D
e
scriptionStyleType
=
StyleWidgetClass
:++
'[
'S
.
DescriptionWidth
]
-- Wrapper around a field's value. A dummy value is sent as an empty string to the frontend.
-- Wrapper around a field's value. A dummy value is sent as an empty string to the frontend.
data
AttrVal
a
=
Dummy
a
data
AttrVal
a
=
Dummy
a
...
@@ -721,6 +723,9 @@ instance ToPairs (Attr 'S.ButtonColor) where
...
@@ -721,6 +723,9 @@ instance ToPairs (Attr 'S.ButtonColor) where
instance
ToPairs
(
Attr
'S
.
FontWeight
)
where
instance
ToPairs
(
Attr
'S
.
FontWeight
)
where
toPairs
x
=
[
"font_weight"
.=
toJSON
x
]
toPairs
x
=
[
"font_weight"
.=
toJSON
x
]
instance
ToPairs
(
Attr
'S
.
DescriptionWidth
)
where
toPairs
x
=
[
"description_width"
.=
toJSON
x
]
-- Style widgets. Same serialization, different type
-- Style widgets. Same serialization, different type
instance
ToPairs
(
Attr
'S
.
StyleButton
)
where
instance
ToPairs
(
Attr
'S
.
StyleButton
)
where
toPairs
x
=
[
"style"
.=
toJSON
x
]
toPairs
x
=
[
"style"
.=
toJSON
x
]
...
@@ -808,23 +813,36 @@ defaultDOMWidget viewName modelName layout = (ModelName =:! modelName)
...
@@ -808,23 +813,36 @@ defaultDOMWidget viewName modelName layout = (ModelName =:! modelName)
:&
RNil
:&
RNil
-- | A record representing an object of the DescriptionWidget class from IPython
-- | A record representing an object of the DescriptionWidget class from IPython
defaultDescriptionWidget
::
FieldType
'S
.
ViewName
->
FieldType
'S
.
ModelName
->
IPythonWidget
'L
a
youtType
->
Rec
Attr
DescriptionWidgetClass
defaultDescriptionWidget
::
FieldType
'S
.
ViewName
defaultDescriptionWidget
viewName
modelName
layout
=
defaultCoreWidget
<+>
defaultDOMWidget
viewName
modelName
layout
<+>
descriptionAttrs
->
FieldType
'S
.
ModelName
->
IPythonWidget
'L
a
youtType
->
IPythonWidget
'D
e
scriptionStyleType
->
Rec
Attr
DescriptionWidgetClass
defaultDescriptionWidget
v
m
l
d
=
defaultCoreWidget
<+>
defaultDOMWidget
v
m
l
<+>
descriptionAttrs
where
where
descriptionAttrs
=
(
Description
=::
""
)
descriptionAttrs
=
(
Description
=::
""
)
:&
(
StyleDescription
=::
d
)
:&
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
->
FieldType
'S
.
ModelName
->
IPythonWidget
'L
a
youtType
->
Rec
Attr
StringClass
defaultStringWidget
::
FieldType
'S
.
ViewName
defaultStringWidget
viewName
modelName
layout
=
defaultDescriptionWidget
viewName
modelName
layout
<+>
strAttrs
->
FieldType
'S
.
ModelName
->
IPythonWidget
'L
a
youtType
->
IPythonWidget
'D
e
scriptionStyleType
->
Rec
Attr
StringClass
defaultStringWidget
viewName
modelName
l
d
=
defaultDescriptionWidget
viewName
modelName
l
d
<+>
strAttrs
where
where
strAttrs
=
(
StringValue
=::
""
)
strAttrs
=
(
StringValue
=::
""
)
:&
(
Placeholder
=::
""
)
:&
(
Placeholder
=::
""
)
:&
RNil
:&
RNil
-- | A record representing a widget of the Text class from IPython
-- | A record representing a widget of the Text class from IPython
defaultTextWidget
::
FieldType
'S
.
ViewName
->
FieldType
'S
.
ModelName
->
IPythonWidget
'L
a
youtType
->
Rec
Attr
TextClass
defaultTextWidget
::
FieldType
'S
.
ViewName
defaultTextWidget
viewName
modelName
layout
=
defaultStringWidget
viewName
modelName
layout
<+>
txtAttrs
->
FieldType
'S
.
ModelName
->
IPythonWidget
'L
a
youtType
->
IPythonWidget
'D
e
scriptionStyleType
->
Rec
Attr
TextClass
defaultTextWidget
viewName
modelName
l
d
=
defaultStringWidget
viewName
modelName
l
d
<+>
txtAttrs
where
where
txtAttrs
=
(
Disabled
=::
False
)
txtAttrs
=
(
Disabled
=::
False
)
:&
(
ContinuousUpdate
=::
True
)
:&
(
ContinuousUpdate
=::
True
)
...
@@ -833,8 +851,12 @@ defaultTextWidget viewName modelName layout = defaultStringWidget viewName model
...
@@ -833,8 +851,12 @@ defaultTextWidget viewName modelName layout = defaultStringWidget viewName model
:&
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
->
FieldType
'S
.
ModelName
->
IPythonWidget
'L
a
youtType
->
Rec
Attr
BoolClass
defaultBoolWidget
::
FieldType
'S
.
ViewName
defaultBoolWidget
viewName
modelName
layout
=
defaultDescriptionWidget
viewName
modelName
layout
<+>
boolAttrs
->
FieldType
'S
.
ModelName
->
IPythonWidget
'L
a
youtType
->
IPythonWidget
'D
e
scriptionStyleType
->
Rec
Attr
BoolClass
defaultBoolWidget
viewName
modelName
l
d
=
defaultDescriptionWidget
viewName
modelName
l
d
<+>
boolAttrs
where
where
boolAttrs
=
(
BoolValue
=::
False
)
boolAttrs
=
(
BoolValue
=::
False
)
:&
(
Disabled
=::
False
)
:&
(
Disabled
=::
False
)
...
@@ -842,8 +864,12 @@ defaultBoolWidget viewName modelName layout = defaultDescriptionWidget viewName
...
@@ -842,8 +864,12 @@ defaultBoolWidget viewName modelName layout = defaultDescriptionWidget viewName
:&
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
->
FieldType
'S
.
ModelName
->
IPythonWidget
'L
a
youtType
->
Rec
Attr
SelectionClass
defaultSelectionWidget
::
FieldType
'S
.
ViewName
defaultSelectionWidget
viewName
modelName
layout
=
defaultDescriptionWidget
viewName
modelName
layout
<+>
selectionAttrs
->
FieldType
'S
.
ModelName
->
IPythonWidget
'L
a
youtType
->
IPythonWidget
'D
e
scriptionStyleType
->
Rec
Attr
SelectionClass
defaultSelectionWidget
viewName
modelName
l
d
=
defaultDescriptionWidget
viewName
modelName
l
d
<+>
selectionAttrs
where
where
selectionAttrs
=
(
OptionsLabels
=::
[]
)
selectionAttrs
=
(
OptionsLabels
=::
[]
)
:&
(
OptionalIndex
=::
Nothing
)
:&
(
OptionalIndex
=::
Nothing
)
...
@@ -852,8 +878,12 @@ defaultSelectionWidget viewName modelName layout = defaultDescriptionWidget view
...
@@ -852,8 +878,12 @@ defaultSelectionWidget viewName modelName layout = defaultDescriptionWidget view
:&
RNil
:&
RNil
-- | A record representing a widget of the _SelectionNonempty class from IPython
-- | A record representing a widget of the _SelectionNonempty class from IPython
defaultSelectionNonemptyWidget
::
FieldType
'S
.
ViewName
->
FieldType
'S
.
ModelName
->
IPythonWidget
'L
a
youtType
->
Rec
Attr
SelectionNonemptyClass
defaultSelectionNonemptyWidget
::
FieldType
'S
.
ViewName
defaultSelectionNonemptyWidget
viewName
modelName
layout
=
defaultDescriptionWidget
viewName
modelName
layout
<+>
selectionAttrs
->
FieldType
'S
.
ModelName
->
IPythonWidget
'L
a
youtType
->
IPythonWidget
'D
e
scriptionStyleType
->
Rec
Attr
SelectionNonemptyClass
defaultSelectionNonemptyWidget
viewName
modelName
l
d
=
defaultDescriptionWidget
viewName
modelName
l
d
<+>
selectionAttrs
where
where
selectionAttrs
=
(
OptionsLabels
=::
[]
)
selectionAttrs
=
(
OptionsLabels
=::
[]
)
:&
(
Index
=::
0
)
:&
(
Index
=::
0
)
...
@@ -862,8 +892,12 @@ defaultSelectionNonemptyWidget viewName modelName layout = defaultDescriptionWid
...
@@ -862,8 +892,12 @@ defaultSelectionNonemptyWidget viewName modelName layout = defaultDescriptionWid
:&
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
->
FieldType
'S
.
ModelName
->
IPythonWidget
'L
a
youtType
->
Rec
Attr
MultipleSelectionClass
defaultMultipleSelectionWidget
::
FieldType
'S
.
ViewName
defaultMultipleSelectionWidget
viewName
modelName
layout
=
defaultDescriptionWidget
viewName
modelName
layout
<+>
mulSelAttrs
->
FieldType
'S
.
ModelName
->
IPythonWidget
'L
a
youtType
->
IPythonWidget
'D
e
scriptionStyleType
->
Rec
Attr
MultipleSelectionClass
defaultMultipleSelectionWidget
viewName
modelName
l
d
=
defaultDescriptionWidget
viewName
modelName
l
d
<+>
mulSelAttrs
where
where
mulSelAttrs
=
(
OptionsLabels
=::
[]
)
mulSelAttrs
=
(
OptionsLabels
=::
[]
)
:&
(
Indices
=::
[]
)
:&
(
Indices
=::
[]
)
...
@@ -872,24 +906,36 @@ defaultMultipleSelectionWidget viewName modelName layout = defaultDescriptionWid
...
@@ -872,24 +906,36 @@ defaultMultipleSelectionWidget viewName modelName layout = defaultDescriptionWid
:&
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
->
FieldType
'S
.
ModelName
->
IPythonWidget
'L
a
youtType
->
Rec
Attr
IntClass
defaultIntWidget
::
FieldType
'S
.
ViewName
defaultIntWidget
viewName
modelName
layout
=
defaultDescriptionWidget
viewName
modelName
layout
<+>
intAttrs
->
FieldType
'S
.
ModelName
->
IPythonWidget
'L
a
youtType
->
IPythonWidget
'D
e
scriptionStyleType
->
Rec
Attr
IntClass
defaultIntWidget
viewName
modelName
l
d
=
defaultDescriptionWidget
viewName
modelName
l
d
<+>
intAttrs
where
where
intAttrs
=
(
IntValue
=::
0
)
intAttrs
=
(
IntValue
=::
0
)
:&
(
ChangeHandler
=::
return
()
)
:&
(
ChangeHandler
=::
return
()
)
:&
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
->
FieldType
'S
.
ModelName
->
IPythonWidget
'L
a
youtType
->
Rec
Attr
BoundedIntClass
defaultBoundedIntWidget
::
FieldType
'S
.
ViewName
defaultBoundedIntWidget
viewName
modelName
layout
=
defaultIntWidget
viewName
modelName
layout
<+>
boundedIntAttrs
->
FieldType
'S
.
ModelName
->
IPythonWidget
'L
a
youtType
->
IPythonWidget
'D
e
scriptionStyleType
->
Rec
Attr
BoundedIntClass
defaultBoundedIntWidget
viewName
modelName
l
d
=
defaultIntWidget
viewName
modelName
l
d
<+>
boundedIntAttrs
where
where
boundedIntAttrs
=
(
MaxInt
=::
100
)
boundedIntAttrs
=
(
MaxInt
=::
100
)
:&
(
MinInt
=::
0
)
:&
(
MinInt
=::
0
)
:&
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
->
FieldType
'S
.
ModelName
->
IPythonWidget
'L
a
youtType
->
Rec
Attr
IntRangeClass
defaultIntRangeWidget
::
FieldType
'S
.
ViewName
defaultIntRangeWidget
viewName
modelName
layout
=
defaultIntWidget
viewName
modelName
layout
<+>
rangeAttrs
->
FieldType
'S
.
ModelName
->
IPythonWidget
'L
a
youtType
->
IPythonWidget
'D
e
scriptionStyleType
->
Rec
Attr
IntRangeClass
defaultIntRangeWidget
viewName
modelName
l
d
=
defaultIntWidget
viewName
modelName
l
d
<+>
rangeAttrs
where
where
rangeAttrs
=
(
IntPairValue
=::
(
25
,
75
))
rangeAttrs
=
(
IntPairValue
=::
(
25
,
75
))
:&
(
LowerInt
=::
0
)
:&
(
LowerInt
=::
0
)
...
@@ -897,49 +943,73 @@ defaultIntRangeWidget viewName modelName layout = defaultIntWidget viewName mode
...
@@ -897,49 +943,73 @@ defaultIntRangeWidget viewName modelName layout = defaultIntWidget viewName mode
:&
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
->
FieldType
'S
.
ModelName
->
IPythonWidget
'L
a
youtType
->
Rec
Attr
BoundedIntRangeClass
defaultBoundedIntRangeWidget
::
FieldType
'S
.
ViewName
defaultBoundedIntRangeWidget
viewName
modelName
layout
=
defaultIntRangeWidget
viewName
modelName
layout
<+>
boundedIntRangeAttrs
->
FieldType
'S
.
ModelName
->
IPythonWidget
'L
a
youtType
->
IPythonWidget
'D
e
scriptionStyleType
->
Rec
Attr
BoundedIntRangeClass
defaultBoundedIntRangeWidget
viewName
modelName
l
d
=
defaultIntRangeWidget
viewName
modelName
l
d
<+>
boundedIntRangeAttrs
where
where
boundedIntRangeAttrs
=
(
MaxInt
=::
100
)
boundedIntRangeAttrs
=
(
MaxInt
=::
100
)
:&
(
MinInt
=::
0
)
:&
(
MinInt
=::
0
)
:&
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
->
FieldType
'S
.
ModelName
->
IPythonWidget
'L
a
youtType
->
Rec
Attr
FloatClass
defaultFloatWidget
::
FieldType
'S
.
ViewName
defaultFloatWidget
viewName
modelName
layout
=
defaultDescriptionWidget
viewName
modelName
layout
<+>
floatAttrs
->
FieldType
'S
.
ModelName
->
IPythonWidget
'L
a
youtType
->
IPythonWidget
'D
e
scriptionStyleType
->
Rec
Attr
FloatClass
defaultFloatWidget
viewName
modelName
l
d
=
defaultDescriptionWidget
viewName
modelName
l
d
<+>
floatAttrs
where
where
floatAttrs
=
(
FloatValue
=::
0.0
)
floatAttrs
=
(
FloatValue
=::
0.0
)
:&
(
ChangeHandler
=::
return
()
)
:&
(
ChangeHandler
=::
return
()
)
:&
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
->
FieldType
'S
.
ModelName
->
IPythonWidget
'L
a
youtType
->
Rec
Attr
BoundedFloatClass
defaultBoundedFloatWidget
::
FieldType
'S
.
ViewName
defaultBoundedFloatWidget
viewName
modelName
layout
=
defaultFloatWidget
viewName
modelName
layout
<+>
boundedFloatAttrs
->
FieldType
'S
.
ModelName
->
IPythonWidget
'L
a
youtType
->
IPythonWidget
'D
e
scriptionStyleType
->
Rec
Attr
BoundedFloatClass
defaultBoundedFloatWidget
viewName
modelName
l
d
=
defaultFloatWidget
viewName
modelName
l
d
<+>
boundedFloatAttrs
where
where
boundedFloatAttrs
=
(
MinFloat
=::
0
)
boundedFloatAttrs
=
(
MinFloat
=::
0
)
:&
(
MaxFloat
=::
100
)
:&
(
MaxFloat
=::
100
)
:&
RNil
:&
RNil
-- | A record representing a widget of the _BoundedLogFloat class from IPython
-- | A record representing a widget of the _BoundedLogFloat class from IPython
defaultBoundedLogFloatWidget
::
FieldType
'S
.
ViewName
->
FieldType
'S
.
ModelName
->
IPythonWidget
'L
a
youtType
->
Rec
Attr
BoundedLogFloatClass
defaultBoundedLogFloatWidget
::
FieldType
'S
.
ViewName
defaultBoundedLogFloatWidget
viewName
modelName
layout
=
floatAttrs
<+>
boundedLogFloatAttrs
->
FieldType
'S
.
ModelName
->
IPythonWidget
'L
a
youtType
->
IPythonWidget
'D
e
scriptionStyleType
->
Rec
Attr
BoundedLogFloatClass
defaultBoundedLogFloatWidget
viewName
modelName
l
d
=
floatAttrs
<+>
boundedLogFloatAttrs
where
where
floatAttrs
=
rput
(
FloatValue
=::
1.0
)
$
defaultFloatWidget
viewName
modelName
l
ayout
floatAttrs
=
rput
(
FloatValue
=::
1.0
)
$
defaultFloatWidget
viewName
modelName
l
d
boundedLogFloatAttrs
=
(
MinFloat
=::
0.0
)
boundedLogFloatAttrs
=
(
MinFloat
=::
0.0
)
:&
(
MaxFloat
=::
4.0
)
:&
(
MaxFloat
=::
4.0
)
:&
(
BaseFloat
=::
10.0
)
:&
(
BaseFloat
=::
10.0
)
:&
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
->
FieldType
'S
.
ModelName
->
IPythonWidget
'L
a
youtType
->
Rec
Attr
FloatRangeClass
defaultFloatRangeWidget
::
FieldType
'S
.
ViewName
defaultFloatRangeWidget
viewName
modelName
layout
=
defaultFloatWidget
viewName
modelName
layout
<+>
rangeAttrs
->
FieldType
'S
.
ModelName
->
IPythonWidget
'L
a
youtType
->
IPythonWidget
'D
e
scriptionStyleType
->
Rec
Attr
FloatRangeClass
defaultFloatRangeWidget
viewName
modelName
l
d
=
defaultFloatWidget
viewName
modelName
l
d
<+>
rangeAttrs
where
where
rangeAttrs
=
(
FloatPairValue
=::
(
0.0
,
1.0
))
rangeAttrs
=
(
FloatPairValue
=::
(
0.0
,
1.0
))
:&
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
->
FieldType
'S
.
ModelName
->
IPythonWidget
'L
a
youtType
->
Rec
Attr
BoundedFloatRangeClass
defaultBoundedFloatRangeWidget
::
FieldType
'S
.
ViewName
defaultBoundedFloatRangeWidget
viewName
modelName
layout
=
defaultFloatRangeWidget
viewName
modelName
layout
<+>
boundedFloatRangeAttrs
->
FieldType
'S
.
ModelName
->
IPythonWidget
'L
a
youtType
->
IPythonWidget
'D
e
scriptionStyleType
->
Rec
Attr
BoundedFloatRangeClass
defaultBoundedFloatRangeWidget
viewName
modelName
l
d
=
defaultFloatRangeWidget
viewName
modelName
l
d
<+>
boundedFloatRangeAttrs
where
where
boundedFloatRangeAttrs
=
(
StepFloat
=::
Just
1
)
boundedFloatRangeAttrs
=
(
StepFloat
=::
Just
1
)
:&
(
MinFloat
=::
0
)
:&
(
MinFloat
=::
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