ihaskell-widgets-0.4.0.0: IPython standard widgets for IHaskell.
Copyright(c) Sumit Shrawat 2015
David Davó 2021
LicenseMIT
Maintainerdavid@ddavo.me
Stabilityexperimental
Safe HaskellSafe-Inferred
LanguageHaskell2010

IHaskell.Display.Widgets

Description

 
Synopsis

Documentation

data BoxStyleValue Source #

Predefined styles for box widgets

newtype PixCount Source #

Transforms the Integer to a String of pixels

Constructors

PixCount Integer 

Instances

Instances details
ToJSON PixCount Source # 
Instance details

Defined in IHaskell.Display.Widgets.Common

Enum PixCount Source # 
Instance details

Defined in IHaskell.Display.Widgets.Common

Num PixCount Source # 
Instance details

Defined in IHaskell.Display.Widgets.Common

Eq PixCount Source # 
Instance details

Defined in IHaskell.Display.Widgets.Common

Ord PixCount Source # 
Instance details

Defined in IHaskell.Display.Widgets.Common

pattern Style :: () => a ~ 'Style => SField a Source #

Reference to a Style widget with styling customizations

pattern Outputs :: () => a ~ 'Outputs => SField a Source #

The output messages synced from the frontend

pattern MsgID :: () => a ~ 'MsgID => SField a Source #

Parent message id of messages to capture

pattern Source :: () => a ~ 'Source => SField a Source #

The source (widget,field) pair

pattern Target :: () => a ~ 'Target => SField a Source #

The target (widget,field) pair

pattern ButtonWidth :: () => a ~ 'ButtonWidth => SField a Source #

The width of each button

pattern HandleColor :: () => a ~ 'HandleColor => SField a Source #

Color of the slider handle

pattern BarColor :: () => a ~ 'BarColor => SField a Source #

Color of the progress bar

pattern DescriptionWidth :: () => a ~ 'DescriptionWidth => SField a Source #

Width of the description to the side of the control

pattern FontWeight :: () => a ~ 'FontWeight => SField a Source #

The font weight of the text

pattern ButtonColor :: () => a ~ 'ButtonColor => SField a Source #

Color of the button

pattern Axes :: () => a ~ 'Axes => SField a Source #

The axes on the gamepad

pattern Buttons :: () => a ~ 'Buttons => SField a Source #

The button widgets on the gamepad

pattern Timestamp :: () => a ~ 'Timestamp => SField a Source #

The last time the data from this gamepad was updated

pattern Connected :: () => a ~ 'Connected => SField a Source #

Whether the gamepad is connected

pattern Mapping :: () => a ~ 'Mapping => SField a Source #

The name of the control mapping

pattern Name :: () => a ~ 'Name => SField a Source #

The name of the controller

pattern Pressed :: () => a ~ 'Pressed => SField a Source #

Whether the button is pressed

pattern DateValue :: () => a ~ 'DateValue => SField a Source #

The value of the widget in date format

pattern Concise :: () => a ~ 'Concise => SField a Source #

Display the short version of the selector

pattern ShowRepeat :: () => a ~ 'ShowRepeat => SField a Source #

Show the repeat toggle button on the widget

pattern Interval :: () => a ~ 'Interval => SField a Source #

The maximum interval for the play control

pattern Repeat :: () => a ~ 'Repeat => SField a Source #

Whether the control will repeat in a continuous loop

pattern Playing :: () => a ~ 'Playing => SField a Source #

Whether the control is currently playing

pattern EnsureOption :: () => a ~ 'EnsureOption => SField a Source #

If set, ensure the value is in options

pattern Options :: () => a ~ 'Options => SField a Source #

Dropdown options for the combobox

pattern Controls :: () => a ~ 'Controls => SField a Source #

Specifies that video controls should be displayed

pattern Loop :: () => a ~ 'Loop => SField a Source #

When true, the video starts from the beginning after finishing

pattern AutoPlay :: () => a ~ 'AutoPlay => SField a Source #

When true, the video starts on display

pattern VideoFormat :: () => a ~ 'VideoFormat => SField a Source #

The format of the image

pattern AudioFormat :: () => a ~ 'AudioFormat => SField a Source #

The format of the audio

pattern Rows :: () => a ~ 'Rows => SField a Source #

