Commit 26addb62 authored by Sumit Sahrawat's avatar Sumit Sahrawat

Drop -Widget suffix wherever possible

parent 4d55781b
...@@ -5,9 +5,9 @@ ...@@ -5,9 +5,9 @@
module IHaskell.Display.Widgets.Bool.CheckBox ( module IHaskell.Display.Widgets.Bool.CheckBox (
-- * The CheckBox Widget -- * The CheckBox Widget
CheckBoxWidget, CheckBox,
-- * Constructor -- * Constructor
mkCheckBoxWidget) where mkCheckBox) 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
...@@ -26,12 +26,12 @@ import IHaskell.IPython.Message.UUID as U ...@@ -26,12 +26,12 @@ 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
-- | A 'CheckBoxWidget' represents a Checkbox widget from IPython.html.widgets. -- | A 'CheckBox' represents a Checkbox widget from IPython.html.widgets.
type CheckBoxWidget = IPythonWidget CheckBoxType type CheckBox = IPythonWidget CheckBoxType
-- | Create a new output widget -- | Create a new output widget
mkCheckBoxWidget :: IO CheckBoxWidget mkCheckBox :: IO CheckBox
mkCheckBoxWidget = do mkCheckBox = do
-- Default properties, with a random uuid -- Default properties, with a random uuid
uuid <- U.random uuid <- U.random
...@@ -49,12 +49,12 @@ mkCheckBoxWidget = do ...@@ -49,12 +49,12 @@ mkCheckBoxWidget = do
-- Return the image widget -- Return the image widget
return widget return widget
instance IHaskellDisplay CheckBoxWidget where instance IHaskellDisplay CheckBox where
display b = do display b = do
widgetSendView b widgetSendView b
return $ Display [] return $ Display []
instance IHaskellWidget CheckBoxWidget where instance IHaskellWidget CheckBox where
getCommUUID = uuid getCommUUID = uuid
comm widget (Object dict1) _ = do comm widget (Object dict1) _ = do
let key1 = "sync_data" :: Text let key1 = "sync_data" :: Text
......
...@@ -5,9 +5,9 @@ ...@@ -5,9 +5,9 @@
module IHaskell.Display.Widgets.Float.BoundedFloat.BoundedFloatText ( module IHaskell.Display.Widgets.Float.BoundedFloat.BoundedFloatText (
-- * The BoundedFloatText Widget -- * The BoundedFloatText Widget
BoundedFloatTextWidget, BoundedFloatText,
-- * Constructor -- * Constructor
mkBoundedFloatTextWidget) where mkBoundedFloatText) 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
...@@ -28,12 +28,12 @@ import IHaskell.IPython.Message.UUID as U ...@@ -28,12 +28,12 @@ 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
-- | 'BoundedFloatTextWidget' represents an BoundedFloatText widget from IPython.html.widgets. -- | 'BoundedFloatText' represents an BoundedFloatText widget from IPython.html.widgets.
type BoundedFloatTextWidget = IPythonWidget BoundedFloatTextType type BoundedFloatText = IPythonWidget BoundedFloatTextType
-- | Create a new widget -- | Create a new widget
mkBoundedFloatTextWidget :: IO BoundedFloatTextWidget mkBoundedFloatText :: IO BoundedFloatText
mkBoundedFloatTextWidget = do mkBoundedFloatText = do
-- Default properties, with a random uuid -- Default properties, with a random uuid
uuid <- U.random uuid <- U.random
...@@ -53,12 +53,12 @@ mkBoundedFloatTextWidget = do ...@@ -53,12 +53,12 @@ mkBoundedFloatTextWidget = do
-- Return the widget -- Return the widget
return widget return widget
instance IHaskellDisplay BoundedFloatTextWidget where instance IHaskellDisplay BoundedFloatText where
display b = do display b = do
widgetSendView b widgetSendView b
return $ Display [] return $ Display []
instance IHaskellWidget BoundedFloatTextWidget where instance IHaskellWidget BoundedFloatText where
getCommUUID = uuid getCommUUID = uuid
comm widget (Object dict1) _ = do comm widget (Object dict1) _ = do
let key1 = "sync_data" :: Text let key1 = "sync_data" :: Text
......
...@@ -5,9 +5,9 @@ ...@@ -5,9 +5,9 @@
module IHaskell.Display.Widgets.Float.BoundedFloat.FloatProgress ( module IHaskell.Display.Widgets.Float.BoundedFloat.FloatProgress (
-- * The FloatProgress Widget -- * The FloatProgress Widget
FloatProgressWidget, FloatProgress,
-- * Constructor -- * Constructor
mkFloatProgressWidget) where mkFloatProgress) 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
...@@ -28,12 +28,12 @@ import IHaskell.IPython.Message.UUID as U ...@@ -28,12 +28,12 @@ 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
-- | 'FloatProgressWidget' represents an FloatProgress widget from IPython.html.widgets. -- | 'FloatProgress' represents an FloatProgress widget from IPython.html.widgets.
type FloatProgressWidget = IPythonWidget FloatProgressType type FloatProgress = IPythonWidget FloatProgressType
-- | Create a new widget -- | Create a new widget
mkFloatProgressWidget :: IO FloatProgressWidget mkFloatProgress :: IO FloatProgress
mkFloatProgressWidget = do mkFloatProgress = do
-- Default properties, with a random uuid -- Default properties, with a random uuid
uuid <- U.random uuid <- U.random
...@@ -55,10 +55,10 @@ mkFloatProgressWidget = do ...@@ -55,10 +55,10 @@ mkFloatProgressWidget = do
-- Return the widget -- Return the widget
return widget return widget
instance IHaskellDisplay FloatProgressWidget where instance IHaskellDisplay FloatProgress where
display b = do display b = do
widgetSendView b widgetSendView b
return $ Display [] return $ Display []
instance IHaskellWidget FloatProgressWidget where instance IHaskellWidget FloatProgress where
getCommUUID = uuid getCommUUID = uuid
...@@ -5,9 +5,9 @@ ...@@ -5,9 +5,9 @@
module IHaskell.Display.Widgets.Float.BoundedFloat.FloatSlider ( module IHaskell.Display.Widgets.Float.BoundedFloat.FloatSlider (
-- * The FloatSlider Widget -- * The FloatSlider Widget
FloatSliderWidget, FloatSlider,
-- * Constructor -- * Constructor
mkFloatSliderWidget) where mkFloatSlider) 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
...@@ -28,12 +28,12 @@ import IHaskell.IPython.Message.UUID as U ...@@ -28,12 +28,12 @@ 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
-- | 'FloatSliderWidget' represents an FloatSlider widget from IPython.html.widgets. -- | 'FloatSlider' represents an FloatSlider widget from IPython.html.widgets.
type FloatSliderWidget = IPythonWidget FloatSliderType type FloatSlider = IPythonWidget FloatSliderType
-- | Create a new widget -- | Create a new widget
mkFloatSliderWidget :: IO FloatSliderWidget mkFloatSlider :: IO FloatSlider
mkFloatSliderWidget = do mkFloatSlider = do
-- Default properties, with a random uuid -- Default properties, with a random uuid
uuid <- U.random uuid <- U.random
...@@ -59,12 +59,12 @@ mkFloatSliderWidget = do ...@@ -59,12 +59,12 @@ mkFloatSliderWidget = do
-- Return the widget -- Return the widget
return widget return widget
instance IHaskellDisplay FloatSliderWidget where instance IHaskellDisplay FloatSlider where
display b = do display b = do
widgetSendView b widgetSendView b
return $ Display [] return $ Display []
instance IHaskellWidget FloatSliderWidget where instance IHaskellWidget FloatSlider where
getCommUUID = uuid getCommUUID = uuid
comm widget (Object dict1) _ = do comm widget (Object dict1) _ = do
let key1 = "sync_data" :: Text let key1 = "sync_data" :: Text
......
...@@ -5,9 +5,9 @@ ...@@ -5,9 +5,9 @@
module IHaskell.Display.Widgets.Float.BoundedFloatRange.FloatRangeSlider ( module IHaskell.Display.Widgets.Float.BoundedFloatRange.FloatRangeSlider (
-- * The FloatRangeSlider Widget -- * The FloatRangeSlider Widget
FloatRangeSliderWidget, FloatRangeSlider,
-- * Constructor -- * Constructor
mkFloatRangeSliderWidget) where mkFloatRangeSlider) 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
...@@ -29,12 +29,12 @@ import IHaskell.IPython.Message.UUID as U ...@@ -29,12 +29,12 @@ 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
-- | 'FloatRangeSliderWidget' represents an FloatRangeSlider widget from IPython.html.widgets. -- | 'FloatRangeSlider' represents an FloatRangeSlider widget from IPython.html.widgets.
type FloatRangeSliderWidget = IPythonWidget FloatRangeSliderType type FloatRangeSlider = IPythonWidget FloatRangeSliderType
-- | Create a new widget -- | Create a new widget
mkFloatRangeSliderWidget :: IO FloatRangeSliderWidget mkFloatRangeSlider :: IO FloatRangeSlider
mkFloatRangeSliderWidget = do mkFloatRangeSlider = do
-- Default properties, with a random uuid -- Default properties, with a random uuid
uuid <- U.random uuid <- U.random
...@@ -60,12 +60,12 @@ mkFloatRangeSliderWidget = do ...@@ -60,12 +60,12 @@ mkFloatRangeSliderWidget = do
-- Return the widget -- Return the widget
return widget return widget
instance IHaskellDisplay FloatRangeSliderWidget where instance IHaskellDisplay FloatRangeSlider where
display b = do display b = do
widgetSendView b widgetSendView b
return $ Display [] return $ Display []
instance IHaskellWidget FloatRangeSliderWidget where instance IHaskellWidget FloatRangeSlider where
getCommUUID = uuid getCommUUID = uuid
comm widget (Object dict1) _ = do comm widget (Object dict1) _ = do
let key1 = "sync_data" :: Text let key1 = "sync_data" :: Text
......
...@@ -5,9 +5,9 @@ ...@@ -5,9 +5,9 @@
module IHaskell.Display.Widgets.Float.FloatText ( module IHaskell.Display.Widgets.Float.FloatText (
-- * The FloatText Widget -- * The FloatText Widget
FloatTextWidget, FloatText,
-- * Constructor -- * Constructor
mkFloatTextWidget) where mkFloatText) 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
...@@ -28,12 +28,12 @@ import IHaskell.IPython.Message.UUID as U ...@@ -28,12 +28,12 @@ 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
-- | 'FloatTextWidget' represents an FloatText widget from IPython.html.widgets. -- | 'FloatText' represents an FloatText widget from IPython.html.widgets.
type FloatTextWidget = IPythonWidget FloatTextType type FloatText = IPythonWidget FloatTextType
-- | Create a new widget -- | Create a new widget
mkFloatTextWidget :: IO FloatTextWidget mkFloatText :: IO FloatText
mkFloatTextWidget = do mkFloatText = do
-- Default properties, with a random uuid -- Default properties, with a random uuid
uuid <- U.random uuid <- U.random
...@@ -50,12 +50,12 @@ mkFloatTextWidget = do ...@@ -50,12 +50,12 @@ mkFloatTextWidget = do
-- Return the widget -- Return the widget
return widget return widget
instance IHaskellDisplay FloatTextWidget where instance IHaskellDisplay FloatText where
display b = do display b = do
widgetSendView b widgetSendView b
return $ Display [] return $ Display []
instance IHaskellWidget FloatTextWidget where instance IHaskellWidget FloatText where
getCommUUID = uuid getCommUUID = uuid
comm widget (Object dict1) _ = do comm widget (Object dict1) _ = do
let key1 = "sync_data" :: Text let key1 = "sync_data" :: Text
......
...@@ -5,9 +5,9 @@ ...@@ -5,9 +5,9 @@
module IHaskell.Display.Widgets.Int.BoundedInt.BoundedIntText ( module IHaskell.Display.Widgets.Int.BoundedInt.BoundedIntText (
-- * The BoundedIntText Widget -- * The BoundedIntText Widget
BoundedIntTextWidget, BoundedIntText,
-- * Constructor -- * Constructor
mkBoundedIntTextWidget) where mkBoundedIntText) 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
...@@ -28,12 +28,12 @@ import IHaskell.IPython.Message.UUID as U ...@@ -28,12 +28,12 @@ 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
-- | 'BoundedIntTextWidget' represents an BoundedIntText widget from IPython.html.widgets. -- | 'BoundedIntText' represents an BoundedIntText widget from IPython.html.widgets.
type BoundedIntTextWidget = IPythonWidget BoundedIntTextType type BoundedIntText = IPythonWidget BoundedIntTextType
-- | Create a new widget -- | Create a new widget
mkBoundedIntTextWidget :: IO BoundedIntTextWidget mkBoundedIntText :: IO BoundedIntText
mkBoundedIntTextWidget = do mkBoundedIntText = do
-- Default properties, with a random uuid -- Default properties, with a random uuid
uuid <- U.random uuid <- U.random
...@@ -53,12 +53,12 @@ mkBoundedIntTextWidget = do ...@@ -53,12 +53,12 @@ mkBoundedIntTextWidget = do
-- Return the widget -- Return the widget
return widget return widget
instance IHaskellDisplay BoundedIntTextWidget where instance IHaskellDisplay BoundedIntText where
display b = do display b = do
widgetSendView b widgetSendView b
return $ Display [] return $ Display []
instance IHaskellWidget BoundedIntTextWidget where instance IHaskellWidget BoundedIntText where
getCommUUID = uuid getCommUUID = uuid
comm widget (Object dict1) _ = do comm widget (Object dict1) _ = do
let key1 = "sync_data" :: Text let key1 = "sync_data" :: Text
......
...@@ -5,9 +5,9 @@ ...@@ -5,9 +5,9 @@
module IHaskell.Display.Widgets.Int.BoundedInt.IntProgress ( module IHaskell.Display.Widgets.Int.BoundedInt.IntProgress (
-- * The IntProgress Widget -- * The IntProgress Widget
IntProgressWidget, IntProgress,
-- * Constructor -- * Constructor
mkIntProgressWidget) where mkIntProgress) 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
...@@ -28,12 +28,12 @@ import IHaskell.IPython.Message.UUID as U ...@@ -28,12 +28,12 @@ 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
-- | 'IntProgressWidget' represents an IntProgress widget from IPython.html.widgets. -- | 'IntProgress' represents an IntProgress widget from IPython.html.widgets.
type IntProgressWidget = IPythonWidget IntProgressType type IntProgress = IPythonWidget IntProgressType
-- | Create a new widget -- | Create a new widget
mkIntProgressWidget :: IO IntProgressWidget mkIntProgress :: IO IntProgress
mkIntProgressWidget = do mkIntProgress = do
-- Default properties, with a random uuid -- Default properties, with a random uuid
uuid <- U.random uuid <- U.random
...@@ -55,10 +55,10 @@ mkIntProgressWidget = do ...@@ -55,10 +55,10 @@ mkIntProgressWidget = do
-- Return the widget -- Return the widget
return widget return widget
instance IHaskellDisplay IntProgressWidget where instance IHaskellDisplay IntProgress where
display b = do display b = do
widgetSendView b widgetSendView b
return $ Display [] return $ Display []
instance IHaskellWidget IntProgressWidget where instance IHaskellWidget IntProgress where
getCommUUID = uuid getCommUUID = uuid
...@@ -5,9 +5,9 @@ ...@@ -5,9 +5,9 @@
module IHaskell.Display.Widgets.Int.BoundedInt.IntSlider ( module IHaskell.Display.Widgets.Int.BoundedInt.IntSlider (
-- * The IntSlider Widget -- * The IntSlider Widget
IntSliderWidget, IntSlider,
-- * Constructor -- * Constructor
mkIntSliderWidget) where mkIntSlider) 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
...@@ -28,12 +28,12 @@ import IHaskell.IPython.Message.UUID as U ...@@ -28,12 +28,12 @@ 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
-- | 'IntSliderWidget' represents an IntSlider widget from IPython.html.widgets. -- | 'IntSlider' represents an IntSlider widget from IPython.html.widgets.
type IntSliderWidget = IPythonWidget IntSliderType type IntSlider = IPythonWidget IntSliderType
-- | Create a new widget -- | Create a new widget
mkIntSliderWidget :: IO IntSliderWidget mkIntSlider :: IO IntSlider
mkIntSliderWidget = do mkIntSlider = do
-- Default properties, with a random uuid -- Default properties, with a random uuid
uuid <- U.random uuid <- U.random
...@@ -59,12 +59,12 @@ mkIntSliderWidget = do ...@@ -59,12 +59,12 @@ mkIntSliderWidget = do
-- Return the widget -- Return the widget
return widget return widget
instance IHaskellDisplay IntSliderWidget where instance IHaskellDisplay IntSlider where
display b = do display b = do
widgetSendView b widgetSendView b
return $ Display [] return $ Display []
instance IHaskellWidget IntSliderWidget where instance IHaskellWidget IntSlider where
getCommUUID = uuid getCommUUID = uuid
comm widget (Object dict1) _ = do comm widget (Object dict1) _ = do
let key1 = "sync_data" :: Text let key1 = "sync_data" :: Text
......
...@@ -5,9 +5,9 @@ ...@@ -5,9 +5,9 @@
module IHaskell.Display.Widgets.Int.BoundedIntRange.IntRangeSlider ( module IHaskell.Display.Widgets.Int.BoundedIntRange.IntRangeSlider (
-- * The IntRangeSlider Widget -- * The IntRangeSlider Widget
IntRangeSliderWidget, IntRangeSlider,
-- * Constructor -- * Constructor
mkIntRangeSliderWidget) where mkIntRangeSlider) 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
...@@ -29,12 +29,12 @@ import IHaskell.IPython.Message.UUID as U ...@@ -29,12 +29,12 @@ 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
-- | 'IntRangeSliderWidget' represents an IntRangeSlider widget from IPython.html.widgets. -- | 'IntRangeSlider' represents an IntRangeSlider widget from IPython.html.widgets.
type IntRangeSliderWidget = IPythonWidget IntRangeSliderType type IntRangeSlider = IPythonWidget IntRangeSliderType
-- | Create a new widget -- | Create a new widget
mkIntRangeSliderWidget :: IO IntRangeSliderWidget mkIntRangeSlider :: IO IntRangeSlider
mkIntRangeSliderWidget = do mkIntRangeSlider = do
-- Default properties, with a random uuid -- Default properties, with a random uuid
uuid <- U.random uuid <- U.random
...@@ -60,12 +60,12 @@ mkIntRangeSliderWidget = do ...@@ -60,12 +60,12 @@ mkIntRangeSliderWidget = do
-- Return the widget -- Return the widget
return widget return widget
instance IHaskellDisplay IntRangeSliderWidget where instance IHaskellDisplay IntRangeSlider where
display b = do display b = do
widgetSendView b widgetSendView b
return $ Display [] return $ Display []
instance IHaskellWidget IntRangeSliderWidget where instance IHaskellWidget IntRangeSlider where
getCommUUID = uuid getCommUUID = uuid
comm widget (Object dict1) _ = do comm widget (Object dict1) _ = do
let key1 = "sync_data" :: Text let key1 = "sync_data" :: Text
......
...@@ -5,9 +5,9 @@ ...@@ -5,9 +5,9 @@
module IHaskell.Display.Widgets.Int.IntText ( module IHaskell.Display.Widgets.Int.IntText (
-- * The IntText Widget -- * The IntText Widget
IntTextWidget, IntText,
-- * Constructor -- * Constructor
mkIntTextWidget) where mkIntText) 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
...@@ -28,12 +28,12 @@ import IHaskell.IPython.Message.UUID as U ...@@ -28,12 +28,12 @@ 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
-- | 'IntTextWidget' represents an IntText widget from IPython.html.widgets. -- | 'IntText' represents an IntText widget from IPython.html.widgets.
type IntTextWidget = IPythonWidget IntTextType type IntText = IPythonWidget IntTextType
-- | Create a new widget -- | Create a new widget
mkIntTextWidget :: IO IntTextWidget mkIntText :: IO IntText
mkIntTextWidget = do mkIntText = do
-- Default properties, with a random uuid -- Default properties, with a random uuid
uuid <- U.random uuid <- U.random
...@@ -50,12 +50,12 @@ mkIntTextWidget = do ...@@ -50,12 +50,12 @@ mkIntTextWidget = do
-- Return the widget -- Return the widget
return widget return widget
instance IHaskellDisplay IntTextWidget where instance IHaskellDisplay IntText where
display b = do display b = do
widgetSendView b widgetSendView b
return $ Display [] return $ Display []
instance IHaskellWidget IntTextWidget where instance IHaskellWidget IntText where
getCommUUID = uuid getCommUUID = uuid
comm widget (Object dict1) _ = do comm widget (Object dict1) _ = do
let key1 = "sync_data" :: Text let key1 = "sync_data" :: Text
......
...@@ -5,9 +5,9 @@ ...@@ -5,9 +5,9 @@
module IHaskell.Display.Widgets.Selection.Select ( module IHaskell.Display.Widgets.Selection.Select (
-- * The Select Widget -- * The Select Widget
SelectWidget, Select,
-- * Constructor -- * Constructor
mkSelectWidget) where mkSelect) 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
...@@ -26,12 +26,12 @@ import IHaskell.IPython.Message.UUID as U ...@@ -26,12 +26,12 @@ 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
-- | A 'SelectWidget' represents a Select widget from IPython.html.widgets. -- | A 'Select' represents a Select widget from IPython.html.widgets.
type SelectWidget = IPythonWidget SelectType type Select = IPythonWidget SelectType
-- | Create a new Select widget -- | Create a new Select widget
mkSelectWidget :: IO SelectWidget mkSelect :: IO Select
mkSelectWidget = 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"
...@@ -48,15 +48,15 @@ mkSelectWidget = do ...@@ -48,15 +48,15 @@ mkSelectWidget = do
return widget return widget
-- | Artificially trigger a selection -- | Artificially trigger a selection
triggerSelection :: SelectWidget -> IO () triggerSelection :: Select -> IO ()
triggerSelection widget = join $ getField widget SSelectionHandler triggerSelection widget = join $ getField widget SSelectionHandler
instance IHaskellDisplay SelectWidget where instance IHaskellDisplay Select where
display b = do display b = do
widgetSendView b widgetSendView b
return $ Display [] return $ Display []
instance IHaskellWidget SelectWidget where instance IHaskellWidget Select where
getCommUUID = uuid getCommUUID = uuid
comm widget (Object dict1) _ = do comm widget (Object dict1) _ = do
let key1 = "sync_data" :: Text let key1 = "sync_data" :: Text
......
...@@ -5,9 +5,9 @@ ...@@ -5,9 +5,9 @@
module IHaskell.Display.Widgets.Selection.SelectMultiple ( module IHaskell.Display.Widgets.Selection.SelectMultiple (
-- * The SelectMultiple Widget -- * The SelectMultiple Widget
SelectMultipleWidget, SelectMultiple,
-- * Constructor -- * Constructor
mkSelectMultipleWidget) where mkSelectMultiple) 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
...@@ -27,12 +27,12 @@ import IHaskell.IPython.Message.UUID as U ...@@ -27,12 +27,12 @@ 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
-- | A 'SelectMultipleWidget' represents a SelectMultiple widget from IPython.html.widgets. -- | A 'SelectMultiple' represents a SelectMultiple widget from IPython.html.widgets.
type SelectMultipleWidget = IPythonWidget SelectMultipleType type SelectMultiple = IPythonWidget SelectMultipleType
-- | Create a new SelectMultiple widget -- | Create a new SelectMultiple widget
mkSelectMultipleWidget :: IO SelectMultipleWidget mkSelectMultiple :: IO SelectMultiple
mkSelectMultipleWidget = 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"
...@@ -52,15 +52,15 @@ mkSelectMultipleWidget = do ...@@ -52,15 +52,15 @@ mkSelectMultipleWidget = do
return widget return widget
-- | Artificially trigger a selection -- | Artificially trigger a selection
triggerSelection :: SelectMultipleWidget -> IO () triggerSelection :: SelectMultiple -> IO ()
triggerSelection widget = join $ getField widget SSelectionHandler triggerSelection widget = join $ getField widget SSelectionHandler
instance IHaskellDisplay SelectMultipleWidget where instance IHaskellDisplay SelectMultiple where
display b = do display b = do
widgetSendView b widgetSendView b
return $ Display [] return $ Display []
instance IHaskellWidget SelectMultipleWidget where instance IHaskellWidget SelectMultiple where
getCommUUID = uuid getCommUUID = uuid
comm widget (Object dict1) _ = do comm widget (Object dict1) _ = do
let key1 = "sync_data" :: Text let key1 = "sync_data" :: Text
......
...@@ -5,9 +5,9 @@ ...@@ -5,9 +5,9 @@
module IHaskell.Display.Widgets.String.TextArea ( module IHaskell.Display.Widgets.String.TextArea (
-- * The TextArea Widget -- * The TextArea Widget
TextAreaWidget, TextArea,
-- * Constructor -- * Constructor
mkTextAreaWidget) where mkTextArea) 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
...@@ -24,12 +24,12 @@ import IHaskell.IPython.Message.UUID as U ...@@ -24,12 +24,12 @@ import IHaskell.IPython.Message.UUID as U
import IHaskell.Display.Widgets.Types import IHaskell.Display.Widgets.Types
-- | A 'TextAreaWidget' represents a Textarea widget from IPython.html.widgets. -- | A 'TextArea' represents a Textarea widget from IPython.html.widgets.
type TextAreaWidget = IPythonWidget TextAreaType type TextArea = IPythonWidget TextAreaType
-- | Create a new TextArea widget -- | Create a new TextArea widget
mkTextAreaWidget :: IO TextAreaWidget mkTextArea :: IO TextArea
mkTextAreaWidget = do mkTextArea = do
-- Default properties, with a random uuid -- Default properties, with a random uuid
uuid <- U.random uuid <- U.random
let widgetState = WidgetState $ defaultStringWidget "TextareaView" let widgetState = WidgetState $ defaultStringWidget "TextareaView"
...@@ -46,10 +46,10 @@ mkTextAreaWidget = do ...@@ -46,10 +46,10 @@ mkTextAreaWidget = do
-- Return the widget -- Return the widget
return widget return widget
instance IHaskellDisplay TextAreaWidget where instance IHaskellDisplay TextArea where
display b = do display b = do
widgetSendView b widgetSendView b
return $ Display [] return $ Display []
instance IHaskellWidget TextAreaWidget where instance IHaskellWidget TextArea where
getCommUUID = uuid getCommUUID = uuid
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment