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
6a226ce3
Commit
6a226ce3
authored
Sep 12, 2015
by
Sumit Sahrawat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Sync-ing with ipywidgets changes
parent
f61ab434
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
7 deletions
+17
-7
FloatProgress.hs
...skell/Display/Widgets/Float/BoundedFloat/FloatProgress.hs
+3
-1
Image.hs
...ay/ihaskell-widgets/src/IHaskell/Display/Widgets/Image.hs
+2
-0
IntProgress.hs
...rc/IHaskell/Display/Widgets/Int/BoundedInt/IntProgress.hs
+3
-1
Types.hs
...ay/ihaskell-widgets/src/IHaskell/Display/Widgets/Types.hs
+9
-5
No files found.
ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/Float/BoundedFloat/FloatProgress.hs
View file @
6a226ce3
...
@@ -38,7 +38,9 @@ mkFloatProgress = do
...
@@ -38,7 +38,9 @@ mkFloatProgress = do
uuid
<-
U
.
random
uuid
<-
U
.
random
let
boundedFloatAttrs
=
defaultBoundedFloatWidget
"ProgressView"
let
boundedFloatAttrs
=
defaultBoundedFloatWidget
"ProgressView"
progressAttrs
=
(
BarStyle
=::
DefaultBar
)
:&
RNil
progressAttrs
=
(
Orientation
=::
HorizontalOrientation
)
:&
(
BarStyle
=::
DefaultBar
)
:&
RNil
widgetState
=
WidgetState
$
boundedFloatAttrs
<+>
progressAttrs
widgetState
=
WidgetState
$
boundedFloatAttrs
<+>
progressAttrs
stateIO
<-
newIORef
widgetState
stateIO
<-
newIORef
widgetState
...
...
ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/Image.hs
View file @
6a226ce3
...
@@ -38,6 +38,8 @@ mkImageWidget = do
...
@@ -38,6 +38,8 @@ mkImageWidget = do
let
dom
=
defaultDOMWidget
"ImageView"
let
dom
=
defaultDOMWidget
"ImageView"
img
=
(
ImageFormat
=::
PNG
)
img
=
(
ImageFormat
=::
PNG
)
:&
(
Width
=:+
0
)
:&
(
Height
=:+
0
)
:&
(
B64Value
=::
mempty
)
:&
(
B64Value
=::
mempty
)
:&
RNil
:&
RNil
widgetState
=
WidgetState
(
dom
<+>
img
)
widgetState
=
WidgetState
(
dom
<+>
img
)
...
...
ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/Int/BoundedInt/IntProgress.hs
View file @
6a226ce3
...
@@ -38,7 +38,9 @@ mkIntProgress = do
...
@@ -38,7 +38,9 @@ mkIntProgress = do
uuid
<-
U
.
random
uuid
<-
U
.
random
let
boundedIntAttrs
=
defaultBoundedIntWidget
"ProgressView"
let
boundedIntAttrs
=
defaultBoundedIntWidget
"ProgressView"
progressAttrs
=
(
BarStyle
=::
DefaultBar
)
:&
RNil
progressAttrs
=
(
Orientation
=::
HorizontalOrientation
)
:&
(
BarStyle
=::
DefaultBar
)
:&
RNil
widgetState
=
WidgetState
$
boundedIntAttrs
<+>
progressAttrs
widgetState
=
WidgetState
$
boundedIntAttrs
<+>
progressAttrs
stateIO
<-
newIORef
widgetState
stateIO
<-
newIORef
widgetState
...
...
ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/Types.hs
View file @
6a226ce3
...
@@ -239,6 +239,7 @@ data WidgetType = ButtonType
...
@@ -239,6 +239,7 @@ data WidgetType = ButtonType
|
TextAreaType
|
TextAreaType
|
CheckBoxType
|
CheckBoxType
|
ToggleButtonType
|
ToggleButtonType
-- TODO: Add 'Valid' widget
|
DropdownType
|
DropdownType
|
RadioButtonsType
|
RadioButtonsType
|
SelectType
|
SelectType
...
@@ -254,6 +255,7 @@ data WidgetType = ButtonType
...
@@ -254,6 +255,7 @@ data WidgetType = ButtonType
|
FloatSliderType
|
FloatSliderType
|
FloatProgressType
|
FloatProgressType
|
FloatRangeSliderType
|
FloatRangeSliderType
-- TODO: Add Proxy and PlaceProxy
|
BoxType
|
BoxType
|
FlexBoxType
|
FlexBoxType
|
AccordionType
|
AccordionType
...
@@ -267,7 +269,7 @@ type family WidgetFields (w :: WidgetType) :: [Field] where
...
@@ -267,7 +269,7 @@ type family WidgetFields (w :: WidgetType) :: [Field] where
'[
S
.
Description
,
S
.
Tooltip
,
S
.
Disabled
,
S
.
Icon
,
S
.
ButtonStyle
,
'[
S
.
Description
,
S
.
Tooltip
,
S
.
Disabled
,
S
.
Icon
,
S
.
ButtonStyle
,
S
.
ClickHandler
]
S
.
ClickHandler
]
WidgetFields
ImageType
=
WidgetFields
ImageType
=
DOMWidgetClass
:++
'[
S
.
ImageFormat
,
S
.
B64Value
]
DOMWidgetClass
:++
'[
S
.
ImageFormat
,
S
.
Width
,
S
.
Height
,
S
.
B64Value
]
WidgetFields
OutputType
=
DOMWidgetClass
WidgetFields
OutputType
=
DOMWidgetClass
WidgetFields
HTMLType
=
StringClass
WidgetFields
HTMLType
=
StringClass
WidgetFields
LatexType
=
StringClass
WidgetFields
LatexType
=
StringClass
...
@@ -288,7 +290,7 @@ type family WidgetFields (w :: WidgetType) :: [Field] where
...
@@ -288,7 +290,7 @@ type family WidgetFields (w :: WidgetType) :: [Field] where
WidgetFields
IntSliderType
=
WidgetFields
IntSliderType
=
BoundedIntClass
:++
BoundedIntClass
:++
'[
S
.
Orientation
,
S
.
ShowRange
,
S
.
ReadOut
,
S
.
SliderColor
]
'[
S
.
Orientation
,
S
.
ShowRange
,
S
.
ReadOut
,
S
.
SliderColor
]
WidgetFields
IntProgressType
=
BoundedIntClass
:++
'[
S
.
BarStyle
]
WidgetFields
IntProgressType
=
BoundedIntClass
:++
'[
S
.
Orientation
,
S
.
BarStyle
]
WidgetFields
IntRangeSliderType
=
WidgetFields
IntRangeSliderType
=
BoundedIntRangeClass
:++
BoundedIntRangeClass
:++
'[
S
.
Orientation
,
S
.
ShowRange
,
S
.
ReadOut
,
S
.
SliderColor
]
'[
S
.
Orientation
,
S
.
ShowRange
,
S
.
ReadOut
,
S
.
SliderColor
]
...
@@ -298,7 +300,7 @@ type family WidgetFields (w :: WidgetType) :: [Field] where
...
@@ -298,7 +300,7 @@ type family WidgetFields (w :: WidgetType) :: [Field] where
BoundedFloatClass
:++
BoundedFloatClass
:++
'[
S
.
Orientation
,
S
.
ShowRange
,
S
.
ReadOut
,
S
.
SliderColor
]
'[
S
.
Orientation
,
S
.
ShowRange
,
S
.
ReadOut
,
S
.
SliderColor
]
WidgetFields
FloatProgressType
=
WidgetFields
FloatProgressType
=
BoundedFloatClass
:++
'[
S
.
BarStyle
]
BoundedFloatClass
:++
'[
S
.
Orientation
,
S
.
BarStyle
]
WidgetFields
FloatRangeSliderType
=
WidgetFields
FloatRangeSliderType
=
BoundedFloatRangeClass
:++
BoundedFloatRangeClass
:++
'[
S
.
Orientation
,
S
.
ShowRange
,
S
.
ReadOut
,
S
.
SliderColor
]
'[
S
.
Orientation
,
S
.
ShowRange
,
S
.
ReadOut
,
S
.
SliderColor
]
...
@@ -666,8 +668,8 @@ defaultMultipleSelectionWidget :: FieldType S.ViewName -> Rec Attr MultipleSelec
...
@@ -666,8 +668,8 @@ defaultMultipleSelectionWidget :: FieldType S.ViewName -> Rec Attr MultipleSelec
defaultMultipleSelectionWidget
viewName
=
defaultDOMWidget
viewName
<+>
mulSelAttrs
defaultMultipleSelectionWidget
viewName
=
defaultDOMWidget
viewName
<+>
mulSelAttrs
where
where
mulSelAttrs
=
(
Options
=::
OptionLabels
[]
)
mulSelAttrs
=
(
Options
=::
OptionLabels
[]
)
:&
(
SelectedLabels
=::
[]
)
:&
(
SelectedValues
=::
[]
)
:&
(
SelectedValues
=::
[]
)
:&
(
SelectedLabels
=::
[]
)
:&
(
Disabled
=::
False
)
:&
(
Disabled
=::
False
)
:&
(
Description
=::
""
)
:&
(
Description
=::
""
)
:&
(
SelectionHandler
=::
return
()
)
:&
(
SelectionHandler
=::
return
()
)
...
@@ -749,8 +751,10 @@ defaultBoundedFloatRangeWidget viewName = defaultFloatRangeWidget viewName <+> b
...
@@ -749,8 +751,10 @@ defaultBoundedFloatRangeWidget viewName = defaultFloatRangeWidget viewName <+> b
-- | A record representing a widget of the _Box class from IPython
-- | A record representing a widget of the _Box class from IPython
defaultBoxWidget
::
FieldType
S
.
ViewName
->
Rec
Attr
BoxClass
defaultBoxWidget
::
FieldType
S
.
ViewName
->
Rec
Attr
BoxClass
defaultBoxWidget
viewName
=
d
efaultDOMWidget
viewName
<+>
boxAttrs
defaultBoxWidget
viewName
=
d
omAttrs
<+>
boxAttrs
where
where
defaultDOM
=
defaultDOMWidget
viewName
domAttrs
=
rput
(
ModelName
=::
"BoxModel"
)
defaultDOM
boxAttrs
=
(
Children
=::
[]
)
boxAttrs
=
(
Children
=::
[]
)
:&
(
OverflowX
=::
DefaultOverflow
)
:&
(
OverflowX
=::
DefaultOverflow
)
:&
(
OverflowY
=::
DefaultOverflow
)
:&
(
OverflowY
=::
DefaultOverflow
)
...
...
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