diff options
78 files changed, 429 insertions, 444 deletions
diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc index f956161b06..b7f61a3fb7 100644 --- a/gtk2_ardour/ardour_ui.cc +++ b/gtk2_ardour/ardour_ui.cc @@ -74,7 +74,6 @@ #include "gtkmm2ext/bindings.h" #include "gtkmm2ext/gtk_ui.h" #include "gtkmm2ext/utils.h" -#include "gtkmm2ext/popup.h" #include "gtkmm2ext/window_title.h" #include "widgets/fastmeter.h" diff --git a/gtk2_ardour/ardour_ui.h b/gtk2_ardour/ardour_ui.h index 80baef517c..f66f9b467b 100644 --- a/gtk2_ardour/ardour_ui.h +++ b/gtk2_ardour/ardour_ui.h @@ -47,6 +47,8 @@ #include <gtkmm/eventbox.h> #include <gtkmm/menu.h> #include <gtkmm/menuitem.h> +#include <gtkmm/messagedialog.h> +#include <gtkmm/notebook.h> #include <gtkmm/button.h> #include <gtkmm/togglebutton.h> #include <gtkmm/treeview.h> @@ -151,7 +153,7 @@ namespace Gtk { class ProgressBar; } -namespace Gtkmm2ext { +namespace ArdourWidgets { class Tabbable; } @@ -414,15 +416,15 @@ private: bool _initial_verbose_plugin_scan; bool first_time_engine_run; - void show_tabbable (Gtkmm2ext::Tabbable*); - void hide_tabbable (Gtkmm2ext::Tabbable*); - void detach_tabbable (Gtkmm2ext::Tabbable*); - void attach_tabbable (Gtkmm2ext::Tabbable*); - void button_change_tabbable_visibility (Gtkmm2ext::Tabbable*); - void key_change_tabbable_visibility (Gtkmm2ext::Tabbable*); + void show_tabbable (ArdourWidgets::Tabbable*); + void hide_tabbable (ArdourWidgets::Tabbable*); + void detach_tabbable (ArdourWidgets::Tabbable*); + void attach_tabbable (ArdourWidgets::Tabbable*); + void button_change_tabbable_visibility (ArdourWidgets::Tabbable*); + void key_change_tabbable_visibility (ArdourWidgets::Tabbable*); void toggle_editor_and_mixer (); - void tabbable_state_change (Gtkmm2ext::Tabbable&); + void tabbable_state_change (ArdourWidgets::Tabbable&); void toggle_meterbridge (); void toggle_luawindow (); diff --git a/gtk2_ardour/ardour_ui_dependents.cc b/gtk2_ardour/ardour_ui_dependents.cc index 84f1145adb..87beab6b0e 100644 --- a/gtk2_ardour/ardour_ui_dependents.cc +++ b/gtk2_ardour/ardour_ui_dependents.cc @@ -153,7 +153,7 @@ ARDOUR_UI::tab_window_root_drop (GtkNotebook* src, using namespace std; Gtk::Notebook* nb = 0; Gtk::Window* win = 0; - Gtkmm2ext::Tabbable* tabbable = 0; + ArdourWidgets::Tabbable* tabbable = 0; if (w == GTK_WIDGET(editor->contents().gobj())) { diff --git a/gtk2_ardour/ardour_ui_ed.cc b/gtk2_ardour/ardour_ui_ed.cc index ffe39844bf..1a2188c85c 100644 --- a/gtk2_ardour/ardour_ui_ed.cc +++ b/gtk2_ardour/ardour_ui_ed.cc @@ -33,14 +33,15 @@ #include <gtkmm/accelmap.h> #include <gtk/gtk.h> +#include "pbd/file_utils.h" +#include "pbd/fpu.h" +#include "pbd/convert.h" + #include "gtkmm2ext/cairo_packer.h" -#include "gtkmm2ext/tearoff.h" #include "gtkmm2ext/utils.h" #include "gtkmm2ext/window_title.h" -#include "pbd/file_utils.h" -#include "pbd/fpu.h" -#include "pbd/convert.h" +#include "widgets/tearoff.h" #include "ardour_ui.h" #include "public_editor.h" diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc index 58b731f293..6a20d81316 100644 --- a/gtk2_ardour/editor.cc +++ b/gtk2_ardour/editor.cc @@ -57,12 +57,10 @@ #include <gtkmm/menuitem.h> #include "gtkmm2ext/bindings.h" -#include "gtkmm2ext/eventboxext.h" #include "gtkmm2ext/gtk_ui.h" #include "gtkmm2ext/keyboard.h" #include "gtkmm2ext/utils.h" #include "gtkmm2ext/window_title.h" -#include "gtkmm2ext/choice.h" #include "gtkmm2ext/cell_renderer_pixbuf_toggle.h" #include "ardour/analysis_graph.h" @@ -84,6 +82,7 @@ #include "canvas/text.h" #include "widgets/ardour_spacer.h" +#include "widgets/eventboxext.h" #include "widgets/tooltips.h" #include "control_protocol/control_protocol.h" @@ -761,11 +760,11 @@ Editor::Editor () ebox->set_name("EditorWindow"); ebox->add (toolbar_hbox); - Gtk::EventBox* epane_box = manage (new Gtkmm2ext::EventBoxExt); //a themeable box + Gtk::EventBox* epane_box = manage (new EventBoxExt); //a themeable box epane_box->set_name("EditorWindow"); epane_box->add (edit_pane); - Gtk::EventBox* epane_box2 = manage (new Gtkmm2ext::EventBoxExt); //a themeable box + Gtk::EventBox* epane_box2 = manage (new EventBoxExt); //a themeable box epane_box2->set_name("EditorWindow"); epane_box2->add (global_vpacker); diff --git a/gtk2_ardour/editor.h b/gtk2_ardour/editor.h index ba1f989964..8be6dcf77c 100644 --- a/gtk2_ardour/editor.h +++ b/gtk2_ardour/editor.h @@ -36,7 +36,6 @@ #include "gtkmm2ext/bindings.h" #include "gtkmm2ext/dndtreeview.h" -#include "gtkmm2ext/pane.h" #include "pbd/stateful.h" #include "pbd/signals.h" @@ -51,6 +50,7 @@ #include "widgets/ardour_button.h" #include "widgets/ardour_dropdown.h" +#include "widgets/pane.h" #include "ardour_dialog.h" #include "public_editor.h" @@ -635,8 +635,8 @@ private: void add_notebook_page (std::string const &, Gtk::Widget &); bool notebook_tab_clicked (GdkEventButton *, Gtk::Widget *); - Gtkmm2ext::HPane edit_pane; - Gtkmm2ext::VPane editor_summary_pane; + ArdourWidgets::HPane edit_pane; + ArdourWidgets::VPane editor_summary_pane; Gtk::EventBox meter_base; Gtk::HBox meter_box; diff --git a/gtk2_ardour/editor_actions.cc b/gtk2_ardour/editor_actions.cc index 17ee8e17a1..9fc9361bd2 100644 --- a/gtk2_ardour/editor_actions.cc +++ b/gtk2_ardour/editor_actions.cc @@ -483,38 +483,38 @@ Editor::register_actions () act = myactions.register_radio_action (mouse_mode_actions, mouse_mode_group, "set-mouse-mode-object", _("Object Tool"), sigc::bind (sigc::mem_fun(*this, &Editor::mouse_mode_toggled), Editing::MouseObject)); mouse_move_button.set_related_action (act); - mouse_move_button.set_icon (Gtkmm2ext::ArdourIcon::ToolGrab); + mouse_move_button.set_icon (ArdourWidgets::ArdourIcon::ToolGrab); mouse_move_button.set_name ("mouse mode button"); act = myactions.register_radio_action (mouse_mode_actions, mouse_mode_group, "set-mouse-mode-range", _("Range Tool"), sigc::bind (sigc::mem_fun(*this, &Editor::mouse_mode_toggled), Editing::MouseRange)); mouse_select_button.set_related_action (act); - mouse_select_button.set_icon (Gtkmm2ext::ArdourIcon::ToolRange); + mouse_select_button.set_icon (ArdourWidgets::ArdourIcon::ToolRange); mouse_select_button.set_name ("mouse mode button"); act = myactions.register_radio_action (mouse_mode_actions, mouse_mode_group, "set-mouse-mode-draw", _("Note Drawing Tool"), sigc::bind (sigc::mem_fun(*this, &Editor::mouse_mode_toggled), Editing::MouseDraw)); mouse_draw_button.set_related_action (act); - mouse_draw_button.set_icon (Gtkmm2ext::ArdourIcon::ToolDraw); + mouse_draw_button.set_icon (ArdourWidgets::ArdourIcon::ToolDraw); mouse_draw_button.set_name ("mouse mode button"); act = myactions.register_radio_action (mouse_mode_actions, mouse_mode_group, "set-mouse-mode-audition", _("Audition Tool"), sigc::bind (sigc::mem_fun(*this, &Editor::mouse_mode_toggled), Editing::MouseAudition)); mouse_audition_button.set_related_action (act); - mouse_audition_button.set_icon (Gtkmm2ext::ArdourIcon::ToolAudition); + mouse_audition_button.set_icon (ArdourWidgets::ArdourIcon::ToolAudition); mouse_audition_button.set_name ("mouse mode button"); act = myactions.register_radio_action (mouse_mode_actions, mouse_mode_group, "set-mouse-mode-timefx", _("Time FX Tool"), sigc::bind (sigc::mem_fun(*this, &Editor::mouse_mode_toggled), Editing::MouseTimeFX)); mouse_timefx_button.set_related_action (act); - mouse_timefx_button.set_icon (Gtkmm2ext::ArdourIcon::ToolStretch); + mouse_timefx_button.set_icon (ArdourWidgets::ArdourIcon::ToolStretch); mouse_timefx_button.set_name ("mouse mode button"); act = myactions.register_radio_action (mouse_mode_actions, mouse_mode_group, "set-mouse-mode-content", _("Content Tool"), sigc::bind (sigc::mem_fun(*this, &Editor::mouse_mode_toggled), Editing::MouseContent)); mouse_content_button.set_related_action (act); - mouse_content_button.set_icon (Gtkmm2ext::ArdourIcon::ToolContent); + mouse_content_button.set_icon (ArdourWidgets::ArdourIcon::ToolContent); mouse_content_button.set_name ("mouse mode button"); if(!Profile->get_mixbus()) { act = myactions.register_radio_action (mouse_mode_actions, mouse_mode_group, "set-mouse-mode-cut", _("Cut Tool"), sigc::bind (sigc::mem_fun(*this, &Editor::mouse_mode_toggled), Editing::MouseCut)); mouse_cut_button.set_related_action (act); - mouse_cut_button.set_icon (Gtkmm2ext::ArdourIcon::ToolCut); + mouse_cut_button.set_icon (ArdourWidgets::ArdourIcon::ToolCut); mouse_cut_button.set_name ("mouse mode button"); } diff --git a/gtk2_ardour/editor_audio_import.cc b/gtk2_ardour/editor_audio_import.cc index 1e8d157f14..c217f05823 100644 --- a/gtk2_ardour/editor_audio_import.cc +++ b/gtk2_ardour/editor_audio_import.cc @@ -31,7 +31,7 @@ #include "pbd/shortpath.h" #include "pbd/stateful_diff_command.h" -#include <gtkmm2ext/choice.h> +#include "widgets/choice.h" #include "ardour/audio_track.h" #include "ardour/audiofilesource.h" @@ -651,7 +651,7 @@ Editor::embed_sndfiles (vector<string> paths, choices.push_back (_("Don't embed it")); choices.push_back (_("Embed all without questions")); - Gtkmm2ext::Choice rate_choice ( + ArdourWidgets::Choice rate_choice ( _("Sample rate"), string_compose (_("%1\nThis audiofile's sample rate doesn't match the session sample rate!"), short_path (path, 40)), @@ -677,7 +677,7 @@ Editor::embed_sndfiles (vector<string> paths, choices.push_back (_("Cancel")); choices.push_back (_("Embed it anyway")); - Gtkmm2ext::Choice rate_choice ( + ArdourWidgets::Choice rate_choice ( _("Sample rate"), string_compose (_("%1\nThis audiofile's sample rate doesn't match the session sample rate!"), path), choices, false diff --git a/gtk2_ardour/editor_export_audio.cc b/gtk2_ardour/editor_export_audio.cc index f2cc8e3d04..1a4f88e2f2 100644 --- a/gtk2_ardour/editor_export_audio.cc +++ b/gtk2_ardour/editor_export_audio.cc @@ -27,8 +27,6 @@ #include "pbd/gstdio_compat.h" -#include "gtkmm2ext/choice.h" - #include "pbd/pthread_utils.h" #include "ardour/audio_track.h" diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc index 3cb62da846..17521e436c 100644 --- a/gtk2_ardour/editor_ops.cc +++ b/gtk2_ardour/editor_ops.cc @@ -36,9 +36,10 @@ #include "pbd/whitespace.h" #include "pbd/stateful_diff_command.h" -#include <gtkmm2ext/utils.h> -#include <gtkmm2ext/choice.h> -#include <gtkmm2ext/popup.h> +#include "gtkmm2ext/utils.h" + +#include "widgets/choice.h" +#include "widgets/popup.h" #include "ardour/audio_track.h" #include "ardour/audioregion.h" @@ -5047,7 +5048,7 @@ Editor::remove_last_capture () choices.push_back (_("No, do nothing.")); choices.push_back (_("Yes, destroy it.")); - Gtkmm2ext::Choice prompter (_("Destroy last capture"), prompt, choices); + Choice prompter (_("Destroy last capture"), prompt, choices); if (prompter.run () == 1) { _session->remove_last_capture (); diff --git a/gtk2_ardour/editor_pt_import.cc b/gtk2_ardour/editor_pt_import.cc index cb3054a62b..55c3b0b43c 100644 --- a/gtk2_ardour/editor_pt_import.cc +++ b/gtk2_ardour/editor_pt_import.cc @@ -29,8 +29,6 @@ #include "pbd/shortpath.h" #include "pbd/stateful_diff_command.h" -#include <gtkmm2ext/choice.h> - #include "ardour/audio_track.h" #include "ardour/audiofilesource.h" #include "ardour/audioregion.h" diff --git a/gtk2_ardour/editor_regions.cc b/gtk2_ardour/editor_regions.cc index 83b3f00165..0372e1f3d8 100644 --- a/gtk2_ardour/editor_regions.cc +++ b/gtk2_ardour/editor_regions.cc @@ -33,10 +33,10 @@ #include "ardour/session.h" #include "ardour/profile.h" -#include "gtkmm2ext/choice.h" #include "gtkmm2ext/treeutils.h" #include "gtkmm2ext/utils.h" +#include "widgets/choice.h" #include "widgets/tooltips.h" #include "audio_clock.h" @@ -503,7 +503,7 @@ EditorRegions::remove_unused_regions () choices.push_back (_("No, do nothing.")); choices.push_back (_("Yes, remove.")); - Gtkmm2ext::Choice prompter (_("Remove unused regions"), prompt, choices); + ArdourWidgets::Choice prompter (_("Remove unused regions"), prompt, choices); if (prompter.run () == 1) { _no_redisplay = true; diff --git a/gtk2_ardour/editor_snapshots.cc b/gtk2_ardour/editor_snapshots.cc index 0a2ea085cd..8ab16cc48b 100644 --- a/gtk2_ardour/editor_snapshots.cc +++ b/gtk2_ardour/editor_snapshots.cc @@ -26,13 +26,13 @@ #include <gtkmm/liststore.h> -#include "gtkmm2ext/choice.h" - #include "ardour/filename_extensions.h" #include "ardour/session.h" #include "ardour/session_state_utils.h" #include "ardour/session_directory.h" +#include "widgets/choice.h" + #include "editor_snapshots.h" #include "ardour_ui.h" #include "pbd/i18n.h" @@ -173,7 +173,7 @@ EditorSnapshots::remove (std::string name) choices.push_back (_("No, do nothing.")); choices.push_back (_("Yes, remove it.")); - Gtkmm2ext::Choice prompter (_("Remove snapshot"), prompt, choices); + ArdourWidgets::Choice prompter (_("Remove snapshot"), prompt, choices); if (prompter.run () == 1) { _session->remove_state (name); diff --git a/gtk2_ardour/engine_dialog.h b/gtk2_ardour/engine_dialog.h index b9bfabb61e..2f5399e564 100644 --- a/gtk2_ardour/engine_dialog.h +++ b/gtk2_ardour/engine_dialog.h @@ -24,14 +24,15 @@ #include <vector> #include <string> +#include <gtkmm/box.h> +#include <gtkmm/button.h> +#include <gtkmm/buttonbox.h> +#include <gtkmm/comboboxtext.h> #include <gtkmm/checkbutton.h> +#include <gtkmm/expander.h> +#include <gtkmm/notebook.h> #include <gtkmm/spinbutton.h> -#include <gtkmm/comboboxtext.h> #include <gtkmm/table.h> -#include <gtkmm/expander.h> -#include <gtkmm/box.h> -#include <gtkmm/buttonbox.h> -#include <gtkmm/button.h> #include "pbd/signals.h" diff --git a/gtk2_ardour/enums.cc b/gtk2_ardour/enums.cc index 2f141d23a9..608d257645 100644 --- a/gtk2_ardour/enums.cc +++ b/gtk2_ardour/enums.cc @@ -19,7 +19,7 @@ #include "pbd/enumwriter.h" -#include "gtkmm2ext/ardour_icon.h" +#include "widgets/ardour_icon.h" #include "audio_clock.h" #include "editing.h" @@ -30,7 +30,7 @@ using namespace std; using namespace PBD; using namespace ARDOUR; using namespace Editing; -using namespace Gtkmm2ext; +using namespace ArdourWidgets; void setup_gtk_ardour_enums () diff --git a/gtk2_ardour/location_ui.h b/gtk2_ardour/location_ui.h index 0d1115feba..46495aa4fc 100644 --- a/gtk2_ardour/location_ui.h +++ b/gtk2_ardour/location_ui.h @@ -33,8 +33,8 @@ #include "ardour/location.h" #include "ardour/session_handle.h" -#include "gtkmm2ext/pane.h" #include "widgets/ardour_button.h" +#include "widgets/pane.h" #include "ardour_window.h" #include "audio_clock.h" @@ -180,7 +180,7 @@ private: LocationEditRow punch_edit_row; Gtk::VBox loop_punch_box; - Gtkmm2ext::VPane loc_range_panes; + ArdourWidgets::VPane loc_range_panes; Gtk::VBox loc_frame_box; Gtk::Button add_location_button; diff --git a/gtk2_ardour/luawindow.cc b/gtk2_ardour/luawindow.cc index 8a9c2aee3b..beb2cc0356 100644 --- a/gtk2_ardour/luawindow.cc +++ b/gtk2_ardour/luawindow.cc @@ -34,10 +34,10 @@ #include "pbd/md5.h" #include "gtkmm2ext/gtk_ui.h" -#include "gtkmm2ext/pane.h" #include "gtkmm2ext/utils.h" #include "gtkmm2ext/window_title.h" +#include "widgets/pane.h" #include "widgets/tooltips.h" #include "ardour/filesystem_paths.h" @@ -156,7 +156,7 @@ LuaWindow::LuaWindow () vbox->pack_start (*scrollin, true, true, 0); vbox->pack_start (*hbox, false, false, 2); - Gtkmm2ext::VPane *vpane = manage (new Gtkmm2ext::VPane ()); + ArdourWidgets::VPane *vpane = manage (new ArdourWidgets::VPane ()); vpane->add (*vbox); vpane->add (scrollout); vpane->set_divider (0, 0.75); diff --git a/gtk2_ardour/luawindow.h b/gtk2_ardour/luawindow.h index 3994970adb..c786e4d63a 100644 --- a/gtk2_ardour/luawindow.h +++ b/gtk2_ardour/luawindow.h @@ -24,6 +24,7 @@ #include <gtkmm/box.h> #include <gtkmm/scrolledwindow.h> #include <gtkmm/label.h> +#include <gtkmm/textview.h> #include <gtkmm/window.h> #include "pbd/signals.h" diff --git a/gtk2_ardour/main.cc b/gtk2_ardour/main.cc index 1113fce769..9c9981bcc3 100644 --- a/gtk2_ardour/main.cc +++ b/gtk2_ardour/main.cc @@ -48,8 +48,9 @@ #include "ardour/filesystem_paths.h" #include <gtkmm/main.h> +#include <gtkmm/stock.h> + #include <gtkmm2ext/application.h> -#include <gtkmm2ext/popup.h> #include <gtkmm2ext/utils.h> #include "ardour_ui.h" diff --git a/gtk2_ardour/midi_channel_selector.h b/gtk2_ardour/midi_channel_selector.h index 7f1281d7d0..c7c754c2b7 100644 --- a/gtk2_ardour/midi_channel_selector.h +++ b/gtk2_ardour/midi_channel_selector.h @@ -30,7 +30,7 @@ #include "gtkmm/radiobutton.h" #include "gtkmm/label.h" -#include "gtkmm2ext/stateful_button.h" +#include "widgets/stateful_button.h" #include "ardour/types.h" @@ -53,11 +53,11 @@ public: protected: virtual void button_toggled(Gtk::ToggleButton* button, uint8_t button_nr) = 0; - Gtk::Label _button_labels[4][4]; - Gtkmm2ext::StatefulToggleButton _buttons[4][4]; - int _recursion_counter; + Gtk::Label _button_labels[4][4]; + ArdourWidgets::StatefulToggleButton _buttons[4][4]; + int _recursion_counter; - bool was_clicked (GdkEventButton*); + bool was_clicked (GdkEventButton*); }; class SingleMidiChannelSelector : public MidiChannelSelector diff --git a/gtk2_ardour/midi_scroomer.cc b/gtk2_ardour/midi_scroomer.cc index 0cd7eae46a..6fad2cc1f1 100644 --- a/gtk2_ardour/midi_scroomer.cc +++ b/gtk2_ardour/midi_scroomer.cc @@ -22,14 +22,13 @@ #include "midi_scroomer.h" #include "ui_config.h" -using namespace Gtkmm2ext; using namespace Gtk; using namespace std; //std::map<int, Glib::RefPtr<Gdk::Pixmap> > MidiScroomer::piano_pixmaps; MidiScroomer::MidiScroomer(Adjustment& adj) - : Gtkmm2ext::Scroomer(adj) + : ArdourWidgets::Scroomer(adj) { adj.set_lower(0); diff --git a/gtk2_ardour/midi_scroomer.h b/gtk2_ardour/midi_scroomer.h index 2b4ebe6c64..bbf1ec3d64 100644 --- a/gtk2_ardour/midi_scroomer.h +++ b/gtk2_ardour/midi_scroomer.h @@ -20,10 +20,9 @@ #ifndef __ardour_midi_scroomer_h__ #define __ardour_midi_scroomer_h__ -#include <gtkmm2ext/scroomer.h> -#include <gdkmm/pixbuf.h> +#include "widgets/scroomer.h" -class MidiScroomer : public Gtkmm2ext::Scroomer +class MidiScroomer : public ArdourWidgets::Scroomer { public: MidiScroomer(Gtk::Adjustment&); diff --git a/gtk2_ardour/mixer_strip.cc b/gtk2_ardour/mixer_strip.cc index 32a82fc2a6..8f101ee09d 100644 --- a/gtk2_ardour/mixer_strip.cc +++ b/gtk2_ardour/mixer_strip.cc @@ -30,7 +30,6 @@ #include "gtkmm2ext/gtk_ui.h" #include "gtkmm2ext/menu_elems.h" #include "gtkmm2ext/utils.h" -#include "gtkmm2ext/choice.h" #include "gtkmm2ext/doi.h" #include "widgets/tooltips.h" diff --git a/gtk2_ardour/mixer_ui.cc b/gtk2_ardour/mixer_ui.cc index 02391a3a44..88489f8cc3 100644 --- a/gtk2_ardour/mixer_ui.cc +++ b/gtk2_ardour/mixer_ui.cc @@ -33,15 +33,6 @@ #include "pbd/stacktrace.h" #include "pbd/unwind.h" -#include <glibmm/threads.h> - -#include <gtkmm2ext/gtk_ui.h> -#include <gtkmm2ext/keyboard.h> -#include <gtkmm2ext/utils.h> -#include <gtkmm2ext/tearoff.h> -#include <gtkmm2ext/window_title.h> -#include <gtkmm2ext/doi.h> - #include "ardour/amp.h" #include "ardour/debug.h" #include "ardour/audio_track.h" @@ -53,6 +44,14 @@ #include "ardour/vca.h" #include "ardour/vca_manager.h" +#include "gtkmm2ext/gtk_ui.h" +#include "gtkmm2ext/keyboard.h" +#include "gtkmm2ext/utils.h" +#include "gtkmm2ext/window_title.h" +#include "gtkmm2ext/doi.h" + +#include "widgets/tearoff.h" + #include "keyboard.h" #include "mixer_ui.h" #include "mixer_strip.h" diff --git a/gtk2_ardour/mixer_ui.h b/gtk2_ardour/mixer_ui.h index adf86b09d2..9485ea252f 100644 --- a/gtk2_ardour/mixer_ui.h +++ b/gtk2_ardour/mixer_ui.h @@ -30,6 +30,7 @@ #include <gtkmm/frame.h> #include <gtkmm/menu.h> #include <gtkmm/treeview.h> +#include <gtkmm/treestore.h> #include <gtkmm/liststore.h> #include "pbd/stateful.h" @@ -43,10 +44,11 @@ #include <gtkmm2ext/bindings.h> #include "gtkmm2ext/dndtreeview.h" -#include <gtkmm2ext/pane.h> -#include "gtkmm2ext/tabbable.h" #include "gtkmm2ext/treeutils.h" +#include "widgets/pane.h" +#include "widgets/tabbable.h" + #include "axis_provider.h" #include "enums.h" #include "route_processor_selection.h" @@ -77,7 +79,7 @@ protected: virtual bool row_drop_possible_vfunc (const Gtk::TreeModel::Path&, const Gtk::SelectionData&) const; }; -class Mixer_UI : public Gtkmm2ext::Tabbable, public PBD::ScopedConnectionList, public ARDOUR::SessionHandlePtr, public AxisViewProvider +class Mixer_UI : public ArdourWidgets::Tabbable, public PBD::ScopedConnectionList, public ARDOUR::SessionHandlePtr, public AxisViewProvider { public: static Mixer_UI* instance(); @@ -152,9 +154,9 @@ private: Gtk::Frame track_display_frame; Gtk::Frame group_display_frame; Gtk::Frame favorite_plugins_frame; - Gtkmm2ext::VPane rhs_pane1; - Gtkmm2ext::VPane rhs_pane2; - Gtkmm2ext::HPane inner_pane; + ArdourWidgets::VPane rhs_pane1; + ArdourWidgets::VPane rhs_pane2; + ArdourWidgets::HPane inner_pane; Gtk::HBox strip_packer; Gtk::ScrolledWindow vca_scroller; Gtk::HBox vca_hpacker; @@ -163,7 +165,7 @@ private: Gtk::Label vca_label; Gtk::EventBox vca_scroller_base; Gtk::HBox out_packer; - Gtkmm2ext::HPane list_hpane; + ArdourWidgets::HPane list_hpane; MixerGroupTabs* _group_tabs; diff --git a/gtk2_ardour/monitor_section.cc b/gtk2_ardour/monitor_section.cc index ca0b23399d..4ec75a4ce4 100644 --- a/gtk2_ardour/monitor_section.cc +++ b/gtk2_ardour/monitor_section.cc @@ -23,13 +23,13 @@ #include "pbd/error.h" #include "pbd/replace_all.h" -#include "gtkmm2ext/tearoff.h" #include "gtkmm2ext/actions.h" #include "gtkmm2ext/utils.h" #include <gtkmm/menu.h> #include <gtkmm/menuitem.h> +#include "widgets/tearoff.h" #include "widgets/tooltips.h" #include "ardour/amp.h" diff --git a/gtk2_ardour/monitor_section.h b/gtk2_ardour/monitor_section.h index ca85aa5457..9e3cec59bc 100644 --- a/gtk2_ardour/monitor_section.h +++ b/gtk2_ardour/monitor_section.h @@ -35,7 +35,7 @@ #include "processor_box.h" #include "processor_selection.h" -namespace Gtkmm2ext { +namespace ArdourWidgets { class TearOff; } @@ -47,7 +47,7 @@ public: void set_session (ARDOUR::Session*); - Gtkmm2ext::TearOff& tearoff() const { return *_tearoff; } + ArdourWidgets::TearOff& tearoff() const { return *_tearoff; } std::string state_id() const; @@ -56,7 +56,7 @@ public: private: Gtk::HBox hpacker; Gtk::VBox vpacker; - Gtkmm2ext::TearOff* _tearoff; + ArdourWidgets::TearOff* _tearoff; Gtk::HBox channel_table_packer; Gtk::HBox table_hpacker; diff --git a/gtk2_ardour/mono_panner.h b/gtk2_ardour/mono_panner.h index aef11d9c7a..5022e9b52d 100644 --- a/gtk2_ardour/mono_panner.h +++ b/gtk2_ardour/mono_panner.h @@ -24,7 +24,7 @@ #include <boost/shared_ptr.hpp> -#include "gtkmm2ext/binding_proxy.h" +#include "widgets/binding_proxy.h" #include "panner_interface.h" @@ -72,7 +72,7 @@ private: double accumulated_delta; bool detented; - BindingProxy position_binder; + ArdourWidgets::BindingProxy position_binder; void set_tooltip (); diff --git a/gtk2_ardour/plugin_selector.cc b/gtk2_ardour/plugin_selector.cc index cd904f6cd9..0a609eb9cd 100644 --- a/gtk2_ardour/plugin_selector.cc +++ b/gtk2_ardour/plugin_selector.cc @@ -25,10 +25,13 @@ #include <algorithm> -#include <gtkmm/table.h> -#include <gtkmm/stock.h> #include <gtkmm/button.h> +#include <gtkmm/comboboxtext.h> +#include <gtkmm/frame.h> +#include <gtkmm/messagedialog.h> #include <gtkmm/notebook.h> +#include <gtkmm/stock.h> +#include <gtkmm/table.h> #include "gtkmm2ext/utils.h" #include "pbd/convert.h" diff --git a/gtk2_ardour/plugin_selector.h b/gtk2_ardour/plugin_selector.h index 548ed826ff..14aa47322d 100644 --- a/gtk2_ardour/plugin_selector.h +++ b/gtk2_ardour/plugin_selector.h @@ -23,6 +23,9 @@ #include <gtkmm/dialog.h> #include <gtkmm/notebook.h> #include <gtkmm/treeview.h> +#include <gtkmm/scrolledwindow.h> +#include <gtkmm/liststore.h> + #include "gtkmm2ext/dndtreeview.h" #include "ardour/plugin.h" diff --git a/gtk2_ardour/plugin_setup_dialog.cc b/gtk2_ardour/plugin_setup_dialog.cc index c3bbc0dbc0..db128b5c5f 100644 --- a/gtk2_ardour/plugin_setup_dialog.cc +++ b/gtk2_ardour/plugin_setup_dialog.cc @@ -19,6 +19,8 @@ #include <gtkmm/frame.h> #include <gtkmm/label.h> +#include <gtkmm/stock.h> +#include <gtkmm/table.h> #include "plugin_setup_dialog.h" #include "pbd/i18n.h" diff --git a/gtk2_ardour/port_insert_ui.h b/gtk2_ardour/port_insert_ui.h index a04ef1fe40..3249cb0c3f 100644 --- a/gtk2_ardour/port_insert_ui.h +++ b/gtk2_ardour/port_insert_ui.h @@ -20,7 +20,7 @@ #ifndef __gtkardour_port_insert_ui_h__ #define __gtkardour_port_insert_ui_h__ -#include "gtkmm2ext/stateful_button.h" +#include "widgets/stateful_button.h" #include "ardour_dialog.h" #include "io_selector.h" @@ -40,7 +40,7 @@ private: boost::shared_ptr<ARDOUR::PortInsert> _pi; Gtk::Notebook notebook; - Gtkmm2ext::StatefulToggleButton latency_button; + ArdourWidgets::StatefulToggleButton latency_button; IOSelector input_selector; IOSelector output_selector; Gtk::Label latency_display; diff --git a/gtk2_ardour/processor_box.cc b/gtk2_ardour/processor_box.cc index a3d1833e34..ec29255d90 100644 --- a/gtk2_ardour/processor_box.cc +++ b/gtk2_ardour/processor_box.cc @@ -37,11 +37,10 @@ #include "gtkmm2ext/gtk_ui.h" #include "gtkmm2ext/menu_elems.h" #include "gtkmm2ext/utils.h" -#include "gtkmm2ext/choice.h" -#include "gtkmm2ext/utils.h" #include "gtkmm2ext/doi.h" #include "gtkmm2ext/rgb_macros.h" +#include "widgets/choice.h" #include "widgets/tooltips.h" #include "ardour/amp.h" @@ -3470,7 +3469,7 @@ ProcessorBox::clear_processors () choices.push_back (_("Cancel")); choices.push_back (_("Yes, remove them all")); - Gtkmm2ext::Choice prompter (_("Remove processors"), prompt, choices); + ArdourWidgets::Choice prompter (_("Remove processors"), prompt, choices); if (prompter.run () == 1) { _route->clear_processors (PreFader); @@ -3495,7 +3494,7 @@ ProcessorBox::clear_processors (Placement p) choices.push_back (_("Cancel")); choices.push_back (_("Yes, remove them all")); - Gtkmm2ext::Choice prompter (_("Remove processors"), prompt, choices); + ArdourWidgets::Choice prompter (_("Remove processors"), prompt, choices); if (prompter.run () == 1) { _route->clear_processors (p); diff --git a/gtk2_ardour/prompter.cc b/gtk2_ardour/prompter.cc index 16428eef19..6cf9018dbc 100644 --- a/gtk2_ardour/prompter.cc +++ b/gtk2_ardour/prompter.cc @@ -20,7 +20,7 @@ #include "prompter.h" ArdourPrompter::ArdourPrompter (bool modal) - : Gtkmm2ext::Prompter (modal) + : ArdourWidgets::Prompter (modal) { } diff --git a/gtk2_ardour/prompter.h b/gtk2_ardour/prompter.h index cea78f6b22..b01f845baf 100644 --- a/gtk2_ardour/prompter.h +++ b/gtk2_ardour/prompter.h @@ -20,9 +20,9 @@ #ifndef __ardour_gtk_prompter_h__ #define __ardour_gtk_prompter_h__ -#include <gtkmm2ext/prompter.h> +#include "widgets/prompter.h" -class ArdourPrompter : public Gtkmm2ext::Prompter +class ArdourPrompter : public ArdourWidgets::Prompter { public: ArdourPrompter (bool modal = false); diff --git a/gtk2_ardour/public_editor.h b/gtk2_ardour/public_editor.h index b83a806b00..183ae1cc8d 100644 --- a/gtk2_ardour/public_editor.h +++ b/gtk2_ardour/public_editor.h @@ -46,9 +46,10 @@ #include "gtkmm2ext/actions.h" #include "gtkmm2ext/bindings.h" -#include "gtkmm2ext/tabbable.h" #include "gtkmm2ext/visibility_tracker.h" +#include "widgets/tabbable.h" + #include "axis_provider.h" #include "editing.h" #include "selection.h" @@ -108,7 +109,7 @@ using ARDOUR::framecnt_t; * of PublicEditor need not be recompiled if private methods or member variables * change. */ -class PublicEditor : public Gtkmm2ext::Tabbable, public ARDOUR::SessionHandlePtr, public AxisViewProvider +class PublicEditor : public ArdourWidgets::Tabbable, public ARDOUR::SessionHandlePtr, public AxisViewProvider { public: PublicEditor (Gtk::Widget& content); diff --git a/gtk2_ardour/rc_option_editor.cc b/gtk2_ardour/rc_option_editor.cc index edc85643d2..b69cddf89e 100644 --- a/gtk2_ardour/rc_option_editor.cc +++ b/gtk2_ardour/rc_option_editor.cc @@ -35,7 +35,6 @@ #include "gtkmm2ext/utils.h" #include "gtkmm2ext/gtk_ui.h" -#include "gtkmm2ext/paths_dialog.h" #include "gtkmm2ext/window_title.h" #include "pbd/fpu.h" @@ -53,6 +52,8 @@ #include "control_protocol/control_protocol.h" #include "canvas/wave_view.h" + +#include "widgets/paths_dialog.h" #include "widgets/tooltips.h" #include "ardour_dialog.h" @@ -3995,7 +3996,7 @@ void RCOptionEditor::clear_au_blacklist () { void RCOptionEditor::edit_lxvst_path () { Glib::RefPtr<Gdk::Window> win = get_parent_window (); - Gtkmm2ext::PathsDialog *pd = new Gtkmm2ext::PathsDialog ( + PathsDialog *pd = new PathsDialog ( *current_toplevel(), _("Set Linux VST Search Path"), _rc_config->get_plugin_path_lxvst(), PluginManager::instance().get_default_lxvst_path() @@ -4017,7 +4018,7 @@ void RCOptionEditor::edit_lxvst_path () { } void RCOptionEditor::edit_vst_path () { - Gtkmm2ext::PathsDialog *pd = new Gtkmm2ext::PathsDialog ( + PathsDialog *pd = new PathsDialog ( *current_toplevel(), _("Set Windows VST Search Path"), _rc_config->get_plugin_path_vst(), PluginManager::instance().get_default_windows_vst_path() diff --git a/gtk2_ardour/rc_option_editor.h b/gtk2_ardour/rc_option_editor.h index d6c5bed4a7..3a3283e86c 100644 --- a/gtk2_ardour/rc_option_editor.h +++ b/gtk2_ardour/rc_option_editor.h @@ -20,7 +20,7 @@ #ifndef __gtk_ardour_rc_option_editor_h__ #define __gtk_ardour_rc_option_editor_h__ -#include "gtkmm2ext/tabbable.h" +#include "widgets/tabbable.h" #include "option_editor.h" #include "visibility_group.h" @@ -34,7 +34,7 @@ */ /** Editor for options which are obtained from and written back to one of the .rc files. */ -class RCOptionEditor : public OptionEditorContainer, public ARDOUR::SessionHandlePtr, public Gtkmm2ext::Tabbable +class RCOptionEditor : public OptionEditorContainer, public ARDOUR::SessionHandlePtr, public ArdourWidgets::Tabbable { public: RCOptionEditor (); diff --git a/gtk2_ardour/route_params_ui.h b/gtk2_ardour/route_params_ui.h index fea6d02050..76a56c7957 100644 --- a/gtk2_ardour/route_params_ui.h +++ b/gtk2_ardour/route_params_ui.h @@ -36,7 +36,7 @@ #include "ardour/ardour.h" -#include <gtkmm2ext/pane.h> +#include <widgets/pane.h> #include "ardour_window.h" #include "processor_box.h" @@ -71,22 +71,22 @@ private: Gtk::ScrolledWindow route_select_scroller; Gtk::Notebook notebook; - Gtk::Frame input_frame; - Gtk::Frame output_frame; - Gtkmm2ext::HPane redir_hpane; + Gtk::Frame input_frame; + Gtk::Frame output_frame; + ArdourWidgets::HPane redir_hpane; - Gtk::Frame route_select_frame; + Gtk::Frame route_select_frame; Gtk::HBox route_hpacker; Gtk::VBox route_vpacker; ProcessorBox* insert_box; - Gtkmm2ext::HPane list_hpane; + ArdourWidgets::HPane list_hpane; - Gtkmm2ext::HPane right_hpane; + ArdourWidgets::HPane right_hpane; - Gtk::Frame route_param_frame; + Gtk::Frame route_param_frame; Gtk::VBox choice_vpacker; diff --git a/gtk2_ardour/route_ui.cc b/gtk2_ardour/route_ui.cc index e5c4d196f5..be5807dbf7 100644 --- a/gtk2_ardour/route_ui.cc +++ b/gtk2_ardour/route_ui.cc @@ -21,12 +21,12 @@ #include <boost/algorithm/string.hpp> #include "gtkmm2ext/gtk_ui.h" -#include "gtkmm2ext/choice.h" #include "gtkmm2ext/doi.h" #include "gtkmm2ext/gtk_ui.h" #include "gtkmm2ext/utils.h" #include "widgets/ardour_button.h" +#include "widgets/binding_proxy.h" #include "pbd/memento_command.h" #include "pbd/stacktrace.h" @@ -416,7 +416,7 @@ RouteUI::mute_press (GdkEventButton* ev) } //if this is a binding action, let the ArdourButton handle it - if ( BindingProxy::is_bind_action(ev) ) + if (BindingProxy::is_bind_action(ev) ) return false; multiple_mute_change = false; @@ -591,7 +591,7 @@ RouteUI::solo_press(GdkEventButton* ev) } //if this is a binding action, let the ArdourButton handle it - if ( BindingProxy::is_bind_action(ev) ) + if (BindingProxy::is_bind_action(ev) ) return false; multiple_solo_change = false; @@ -767,7 +767,7 @@ RouteUI::rec_enable_press(GdkEventButton* ev) } //if this is a binding action, let the ArdourButton handle it - if ( BindingProxy::is_bind_action(ev) ) + if (BindingProxy::is_bind_action(ev) ) return false; if (!_session->engine().connected()) { diff --git a/gtk2_ardour/session_dialog.cc b/gtk2_ardour/session_dialog.cc index 7490b48b8f..bec810d53e 100644 --- a/gtk2_ardour/session_dialog.cc +++ b/gtk2_ardour/session_dialog.cc @@ -30,6 +30,7 @@ #include <glibmm/datetime.h> #include <gtkmm/filechooser.h> +#include <gtkmm/stock.h> #include "pbd/basename.h" #include "pbd/failed_constructor.h" diff --git a/gtk2_ardour/shuttle_control.h b/gtk2_ardour/shuttle_control.h index 1b6cce5870..bba5f17df1 100644 --- a/gtk2_ardour/shuttle_control.h +++ b/gtk2_ardour/shuttle_control.h @@ -21,15 +21,15 @@ #include <gtkmm/drawingarea.h> -#include "gtkmm2ext/binding_proxy.h" -#include "gtkmm2ext/cairo_widget.h" - #include "pbd/controllable.h" #include "ardour/session_handle.h" #include "ardour/types.h" +#include "gtkmm2ext/cairo_widget.h" + #include "widgets/ardour_button.h" +#include "widgets/binding_proxy.h" namespace Gtk { class Menu; @@ -76,10 +76,10 @@ protected: ARDOUR::microseconds_t last_shuttle_request; PBD::ScopedConnection parameter_connection; ArdourWidgets::ArdourButton _info_button; - Gtk::Menu* shuttle_unit_menu; - Gtk::Menu* shuttle_style_menu; - Gtk::Menu* shuttle_context_menu; - BindingProxy binding_proxy; + Gtk::Menu* shuttle_unit_menu; + Gtk::Menu* shuttle_style_menu; + Gtk::Menu* shuttle_context_menu; + ArdourWidgets::BindingProxy binding_proxy; float bg_r, bg_g, bg_b; void build_shuttle_context_menu (); void shuttle_style_changed(); diff --git a/gtk2_ardour/stereo_panner.h b/gtk2_ardour/stereo_panner.h index d897bd3644..f1e1025d76 100644 --- a/gtk2_ardour/stereo_panner.h +++ b/gtk2_ardour/stereo_panner.h @@ -21,7 +21,7 @@ #define __gtk_ardour_stereo_panner_h__ #include "pbd/signals.h" -#include "gtkmm2ext/binding_proxy.h" +#include "widgets/binding_proxy.h" #include "panner_interface.h" namespace ARDOUR { @@ -79,8 +79,8 @@ private: double accumulated_delta; bool detented; - BindingProxy position_binder; - BindingProxy width_binder; + ArdourWidgets::BindingProxy position_binder; + ArdourWidgets::BindingProxy width_binder; void set_tooltip (); diff --git a/gtk2_ardour/strip_silence_dialog.cc b/gtk2_ardour/strip_silence_dialog.cc index 5fa115d692..52f05a6b94 100644 --- a/gtk2_ardour/strip_silence_dialog.cc +++ b/gtk2_ardour/strip_silence_dialog.cc @@ -21,6 +21,7 @@ #include <gtkmm/table.h> #include <gtkmm/label.h> +#include <gtkmm/progressbar.h> #include <gtkmm/stock.h> #include "ardour/audioregion.h" diff --git a/gtk2_ardour/toolbar_test.cc b/gtk2_ardour/toolbar_test.cc index e1b9623bc3..ab248fde72 100644 --- a/gtk2_ardour/toolbar_test.cc +++ b/gtk2_ardour/toolbar_test.cc @@ -100,7 +100,7 @@ LogReceiver::receive (Transmitter::Channel chn, const char * str) /* ***************************************************************************/ void -setup_action_button (ArdourButton& button, std::string const & action, Gtkmm2ext::ArdourIcon::Icon icon, std::string const & button_theme_name) +setup_action_button (ArdourButton& button, std::string const & action, ArdourWidgets::ArdourIcon::Icon icon, std::string const & button_theme_name) { button.set_name (button_theme_name + string (" button")); Glib::RefPtr<Gtk::Action> act; @@ -110,7 +110,7 @@ setup_action_button (ArdourButton& button, std::string const & action, Gtkmm2ext } ArdourButton* -make_action_button (std::string const & action, Gtkmm2ext::ArdourIcon::Icon icon, std::string const & button_theme_name) +make_action_button (std::string const & action, ArdourWidgets::ArdourIcon::Icon icon, std::string const & button_theme_name) { ArdourButton* button = new ArdourButton; setup_action_button (*button, action, icon, button_theme_name); @@ -227,7 +227,7 @@ CANVAS_UI::build_toolbar (ArdourCanvas::Item* parent, std::string const & spec_p break; } - Gtkmm2ext::ArdourIcon::Icon i = (ArdourIcon::Icon) string_2_enum (string ("ArdourIcon::") + icon, i); + ArdourWidgets::ArdourIcon::Icon i = (ArdourWidgets::ArdourIcon::Icon) string_2_enum (string ("ArdourIcon::") + icon, i); ArdourCanvas::Widget* w = new ArdourCanvas::Widget (canvas, *make_action_button (action, i, theme_name)); grid->place (w, col, row); diff --git a/libs/gtkmm2ext/gtk_ui.cc b/libs/gtkmm2ext/gtk_ui.cc index c2210bba93..0da8438045 100644 --- a/libs/gtkmm2ext/gtk_ui.cc +++ b/libs/gtkmm2ext/gtk_ui.cc @@ -38,7 +38,6 @@ #include "gtkmm2ext/bindings.h" #include "gtkmm2ext/gtk_ui.h" #include "gtkmm2ext/textviewer.h" -#include "gtkmm2ext/popup.h" #include "gtkmm2ext/utils.h" #include "gtkmm2ext/window_title.h" #include "gtkmm2ext/actions.h" @@ -549,8 +548,6 @@ UI::receive (Transmitter::Channel chn, const char *str) } } -#define OLD_STYLE_ERRORS 1 - void UI::process_error_message (Transmitter::Channel chn, const char *str) { @@ -560,9 +557,6 @@ UI::process_error_message (Transmitter::Channel chn, const char *str) const char *prefix; size_t prefix_len; bool fatal_received = false; -#ifndef OLD_STYLE_ERRORS - PopUp* popup = new PopUp (WIN_POS_CENTER, 0, true); -#endif switch (chn) { case Transmitter::Fatal: @@ -573,44 +567,22 @@ UI::process_error_message (Transmitter::Channel chn, const char *str) fatal_received = true; break; case Transmitter::Error: -#if OLD_STYLE_ERRORS prefix = "[ERROR]: "; ptag = error_ptag; mtag = error_mtag; prefix_len = 9; -#else - popup->set_name ("ErrorMessage"); - popup->set_text (str); - popup->touch (); - return; -#endif break; case Transmitter::Info: -#if OLD_STYLE_ERRORS prefix = "[INFO]: "; ptag = info_ptag; mtag = info_mtag; prefix_len = 8; -#else - popup->set_name ("InfoMessage"); - popup->set_text (str); - popup->touch (); - return; -#endif - break; case Transmitter::Warning: -#if OLD_STYLE_ERRORS prefix = "[WARNING]: "; ptag = warning_ptag; mtag = warning_mtag; prefix_len = 11; -#else - popup->set_name ("WarningMessage"); - popup->set_text (str); - popup->touch (); - return; -#endif break; default: /* no choice but to use text/console output here */ diff --git a/libs/gtkmm2ext/wscript b/libs/gtkmm2ext/wscript index 1f8c89e4e5..700d1dee14 100644 --- a/libs/gtkmm2ext/wscript +++ b/libs/gtkmm2ext/wscript @@ -25,33 +25,21 @@ I18N_PACKAGE = 'gtkmm2ext3' gtkmm2ext_sources = [ 'actions.cc', 'application.cc', - 'ardour_icon.cc', - 'binding_proxy.cc', 'bindings.cc', 'cairo_packer.cc', 'cairo_widget.cc', 'cell_renderer_color_selector.cc', 'cell_renderer_pixbuf_multi.cc', 'cell_renderer_pixbuf_toggle.cc', - 'choice.cc', 'cursors.cc', 'debug.cc', 'dndtreeview.cc', 'emscale.cc', - 'eventboxext.cc', 'gtk_ui.cc', 'gtkapplication.c', 'keyboard.cc', 'menu_elems.cc', - 'pane.cc', - 'paths_dialog.cc', 'persistent_tooltip.cc', - 'popup.cc', - 'prompter.cc', - 'scroomer.cc', - 'stateful_button.cc', - 'tabbable.cc', - 'tearoff.cc', 'textviewer.cc', 'treeutils.cc', 'utils.cc', @@ -94,7 +82,7 @@ def build(bld): obj.name = 'libgtkmm2ext' obj.target = 'gtkmm2ext' obj.uselib = 'GTKMM GTK XML' - obj.use = [ 'libpbd', 'libardour' ] + obj.use = [ 'libpbd' ] obj.vnum = GTKMM2EXT_LIB_VERSION obj.install_path = bld.env['LIBDIR'] obj.defines += [ diff --git a/libs/widgets/ardour_button.cc b/libs/widgets/ardour_button.cc index 913e18bae8..8c16bcdca1 100644 --- a/libs/widgets/ardour_button.cc +++ b/libs/widgets/ardour_button.cc @@ -22,6 +22,7 @@ #include <algorithm> #include <pangomm/layout.h> +#include <gtkmm/toggleaction.h> #include "pbd/compose.h" #include "pbd/controllable.h" @@ -60,7 +61,7 @@ ArdourButton::ArdourButton (Element e) : _sizing_text("") , _markup (false) , _elements (e) - , _icon (Gtkmm2ext::ArdourIcon::NoIcon) + , _icon (ArdourIcon::NoIcon) , _icon_render_cb (0) , _icon_render_cb_data (0) , _tweaks (Tweaks (0)) @@ -108,7 +109,7 @@ ArdourButton::ArdourButton (const std::string& str, Element e) : _sizing_text("") , _markup (false) , _elements (e) - , _icon (Gtkmm2ext::ArdourIcon::NoIcon) + , _icon (ArdourIcon::NoIcon) , _tweaks (Tweaks (0)) , _char_pixel_width (0) , _char_pixel_height (0) @@ -379,7 +380,7 @@ ArdourButton::render (Cairo::RefPtr<Cairo::Context> const& ctx, cairo_rectangle_ vw -= _diameter + 4; } if (_elements & VectorIcon) { - Gtkmm2ext::ArdourIcon::render (cr, _icon, vw, vh, active_state(), text_color); + ArdourIcon::render (cr, _icon, vw, vh, active_state(), text_color); } else { cairo_save (cr); rounded_function (cr, 0, 0, get_width(), get_height(), corner_radius + 1.5); @@ -1303,7 +1304,7 @@ ArdourButton::add_elements (Element e) } void -ArdourButton::set_icon (Gtkmm2ext::ArdourIcon::Icon i) +ArdourButton::set_icon (ArdourIcon::Icon i) { _icon = i; _icon_render_cb = 0; diff --git a/libs/gtkmm2ext/ardour_icon.cc b/libs/widgets/ardour_icon.cc index e46ee6a2b4..f111e8919c 100644 --- a/libs/gtkmm2ext/ardour_icon.cc +++ b/libs/widgets/ardour_icon.cc @@ -21,9 +21,10 @@ #include <math.h> // M_PI #include <assert.h> #include <algorithm> // std:min -#include "gtkmm2ext/ardour_icon.h" -using namespace Gtkmm2ext::ArdourIcon; +#include "widgets/ardour_icon.h" + +using namespace ArdourWidgets::ArdourIcon; /* general style info: * @@ -654,7 +655,7 @@ static void icon_transport_panic (cairo_t *cr, const int width, const int height /** various combinations of lines and triangles "|>|", ">|" "|>" */ static void icon_transport_ck (cairo_t *cr, - const enum Gtkmm2ext::ArdourIcon::Icon icon, + const enum ArdourWidgets::ArdourIcon::Icon icon, const int width, const int height) { // small play triangle @@ -780,7 +781,7 @@ static void icon_transport_metronom (cairo_t *cr, const int width, const int hei /***************************************************************************** * Zoom: In "+", Out "-" and Full "[]" */ -static void icon_zoom (cairo_t *cr, const enum Gtkmm2ext::ArdourIcon::Icon icon, const int width, const int height, const uint32_t fg_color) +static void icon_zoom (cairo_t *cr, const enum ArdourWidgets::ArdourIcon::Icon icon, const int width, const int height, const uint32_t fg_color) { const double x = width * .5; const double y = height * .5; @@ -1018,11 +1019,11 @@ static void icon_din_midi (cairo_t *cr, const int width, const int height, const /*****************************************************************************/ bool -Gtkmm2ext::ArdourIcon::render (cairo_t *cr, - const enum Gtkmm2ext::ArdourIcon::Icon icon, - const int width, const int height, - const Gtkmm2ext::ActiveState state, - const uint32_t fg_color) +ArdourWidgets::ArdourIcon::render (cairo_t *cr, + const enum ArdourWidgets::ArdourIcon::Icon icon, + const int width, const int height, + const Gtkmm2ext::ActiveState state, + const uint32_t fg_color) { bool rv = true; cairo_save (cr); diff --git a/libs/gtkmm2ext/binding_proxy.cc b/libs/widgets/binding_proxy.cc index 00732a3361..666797a0eb 100644 --- a/libs/gtkmm2ext/binding_proxy.cc +++ b/libs/widgets/binding_proxy.cc @@ -13,24 +13,23 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - $Id$ */ #include <string> #include <climits> #include <iostream> -#include <pbd/controllable.h> - -#include <gtkmm2ext/binding_proxy.h> -#include <gtkmm2ext/keyboard.h> +#include "pbd/controllable.h" +#include "gtkmm2ext/keyboard.h" +#include "widgets/binding_proxy.h" +#include "widgets/popup.h" #include "pbd/i18n.h" -using namespace Gtkmm2ext; using namespace std; using namespace PBD; +using namespace Gtkmm2ext; +using namespace ArdourWidgets; guint BindingProxy::bind_button = 2; guint BindingProxy::bind_statemask = Gdk::CONTROL_MASK; @@ -73,7 +72,6 @@ BindingProxy::is_bind_action (GdkEventButton *ev) return (Keyboard::modifier_state_equals (ev->state, bind_statemask) && ev->button == bind_button ); } - bool BindingProxy::button_press_handler (GdkEventButton *ev) { @@ -103,7 +101,6 @@ BindingProxy::learning_finished () } } - bool BindingProxy::prompter_hiding (GdkEventAny* /*ev*/) { @@ -113,4 +110,3 @@ BindingProxy::prompter_hiding (GdkEventAny* /*ev*/) } return false; } - diff --git a/libs/gtkmm2ext/choice.cc b/libs/widgets/choice.cc index 5dde9426e7..6bfd0690b2 100644 --- a/libs/gtkmm2ext/choice.cc +++ b/libs/widgets/choice.cc @@ -19,12 +19,12 @@ */ #include <gtkmm/label.h> -#include <gtkmm2ext/choice.h> +#include <widgets/choice.h> using namespace std; -using namespace Gtkmm2ext; using namespace sigc; using namespace Gtk; +using namespace ArdourWidgets; Choice::Choice (string title, string prompt, vector<string> choices, bool center) : Dialog (title) diff --git a/libs/gtkmm2ext/eventboxext.cc b/libs/widgets/eventboxext.cc index 8101b9d6b5..6cbd0b7427 100644 --- a/libs/gtkmm2ext/eventboxext.cc +++ b/libs/widgets/eventboxext.cc @@ -16,9 +16,9 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include "gtkmm2ext/eventboxext.h" +#include "widgets/eventboxext.h" -using namespace Gtkmm2ext; +using namespace ArdourWidgets; EventBoxExt::EventBoxExt () { diff --git a/libs/gtkmm2ext/pane.cc b/libs/widgets/pane.cc index 76e68de5a2..2968f7bfaa 100644 --- a/libs/gtkmm2ext/pane.cc +++ b/libs/widgets/pane.cc @@ -19,14 +19,15 @@ #include <assert.h> #include <gdkmm/cursor.h> -#include "gtkmm2ext/pane.h" + +#include "widgets/pane.h" #include "pbd/i18n.h" -using namespace PBD; -using namespace Gtk; -using namespace Gtkmm2ext; using namespace std; +using namespace Gtk; +using namespace PBD; +using namespace ArdourWidgets; Pane::Pane (bool h) : horizontal (h) diff --git a/libs/gtkmm2ext/paths_dialog.cc b/libs/widgets/paths_dialog.cc index 2f2ff0c5d8..cf366a7c7c 100644 --- a/libs/gtkmm2ext/paths_dialog.cc +++ b/libs/widgets/paths_dialog.cc @@ -20,11 +20,11 @@ #include "pbd/i18n.h" #include "pbd/pathexpand.h" -#include "gtkmm2ext/paths_dialog.h" +#include "widgets/paths_dialog.h" using namespace Gtk; using namespace std; -using namespace Gtkmm2ext; +using namespace ArdourWidgets; PathsDialog::PathsDialog (Gtk::Window& parent, std::string title, std::string current_paths, std::string default_paths) : Dialog (title, parent, true) diff --git a/libs/gtkmm2ext/popup.cc b/libs/widgets/popup.cc index 898211c986..49d33dd8af 100644 --- a/libs/gtkmm2ext/popup.cc +++ b/libs/widgets/popup.cc @@ -20,13 +20,14 @@ #include <iostream> -#include <gtkmm2ext/popup.h> -#include <gtkmm2ext/utils.h> #include <gtkmm2ext/gtk_ui.h> +#include <gtkmm2ext/utils.h> + +#include <widgets/popup.h> using namespace std; using namespace Gtk; -using namespace Gtkmm2ext; +using namespace ArdourWidgets; PopUp::PopUp (Gtk::WindowPosition pos, unsigned int showfor_msecs, bool doh) : Window (WINDOW_POPUP) @@ -98,7 +99,7 @@ PopUp::touch () if (is_visible ()) { remove (); } else { - set_size_request_to_display_given_text (label, my_text.c_str(), 25, 10); + Gtkmm2ext::set_size_request_to_display_given_text (label, my_text.c_str(), 25, 10); label.set_text (my_text); show_all (); diff --git a/libs/gtkmm2ext/prompter.cc b/libs/widgets/prompter.cc index 51628ab13d..73b3bf9e49 100644 --- a/libs/gtkmm2ext/prompter.cc +++ b/libs/widgets/prompter.cc @@ -19,16 +19,15 @@ */ #include <string> - -#include <pbd/whitespace.h> - #include <gtkmm/stock.h> -#include <gtkmm2ext/prompter.h> + +#include "pbd/whitespace.h" +#include "widgets/prompter.h" #include "pbd/i18n.h" using namespace std; -using namespace Gtkmm2ext; +using namespace ArdourWidgets; Prompter::Prompter (Gtk::Window& parent, bool modal) : Gtk::Dialog ("", parent, modal) diff --git a/libs/gtkmm2ext/scroomer.cc b/libs/widgets/scroomer.cc index 69944b4bc7..98c456dc74 100644 --- a/libs/gtkmm2ext/scroomer.cc +++ b/libs/widgets/scroomer.cc @@ -19,13 +19,13 @@ #include <iostream> -#include "gtkmm2ext/scroomer.h" #include "gtkmm2ext/keyboard.h" +#include "widgets/scroomer.h" -using namespace Gtkmm2ext; -using namespace Gtk; -using namespace Gdk; using namespace std; +using namespace Gdk; +using namespace Gtk; +using namespace ArdourWidgets; Scroomer::Scroomer(Gtk::Adjustment& adjustment) : adj(adjustment) @@ -80,8 +80,8 @@ Scroomer::on_motion_notify_event (GdkEventMotion* ev) grab_y = ev->y; - if (ev->state & Keyboard::PrimaryModifier) { - if (ev->state & Keyboard::SecondaryModifier) { + if (ev->state & Gtkmm2ext::Keyboard::PrimaryModifier) { + if (ev->state & Gtkmm2ext::Keyboard::SecondaryModifier) { scale = 0.05; } else { scale = 0.1; @@ -245,8 +245,8 @@ Scroomer::on_button_press_event (GdkEventButton* ev) if (ev->button == 3){ pinch = true; } else { - pinch = false; - } + pinch = false; + } DragStarting (); /* EMIT SIGNAL */ } diff --git a/libs/gtkmm2ext/stateful_button.cc b/libs/widgets/stateful_button.cc index 3c1ad2a830..f0ba91f38e 100644 --- a/libs/gtkmm2ext/stateful_button.cc +++ b/libs/widgets/stateful_button.cc @@ -23,11 +23,11 @@ #include <gtkmm/main.h> -#include <gtkmm2ext/stateful_button.h> +#include "widgets/stateful_button.h" using namespace Gtk; using namespace Glib; -using namespace Gtkmm2ext; +using namespace ArdourWidgets; using namespace std; StateButton::StateButton () diff --git a/libs/gtkmm2ext/tabbable.cc b/libs/widgets/tabbable.cc index 8653a6a29d..ea31e6f713 100644 --- a/libs/gtkmm2ext/tabbable.cc +++ b/libs/widgets/tabbable.cc @@ -22,18 +22,20 @@ #include <gtkmm/window.h> #include <gtkmm/stock.h> -#include "gtkmm2ext/tabbable.h" +#include "pbd/stacktrace.h" + #include "gtkmm2ext/gtk_ui.h" #include "gtkmm2ext/utils.h" #include "gtkmm2ext/visibility_tracker.h" -#include "pbd/stacktrace.h" +#include "widgets/tabbable.h" #include "pbd/i18n.h" -using namespace Gtkmm2ext; -using namespace Gtk; using std::string; +using namespace Gtk; +using namespace Gtkmm2ext; +using namespace ArdourWidgets; Tabbable::Tabbable (Widget& w, const string& name, bool tabbed_by_default) : WindowProxy (name) diff --git a/libs/gtkmm2ext/tearoff.cc b/libs/widgets/tearoff.cc index 090d249b72..5fae7bcf3b 100644 --- a/libs/gtkmm2ext/tearoff.cc +++ b/libs/widgets/tearoff.cc @@ -15,7 +15,6 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - $Id$ */ #include <cmath> @@ -23,32 +22,33 @@ #include "pbd/xml++.h" -#include "gtkmm2ext/tearoff.h" #include "gtkmm2ext/utils.h" +#include "widgets/tearoff.h" + #include "pbd/i18n.h" -using namespace Gtkmm2ext; -using namespace Gtk; -using namespace Gdk; -using namespace Glib; using namespace std; +using namespace Glib; +using namespace Gdk; +using namespace Gtk; +using namespace ArdourWidgets; TearOff::TearOff (Widget& c, bool allow_resize) : contents (c) - , own_window (Gtk::WINDOW_TOPLEVEL) - , tearoff_arrow (ARROW_DOWN, SHADOW_OUT) - , close_arrow (ARROW_UP, SHADOW_OUT) - , dragging (false) - , _visible (true) - , _torn (false) - , _can_be_torn_off (true) + , own_window (Gtk::WINDOW_TOPLEVEL) + , tearoff_arrow (ARROW_DOWN, SHADOW_OUT) + , close_arrow (ARROW_UP, SHADOW_OUT) + , dragging (false) + , _visible (true) + , _torn (false) + , _can_be_torn_off (true) { - own_window_width = 0; - own_window_height = 0; - own_window_xpos = 0; - own_window_ypos = 0; + own_window_width = 0; + own_window_height = 0; + own_window_xpos = 0; + own_window_ypos = 0; tearoff_event_box.add (tearoff_arrow); tearoff_event_box.set_events (BUTTON_PRESS_MASK|BUTTON_RELEASE_MASK); @@ -60,7 +60,7 @@ TearOff::TearOff (Widget& c, bool allow_resize) close_event_box.set_events (BUTTON_PRESS_MASK|BUTTON_RELEASE_MASK); close_event_box.signal_button_release_event().connect (mem_fun (*this, &TearOff::close_click)); - close_event_box.set_tooltip_text (_("Click to put this back in the main window")); + close_event_box.set_tooltip_text (_("Click to put this back in the main window")); VBox* box1; box1 = manage (new VBox); @@ -78,8 +78,8 @@ TearOff::TearOff (Widget& c, bool allow_resize) own_window.signal_button_release_event().connect (mem_fun (*this, &TearOff::window_button_release)); own_window.signal_motion_notify_event().connect (mem_fun (*this, &TearOff::window_motion)); own_window.signal_delete_event().connect (mem_fun (*this, &TearOff::window_delete_event)); - own_window.signal_realize().connect (sigc::mem_fun (*this, &TearOff::own_window_realized)); - own_window.signal_configure_event().connect (sigc::mem_fun (*this, &TearOff::own_window_configured), false); + own_window.signal_realize().connect (sigc::mem_fun (*this, &TearOff::own_window_realized)); + own_window.signal_configure_event().connect (sigc::mem_fun (*this, &TearOff::own_window_configured), false); tearoff_arrow.set_name ("TearOffArrow"); close_arrow.set_name ("TearOffArrow"); @@ -135,7 +135,7 @@ TearOff::set_visible (bool yn, bool force) gint TearOff::tearoff_click (GdkEventButton* /*ev*/) { - tear_it_off (); + tear_it_off (); return true; } @@ -143,42 +143,42 @@ void TearOff::tear_it_off () { if (!_can_be_torn_off) { - return; - } - - if (torn_off()) { - return; - } - - remove (contents); - window_box.pack_start (contents); - own_window.set_name (get_name()); - close_event_box.set_name (get_name()); - if (own_window_width == 0) { - own_window.set_position (WIN_POS_MOUSE); - } - own_window.show_all (); - own_window.present (); - hide (); - - _torn = true; - - Detach (); + return; + } + + if (torn_off()) { + return; + } + + remove (contents); + window_box.pack_start (contents); + own_window.set_name (get_name()); + close_event_box.set_name (get_name()); + if (own_window_width == 0) { + own_window.set_position (WIN_POS_MOUSE); + } + own_window.show_all (); + own_window.present (); + hide (); + + _torn = true; + + Detach (); } gint TearOff::close_click (GdkEventButton* /*ev*/) { - put_it_back (); + put_it_back (); return true; } void TearOff::put_it_back () { - if (!torn_off()) { - return; - } + if (!torn_off()) { + return; + } window_box.remove (contents); pack_start (contents); @@ -186,7 +186,7 @@ TearOff::put_it_back () own_window.hide (); show_all (); - _torn = false; + _torn = false; Attach (); } @@ -309,35 +309,33 @@ TearOff::own_window_realized () { own_window.get_window()->set_decorations (WMDecoration (DECOR_BORDER|DECOR_RESIZEH)); - if (own_window_width > 0) { - own_window.set_default_size (own_window_width, own_window_height); - own_window.move (own_window_xpos, own_window_ypos); - } + if (own_window_width > 0) { + own_window.set_default_size (own_window_width, own_window_height); + own_window.move (own_window_xpos, own_window_ypos); + } } bool TearOff::own_window_configured (GdkEventConfigure*) { - Glib::RefPtr<const Gdk::Window> win; + Glib::RefPtr<const Gdk::Window> win; - win = own_window.get_window (); + win = own_window.get_window (); - if (win) { - win->get_size (own_window_width, own_window_height); - win->get_position (own_window_xpos, own_window_ypos); - } + if (win) { + win->get_size (own_window_width, own_window_height); + win->get_position (own_window_xpos, own_window_ypos); + } - return false; + return false; } void TearOff::hide_visible () { - if (torn_off()) { - own_window.hide (); - } + if (torn_off()) { + own_window.hide (); + } - hide (); + hide (); } - - diff --git a/libs/widgets/widgets/ardour_button.h b/libs/widgets/widgets/ardour_button.h index a51575e616..6630c19450 100644 --- a/libs/widgets/widgets/ardour_button.h +++ b/libs/widgets/widgets/ardour_button.h @@ -25,11 +25,11 @@ #include <gtkmm/action.h> #include "pbd/signals.h" -#include "gtkmm2ext/ardour_icon.h" -#include "gtkmm2ext/binding_proxy.h" #include "gtkmm2ext/activatable.h" #include "gtkmm2ext/cairo_widget.h" +#include "widgets/ardour_icon.h" +#include "widgets/binding_proxy.h" #include "widgets/visibility.h" namespace ArdourWidgets { @@ -80,8 +80,8 @@ class LIBWIDGETS_API ArdourButton : public CairoWidget , public Gtkmm2ext::Activ void set_elements (Element); void add_elements (Element); - Gtkmm2ext::ArdourIcon::Icon icon() const { return _icon; } - void set_icon (Gtkmm2ext::ArdourIcon::Icon); + ArdourIcon::Icon icon() const { return _icon; } + void set_icon (ArdourIcon::Icon); void set_icon (rendercallback_t, void*); void set_corner_radius (float); @@ -155,7 +155,7 @@ class LIBWIDGETS_API ArdourButton : public CairoWidget , public Gtkmm2ext::Activ std::string _sizing_text; bool _markup; Element _elements; - Gtkmm2ext::ArdourIcon::Icon _icon; + ArdourIcon::Icon _icon; rendercallback_t _icon_render_cb; void* _icon_render_cb_data; Tweaks _tweaks; diff --git a/libs/gtkmm2ext/gtkmm2ext/ardour_icon.h b/libs/widgets/widgets/ardour_icon.h index 255097d79a..c49c5b833a 100644 --- a/libs/gtkmm2ext/gtkmm2ext/ardour_icon.h +++ b/libs/widgets/widgets/ardour_icon.h @@ -1,11 +1,13 @@ -#ifndef _gtkmm2ext_ardour_icon_h_ -#define _gtkmm2ext_ardour_icon_h_ +#ifndef _WIDGETS_ARDOUR_ICON_H_ +#define _WIDGETS_ARDOUR_ICON_H_ #include <stdint.h> #include <cairo.h> + #include "gtkmm2ext/widget_state.h" +#include "widgets/visibility.h" -namespace Gtkmm2ext { namespace ArdourIcon { +namespace ArdourWidgets { namespace ArdourIcon { enum Icon { NoIcon, RecButton, @@ -38,11 +40,11 @@ namespace Gtkmm2ext { namespace ArdourIcon { ToolContent, }; - LIBGTKMM2EXT_API bool render (cairo_t *cr, - const enum Icon icon, - const int width, const int height, - const Gtkmm2ext::ActiveState state, - const uint32_t fg_color); -}; }; + LIBWIDGETS_API bool render (cairo_t *cr, + const enum Icon icon, + const int width, const int height, + const Gtkmm2ext::ActiveState state, + const uint32_t fg_color); +}; } /* end namespace */ #endif diff --git a/libs/widgets/widgets/ardour_knob.h b/libs/widgets/widgets/ardour_knob.h index 84bb974adf..c07b0447cb 100644 --- a/libs/widgets/widgets/ardour_knob.h +++ b/libs/widgets/widgets/ardour_knob.h @@ -26,11 +26,11 @@ #include "pbd/signals.h" -#include "gtkmm2ext/binding_proxy.h" #include "gtkmm2ext/activatable.h" #include "gtkmm2ext/cairo_widget.h" #include "gtkmm2ext/persistent_tooltip.h" +#include "widgets/binding_proxy.h" #include "widgets/visibility.h" namespace ArdourWidgets { diff --git a/libs/widgets/widgets/barcontroller.h b/libs/widgets/widgets/barcontroller.h index fc2ac358cc..5fdbae6f2f 100644 --- a/libs/widgets/widgets/barcontroller.h +++ b/libs/widgets/widgets/barcontroller.h @@ -22,7 +22,7 @@ #include <gtkmm/alignment.h> #include <cairo.h> -#include "gtkmm2ext/binding_proxy.h" +#include "widgets/binding_proxy.h" #include "widgets/slider_controller.h" #include "widgets/visibility.h" diff --git a/libs/gtkmm2ext/gtkmm2ext/binding_proxy.h b/libs/widgets/widgets/binding_proxy.h index 7108c46eb2..8ac49edb9f 100644 --- a/libs/gtkmm2ext/gtkmm2ext/binding_proxy.h +++ b/libs/widgets/widgets/binding_proxy.h @@ -14,28 +14,31 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - $Id$ */ -#ifndef __binding_proxy__ -#define __binding_proxy__ +#ifndef _WIDGETS_BINDING_PROXY_ +#define _WIDGETS_BINDING_PROXY_ #include <string> #include <boost/shared_ptr.hpp> #include "pbd/signals.h" -#include "gtkmm2ext/visibility.h" -#include "gtkmm2ext/popup.h" +#include "widgets/visibility.h" namespace PBD { class Controllable; } -class LIBGTKMM2EXT_API BindingProxy : public sigc::trackable +namespace ArdourWidgets { + class PopUp; +} + +namespace ArdourWidgets { + +class LIBWIDGETS_API BindingProxy : public sigc::trackable { - public: +public: BindingProxy (boost::shared_ptr<PBD::Controllable>); BindingProxy (); virtual ~BindingProxy(); @@ -48,8 +51,8 @@ class LIBGTKMM2EXT_API BindingProxy : public sigc::trackable boost::shared_ptr<PBD::Controllable> get_controllable() const { return controllable; } void set_controllable (boost::shared_ptr<PBD::Controllable>); - protected: - Gtkmm2ext::PopUp* prompter; +protected: + ArdourWidgets::PopUp* prompter; boost::shared_ptr<PBD::Controllable> controllable; static guint bind_button; @@ -60,4 +63,6 @@ class LIBGTKMM2EXT_API BindingProxy : public sigc::trackable bool prompter_hiding (GdkEventAny *); }; +} + #endif diff --git a/libs/gtkmm2ext/gtkmm2ext/choice.h b/libs/widgets/widgets/choice.h index 3a888f2b9d..a33c93ae00 100644 --- a/libs/gtkmm2ext/gtkmm2ext/choice.h +++ b/libs/widgets/widgets/choice.h @@ -17,30 +17,31 @@ */ -#ifndef __pbd_gtkmm_choice_h__ -#define __pbd_gtkmm_choice_h__ +#ifndef _WIDGETS_CHOICE_H_ +#define _WIDGETS_CHOICE_H_ + +#include <string> +#include <vector> #include <gtkmm/dialog.h> #include <gtkmm/image.h> #include <gtkmm/stock.h> #include <gtkmm/box.h> -#include <string> -#include <vector> -#include "gtkmm2ext/visibility.h" +#include "widgets/visibility.h" -namespace Gtkmm2ext { +namespace ArdourWidgets { -class LIBGTKMM2EXT_API Choice : public Gtk::Dialog +class LIBWIDGETS_API Choice : public Gtk::Dialog { - public: +public: Choice (std::string title, std::string prompt, std::vector<std::string> choices, bool center = true); virtual ~Choice (); - protected: +protected: void on_realize (); }; } /* namespace */ -#endif // __pbd_gtkmm_choice_h__ +#endif diff --git a/libs/widgets/widgets/click_box.h b/libs/widgets/widgets/click_box.h index fa4868467f..c83db83858 100644 --- a/libs/widgets/widgets/click_box.h +++ b/libs/widgets/widgets/click_box.h @@ -27,9 +27,8 @@ #include <string> #include <gtkmm.h> -#include "gtkmm2ext/binding_proxy.h" - #include "widgets/auto_spin.h" +#include "widgets/binding_proxy.h" #include "widgets/visibility.h" namespace PBD { diff --git a/libs/gtkmm2ext/gtkmm2ext/eventboxext.h b/libs/widgets/widgets/eventboxext.h index a1a53fbdfa..3e7402f3d3 100644 --- a/libs/gtkmm2ext/gtkmm2ext/eventboxext.h +++ b/libs/widgets/widgets/eventboxext.h @@ -16,16 +16,16 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#ifndef __gtkmm2ext_eventbox_ext_h__ -#define __gtkmm2ext_eventbox_ext_h__ +#ifndef _WIDGETS_EVENTBOX_EXT_H_ +#define _WIDGETS_EVENTBOX_EXT_H_ #include <gtkmm/eventbox.h> -#include "gtkmm2ext/visibility.h" +#include "widgets/visibility.h" -namespace Gtkmm2ext { +namespace ArdourWidgets { -class LIBGTKMM2EXT_API EventBoxExt : public Gtk::EventBox +class LIBWIDGETS_API EventBoxExt : public Gtk::EventBox { public: EventBoxExt (); diff --git a/libs/gtkmm2ext/gtkmm2ext/pane.h b/libs/widgets/widgets/pane.h index 88eb82041b..bc971e6802 100644 --- a/libs/gtkmm2ext/gtkmm2ext/pane.h +++ b/libs/widgets/widgets/pane.h @@ -17,8 +17,8 @@ */ -#ifndef __libgtkmm2ext_pane_h__ -#define __libgtkmm2ext_pane_h__ +#ifndef _WIDGETS_PANE_H_ +#define _WIDGETS_PANE_H_ #include <vector> #include <algorithm> @@ -30,21 +30,20 @@ #include <gtkmm/container.h> #include <gtkmm/eventbox.h> -#include "gtkmm2ext/visibility.h" +#include "widgets/visibility.h" namespace Gtk { class Widget; } -namespace Gtkmm2ext { +namespace ArdourWidgets { -class LIBGTKMM2EXT_API Pane : public Gtk::Container +class LIBWIDGETS_API Pane : public Gtk::Container { - private: +private: class Divider; - - public: +public: struct Child { Pane* pane; @@ -70,7 +69,7 @@ class LIBGTKMM2EXT_API Pane : public Gtk::Container void set_check_divider_position (bool); - protected: +protected: bool horizontal; void on_add (Gtk::Widget*); @@ -87,7 +86,7 @@ class LIBGTKMM2EXT_API Pane : public Gtk::Container void forall_vfunc (gboolean include_internals, GtkCallback callback, gpointer callback_data); - private: +private: Gdk::Cursor drag_cursor; bool did_move; @@ -117,13 +116,13 @@ class LIBGTKMM2EXT_API Pane : public Gtk::Container void* child_destroyed (Gtk::Widget*); }; -class LIBGTKMM2EXT_API HPane : public Pane +class LIBWIDGETS_API HPane : public Pane { public: HPane () : Pane (true) {} }; -class LIBGTKMM2EXT_API VPane : public Pane +class LIBWIDGETS_API VPane : public Pane { public: VPane () : Pane (false) {} @@ -131,4 +130,4 @@ class LIBGTKMM2EXT_API VPane : public Pane } /* namespace */ -#endif /* __libgtkmm2ext_pane_h__ */ +#endif diff --git a/libs/gtkmm2ext/gtkmm2ext/paths_dialog.h b/libs/widgets/widgets/paths_dialog.h index 120d037a27..8757c8b032 100644 --- a/libs/gtkmm2ext/gtkmm2ext/paths_dialog.h +++ b/libs/widgets/widgets/paths_dialog.h @@ -16,26 +16,26 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#ifndef __gtkmmext_paths_dialog_h__ -#define __gtkmmext_paths_dialog_h__ +#ifndef _WIDGETS_PATHS_DIALOG_H_ +#define _WIDGETS_PATHS_DIALOG_H_ #include <string> #include <vector> #include <gtkmm.h> -#include "gtkmm2ext/visibility.h" +#include "widgets/visibility.h" -namespace Gtkmm2ext { +namespace ArdourWidgets { -class LIBGTKMM2EXT_API PathsDialog : public Gtk::Dialog +class LIBWIDGETS_API PathsDialog : public Gtk::Dialog { - public: +public: PathsDialog (Gtk::Window& parent, std::string, std::string current_paths = "", std::string default_paths = ""); ~PathsDialog (); std::string get_serialized_paths (); - private: +private: void on_show (); Gtk::ListViewText paths_list_view; @@ -54,4 +54,4 @@ class LIBGTKMM2EXT_API PathsDialog : public Gtk::Dialog } /* namespace */ -#endif /* __gtkmmext_paths_dialog_h__ */ +#endif diff --git a/libs/gtkmm2ext/gtkmm2ext/popup.h b/libs/widgets/widgets/popup.h index 043c563605..769a1a56fd 100644 --- a/libs/gtkmm2ext/gtkmm2ext/popup.h +++ b/libs/widgets/widgets/popup.h @@ -17,8 +17,8 @@ */ -#ifndef __qui_popup_h__ -#define __qui_popup_h__ +#ifndef _WIDGETS_POPUP_H_ +#define _WIDGETS_POPUP_H_ #ifdef interface #undef interface @@ -29,13 +29,13 @@ #include <pbd/touchable.h> -#include "gtkmm2ext/visibility.h" +#include "widgets/visibility.h" -namespace Gtkmm2ext { +namespace ArdourWidgets { -class LIBGTKMM2EXT_API PopUp : public Gtk::Window, public Touchable +class LIBWIDGETS_API PopUp : public Gtk::Window, public Touchable { - public: +public: PopUp (Gtk::WindowPosition pos, unsigned int show_for_msecs = 0, bool delete_on_hide = false); virtual ~PopUp (); @@ -47,19 +47,18 @@ class LIBGTKMM2EXT_API PopUp : public Gtk::Window, public Touchable bool on_delete_event (GdkEventAny* ); - protected: +protected: void on_realize (); - private: +private: Gtk::Label label; std::string my_text; gint timeout; static gint remove_prompt_timeout (void *); bool delete_on_hide; unsigned int popdown_time; - }; } /* namespace */ -#endif // __qui_popup_h__ +#endif diff --git a/libs/gtkmm2ext/gtkmm2ext/prompter.h b/libs/widgets/widgets/prompter.h index 59bad4b998..064a9e4b29 100644 --- a/libs/gtkmm2ext/gtkmm2ext/prompter.h +++ b/libs/widgets/widgets/prompter.h @@ -17,8 +17,8 @@ */ -#ifndef __gtkmm2ext_prompter_h__ -#define __gtkmm2ext_prompter_h__ +#ifndef _WIDGETS_PROMPTER_H_ +#define _WIDGETS_PROMPTER_H_ #include <string> #include <gtkmm/box.h> @@ -27,18 +27,17 @@ #include <gtkmm/dialog.h> #include <sigc++/sigc++.h> -#include "gtkmm2ext/visibility.h" +#include "widgets/visibility.h" namespace Gtk { class Window; } -namespace Gtkmm2ext { - -class LIBGTKMM2EXT_API Prompter : public Gtk::Dialog +namespace ArdourWidgets { +class LIBWIDGETS_API Prompter : public Gtk::Dialog { - public: +public: Prompter (bool modal = false); Prompter (Gtk::Window& parent, bool modal = false); ~Prompter () {}; @@ -56,13 +55,13 @@ class LIBGTKMM2EXT_API Prompter : public Gtk::Dialog void get_result (std::string &str, bool strip=true); - protected: +protected: Gtk::Entry& the_entry() { return entry; } void on_entry_changed (); void on_show (); - private: +private: Gtk::Entry entry; Gtk::HBox entryBox; Gtk::Label entryLabel; @@ -75,4 +74,4 @@ class LIBGTKMM2EXT_API Prompter : public Gtk::Dialog } /* namespace */ -#endif /* __gtkmm2ext_prompter_h__ */ +#endif diff --git a/libs/gtkmm2ext/gtkmm2ext/scroomer.h b/libs/widgets/widgets/scroomer.h index 4d957b4868..c4c3cd3ade 100644 --- a/libs/gtkmm2ext/gtkmm2ext/scroomer.h +++ b/libs/widgets/widgets/scroomer.h @@ -17,18 +17,18 @@ */ -#ifndef __gtkmm2ext_scroomer_h__ -#define __gtkmm2ext_scroomer_h__ +#ifndef _WIDGETS_SCROOMER_H_ +#define _WIDGETS_SCROOMER_H_ +#include <gdkmm.h> #include <gtkmm/drawingarea.h> #include <gtkmm/adjustment.h> -#include <gdkmm.h> -#include "gtkmm2ext/visibility.h" +#include "widgets/visibility.h" -namespace Gtkmm2ext { +namespace ArdourWidgets { -class LIBGTKMM2EXT_API Scroomer : public Gtk::DrawingArea +class LIBWIDGETS_API Scroomer : public Gtk::DrawingArea { public: enum Component { @@ -88,6 +88,6 @@ private: bool pinch; }; -} // namespace +} /* end namespace */ -#endif /* __gtkmm2ext_scroomer_h__ */ +#endif diff --git a/libs/widgets/widgets/slider_controller.h b/libs/widgets/widgets/slider_controller.h index e80e76d7bc..f8414ce4b4 100644 --- a/libs/widgets/widgets/slider_controller.h +++ b/libs/widgets/widgets/slider_controller.h @@ -26,10 +26,8 @@ #include <gtkmm.h> #include <boost/shared_ptr.hpp> -#include "gtkmm2ext/popup.h" -#include "gtkmm2ext/binding_proxy.h" - #include "widgets/ardour_fader.h" +#include "widgets/binding_proxy.h" #include "widgets/visibility.h" namespace PBD { diff --git a/libs/gtkmm2ext/gtkmm2ext/stateful_button.h b/libs/widgets/widgets/stateful_button.h index 63d6890df4..6bbbf6f7f0 100644 --- a/libs/gtkmm2ext/gtkmm2ext/stateful_button.h +++ b/libs/widgets/widgets/stateful_button.h @@ -17,20 +17,20 @@ */ -#ifndef __pbd_gtkmm_abutton_h__ -#define __pbd_gtkmm_abutton_h__ +#ifndef _WIDGETS_STATEFUL_BUTTON_H_ +#define _WIDGETS_STATEFUL_BUTTON_H_ #include <vector> #include <gtkmm/togglebutton.h> -#include "gtkmm2ext/visibility.h" +#include "widgets/visibility.h" -namespace Gtkmm2ext { +namespace ArdourWidgets { -class LIBGTKMM2EXT_API StateButton +class LIBWIDGETS_API StateButton { - public: +public: StateButton(); virtual ~StateButton() {} @@ -39,57 +39,57 @@ class LIBGTKMM2EXT_API StateButton void set_self_managed (bool yn) { _self_managed = yn; } virtual void set_widget_name (const std::string& name) = 0; - protected: +protected: int visual_state; bool _self_managed; bool _is_realized; - bool style_changing; - Gtk::StateType state_before_prelight; - bool is_toggle; + bool style_changing; + Gtk::StateType state_before_prelight; + bool is_toggle; virtual std::string get_widget_name() const = 0; - virtual Gtk::Widget* get_child_widget () = 0; + virtual Gtk::Widget* get_child_widget () = 0; - void avoid_prelight_on_style_changed (const Glib::RefPtr<Gtk::Style>& style, GtkWidget* widget); - void avoid_prelight_on_state_changed (Gtk::StateType old_state, GtkWidget* widget); + void avoid_prelight_on_style_changed (const Glib::RefPtr<Gtk::Style>& style, GtkWidget* widget); + void avoid_prelight_on_state_changed (Gtk::StateType old_state, GtkWidget* widget); }; -class LIBGTKMM2EXT_API StatefulToggleButton : public StateButton, public Gtk::ToggleButton +class LIBWIDGETS_API StatefulToggleButton : public StateButton, public Gtk::ToggleButton { - public: +public: StatefulToggleButton(); explicit StatefulToggleButton(const std::string &label); ~StatefulToggleButton() {} void set_widget_name (const std::string& name); - protected: +protected: void on_realize (); void on_toggled (); - void on_style_changed (const Glib::RefPtr<Gtk::Style>& style); - void on_state_changed (Gtk::StateType old_state); + void on_style_changed (const Glib::RefPtr<Gtk::Style>& style); + void on_state_changed (Gtk::StateType old_state); - Gtk::Widget* get_child_widget (); + Gtk::Widget* get_child_widget (); std::string get_widget_name() const { return get_name(); } }; -class LIBGTKMM2EXT_API StatefulButton : public StateButton, public Gtk::Button +class LIBWIDGETS_API StatefulButton : public StateButton, public Gtk::Button { - public: +public: StatefulButton(); explicit StatefulButton(const std::string &label); virtual ~StatefulButton() {} void set_widget_name (const std::string& name); - protected: +protected: void on_realize (); - void on_style_changed (const Glib::RefPtr<Gtk::Style>& style); - void on_state_changed (Gtk::StateType old_state); + void on_style_changed (const Glib::RefPtr<Gtk::Style>& style); + void on_state_changed (Gtk::StateType old_state); - Gtk::Widget* get_child_widget (); + Gtk::Widget* get_child_widget (); std::string get_widget_name() const { return get_name(); } }; -}; +} /* end namespace */ #endif diff --git a/libs/gtkmm2ext/gtkmm2ext/tabbable.h b/libs/widgets/widgets/tabbable.h index 12363ccbe1..cb4cb1eaa9 100644 --- a/libs/gtkmm2ext/gtkmm2ext/tabbable.h +++ b/libs/widgets/widgets/tabbable.h @@ -17,8 +17,8 @@ */ -#ifndef __gtkmm2ext_tabbable_h__ -#define __gtkmm2ext_tabbable_h__ +#ifndef _WIDGETS_TABBABLE_H_ +#define _WIDGETS_TABBABLE_H_ #include <gtkmm/bin.h> #include <gtkmm/box.h> @@ -28,7 +28,7 @@ #include <gtkmm/notebook.h> #include "gtkmm2ext/window_proxy.h" -#include "gtkmm2ext/visibility.h" +#include "widgets/visibility.h" namespace Gtk { class Window; @@ -36,11 +36,14 @@ namespace Gtk { } namespace Gtkmm2ext { + class VisibilityTracker; +} -class VisibilityTracker; +namespace ArdourWidgets { -class LIBGTKMM2EXT_API Tabbable : public WindowProxy { - public: +class LIBWIDGETS_API Tabbable : public Gtkmm2ext::WindowProxy +{ +public: Tabbable (Gtk::Widget&, const std::string&, bool tabbed_by_default = true); ~Tabbable (); @@ -76,10 +79,10 @@ class LIBGTKMM2EXT_API Tabbable : public WindowProxy { sigc::signal1<void,Tabbable&> StateChange; - protected: +protected: bool delete_event_handler (GdkEventAny *ev); - private: +private: Gtk::Widget& _contents; Gtk::Notebook _own_notebook; Gtk::Notebook* _parent_notebook; @@ -94,7 +97,6 @@ class LIBGTKMM2EXT_API Tabbable : public WindowProxy { void window_unmapped (); }; - -} +} /* end namespace */ #endif diff --git a/libs/gtkmm2ext/gtkmm2ext/tearoff.h b/libs/widgets/widgets/tearoff.h index be5c45d544..6b4dc77634 100644 --- a/libs/gtkmm2ext/gtkmm2ext/tearoff.h +++ b/libs/widgets/widgets/tearoff.h @@ -17,23 +17,23 @@ */ -#ifndef __gtkmm2ext_tearoff_h__ -#define __gtkmm2ext_tearoff_h__ +#ifndef _WIDGETS_TEAROFF_H_ +#define _WIDGETS_TEAROFF_H_ -#include <gtkmm/window.h> #include <gtkmm/arrow.h> #include <gtkmm/box.h> #include <gtkmm/eventbox.h> +#include <gtkmm/window.h> -#include "gtkmm2ext/visibility.h" +#include "widgets/visibility.h" class XMLNode; -namespace Gtkmm2ext { +namespace ArdourWidgets { -class LIBGTKMM2EXT_API TearOff : public Gtk::HBox +class LIBWIDGETS_API TearOff : public Gtk::HBox { - public: +public: TearOff (Gtk::Widget& contents, bool allow_resize = false); virtual ~TearOff (); @@ -49,14 +49,14 @@ class LIBGTKMM2EXT_API TearOff : public Gtk::HBox Gtk::Window& tearoff_window() { return own_window; } bool torn_off() const; - void tear_it_off (); - void put_it_back (); - void hide_visible (); + void tear_it_off (); + void put_it_back (); + void hide_visible (); - void set_state (const XMLNode&); - void add_state (XMLNode&) const; + void set_state (const XMLNode&); + void add_state (XMLNode&) const; - private: +private: Gtk::Widget& contents; Gtk::Window own_window; Gtk::Arrow tearoff_arrow; @@ -70,10 +70,10 @@ class LIBGTKMM2EXT_API TearOff : public Gtk::HBox bool _visible; bool _torn; bool _can_be_torn_off; - int own_window_width; - int own_window_height; - int own_window_xpos; - int own_window_ypos; + int own_window_width; + int own_window_height; + int own_window_xpos; + int own_window_ypos; gint tearoff_click (GdkEventButton*); gint close_click (GdkEventButton*); @@ -83,10 +83,10 @@ class LIBGTKMM2EXT_API TearOff : public Gtk::HBox gint window_button_release (GdkEventButton*); gint window_delete_event (GdkEventAny*); - void own_window_realized (); - bool own_window_configured (GdkEventConfigure*); + void own_window_realized (); + bool own_window_configured (GdkEventConfigure*); }; } /* namespace */ -#endif // __gtkmm2ext_tearoff_h__ +#endif diff --git a/libs/widgets/wscript b/libs/widgets/wscript index dd2ee9587b..cf274e418c 100644 --- a/libs/widgets/wscript +++ b/libs/widgets/wscript @@ -30,16 +30,28 @@ widgets_sources = [ 'ardour_display.cc', 'ardour_dropdown.cc', 'ardour_fader.cc', + 'ardour_icon.cc', 'ardour_knob.cc', 'ardour_spacer.cc', 'ardour_spinner.cc', 'auto_spin.cc', 'barcontroller.cc', + 'binding_proxy.cc', + 'eventboxext.cc', + 'choice.cc', 'click_box.cc', 'fastmeter.cc', 'focus_entry.cc', + 'pane.cc', + 'paths_dialog.cc', + 'popup.cc', + 'prompter.cc', + 'scroomer.cc', 'searchbar.cc', 'slider_controller.cc', + 'stateful_button.cc', + 'tabbable.cc', + 'tearoff.cc', 'tooltips.cc', 'ui_config.cc', ] |