Improve YouCompleteMe handling of Blink header without source files.
[chromium-blink-merge.git] / ui / views / native_theme_delegate.h
blobf17f164462e7029064fd8f7d75c220222747ffe1
1 // Copyright (c) 2012 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_NATIVE_THEME_DELEGATE_H_
6 #define UI_VIEWS_NATIVE_THEME_DELEGATE_H_
8 #include "ui/gfx/rect.h"
9 #include "ui/native_theme/native_theme.h"
10 #include "ui/views/views_export.h"
12 namespace views {
14 // A delagate that supports animating transtions between different native
15 // theme states. This delegate can be used to control a native theme Border
16 // or Painter object.
18 // If animation is ongoing, the native theme border or painter will
19 // composite the foreground state over the backgroud state using an alpha
20 // between 0 and 255 based on the current value of the animation.
21 class VIEWS_EXPORT NativeThemeDelegate {
22 public:
23 virtual ~NativeThemeDelegate() {}
25 // Get the native theme part that should be drawn.
26 virtual ui::NativeTheme::Part GetThemePart() const = 0;
28 // Get the rectangle that should be painted.
29 virtual gfx::Rect GetThemePaintRect() const = 0;
31 // Get the state of the part, along with any extra data needed for drawing.
32 virtual ui::NativeTheme::State GetThemeState(
33 ui::NativeTheme::ExtraParams* params) const = 0;
35 // If the native theme drawign should be animated, return the Animation object
36 // that controlls it. If no animation is ongoing, NULL may be returned.
37 virtual const gfx::Animation* GetThemeAnimation() const = 0;
39 // If animation is onging, this returns the background native theme state.
40 virtual ui::NativeTheme::State GetBackgroundThemeState(
41 ui::NativeTheme::ExtraParams* params) const = 0;
43 // If animation is onging, this returns the foreground native theme state.
44 // This state will be composited over the background using an alpha value
45 // based on the current value of the animation.
46 virtual ui::NativeTheme::State GetForegroundThemeState(
47 ui::NativeTheme::ExtraParams* params) const = 0;
50 } // namespace views
52 #endif // UI_VIEWS_NATIVE_THEME_DELEGATE_H_