|
wxMaxima
|
This class generates a pane containing the last commands that were issued. More...
#include <ButtonWrapSizer.h>
Public Member Functions | |
| Buttonwrapsizer (int orient=wxHORIZONTAL) | |
| int | HeightForWidth (int width) const |
| The height the buttons need when wrapped into rows at the given width. | |
Protected Member Functions | |
| virtual wxSize | CalcMin () override |
This class generates a pane containing the last commands that were issued.
| int Buttonwrapsizer::HeightForWidth | ( | int | width | ) | const |
The height the buttons need when wrapped into rows at the given width.
wxWrapSizer reports a deliberately small "min" size (so lines can be rearranged), which does not tell a wxScrolled parent how tall the wrapped content really is at a particular width. This computes it directly (rows = ceil(shown buttons / buttons that fit per row) * button height), so the parent can give its vertical scrollbar the range to reach every wrapped row rather than clamping the height and clipping the rows below the first.