Exemple #1
0
 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)
Exemple #2
0
    def __init__(self, setting):
        gtk.Widget.__init__(self)

        self.setting = setting
        self.width = default_font.string_width("00 C -10X") * 2
        self.piano_xpos = self.width / 2

        self.last_play_note = None

        Ypos2Note.__init__(self)

        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)