The number of rows to display

pattern ContinuousUpdate :: () => a ~ 'ContinuousUpdate => SField a Source #

Update the value as the user types. If false, update on submission.

pattern Indent :: () => a ~ 'Indent => SField a Source #

Indent the control to align with other controls with a description

pattern ReadOutMsg :: () => a ~ 'ReadOutMsg => SField a Source #

Message displayed when the value is false

pattern SelectedIndex :: () => a ~ 'SelectedIndex => SField a Source #

The index of the selected page. Is nothing if no widgets are selected.

pattern Titles :: () => a ~ 'Titles => SField a Source #

Titles of the pages

pattern BoxStyle :: () => a ~ 'BoxStyle => SField a Source #

Use a predefined styling for the box

pattern Children :: () => a ~ 'Children => SField a Source #

List of widget children

pattern ChangeHandler :: () => a ~ 'ChangeHandler => SField a Source #

A method called when the value changes in the fronted

pattern BarStyle :: () => a ~ 'BarStyle => SField a Source #

Use a predefined styling for the bar

pattern ReadOutFormat :: () => a ~ 'ReadOutFormat => SField a Source #

The format of the readout

pattern ReadOut :: () => a ~ 'ReadOut => SField a Source #

Whether to display the current value of the widget next to it

pattern BaseFloat :: () => a ~ 'BaseFloat => SField a Source #

The logarithmic base of the widget

pattern Orientation :: () => a ~ 'Orientation => SField a Source #

Orientation of the widget

pattern UpperFloat :: () => a ~ 'UpperFloat => SField a Source #

Max value of a range widget

pattern LowerFloat :: () => a ~ 'LowerFloat => SField a Source #

Min value of a range widget

pattern FloatPairValue :: () => a ~ 'FloatPairValue => SField a Source #

Value of the widget as a float pair

pattern MinFloat :: () => a ~ 'MinFloat => SField a Source #

Min value

pattern MaxFloat :: () => a ~ 'MaxFloat => SField a Source #

Max value

pattern StepFloat :: () => a ~ 'StepFloat => SField a Source #

Minimum step to increment the value

pattern FloatValue :: () => a ~ 'FloatValue => SField a Source #

Value of the widget (float)

pattern UpperInt :: () => a ~ 'UpperInt => SField a Source #

Max value on a range widget

pattern LowerInt :: () => a ~ 'LowerInt => SField a Source #

Min value on a range widget

pattern IntPairValue :: () => a ~ 'IntPairValue => SField a Source #

The value of the widget as an int pair

pattern MinInt :: () => a ~ 'MinInt => SField a Source #

Min value

pattern MaxInt :: () => a ~ 'MaxInt => SField a Source #

Max value

pattern StepInt :: () => a ~ 'StepInt => SField a Source #

Minimum step to increment the value

pattern IntValue :: () => a ~ 'IntValue => SField a Source #

The value of the widget of type int

pattern Indices :: () => a ~ 'Indices => SField a Source #

Selected indices

pattern Icons :: () => a ~ 'Icons => SField a Source #

Icons names for each button (FontAwesome names without the fa- prefix)

pattern Tooltips :: () => a ~ 'Tooltips => SField a Source #

Tooltips for each button

pattern SelectionHandler :: () => a ~ 'SelectionHandler => SField a Source #

Method to be called when something is chosen

pattern Index :: () => a ~ 'Index => SField a Source #

The index of the controller

pattern OptionalIndex :: () => a ~ 'OptionalIndex => SField a Source #

Selected index, can be Nothing

pattern OptionsLabels :: () => a ~ 'OptionsLabels => SField a Source #

The labels for the options

pattern BoolValue :: () => a ~ 'BoolValue => SField a Source #

The value of the widget of type bool

pattern ImageFormat :: () => a ~ 'ImageFormat => SField a Source #

The format of the image

pattern BSValue :: () => a ~ 'BSValue => SField a Source #

Value of the widget of type bytestring

pattern ButtonStyle :: () => a ~ 'ButtonStyle => SField a Source #

Predefined styling for the button

pattern Icon :: () => a ~ 'Icon => SField a Source #

The font-awesome icon without the fa-

pattern Tooltip :: () => a ~ 'Tooltip => SField a Source #

