Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(102)

Side by Side Diff: views/layout/layout_manager.h

Issue 8588064: views: Move bubble, events, focus and layout to ui/views/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « views/layout/layout_constants.h ('k') | views/layout/layout_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_LAYOUT_MANAGER_H_ 5 #ifndef VIEWS_LAYOUT_LAYOUT_MANAGER_H_
6 #define VIEWS_LAYOUT_MANAGER_H_ 6 #define VIEWS_LAYOUT_LAYOUT_MANAGER_H_
7 #pragma once 7 #pragma once
8 8
9 #include "views/views_export.h" 9 #include "ui/views/layout/layout_manager.h"
10 // TODO(tfarina): remove this file once all includes have been updated.
10 11
11 namespace gfx { 12 #endif // VIEWS_LAYOUT_LAYOUT_MANAGER_H_
12 class Size;
13 }
14
15 namespace views {
16
17 class View;
18
19 /////////////////////////////////////////////////////////////////////////////
20 //
21 // LayoutManager interface
22 //
23 // The LayoutManager interface provides methods to handle the sizing of
24 // the children of a View according to implementation-specific heuristics.
25 //
26 /////////////////////////////////////////////////////////////////////////////
27 class VIEWS_EXPORT LayoutManager {
28 public:
29 virtual ~LayoutManager();
30
31 // Notification that this LayoutManager has been installed on a particular
32 // host.
33 virtual void Installed(View* host);
34
35 // Notification that this LayoutManager has been uninstalled on a particular
36 // host.
37 virtual void Uninstalled(View* host);
38
39 // Lay out the children of |host| according to implementation-specific
40 // heuristics. The graphics used during painting is provided to allow for
41 // string sizing.
42 virtual void Layout(View* host) = 0;
43
44 // Return the preferred size which is the size required to give each
45 // children their respective preferred size.
46 virtual gfx::Size GetPreferredSize(View* host) = 0;
47
48 // Returns the preferred height for the specified width. The default
49 // implementation returns the value from GetPreferredSize.
50 virtual int GetPreferredHeightForWidth(View* host, int width);
51
52 // Notification that a view has been added.
53 virtual void ViewAdded(View* host, View* view);
54
55 // Notification that a view has been removed.
56 virtual void ViewRemoved(View* host, View* view);
57 };
58
59 } // namespace views
60
61 #endif // VIEWS_LAYOUT_MANAGER_H_
OLDNEW
« no previous file with comments | « views/layout/layout_constants.h ('k') | views/layout/layout_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698