X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Fadd_route_dialog.h;h=eb38338f1f73d8ab8721a56484ddf85567a884ce;hb=dac57703ccd7205ac94c14b407b802a69f4187f1;hp=52cb70a5daf8e8b7eeda0e43396954c6164a879a;hpb=e0aaed6d65f160c328cb8b56d7c6552ee15d65e2;p=ardour.git diff --git a/gtk2_ardour/add_route_dialog.h b/gtk2_ardour/add_route_dialog.h index 52cb70a5da..eb38338f1f 100644 --- a/gtk2_ardour/add_route_dialog.h +++ b/gtk2_ardour/add_route_dialog.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2000-2007 Paul Davis + Copyright (C) 2000-2007 Paul Davis This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -29,36 +29,95 @@ #include #include #include +#include #include +#include +#include +#include "ardour/plugin.h" #include "ardour/types.h" -#include "ardour/data_type.h" +#include "ardour/template_utils.h" -class AddRouteDialog : public Gtk::Dialog +#include "ardour_dialog.h" +#include "instrument_selector.h" + +class Editor; + +class AddRouteDialog : public ArdourDialog { public: AddRouteDialog (); ~AddRouteDialog (); - bool track (); - ARDOUR::DataType type(); - std::string name_template (); - int channels (); + enum TypeWanted { + AudioTrack, + MidiTrack, + MixedTrack, + AudioBus + }; + TypeWanted type_wanted() const; + + ARDOUR::ChanCount channels (); int count (); + + std::string name_template () const; + bool name_template_is_default () const; + std::string track_template (); + ARDOUR::PluginInfoPtr requested_instrument (); + ARDOUR::TrackMode mode(); + ARDOUR::RouteGroup* route_group (); + enum InsertAt { + BeforeSelection, + AfterSelection, + First, + Last + }; + InsertAt insert_at(); private: Gtk::Entry name_template_entry; - Gtk::RadioButton track_button; - Gtk::RadioButton bus_button; + Gtk::ComboBoxText track_bus_combo; Gtk::Adjustment routes_adjustment; Gtk::SpinButton routes_spinner; Gtk::ComboBoxText channel_combo; - Gtk::ComboBoxText track_mode_combo; - Gtk::Frame aframe; - Gtk::Frame ccframe; + Gtk::Label configuration_label; + Gtk::Label mode_label; + Gtk::Label instrument_label; + Gtk::ComboBoxText mode_combo; + Gtk::ComboBoxText route_group_combo; + InstrumentSelector instrument_combo; + Gtk::Label insert_at_label; + Gtk::ComboBoxText insert_at_combo; + + std::vector route_templates; void track_type_chosen (); + void refill_channel_setups (); + void refill_route_groups (); + void refill_track_modes (); + void add_route_group (ARDOUR::RouteGroup *); + void group_changed (); + void channel_combo_changed (); + bool channel_separator (const Glib::RefPtr &m, const Gtk::TreeModel::iterator &i); + bool route_separator (const Glib::RefPtr &m, const Gtk::TreeModel::iterator &i); + void maybe_update_name_template_entry (); + + void reset_template_option_visibility (); + + void on_show (); + + struct ChannelSetup { + std::string name; + std::string template_path; + uint32_t channels; + }; + + typedef std::vector ChannelSetups; + ChannelSetups channel_setups; + + static std::vector channel_combo_strings; + static std::vector bus_mode_strings; }; #endif /* __gtk_ardour_add_route_dialog_h__ */