Tooltip for the description

pattern Placeholder :: () => a ~ 'Placeholder => SField a Source #

Placeholder text to display if nothing has been typed yet

pattern StringValue :: () => a ~ 'StringValue => SField a Source #

The value of the widget, of type string

pattern Disabled :: () => a ~ 'Disabled => SField a Source #

Whether the widget appears as disabled on the frontend

pattern SubmitHandler :: () => a ~ 'SubmitHandler => SField a Source #

Method to be called on submit

pattern ClickHandler :: () => a ~ 'ClickHandler => SField a Source #

Method to be called on click

pattern Description :: () => a ~ 'Description => SField a Source #

Description of the control

pattern Height :: () => a ~ 'Height => SField a Source #

Height of the video/image in pixels

pattern Width :: () => a ~ 'Width => SField a Source #

Width of the video/image in pixels

pattern Layout :: () => a ~ 'Layout => SField a Source #

Reference to a Layout widget

pattern DOMClasses :: () => a ~ 'DOMClasses => SField a Source #

CSS classes applied to widget DOM element

pattern DisplayHandler :: () => a ~ 'DisplayHandler => SField a Source #

A method to be called on display

pattern ModelName :: () => a ~ 'ModelName => SField a Source #

The model name

pattern ModelModuleVersion :: () => a ~ 'ModelModuleVersion => SField a Source #

The model module version

pattern ModelModule :: () => a ~ 'ModelModule => SField a Source #

The model module string

pattern ViewName :: () => a ~ 'ViewName => SField a Source #

The view name

pattern ViewModuleVersion :: () => a ~ 'ViewModuleVersion => SField a Source #

The view module version

pattern ViewModule :: () => a ~ 'ViewModule => SField a Source #

The view module string

closeWidget :: IHaskellWidget w => w -> IO () Source #

Close a widget's comm

nestedObjectLookup :: Value -> [Text] -> Maybe Value Source #

Makes a lookup on a value given a path of strings to follow

data Date Source #

The date class from IPython

Constructors

NullDate

No date specified. used by default

Date Integer Integer Integer

Date year month day

Instances

Instances details
FromJSON Date Source # 
Instance details

Defined in IHaskell.Display.Widgets.Types

ToJSON Date Source # 
Instance details

Defined in IHaskell.Display.Widgets.Types

Show Date Source # 
Instance details

Defined in IHaskell.Display.Widgets.Types

Methods

showsPrec :: Int -> Date -> ShowS #

show :: Date -> String #

showList :: [Date] -> ShowS #

Eq Date Source # 
Instance details

Defined in IHaskell.Display.Widgets.Types

Methods

(==) :: Date -> Date -> Bool #

(/=) :: Date -> Date -> Bool #

Ord Date Source # 
Instance details

Defined in IHaskell.Display.Widgets.Types

Methods

compare :: Date -> Date -> Ordering #

(<) :: Date -> Date -> Bool #

(<=) :: Date -> Date -> Bool #

(>) :: Date -> Date -> Bool #

(>=) :: Date -> Date -> Bool #

max :: Date -> Date -> Date #

min :: Date -> Date -> Date #

data WidgetFieldPair Source #

This type only fits if the field is among the widget's fields, and it has a key

Constructors

