From 3f07ab11c93a771a4f048d391605a3cad574f669 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 2 Dec 2007 05:07:37 +0000 Subject: Make duration relative edge lengths optional (lays out bigger machines much more sanely). git-svn-id: http://svn.drobilla.net/lad/machina@938 a436a847-0d15-0410-975c-d299462d15a1 --- src/gui/MachinaGUI.cpp | 16 +- src/gui/MachinaGUI.hpp | 2 + src/gui/machina.glade | 1538 ++++++++++++++++++++---------------------------- 3 files changed, 661 insertions(+), 895 deletions(-) (limited to 'src/gui') diff --git a/src/gui/MachinaGUI.cpp b/src/gui/MachinaGUI.cpp index 0071743..f8939b4 100644 --- a/src/gui/MachinaGUI.cpp +++ b/src/gui/MachinaGUI.cpp @@ -52,6 +52,7 @@ MachinaGUI::MachinaGUI(SharedPtr engine) xml->get_widget("import_midi_menuitem", _menu_import_midi); xml->get_widget("export_midi_menuitem", _menu_export_midi); xml->get_widget("export_graphviz_menuitem", _menu_export_graphviz); + xml->get_widget("view_time_edges_menuitem", _menu_view_time_edges); xml->get_widget("view_toolbar_menuitem", _menu_view_toolbar); xml->get_widget("view_labels_menuitem", _menu_view_labels); xml->get_widget("help_about_menuitem", _menu_help_about); @@ -82,9 +83,11 @@ MachinaGUI::MachinaGUI(SharedPtr engine) _zoom_normal_button->signal_clicked().connect(sigc::bind( sigc::mem_fun(this, &MachinaGUI::zoom), 1.0)); - _zoom_full_button->signal_clicked().connect(sigc::mem_fun(_canvas.get(), &MachinaCanvas::zoom_full)); - _arrange_button->signal_clicked().connect(sigc::mem_fun(_canvas.get(), &MachinaCanvas::arrange)); - + _zoom_full_button->signal_clicked().connect( + sigc::mem_fun(_canvas.get(), &MachinaCanvas::zoom_full)); + + _arrange_button->signal_clicked().connect( + sigc::mem_fun(this, &MachinaGUI::arrange)); _menu_file_open->signal_activate().connect( sigc::mem_fun(this, &MachinaGUI::menu_file_open)); @@ -189,6 +192,13 @@ MachinaGUI::scrolled_window_event(GdkEvent* event) } +void +MachinaGUI::arrange() +{ + _canvas->arrange(_menu_view_time_edges->get_active()); +} + + void MachinaGUI::update_toolbar() { diff --git a/src/gui/MachinaGUI.hpp b/src/gui/MachinaGUI.hpp index ac4bb6d..4b82ff3 100644 --- a/src/gui/MachinaGUI.hpp +++ b/src/gui/MachinaGUI.hpp @@ -65,6 +65,7 @@ protected: void zoom(double z); bool idle_callback(); void update_toolbar(); + void arrange(); bool scrolled_window_event(GdkEvent* ev); void record_toggled(); @@ -98,6 +99,7 @@ protected: Gtk::MenuItem* _menu_export_graphviz; Gtk::MenuItem* _menu_help_about; Gtk::CheckMenuItem* _menu_view_labels; + Gtk::CheckMenuItem* _menu_view_time_edges; Gtk::CheckMenuItem* _menu_view_toolbar; Gtk::MenuItem* _menu_help_help; Gtk::ScrolledWindow* _canvas_scrolledwindow; diff --git a/src/gui/machina.glade b/src/gui/machina.glade index 8fcb8ad..f892894 100644 --- a/src/gui/machina.glade +++ b/src/gui/machina.glade @@ -1,616 +1,460 @@ - - - + + + - - - 1 - Machina - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_NONE - False - 640 - 480 - True - False - machina.svg - True - False - False - GDK_WINDOW_TYPE_HINT_NORMAL - GDK_GRAVITY_NORTH_WEST - True - False - - - - True - False - 0 - - - - True - GTK_PACK_DIRECTION_LTR - GTK_PACK_DIRECTION_LTR - - - - True - _File - True - - - - - - - True - Open a saved machine - gtk-open - True - - - - - - - True - Save machine - gtk-save - True - - - - - - - True - Save machine to file - gtk-save-as - True - - - - - - - True - - - - - - True - Import a MIDI file - _Import MIDI... - True - - - - - - True - gtk-media-record - 1 - 0.5 - 0.5 - 0 - 0 - - - - - - - - True - Export a MIDI file - _Export MIDI... - True - - - - - - True - gtk-convert - 1 - 0.5 - 0.5 - 0 - 0 - - - - - - - - True - - - - - - True - Export a DOT file for rendering with GraphViz - Export _GraphViz... - True - - - - - - True - gtk-convert - 1 - 0.5 - 0.5 - 0 - 0 - - - - - - - - True - - - - - - True - Exit Machina - gtk-quit - True - - - - - - - - - - - True - _View - True - - - - - - - True - Show labels on canvas - _Labels - True - False - - - - - - - - True - _Toolbar - True - True - - - - - - - - - - - - True - _Help - True - - - - - - - True - gtk-help - True - - - - - - - True - gtk-about - True - - - - - - - - - - 0 - False - False - - - - - - True - GTK_ORIENTATION_HORIZONTAL - GTK_TOOLBAR_BOTH_HORIZ - True - True - - - - True - Record - gtk-media-record - True - True - False - False - - - False - True - - - - - - True - Stop playback or recording - gtk-media-stop - True - True - False - - - False - True - - - - - - True - Play - gtk-media-play - True - True - False - True - - - False - True - - - - - - True - True - True - True - - - False - False - - - - - - True - True - True - False - - - - 4 - True - False - 6 - - - - True - False - Slave to JACK transport - True - Slave - True - GTK_RELIEF_NORMAL - True - False - False - True - - - 0 - False - False - - - - - - True - False - 0 - - - - True - Use internal tempo - True - - True - GTK_RELIEF_NORMAL - True - True - False - True - slave_radiobutton - - - 0 - False - False - - - - - - True - Set internal tempo - True - 1 - 0 - False - GTK_UPDATE_ALWAYS - False - False - 120 1 640 1 10 10 - - - 0 - True - True - - - - - - True - BPM - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - 0 - True - True - - - - - - - False - False - - - - - - True - True - True - True - - - False - False - - - - - - True - True - True - False - - - - 4 - True - False - 0 - - - - True - Quantize recording - True - Quantize: 1/ - True - GTK_RELIEF_NORMAL - True - False - False - True - - - 0 - False - False - - - - - - True - False - True - 1 - 0 - False - GTK_UPDATE_ALWAYS - False - False - 1 1 99 1 4 4 - - - 0 - True - True - - - - - - - False - False - - - - - - True - True - True - True - - - False - False - - - - - - True - Zoom to normal size - gtk-zoom-100 - True - True - False - - - False - True - - - - - - True - Zoom to fit entire machine - gtk-zoom-fit - True - True - False - - - False - True - - - - - - True - Automatically arrange nodes - gtk-refresh - True - True - False - - - False - True - - - - - 0 - False - False - - - - - - True - True - True - True - True - GTK_POLICY_ALWAYS - GTK_POLICY_ALWAYS - GTK_SHADOW_IN - GTK_CORNER_TOP_LEFT - - - - - - - 2 - True - True - - - - - - - - True - Machina - © 2007 Dave Robillard <http://drobilla.net> - A MIDI sequencer based on + + 1 + Machina + 640 + 480 + machina.svg + + + True + + + True + + + True + _File + True + + + + + True + Open a saved machine + gtk-open + True + True + + + + + + True + Save machine + gtk-save + True + True + + + + + + True + Save machine to file + gtk-save-as + True + True + + + + + + True + + + + + True + Import a MIDI file + _Import MIDI... + True + + + + + True + gtk-media-record + 1 + + + + + + + True + Export a MIDI file + _Export MIDI... + True + + + + + True + gtk-convert + 1 + + + + + + + True + + + + + True + Export a DOT file for rendering with GraphViz + Export _GraphViz... + True + + + + + True + gtk-convert + 1 + + + + + + + True + + + + + True + Exit Machina + gtk-quit + True + True + + + + + + + + + + True + _View + True + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + Lay out the graph with edge length corresponding to tail node duration + _Time Based Edges + True + + + + + True + Show labels on canvas + _Labels + True + + + + + + + True + _Toolbar + True + True + + + + + + + + + + + True + _Help + True + + + + + True + gtk-help + True + True + + + + + + True + gtk-about + True + True + + + + + + + + + + False + False + + + + + True + GTK_TOOLBAR_BOTH_HORIZ + + + True + Record + gtk-media-record + + + False + + + + + True + Stop playback or recording + gtk-media-stop + + + False + + + + + True + Play + gtk-media-play + True + + + False + + + + + True + + + False + False + + + + + True + + + True + 4 + 6 + + + True + False + True + Slave to JACK transport + Slave + True + 0 + True + + + False + False + + + + + True + + + True + True + Use internal tempo + True + 0 + True + True + slave_radiobutton + + + False + False + + + + + True + True + Set internal tempo + 120 1 640 1 10 10 + 1 + + + 1 + + + + + True + BPM + + + False + False + 2 + + + + + 1 + + + + + + + False + False + + + + + True + + + False + False + + + + + True + + + True + 4 + + + True + True + Quantize recording + Quantize: 1/ + True + 0 + True + + + False + False + + + + + True + False + True + 1 1 99 1 4 4 + 1 + + + 1 + + + + + + + False + False + + + + + True + + + False + False + + + + + True + Zoom to normal size + gtk-zoom-100 + + + False + + + + + True + Zoom to fit entire machine + gtk-zoom-fit + + + False + + + + + True + Automatically arrange nodes + gtk-refresh + + + False + + + + + False + False + 1 + + + + + True + True + True + True + True + GTK_SHADOW_IN + + + + + + 2 + 2 + + + + + + + True + GDK_WINDOW_TYPE_HINT_NORMAL + © 2007 Dave Robillard <http://drobilla.net> + A MIDI sequencer based on probabilistic finite-state automata - Machina is free software; you can redistribute it and/or modify + http://drobilla.net/software/machina + Website: + Machina is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. @@ -624,68 +468,38 @@ You should have received a copy of the GNU General Public License along with Machina; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - False - http://drobilla.net/software/machina - Website: - Dave Robillard <dave@drobilla.net> - translator-credits - machina.svg - - - - 8 - Machina Help - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_CENTER_ON_PARENT - False - False - False - gtk-help - True - False - False - GDK_WINDOW_TYPE_HINT_DIALOG - GDK_GRAVITY_NORTH_WEST - True - False - True - - - - True - False - 0 - - - - True - GTK_BUTTONBOX_END - - - - True - True - True - gtk-close - True - GTK_RELIEF_NORMAL - True - -7 - - - - - 0 - False - True - GTK_PACK_END - - - - - - True - Initial nodes are shown with a thick border. + Dave Robillard <dave@drobilla.net> + translator-credits + machina.svg + + + + + + + False + GTK_PACK_END + + + + + + + 8 + Machina Help + False + GTK_WIN_POS_CENTER_ON_PARENT + gtk-help + GDK_WINDOW_TYPE_HINT_DIALOG + + + True + + + True + 0 + 0 + Initial nodes are shown with a thick border. Selector nodes are shown in green. - Right click canvas to create a new node @@ -696,223 +510,163 @@ Selector nodes are shown in green. - Ctrl+Right click a node to make it a selector node - Ctrl+Left click edge probabilities to decrease - Ctrl+Right click edge probabilities to increase - False - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 8 - True - True - - - - - - - - 8 - dialog1 - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_NONE - False - False - False - machina.svg - True - True - True - GDK_WINDOW_TYPE_HINT_DIALOG - GDK_GRAVITY_NORTH_WEST - True - False - True - - - - True - False - 8 - - - - True - GTK_BUTTONBOX_END - - - - True - True - True - gtk-apply - True - GTK_RELIEF_NORMAL - True - -10 - - - - - - True - True - True - gtk-cancel - True - GTK_RELIEF_NORMAL - True - -6 - - - - - - True - True - True - True - gtk-ok - True - GTK_RELIEF_NORMAL - True - -5 - - - - - 0 - False - True - GTK_PACK_END - - - - - - True - 2 - 2 - False - 8 - 4 - - - - True - True - 1 - 0 - True - GTK_UPDATE_ALWAYS - False - False - 60 0 127 1 10 10 - - - 1 - 2 - 0 - 1 - - - - - - - True - Note: - False - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - 1 - 0 - 1 - fill - - - - - - - True - Duration: - False - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - 1 - 1 - 2 - fill - - - - - - - True - True - True - 1 - 2 - True - GTK_UPDATE_ALWAYS - False - False - 1 0 999999 1 10 10 - - - 1 - 2 - 1 - 2 - - - - - - 0 - True - True - - - - - - + + + 8 + 2 + + + + + True + GTK_BUTTONBOX_END + + + True + True + True + gtk-close + True + -7 + + + + + False + GTK_PACK_END + + + + + + + 8 + dialog1 + False + machina.svg + GDK_WINDOW_TYPE_HINT_DIALOG + True + True + + + True + 8 + + + True + 2 + 2 + 4 + 8 + + + True + True + 60 0 127 1 10 10 + 1 + True + + + 1 + 2 + + + + + + True + 0 + Note: + + + GTK_FILL + + + + + + True + 0 + Duration: + + + 1 + 2 + GTK_FILL + + + + + + True + True + True + 1 0 999999 1 10 10 + 1 + 2 + True + + + 1 + 2 + 1 + 2 + + + + + + 2 + + + + + True + GTK_BUTTONBOX_END + + + True + True + True + gtk-apply + True + -10 + + + + + True + True + True + gtk-cancel + True + -6 + + + 1 + + + + + True + True + True + True + gtk-ok + True + -5 + + + 2 + + + + + False + GTK_PACK_END + + + + + -- cgit v1.2.1