JubeatPlus 3.9.11
Loading...
Searching...
No Matches
MusicListView.h
Go to the documentation of this file.
1
16
17#import <UIKit/UIKit.h>
18
19#import "ArtworkLoader.h"
20
21@class MusicView;
22@class TuneInfo;
23@class BalloonView;
25
26NS_ASSUME_NONNULL_BEGIN
27
34@protocol MusicListViewDelegate <NSObject>
35
36@optional
37
42- (unsigned int)numberOfMusic;
43
49- (nullable TuneInfo *)musicInfoForIndex:(NSUInteger)index;
50
56- (nullable TuneInfo *)extendMusicInfoForMusicID:(unsigned int)musicID;
57
62- (nullable NSArray<NSIndexPath *> *)removeMusicArray;
63
68- (nullable NSArray<NSIndexPath *> *)addMusicArray;
69
75- (void)scrollFromPageNum:(int)pageNum bAnim:(BOOL)bAnim;
76
81
87- (void)changeMusicListView:(NSInteger)index musicID:(NSUInteger)musicID;
88
95- (void)changeMusicListView:(NSInteger)index musicID:(NSUInteger)musicID isFirst:(BOOL)isFirst;
96
102- (void)showCoverView:(nonnull NSArray *)views addGesture:(nonnull UIGestureRecognizer *)gesture;
103
108
113- (void)btnTouchesBegan:(nullable id)sender;
114
119- (void)btnTouchesCancel:(nullable id)sender;
120
121@end
122
126@interface MusicListView : UIView <UICollectionViewDataSource,
127 UICollectionViewDelegateFlowLayout,
129 NSCacheDelegate>
130
137- (instancetype)initWithFrame:(CGRect)frame;
138
146- (CGPoint)centerOfMusicViewInPage:(NSUInteger)page forIndex:(NSUInteger)index;
147
153
159- (CGFloat)artworkSize;
160
165- (void)clearAllPage;
166
172- (void)loadArtworkForInfo:(nonnull MusicView *)musicView;
173
182- (void)loadArtworkForInfo:(nullable TuneInfo *)info
183 forImageView:(nullable UIImageView *)imageView
184 concurrent:(BOOL)concurrent
185 index:(int)index;
186
193- (void)reloadPageContainsMusicForIndex:(NSUInteger)musicIndex
194 playlistIndex:(NSInteger)playlistIndex;
195
201- (void)removeMusicView:(nonnull MusicView *)musicView;
202
208- (void)setMusicViewDelegate:(nullable id)mvDelegate;
209
215- (void)alignPage:(int)page;
216
224- (BOOL)layoutPage:(int)page center:(int)center;
225
230- (void)updateViews;
231
237- (void)imageDataLoaded:(nonnull ArtworkLoader *)loader;
238
243- (void)releaseArtworks;
244
251
258- (int)musicInPage:(int)colType;
259
265- (int)numPage;
266
272- (int)getCurrentPage;
273
278- (void)updatePageDisplay;
279
285- (void)addDownloadMark:(int)index;
286
293- (nullable MusicView *)getMusicView:(int)index;
294
300- (void)changeLayout:(int)colType;
301
307- (void)pushScaleDown:(nullable id)sender;
308
314- (void)pushScaleUp:(nullable id)sender;
315
321- (void)btnTouchesBegan:(nullable id)touches;
322
328- (void)btnTouchesCancel:(nullable id)touches;
329
335- (void)pageSliderHidden:(nullable id)sender;
336
342- (void)showPageSelector:(nullable UIGestureRecognizer *)gesture;
343
348- (void)sliderValueChange;
349
355- (void)sliderChange:(nullable id)sender;
356
362- (void)sliderEnd:(nullable id)sender;
363
368- (void)hideExplainBalloon;
369
375- (void)alphaSliderChange:(nullable id)sender;
376
382- (void)alphaSliderEnd:(nullable id)sender;
383
389- (float)getMusicListAlpha;
390
395- (void)refreshTextColor;
396
401- (void)refreshRatingChip;
402
403#pragma mark - Properties
404
406@property(nonatomic, weak, nullable) id<MusicListViewDelegate> delegate;
407
408@end
409
410NS_ASSUME_NONNULL_END
411
412// code: language=Objective-C
413// kate: hl Objective-C;
414// vim: set ft=objc :
Loads one tune's jacket artwork out of a packed, enciphered archive.
A one-shot loader for a single tune's artwork.
Definition ArtworkLoader.h:42
A speech balloon: a rounded rectangle with one triangular arrow.
Definition BalloonView.h:34
The song-grid layout for the music-selection collection view.
Definition MusicListCollectionLayout.h:22
A paged, scrolling grid of song tiles with column-size, paging, and alpha controls.
Definition MusicListView.h:129
void refreshRatingChip()
Refreshes every visible tile's rating chips from the preference.
Definition MusicListView.m:1336
void updateViews()
Reloads the collection view.
Definition MusicListView.m:787
void updatePageDisplay()
Refreshes the page label, arrows, and page slider for the current page.
Definition MusicListView.m:748
int numPage()
The number of pages.
Definition MusicListView.m:736
void releaseArtworks()
Cancels operations and clears the artwork cache and loader dictionary.
Definition MusicListView.m:712
void hideExplainBalloon()
Hides the explanatory balloon.
Definition MusicListView.m:1273
void refreshTextColor()
Refreshes every visible tile's label colour.
Definition MusicListView.m:1329
void clearAllPage()
Clears and hides every visible tile.
Definition MusicListView.m:524
void sliderValueChange()
Resets the page slider's range and value to the current page.
Definition MusicListView.m:1230
void hideAllPlaylistAction()
Hides the playlist add/remove button on every visible tile.
Definition MusicListView.m:517
int getCurrentPage()
The current page index.
Definition MusicListView.m:743
id< MusicListViewDelegate > delegate
The hosting controller.
Definition MusicListView.h:406
float getMusicListAlpha()
The current list alpha.
Definition MusicListView.m:1322
CGFloat artworkSize()
The tile artwork edge length for the current device idiom.
Definition MusicListView.m:508
int currentViewsPerPage()
The tile count per page for the current column type.
Definition MusicListView.m:726
A song tile: artwork, labels, and per-difficulty rank and full-combo image stacks.
Definition MusicView.h:67
A tune, its three difficulty levels, and how it sorts.
Definition TuneInfo.h:20
What an ArtworkLoader tells its owner.
Definition ArtworkLoader.h:29
unsigned int numberOfMusic()
The number of tunes in the list.
nullable NSArray< NSIndexPath * > * addMusicArray()
The index paths to insert on the next batch reload.
void musicListScrollBegin()
The list began scrolling.
void hiddenCoverView()
Dismiss the cover view.
nullable NSArray< NSIndexPath * > * removeMusicArray()
The index paths to delete on the next batch reload.