You can get the currently selected tab index using:
.f.nb index current
This is documented on the manual page (it's the index method and the current tabid).
To get the slave widget which is managed by a particular tab, you index into the results of the tabs method. Overall, you get:
set currentSubwindow [lindex [.f.nb tabs] [.f.nb index current]]