示例#1
0
    def __init__(self, is_pressed=False, on_press=None):
        Controller.__init__(self)

        self._is_pressed = is_pressed
        self._on_press = lambda y: y
        if on_press is not None:
            self._on_press = on_press
示例#2
0
    def __init__(self, value=0.0, min_value=0.0, max_value=1.0, on_set=None):
        assert min_value <= value <= max_value
        Controller.__init__(self)

        self._min_value = min_value
        self._max_value = max_value
        self._value = value

        # a callback when the value is set.
        if on_set is None:
            self._on_set = lambda x: x
        else:
            self._on_set = on_set
示例#3
0
 def __init__(self, name, parent):
     Controller.__init__(self)
     self._option_name = name
     self._selector = parent
示例#4
0
 def __init__(self):
     Viewer.__init__(self)
     Controller.__init__(self)
     self._highlight = None
     self._highlight_flag = False
示例#5
0
 def __init__(self):
     Controller.__init__(self)
     Viewer.__init__(self)
     self._focus = None
     self._focus_flag = False