OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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 | 7 |
8 #include <algorithm> | 8 #include <algorithm> |
9 #include <map> | 9 #include <map> |
10 #include <set> | 10 #include <set> |
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
269 | 269 |
270 // Convenience method that sizes this view to its preferred size. | 270 // Convenience method that sizes this view to its preferred size. |
271 void SizeToPreferredSize(); | 271 void SizeToPreferredSize(); |
272 | 272 |
273 // Gets the minimum size of the view. View's implementation invokes | 273 // Gets the minimum size of the view. View's implementation invokes |
274 // GetPreferredSize. | 274 // GetPreferredSize. |
275 virtual gfx::Size GetMinimumSize() const; | 275 virtual gfx::Size GetMinimumSize() const; |
276 | 276 |
277 // Gets the maximum size of the view. Currently only used for sizing shell | 277 // Gets the maximum size of the view. Currently only used for sizing shell |
278 // windows. | 278 // windows. |
279 virtual gfx::Size GetMaximumSize(); | 279 virtual gfx::Size GetMaximumSize() const; |
280 | 280 |
281 // Return the height necessary to display this view with the provided width. | 281 // Return the height necessary to display this view with the provided width. |
282 // View's implementation returns the value from getPreferredSize.cy. | 282 // View's implementation returns the value from getPreferredSize.cy. |
283 // Override if your View's preferred height depends upon the width (such | 283 // Override if your View's preferred height depends upon the width (such |
284 // as with Labels). | 284 // as with Labels). |
285 virtual int GetHeightForWidth(int w) const; | 285 virtual int GetHeightForWidth(int w) const; |
286 | 286 |
287 // Set whether this view is visible. Painting is scheduled as needed. | 287 // Set whether this view is visible. Painting is scheduled as needed. |
288 virtual void SetVisible(bool visible); | 288 virtual void SetVisible(bool visible); |
289 | 289 |
(...skipping 1316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1606 // Belongs to this view, but it's reference-counted on some platforms | 1606 // Belongs to this view, but it's reference-counted on some platforms |
1607 // so we can't use a scoped_ptr. It's dereferenced in the destructor. | 1607 // so we can't use a scoped_ptr. It's dereferenced in the destructor. |
1608 NativeViewAccessibility* native_view_accessibility_; | 1608 NativeViewAccessibility* native_view_accessibility_; |
1609 | 1609 |
1610 DISALLOW_COPY_AND_ASSIGN(View); | 1610 DISALLOW_COPY_AND_ASSIGN(View); |
1611 }; | 1611 }; |
1612 | 1612 |
1613 } // namespace views | 1613 } // namespace views |
1614 | 1614 |
1615 #endif // UI_VIEWS_VIEW_H_ | 1615 #endif // UI_VIEWS_VIEW_H_ |
OLD | NEW |