diff options
author | Noel Grandin <noel@peralex.com> | 2015-05-21 15:52:27 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-05-22 10:37:59 +0200 |
commit | 566922a98d548529feacb7c21bfc8897ff5b61af (patch) | |
tree | e55a4b26ac5b32d842efbc9d9e6dc5576b226005 /include | |
parent | 321b34419160da6829e30fc67f3d107fcb936390 (diff) |
convert WINDOW constants for GetWindow() methods to scoped enum
Change-Id: I0c7c6d095732704eb4ab48f1277a0592b1c7fa33
Diffstat (limited to 'include')
-rw-r--r-- | include/vcl/layout.hxx | 6 | ||||
-rw-r--r-- | include/vcl/window.hxx | 43 |
2 files changed, 26 insertions, 23 deletions
diff --git a/include/vcl/layout.hxx b/include/vcl/layout.hxx index e73399c1abf1..813999a794b0 100644 --- a/include/vcl/layout.hxx +++ b/include/vcl/layout.hxx @@ -760,21 +760,21 @@ VCL_DLLPUBLIC Size bestmaxFrameSizeForScreenSize(const Size &rScreenSize); //Get first window of a pTopLevel window as //if any intermediate layout widgets didn't exist -//i.e. acts like pChild = pChild->GetWindow(WINDOW_FIRSTCHILD); +//i.e. acts like pChild = pChild->GetWindow(GetWindowType::FirstChild); //in a flat hierarchy where dialogs only have one layer //of children VCL_DLLPUBLIC vcl::Window* firstLogicalChildOfParent(vcl::Window *pTopLevel); //Get next window after pChild of a pTopLevel window as //if any intermediate layout widgets didn't exist -//i.e. acts like pChild = pChild->GetWindow(WINDOW_NEXT); +//i.e. acts like pChild = pChild->GetWindow(GetWindowType::Next); //in a flat hierarchy where dialogs only have one layer //of children VCL_DLLPUBLIC vcl::Window* nextLogicalChildOfParent(vcl::Window *pTopLevel, vcl::Window *pChild); //Get previous window before pChild of a pTopLevel window as //if any intermediate layout widgets didn't exist -//i.e. acts like pChild = pChild->GetWindow(WINDOW_PREV); +//i.e. acts like pChild = pChild->GetWindow(GetWindowType::Prev); //in a flat hierarchy where dialogs only have one layer //of children VCL_DLLPUBLIC vcl::Window* prevLogicalChildOfParent(vcl::Window *pTopLevel, vcl::Window *pChild); diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx index 9e760e3b5b43..a31ca525c7e5 100644 --- a/include/vcl/window.hxx +++ b/include/vcl/window.hxx @@ -127,23 +127,26 @@ namespace o3tl // Type fuer GetWindow() -#define WINDOW_PARENT ((sal_uInt16)0) -#define WINDOW_FIRSTCHILD ((sal_uInt16)1) -#define WINDOW_LASTCHILD ((sal_uInt16)2) -#define WINDOW_PREV ((sal_uInt16)3) -#define WINDOW_NEXT ((sal_uInt16)4) -#define WINDOW_FIRSTOVERLAP ((sal_uInt16)5) -#define WINDOW_LASTOVERLAP ((sal_uInt16)6) -#define WINDOW_OVERLAP ((sal_uInt16)7) -#define WINDOW_PARENTOVERLAP ((sal_uInt16)8) -#define WINDOW_CLIENT ((sal_uInt16)9) -#define WINDOW_REALPARENT ((sal_uInt16)10) -#define WINDOW_FRAME ((sal_uInt16)11) -#define WINDOW_BORDER ((sal_uInt16)12) -#define WINDOW_FIRSTTOPWINDOWCHILD ((sal_uInt16)13) -#define WINDOW_LASTTOPWINDOWCHILD ((sal_uInt16)14) -#define WINDOW_PREVTOPWINDOWSIBLING ((sal_uInt16)15) -#define WINDOW_NEXTTOPWINDOWSIBLING ((sal_uInt16)16) +enum class GetWindowType +{ + Parent = 0, + FirstChild = 1, + LastChild = 2, + Prev = 3, + Next = 4, + FirstOverlap = 5, + LastOverlap = 6, + Overlap = 7, + ParentOverlap = 8, + Client = 9, + RealParent = 10, + Frame = 11, + Border = 12, + FirstTopWindowChild = 13, + LastTopWindowChild = 14, + PrevTopWindowSibling = 15, + NextTopWindowSibling = 16, +}; // Flags for setPosSizePixel() #define WINDOW_POSSIZE_X ((sal_uInt16)0x0001) @@ -1111,7 +1114,7 @@ public: sal_uInt16 GetChildCount() const; vcl::Window* GetChild( sal_uInt16 nChild ) const; - vcl::Window* GetWindow( sal_uInt16 nType ) const; + vcl::Window* GetWindow( GetWindowType nType ) const; bool IsChild( const vcl::Window* pWindow, bool bSystemWindow = false ) const; bool IsWindowOrChild( const vcl::Window* pWindow, bool bSystemWindow = false ) const; @@ -1241,8 +1244,8 @@ private: SAL_DLLPRIVATE bool ImplIsAccessibleCandidate() const; SAL_DLLPRIVATE bool ImplIsAccessibleNativeFrame() const; - SAL_DLLPRIVATE sal_uInt16 ImplGetAccessibleCandidateChildWindowCount( sal_uInt16 nFirstWindowType ) const; - SAL_DLLPRIVATE vcl::Window* ImplGetAccessibleCandidateChild( sal_uInt16 nChild, sal_uInt16& rChildCount, sal_uInt16 nFirstWindowType, bool bTopLevel = true ) const; + SAL_DLLPRIVATE sal_uInt16 ImplGetAccessibleCandidateChildWindowCount( GetWindowType nFirstWindowType ) const; + SAL_DLLPRIVATE vcl::Window* ImplGetAccessibleCandidateChild( sal_uInt16 nChild, sal_uInt16& rChildCount, GetWindowType nFirstWindowType, bool bTopLevel = true ) const; SAL_DLLPRIVATE bool ImplRegisterAccessibleNativeFrame(); SAL_DLLPRIVATE void ImplRevokeAccessibleNativeFrame(); ///@} |