LibreOffice Module vcl (master) 1
|
There are multiple ways to store the two different areas of a vcl::Window. More...
#include <WindowPosSize.hxx>
Public Member Functions | |
constexpr sal_Int32 | x () const |
void | setX (sal_Int32 nX) |
constexpr sal_Int32 | y () const |
void | setY (sal_Int32 nY) |
constexpr Point | pos () const |
void | setPos (const Point &aPos) |
void | move (sal_Int32 nDX, sal_Int32 nDY) |
constexpr sal_Int32 | width () const |
void | setWidth (sal_Int32 nWidth) |
constexpr sal_Int32 | height () const |
void | setHeight (sal_Int32 nHeight) |
constexpr Size | size () const |
void | setSize (const Size &rSize) |
constexpr tools::Rectangle | posSize () const |
void | setPosSize (const tools::Rectangle &rRect) |
void | setPosSize (const Point &rPos, const Size &rSize) |
Protected Member Functions | |
WindowPosSize () | |
Private Attributes | |
sal_Int32 | m_nX |
sal_Int32 | m_nY |
sal_Int32 | m_nWidth |
sal_Int32 | m_nHeight |
There are multiple ways to store the two different areas of a vcl::Window.
But this representation is hopefully less error prone from the used types and more clear in what values in- or exclude the non-drawable window frame.
There are especially two things to remember:
So these values actually don't represent any "real" geometry of either the outer frame or the inner client area of the window. That's my reason for naming the rectangle function posSize() instead of geometry(). Also to not be confused with Qt's geometry() function. YMMV.
LO already is supposed to use this schema. FWIW, the Qt documentation claims "The differentiation is done in a way that covers the most common usage transparently." AFAIK this is common for most/all platforms / UI toolkits.
The API is kept largely overload free, as we can now use list-initialization.
Definition at line 51 of file WindowPosSize.hxx.
|
inlineprotected |
Definition at line 61 of file WindowPosSize.hxx.
|
inlineconstexpr |
Definition at line 97 of file WindowPosSize.hxx.
Referenced by SalFrame::GetHeight(), SystemWindow::GetWindowState(), ImplWindowFrameProc(), vcl::operator<<(), SystemWindow::SetWindowState(), and vcl::WindowData::WindowData().
|
inline |
Definition at line 81 of file WindowPosSize.hxx.
Referenced by SystemWindow::SetWindowState().
|
inlineconstexpr |
Definition at line 75 of file WindowPosSize.hxx.
|
inlineconstexpr |
Definition at line 117 of file WindowPosSize.hxx.
|
inline |
Definition at line 98 of file WindowPosSize.hxx.
Referenced by SystemWindow::GetWindowState(), SystemWindow::SetWindowState(), and vcl::WindowData::WindowData().
|
inline |
Definition at line 76 of file WindowPosSize.hxx.
References Point::getX(), and Point::getY().
Referenced by SystemWindow::SetWindowState().
Definition at line 124 of file WindowPosSize.hxx.
References setPosSize().
Referenced by setPosSize().
|
inline |
Definition at line 118 of file WindowPosSize.hxx.
References tools::Rectangle::GetPos(), and tools::Rectangle::GetSize().
|
inline |
Definition at line 111 of file WindowPosSize.hxx.
References Size::Height(), and Size::Width().
|
inline |
Definition at line 88 of file WindowPosSize.hxx.
Referenced by SystemWindow::GetWindowState(), SystemWindow::SetWindowState(), and vcl::WindowData::WindowData().
|
inline |
Definition at line 71 of file WindowPosSize.hxx.
Referenced by SalFrame::GetGeometry(), SystemWindow::GetWindowState(), SystemWindow::SetWindowState(), and vcl::WindowData::WindowData().
|
inline |
Definition at line 73 of file WindowPosSize.hxx.
Referenced by SystemWindow::GetWindowState(), SystemWindow::SetWindowState(), and vcl::WindowData::WindowData().
|
inlineconstexpr |
Definition at line 107 of file WindowPosSize.hxx.
|
inlineconstexpr |
Definition at line 87 of file WindowPosSize.hxx.
Referenced by SalFrame::GetGeometry(), SalFrame::GetWidth(), SystemWindow::GetWindowState(), vcl::Window::ImplOutputToUnmirroredAbsoluteScreenPixel(), vcl::Window::ImplUnmirroredAbsoluteScreenToOutputPixel(), ImplWindowFrameProc(), vcl::operator<<(), vcl::Window::setPosSizePixel(), SystemWindow::SetWindowState(), and vcl::WindowData::WindowData().
|
inlineconstexpr |
Definition at line 70 of file WindowPosSize.hxx.
Referenced by vcl::Window::AbsoluteScreenToOutputPixel(), SalFrame::GetGeometry(), SystemWindow::GetWindowState(), vcl::Window::ImplCallMove(), vcl::Window::ImplOutputToUnmirroredAbsoluteScreenPixel(), vcl::Window::ImplUnmirroredAbsoluteScreenToOutputPixel(), vcl::operator<<(), vcl::Window::OutputToAbsoluteScreenPixel(), vcl::Window::setPosSizePixel(), SystemWindow::SetWindowState(), and vcl::WindowData::WindowData().
|
inlineconstexpr |
Definition at line 72 of file WindowPosSize.hxx.
Referenced by vcl::Window::AbsoluteScreenToOutputPixel(), SystemWindow::GetWindowState(), vcl::Window::ImplCallMove(), vcl::Window::ImplOutputToUnmirroredAbsoluteScreenPixel(), vcl::Window::ImplUnmirroredAbsoluteScreenToOutputPixel(), vcl::operator<<(), vcl::Window::OutputToAbsoluteScreenPixel(), SystemWindow::SetWindowState(), and vcl::WindowData::WindowData().
|
private |
Definition at line 58 of file WindowPosSize.hxx.
|
private |
Definition at line 57 of file WindowPosSize.hxx.
|
private |
Definition at line 54 of file WindowPosSize.hxx.
|
private |
Definition at line 55 of file WindowPosSize.hxx.