diff options
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/PatchWindow.cpp | 31 | ||||
-rw-r--r-- | src/gui/PatchWindow.hpp | 6 | ||||
-rw-r--r-- | src/gui/ingen_gui.glade | 59 |
3 files changed, 86 insertions, 10 deletions
diff --git a/src/gui/PatchWindow.cpp b/src/gui/PatchWindow.cpp index a928b315..adbfc933 100644 --- a/src/gui/PatchWindow.cpp +++ b/src/gui/PatchWindow.cpp @@ -87,6 +87,9 @@ PatchWindow::PatchWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glad xml->get_widget("patch_fullscreen_menuitem", _menu_fullscreen); xml->get_widget("patch_human_names_menuitem", _menu_human_names); xml->get_widget("patch_show_port_names_menuitem", _menu_show_port_names); + xml->get_widget("patch_zoom_in_menuitem", _menu_zoom_in); + xml->get_widget("patch_zoom_out_menuitem", _menu_zoom_out); + xml->get_widget("patch_zoom_normal_menuitem", _menu_zoom_normal); xml->get_widget("patch_status_bar_menuitem", _menu_show_status_bar); xml->get_widget("patch_arrange_menuitem", _menu_arrange); xml->get_widget("patch_view_messages_window_menuitem", _menu_view_messages_window); @@ -135,6 +138,14 @@ PatchWindow::PatchWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glad sigc::mem_fun(this, &PatchWindow::event_port_names_toggled)); _menu_arrange->signal_activate().connect( sigc::mem_fun(this, &PatchWindow::event_arrange)); + _menu_quit->signal_activate().connect( + sigc::mem_fun(this, &PatchWindow::event_quit)); + _menu_zoom_in->signal_activate().connect( + sigc::mem_fun(this, &PatchWindow::event_zoom_in)); + _menu_zoom_out->signal_activate().connect( + sigc::mem_fun(this, &PatchWindow::event_zoom_out)); + _menu_zoom_normal->signal_activate().connect( + sigc::mem_fun(this, &PatchWindow::event_zoom_normal)); _menu_view_engine_window->signal_activate().connect( sigc::mem_fun(this, &PatchWindow::event_show_engine)); _menu_view_control_window->signal_activate().connect( @@ -643,6 +654,26 @@ PatchWindow::event_quit() void +PatchWindow::event_zoom_in() +{ + _view->canvas()->set_font_size(_view->canvas()->get_font_size() + 1.0); +} + +void +PatchWindow::event_zoom_out() +{ + _view->canvas()->set_font_size(_view->canvas()->get_font_size() - 1.0); +} + + +void +PatchWindow::event_zoom_normal() +{ + _view->canvas()->set_zoom_and_font_size(1.0, _view->canvas()->get_default_font_size()); +} + + +void PatchWindow::event_arrange() { _view->canvas()->arrange(false, false); diff --git a/src/gui/PatchWindow.hpp b/src/gui/PatchWindow.hpp index 28abdc57..aafb9d2c 100644 --- a/src/gui/PatchWindow.hpp +++ b/src/gui/PatchWindow.hpp @@ -96,6 +96,9 @@ private: void event_status_bar_toggled(); void event_human_names_toggled(); void event_port_names_toggled(); + void event_zoom_in(); + void event_zoom_out(); + void event_zoom_normal(); void event_arrange(); void event_show_properties(); void event_show_controls(); @@ -131,6 +134,9 @@ private: Gtk::CheckMenuItem* _menu_human_names; Gtk::CheckMenuItem* _menu_show_port_names; Gtk::CheckMenuItem* _menu_show_status_bar; + Gtk::MenuItem* _menu_zoom_in; + Gtk::MenuItem* _menu_zoom_out; + Gtk::MenuItem* _menu_zoom_normal; Gtk::MenuItem* _menu_fullscreen; Gtk::MenuItem* _menu_arrange; Gtk::MenuItem* _menu_view_engine_window; diff --git a/src/gui/ingen_gui.glade b/src/gui/ingen_gui.glade index 10dd355c..15e38061 100644 --- a/src/gui/ingen_gui.glade +++ b/src/gui/ingen_gui.glade @@ -266,16 +266,6 @@ <child> <widget class="GtkMenu" id="patch_patch_menu_menu"> <child> - <widget class="GtkImageMenuItem" id="patch_fullscreen_menuitem"> - <property name="label">gtk-fullscreen</property> - <property name="visible">True</property> - <property name="use_underline">True</property> - <property name="use_stock">True</property> - <signal name="activate" handler="patch_fullscreen_menuitem"/> - <accelerator key="F11" signal="activate"/> - </widget> - </child> - <child> <widget class="GtkCheckMenuItem" id="patch_human_names_menuitem"> <property name="visible">True</property> <property name="tooltip" translatable="yes">Show human readable names instead of identifiers</property> @@ -304,6 +294,55 @@ <accelerator key="b" signal="activate" modifiers="GDK_CONTROL_MASK"/> </widget> </child> + <child> + <widget class="GtkSeparatorMenuItem" id="<separator>"> + <property name="visible">True</property> + </widget> + </child> + <child> + <widget class="GtkImageMenuItem" id="patch_zoom_in_menuitem"> + <property name="label">gtk-zoom-in</property> + <property name="visible">True</property> + <property name="tooltip" translatable="yes">Increase font size</property> + <property name="use_underline">True</property> + <property name="use_stock">True</property> + <accelerator key="equal" signal="activate" modifiers="GDK_CONTROL_MASK"/> + </widget> + </child> + <child> + <widget class="GtkImageMenuItem" id="patch_zoom_out_menuitem"> + <property name="label">gtk-zoom-out</property> + <property name="visible">True</property> + <property name="tooltip" translatable="yes">Decrease font size</property> + <property name="use_underline">True</property> + <property name="use_stock">True</property> + <accelerator key="minus" signal="activate" modifiers="GDK_CONTROL_MASK"/> + </widget> + </child> + <child> + <widget class="GtkImageMenuItem" id="patch_zoom_normal_menuitem"> + <property name="label">gtk-zoom-100</property> + <property name="visible">True</property> + <property name="use_underline">True</property> + <property name="use_stock">True</property> + <accelerator key="0" signal="activate" modifiers="GDK_CONTROL_MASK"/> + </widget> + </child> + <child> + <widget class="GtkSeparatorMenuItem" id="menuitem3"> + <property name="visible">True</property> + </widget> + </child> + <child> + <widget class="GtkImageMenuItem" id="patch_fullscreen_menuitem"> + <property name="visible">True</property> + <property name="label">gtk-fullscreen</property> + <property name="use_underline">True</property> + <property name="use_stock">True</property> + <signal name="activate" handler="patch_fullscreen_menuitem"/> + <accelerator key="F11" signal="activate"/> + </widget> + </child> </widget> </child> </widget> |