mirror of
https://github.com/microtherion/VocalEasel.git
synced 2024-12-22 11:14:00 +00:00
Implement selectAll
This commit is contained in:
parent
e44dd7d554
commit
013bc0fb8c
|
@ -29,6 +29,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
- (VLMeasureEditable *)initWithView:(VLSheetView *)view anchor:(uint32_t)anchor;
|
- (VLMeasureEditable *)initWithView:(VLSheetView *)view anchor:(uint32_t)anchor;
|
||||||
|
- (VLMeasureEditable *)initWithView:(VLSheetView *)view anchor:(uint32_t)anchor to:(uint32_t)end;
|
||||||
- (BOOL)canExtendSelection:(VLRegion)region;
|
- (BOOL)canExtendSelection:(VLRegion)region;
|
||||||
- (void)extendSelection:(VLLocation)at;
|
- (void)extendSelection:(VLLocation)at;
|
||||||
- (BOOL)hidden;
|
- (BOOL)hidden;
|
||||||
|
@ -37,17 +38,22 @@
|
||||||
|
|
||||||
@implementation VLMeasureEditable
|
@implementation VLMeasureEditable
|
||||||
|
|
||||||
- (VLMeasureEditable *)initWithView:(VLSheetView *)view anchor:(uint32_t)anchor
|
- (VLMeasureEditable *)initWithView:(VLSheetView *)view anchor:(uint32_t)anchor to:(uint32_t)end
|
||||||
{
|
{
|
||||||
fView = view;
|
fView = view;
|
||||||
fAnchor = anchor;
|
fAnchor = anchor;
|
||||||
dispatch_async(dispatch_get_main_queue(), ^{
|
dispatch_async(dispatch_get_main_queue(), ^{
|
||||||
[fView selectMeasure:fAnchor to:fAnchor];
|
[fView selectMeasure:fAnchor to:end];
|
||||||
});
|
});
|
||||||
|
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (VLMeasureEditable *)initWithView:(VLSheetView *)view anchor:(uint32_t)anchor
|
||||||
|
{
|
||||||
|
return [self initWithView:view anchor:anchor to:anchor];
|
||||||
|
}
|
||||||
|
|
||||||
- (void)dealloc
|
- (void)dealloc
|
||||||
{
|
{
|
||||||
[fView selectMeasure:0 to:kNoMeasure];
|
[fView selectMeasure:0 to:kNoMeasure];
|
||||||
|
@ -334,6 +340,12 @@ VLSequenceCallback(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (IBAction)selectAll:(id)sender
|
||||||
|
{
|
||||||
|
[self setEditTarget:[[VLMeasureEditable alloc]
|
||||||
|
initWithView:self anchor:0 to:[self song]->fMeasures.size()]];
|
||||||
|
}
|
||||||
|
|
||||||
- (IBAction)delete:(id)sender
|
- (IBAction)delete:(id)sender
|
||||||
{
|
{
|
||||||
[[self document] willChangeSong];
|
[[self document] willChangeSong];
|
||||||
|
|
Loading…
Reference in New Issue
Block a user