summaryrefslogtreecommitdiff
path: root/include/vcl
diff options
context:
space:
mode:
authorHuzaifa Iftikhar <huzaifa3196@gmail.com>2016-12-26 02:51:03 +0530
committerMichael Stahl <mstahl@redhat.com>2017-01-04 16:02:26 +0000
commitda7b10018433946dd0e0125ec5316dbe8c8b683c (patch)
treed03b9d6d1162997efa5488d62983940085a06a88 /include/vcl
parent4dad0c5b1ee1a243fbccd45ef2fc97b78aaa30a2 (diff)
tdf#97228 Moved class ControlCacheKey in a seperate include file.
class ControlCacheKey defined in include/vcl/salnativewidgets.hxx is used only by vcl therefore it is moved to a seperate include file named ControlCacheKey.hxx which is inside vcl/inc/ControlCacheKey.hxx. This header file contains the definition of the the class ControlCacheKey. Since this class uses an object of another class named Size which is defined in gen.hxx therefore this is included in ControlCacheKey.hxx. All the files that references the class ControlCacheKey includes ControlCacheKey.hxx with the syntax: #include "ControlCacheKey.hxx" Change-Id: I7d7b3e1cf6950a953e6bbed670c1914826b2bacd Reviewed-on: https://gerrit.libreoffice.org/32422 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'include/vcl')
-rw-r--r--include/vcl/salnativewidgets.hxx53
1 files changed, 0 insertions, 53 deletions
diff --git a/include/vcl/salnativewidgets.hxx b/include/vcl/salnativewidgets.hxx
index 5d5bd1c2707d..30997a984911 100644
--- a/include/vcl/salnativewidgets.hxx
+++ b/include/vcl/salnativewidgets.hxx
@@ -226,59 +226,6 @@ namespace o3tl
template<> struct typed_flags<ControlState> : is_typed_flags<ControlState, 0xc06f> {};
}
-class ControlCacheKey
-{
-public:
- ControlType mnType;
- ControlPart mnPart;
- ControlState mnState;
- Size maSize;
-
- ControlCacheKey(ControlType nType, ControlPart nPart, ControlState nState, const Size& rSize)
- : mnType(nType)
- , mnPart(nPart)
- , mnState(nState)
- , maSize(rSize)
- {}
-
- bool operator==(ControlCacheKey const& aOther) const
- {
- return mnType == aOther.mnType
- && mnPart == aOther.mnPart
- && mnState == aOther.mnState
- && maSize.Width() == aOther.maSize.Width()
- && maSize.Height() == aOther.maSize.Height();
- }
-
- bool canCacheControl()
- {
- switch(mnType)
- {
- case ControlType::Checkbox:
- case ControlType::Radiobutton:
- case ControlType::ListNode:
- case ControlType::Slider:
- case ControlType::Progress:
- // FIXME: these guys have complex state hidden in ImplControlValue
- // structs which affects rendering, needs to be a and needs to be
- // part of the key to our cache.
- case ControlType::Spinbox:
- case ControlType::SpinButtons:
- case ControlType::TabItem:
- return false;
-
- case ControlType::Menubar:
- if (mnPart == ControlPart::Entire)
- return false;
- break;
-
- default:
- break;
- }
- return true;
- }
-};
-
/* ButtonValue:
*
* Identifies the tri-state value options