|
wxMaxima
|
Implements LimitFloatingPaneHeight(); see FloatingPaneHeight.h. More...
#include "FloatingPaneHeight.h"#include <wx/aui/framemanager.h>#include <wx/aui/floatpane.h>#include <algorithm>Functions | |
| void | LimitFloatingPaneHeight (wxWindow *paneWindow, int contentHeight) |
| Don't let the window a floating sidebar floats in grow higher than needed. | |
Implements LimitFloatingPaneHeight(); see FloatingPaneHeight.h.
| void LimitFloatingPaneHeight | ( | wxWindow * | paneWindow, |
| int | contentHeight | ||
| ) |
Don't let the window a floating sidebar floats in grow higher than needed.
A sidebar that wxAUI floats lives in a wxAuiFloatingFrame of its own, which the user can resize freely. For a sidebar whose contents have a natural height (the find/replace pane, the wizard) any height beyond that only adds empty space, so this caps the frame's height at what shows contentHeight pixels of paneWindow, and shrinks the frame if it is higher than that already. The width stays free.
Does nothing while paneWindow is docked, i.e. is not the child of a floating frame. Call it whenever the pane may have been floated or its contents may have changed height; calling it again with the same height changes nothing, so it is safe to call from the pane's size event handler.