# Path: conjureup/ui/widgets/base.py
# class ContainerWidgetWrap(WidgetWrap, WidgetContainerMixin):
#     """
#     Base for WidgetWraps that wrap containers and want container methods
#     to pass through.
#     """
# 
#     def __init__(self, *args, **kwargs):
#         super().__init__(*args, **kwargs)
# 
#     @property
#     def contents(self):
#         return self._w.contents
# 
#     @property
#     def focus(self):
#         return self._w.focus
# 
#     @property
#     def focus_position(self):
#         return self._w.focus_position
# 
#     @focus_position.setter
#     def focus_position(self, value):
#         self._w.focus_position = value
# 
# Path: conjureup/ui/widgets/buttons.py
# class SecondaryButton(StyledButton):
#     enabled_styles = ('button_secondary', 'button_secondary focus')
#     disabled_styles = ('disabled_button', 'disabled_button focus')


import logging
from enum import Enum
from ubuntui.utils import Color, Padding
from ubuntui.widgets.input import StringEditor
from urwid import (
    CheckBox,
    Columns,
    GridFlow,
    IntEdit,
    Pile,
    Text,
    connect_signal
)
from conjureup.ui.widgets.base import ContainerWidgetWrap
from conjureup.ui.widgets.buttons import SecondaryButton
                self.control, focus_map='string_input focus')
        elif self.optype == OptionType.STRING:
            edit_text = self.current_value or ""
            self.control = StringEditor(edit_text=edit_text)
            self.wrapped_control = Color.string_input(
                self.control, focus_map='string_input focus')
        elif self.optype == OptionType.FLOAT:
            edit_text = str(self.current_value)
            self.control = StringEditor(edit_text=edit_text)
            self.wrapped_control = Color.string_input(
                self.control, focus_map='string_input focus')
        else:
            raise Exception("Unknown option type")

        self.control_columns = Columns(
            [
                ('pack', Text("{}:".format(self.name), align='right')),
                (80, self.wrapped_control)
            ],
            dividechars=1
        )

        if self.optype in [OptionType.STRING, OptionType.FLOAT]:
            connect_signal(self.control._edit, 'change',
                           self.handle_value_changed)
        else:
            connect_signal(self.control, 'change',
                           self.handle_value_changed)

        button_grid = GridFlow([self.reset_button],

# Path: conjureup/ui/widgets/base.py
# class ContainerWidgetWrap(WidgetWrap, WidgetContainerMixin):
#     """
#     Base for WidgetWraps that wrap containers and want container methods
#     to pass through.
#     """
# 
#     def __init__(self, *args, **kwargs):
#         super().__init__(*args, **kwargs)
# 
#     @property
#     def contents(self):
#         return self._w.contents
# 
#     @property
#     def focus(self):
#         return self._w.focus
# 
#     @property
#     def focus_position(self):
#         return self._w.focus_position
# 
#     @focus_position.setter
#     def focus_position(self, value):
#         self._w.focus_position = value
# 
# Path: conjureup/ui/widgets/buttons.py
# class SecondaryButton(StyledButton):
#     enabled_styles = ('button_secondary', 'button_secondary focus')
#     disabled_styles = ('disabled_button', 'disabled_button focus')


# Path: conjureup/ui/widgets/option_widget.py
import logging
from enum import Enum
from ubuntui.utils import Color, Padding
from ubuntui.widgets.input import StringEditor
from urwid import (
    CheckBox,
    Columns,
    GridFlow,
    IntEdit,
    Pile,
    Text,
    connect_signal
)
from conjureup.ui.widgets.base import ContainerWidgetWrap
from conjureup.ui.widgets.buttons import SecondaryButton

                self.control, focus_map='string_input focus')
        elif self.optype == OptionType.STRING:
            edit_text = self.current_value or ""
            self.control = StringEditor(edit_text=edit_text)
            self.wrapped_control = Color.string_input(
                self.control, focus_map='string_input focus')
        elif self.optype == OptionType.FLOAT:
            edit_text = str(self.current_value)
            self.control = StringEditor(edit_text=edit_text)
            self.wrapped_control = Color.string_input(
                self.control, focus_map='string_input focus')
        else:
            raise Exception("Unknown option type")

        self.control_columns = Columns(
            [
                ('pack', Text("{}:".format(self.name), align='right')),
                (80, self.wrapped_control)
            ],
            dividechars=1
        )

        if self.optype in [OptionType.STRING, OptionType.FLOAT]:
            connect_signal(self.control._edit, 'change',
                           self.handle_value_changed)
        else:
            connect_signal(self.control, 'change',
                           self.handle_value_changed)

        button_grid = GridFlow([self.reset_button],

                               36, 1, 0, 'right')