In [412]:
from IPython.html import widgets
from IPython import display
In [425]:
image = widgets.HTMLWidget()
image.set_css({
    "background-image": "url(https://sites.google.com/site/shigemorita/_/rsrc/1352706931243/home/2dshige/2Dshige.jpg)",
    "background-repeat": "no-repeat",
    "background-position": "-270px -32px",
    "width": 330,
    "height": 300
})
image
In [426]:
frame = lambda x: x.set_css({
    "border": "outset 1px",
    "padding": 5,
    "border-radius": 5,
    "display": "inline-box",
    "margin": "5px"
})
hbox = lambda x: (x.remove_class("vbox"), x.add_class("hbox"))
In [427]:
correlation_title = widgets.HTMLWidget(value="Correlation")
correlation_radios = widgets.RadioButtonsWidget(
    values=dict([(x,x) for x in  ["synchronous", "asynchronous", "modulus", "argument"]])
)
correlation = widgets.ContainerWidget(children=[
    correlation_title,
    correlation_radios
])
frame(correlation)
correlation
In [428]:
draw_title = widgets.HTMLWidget(value="Draw")
draw_radios = widgets.RadioButtonsWidget(
    values=dict([(x,x) for x in  ["color", "black & white", "contour"]])
)
draw = widgets.ContainerWidget(children=[
    draw_title,
    draw_radios
])
frame(draw)
draw
In [429]:
spectrum = widgets.ContainerWidget(children=[widgets.HTMLWidget(value="Spectrum")])

for label in ["left", "right", "bottom", "top"]:
    direction = widgets.FloatTextWidget(description=label, value=1000.0)
    spectrum.children += (direction,)

contour = widgets.DropdownWidget(
    description="Contour",
    values=dict([(str(x),x) for x in  [2, 4, 8, 16, 32]])
)

zmax = widgets.FloatTextWidget(
    description="Zmax",
    value=0.0566468618
)

scale_radios = widgets.RadioButtonsWidget(
    description="Scale",
    values=dict([(x,x) for x in  ["auto", "manual"]])
)

spectrum.children += (contour, zmax, scale_radios)
frame(spectrum)
spectrum
In [430]:
modes = widgets.ContainerWidget(children=[correlation, draw])
modes.set_css({"flex-direction": "rows"})
display.display(modes)
In [431]:
x_axis = widgets.FloatTextWidget(
    description="X div.",
    value=50
)
y_axis = widgets.FloatTextWidget(
    description="Y div.",
    value=50
)

axes_radios = widgets.RadioButtonsWidget(
    values=dict([(x,x) for x in  ["on", "off"]])
)

axes = widgets.ContainerWidget(children=[
    widgets.HTMLWidget(value="Axes"),
    x_axis,
    y_axis,
    axes_radios
])
display.display(axes)
frame(axes)
In [432]:
left_side = widgets.ContainerWidget(children=[modes, spectrum, axes])
In [433]:
dialog = widgets.ContainerWidget(children=[left_side, image])
display.display(dialog)
hbox(modes)
hbox(dialog)
Out[433]:
(None, None)