| 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <map> | 10 #include <map> |
| (...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 228 // Get the size the View would like to be, if enough space were available. | 228 // Get the size the View would like to be, if enough space were available. |
| 229 virtual gfx::Size GetPreferredSize(); | 229 virtual gfx::Size GetPreferredSize(); |
| 230 | 230 |
| 231 // Convenience method that sizes this view to its preferred size. | 231 // Convenience method that sizes this view to its preferred size. |
| 232 void SizeToPreferredSize(); | 232 void SizeToPreferredSize(); |
| 233 | 233 |
| 234 // Gets the minimum size of the view. View's implementation invokes | 234 // Gets the minimum size of the view. View's implementation invokes |
| 235 // GetPreferredSize. | 235 // GetPreferredSize. |
| 236 virtual gfx::Size GetMinimumSize(); | 236 virtual gfx::Size GetMinimumSize(); |
| 237 | 237 |
| 238 // Gets the maximum size of the view. Currently only used for sizing shell |
| 239 // windows. |
| 240 virtual gfx::Size GetMaximumSize(); |
| 241 |
| 238 // Return the height necessary to display this view with the provided width. | 242 // Return the height necessary to display this view with the provided width. |
| 239 // View's implementation returns the value from getPreferredSize.cy. | 243 // View's implementation returns the value from getPreferredSize.cy. |
| 240 // Override if your View's preferred height depends upon the width (such | 244 // Override if your View's preferred height depends upon the width (such |
| 241 // as with Labels). | 245 // as with Labels). |
| 242 virtual int GetHeightForWidth(int w); | 246 virtual int GetHeightForWidth(int w); |
| 243 | 247 |
| 244 // Set whether this view is visible. Painting is scheduled as needed. | 248 // Set whether this view is visible. Painting is scheduled as needed. |
| 245 virtual void SetVisible(bool visible); | 249 virtual void SetVisible(bool visible); |
| 246 | 250 |
| 247 // Return whether a view is visible | 251 // Return whether a view is visible |
| (...skipping 1187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1435 base::win::ScopedComPtr<NativeViewAccessibilityWin> | 1439 base::win::ScopedComPtr<NativeViewAccessibilityWin> |
| 1436 native_view_accessibility_win_; | 1440 native_view_accessibility_win_; |
| 1437 #endif | 1441 #endif |
| 1438 | 1442 |
| 1439 DISALLOW_COPY_AND_ASSIGN(View); | 1443 DISALLOW_COPY_AND_ASSIGN(View); |
| 1440 }; | 1444 }; |
| 1441 | 1445 |
| 1442 } // namespace views | 1446 } // namespace views |
| 1443 | 1447 |
| 1444 #endif // UI_VIEWS_VIEW_H_ | 1448 #endif // UI_VIEWS_VIEW_H_ |
| OLD | NEW |