Rename property: layout → layers

This is to avoid a clash with the layout method introduced in 10.7 (and used during auto layout).
This commit is contained in:
Allan Odgaard
2012-09-12 23:32:03 +02:00
parent 144ee3762d
commit 2e3af12381
4 changed files with 8 additions and 8 deletions

View File

@@ -86,9 +86,9 @@ struct layer_t
NSPoint mouseDownPos;
}
- (void)drawLayer:(layer_t const&)aLayer;
- (std::vector<layer_t> const&)layout;
- (std::vector<layer_t> const&)layers;
- (uint32_t)currentState;
- (void)setLayout:(std::vector<layer_t> const&)aLayout;
- (void)setLayers:(std::vector<layer_t> const&)aLayout;
- (void)sendAction:(SEL)action fromLayer:(layer_t const&)aLayer;
- (NSInteger)tagForLayerContainingPoint:(NSPoint)aPoint;
@property (nonatomic, readonly) NSInteger tag; // tag of the most recent layer causing an action

View File

@@ -66,12 +66,12 @@ OAK_DEBUG_VAR(OakControl);
@implementation OakControl
@synthesize tag, mouseTrackingDisabled;
- (std::vector<layer_t> const&)layout
- (std::vector<layer_t> const&)layers
{
return layout;
}
- (void)setLayout:(std::vector<layer_t> const&)aLayout
- (void)setLayers:(std::vector<layer_t> const&)aLayout
{
// Remove views that are no longer in the layout
iterate(oldLayer, layout)

View File

@@ -284,7 +284,7 @@ static std::vector<cell_layout_t> layout (CGFloat frameWidth, std::vector<sb::ce
}
}
[self setLayout:newLayout];
[self setLayers:newLayout];
[self setNeedsDisplay:YES];
}
@@ -318,7 +318,7 @@ static std::vector<cell_layout_t> layout (CGFloat frameWidth, std::vector<sb::ce
NSRect rect = [self bounds];
// Find the layer with the provided tag
iterate(it, [self layout])
iterate(it, [self layers])
{
if(it->tag == cellTag)
{

View File

@@ -405,7 +405,7 @@ static id SafeObjectAtIndex (NSArray* array, NSUInteger index)
D(DBF_TabBarView, bug("\n"););
if(!isExpanded)
return [self setLayout:metrics->layers_for("backgroundCollapsed", rect, -1)];
return [self setLayers:metrics->layers_for("backgroundCollapsed", rect, -1)];
std::vector<layer_t> newLayout, selectedTabLayers;
newLayout = metrics->layers_for("background", rect, -1);
@@ -471,7 +471,7 @@ static id SafeObjectAtIndex (NSArray* array, NSUInteger index)
rect.origin.x += rect.size.width + metrics->tabSpacing;
}
newLayout.insert(newLayout.end(), selectedTabLayers.begin(), selectedTabLayers.end());
[self setLayout:newLayout];
[self setLayers:newLayout];
}
- (void)viewFrameChanged:(NSNotification*)aNotification