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

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

Issue 6286013: V2 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 10 months 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 | « ui/views/layout/fill_layout.cc ('k') | ui/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')
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef UI_VIEWS_LAYOUT_LAYOUT_MANAGER_H_
6 #define UI_VIEWS_LAYOUT_LAYOUT_MANAGER_H_
7 #pragma once
8
9 namespace gfx {
10 class Size;
11 }
12
13 namespace ui {
14
15 class View;
16
17 ////////////////////////////////////////////////////////////////////////////////
18 // LayoutManager interface
19 //
20 // An interface implemented by an object that manages sizing of a View's
21 // children.
22 //
23 class LayoutManager {
24 public:
25 virtual ~LayoutManager() {}
26
27 // Notification that this LayoutManager has been installed on a particular
28 // host.
29 virtual void Installed(View* host) {}
30
31 // Notification that this LayoutManager has been uninstalled on a particular
32 // host.
33 virtual void Uninstalled(View* host) {}
34
35 // Lay out the children of |host| according to implementation-specific
36 // heuristics. The graphics used during painting is provided to allow for
37 // string sizing.
38 virtual void Layout(View* host) = 0;
39
40 // Return the preferred size which is the size required to give each
41 // children their respective preferred size.
42 virtual gfx::Size GetPreferredSize(View* host) = 0;
43
44 // Returns the preferred height for the specified width. The default
45 // implementation returns the value from GetPreferredSize.
46 virtual int GetPreferredHeightForWidth(View* host, int width);
47
48 // Notification that a view has been added.
49 virtual void ViewAdded(View* host, View* view) {}
50
51 // Notification that a view has been removed.
52 virtual void ViewRemoved(View* host, View* view) {}
53 };
54
55 } // namespace ui
56
57 #endif // UI_VIEWS_LAYOUT_LAYOUT_MANAGER_H_
OLDNEW
« no previous file with comments | « ui/views/layout/fill_layout.cc ('k') | ui/views/layout/layout_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698