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 VIEWS_WIDGET_ROOT_VIEW_H_ | 5 #ifndef VIEWS_WIDGET_ROOT_VIEW_H_ |
6 #define VIEWS_WIDGET_ROOT_VIEW_H_ | 6 #define VIEWS_WIDGET_ROOT_VIEW_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 25 matching lines...) Expand all Loading... |
36 // | 36 // |
37 // A RootView can have only one child, called its "Contents View" which is | 37 // A RootView can have only one child, called its "Contents View" which is |
38 // sized to fill the bounds of the RootView (and hence the client area of the | 38 // sized to fill the bounds of the RootView (and hence the client area of the |
39 // Widget). Call SetContentsView() after the associated Widget has been | 39 // Widget). Call SetContentsView() after the associated Widget has been |
40 // initialized to attach the contents view to the RootView. | 40 // initialized to attach the contents view to the RootView. |
41 // TODO(beng): Enforce no other callers to AddChildView/tree functions by | 41 // TODO(beng): Enforce no other callers to AddChildView/tree functions by |
42 // overriding those methods as private here. | 42 // overriding those methods as private here. |
43 // TODO(beng): Clean up API further, make Widget a friend. | 43 // TODO(beng): Clean up API further, make Widget a friend. |
44 // TODO(sky): We don't really want to export this class. | 44 // TODO(sky): We don't really want to export this class. |
45 // | 45 // |
46 class VIEWS_API RootView : public View, public FocusTraversable { | 46 class VIEWS_EXPORT RootView : public View, public FocusTraversable { |
47 public: | 47 public: |
48 static const char kViewClassName[]; | 48 static const char kViewClassName[]; |
49 | 49 |
50 // Creation and lifetime ----------------------------------------------------- | 50 // Creation and lifetime ----------------------------------------------------- |
51 explicit RootView(Widget* widget); | 51 explicit RootView(Widget* widget); |
52 virtual ~RootView(); | 52 virtual ~RootView(); |
53 | 53 |
54 // Tree operations ----------------------------------------------------------- | 54 // Tree operations ----------------------------------------------------------- |
55 | 55 |
56 // Sets the "contents view" of the RootView. This is the single child view | 56 // Sets the "contents view" of the RootView. This is the single child view |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 // Tracks drag state for a view. | 209 // Tracks drag state for a view. |
210 View::DragInfo drag_info; | 210 View::DragInfo drag_info; |
211 | 211 |
212 DISALLOW_IMPLICIT_CONSTRUCTORS(RootView); | 212 DISALLOW_IMPLICIT_CONSTRUCTORS(RootView); |
213 }; | 213 }; |
214 | 214 |
215 } // namespace internal | 215 } // namespace internal |
216 } // namespace views | 216 } // namespace views |
217 | 217 |
218 #endif // VIEWS_WIDGET_ROOT_VIEW_H_ | 218 #endif // VIEWS_WIDGET_ROOT_VIEW_H_ |
OLD | NEW |