I'm writing my own beamer theme, I had some fancy idea to layout my header in beamer class: I progress bar on top and below the sections corresponding to the slides where they start, namely:
----------
Section 1
The progress bar is designed as follows:
\progressbar{\footerBarHeight}
\dimen0=\textwidth
\multiply\dimen0 by \insertframenumber
\divide\dimen0 by \inserttotalframenumber
\edef\progressbarwidth{\the\dimen0}
\leavevmode%
\begin{beamercolorbox}[wd=\textwidth,ht=.1ex,dp=.1ex]{progress bar}
\begin{beamercolorbox}[wd=\progressbarwidth,ht=.1ex,dp=.1ex]{progress bar progress}
\end{beamercolorbox}%
\end{beamercolorbox}%
So, my idea was to use the data in the .toc-file
\beamer@sectionintoc {1}{Section 1}{2}{0}{1}
\defcounter {refsection}{0}\relax
\beamer@subsectionintoc {1}{1}{Subsection 1.1}{7}{0}{1}
\defcounter {refsection}{0}\relax
\beamer@subsectionintoc {1}{2}{Subsection 1.2}{10}{0}{1}
\defcounter {refsection}{0}\relax
\beamer@sectionintoc {2}{Section 2}{13}{0}{2}
\defcounter {refsection}{0}\relax
\beamer@sectionintoc {3}{Section 3}{22}{0}{3}
that provides the page number where the section starts and compare this with (e.g. \insertframenumber) to align & print the three section title by \insertsection.
My questions:
(1) Can I use this data? Is there any variable already defined in beamer to get the page number of the @sectionintoc?
(2) Is there an easier way just to print all three section titles? (Maybe iterate modulo something).

\getrefnumberfrom therefcountpackage (which is loaded most likely anyways, sincebeameruseshyperrefby default) – Dec 30 '16 at 23:27