rework dialog-close-focus-reset change to work in Tabbed
[ardour.git] / gtk2_ardour / tempo_dialog.h
index 9e97afa98db767454850c8fb5a3ac3b37472a21f..06c5db196da0545aaff24a39b890a412fb7e2642 100644 (file)
@@ -47,18 +47,23 @@ public:
 
 private:
        void init (const Timecode::BBT_Time& start, double, double, bool);
+       bool is_user_input_valid() const;
        void bpm_changed ();
        bool bpm_button_press (GdkEventButton* );
        bool bpm_button_release (GdkEventButton* );
        bool entry_key_release (GdkEventKey* );
        void pulse_change ();
-       void tap_tempo ();
+       bool tap_tempo_button_press (GdkEventButton* );
+       bool tap_tempo_focus_out (GdkEventFocus* );
 
        typedef std::map<std::string,float> NoteTypes;
        NoteTypes note_types;
 
-       struct timeval last_tap;
-       double average_interval;
+       bool tapped;      // whether the tap-tempo button has been clicked
+       double sum_x, sum_xx, sum_xy, sum_y;
+       double tap_count;
+       double last_t;
+       gint64 first_t;
 
        Gtk::ComboBoxText pulse_selector;
        Gtk::Adjustment   bpm_adjustment;
@@ -84,6 +89,7 @@ public:
 
 private:
        void init (const Timecode::BBT_Time&, double, double, bool);
+       bool is_user_input_valid() const;
        bool entry_key_press (GdkEventKey* );
        bool entry_key_release (GdkEventKey* );
        void note_type_change ();