|
KiCad PCB EDA Suite
|
#include <kicommon.h>#include <eda_units.h>#include <kiway_holder.h>#include <wx/dialog.h>#include <map>#include <set>#include <vector>#include <wx/variant.h>#include <core/raii.h>Go to the source code of this file.
Classes | |
| class | DIALOG_SHIM |
| Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormBuilder. More... | |
| struct | DIALOG_SHIM::UNDO_STEP |
Functions | |
| KICOMMON_API wxRect | ClampRectToDisplay (const wxRect &aRect, const wxRect &aClientArea) |
| Constrain a window rectangle so it fits entirely within a display's client area. | |
| KICOMMON_API wxRect ClampRectToDisplay | ( | const wxRect & | aRect, |
| const wxRect & | aClientArea ) |
Constrain a window rectangle so it fits entirely within a display's client area.
The size is capped to the client area, then the top-left corner is pulled back so the whole rectangle is visible (the corner is preferred over the bottom-right edge so the title bar stays reachable). Used to tame geometry restored from a different, possibly higher-DPI, monitor that would otherwise land off-screen or oversized.
| aRect | The window rectangle to constrain, in screen coordinates. |
| aClientArea | The target display's client (work) area, in screen coordinates. |
Definition at line 352 of file dialog_shim.cpp.
Referenced by DIALOG_SHIM::clampToWorkArea().