X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Flocation_ui.h;h=3be45dc3291039d59e5a191bd8ab3a9f8a1a1bd5;hb=af2ee3c8564c7d60cadb130b8c7ad1f4cddd2216;hp=cdbc952e6c11821cbf6bacb727d0a112b3367363;hpb=91a95b086aa38477dc57f7ffc3466e38aa218d9f;p=ardour.git diff --git a/gtk2_ardour/location_ui.h b/gtk2_ardour/location_ui.h index cdbc952e6c..3be45dc329 100644 --- a/gtk2_ardour/location_ui.h +++ b/gtk2_ardour/location_ui.h @@ -47,7 +47,7 @@ class ClockGroup; class LocationEditRow : public Gtk::HBox, public ARDOUR::SessionHandlePtr { - public: +public: LocationEditRow (ARDOUR::Session *sess=0, ARDOUR::Location *loc=0, int32_t num=-1); virtual ~LocationEditRow(); @@ -58,13 +58,13 @@ class LocationEditRow : public Gtk::HBox, public ARDOUR::SessionHandlePtr void set_number (int); void focus_name(); - void set_clock_group (ClockGroup&); - void unset_clock_group () { _clock_group = 0; } + void set_clock_group (ClockGroup&); + void unset_clock_group () { _clock_group = 0; } sigc::signal remove_requested; sigc::signal redraw_ranges; - protected: +protected: enum LocationPart { LocStart, @@ -106,12 +106,12 @@ class LocationEditRow : public Gtk::HBox, public ARDOUR::SessionHandlePtr Gtk::Label performer_label; Gtk::Entry performer_entry; Gtk::Label composer_label; - Gtk::Entry composer_entry; + Gtk::Entry composer_entry; Gtk::CheckButton scms_check_button; Gtk::Label scms_label; Gtk::CheckButton preemph_check_button; Gtk::Label preemph_label; - ClockGroup* _clock_group; + ClockGroup* _clock_group; guint32 i_am_the_modifier; int number; @@ -152,12 +152,12 @@ class LocationEditRow : public Gtk::HBox, public ARDOUR::SessionHandlePtr class LocationUI : public Gtk::HBox, public ARDOUR::SessionHandlePtr { - public: - LocationUI (); +public: + LocationUI (std::string state_node_name = "LocationUI"); ~LocationUI (); void set_session (ARDOUR::Session *); - void set_clock_mode (AudioClock::Mode); + void set_clock_mode (AudioClock::Mode); void add_new_location(); void add_new_range(); @@ -165,8 +165,9 @@ class LocationUI : public Gtk::HBox, public ARDOUR::SessionHandlePtr void refresh_location_list (); XMLNode & get_state () const; + int set_state (const XMLNode&); - private: +private: /** set to the location that has just been created with the LocationUI `add' button (if Config->get_name_new_markers() is true); if it is non-0, the name entry of the location is given the focus by location_added(). @@ -208,13 +209,18 @@ class LocationUI : public Gtk::HBox, public ARDOUR::SessionHandlePtr void location_added (ARDOUR::Location *); void map_locations (const ARDOUR::Locations::LocationList&); - ClockGroup* _clock_group; - AudioClock::Mode clock_mode_from_session_instant_xml () const; + ClockGroup* _clock_group; + AudioClock::Mode clock_mode_from_session_instant_xml (); + + AudioClock::Mode _mode; + bool _mode_set; + + std::string _state_node_name; }; class LocationUIWindow : public ArdourWindow { - public: +public: LocationUIWindow (); ~LocationUIWindow (); @@ -223,7 +229,7 @@ class LocationUIWindow : public ArdourWindow LocationUI& ui() { return _ui; } - protected: +protected: LocationUI _ui; bool on_delete_event (GdkEventAny*); void session_going_away();