Ensuring visibility of widgets in a peephole

peepholelayoutmanager.C's second peephole is a plain peephole without the scroll-bars. Repeatedly Tabbing eventually advances the keyboard input focus to each button in the peephole, with the peephole trying to keep the button with the keyboard input focus visible.

ensure_entire_visibility() requests that a peephole make the specified widget visible:

x::w::button b=glm->get(0, which);


Clicking on the peepholelayoutmanager.C's Flip button, located below the plain peephole, alternatively makes the plain peephole's first and last button visible. The Flip button's callback obtains, alternatively, the first or the last button in the second peephole; then calls the button's ensure_entire_visibility(). This manually moves the peephole so that this button is visible, if it's not already visible.