Add ICU message format support
[chromium-blink-merge.git] / ui / views / masked_targeter_delegate.h
blob55ac3b30cf420362afa4f52e9ef175431d345493
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef UI_VIEWS_MASKED_TARGETER_DELEGATE_H_
6 #define UI_VIEWS_MASKED_TARGETER_DELEGATE_H_
8 #include "ui/base/ui_base_types.h"
9 #include "ui/views/view_targeter_delegate.h"
10 #include "ui/views/views_export.h"
12 namespace gfx {
13 class Path;
14 class Rect;
17 namespace views {
18 class View;
20 // Defines the default behaviour for hit-testing a rectangular region against
21 // the bounds of a View having a custom-shaped hit test mask. Views define
22 // such a mask by extending this class.
23 class VIEWS_EXPORT MaskedTargeterDelegate : public ViewTargeterDelegate {
24 public:
25 MaskedTargeterDelegate() {}
26 ~MaskedTargeterDelegate() override {}
28 // Sets the hit-test mask for the view which implements this interface,
29 // in that view's local coordinate space. Returns whether a valid mask
30 // has been set in |mask|.
31 virtual bool GetHitTestMask(gfx::Path* mask) const = 0;
33 // ViewTargeterDelegate:
34 bool DoesIntersectRect(const View* target,
35 const gfx::Rect& rect) const override;
37 private:
38 DISALLOW_COPY_AND_ASSIGN(MaskedTargeterDelegate);
41 } // namespace views
43 #endif // UI_VIEWS_MASKED_TARGETER_DELEGATE_H_