Add column headings and length field to export timespan selector. Fixes #3518.
[ardour.git] / libs / ardour / ardour / bbt_time.h
index 76e91d575207ca329cc3f4af897fa04fe979c20d..2157e794a245127b6f68b5ced823ed7f9ed9472b 100644 (file)
@@ -22,6 +22,7 @@
 
 #include <ostream>
 #include <stdint.h>
+#include <iomanip>
 
 namespace ARDOUR {
 
@@ -59,4 +60,15 @@ operator<< (std::ostream& o, const ARDOUR::BBT_Time& bbt)
        return o;
 }
 
+inline std::ostream&
+print_padded (std::ostream& o, const ARDOUR::BBT_Time& bbt)
+{
+       o << std::setfill ('0') << std::right
+         << std::setw (3) << bbt.bars << "|"
+         << std::setw (2) << bbt.beats << "|"
+         << std::setw (4) << bbt.ticks;
+
+       return o;
+}
+
 #endif /* __ardour_bbt_time_h__ */