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_LAYOUT_BOX_LAYOUT_H_ | 5 #ifndef VIEWS_LAYOUT_BOX_LAYOUT_H_ |
6 #define VIEWS_LAYOUT_BOX_LAYOUT_H_ | 6 #define VIEWS_LAYOUT_BOX_LAYOUT_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
11 #include "views/layout/layout_manager.h" | 11 #include "views/layout/layout_manager.h" |
12 | 12 |
13 namespace gfx { | 13 namespace gfx { |
14 class Size; | 14 class Size; |
15 } | 15 } |
16 | 16 |
17 namespace views { | 17 namespace views { |
18 | 18 |
19 class View; | 19 class View; |
20 | 20 |
21 // A Layout manager that arranges child views vertically or horizontally in a | 21 // A Layout manager that arranges child views vertically or horizontally in a |
22 // side-by-side fashion with spacing around and between the child views. The | 22 // side-by-side fashion with spacing around and between the child views. The |
23 // child views are always sized according to their preferred size. If the | 23 // child views are always sized according to their preferred size. If the |
24 // host's bounds provide insufficient space, child views will be clamped. | 24 // host's bounds provide insufficient space, child views will be clamped. |
25 // Excess space will not be distributed. | 25 // Excess space will not be distributed. |
26 class VIEWS_API BoxLayout : public LayoutManager { | 26 class VIEWS_EXPORT BoxLayout : public LayoutManager { |
27 public: | 27 public: |
28 enum Orientation { | 28 enum Orientation { |
29 kHorizontal, | 29 kHorizontal, |
30 kVertical, | 30 kVertical, |
31 }; | 31 }; |
32 | 32 |
33 // Use |inside_border_horizontal_spacing| and | 33 // Use |inside_border_horizontal_spacing| and |
34 // |inside_border_vertical_spacing| to add additional space between the child | 34 // |inside_border_vertical_spacing| to add additional space between the child |
35 // view area and the host view border. |between_child_spacing| controls the | 35 // view area and the host view border. |between_child_spacing| controls the |
36 // space in between child views. | 36 // space in between child views. |
(...skipping 16 matching lines...) Expand all Loading... |
53 | 53 |
54 // Spacing to put in between child views. | 54 // Spacing to put in between child views. |
55 const int between_child_spacing_; | 55 const int between_child_spacing_; |
56 | 56 |
57 DISALLOW_IMPLICIT_CONSTRUCTORS(BoxLayout); | 57 DISALLOW_IMPLICIT_CONSTRUCTORS(BoxLayout); |
58 }; | 58 }; |
59 | 59 |
60 } // namespace views | 60 } // namespace views |
61 | 61 |
62 #endif // VIEWS_LAYOUT_BOX_LAYOUT_H_ | 62 #endif // VIEWS_LAYOUT_BOX_LAYOUT_H_ |
OLD | NEW |