OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef UI_VIEWS_VIEW_H_ | 5 #ifndef UI_VIEWS_VIEW_H_ |
6 #define UI_VIEWS_VIEW_H_ | 6 #define UI_VIEWS_VIEW_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <map> | 10 #include <map> |
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
251 // Return whether a view and its ancestors are visible. Returns true if the | 251 // Return whether a view and its ancestors are visible. Returns true if the |
252 // path from this view to the root view is visible. | 252 // path from this view to the root view is visible. |
253 virtual bool IsVisibleInRootView() const; | 253 virtual bool IsVisibleInRootView() const; |
254 | 254 |
255 // Set whether this view is enabled. A disabled view does not receive keyboard | 255 // Set whether this view is enabled. A disabled view does not receive keyboard |
256 // or mouse inputs. If flag differs from the current value, SchedulePaint is | 256 // or mouse inputs. If flag differs from the current value, SchedulePaint is |
257 // invoked. | 257 // invoked. |
258 void SetEnabled(bool enabled); | 258 void SetEnabled(bool enabled); |
259 | 259 |
260 // Returns whether the view is enabled. | 260 // Returns whether the view is enabled. |
261 virtual bool IsEnabled() const; | 261 bool enabled() const { return enabled_; } |
262 | 262 |
263 // This indicates that the view completely fills its bounds in an opaque | 263 // This indicates that the view completely fills its bounds in an opaque |
264 // color. This doesn't affect compositing but is a hint to the compositor to | 264 // color. This doesn't affect compositing but is a hint to the compositor to |
265 // optimize painting. | 265 // optimize painting. |
266 // Note that this method does not implicitly create a layer if one does not | 266 // Note that this method does not implicitly create a layer if one does not |
267 // already exist for the View, but is a no-op in that case. | 267 // already exist for the View, but is a no-op in that case. |
268 void SetFillsBoundsOpaquely(bool fills_bounds_opaquely); | 268 void SetFillsBoundsOpaquely(bool fills_bounds_opaquely); |
269 | 269 |
270 // Transformations ----------------------------------------------------------- | 270 // Transformations ----------------------------------------------------------- |
271 | 271 |
(...skipping 1159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1431 base::win::ScopedComPtr<NativeViewAccessibilityWin> | 1431 base::win::ScopedComPtr<NativeViewAccessibilityWin> |
1432 native_view_accessibility_win_; | 1432 native_view_accessibility_win_; |
1433 #endif | 1433 #endif |
1434 | 1434 |
1435 DISALLOW_COPY_AND_ASSIGN(View); | 1435 DISALLOW_COPY_AND_ASSIGN(View); |
1436 }; | 1436 }; |
1437 | 1437 |
1438 } // namespace views | 1438 } // namespace views |
1439 | 1439 |
1440 #endif // UI_VIEWS_VIEW_H_ | 1440 #endif // UI_VIEWS_VIEW_H_ |
OLD | NEW |