forall w f.(f WidgetFields w, HasKey f ~ 'True, RecAll Attr (WidgetFields w) ToPairs) => WidgetFieldPair (IPythonWidget w) (SField f) 
EmptyWT 

data StyleWidget Source #

Can be used to put different styles in a same FieldType.

Constructors

forall w.RecAll Attr (WidgetFields w) ToPairs => StyleWidget (IPythonWidget w) 

data ChildWidget Source #

Can be used to put different widgets in a list. Useful for dealing with children widgets.

Constructors

forall w.RecAll Attr (WidgetFields w) ToPairs => ChildWidget (IPythonWidget w) 

setField :: (f WidgetFields w, IHaskellWidget (IPythonWidget w), ToPairs (Attr f)) => IPythonWidget w -> SField f -> FieldType f -> IO () Source #

Change the value for a field, and notify the frontend about it. Doesn't work if the field is read only.

getField :: f WidgetFields w => IPythonWidget w -> SField f -> IO (FieldType f) Source #

Get the value of a field.

properties :: IPythonWidget w -> IO () Source #

Displays on stdout the properties (and its types) of a given widget

triggerChange :: 'ChangeHandler WidgetFields w => IPythonWidget w -> IO () Source #

Called when the value of an attribute is changed on the front-end

triggerClick :: 'ClickHandler WidgetFields w => IPythonWidget w -> IO () Source #

Called when the button is clicked

triggerSelection :: 'SelectionHandler WidgetFields w => IPythonWidget w -> IO () Source #

Called when a selection is made in a selection widget

triggerSubmit :: 'SubmitHandler WidgetFields w => IPythonWidget w -> IO () Source #

Called when the text is submited in a text widget (or combobox/password)

triggerDisplay :: 'DisplayHandler WidgetFields w => IPythonWidget w -> IO () Source #

Called when the widget is displayed on the notebook

unlink :: ('Source WidgetFields w, 'Target WidgetFields w, IHaskellWidget (IPythonWidget w)) => IPythonWidget w -> IO (IPythonWidget w) Source #

Allows you to unlink a jslink

type ToggleButtonsStyle = IPythonWidget 'ToggleButtonsStyleType Source #

A ToggleButtonsStyle represents a Button Style from IPython.html.widgets.

mkToggleButtonsStyle :: IO ToggleButtonsStyle Source #

Create a new button style

type SliderStyle = IPythonWidget 'SliderStyleType Source #

A SliderStyle represents a Button Style from IPython.html.widgets.

mkSliderStyle :: IO SliderStyle Source #

Create a new button style

type ProgressStyle = IPythonWidget 'ProgressStyleType Source #

A ProgressStyle represents a Button Style from IPython.html.widgets.

mkProgressStyle :: IO ProgressStyle Source #

Create a new button style

type DescriptionStyle = IPythonWidget 'DescriptionStyleType Source #

A DescriptionStyle represents a Button Style from IPython.html.widgets.

mkDescriptionStyle :: IO DescriptionStyle Source #

Create a new button style

type ButtonStyle = IPythonWidget 'ButtonStyleType Source #

A ButtonStyle represents a Button Style from IPython.html.widgets.

mkButtonStyle :: IO ButtonStyle Source #

Create a new button style

type Link = IPythonWidget 'LinkType Source #

An Link represents a Link widget from IPython.html.widgets.

mkLink :: IO Link Source #

Create a new link widget

jslink :: WidgetFieldPair -> WidgetFieldPair -> IO Link Source #

An easier constructor that links two widgets

type DirectionalLink = IPythonWidget 'DirectionalLinkType Source #

An DirectionalLink represents a DirectionalLink widget from IPython.html.widgets.

mkDirectionalLink :: IO DirectionalLink Source #

Create a new DirectionalLink widget

jsdlink :: WidgetFieldPair -> WidgetFieldPair -> IO DirectionalLink Source #

An easier constructor that links two widgets

type TextArea = IPythonWidget 'TextAreaType Source #

A TextArea represents a Textarea widget from IPython.html.widgets.

mkTextArea :: IO TextArea Source #

Create a new TextArea widget

type TextWidget = IPythonWidget 'TextType Source #

A TextWidget represents a Text widget from IPython.html.widgets.

mkText :: IO TextWidget Source #

Create a new Text widget

type PasswordWidget = IPythonWidget 'PasswordType Source #

A PasswordWidget represents a Password widget from IPython.html.widgets.

mkPassword :: IO PasswordWidget Source #

Create a new Password widget

type LabelWidget = IPythonWidget 'LabelType Source #

A LabelWidget represents a Label widget from IPython.html.widgets.

mkLabel :: IO LabelWidget Source #

Create a new Label widget

type HTMLMathWidget = IPythonWidget 'HTMLMathType Source #

A HTMLMathWidget represents a HTML Math widget from IPython.html.widgets.

mkHTMLMath :: IO HTMLMathWidget Source #

Create a new HTML widget

type HTMLWidget = IPythonWidget 'HTMLType Source #

A HTMLWidget represents a HTML widget from IPython.html.widgets.

mkHTML :: IO HTMLWidget Source #

Create a new HTML widget

type ComboboxWidget = IPythonWidget 'ComboboxType Source #

A ComboboxWidget represents a Combobox widget from IPython.html.widgets.

mkCombobox :: IO ComboboxWidget Source #

Create a new Combobox widget

type ToggleButtons = IPythonWidget 'ToggleButtonsType Source #

A ToggleButtons represents a ToggleButtons widget from IPython.html.widgets.

mkToggleButtons :: IO ToggleButtons Source #

Create a new ToggleButtons widget

type SelectionSlider = IPythonWidget 'SelectionSliderType Source #

A SelectionSlider represents a SelectionSlider widget from IPyhon.widgets

mkSelectionSlider :: IO SelectionSlider Source #

Create a new SelectionSLider widget

type SelectionRangeSlider = IPythonWidget 'SelectionRangeSliderType Source #

A SelectionRangeSlider represents a SelectionSlider widget from IPyhon.widgets

mkSelectionRangeSlider :: IO SelectionRangeSlider Source #

Create a new SelectionRangeSlider widget

type SelectMultiple = IPythonWidget 'SelectMultipleType Source #

A SelectMultiple represents a SelectMultiple widget from IPython.html.widgets.

mkSelectMultiple :: IO SelectMultiple Source #

Create a new SelectMultiple widget

type Select = IPythonWidget 'SelectType Source #

A Select represents a Select widget from IPython.html.widgets.

mkSelect :: IO Select Source #

Create a new Select widget

type RadioButtons = IPythonWidget 'RadioButtonsType Source #

A RadioButtons represents a RadioButtons widget from IPython.html.widgets.

mkRadioButtons :: IO RadioButtons Source #

Create a new RadioButtons widget

type Dropdown = IPythonWidget 'DropdownType Source #

A Dropdown represents a Dropdown widget from IPython.html.widgets.

mkDropdown :: IO Dropdown Source #

Create a new Dropdown widget

type OutputWidget = IPythonWidget 'OutputType Source #

An OutputWidget represents a Output widget from IPython.html.widgets.

mkOutput :: IO OutputWidget Source #

Create a new output widget

appendStdout :: OutputWidget -> Text -> IO () Source #

Appends text to the stdout of an output widget

appendStderr :: OutputWidget -> Text -> IO () Source #

Appends text to the stderr of an output widget

appendDisplay :: IHaskellDisplay a => OutputWidget -> a -> IO () Source #

Appends anything displayable to an output widget

clearOutput :: OutputWidget -> IO () Source #

Clear the output widget immediately

clearOutput_ :: OutputWidget -> IO () Source #

Clear the output widget on next append

replaceOutput :: IHaskellDisplay a => OutputWidget -> a -> IO () Source #

Replace the currently displayed output for output widget

type VideoWidget = IPythonWidget 'VideoType Source #

An VideoWidget represents a video widget from IPython.html.widgets.

mkVideo :: IO VideoWidget Source #

Create a new video widget

type ImageWidget = IPythonWidget 'ImageType Source #

An ImageWidget represents a Image widget from IPython.html.widgets.

mkImage :: IO ImageWidget Source #

Create a new image widget

type AudioWidget = IPythonWidget 'AudioType Source #

An AudioWidget represents a Audio widget from IPython.html.widgets.

mkAudio :: IO AudioWidget Source #

Create a new audio widget

type IntText = IPythonWidget 'IntTextType Source #

IntText represents an IntText widget from IPython.html.widgets.

mkIntText :: IO IntText Source #

Create a new widget

type IntRangeSlider = IPythonWidget 'IntRangeSliderType Source #

IntRangeSlider represents an IntRangeSlider widget from IPython.html.widgets.

mkIntRangeSlider :: IO IntRangeSlider Source #

Create a new widget

type Play = IPythonWidget 'PlayType Source #

Play represents an Play widget from IPython.html.widgets.

mkPlay :: IO Play Source #

Create a new widget

type IntSlider = IPythonWidget 'IntSliderType Source #

IntSlider represents an IntSlider widget from IPython.html.widgets.

mkIntSlider :: IO IntSlider Source #

Create a new widget

type IntProgress = IPythonWidget 'IntProgressType Source #

IntProgress represents an IntProgress widget from IPython.html.widgets.

mkIntProgress :: IO IntProgress Source #

Create a new widget

type BoundedIntText = IPythonWidget 'BoundedIntTextType Source #

BoundedIntText represents an BoundedIntText widget from IPython.html.widgets.

mkBoundedIntText :: IO BoundedIntText Source #

Create a new widget

type FloatText = IPythonWidget 'FloatTextType Source #

FloatText represents an FloatText widget from IPython.html.widgets.

mkFloatText :: IO FloatText Source #

Create a new widget

type FloatRangeSlider = IPythonWidget 'FloatRangeSliderType Source #

FloatRangeSlider represents an FloatRangeSlider widget from IPython.html.widgets.

type FloatSlider = IPythonWidget 'FloatSliderType Source #

FloatSlider represents an FloatSlider widget from IPython.html.widgets.

mkFloatSlider :: IO FloatSlider Source #

Create a new widget

type FloatProgress = IPythonWidget 'FloatProgressType Source #

FloatProgress represents an FloatProgress widget from IPython.html.widgets.

mkFloatProgress :: IO FloatProgress Source #

Create a new widget

type FloatLogSlider = IPythonWidget 'FloatLogSliderType Source #

FloatLogSlider represents an FloatLogSlider widget from IPython.html.widgets.

mkFloatLogSlider :: IO FloatLogSlider Source #

Create a new widget

type BoundedFloatText = IPythonWidget 'BoundedFloatTextType Source #

BoundedFloatText represents an BoundedFloatText widget from IPython.html.widgets.

type DatePicker = IPythonWidget 'DatePickerType Source #

A DatePicker represents a DatePicker from IPython.html.widgets.

mkDatePicker :: IO DatePicker Source #

Create a new DatePicker

type ControllerButton = IPythonWidget 'ControllerButtonType Source #

ControllerButton represents an ControllerButton widget from IPython.html.widgets.

type ControllerAxis = IPythonWidget 'ControllerAxisType Source #

ControllerAxis represents an ControllerAxis widget from IPython.html.widgets.

mkControllerAxis :: IO ControllerAxis Source #

Create a new widget

type Controller = IPythonWidget 'ControllerType Source #

Controller represents an Controller widget from IPython.html.widgets.

mkController :: IO Controller Source #

Create a new widget

type ColorPicker = IPythonWidget 'ColorPickerType Source #

A ColorPicker represents a ColorPicker from IPython.html.widgets.

mkColorPicker :: IO ColorPicker Source #

Create a new ColorPicker

type Button = IPythonWidget 'ButtonType Source #

A Button represents a Button from IPython.html.widgets.

mkButton :: IO Button Source #

Create a new button

type VBox = IPythonWidget 'VBoxType Source #

A VBox represents a VBox widget from IPython.html.widgets.

mkVBox :: IO VBox Source #

Create a new VBox

type TabWidget = IPythonWidget 'TabType Source #

A TabWidget represents a Tab widget from IPython.html.widgets.

mkTab :: IO TabWidget Source #

Create a new box

type Accordion = IPythonWidget 'AccordionType Source #

A Accordion represents a Accordion widget from IPython.html.widgets.

mkAccordion :: IO Accordion Source #

Create a new box

type HBox = IPythonWidget 'HBoxType Source #

A HBox represents a HBox widget from IPython.html.widgets.

mkHBox :: IO HBox Source #

Create a new HBox

type GridBox = IPythonWidget 'GridBoxType Source #

A GridBox represents a GridBox widget from IPython.html.widgets.

mkGridBox :: IO GridBox Source #

Create a new GridBox

type Box = IPythonWidget 'BoxType Source #

A Box represents a Box widget from IPython.html.widgets.

mkBox :: IO Box Source #

Create a new box

type ValidWidget = IPythonWidget 'ValidType Source #

A ValidWidget represents a Valid widget from IPython.html.widgets.

mkValid :: IO ValidWidget Source #

Create a new output widget

type ToggleButton = IPythonWidget 'ToggleButtonType Source #

A ToggleButton represents a ToggleButton widget from IPython.html.widgets.

mkToggleButton :: IO ToggleButton Source #

Create a new output widget

type CheckBox = IPythonWidget 'CheckBoxType Source #

A CheckBox represents a Checkbox widget from IPython.html.widgets.

mkCheckBox :: IO CheckBox Source #

Create a new output widget