def __init__(self, track, sequencer, chan_num=0): gtk.Widget.__init__(self) self.setting = ChannelEditorSetting(track, sequencer, chan_num) self.setting.note_widget = self Xpos2Tick.__init__(self) Ypos2Note.__init__(self) MsqNGWEventHdl.__init__(self) ProgressLineListener.__init__(self) self.max_height = (NOTE_MAX + 1) * self.setting.noteysz + 1 self.selection = None self.buffer_img = None # TODO search for the best buffer # self.set_flags(gtk.CAN_DEFAULT) self.set_scale(0)
def __init__(self, grid): gtk.Widget.__init__(self) self.grid = grid self.setting = self.grid.setting self.font_height = default_font.string_height("3600") self.height = (self.font_height + 1) * 3 Xpos2Tick.__init__(self) self.hbar_mode = 0 # 0 NO MODE, 1 MOVE START, 2 MOVE END self.last_tick = self.setting.getstart() self.connect("button_press_event", self.handle_button_press) self.connect("button_release_event", self.handle_button_release) self.connect("motion_notify_event", self.handle_motion)