OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 IOS_CHROME_BROWSER_UI_STACK_VIEW_CARD_STACK_LAYOUT_MANAGER_H_ | 5 #ifndef IOS_CHROME_BROWSER_UI_STACK_VIEW_CARD_STACK_LAYOUT_MANAGER_H_ |
6 #define IOS_CHROME_BROWSER_UI_STACK_VIEW_CARD_STACK_LAYOUT_MANAGER_H_ | 6 #define IOS_CHROME_BROWSER_UI_STACK_VIEW_CARD_STACK_LAYOUT_MANAGER_H_ |
7 | 7 |
8 #import <CoreGraphics/CoreGraphics.h> | 8 #import <CoreGraphics/CoreGraphics.h> |
9 #import <Foundation/Foundation.h> | 9 #import <Foundation/Foundation.h> |
10 | 10 |
11 #include "base/mac/scoped_nsobject.h" | 11 #include "base/mac/scoped_nsobject.h" |
12 | 12 |
13 @class StackCard; | 13 @class StackCard; |
14 | 14 |
15 // Encapsulates a stack of cards and their layout behavior, supporting | 15 // Encapsulates a stack of cards and their layout behavior, supporting |
16 // fanning the cards out along an axis and gathering them to fit in a given | 16 // fanning the cards out along an axis and gathering them to fit in a given |
17 // area. | 17 // area. |
18 @interface CardStackLayoutManager : NSObject | 18 @interface CardStackLayoutManager : NSObject { |
| 19 @private |
| 20 base::scoped_nsobject<NSMutableArray> cards_; |
| 21 // YES if the previous call to one of {|scrollCardAtIndex|, |
| 22 // |handleMultitouchWithFirstDelta|} was to the former method; NO otherwise. |
| 23 BOOL treatOverExtensionAsScroll_; |
| 24 NSUInteger previousFirstPinchCardIndex_; |
| 25 NSUInteger previousSecondPinchCardIndex_; |
| 26 } |
19 | 27 |
20 // The size of a card. Setting this property preserves card origins with the | 28 // The size of a card. Setting this property preserves card origins with the |
21 // exception that cards are moved as necessary to satisfy placement constraints | 29 // exception that cards are moved as necessary to satisfy placement constraints |
22 // (e.g., that a card is not placed too far away from its preceding neighbor). | 30 // (e.g., that a card is not placed too far away from its preceding neighbor). |
23 @property(nonatomic, assign) CGSize cardSize; | 31 @property(nonatomic, assign) CGSize cardSize; |
24 // The center of a card along the axis that is not the layout axis. | 32 // The center of a card along the axis that is not the layout axis. |
25 @property(nonatomic, assign) CGFloat layoutAxisPosition; | 33 @property(nonatomic, assign) CGFloat layoutAxisPosition; |
26 // The amount cards should be staggered at full expansion. | 34 // The amount cards should be staggered at full expansion. |
27 @property(nonatomic, assign) CGFloat maxStagger; | 35 @property(nonatomic, assign) CGFloat maxStagger; |
28 // The maximum amount that the first card is allowed to overextend toward the | 36 // The maximum amount that the first card is allowed to overextend toward the |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 | 163 |
156 // The amount that the first card is currently overextended. | 164 // The amount that the first card is currently overextended. |
157 - (CGFloat)overextensionAmount; | 165 - (CGFloat)overextensionAmount; |
158 | 166 |
159 // The number of cards visible when stack is fanned out. | 167 // The number of cards visible when stack is fanned out. |
160 - (NSUInteger)fannedStackCount; | 168 - (NSUInteger)fannedStackCount; |
161 | 169 |
162 @end | 170 @end |
163 | 171 |
164 #endif // IOS_CHROME_BROWSER_UI_STACK_VIEW_CARD_STACK_LAYOUT_MANAGER_H_ | 172 #endif // IOS_CHROME_BROWSER_UI_STACK_VIEW_CARD_STACK_LAYOUT_MANAGER_H_ |
OLD | NEW |