def __init__(self):
        # Misc Controls:
        self.playback_controls_box = static_box(self, "Playback Controls")
        self.playback_speed_label = static_text(self, 'Playback Speed (Hz): ')
        self.playback_speed_textbox = text_ctrl(self, '50', min_size=(60, -1),
                                                callback=self.update_data)
        self.skip_frames_checkbox = check_box(self, 'SkipFrames?', value=1,
                                              tooltip='When checked, this skips frames to honor the playback speed',
                                              callback=self.update_data)

        self.frame_number_label = static_text(self, 'Frame Number:')
        self.frame_number_textbox = text_ctrl(self, '0', min_size=(60, -1),
                                              callback=self.update_data)

        # Playback buttons:
        self.skip_to_start_button = button(self, '|<', min_size=(35, -1),
                                           tooltip='Skip to the first frame',
                                           callback=partial(self.set_frame_number, 0))
        self.rewind_button = button(self, '<|', min_size=(35, -1),
                                    tooltip='Rewind',
                                    callback=partial(self.play, reverse=True))
        self.jump_back_button = button(self, '-'+str(SKIP_VALUE), min_size=(15*(len(str(SKIP_VALUE))+1), -1),
                                       tooltip='Jump back {0} frames'.format(SKIP_VALUE),
                                       callback=partial(self.offset_frame_num, -SKIP_VALUE), )
        self.step_back_button = button(self, '<', min_size=(40, -1),
                                       tooltip='Go back one frame',
                                       callback=partial(self.offset_frame_num, -1))
        self.stop_button = button(self, '||', min_size=(25, -1),
                                  tooltip='Stop',
                                  callback=self.stop)
        self.step_forward_button = button(self, '>', min_size=(40, -1),
                                          tooltip='Go forward one frame',
                                          callback=partial(self.offset_frame_num, 1))
        self.jump_forward_button = button(self, '+'+str(SKIP_VALUE), min_size=(15*(len(str(SKIP_VALUE))+1), -1),
                                          tooltip='Jump forward {0} frames'.format(SKIP_VALUE),
                                          callback=partial(self.offset_frame_num, 10))
        self.play_button = button(self, '|>', min_size=(35, -1),
                                  tooltip='Go back one frame',
                                  callback=partial(self.play, reverse=False))
        self.skip_to_end_button = button(self, '>|', min_size=(35, -1),
                                         tooltip='Go back one frame',
                                         callback=self.skip_to_end)

        # Sizers
        self.playback_speed_sizer = AddMultiple(HSizer(), (0, 0, 0),
                                           (75, 20),
                                           self.playback_speed_label,
                                           self.playback_speed_textbox,
                                           self.skip_frames_checkbox
                                          )
        self.play_controls_sizer = AddMultiple(HSizer(), (0, 0, 0),
                                               (45, 20),
                                               self.skip_to_start_button,
                                               self.rewind_button,
                                               self.jump_back_button,
                                               self.step_back_button,
                                               self.stop_button,
                                               self.step_forward_button,
                                               self.jump_forward_button,
                                               self.play_button,
                                               self.skip_to_end_button
                                              )
        self.frame_num_sizer = AddMultiple(HSizer(), (0, 0, 0),
                                           (43, 20),
                                           self.frame_number_label,
                                           (44, 20),
                                           self.frame_number_textbox
                                          )
        _pcs = wx.StaticBoxSizer(self.playback_controls_box, wx.VERTICAL)
        self.playback_controls_sizer = AddMultiple(_pcs, (1, wx.EXPAND, 0),
                                                   self.playback_speed_sizer,
                                                   self.play_controls_sizer,
                                                   self.frame_num_sizer
                                                  )
 def _build_traces_checkboxes(self):
     self.trace_checkboxes = [check_box(self, trace_name)
                              for trace_name in self.traces_checkbox_names]
     self.trace_checkbox_sizer = AddMultiple(VSizer(), (0, 0, 0),
                                             *self.trace_checkboxes)