| 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 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 241 // Override if your View's preferred height depends upon the width (such | 241 // Override if your View's preferred height depends upon the width (such |
| 242 // as with Labels). | 242 // as with Labels). |
| 243 virtual int GetHeightForWidth(int w); | 243 virtual int GetHeightForWidth(int w); |
| 244 | 244 |
| 245 // Set whether this view is visible. Painting is scheduled as needed. | 245 // Set whether this view is visible. Painting is scheduled as needed. |
| 246 virtual void SetVisible(bool visible); | 246 virtual void SetVisible(bool visible); |
| 247 | 247 |
| 248 // Return whether a view is visible | 248 // Return whether a view is visible |
| 249 bool visible() const { return visible_; } | 249 bool visible() const { return visible_; } |
| 250 | 250 |
| 251 // Return whether a view and its ancestors are visible. Returns true if the | 251 // Return whether this 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 IsDrawn() 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 |enabled| differs from the current value, SchedulePaint | 256 // or mouse inputs. If |enabled| differs from the current value, SchedulePaint |
| 257 // is invoked. | 257 // is 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 bool enabled() const { return enabled_; } | 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 |
| (...skipping 1167 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 |